2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
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.
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.
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
24 * \file SDL_platform.h
26 * Try to get a standard set of platform defines.
29 #ifndef _SDL_platform_h
30 #define _SDL_platform_h
40 #if defined(__HAIKU__)
44 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
48 #if defined(_arch_dreamcast)
50 #define __DREAMCAST__ 1
52 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
56 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
60 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
64 #if defined(linux) || defined(__linux) || defined(__linux__)
70 #undef __LINUX__ /*do we need to do this?*/
74 #if defined(__APPLE__)
75 /* lets us know what version of Mac OS X we're compiling on */
76 #include "AvailabilityMacros.h"
77 #include "TargetConditionals.h"
78 #ifndef MAC_OS_X_VERSION_10_4
79 #define MAC_OS_X_VERSION_10_4 1040
81 #ifndef MAC_OS_X_VERSION_10_5
82 #define MAC_OS_X_VERSION_10_5 1050
84 #ifndef MAC_OS_X_VERSION_10_6
85 #define MAC_OS_X_VERSION_10_6 1060
88 /* if compiling for iPhone */
90 #define __IPHONEOS__ 1
93 /* if not compiling for iPhone */
96 #endif /* TARGET_OS_IPHONE */
97 #endif /* defined(__APPLE__) */
99 #if defined(__NetBSD__)
103 #if defined(__OpenBSD__)
105 #define __OPENBSD__ 1
111 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
115 #if defined(__QNXNTO__)
119 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
125 #define __SOLARIS__ 1
127 #if defined(WIN32) || defined(_WIN32)
133 #undef __NINTENDODS__
134 #define __NINTENDODS__ 1
138 #include "begin_code.h"
139 /* Set up for C function definitions, even when using C++ */
147 * \brief Gets the name of the platform.
149 extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
151 /* Ends C function definitions when using C++ */
157 #include "close_code.h"
159 #endif /* _SDL_platform_h */
161 /* vi: set ts=4 sw=4 expandtab: */