From: Julien B. <jb...@jb...> - 2005-05-15 14:20:29
|
Christian Walther <cwa...@gm...> wrote: > The following code in libtifiles/src/misc.c, introduced by Julien in > revision 1055 (2005-05-13), doesn't work on Mac OS X (and possibly > other BSDs): > > #ifndef __WIN32__ > # include <endian.h> > # if __BYTE_ORDER == __BIG_ENDIAN > # define WORDS_BIGENDIAN 1 > # endif /* __BYTE_ORDER == __BIG_ENDIAN */ > #endif /* !__WIN32__ */ > > There is no <endian.h> on Mac OS X. There is a <machine/endian.h> that > defines BYTE_ORDER and BIG_ENDIAN, but as far as I see not > __BYTE_ORDER and __BIG_ENDIAN. This is a fucking mess nobody could ever agree on ... anyway. > We should decide whether setting WORDS_BIGENDIAN should be done by > configure or in the C code. At the moment, it is done in both places - > in configure, as added by Romain as part of one of my Mac OS X It isn't, as your patch never made it to the repository. At least configure.ac was not modified recently. > patches; in the C code as shown above. The problem is that the traditional configure check is broken, and will fail on some platforms. IIRC this check used to be in the configure script, and I was defining WORDS_BIGENDIAN on Mac OS X from the command line (because I didn't use the configure script in Project Builder). Re-adding the configure check is probably the easiest way to solve the problem. Then my change can be reverted. (the check is known to work on the platforms we care for) JB. -- Julien BLACHE <http://www.jblache.org> <jb...@jb...> GPG KeyID 0xF5D65169 |