This has been attached to bug 25663 for a bit now, but didn't get reviewed here. It seems like a smarter way to go about setting up the CPU_TO_LE32 macro, because it should do a correct but potentially suboptimal thing on platforms we don't know about (instead of breaking the build).
-tom
From 2109e24f7a3f603116e5e074569d77c666fbbe2f Mon Sep 17 00:00:00 2001 From: Tom Fogal <tfo...@alumni.unh.edu> Date: Wed, 16 Dec 2009 16:56:59 -0700 Subject: [PATCH] mesa: Fallback on C byteswap. Only attempt using a platform-specific byteswap routine on platforms where we know it will work. --- src/mesa/main/compiler.h | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index a296404..7ca3c97 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -235,15 +235,12 @@ extern "C" { #elif defined(__APPLE__) #include <CoreFoundation/CFByteOrder.h> #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) -#elif (defined(_AIX) || defined(__blrts)) +#else #define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \ ((x & 0x0000ff00) << 8) | \ ((x & 0x00ff0000) >> 8) | \ ((x & 0xff000000) >> 24); -#else /*__linux__ */ -#include <sys/endian.h> -#define CPU_TO_LE32( x ) bswap32( x ) -#endif /*__linux__*/ +#endif #define MESA_BIG_ENDIAN 1 #else #define CPU_TO_LE32( x ) ( x ) -- 1.6.3.3
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev