SDL_platform.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2009 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. /** @file SDL_platform.h
  19. * Try to get a standard set of platform defines
  20. */
  21. #ifndef _SDL_platform_h
  22. #define _SDL_platform_h
  23. #if defined(_AIX)
  24. #undef __AIX__
  25. #define __AIX__ 1
  26. #endif
  27. #if defined(__BEOS__)
  28. #undef __BEOS__
  29. #define __BEOS__ 1
  30. #endif
  31. #if defined(__HAIKU__)
  32. #undef __HAIKU__
  33. #define __HAIKU__ 1
  34. #endif
  35. #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
  36. #undef __BSDI__
  37. #define __BSDI__ 1
  38. #endif
  39. #if defined(_arch_dreamcast)
  40. #undef __DREAMCAST__
  41. #define __DREAMCAST__ 1
  42. #endif
  43. #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
  44. #undef __FREEBSD__
  45. #define __FREEBSD__ 1
  46. #endif
  47. #if defined(__HAIKU__)
  48. #undef __HAIKU__
  49. #define __HAIKU__ 1
  50. #endif
  51. #if defined(hpux) || defined(__hpux) || defined(__hpux__)
  52. #undef __HPUX__
  53. #define __HPUX__ 1
  54. #endif
  55. #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
  56. #undef __IRIX__
  57. #define __IRIX__ 1
  58. #endif
  59. #if defined(linux) || defined(__linux) || defined(__linux__)
  60. #undef __LINUX__
  61. #define __LINUX__ 1
  62. #endif
  63. #if defined(__APPLE__)
  64. #undef __MACOSX__
  65. #define __MACOSX__ 1
  66. #elif defined(macintosh)
  67. #undef __MACOS__
  68. #define __MACOS__ 1
  69. #endif
  70. #if defined(__NetBSD__)
  71. #undef __NETBSD__
  72. #define __NETBSD__ 1
  73. #endif
  74. #if defined(__OpenBSD__)
  75. #undef __OPENBSD__
  76. #define __OPENBSD__ 1
  77. #endif
  78. #if defined(__OS2__)
  79. #undef __OS2__
  80. #define __OS2__ 1
  81. #endif
  82. #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
  83. #undef __OSF__
  84. #define __OSF__ 1
  85. #endif
  86. #if defined(__QNXNTO__)
  87. #undef __QNXNTO__
  88. #define __QNXNTO__ 1
  89. #endif
  90. #if defined(riscos) || defined(__riscos) || defined(__riscos__)
  91. #undef __RISCOS__
  92. #define __RISCOS__ 1
  93. #endif
  94. #if defined(__SVR4)
  95. #undef __SOLARIS__
  96. #define __SOLARIS__ 1
  97. #endif
  98. #if defined(WIN32) || defined(_WIN32)
  99. #undef __WIN32__
  100. #define __WIN32__ 1
  101. #endif
  102. #endif /* _SDL_platform_h */