include/SDL_platform.h
author Bob Pendleton <bob@pendleton.com>
Thu, 09 Jul 2009 21:31:27 +0000
changeset 3216 48a80f2a7ff2
parent 2871 cf09447f3d3c
child 3292 245a7d79577c
permissions -rw-r--r--
volitile... duh, yeah the variable need to be labeled volitile
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2009 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 
    23 /* Try to get a standard set of platform defines */
    24 
    25 #ifndef _SDL_platform_h
    26 #define _SDL_platform_h
    27 
    28 #if defined(_AIX)
    29 #undef __AIX__
    30 #define __AIX__		1
    31 #endif
    32 #if defined(__BEOS__)
    33 #undef __BEOS__
    34 #define __BEOS__	1
    35 #endif
    36 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
    37 #undef __BSDI__
    38 #define __BSDI__	1
    39 #endif
    40 #if defined(_arch_dreamcast)
    41 #undef __DREAMCAST__
    42 #define __DREAMCAST__	1
    43 #endif
    44 #if defined(__FreeBSD__) || defined(__DragonFly__)
    45 #undef __FREEBSD__
    46 #define __FREEBSD__	1
    47 #endif
    48 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
    49 #undef __HPUX__
    50 #define __HPUX__	1
    51 #endif
    52 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
    53 #undef __IRIX__
    54 #define __IRIX__	1
    55 #endif
    56 #if defined(linux) || defined(__linux) || defined(__linux__)
    57 #undef __LINUX__
    58 #define __LINUX__	1
    59 #endif
    60 
    61 #if defined(__APPLE__)
    62 /* lets us know what version of Mac OS X we're compiling on */
    63 #include "AvailabilityMacros.h"
    64 #ifdef MAC_OS_X_VERSION_10_3
    65 #include "TargetConditionals.h" /* this header is in 10.3 or later */
    66 #if TARGET_OS_IPHONE
    67 /* if compiling for iPhone */
    68 #undef __IPHONEOS__
    69 #define __IPHONEOS__ 1
    70 #undef __MACOSX__
    71 #else
    72 /* if not compiling for iPhone */
    73 #undef __MACOSX__
    74 #define __MACOSX__	1
    75 #endif /* TARGET_OS_IPHONE */
    76 #else
    77 /* if earlier verion of Mac OS X than version 10.3 */
    78 #undef __MACOSX__
    79 #define __MACOSX__	1
    80 #endif
    81 
    82 #endif /* defined(__APPLE__) */
    83 
    84 #if defined(__NetBSD__)
    85 #undef __NETBSD__
    86 #define __NETBSD__	1
    87 #endif
    88 #if defined(__OpenBSD__)
    89 #undef __OPENBSD__
    90 #define __OPENBSD__	1
    91 #endif
    92 #if defined(__OS2__)
    93 #undef __OS2__
    94 #define __OS2__		1
    95 #endif
    96 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
    97 #undef __OSF__
    98 #define __OSF__		1
    99 #endif
   100 #if defined(__QNXNTO__)
   101 #undef __QNXNTO__
   102 #define __QNXNTO__	1
   103 #endif
   104 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
   105 #undef __RISCOS__
   106 #define __RISCOS__	1
   107 #endif
   108 #if defined(__SVR4)
   109 #undef __SOLARIS__
   110 #define __SOLARIS__	1
   111 #endif
   112 #if defined(WIN32) || defined(_WIN32)
   113 #undef __WIN32__
   114 #define __WIN32__	1
   115 #endif
   116 
   117 #if defined(__NDS__)
   118 #undef __NINTENDODS__
   119 #define __NINTENDODS__	1
   120 #endif
   121 
   122 #endif /* _SDL_platform_h */