physfs_platforms.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef _INCL_PHYSFS_PLATFORMS
  2. #define _INCL_PHYSFS_PLATFORMS
  3. #ifndef __PHYSICSFS_INTERNAL__
  4. #error Do not include this header from your applications.
  5. #endif
  6. /*
  7. * These only define the platforms to determine which files in the platforms
  8. * directory should be compiled. For example, technically BeOS can be called
  9. * a "unix" system, but since it doesn't use unix.c, we don't define
  10. * PHYSFS_PLATFORM_UNIX on that system.
  11. */
  12. #if (defined __HAIKU__)
  13. # define PHYSFS_PLATFORM_HAIKU 1
  14. # define PHYSFS_PLATFORM_BEOS 1
  15. # define PHYSFS_PLATFORM_POSIX 1
  16. #elif ((defined __BEOS__) || (defined __beos__))
  17. # define PHYSFS_PLATFORM_BEOS 1
  18. # define PHYSFS_PLATFORM_POSIX 1
  19. #elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
  20. # error PocketPC support was dropped from PhysicsFS 2.1. Sorry.
  21. #elif ((defined WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP)
  22. # define PHYSFS_PLATFORM_WINRT 1
  23. # define PHYSFS_NO_CDROM_SUPPORT 1
  24. # define PHYSFS_PLATFORM_WINDOWS 1
  25. #elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
  26. # define PHYSFS_PLATFORM_WINDOWS 1
  27. #elif (defined OS2)
  28. # error OS/2 support was dropped from PhysicsFS 2.1. Sorry.
  29. #elif ((defined __MACH__) && (defined __APPLE__))
  30. /* To check if iphone or not, we need to include this file */
  31. # include <TargetConditionals.h>
  32. # if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
  33. # define PHYSFS_NO_CDROM_SUPPORT 1
  34. # endif
  35. # define PHYSFS_PLATFORM_MACOSX 1
  36. # define PHYSFS_PLATFORM_POSIX 1
  37. #elif defined(macintosh)
  38. # error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
  39. #elif defined(ANDROID)
  40. # define PHYSFS_PLATFORM_LINUX 1
  41. # define PHYSFS_PLATFORM_UNIX 1
  42. # define PHYSFS_PLATFORM_POSIX 1
  43. # define PHYSFS_NO_CDROM_SUPPORT 1
  44. #elif defined(__linux)
  45. # define PHYSFS_PLATFORM_LINUX 1
  46. # define PHYSFS_PLATFORM_UNIX 1
  47. # define PHYSFS_PLATFORM_POSIX 1
  48. #elif defined(__sun) || defined(sun)
  49. # define PHYSFS_PLATFORM_SOLARIS 1
  50. # define PHYSFS_PLATFORM_UNIX 1
  51. # define PHYSFS_PLATFORM_POSIX 1
  52. #elif defined(__FreeBSD__) || defined(__DragonFly__)
  53. # define PHYSFS_PLATFORM_FREEBSD 1
  54. # define PHYSFS_PLATFORM_BSD 1
  55. # define PHYSFS_PLATFORM_UNIX 1
  56. # define PHYSFS_PLATFORM_POSIX 1
  57. #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
  58. # define PHYSFS_PLATFORM_BSD 1
  59. # define PHYSFS_PLATFORM_UNIX 1
  60. # define PHYSFS_PLATFORM_POSIX 1
  61. #elif defined(unix) || defined(__unix__)
  62. # define PHYSFS_PLATFORM_UNIX 1
  63. # define PHYSFS_PLATFORM_POSIX 1
  64. #else
  65. # error Unknown platform.
  66. #endif
  67. #endif /* include-once blocker. */