summaryrefslogtreecommitdiff
path: root/include/wolf/port/sys.h
blob: 675e0976adc7740bd4d6bd2d5d1ce30188192b56 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef WOLF_SYS_H
#define WOLF_SYS_H

#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
/* TODO: check this, I don't think Solaris 8 has a working
 * snprintf! */
#define HAVE_SNPRINTF
#define HAVE_VSNPRINTF
#define HAVE_LOCKF
#define HAVE_ENUM_BOOL
#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 == 1
#define _XOPEN_SOURCE 600
#define HAVE_ENUM_BOOL
/* for *printf substitutes */
#define HAVE_CONFIG_H 0
#define TEST_SNPRINTF 0
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 0
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_LOCALE_H 1
#define HAVE_LOCALECONV 1
#define HAVE_LCONV_DECIMAL_POINT 1
#define HAVE_LCONV_THOUSANDS_SEP 1
#define HAVE_LONG_DOUBLE 1
#define HAVE_LONG_LONG_INT 1
#define HAVE_UNSIGNED_LONG_LONG_INT 1
#define HAVE_INTMAX_T 1
#define HAVE_UINTMAX_T 1
#define HAVE_UINTPTR_T 1
#define HAVE_PTRDIFF_T 1
#define HAVE_VA_COPY 0
#define HAVE___VA_COPY 0
#else
	#error unknown platform
#endif /* OS_MINOR_VERSION == 1 */
#else
	#error unknown platform
#endif /* OS_MAJOR_VERSION == 5 */
#endif /* defined CYGWIN */

#endif /* ifndef WOLF_SYS_H */