SDL_platform.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #ifndef _SDL_platform_h
  2. #define _SDL_platform_h
  3. #if defined(_AIX)
  4. #undef __AIX__
  5. #define __AIX__ 1
  6. #endif
  7. #if defined(__BEOS__)
  8. #undef __BEOS__
  9. #define __BEOS__ 1
  10. #endif
  11. #if defined(__HAIKU__)
  12. #undef __HAIKU__
  13. #define __HAIKU__ 1
  14. #endif
  15. #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
  16. #undef __BSDI__
  17. #define __BSDI__ 1
  18. #endif
  19. #if defined(_arch_dreamcast)
  20. #undef __DREAMCAST__
  21. #define __DREAMCAST__ 1
  22. #endif
  23. #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
  24. #undef __FREEBSD__
  25. #define __FREEBSD__ 1
  26. #endif
  27. #if defined(hpux) || defined(__hpux) || defined(__hpux__)
  28. #undef __HPUX__
  29. #define __HPUX__ 1
  30. #endif
  31. #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
  32. #undef __IRIX__
  33. #define __IRIX__ 1
  34. #endif
  35. #if defined(linux) || defined(__linux) || defined(__linux__)
  36. #undef __LINUX__
  37. #define __LINUX__ 1
  38. #endif
  39. #if defined(ANDROID)
  40. #undef __ANDROID__
  41. #undef __LINUX__
  42. #define __ANDROID__ 1
  43. #endif
  44. #if defined(__APPLE__)
  45. #include "AvailabilityMacros.h"
  46. #include "TargetConditionals.h"
  47. #if TARGET_OS_IPHONE
  48. #undef __IPHONEOS__
  49. #define __IPHONEOS__ 1
  50. #undef __MACOSX__
  51. #else
  52. #undef __MACOSX__
  53. #define __MACOSX__ 1
  54. #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
  55. # error SDL for Mac OS X only supports deploying on 10.5 and above.
  56. #endif
  57. #if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
  58. # error SDL for Mac OS X must be built with a 10.6 SDK or above.
  59. #endif
  60. #endif
  61. #endif
  62. #if defined(__NetBSD__)
  63. #undef __NETBSD__
  64. #define __NETBSD__ 1
  65. #endif
  66. #if defined(__OpenBSD__)
  67. #undef __OPENBSD__
  68. #define __OPENBSD__ 1
  69. #endif
  70. #if defined(__OS2__)
  71. #undef __OS2__
  72. #define __OS2__ 1
  73. #endif
  74. #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
  75. #undef __OSF__
  76. #define __OSF__ 1
  77. #endif
  78. #if defined(__QNXNTO__)
  79. #undef __QNXNTO__
  80. #define __QNXNTO__ 1
  81. #endif
  82. #if defined(riscos) || defined(__riscos) || defined(__riscos__)
  83. #undef __RISCOS__
  84. #define __RISCOS__ 1
  85. #endif
  86. #if defined(__SVR4)
  87. #undef __SOLARIS__
  88. #define __SOLARIS__ 1
  89. #endif
  90. #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
  91. #undef __WIN32__
  92. #define __WIN32__ 1
  93. #endif
  94. #if defined(__PSP__)
  95. #undef __PSP__
  96. #define __PSP__ 1
  97. #endif
  98. #include "begin_code.h"
  99. #ifdef __cplusplus
  100. extern "C" {
  101. #endif
  102. typedef const char * SDLCALL tSDL_GetPlatform (void);
  103. extern tSDL_GetPlatform *SDL_GetPlatform;
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #include "close_code.h"
  108. #endif