-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform.h
78 lines (58 loc) · 1.71 KB
/
platform.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* prevent double include */
#ifndef PLATFORM_H
#define PLATFORM_H
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
/* linux, also other platforms (Hurd etc) that use GLIBC */
#define PLATFORM_LINUX
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
/* BSD */
#define PLATFORM_BSD
#elif defined(sun) || defined(__sun)
/* Solaris */
#define PLATFORM_SUN
#elif defined(__sgi)
/* SGI Irix */
#define PLATFORM_SGI
#elif defined(__hpux)
/* hp unix */
#define PLATFORM_HP
#elif defined(__CYGWIN__)
/* cygwin is not win32 */
#define PLATFORM_CYGWIN
#elif defined(_WIN64) || defined(__WIN64__) || defined(WIN64)
/* win64 */
#define PLATFORM_WIN64
#define PLATFORM_WINDOWS
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
/* win32 */
#define PLATFORM_WIN32
#define PLATFORM_WINDOWS
#elif defined(__BEOS__)
/* BeOS */
#define PLATFORM_BEOS
#elif defined (__APPLE__) && defined (__MACH__)
/* MacOSX */
#define PLATFORM_OSX
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
/* MacOS classic */
#define PLATFORM_MAC
#elif defined(__IBMCPP__) || defined(_AIX)
/* IBM */
#define PLATFORM_AIX
#elif defined(__amigaos__)
/* AmigaOS */
#define PLATFORM_AMIGA
#elif defined(__QNXNTO__)
/* QNX */
#define PLATFORM_QNX
#elif defined(__VXWORKS__)
/* vxWorks */
#define PLATFORM_VXWORKS
#elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
/* generic unix platform */
#define PLATFORM_UNIX
#else
/* the platform cannot be determined at compile time */
#error "Unknown platform - please report the platform details to http://fieldtrip.fcdonders.nl"
#endif
#endif /* PLATFORM_H */