From 3a1f98f41fd7a41951adce1ff735d475224ca650 Mon Sep 17 00:00:00 2001 From: Holmes Futrell Date: Fri, 15 Aug 2008 18:51:28 +0000 Subject: [PATCH] Added macro so that targetconditionals.h isn't included when compiling from versions of Mac OS X earlier than 10.3 (the header file doesn't exist there). Instead, it is just assumed that you want to compile for Mac OS X rather than iPhone ... a fine assumption since you need 10.5 to compile for iPhone. --- include/SDL_platform.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/SDL_platform.h b/include/SDL_platform.h index 7891fb0ab..a3eac7e30 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -59,15 +59,26 @@ #endif #if defined(__APPLE__) -#include "targetconditionals.h" /* Mac OS X 10.3 and later */ +/* 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 #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__)