changeset 2370:73d04b25c118 gsoc2008_iphone

Added macros to detect if you are compiling for iPhone OS vs Mac OS X.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Fri, 18 Jul 2008 18:41:08 +0000
parents 76e4bb13c937
children 3eb72191bb7e
files include/SDL_platform.h
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_platform.h	Fri Jul 18 18:24:50 2008 +0000
+++ b/include/SDL_platform.h	Fri Jul 18 18:41:08 2008 +0000
@@ -57,13 +57,19 @@
 #undef __LINUX__
 #define __LINUX__	1
 #endif
+
 #if defined(__APPLE__)
+#include "targetconditionals.h" /* Mac OS X 10.3 and later */
+#if TARGET_OS_IPHONE
+#undef __IPHONEOS__
+#define __IPHONEOS__ 1
+#undef __MACOSX__
+#else
 #undef __MACOSX__
 #define __MACOSX__	1
-#elif defined(macintosh)
-#undef __MACOS__
-#define __MACOS__	1
-#endif
+#endif /* TARGET_OS_IPHONE */
+#endif /* defined(__APPLE__) */
+
 #if defined(__NetBSD__)
 #undef __NETBSD__
 #define __NETBSD__	1