comparison autovar/autovar_OS.h @ 0:3e629dc19168

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:24:28 +0100
parents
children 9d70178c1ded
comparison
equal deleted inserted replaced
-1:000000000000 0:3e629dc19168
1 /*
2
3 Package: dyncall
4 Library: autovar
5 File: autovar/autovar_OS.h
6 Description:
7 License:
8
9 Copyright (c) 2011-2015 Daniel Adler <dadler@uni-goettingen.de>,
10 Tassilo Philipp <tphilipp@potion-studios.com>
11
12 Permission to use, copy, modify, and distribute this software for any
13 purpose with or without fee is hereby granted, provided that the above
14 copyright notice and this permission notice appear in all copies.
15
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
24 */
25
26 #ifndef AUTOVAR_OS_H
27 #define AUTOVAR_OS_H
28
29 #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
30 # define OS_Win64
31 #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__WINDOWS__) || defined(_WINDOWS)
32 # define OS_Win32
33 #elif defined(__APPLE__) || defined(__Darwin__)
34 # define OS_Darwin
35 # if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
36 # define OS_IOS
37 # else /* defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) */
38 # define OS_MacOSX
39 # endif
40 #elif defined(__linux__) || defined(__linux) || defined(__gnu_linux__)
41 # define OS_Linux
42 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
43 # define OS_FreeBSD
44 #elif defined(__OpenBSD__)
45 # define OS_OpenBSD
46 #elif defined(__NetBSD__)
47 # define OS_NetBSD
48 #elif defined(__DragonFly__)
49 # define OS_DragonFlyBSD
50 #elif defined(__sun__) || defined(__sun) || defined(sun)
51 # define OS_SunOS
52 #elif defined(__CYGWIN__)
53 # define OS_Cygwin
54 #elif defined(__MINGW__)
55 # define OS_MinGW
56 #elif defined(__nds__)
57 # define OS_NDS
58 #elif defined(__psp__) || defined(PSP)
59 # define OS_PSP
60 #elif defined(__HAIKU__) || defined(__BEOS__)
61 # define OS_BeOS
62 #elif defined(Plan9) || defined(__Plan9__)
63 # define OS_Plan9
64 #elif defined(__vms)
65 # define OS_VMS
66 #elif defined(__minix)
67 # define OS_Minix
68 #else
69 # define OS_Unknown
70 #endif
71
72 /** Platforms. */
73
74 #if defined(__ANDROID__)
75 # define OS_Android
76 #endif
77
78 #endif /* AUTOVAR_OS */
79