diff include/SDL_platform.h @ 2765:f55c87ae336b

Final merge of Google Summer of Code 2008 work... Bring SDL to iPhone and iPod Touch by Holmes Futrell, mentored by Sam Lantinga
author Sam Lantinga <slouken@libsdl.org>
date Sat, 04 Oct 2008 06:46:59 +0000
parents 204be4fc2726
children 99210400e8b9
line wrap: on
line diff
--- a/include/SDL_platform.h	Wed Sep 17 08:24:51 2008 +0000
+++ b/include/SDL_platform.h	Sat Oct 04 06:46:59 2008 +0000
@@ -57,13 +57,30 @@
 #undef __LINUX__
 #define __LINUX__	1
 #endif
+
 #if defined(__APPLE__)
+/* lets us know what version of Mac OS X we're compiling on */
+#include "AvailabilityMacros.h"
+#ifdef MAC_OS_X_VERSION_10_3
+#include "targetconditionals.h" /* this header is in 10.3 or later */
+#if TARGET_OS_IPHONE
+/* if compiling for iPhone */
+#undef __IPHONEOS__
+#define __IPHONEOS__ 1
+#undef __MACOSX__
+#else
+/* if not compiling for iPhone */
 #undef __MACOSX__
 #define __MACOSX__	1
-#elif defined(macintosh)
-#undef __MACOS__
-#define __MACOS__	1
+#endif /* TARGET_OS_IPHONE */
+#else
+/* if earlier verion of Mac OS X than version 10.3 */
+#undef __MACOSX__
+#define __MACOSX__	1
 #endif
+
+#endif /* defined(__APPLE__) */
+
 #if defined(__NetBSD__)
 #undef __NETBSD__
 #define __NETBSD__	1