Fixed altivec.h include on Mac OS X
authorSam Lantinga <slouken@libsdl.org>
Tue, 22 Feb 2011 22:17:44 -0800
changeset 5390 fefd4f7b5214
parent 5389 24903690f48a
child 5391 06b239f48b91
Fixed altivec.h include on Mac OS X
include/SDL_cpuinfo.h
--- a/include/SDL_cpuinfo.h	Tue Feb 22 21:44:36 2011 -0800
+++ b/include/SDL_cpuinfo.h	Tue Feb 22 22:17:44 2011 -0800
@@ -42,6 +42,14 @@
 #elif defined(__MINGW64_VERSION_MAJOR)
 #include <intrin.h>
 #else
+#ifdef __ALTIVEC__
+#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
+#include <altivec.h>
+#undef vector
+#undef pixel
+#undef bool
+#endif
+#endif
 #ifdef __MMX__
 #include <mmintrin.h>
 #endif
@@ -54,9 +62,6 @@
 #ifdef __SSE2__
 #include <emmintrin.h>
 #endif
-#ifdef HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
 #endif
 
 #include "begin_code.h"