Mesa (gallium-mesa-7.4): Updated CPU_TO_LE32 to work on darwin

Alan Hourihane alanh at kemper.freedesktop.org
Wed Apr 1 08:23:28 UTC 2009


Module: Mesa
Branch: gallium-mesa-7.4
Commit: 9e9fe51acd296f5d30fe784521464a96d90031d9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e9fe51acd296f5d30fe784521464a96d90031d9

Author: Jeremy Huddleston <jeremy at yuffie.local>
Date:   Tue Mar 31 14:59:28 2009 -0700

Updated CPU_TO_LE32 to work on darwin

---

 src/mesa/main/glheader.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 626806d..d17be37 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -145,7 +145,10 @@
 #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__*/




More information about the mesa-commit mailing list