Erik Hofman writes:
>
> Andy Ross wrote:
> > Erik Hofman wrote:
> >
> >>There is a compiler directive:
> >>
> >>#if BYTE_ORDER == BIG_ENDIAN
> >>#else
> >>#endif
> >
> >
> > I've never heard of this one. Is it a standard thing, or a common
> > extension?
>
> It should be supported by all compilers.
> >
> > It works fine under my copy of gcc, but oddly it does *not* appear to
> > act like a preprocessor define. It doesn't show up in the output of
> > "echo | gcc -dD -E -", for example, even though many other
> > compiler-defined symbols are there.
> >
> > Very strange. Does this work on all our platforms? If so, we can
> > call this case closed. I'd really appreciate a link to appropriate
> > documentation, though, if you have it. :)
>
> I don't have documentation, I found it in another project. But maybe
> this can convince you:
AFAIK this is not ANSI therefore not *gauranteed* to be supported.
1) on Cygwin and MingW where this test wil fail you can
#if defined(__CYGWIN__) || defined(__MINGW32__)
#include <sys/param.h> // FOR ENDIAN DEFINES
#endif
IIRC this is also not defined on SGI Irix 5.3 and BSD 4.7 amongst others
at least users of these systems are having 'problems' compiling PostGIS
where BYTE_ORDER is assumed to be defined
google("BYTE_ORDER site:refractions.net")
Norman
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel