2007-03-11 23:50:53 +01:00
|
|
|
#ifndef _INCL_PHYSFS_PLATFORMS
|
|
|
|
#define _INCL_PHYSFS_PLATFORMS
|
|
|
|
|
|
|
|
#ifndef __PHYSICSFS_INTERNAL__
|
|
|
|
#error Do not include this header from your applications.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These only define the platforms to determine which files in the platforms
|
|
|
|
* directory should be compiled. For example, technically BeOS can be called
|
|
|
|
* a "unix" system, but since it doesn't use unix.c, we don't define
|
|
|
|
* PHYSFS_PLATFORM_UNIX on that system.
|
|
|
|
*/
|
|
|
|
|
2008-11-05 20:42:48 +01:00
|
|
|
#if (defined __HAIKU__)
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_HAIKU 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2008-11-05 20:42:48 +01:00
|
|
|
#elif ((defined __BEOS__) || (defined __beos__))
|
2017-07-24 08:37:22 +02:00
|
|
|
# error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku!
|
2007-03-11 23:50:53 +01:00
|
|
|
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
|
2017-07-24 08:37:22 +02:00
|
|
|
# error PocketPC support was dropped since PhysicsFS 2.1. Sorry. Try WinRT!
|
2017-07-24 09:29:33 +02:00
|
|
|
#elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
|
|
|
# include <winapifamily.h>
|
2017-08-08 09:37:09 +02:00
|
|
|
# define PHYSFS_PLATFORM_WINDOWS 1
|
2017-08-02 18:48:31 +02:00
|
|
|
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
2017-07-24 09:29:33 +02:00
|
|
|
# define PHYSFS_NO_CDROM_SUPPORT 1
|
|
|
|
# define PHYSFS_PLATFORM_WINRT 1
|
|
|
|
# endif
|
2007-03-11 23:50:53 +01:00
|
|
|
#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_WINDOWS 1
|
2017-07-06 03:29:37 +02:00
|
|
|
#elif defined(__OS2__) || defined(OS2)
|
|
|
|
# define PHYSFS_PLATFORM_OS2 1
|
2007-03-11 23:50:53 +01:00
|
|
|
#elif ((defined __MACH__) && (defined __APPLE__))
|
2017-08-08 09:36:56 +02:00
|
|
|
/* To check if iOS or not, we need to include this file */
|
2012-06-25 20:40:03 +02:00
|
|
|
# include <TargetConditionals.h>
|
|
|
|
# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
|
|
|
|
# define PHYSFS_NO_CDROM_SUPPORT 1
|
2008-11-02 21:19:58 +01:00
|
|
|
# endif
|
2017-08-08 09:36:56 +02:00
|
|
|
# define PHYSFS_PLATFORM_APPLE 1
|
2012-06-25 20:40:03 +02:00
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2007-03-11 23:50:53 +01:00
|
|
|
#elif defined(macintosh)
|
2007-03-14 08:20:59 +01:00
|
|
|
# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
|
2020-06-12 09:37:58 +02:00
|
|
|
#elif defined(__ANDROID__)
|
|
|
|
# define PHYSFS_PLATFORM_LINUX 1
|
|
|
|
# define PHYSFS_PLATFORM_ANDROID 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
|
|
|
# define PHYSFS_NO_CDROM_SUPPORT 1
|
2012-03-20 01:31:50 +01:00
|
|
|
#elif defined(__linux)
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_LINUX 1
|
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2012-03-20 01:31:50 +01:00
|
|
|
#elif defined(__sun) || defined(sun)
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_SOLARIS 1
|
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2017-07-13 02:49:53 +02:00
|
|
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
2013-08-24 05:41:35 +02:00
|
|
|
# define PHYSFS_PLATFORM_FREEBSD 1
|
|
|
|
# define PHYSFS_PLATFORM_BSD 1
|
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
|
|
|
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_BSD 1
|
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2017-07-09 23:28:33 +02:00
|
|
|
#elif defined(__EMSCRIPTEN__)
|
|
|
|
# define PHYSFS_NO_CDROM_SUPPORT 1
|
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2017-07-23 02:04:38 +02:00
|
|
|
#elif defined(__QNX__)
|
|
|
|
# define PHYSFS_PLATFORM_QNX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2012-08-02 09:03:06 +02:00
|
|
|
#elif defined(unix) || defined(__unix__)
|
2012-03-20 01:41:14 +01:00
|
|
|
# define PHYSFS_PLATFORM_UNIX 1
|
|
|
|
# define PHYSFS_PLATFORM_POSIX 1
|
2007-03-11 23:50:53 +01:00
|
|
|
#else
|
|
|
|
# error Unknown platform.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* include-once blocker. */
|
|
|
|
|