summaryrefslogtreecommitdiff
path: root/src/port/sys.h
blob: 65b68e241e31a5cc5b6c2bf405fd77ec55c1647a (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#if defined LINUX
#if OS_MAJOR_VERSION == 2
#if OS_MINOR_VERSION == 6
#define _XOPEN_SOURCE 600
#define HAVE_STDBOOL_H
#define HAVE_STDINT_H
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#define HAVE_VASPRINTF
#define HAVE_ASPRINTF
#define HAVE_STRDUP
#define HAVE_LOCKF
#else
	#error unknown platform
#endif /* defined OS_MINOR_VERSION == 6 */
#else
	#error unknown platform
#endif /* defined OS_MAJOR_VERSION == 2 */
#endif /* defined LINUX */

#if defined FREEBSD
#if OS_MAJOR_VERSION == 7
#if OS_MINOR_VERSION == 0
#define _XOPEN_SOURCE 600
#define HAVE_STDBOOL_H
#define HAVE_STDINT_H
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#define HAVE_VASPRINTF
#define HAVE_ASPRINTF
#define HAVE_STRDUP
#define HAVE_LOCKF
#else
	#error unknown platform
#endif /* defined OS_MINOR_VERSION == 0 */
#else
#if OS_MAJOR_VERSION == 6
#if OS_MINOR_VERSION == 2
#define _XOPEN_SOURCE 600
#define HAVE_STDBOOL_H
#define HAVE_STDINT_H
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#define HAVE_STRDUP
#define HAVE_LOCKF
#else
	#error unknown platform
#endif /* defined OS_MINOR_VERSION == 2 */
#else
	#error unknown platform
#endif /* defined OS_MAJOR_VERSION == 6 */
#endif /* defined OS_MAJOR_VERSION == 7 */
#endif /* defined FREEBSD */

#if defined OPENBSD
#if OS_MAJOR_VERSION == 4
#if OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 3
#define _XOPEN_SOURCE 600
#define HAVE_STDBOOL_H
#define HAVE_STDINT_H
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#define HAVE_VASPRINTF
#define HAVE_ASPRINTF
#define HAVE_STRDUP
#define HAVE_LOCKF
#else
	#error unknown platform
#endif /* defined OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 3 */
#else
	#error unknown platform
#endif /* defined OS_MAJOR_VERSION == 4 */
#endif /* defined OPENBSD */

#if defined SUNOS
#if OS_MAJOR_VERSION == 5
#if OS_MINOR_VERSION == 8
#if !defined __cplusplus
#define _XOPEN_SOURCE 600
#define __EXTENSIONS__
#endif
#define HAVE_SNPRINTF
#define HAVE_VSNPRINTF
#define HAVE_LOCKF
#define HAVE_ENUM_BOOL
#define HAVE_LINK_H
#else
#if OS_MINOR_VERSION == 10
#if !defined __cplusplus 
#define _XOPEN_SOURCE 600
#define __EXTENSIONS__
#endif
#define HAVE_SNPRINTF
#define HAVE_VSNPRINTF
#define HAVE_LOCKF
#define HAVE_STDBOOL_H
#define HAVE_STDINT_H
#define HAVE_STRERROR_R
#else
	#error unknown platform
#endif /* OS_MINOR_VERSION == 10 */
#endif /* OS_MINOR_VERSION == 8 */
#else
	#error unknown platform
#endif /* OS_MAJOR_VERSION == 5 */
#endif /* defined SUNOS */

#if defined CYGWIN
#if OS_MAJOR_VERSION == 5
#if OS_MINOR_VERSION == 0
#define _XOPEN_SOURCE 600
#define HAVE_ENUM_BOOL
#else
	#error unknown platform
#endif /* OS_MINOR_VERSION == 0 */
#else
	#error unknown platform
#endif /* OS_MAJOR_VERSION == 5 */
#endif /* defined CYGWIN */