summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorTom Fogal <tfogal@alumni.unh.edu>2009-11-19 09:18:48 -0700
committerBrian Paul <brianp@vmware.com>2009-11-19 09:18:51 -0700
commit4e6e2462ea1fb5b7fc24bb0e707a9cf6507c47c9 (patch)
treec7494112fad7bd0407a4a9f3ed1e1b3bc2fc8f1d /src/mesa
parent5117725fd0eee7dbd5708bdbbd066bc89c2d35a9 (diff)
mesa: define 32bit byteswap for AIX.
Fixes `xlib' driver build on AIX. Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/compiler.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 9319505a75..522295a9bf 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__*/