From: Tom Fogal Date: Thu, 19 Nov 2009 16:18:48 +0000 (-0700) Subject: mesa: define 32bit byteswap for AIX. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e6e2462ea1fb5b7fc24bb0e707a9cf6507c47c9;p=mesa.git mesa: define 32bit byteswap for AIX. Fixes `xlib' driver build on AIX. Signed-off-by: Brian Paul --- diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 9319505a75d..522295a9bfe 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -235,7 +235,12 @@ extern "C" { #elif defined(__APPLE__) #include #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) -#else /*__linux__ __APPLE__*/ +#elif defined(_AIX) +#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \ + ((x & 0x0000ff00) << 8) | \ + ((x & 0x00ff0000) >> 8) | \ + ((x & 0xff000000) >> 24); +#else /*__linux__ */ #include #define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/