diff options
author | Jeremy Huddleston <jeremy@yuffie.local> | 2009-03-31 15:08:49 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremy@yuffie.local> | 2009-03-31 15:08:49 -0700 |
commit | 093ad509fcee5cb3a890663fc80ed671dcaf4000 (patch) | |
tree | 81f0f4e0188d8fe6ae95c203ca451ce6c98d2a51 /src/mesa | |
parent | f25c6b164f324e2138784337870e8219008af754 (diff) |
Updated CPU_TO_LE32 to work on darwin
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/compiler.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 39b19bb776..93103fe878 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -230,7 +230,10 @@ extern "C" { #if defined(__linux__) #include <byteswap.h> #define CPU_TO_LE32( x ) bswap_32( x ) -#else /*__linux__*/ +#elif defined(__APPLE__) +#include <CoreFoundation/CFByteOrder.h> +#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) +#else /*__linux__ __APPLE__*/ #include <sys/endian.h> #define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/ |