include/SDL_platform.h
changeset 2765 f55c87ae336b
parent 2735 204be4fc2726
child 2859 99210400e8b9
     1.1 --- a/include/SDL_platform.h	Wed Sep 17 08:24:51 2008 +0000
     1.2 +++ b/include/SDL_platform.h	Sat Oct 04 06:46:59 2008 +0000
     1.3 @@ -57,13 +57,30 @@
     1.4  #undef __LINUX__
     1.5  #define __LINUX__	1
     1.6  #endif
     1.7 +
     1.8  #if defined(__APPLE__)
     1.9 +/* lets us know what version of Mac OS X we're compiling on */
    1.10 +#include "AvailabilityMacros.h"
    1.11 +#ifdef MAC_OS_X_VERSION_10_3
    1.12 +#include "targetconditionals.h" /* this header is in 10.3 or later */
    1.13 +#if TARGET_OS_IPHONE
    1.14 +/* if compiling for iPhone */
    1.15 +#undef __IPHONEOS__
    1.16 +#define __IPHONEOS__ 1
    1.17 +#undef __MACOSX__
    1.18 +#else
    1.19 +/* if not compiling for iPhone */
    1.20  #undef __MACOSX__
    1.21  #define __MACOSX__	1
    1.22 -#elif defined(macintosh)
    1.23 -#undef __MACOS__
    1.24 -#define __MACOS__	1
    1.25 +#endif /* TARGET_OS_IPHONE */
    1.26 +#else
    1.27 +/* if earlier verion of Mac OS X than version 10.3 */
    1.28 +#undef __MACOSX__
    1.29 +#define __MACOSX__	1
    1.30  #endif
    1.31 +
    1.32 +#endif /* defined(__APPLE__) */
    1.33 +
    1.34  #if defined(__NetBSD__)
    1.35  #undef __NETBSD__
    1.36  #define __NETBSD__	1