include/SDL_platform.h
branchgsoc2008_iphone
changeset 2438 fe9d15725d96
parent 2370 73d04b25c118
     1.1 --- a/include/SDL_platform.h	Fri Aug 15 18:31:30 2008 +0000
     1.2 +++ b/include/SDL_platform.h	Fri Aug 15 18:51:28 2008 +0000
     1.3 @@ -59,15 +59,26 @@
     1.4  #endif
     1.5  
     1.6  #if defined(__APPLE__)
     1.7 -#include "targetconditionals.h" /* Mac OS X 10.3 and later */
     1.8 +/* lets us know what version of Mac OS X we're compiling on */
     1.9 +#include "AvailabilityMacros.h" 
    1.10 +#ifdef MAC_OS_X_VERSION_10_3
    1.11 +#include "targetconditionals.h" /* this header is in 10.3 or later */
    1.12  #if TARGET_OS_IPHONE
    1.13 +/* if compiling for iPhone */
    1.14  #undef __IPHONEOS__
    1.15  #define __IPHONEOS__ 1
    1.16  #undef __MACOSX__
    1.17  #else
    1.18 +/* if not compiling for iPhone */
    1.19  #undef __MACOSX__
    1.20  #define __MACOSX__	1
    1.21  #endif /* TARGET_OS_IPHONE */
    1.22 +#else
    1.23 +/* if earlier verion of Mac OS X than version 10.3 */
    1.24 +#undef __MACOSX__
    1.25 +#define __MACOSX__	1
    1.26 +#endif
    1.27 +
    1.28  #endif /* defined(__APPLE__) */
    1.29  
    1.30  #if defined(__NetBSD__)