On Mon, 2004-06-07 at 00:52 +0100, Dave Airlie wrote: > > > > I'm afraid that's glibc specific. > > If I use <sys/endian.h> on FreeBSD can I do the same thing? > > it'll look messy but to avoid the X includes we should do it .. > > #ifdef __linux__ > #include <endian.h> > #else > #include <sys/endian.h> > #define __BYTE_ORDER BYTE_ORDER > #define __LITTLE_ENDIAN LITTLE_ENDIAN > #define __BIG_ENDIAN BIG_ENDIAN > #endif > > #if __BYTE_ORDER == __LITTLE_ENDIAN > > hows about that?
That looks like it should work; or, looking at /usr/include/endian.h, something like #ifdef __linux__ #define __USE_BSD #include <endian.h> #else #include <sys/endian.h> #endif #if BYTE_ORDER == LITTLE_ENDIAN might as well. -- Earthling Michel DÃnzer | Debian (powerpc), X and DRI developer Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel