This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bytes order and words order
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 23 Aug 2002 20:27:43 +0100 (BST)
- Subject: 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