/
physfs_platforms.h
63 lines (58 loc) · 2.18 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
18
# define PHYSFS_PLATFORM_HAIKU 1
# define PHYSFS_PLATFORM_BEOS 1
# define PHYSFS_PLATFORM_POSIX 1
19
#elif ((defined __BEOS__) || (defined __beos__))
20
21
# define PHYSFS_PLATFORM_BEOS 1
# define PHYSFS_PLATFORM_POSIX 1
22
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
23
# error PocketPC support was dropped from PhysicsFS 2.1. Sorry.
24
#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
25
# define PHYSFS_PLATFORM_WINDOWS 1
26
#elif (defined OS2)
27
# error OS/2 support was dropped from PhysicsFS 2.1. Sorry.
28
#elif ((defined __MACH__) && (defined __APPLE__))
29
/* To check if iphone or not, we need to include this file */
30
31
32
# include <TargetConditionals.h>
# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
# define PHYSFS_NO_CDROM_SUPPORT 1
33
# endif
34
35
# define PHYSFS_PLATFORM_MACOSX 1
# define PHYSFS_PLATFORM_POSIX 1
36
#elif defined(macintosh)
37
# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
38
39
40
41
42
#elif defined(ANDROID)
# define PHYSFS_PLATFORM_LINUX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
# define PHYSFS_NO_CDROM_SUPPORT 1
43
#elif defined(__linux)
44
45
46
# define PHYSFS_PLATFORM_LINUX 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
47
#elif defined(__sun) || defined(sun)
48
49
50
# define PHYSFS_PLATFORM_SOLARIS 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
51
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
52
53
54
# define PHYSFS_PLATFORM_BSD 1
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
55
#elif defined(unix) || defined(__unix__)
56
57
# define PHYSFS_PLATFORM_UNIX 1
# define PHYSFS_PLATFORM_POSIX 1
58
59
60
61
62
#else
# error Unknown platform.
#endif
#endif /* include-once blocker. */