projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f25c6b1
)
Updated CPU_TO_LE32 to work on darwin
author
Jeremy Huddleston
<jeremy@yuffie.local>
Tue, 31 Mar 2009 22:08:49 +0000
(15:08 -0700)
committer
Jeremy Huddleston
<jeremy@yuffie.local>
Tue, 31 Mar 2009 22:08:49 +0000
(15:08 -0700)
src/mesa/main/compiler.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/compiler.h
b/src/mesa/main/compiler.h
index 39b19bb776766f831f119de21ffe5469fdc02e72..93103fe878dc68074db2751e9ee579eb5de9eeab 100644
(file)
--- 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__*/