Bytes order and words order

Joseph S. Myers jsm28@cam.ac.uk
Fri Aug 23 12:27:00 GMT 2002


On 23 Aug 2002, Gabriel Dos Reis wrote:

>     -D__TARGET_BYTES_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
>     -D__TARGET_WORDS_ORDER__=__BIG_ENDIAN__ (or __LITTLE_ENDIAN__)
> 
> with, for example, __LITTLE_ENDIAN__ and __BIG_ENDIAN__ predefined to 0
> and 1 respectivelly.  The same set of macros would be needed for the
> host in case of cross-compiling.

I suspect those names may clash with some systems' headers; glibc's 
<endian.h> has

#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN    4321

and some other system may well have such definitions with trailing __.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list