Added macros to detect if you are compiling for iPhone OS vs Mac OS X. gsoc2008_iphone
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 18 Jul 2008 18:41:08 +0000
branchgsoc2008_iphone
changeset 237073d04b25c118
parent 2369 76e4bb13c937
child 2371 3eb72191bb7e
Added macros to detect if you are compiling for iPhone OS vs Mac OS X.
include/SDL_platform.h
     1.1 --- a/include/SDL_platform.h	Fri Jul 18 18:24:50 2008 +0000
     1.2 +++ b/include/SDL_platform.h	Fri Jul 18 18:41:08 2008 +0000
     1.3 @@ -57,13 +57,19 @@
     1.4  #undef __LINUX__
     1.5  #define __LINUX__	1
     1.6  #endif
     1.7 +
     1.8  #if defined(__APPLE__)
     1.9 +#include "targetconditionals.h" /* Mac OS X 10.3 and later */
    1.10 +#if TARGET_OS_IPHONE
    1.11 +#undef __IPHONEOS__
    1.12 +#define __IPHONEOS__ 1
    1.13 +#undef __MACOSX__
    1.14 +#else
    1.15  #undef __MACOSX__
    1.16  #define __MACOSX__	1
    1.17 -#elif defined(macintosh)
    1.18 -#undef __MACOS__
    1.19 -#define __MACOS__	1
    1.20 -#endif
    1.21 +#endif /* TARGET_OS_IPHONE */
    1.22 +#endif /* defined(__APPLE__) */
    1.23 +
    1.24  #if defined(__NetBSD__)
    1.25  #undef __NETBSD__
    1.26  #define __NETBSD__	1