include/SDL_platform.h
author Ryan C. Gordon <icculus@icculus.org>
Thu, 14 Nov 2013 11:51:24 -0500
changeset 7981 6d538bc1b395
parent 7856 cb37776926ad
child 8083 3782a12331d6
child 8543 b9dd3cf38585
permissions -rw-r--r--
Renamed things named after BeOS to be named after Haiku instead.
slouken@1402
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@1402
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@1402
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@1402
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@1402
    20
*/
slouken@1402
    21
slouken@3407
    22
/**
slouken@3407
    23
 *  \file SDL_platform.h
slouken@7191
    24
 *
slouken@3407
    25
 *  Try to get a standard set of platform defines.
slouken@3407
    26
 */
slouken@1402
    27
slouken@1406
    28
#ifndef _SDL_platform_h
slouken@1406
    29
#define _SDL_platform_h
slouken@1406
    30
slouken@1402
    31
#if defined(_AIX)
slouken@1402
    32
#undef __AIX__
slouken@7191
    33
#define __AIX__     1
slouken@1402
    34
#endif
slouken@3292
    35
#if defined(__HAIKU__)
slouken@3292
    36
#undef __HAIKU__
slouken@7191
    37
#define __HAIKU__   1
slouken@3292
    38
#endif
slouken@1402
    39
#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
slouken@1402
    40
#undef __BSDI__
slouken@7191
    41
#define __BSDI__    1
slouken@1402
    42
#endif
slouken@1461
    43
#if defined(_arch_dreamcast)
slouken@1402
    44
#undef __DREAMCAST__
slouken@7191
    45
#define __DREAMCAST__   1
slouken@1402
    46
#endif
slouken@3366
    47
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
slouken@1402
    48
#undef __FREEBSD__
slouken@7191
    49
#define __FREEBSD__ 1
slouken@1402
    50
#endif
slouken@1402
    51
#if defined(hpux) || defined(__hpux) || defined(__hpux__)
slouken@1402
    52
#undef __HPUX__
slouken@7191
    53
#define __HPUX__    1
slouken@1402
    54
#endif
slouken@1402
    55
#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
slouken@1402
    56
#undef __IRIX__
slouken@7191
    57
#define __IRIX__    1
slouken@1402
    58
#endif
slouken@1402
    59
#if defined(linux) || defined(__linux) || defined(__linux__)
slouken@1402
    60
#undef __LINUX__
slouken@7191
    61
#define __LINUX__   1
slouken@1402
    62
#endif
paul@4695
    63
#if defined(ANDROID)
paul@4695
    64
#undef __ANDROID__
gabomdq@7678
    65
#undef __LINUX__ /* do we need to do this? */
paul@4695
    66
#define __ANDROID__ 1
paul@4695
    67
#endif
paul@4695
    68
slouken@1631
    69
#if defined(__APPLE__)
slouken@2765
    70
/* lets us know what version of Mac OS X we're compiling on */
slouken@2765
    71
#include "AvailabilityMacros.h"
slouken@4925
    72
#include "TargetConditionals.h"
slouken@2765
    73
#if TARGET_OS_IPHONE
slouken@2765
    74
/* if compiling for iPhone */
slouken@2765
    75
#undef __IPHONEOS__
slouken@2765
    76
#define __IPHONEOS__ 1
slouken@2765
    77
#undef __MACOSX__
slouken@2765
    78
#else
slouken@2765
    79
/* if not compiling for iPhone */
slouken@1402
    80
#undef __MACOSX__
slouken@7191
    81
#define __MACOSX__  1
jorgen@7507
    82
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
jorgen@7507
    83
# error SDL for Mac OS X only supports deploying on 10.5 and above.
jorgen@7507
    84
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
jorgen@7507
    85
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
jorgen@7507
    86
# error SDL for Mac OS X must be built with a 10.6 SDK or above.
jorgen@7507
    87
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
slouken@2765
    88
#endif /* TARGET_OS_IPHONE */
slouken@2765
    89
#endif /* defined(__APPLE__) */
slouken@2765
    90
slouken@1402
    91
#if defined(__NetBSD__)
slouken@1402
    92
#undef __NETBSD__
slouken@7191
    93
#define __NETBSD__  1
slouken@1402
    94
#endif
slouken@1402
    95
#if defined(__OpenBSD__)
slouken@1402
    96
#undef __OPENBSD__
slouken@7191
    97
#define __OPENBSD__ 1
slouken@1402
    98
#endif
slouken@1402
    99
#if defined(__OS2__)
slouken@1402
   100
#undef __OS2__
slouken@7191
   101
#define __OS2__     1
slouken@1402
   102
#endif
slouken@1402
   103
#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
slouken@1402
   104
#undef __OSF__
slouken@7191
   105
#define __OSF__     1
slouken@1402
   106
#endif
slouken@1402
   107
#if defined(__QNXNTO__)
slouken@1402
   108
#undef __QNXNTO__
slouken@7191
   109
#define __QNXNTO__  1
slouken@1402
   110
#endif
slouken@1402
   111
#if defined(riscos) || defined(__riscos) || defined(__riscos__)
slouken@1402
   112
#undef __RISCOS__
slouken@7191
   113
#define __RISCOS__  1
slouken@1402
   114
#endif
slouken@1631
   115
#if defined(__SVR4)
slouken@1402
   116
#undef __SOLARIS__
slouken@7191
   117
#define __SOLARIS__ 1
slouken@1402
   118
#endif
slouken@7498
   119
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
slouken@7856
   120
#undef __WINDOWS__
slouken@7856
   121
#define __WINDOWS__   1
slouken@7856
   122
#endif
slouken@7856
   123
#if defined(__WINDOWS__)
slouken@5086
   124
#undef __WIN32__
slouken@7856
   125
#define __WIN32__ 1
slouken@1402
   126
#endif
kimonline@7009
   127
#if defined(__PSP__)
slouken@7012
   128
#undef __PSP__
slouken@7191
   129
#define __PSP__ 1
kimonline@7009
   130
#endif
slouken@3319
   131
slouken@3319
   132
#include "begin_code.h"
slouken@3319
   133
/* Set up for C function definitions, even when using C++ */
slouken@3319
   134
#ifdef __cplusplus
slouken@3319
   135
extern "C" {
slouken@3319
   136
#endif
slouken@3319
   137
slouken@3319
   138
/**
slouken@3407
   139
 *  \brief Gets the name of the platform.
slouken@3319
   140
 */
slouken@3319
   141
extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
slouken@3319
   142
slouken@3319
   143
/* Ends C function definitions when using C++ */
slouken@3319
   144
#ifdef __cplusplus
slouken@3319
   145
}
slouken@3319
   146
#endif
slouken@3319
   147
#include "close_code.h"
slouken@3319
   148
slouken@1406
   149
#endif /* _SDL_platform_h */
slouken@3319
   150
slouken@3319
   151
/* vi: set ts=4 sw=4 expandtab: */