author | Ryan C. Gordon <icculus@icculus.org> |
Wed, 16 Aug 2017 20:02:54 -0400 | |
changeset 1588 | 59a7ec36bd8c |
parent 1570 | 3bd8afc43ee3 |
child 1692 | acdcf93d1f9b |
permissions | -rw-r--r-- |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
1 |
#ifndef _INCL_PHYSFS_PLATFORMS |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
2 |
#define _INCL_PHYSFS_PLATFORMS |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
3 |
|
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
4 |
#ifndef __PHYSICSFS_INTERNAL__ |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
5 |
#error Do not include this header from your applications. |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
6 |
#endif |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
7 |
|
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
8 |
/* |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
9 |
* These only define the platforms to determine which files in the platforms |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
10 |
* directory should be compiled. For example, technically BeOS can be called |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
11 |
* a "unix" system, but since it doesn't use unix.c, we don't define |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
12 |
* PHYSFS_PLATFORM_UNIX on that system. |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
13 |
*/ |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
14 |
|
947 | 15 |
#if (defined __HAIKU__) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
16 |
# define PHYSFS_PLATFORM_HAIKU 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
17 |
# define PHYSFS_PLATFORM_POSIX 1 |
947 | 18 |
#elif ((defined __BEOS__) || (defined __beos__)) |
1517 | 19 |
# error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku! |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
20 |
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE) |
1517 | 21 |
# error PocketPC support was dropped since PhysicsFS 2.1. Sorry. Try WinRT! |
1518
a6ac19814d53
Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1517
diff
changeset
|
22 |
#elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */ |
a6ac19814d53
Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1517
diff
changeset
|
23 |
# include <winapifamily.h> |
1550
c849824939bd
windows: minor cleanup.
Ryan C. Gordon <icculus@icculus.org>
parents:
1549
diff
changeset
|
24 |
# define PHYSFS_PLATFORM_WINDOWS 1 |
1524
bf22529f7ca9
windows: better test for WinRT vs win32 (...I think...?)
Ryan C. Gordon <icculus@icculus.org>
parents:
1518
diff
changeset
|
25 |
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
1518
a6ac19814d53
Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1517
diff
changeset
|
26 |
# define PHYSFS_NO_CDROM_SUPPORT 1 |
a6ac19814d53
Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1517
diff
changeset
|
27 |
# define PHYSFS_PLATFORM_WINRT 1 |
a6ac19814d53
Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents:
1517
diff
changeset
|
28 |
# endif |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
29 |
#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__)) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
30 |
# define PHYSFS_PLATFORM_WINDOWS 1 |
1395
2b5c79f64d59
os2: added OS/2 support back in.
Ryan C. Gordon <icculus@icculus.org>
parents:
1358
diff
changeset
|
31 |
#elif defined(__OS2__) || defined(OS2) |
2b5c79f64d59
os2: added OS/2 support back in.
Ryan C. Gordon <icculus@icculus.org>
parents:
1358
diff
changeset
|
32 |
# define PHYSFS_PLATFORM_OS2 1 |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
33 |
#elif ((defined __MACH__) && (defined __APPLE__)) |
1549
59ee9cc813c8
apple: Start using some Cocoa APIs, clean up a few related things.
Ryan C. Gordon <icculus@icculus.org>
parents:
1544
diff
changeset
|
34 |
/* To check if iOS or not, we need to include this file */ |
1291
854cdfefdf12
For iOS, build the Mac OS X platform code, not the generic Unix code.
Ryan C. Gordon <icculus@icculus.org>
parents:
1235
diff
changeset
|
35 |
# include <TargetConditionals.h> |
854cdfefdf12
For iOS, build the Mac OS X platform code, not the generic Unix code.
Ryan C. Gordon <icculus@icculus.org>
parents:
1235
diff
changeset
|
36 |
# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE)) |
854cdfefdf12
For iOS, build the Mac OS X platform code, not the generic Unix code.
Ryan C. Gordon <icculus@icculus.org>
parents:
1235
diff
changeset
|
37 |
# define PHYSFS_NO_CDROM_SUPPORT 1 |
942
e7bed87e50ce
iPhone support patch (thanks, Christian!)
Ryan C. Gordon <icculus@icculus.org>
parents:
847
diff
changeset
|
38 |
# endif |
1549
59ee9cc813c8
apple: Start using some Cocoa APIs, clean up a few related things.
Ryan C. Gordon <icculus@icculus.org>
parents:
1544
diff
changeset
|
39 |
# define PHYSFS_PLATFORM_APPLE 1 |
1291
854cdfefdf12
For iOS, build the Mac OS X platform code, not the generic Unix code.
Ryan C. Gordon <icculus@icculus.org>
parents:
1235
diff
changeset
|
40 |
# define PHYSFS_PLATFORM_POSIX 1 |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
41 |
#elif defined(macintosh) |
825
b26da6cdcebb
Dropped classic Mac OS support. Mac OS X remains supported, though.
Ryan C. Gordon <icculus@icculus.org>
parents:
818
diff
changeset
|
42 |
# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X. |
1313
8f95fc8eea0c
Turn off CD-ROM support on Android.
Ryan C. Gordon <icculus@icculus.org>
parents:
1295
diff
changeset
|
43 |
#elif defined(ANDROID) |
8f95fc8eea0c
Turn off CD-ROM support on Android.
Ryan C. Gordon <icculus@icculus.org>
parents:
1295
diff
changeset
|
44 |
# define PHYSFS_PLATFORM_LINUX 1 |
8f95fc8eea0c
Turn off CD-ROM support on Android.
Ryan C. Gordon <icculus@icculus.org>
parents:
1295
diff
changeset
|
45 |
# define PHYSFS_PLATFORM_UNIX 1 |
8f95fc8eea0c
Turn off CD-ROM support on Android.
Ryan C. Gordon <icculus@icculus.org>
parents:
1295
diff
changeset
|
46 |
# define PHYSFS_PLATFORM_POSIX 1 |
8f95fc8eea0c
Turn off CD-ROM support on Android.
Ryan C. Gordon <icculus@icculus.org>
parents:
1295
diff
changeset
|
47 |
# define PHYSFS_NO_CDROM_SUPPORT 1 |
1233
53a01072f272
Added Linux and Solaris tests.
Ryan C. Gordon <icculus@icculus.org>
parents:
1197
diff
changeset
|
48 |
#elif defined(__linux) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
49 |
# define PHYSFS_PLATFORM_LINUX 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
50 |
# define PHYSFS_PLATFORM_UNIX 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
51 |
# define PHYSFS_PLATFORM_POSIX 1 |
1233
53a01072f272
Added Linux and Solaris tests.
Ryan C. Gordon <icculus@icculus.org>
parents:
1197
diff
changeset
|
52 |
#elif defined(__sun) || defined(sun) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
53 |
# define PHYSFS_PLATFORM_SOLARIS 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
54 |
# define PHYSFS_PLATFORM_UNIX 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
55 |
# define PHYSFS_PLATFORM_POSIX 1 |
1451
06df328517f9
Debian/kFreeBSD should use the FreeBSD-specific codepaths, not generic Unix.
Ryan C. Gordon <icculus@icculus.org>
parents:
1443
diff
changeset
|
56 |
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) |
1337
3b2e649c044c
Better basedir detection for various Unix platforms.
Ryan C. Gordon <icculus@icculus.org>
parents:
1313
diff
changeset
|
57 |
# define PHYSFS_PLATFORM_FREEBSD 1 |
3b2e649c044c
Better basedir detection for various Unix platforms.
Ryan C. Gordon <icculus@icculus.org>
parents:
1313
diff
changeset
|
58 |
# define PHYSFS_PLATFORM_BSD 1 |
3b2e649c044c
Better basedir detection for various Unix platforms.
Ryan C. Gordon <icculus@icculus.org>
parents:
1313
diff
changeset
|
59 |
# define PHYSFS_PLATFORM_UNIX 1 |
3b2e649c044c
Better basedir detection for various Unix platforms.
Ryan C. Gordon <icculus@icculus.org>
parents:
1313
diff
changeset
|
60 |
# define PHYSFS_PLATFORM_POSIX 1 |
3b2e649c044c
Better basedir detection for various Unix platforms.
Ryan C. Gordon <icculus@icculus.org>
parents:
1313
diff
changeset
|
61 |
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
62 |
# define PHYSFS_PLATFORM_BSD 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
63 |
# define PHYSFS_PLATFORM_UNIX 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
64 |
# define PHYSFS_PLATFORM_POSIX 1 |
1426
0265fa9cdc4c
Don't try to build CD-ROM support on Emscripten.
Ryan C. Gordon <icculus@icculus.org>
parents:
1395
diff
changeset
|
65 |
#elif defined(__EMSCRIPTEN__) |
0265fa9cdc4c
Don't try to build CD-ROM support on Emscripten.
Ryan C. Gordon <icculus@icculus.org>
parents:
1395
diff
changeset
|
66 |
# define PHYSFS_NO_CDROM_SUPPORT 1 |
0265fa9cdc4c
Don't try to build CD-ROM support on Emscripten.
Ryan C. Gordon <icculus@icculus.org>
parents:
1395
diff
changeset
|
67 |
# define PHYSFS_PLATFORM_UNIX 1 |
0265fa9cdc4c
Don't try to build CD-ROM support on Emscripten.
Ryan C. Gordon <icculus@icculus.org>
parents:
1395
diff
changeset
|
68 |
# define PHYSFS_PLATFORM_POSIX 1 |
1514
59b3d690cc3c
Minor QNX fix; don't warn about CD-ROM support (for now).
Ryan C. Gordon <icculus@icculus.org>
parents:
1513
diff
changeset
|
69 |
#elif defined(__QNX__) |
59b3d690cc3c
Minor QNX fix; don't warn about CD-ROM support (for now).
Ryan C. Gordon <icculus@icculus.org>
parents:
1513
diff
changeset
|
70 |
# define PHYSFS_PLATFORM_QNX 1 |
59b3d690cc3c
Minor QNX fix; don't warn about CD-ROM support (for now).
Ryan C. Gordon <icculus@icculus.org>
parents:
1513
diff
changeset
|
71 |
# define PHYSFS_PLATFORM_POSIX 1 |
1295
02a34500bb1c
An attempt to make this more Unix-friendly.
Ryan C. Gordon <icculus@icculus.org>
parents:
1291
diff
changeset
|
72 |
#elif defined(unix) || defined(__unix__) |
1235
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
73 |
# define PHYSFS_PLATFORM_UNIX 1 |
2ed0567fe413
Make physfs_platforms.h define with a 1, so "#if X" works.
Ryan C. Gordon <icculus@icculus.org>
parents:
1233
diff
changeset
|
74 |
# define PHYSFS_PLATFORM_POSIX 1 |
818
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
75 |
#else |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
76 |
# error Unknown platform. |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
77 |
#endif |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
78 |
|
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
79 |
#endif /* include-once blocker. */ |
e36f23f49042
Now compiles everything whether we need it or not, removing whole files with
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
80 |