Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
3.7 KiB

  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * \file SDL_platform.h
  20. *
  21. * Try to get a standard set of platform defines.
  22. */
  23. #ifndef _SDL_platform_h
  24. #define _SDL_platform_h
  25. #if defined(_AIX)
  26. #undef __AIX__
  27. #define __AIX__ 1
  28. #endif
  29. #if defined(__HAIKU__)
  30. #undef __HAIKU__
  31. #define __HAIKU__ 1
  32. #endif
  33. #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
  34. #undef __BSDI__
  35. #define __BSDI__ 1
  36. #endif
  37. #if defined(_arch_dreamcast)
  38. #undef __DREAMCAST__
  39. #define __DREAMCAST__ 1
  40. #endif
  41. #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
  42. #undef __FREEBSD__
  43. #define __FREEBSD__ 1
  44. #endif
  45. #if defined(hpux) || defined(__hpux) || defined(__hpux__)
  46. #undef __HPUX__
  47. #define __HPUX__ 1
  48. #endif
  49. #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
  50. #undef __IRIX__
  51. #define __IRIX__ 1
  52. #endif
  53. #if defined(linux) || defined(__linux) || defined(__linux__)
  54. #undef __LINUX__
  55. #define __LINUX__ 1
  56. #endif
  57. #if defined(ANDROID) || defined(__ANDROID__)
  58. #undef __ANDROID__
  59. #undef __LINUX__ /* do we need to do this? */
  60. #define __ANDROID__ 1
  61. #endif
  62. #if defined(__APPLE__)
  63. /* lets us know what version of Mac OS X we're compiling on */
  64. #include "AvailabilityMacros.h"
  65. #include "TargetConditionals.h"
  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. #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
  76. # error SDL for Mac OS X only supports deploying on 10.5 and above.
  77. #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
  78. #endif /* TARGET_OS_IPHONE */
  79. #endif /* defined(__APPLE__) */
  80. #if defined(__NetBSD__)
  81. #undef __NETBSD__
  82. #define __NETBSD__ 1
  83. #endif
  84. #if defined(__OpenBSD__)
  85. #undef __OPENBSD__
  86. #define __OPENBSD__ 1
  87. #endif
  88. #if defined(__OS2__)
  89. #undef __OS2__
  90. #define __OS2__ 1
  91. #endif
  92. #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
  93. #undef __OSF__
  94. #define __OSF__ 1
  95. #endif
  96. #if defined(__QNXNTO__)
  97. #undef __QNXNTO__
  98. #define __QNXNTO__ 1
  99. #endif
  100. #if defined(riscos) || defined(__riscos) || defined(__riscos__)
  101. #undef __RISCOS__
  102. #define __RISCOS__ 1
  103. #endif
  104. #if defined(__SVR4)
  105. #undef __SOLARIS__
  106. #define __SOLARIS__ 1
  107. #endif
  108. #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
  109. #undef __WINDOWS__
  110. #define __WINDOWS__ 1
  111. #endif
  112. #if defined(__WINDOWS__)
  113. #undef __WIN32__
  114. #define __WIN32__ 1
  115. #endif
  116. #if defined(__PSP__)
  117. #undef __PSP__
  118. #define __PSP__ 1
  119. #endif
  120. #include "begin_code.h"
  121. /* Set up for C function definitions, even when using C++ */
  122. #ifdef __cplusplus
  123. extern "C" {
  124. #endif
  125. /**
  126. * \brief Gets the name of the platform.
  127. */
  128. extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
  129. /* Ends C function definitions when using C++ */
  130. #ifdef __cplusplus
  131. }
  132. #endif
  133. #include "close_code.h"
  134. #endif /* _SDL_platform_h */
  135. /* vi: set ts=4 sw=4 expandtab: */