This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bytes order and words order


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]