1 | #ifndef _INCL_PHYSFS_PLATFORMS |
2 | #define _INCL_PHYSFS_PLATFORMS |
3 | |
4 | #ifndef __PHYSICSFS_INTERNAL__ |
5 | #error Do not include this header from your applications. |
6 | #endif |
7 | |
8 | /* |
9 | * These only define the platforms to determine which files in the platforms |
10 | * directory should be compiled. For example, technically BeOS can be called |
11 | * a "unix" system, but since it doesn't use unix.c, we don't define |
12 | * PHYSFS_PLATFORM_UNIX on that system. |
13 | */ |
14 | |
15 | #if (defined __HAIKU__) |
16 | # define PHYSFS_PLATFORM_HAIKU 1 |
17 | # 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 | #elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */ |
23 | # include <winapifamily.h> |
24 | # define PHYSFS_PLATFORM_WINDOWS 1 |
25 | # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
26 | # define PHYSFS_NO_CDROM_SUPPORT 1 |
27 | # define PHYSFS_PLATFORM_WINRT 1 |
28 | # endif |
29 | #elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__)) |
30 | # define PHYSFS_PLATFORM_WINDOWS 1 |
31 | #elif defined(__OS2__) || defined(OS2) |
32 | # 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 | # include <TargetConditionals.h> |
36 | # if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE)) |
37 | # define PHYSFS_NO_CDROM_SUPPORT 1 |
38 | # endif |
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 | #elif defined(__ANDROID__) |
44 | # define PHYSFS_PLATFORM_LINUX 1 |
45 | # define PHYSFS_PLATFORM_ANDROID 1 |
46 | # define PHYSFS_PLATFORM_POSIX 1 |
47 | # define PHYSFS_NO_CDROM_SUPPORT 1 |
48 | #elif defined(__linux) |
49 | # define PHYSFS_PLATFORM_LINUX 1 |
50 | # define PHYSFS_PLATFORM_UNIX 1 |
51 | # define PHYSFS_PLATFORM_POSIX 1 |
52 | #elif defined(__sun) || defined(sun) |
53 | # define PHYSFS_PLATFORM_SOLARIS 1 |
54 | # define PHYSFS_PLATFORM_UNIX 1 |
55 | # define PHYSFS_PLATFORM_POSIX 1 |
56 | #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) |
57 | # define PHYSFS_PLATFORM_FREEBSD 1 |
58 | # define PHYSFS_PLATFORM_BSD 1 |
59 | # define PHYSFS_PLATFORM_UNIX 1 |
60 | # define PHYSFS_PLATFORM_POSIX 1 |
61 | #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) |
62 | # define PHYSFS_PLATFORM_BSD 1 |
63 | # define PHYSFS_PLATFORM_UNIX 1 |
64 | # define PHYSFS_PLATFORM_POSIX 1 |
65 | #elif defined(__EMSCRIPTEN__) |
66 | # define PHYSFS_NO_CDROM_SUPPORT 1 |
67 | # define PHYSFS_PLATFORM_UNIX 1 |
68 | # define PHYSFS_PLATFORM_POSIX 1 |
69 | #elif defined(__QNX__) |
70 | # define PHYSFS_PLATFORM_QNX 1 |
71 | # define PHYSFS_PLATFORM_POSIX 1 |
72 | #elif defined(unix) || defined(__unix__) |
73 | # define PHYSFS_PLATFORM_UNIX 1 |
74 | # define PHYSFS_PLATFORM_POSIX 1 |
75 | #else |
76 | # error Unknown platform. |
77 | #endif |
78 | |
79 | #endif /* include-once blocker. */ |
80 | |
81 | |