On Sat, Nov 07, 2009 at 01:13:53PM +0100, Tobias Heer wrote: > Author: heer > Date: Sat Nov 7 13:13:53 2009 > New Revision: 1559 > > Log: > OS X Compatibility I I've committed several more chapters of this book during the last week or so. Note that if you wish to find out what else is not compiling, try the -k/--keep-going option of make. It will continue compiling as much as possible and not stop after errors. The option comes in handy when you wish to see everything that breaks. > This is a first attempt to improve PISA's portability. > > Specific changes: > * Added definitions for BYTE_ORDER and BIG_ENDIAN Hmmm... What version of OS X and compiler did you test? On Linux x86 with gcc 4.3.3 gcc -dM -E - < /dev/null | egrep 'BYTE_ORDER|BIG_ENDIAN yields nothing. On my PowerPC G4 under OS X 10.5 with Apple gcc 3.3, 4.0 and 4.2 both _BIG_ENDIAN and __BIG_ENDIAN__ are #defined to 1. Notice that this is different from ... > --- trunk/libpisa/global.h Fri Nov 6 18:06:48 2009 (r1558) > +++ trunk/libpisa/global.h Sat Nov 7 13:13:53 2009 (r1559) > @@ -114,6 +114,19 @@ > > +#ifdef __APPLE__ > + #ifndef __BYTE_ORDER > + #define __BYTE_ORDER BYTE_ORDER > + #endif > + #ifndef __BIG_ENDIAN > + #define __BIG_ENDIAN BIG_ENDIAN > + #endif > +#endif > + > + > #if __BYTE_ORDER == __BIG_ENDIAN > #define hton64(i) (i) > #define ntoh64(i) (i) .. BIG_ENDIAN and __BIG_ENDIAN which we use in our code. Furthermore, BYTE_ORDER and __BYTE_ORDER are defined by no compiler on no platform I tested. So in summary this looks like more copypaste nonsense inherited from HIPL. In addition to that this causes a compilation failure on OS X because BYTE_ORDER is not defined. Oh, did I mention that we do not use hton64 and ntoh64 anywhere? So this is an exercise in pointlessness with negative sideeffects. I'm removing it. Diego