diff options
author | Tom Fogal <[email protected]> | 2009-11-19 09:18:48 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-11-19 09:18:51 -0700 |
commit | 4e6e2462ea1fb5b7fc24bb0e707a9cf6507c47c9 (patch) | |
tree | c7494112fad7bd0407a4a9f3ed1e1b3bc2fc8f1d /src | |
parent | 5117725fd0eee7dbd5708bdbbd066bc89c2d35a9 (diff) |
mesa: define 32bit byteswap for AIX.
Fixes `xlib' driver build on AIX.
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/compiler.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 <CoreFoundation/CFByteOrder.h> #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 <sys/endian.h> #define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/ |