From f1559722eb7a502128a07435149988f49b627bc5 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 7 May 2004 20:29:24 +0000 Subject: [PATCH] 2004-05-07 Jeff Johnston * libc/include/sys/param.h: Remove endian info and include instead. * libc/include/machine/endian.h: New file. * libc/machine/arm/machine/endian.h: Ditto. * libc/machine/arm/machine/param.h: Ditto. * libc/sys/arm/sys/param.h: Removed. * libc/sys/sysvi386/sys/param.h: Ditto. * libc/sys/rtems/sys/param.h: Modified to include . --- newlib/libc/include/machine/endian.h | 19 +++++++++++++++ newlib/libc/include/sys/param.h | 23 +++++++------------ newlib/libc/machine/arm/machine/endian.h | 12 ++++++++++ .../arm/sys => machine/arm/machine}/param.h | 9 ++------ newlib/libc/sys/rtems/sys/param.h | 16 +------------ newlib/libc/sys/sysvi386/sys/param.h | 8 ------- 6 files changed, 42 insertions(+), 45 deletions(-) create mode 100644 newlib/libc/include/machine/endian.h create mode 100644 newlib/libc/machine/arm/machine/endian.h rename newlib/libc/{sys/arm/sys => machine/arm/machine}/param.h (56%) delete mode 100644 newlib/libc/sys/sysvi386/sys/param.h diff --git a/newlib/libc/include/machine/endian.h b/newlib/libc/include/machine/endian.h new file mode 100644 index 000000000..2c71a2407 --- /dev/null +++ b/newlib/libc/include/machine/endian.h @@ -0,0 +1,19 @@ +#ifndef __MACHINE_ENDIAN_H__ + +#include + +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 +#endif +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 +#endif + +#ifndef BYTE_ORDER +#ifdef __IEEE_LITTLE_ENDIAN +#define BYTE_ORDER LITTLE_ENDIAN +#else +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* __MACHINE_ENDIAN_H__ */ diff --git a/newlib/libc/include/sys/param.h b/newlib/libc/include/sys/param.h index 9676c910a..7e8762a65 100644 --- a/newlib/libc/include/sys/param.h +++ b/newlib/libc/include/sys/param.h @@ -6,27 +6,20 @@ # define _SYS_PARAM_H #include +#include +#include -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif - +#ifndef HZ # define HZ (60) +#endif +#ifndef NOFILE # define NOFILE (60) +#endif +#ifndef PATHSIZE # define PATHSIZE (1024) +#endif #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) -#ifndef BYTE_ORDER -#ifdef __IEEE_LITTLE_ENDIAN -#define BYTE_ORDER LITTLE_ENDIAN -#else -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif - #endif diff --git a/newlib/libc/machine/arm/machine/endian.h b/newlib/libc/machine/arm/machine/endian.h new file mode 100644 index 000000000..54844278b --- /dev/null +++ b/newlib/libc/machine/arm/machine/endian.h @@ -0,0 +1,12 @@ +/* ARM configuration file */ + +#ifndef _MACHINE_ENDIAN_H +# define _MACHINE_ENDIAN_H + +#ifdef __ARMEB__ +#define BYTE_ORDER BIG_ENDIAN +#else +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#endif diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/machine/arm/machine/param.h similarity index 56% rename from newlib/libc/sys/arm/sys/param.h rename to newlib/libc/machine/arm/machine/param.h index adc066e9a..595294cf3 100644 --- a/newlib/libc/sys/arm/sys/param.h +++ b/newlib/libc/machine/arm/machine/param.h @@ -1,14 +1,9 @@ /* ARM configuration file; HZ is 100 rather than the default 60 */ -#ifndef _SYS_PARAM_H -# define _SYS_PARAM_H +#ifndef _MACHINE_PARAM_H +# define _MACHINE_PARAM_H # define HZ (100) -# define NOFILE (60) -# define PATHSIZE (1024) - -#define BIG_ENDIAN 4321 -#define LITTLE_ENDIAN 1234 #ifdef __ARMEB__ #define BYTE_ORDER BIG_ENDIAN diff --git a/newlib/libc/sys/rtems/sys/param.h b/newlib/libc/sys/rtems/sys/param.h index 36db646b0..0060720f8 100644 --- a/newlib/libc/sys/rtems/sys/param.h +++ b/newlib/libc/sys/rtems/sys/param.h @@ -45,25 +45,11 @@ /* from newlib's */ #include - -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif +#include # define HZ (60) # define PATHSIZE (1024) -#ifndef BYTE_ORDER -#ifdef __IEEE_LITTLE_ENDIAN -#define BYTE_ORDER LITTLE_ENDIAN -#else -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif - /* end of from newlib's */ #include diff --git a/newlib/libc/sys/sysvi386/sys/param.h b/newlib/libc/sys/sysvi386/sys/param.h deleted file mode 100644 index 6c6f6b0a4..000000000 --- a/newlib/libc/sys/sysvi386/sys/param.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _SYS_PARAM_H -# define _SYS_PARAM_H - -# define HZ 60 -# define NOFILE 60 -# define PATHSIZE 1024 - -#endif