Path: blob/main/system/include/SDL/SDL_platform.h
6169 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2011 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021/**22* \file SDL_platform.h23*24* Try to get a standard set of platform defines.25*/2627#ifndef _SDL_platform_h28#define _SDL_platform_h2930#if defined(_AIX)31#undef __AIX__32#define __AIX__ 133#endif34#if defined(__BEOS__)35#undef __BEOS__36#define __BEOS__ 137#endif38#if defined(__HAIKU__)39#undef __HAIKU__40#define __HAIKU__ 141#endif42#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)43#undef __BSDI__44#define __BSDI__ 145#endif46#if defined(_arch_dreamcast)47#undef __DREAMCAST__48#define __DREAMCAST__ 149#endif50#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)51#undef __FREEBSD__52#define __FREEBSD__ 153#endif54#if defined(hpux) || defined(__hpux) || defined(__hpux__)55#undef __HPUX__56#define __HPUX__ 157#endif58#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)59#undef __IRIX__60#define __IRIX__ 161#endif62#if defined(linux) || defined(__linux) || defined(__linux__)63#undef __LINUX__64#define __LINUX__ 165#endif66#if defined(ANDROID)67#undef __ANDROID__68#undef __LINUX__ /*do we need to do this?*/69#define __ANDROID__ 170#endif7172#if defined(__APPLE__)73/* lets us know what version of Mac OS X we're compiling on */74#include "AvailabilityMacros.h"75#include "TargetConditionals.h"76#ifndef MAC_OS_X_VERSION_10_477#define MAC_OS_X_VERSION_10_4 104078#endif79#ifndef MAC_OS_X_VERSION_10_580#define MAC_OS_X_VERSION_10_5 105081#endif82#ifndef MAC_OS_X_VERSION_10_683#define MAC_OS_X_VERSION_10_6 106084#endif85#if TARGET_OS_IPHONE86/* if compiling for iPhone */87#undef __IPHONEOS__88#define __IPHONEOS__ 189#undef __MACOSX__90#else91/* if not compiling for iPhone */92#undef __MACOSX__93#define __MACOSX__ 194#endif /* TARGET_OS_IPHONE */95#endif /* defined(__APPLE__) */9697#if defined(__NetBSD__)98#undef __NETBSD__99#define __NETBSD__ 1100#endif101#if defined(__OpenBSD__)102#undef __OPENBSD__103#define __OPENBSD__ 1104#endif105#if defined(__OS2__)106#undef __OS2__107#define __OS2__ 1108#endif109#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)110#undef __OSF__111#define __OSF__ 1112#endif113#if defined(__QNXNTO__)114#undef __QNXNTO__115#define __QNXNTO__ 1116#endif117#if defined(riscos) || defined(__riscos) || defined(__riscos__)118#undef __RISCOS__119#define __RISCOS__ 1120#endif121#if defined(__SVR4)122#undef __SOLARIS__123#define __SOLARIS__ 1124#endif125#if defined(WIN32) || defined(_WIN32)126#undef __WIN32__127#define __WIN32__ 1128#endif129130#if defined(__NDS__)131#undef __NINTENDODS__132#define __NINTENDODS__ 1133#endif134135136#include "begin_code.h"137/* Set up for C function definitions, even when using C++ */138#ifdef __cplusplus139/* *INDENT-OFF* */140extern "C" {141/* *INDENT-ON* */142#endif143144/**145* \brief Gets the name of the platform.146*/147extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);148149/* Ends C function definitions when using C++ */150#ifdef __cplusplus151/* *INDENT-OFF* */152}153/* *INDENT-ON* */154#endif155#include "close_code.h"156157#endif /* _SDL_platform_h */158159/* vi: set ts=4 sw=4 expandtab: */160161162