xref: /titanic_50/usr/src/lib/libast/common/features/standards (revision 694c35faa87b858ecdadfe4fc592615f4eefbb07)
1set stdio
2if tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
3		#define _ALL_SOURCE	1
4		#define _ISOC99_SOURCE	1
5		#define _POSIX_SOURCE	1
6		#define _POSIX_C_SOURCE	21000101L
7		#define _XOPEN_SOURCE	9900
8		#define _GNU_SOURCE	1
9		#define __EXTENSIONS__	1
10		#include <sys/types.h>
11		#include <sys/stat.h>
12		#include <stdlib.h>
13		#include <unistd.h>
14	}end {
15		#ifndef _ALL_SOURCE
16		#define _ALL_SOURCE	1
17		#endif
18		#ifndef _ISOC99_SOURCE
19		#define _ISOC99_SOURCE	1
20		#endif
21		#ifndef _POSIX_SOURCE
22		#define _POSIX_SOURCE	1
23		#endif
24		#ifndef _POSIX_C_SOURCE
25		#define _POSIX_C_SOURCE	21000101L
26		#endif
27		#ifndef _XOPEN_SOURCE
28		#define _XOPEN_SOURCE	9900
29		#endif
30		#ifndef _GNU_SOURCE
31		#define _GNU_SOURCE	1
32		#endif
33		#ifndef __EXTENSIONS__
34		#define __EXTENSIONS__	1
35		#endif
36	}
37elif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
38		#define _ALL_SOURCE	1
39		#define _ISOC99_SOURCE	1
40		#define _POSIX_SOURCE	1
41		#define _XOPEN_SOURCE	9900
42		#define _GNU_SOURCE	1
43		#define __EXTENSIONS__	1
44		#include <sys/types.h>
45		#include <sys/stat.h>
46		#include <stdlib.h>
47		#include <unistd.h>
48	}end {
49		#ifndef _ALL_SOURCE
50		#define _ALL_SOURCE	1
51		#endif
52		#ifndef _ISOC99_SOURCE
53		#define _ISOC99_SOURCE	1
54		#endif
55		#ifndef _POSIX_SOURCE
56		#define _POSIX_SOURCE	1
57		#endif
58		#ifndef _XOPEN_SOURCE
59		#define _XOPEN_SOURCE	9900
60		#endif
61		#ifndef _GNU_SOURCE
62		#define _GNU_SOURCE	1
63		#endif
64		#ifndef __EXTENSIONS__
65		#define __EXTENSIONS__	1
66		#endif
67	}
68elif tst note{ _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
69		#define _ISOC99_SOURCE	1
70		#define _POSIX_SOURCE	1
71		#define _POSIX_C_SOURCE	21000101L
72		#define _XOPEN_SOURCE	9900
73		#define _GNU_SOURCE	1
74		#define __EXTENSIONS__	1
75		#include <sys/types.h>
76		#include <sys/stat.h>
77		#include <stdlib.h>
78		#include <unistd.h>
79	}end {
80		#ifndef _ISOC99_SOURCE
81		#define _ISOC99_SOURCE	1
82		#endif
83		#ifndef _POSIX_SOURCE
84		#define _POSIX_SOURCE	1
85		#endif
86		#ifndef _POSIX_C_SOURCE
87		#define _POSIX_C_SOURCE	21000101L
88		#endif
89		#ifndef _XOPEN_SOURCE
90		#define _XOPEN_SOURCE	9900
91		#endif
92		#ifndef _GNU_SOURCE
93		#define _GNU_SOURCE	1
94		#endif
95		#ifndef __EXTENSIONS__
96		#define __EXTENSIONS__	1
97		#endif
98	}
99elif tst note{ _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
100		#define _POSIX_SOURCE	1
101		#define _XOPEN_SOURCE	1
102		#define __EXTENSIONS__	1
103		#include <sys/types.h>
104		#include <sys/stat.h>
105		#include <stdlib.h>
106		#include <unistd.h>
107	}end {
108		#ifndef _POSIX_SOURCE
109		#define _POSIX_SOURCE	1
110		#endif
111		#ifndef _XOPEN_SOURCE
112		#define _XOPEN_SOURCE	1
113		#endif
114		#ifndef __EXTENSIONS__
115		#define __EXTENSIONS__	1
116		#endif
117	}
118elif tst note{ _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
119		#define _XOPEN_SOURCE	1
120		#define __EXTENSIONS__	1
121		#include <sys/types.h>
122		#include <sys/stat.h>
123		#include <stdlib.h>
124		#include <unistd.h>
125	}end {
126		#ifndef _XOPEN_SOURCE
127		#define _XOPEN_SOURCE	1
128		#endif
129		#ifndef __EXTENSIONS__
130		#define __EXTENSIONS__	1
131		#endif
132	}
133elif tst note{ _XOPEN_SOURCE works }end compile{
134		#define _XOPEN_SOURCE	1
135		#include <sys/types.h>
136		#include <sys/stat.h>
137		#include <stdlib.h>
138		#include <unistd.h>
139	}end {
140		#ifndef _XOPEN_SOURCE
141		#define _XOPEN_SOURCE	1
142		#endif
143	}
144else tst note{ __EXTENSIONS__ works }end compile{
145		#define __EXTENSIONS__	1
146		#include <sys/types.h>
147		#include <sys/stat.h>
148	}end {
149		#ifndef __EXTENSIONS__
150		#define __EXTENSIONS__	1
151		#endif
152	}
153endif
154