physfs_platforms.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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
  14. # define PHYSFS_PLATFORM_BEOS
  15. # define PHYSFS_PLATFORM_POSIX
  16. #elif ((defined __BEOS__) || (defined __beos__))
  17. # define PHYSFS_PLATFORM_BEOS
  18. # define PHYSFS_PLATFORM_POSIX
  19. #elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
  20. # define PHYSFS_PLATFORM_POCKETPC
  21. #elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
  22. # define PHYSFS_PLATFORM_WINDOWS
  23. #elif (defined OS2)
  24. # define PHYSFS_PLATFORM_OS2
  25. #elif ((defined __MACH__) && (defined __APPLE__))
  26. /* To check if iphone or not, we need to include this file */
  27. # include <TargetConditionals.h>
  28. # if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
  29. # define PHYSFS_PLATFORM_UNIX
  30. # define PHYSFS_PLATFORM_POSIX
  31. # define PHYSFS_NO_CDROM_SUPPORT
  32. # else
  33. # define PHYSFS_PLATFORM_MACOSX
  34. # define PHYSFS_PLATFORM_POSIX
  35. # endif
  36. #elif defined(macintosh)
  37. # error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
  38. #elif defined(unix) || defined(__unix__)
  39. # define PHYSFS_PLATFORM_UNIX
  40. # define PHYSFS_PLATFORM_POSIX
  41. #else
  42. # error Unknown platform.
  43. #endif
  44. #endif /* include-once blocker. */