From: Akim Demaille <[EMAIL PROTECTED]>
Date: 07 Jul 2000 20:00:31 +0200
Does anybody sees a means to compute this at compile time? Using the
same trick as we did for SIZEOF etc.
Doug Evans suggested a trick a while back. You compile
long i = 0x30313233;
and then
grep 0123 foo.o
grep 3210 foo.o
If only the first grep matches, you have a big endian system. If only
the second grep matches, you have a little endian system. If both or
neither match, you don't know.
Ian
- AC_C_BIGENDIAN Akim Demaille
- Re: AC_C_BIGENDIAN Ian Lance Taylor
- Re: AC_C_BIGENDIAN Assar Westerlund
- Re: AC_C_BIGENDIAN Ian Lance Taylor
- Re: AC_C_BIGENDIAN Assar Westerlund
- Re: AC_C_BIGENDIAN Ian Lance Taylor
- Re: AC_C_BIGENDIAN Assar Westerlund
- Re: AC_C_BIGENDIAN Mike Castle
- Re: AC_C_BIGENDIAN Ian Lance Taylor
- Re: AC_C_BIGENDIAN Peter Eisentraut
- Re: AC_C_BIGENDIAN Lars J. Aas
- Re: AC_C_BIGENDIAN Guido Draheim
