diff options
Diffstat (limited to 'bits')
-rw-r--r-- | bits/endian.h | 13 | ||||
-rw-r--r-- | bits/endianness.h | 17 |
2 files changed, 17 insertions, 13 deletions
diff --git a/bits/endian.h b/bits/endian.h deleted file mode 100644 index 45afd4a..0000000 --- a/bits/endian.h +++ /dev/null @@ -1,13 +0,0 @@ -/* This file should define __BYTE_ORDER as appropriate for the machine - in question. See string/endian.h for how to define it. - - If only the stub bits/endian.h applies to a particular configuration, - bytesex.h is generated by running a program on the host machine. - So if cross-compiling to a machine with a different byte order, - the bits/endian.h file for that machine must exist. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#error Machine byte order unknown. diff --git a/bits/endianness.h b/bits/endianness.h new file mode 100644 index 0000000..b83040d --- /dev/null +++ b/bits/endianness.h @@ -0,0 +1,17 @@ +/* This file must be overridden for each supported CPU architecture. + It should define __BYTE_ORDER to one of the constants defined in + string/bits/endian.h, as appropriate for the machine in + question. If floating-point quantities are not stored in the + same byte order as integer quantities, it should also define + __FLOAT_WORD_ORDER as appropriate. */ + +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +#error "Machine byte order unknown." + +#endif /* bits/endianness.h */ |