include/SDL_platform.h
changeset 8582 c3e9a2b93517
parent 8543 b9dd3cf38585
child 8583 fb2933ca805f
     1.1 --- a/include/SDL_platform.h	Tue Mar 04 19:49:11 2014 -0500
     1.2 +++ b/include/SDL_platform.h	Sun Mar 09 11:06:11 2014 -0700
     1.3 @@ -1,168 +1,168 @@
     1.4 -/*
     1.5 -  Simple DirectMedia Layer
     1.6 -  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
     1.7 -
     1.8 -  This software is provided 'as-is', without any express or implied
     1.9 -  warranty.  In no event will the authors be held liable for any damages
    1.10 -  arising from the use of this software.
    1.11 -
    1.12 -  Permission is granted to anyone to use this software for any purpose,
    1.13 -  including commercial applications, and to alter it and redistribute it
    1.14 -  freely, subject to the following restrictions:
    1.15 -
    1.16 -  1. The origin of this software must not be misrepresented; you must not
    1.17 -     claim that you wrote the original software. If you use this software
    1.18 -     in a product, an acknowledgment in the product documentation would be
    1.19 -     appreciated but is not required.
    1.20 -  2. Altered source versions must be plainly marked as such, and must not be
    1.21 -     misrepresented as being the original software.
    1.22 -  3. This notice may not be removed or altered from any source distribution.
    1.23 -*/
    1.24 -
    1.25 -/**
    1.26 - *  \file SDL_platform.h
    1.27 - *
    1.28 - *  Try to get a standard set of platform defines.
    1.29 - */
    1.30 -
    1.31 -#ifndef _SDL_platform_h
    1.32 -#define _SDL_platform_h
    1.33 -
    1.34 -#if defined(_AIX)
    1.35 -#undef __AIX__
    1.36 -#define __AIX__     1
    1.37 -#endif
    1.38 -#if defined(__HAIKU__)
    1.39 -#undef __HAIKU__
    1.40 -#define __HAIKU__   1
    1.41 -#endif
    1.42 -#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
    1.43 -#undef __BSDI__
    1.44 -#define __BSDI__    1
    1.45 -#endif
    1.46 -#if defined(_arch_dreamcast)
    1.47 -#undef __DREAMCAST__
    1.48 -#define __DREAMCAST__   1
    1.49 -#endif
    1.50 -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
    1.51 -#undef __FREEBSD__
    1.52 -#define __FREEBSD__ 1
    1.53 -#endif
    1.54 -#if defined(hpux) || defined(__hpux) || defined(__hpux__)
    1.55 -#undef __HPUX__
    1.56 -#define __HPUX__    1
    1.57 -#endif
    1.58 -#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
    1.59 -#undef __IRIX__
    1.60 -#define __IRIX__    1
    1.61 -#endif
    1.62 -#if defined(linux) || defined(__linux) || defined(__linux__)
    1.63 -#undef __LINUX__
    1.64 -#define __LINUX__   1
    1.65 -#endif
    1.66 -#if defined(ANDROID)
    1.67 -#undef __ANDROID__
    1.68 -#undef __LINUX__ /* do we need to do this? */
    1.69 -#define __ANDROID__ 1
    1.70 -#endif
    1.71 -
    1.72 -#if defined(__APPLE__)
    1.73 -/* lets us know what version of Mac OS X we're compiling on */
    1.74 -#include "AvailabilityMacros.h"
    1.75 -#include "TargetConditionals.h"
    1.76 -#if TARGET_OS_IPHONE
    1.77 -/* if compiling for iPhone */
    1.78 -#undef __IPHONEOS__
    1.79 -#define __IPHONEOS__ 1
    1.80 -#undef __MACOSX__
    1.81 -#else
    1.82 -/* if not compiling for iPhone */
    1.83 -#undef __MACOSX__
    1.84 -#define __MACOSX__  1
    1.85 -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
    1.86 -# error SDL for Mac OS X only supports deploying on 10.5 and above.
    1.87 -#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
    1.88 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
    1.89 -# error SDL for Mac OS X must be built with a 10.6 SDK or above.
    1.90 -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
    1.91 -#endif /* TARGET_OS_IPHONE */
    1.92 -#endif /* defined(__APPLE__) */
    1.93 -
    1.94 -#if defined(__NetBSD__)
    1.95 -#undef __NETBSD__
    1.96 -#define __NETBSD__  1
    1.97 -#endif
    1.98 -#if defined(__OpenBSD__)
    1.99 -#undef __OPENBSD__
   1.100 -#define __OPENBSD__ 1
   1.101 -#endif
   1.102 -#if defined(__OS2__)
   1.103 -#undef __OS2__
   1.104 -#define __OS2__     1
   1.105 -#endif
   1.106 -#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
   1.107 -#undef __OSF__
   1.108 -#define __OSF__     1
   1.109 -#endif
   1.110 -#if defined(__QNXNTO__)
   1.111 -#undef __QNXNTO__
   1.112 -#define __QNXNTO__  1
   1.113 -#endif
   1.114 -#if defined(riscos) || defined(__riscos) || defined(__riscos__)
   1.115 -#undef __RISCOS__
   1.116 -#define __RISCOS__  1
   1.117 -#endif
   1.118 -#if defined(__SVR4)
   1.119 -#undef __SOLARIS__
   1.120 -#define __SOLARIS__ 1
   1.121 -#endif
   1.122 -
   1.123 -#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
   1.124 -/* Try to find out if we're compiling for WinRT or non-WinRT */
   1.125 -#if defined(_MSC_VER) && (_MSC_VER >= 1700)	/* _MSC_VER==1700 for MSVC 2012 */
   1.126 -#include <winapifamily.h>
   1.127 -#endif /* _MSC_VER >= 1700 */
   1.128 -/* Default to classic, Win32/Win64/Desktop compilation either if:
   1.129 -     1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
   1.130 -     2. the version of Windows cannot be determined via winapifamily.h
   1.131 -   If neither is true, then see if we're compiling for WinRT.
   1.132 - */
   1.133 -#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
   1.134 -#undef __WINDOWS__
   1.135 -#define __WINDOWS__   1
   1.136 -/* See if we're compiling for WinRT: */
   1.137 -#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
   1.138 -#undef __WINRT__
   1.139 -#define __WINRT__ 1
   1.140 -#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
   1.141 -#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
   1.142 -
   1.143 -#if defined(__WINDOWS__)
   1.144 -#undef __WIN32__
   1.145 -#define __WIN32__ 1
   1.146 -#endif
   1.147 -#if defined(__PSP__)
   1.148 -#undef __PSP__
   1.149 -#define __PSP__ 1
   1.150 -#endif
   1.151 -
   1.152 -#include "begin_code.h"
   1.153 -/* Set up for C function definitions, even when using C++ */
   1.154 -#ifdef __cplusplus
   1.155 -extern "C" {
   1.156 -#endif
   1.157 -
   1.158 -/**
   1.159 - *  \brief Gets the name of the platform.
   1.160 - */
   1.161 -extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
   1.162 -
   1.163 -/* Ends C function definitions when using C++ */
   1.164 -#ifdef __cplusplus
   1.165 -}
   1.166 -#endif
   1.167 -#include "close_code.h"
   1.168 -
   1.169 -#endif /* _SDL_platform_h */
   1.170 -
   1.171 -/* vi: set ts=4 sw=4 expandtab: */
   1.172 +/*
   1.173 +  Simple DirectMedia Layer
   1.174 +  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
   1.175 +
   1.176 +  This software is provided 'as-is', without any express or implied
   1.177 +  warranty.  In no event will the authors be held liable for any damages
   1.178 +  arising from the use of this software.
   1.179 +
   1.180 +  Permission is granted to anyone to use this software for any purpose,
   1.181 +  including commercial applications, and to alter it and redistribute it
   1.182 +  freely, subject to the following restrictions:
   1.183 +
   1.184 +  1. The origin of this software must not be misrepresented; you must not
   1.185 +     claim that you wrote the original software. If you use this software
   1.186 +     in a product, an acknowledgment in the product documentation would be
   1.187 +     appreciated but is not required.
   1.188 +  2. Altered source versions must be plainly marked as such, and must not be
   1.189 +     misrepresented as being the original software.
   1.190 +  3. This notice may not be removed or altered from any source distribution.
   1.191 +*/
   1.192 +
   1.193 +/**
   1.194 + *  \file SDL_platform.h
   1.195 + *
   1.196 + *  Try to get a standard set of platform defines.
   1.197 + */
   1.198 +
   1.199 +#ifndef _SDL_platform_h
   1.200 +#define _SDL_platform_h
   1.201 +
   1.202 +#if defined(_AIX)
   1.203 +#undef __AIX__
   1.204 +#define __AIX__     1
   1.205 +#endif
   1.206 +#if defined(__HAIKU__)
   1.207 +#undef __HAIKU__
   1.208 +#define __HAIKU__   1
   1.209 +#endif
   1.210 +#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
   1.211 +#undef __BSDI__
   1.212 +#define __BSDI__    1
   1.213 +#endif
   1.214 +#if defined(_arch_dreamcast)
   1.215 +#undef __DREAMCAST__
   1.216 +#define __DREAMCAST__   1
   1.217 +#endif
   1.218 +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
   1.219 +#undef __FREEBSD__
   1.220 +#define __FREEBSD__ 1
   1.221 +#endif
   1.222 +#if defined(hpux) || defined(__hpux) || defined(__hpux__)
   1.223 +#undef __HPUX__
   1.224 +#define __HPUX__    1
   1.225 +#endif
   1.226 +#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
   1.227 +#undef __IRIX__
   1.228 +#define __IRIX__    1
   1.229 +#endif
   1.230 +#if defined(linux) || defined(__linux) || defined(__linux__)
   1.231 +#undef __LINUX__
   1.232 +#define __LINUX__   1
   1.233 +#endif
   1.234 +#if defined(ANDROID)
   1.235 +#undef __ANDROID__
   1.236 +#undef __LINUX__ /* do we need to do this? */
   1.237 +#define __ANDROID__ 1
   1.238 +#endif
   1.239 +
   1.240 +#if defined(__APPLE__)
   1.241 +/* lets us know what version of Mac OS X we're compiling on */
   1.242 +#include "AvailabilityMacros.h"
   1.243 +#include "TargetConditionals.h"
   1.244 +#if TARGET_OS_IPHONE
   1.245 +/* if compiling for iPhone */
   1.246 +#undef __IPHONEOS__
   1.247 +#define __IPHONEOS__ 1
   1.248 +#undef __MACOSX__
   1.249 +#else
   1.250 +/* if not compiling for iPhone */
   1.251 +#undef __MACOSX__
   1.252 +#define __MACOSX__  1
   1.253 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
   1.254 +# error SDL for Mac OS X only supports deploying on 10.5 and above.
   1.255 +#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
   1.256 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
   1.257 +# error SDL for Mac OS X must be built with a 10.6 SDK or above.
   1.258 +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
   1.259 +#endif /* TARGET_OS_IPHONE */
   1.260 +#endif /* defined(__APPLE__) */
   1.261 +
   1.262 +#if defined(__NetBSD__)
   1.263 +#undef __NETBSD__
   1.264 +#define __NETBSD__  1
   1.265 +#endif
   1.266 +#if defined(__OpenBSD__)
   1.267 +#undef __OPENBSD__
   1.268 +#define __OPENBSD__ 1
   1.269 +#endif
   1.270 +#if defined(__OS2__)
   1.271 +#undef __OS2__
   1.272 +#define __OS2__     1
   1.273 +#endif
   1.274 +#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
   1.275 +#undef __OSF__
   1.276 +#define __OSF__     1
   1.277 +#endif
   1.278 +#if defined(__QNXNTO__)
   1.279 +#undef __QNXNTO__
   1.280 +#define __QNXNTO__  1
   1.281 +#endif
   1.282 +#if defined(riscos) || defined(__riscos) || defined(__riscos__)
   1.283 +#undef __RISCOS__
   1.284 +#define __RISCOS__  1
   1.285 +#endif
   1.286 +#if defined(__SVR4)
   1.287 +#undef __SOLARIS__
   1.288 +#define __SOLARIS__ 1
   1.289 +#endif
   1.290 +
   1.291 +#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
   1.292 +/* Try to find out if we're compiling for WinRT or non-WinRT */
   1.293 +#if defined(_MSC_VER) && (_MSC_VER >= 1700)	/* _MSC_VER==1700 for MSVC 2012 */
   1.294 +#include <winapifamily.h>
   1.295 +#endif /* _MSC_VER >= 1700 */
   1.296 +/* Default to classic, Win32/Win64/Desktop compilation either if:
   1.297 +     1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
   1.298 +     2. the version of Windows cannot be determined via winapifamily.h
   1.299 +   If neither is true, then see if we're compiling for WinRT.
   1.300 + */
   1.301 +#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
   1.302 +#undef __WINDOWS__
   1.303 +#define __WINDOWS__   1
   1.304 +/* See if we're compiling for WinRT: */
   1.305 +#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
   1.306 +#undef __WINRT__
   1.307 +#define __WINRT__ 1
   1.308 +#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
   1.309 +#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
   1.310 +
   1.311 +#if defined(__WINDOWS__)
   1.312 +#undef __WIN32__
   1.313 +#define __WIN32__ 1
   1.314 +#endif
   1.315 +#if defined(__PSP__)
   1.316 +#undef __PSP__
   1.317 +#define __PSP__ 1
   1.318 +#endif
   1.319 +
   1.320 +#include "begin_code.h"
   1.321 +/* Set up for C function definitions, even when using C++ */
   1.322 +#ifdef __cplusplus
   1.323 +extern "C" {
   1.324 +#endif
   1.325 +
   1.326 +/**
   1.327 + *  \brief Gets the name of the platform.
   1.328 + */
   1.329 +extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
   1.330 +
   1.331 +/* Ends C function definitions when using C++ */
   1.332 +#ifdef __cplusplus
   1.333 +}
   1.334 +#endif
   1.335 +#include "close_code.h"
   1.336 +
   1.337 +#endif /* _SDL_platform_h */
   1.338 +
   1.339 +/* vi: set ts=4 sw=4 expandtab: */