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