/
physfs_platforms.h
80 lines (75 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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.
*/
15
#if (defined __HAIKU__)
16
17
# define PHYSFS_PLATFORM_HAIKU 1
# define PHYSFS_PLATFORM_POSIX 1
18
#elif ((defined __BEOS__) || (defined __beos__))
19
# error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku!
20
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
21
# error PocketPC support was dropped since PhysicsFS 2.1. Sorry. Try WinRT!
22
23
#elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
# include <winapifamily.h>
24
# define PHYSFS_PLATFORM_WINDOWS 1
25
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
26
27
28
# define PHYSFS_NO_CDROM_SUPPORT 1
# define PHYSFS_PLATFORM_WINRT 1
# endif
29
#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
30
# define PHYSFS_PLATFORM_WINDOWS 1
31
32
#elif defined(__OS2__) || defined(OS2)
# define PHYSFS_PLATFORM_OS2 1
33
#elif ((defined __MACH__) && (defined __APPLE__))
34
/* To check if iOS or not, we need to include this file */
35
36
37
# include <TargetConditionals.h>
# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
# define PHYSFS_NO_CDROM_SUPPORT 1
39
# define PHYSFS_PLATFORM_APPLE 1
40
# define PHYSFS_PLATFORM_POSIX 1
41
#elif defined(macintosh)
42
# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
43
44
45
46
47
#elif defined(ANDROID)
# define PHYSFS_PLATFORM_LINUX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
# define PHYSFS_NO_CDROM_SUPPORT 1
48
#elif defined(__linux)
49
50
51
# define PHYSFS_PLATFORM_LINUX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
52
#elif defined(__sun) || defined(sun)
53
54
55
# define PHYSFS_PLATFORM_SOLARIS 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
56
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
57
58
59
60
61
# 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__)
62
63
64
# define PHYSFS_PLATFORM_BSD 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
65
66
67
68
#elif defined(__EMSCRIPTEN__)
# define PHYSFS_NO_CDROM_SUPPORT 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
69
70
71
#elif defined(__QNX__)
# define PHYSFS_PLATFORM_QNX 1
# define PHYSFS_PLATFORM_POSIX 1
72
#elif defined(unix) || defined(__unix__)
73
74
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
75
76
77
78
79
#else
# error Unknown platform.
#endif
#endif /* include-once blocker. */