4 #define F(t,n) {t *y = &x.n;}
5 #define C(n) switch(n){case n:;}
6 #define A(n) {char p[n];}
9 A(_POSIX_VERSION
>= 200809L)
10 A(_POSIX2_VERSION
>= 200809L)
12 A(_XOPEN_VERSION
>= 700)
13 // A(_XOPEN_CRYPT >= 0)
14 A(_XOPEN_ENH_I18N
> 0)
15 // A(_XOPEN_REALTIME >= 0)
16 // A(_XOPEN_REALTIME_THREADS >= 0)
20 A(_POSIX_ASYNCHRONOUS_IO
>= 200809L)
21 A(_POSIX_BARRIERS
>= 200809L)
22 A(_POSIX_CHOWN_RESTRICTED
>= 0)
23 A(_POSIX_CLOCK_SELECTION
>= 200809L)
24 A(_POSIX_JOB_CONTROL
> 0)
25 A(_POSIX_MAPPED_FILES
>= 200809L)
26 A(_POSIX_MEMORY_PROTECTION
>= 200809L)
27 A(_POSIX_NO_TRUNC
>= 0)
28 A(_POSIX_READER_WRITER_LOCKS
>= 200809L)
29 A(_POSIX_REALTIME_SIGNALS
>= 200809L)
31 A(_POSIX_SAVED_IDS
> 0)
32 A(_POSIX_SEMAPHORES
>= 200809L)
34 A(_POSIX_SPIN_LOCKS
>= 200809L)
35 A(_POSIX_THREAD_SAFE_FUNCTIONS
>= 200809L)
36 A(_POSIX_THREADS
>= 200809L)
37 A(_POSIX_TIMEOUTS
>= 200809L)
38 A(_POSIX_TIMERS
>= 200809L)
39 #if _POSIX_V7_ILP32_OFFBIG<=0 && _POSIX_V7_LP64_OFF64<=0 && _POSIX_V7_LPBIG_OFFBIG<=0
40 #error _POSIX_V7_ILP32_OFFBIG<=0 && _POSIX_V7_LP64_OFF64<=0 && _POSIX_V7_LPBIG_OFFBIG<=0
42 A(_POSIX2_C_BIND
>= 200809L)
43 // not required by the standard
44 A(_POSIX_ADVISORY_INFO
>= 0)
45 A(_POSIX_CPUTIME
>= 0)
48 A(_POSIX_MEMLOCK
>= 0)
49 A(_POSIX_MEMLOCK_RANGE
>= 0)
50 A(_POSIX_MESSAGE_PASSING
>= 0)
51 A(_POSIX_MONOTONIC_CLOCK
>= 0)
52 // A(_POSIX_PRIORITIZED_IO >= 0)
53 // A(_POSIX_PRIORITY_SCHEDULING >= 0)
54 A(_POSIX_RAW_SOCKETS
>= 0)
55 // A(_POSIX_SHARED_MEMORY_OBJECTS >= 0)
57 // A(_POSIX_SPORADIC_SERVER >= 0)
58 // A(_POSIX_SYNCHRONIZED_IO >= 0)
59 A(_POSIX_THREAD_ATTR_STACKADDR
>= 0)
60 A(_POSIX_THREAD_ATTR_STACKSIZE
>= 0)
61 A(_POSIX_THREAD_CPUTIME
>= 0)
62 // A(_POSIX_THREAD_PRIO_INHERIT >= 0)
63 // A(_POSIX_THREAD_PRIO_PROTECT >= 0)
64 A(_POSIX_THREAD_PRIORITY_SCHEDULING
>= 0)
65 A(_POSIX_THREAD_PROCESS_SHARED
>= 0)
66 // A(_POSIX_THREAD_ROBUST_PRIO_INHERIT >= 0)
67 // A(_POSIX_THREAD_ROBUST_PRIO_PROTECT >= 0)
68 // A(_POSIX_THREAD_SPORADIC_SERVER >= 0)
69 // A(_POSIX_TYPED_MEMORY_OBJECTS >= 0)
75 C(_CS_POSIX_V7_ILP32_OFF32_CFLAGS
)
76 C(_CS_POSIX_V7_ILP32_OFF32_LDFLAGS
)
77 C(_CS_POSIX_V7_ILP32_OFF32_LIBS
)
78 C(_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
)
79 C(_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
)
80 C(_CS_POSIX_V7_ILP32_OFFBIG_LIBS
)
81 C(_CS_POSIX_V7_LP64_OFF64_CFLAGS
)
82 C(_CS_POSIX_V7_LP64_OFF64_LDFLAGS
)
83 C(_CS_POSIX_V7_LP64_OFF64_LIBS
)
84 C(_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
)
85 C(_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
)
86 C(_CS_POSIX_V7_LPBIG_OFFBIG_LIBS
)
87 C(_CS_POSIX_V7_THREADS_CFLAGS
)
88 C(_CS_POSIX_V7_THREADS_LDFLAGS
)
89 C(_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
)
101 C(_PC_CHOWN_RESTRICTED
)
111 C(_PC_REC_INCR_XFER_SIZE
)
112 C(_PC_REC_MAX_XFER_SIZE
)
113 C(_PC_REC_MIN_XFER_SIZE
)
114 C(_PC_REC_XFER_ALIGN
)
117 C(_PC_TIMESTAMP_RESOLUTION
)
126 C(_SC_2_PBS_ACCOUNTING
)
127 C(_SC_2_PBS_CHECKPOINT
)
135 C(_SC_AIO_LISTIO_MAX
)
137 C(_SC_AIO_PRIO_DELTA_MAX
)
139 C(_SC_ASYNCHRONOUS_IO
)
148 C(_SC_CLOCK_SELECTION
)
149 C(_SC_COLL_WEIGHTS_MAX
)
151 C(_SC_DELAYTIMER_MAX
)
154 C(_SC_GETGR_R_SIZE_MAX
)
155 C(_SC_GETPW_R_SIZE_MAX
)
161 C(_SC_LOGIN_NAME_MAX
)
165 C(_SC_MEMORY_PROTECTION
)
166 C(_SC_MESSAGE_PASSING
)
167 C(_SC_MONOTONIC_CLOCK
)
174 C(_SC_PRIORITIZED_IO
)
175 C(_SC_PRIORITY_SCHEDULING
)
178 C(_SC_READER_WRITER_LOCKS
)
179 C(_SC_REALTIME_SIGNALS
)
186 C(_SC_SHARED_MEMORY_OBJECTS
)
191 C(_SC_SPORADIC_SERVER
)
195 C(_SC_SYNCHRONIZED_IO
)
196 C(_SC_THREAD_ATTR_STACKADDR
)
197 C(_SC_THREAD_ATTR_STACKSIZE
)
198 C(_SC_THREAD_CPUTIME
)
199 C(_SC_THREAD_DESTRUCTOR_ITERATIONS
)
200 C(_SC_THREAD_KEYS_MAX
)
201 C(_SC_THREAD_PRIO_INHERIT
)
202 C(_SC_THREAD_PRIO_PROTECT
)
203 C(_SC_THREAD_PRIORITY_SCHEDULING
)
204 C(_SC_THREAD_PROCESS_SHARED
)
205 C(_SC_THREAD_ROBUST_PRIO_INHERIT
)
206 C(_SC_THREAD_ROBUST_PRIO_PROTECT
)
207 C(_SC_THREAD_SAFE_FUNCTIONS
)
208 C(_SC_THREAD_SPORADIC_SERVER
)
209 C(_SC_THREAD_STACK_MIN
)
210 C(_SC_THREAD_THREADS_MAX
)
216 C(_SC_TRACE_EVENT_FILTER
)
217 C(_SC_TRACE_EVENT_NAME_MAX
)
220 C(_SC_TRACE_NAME_MAX
)
222 C(_SC_TRACE_USER_EVENT_MAX
)
224 C(_SC_TYPED_MEMORY_OBJECTS
)
226 C(_SC_V7_ILP32_OFF32
)
227 C(_SC_V7_ILP32_OFFBIG
)
229 C(_SC_V7_LPBIG_OFFBIG
)
232 C(_SC_XOPEN_ENH_I18N
)
233 C(_SC_XOPEN_REALTIME
)
234 C(_SC_XOPEN_REALTIME_THREADS
)
251 {void(*p
)(int) = _exit
;}
252 {int(*p
)(const char*,int) = access
;}
253 {unsigned(*p
)(unsigned) = alarm
;}
254 {int(*p
)(const char*) = chdir
;}
255 {int(*p
)(const char*,uid_t
,gid_t
) = chown
;}
256 {int(*p
)(int) = close
;}
257 {size_t(*p
)(int,char*,size_t) = confstr
;}
258 {int(*p
)(int) = dup
;}
259 {int(*p
)(int,int) = dup2
;}
260 {extern char **environ
; char **x
= environ
;};
261 {int(*p
)(const char*,const char*,...) = execl
;}
262 {int(*p
)(const char*,const char*,...) = execle
;}
263 {int(*p
)(const char*,const char*,...) = execlp
;}
264 {int(*p
)(const char*,char*const[]) = execv
;}
265 {int(*p
)(const char*,char*const[],char*const[]) = execve
;}
266 {int(*p
)(const char*,char*const[]) = execvp
;}
267 {int(*p
)(int,const char*,int,int) = faccessat
;}
268 {int(*p
)(int) = fchdir
;}
269 {int(*p
)(int,uid_t
,gid_t
) = fchown
;}
270 {int(*p
)(int,const char*,uid_t
,gid_t
,int) = fchownat
;}
271 #ifdef POSIX_SYNCHRONIZED_IO
272 {int(*p
)(int) = fdatasync
;}
274 {int(*p
)(int,char*const[],char*const[]) = fexecve
;}
275 {pid_t(*p
)(void) = fork
;}
276 {long(*p
)(int,int) = fpathconf
;}
277 {int(*p
)(int) = fsync
;}
278 {int(*p
)(int,off_t
) = ftruncate
;}
279 {char*(*p
)(char*,size_t) = getcwd
;}
280 {gid_t(*p
)(void) = getegid
;}
281 {uid_t(*p
)(void) = geteuid
;}
282 {gid_t(*p
)(void) = getgid
;}
283 {int(*p
)(int,gid_t
[]) = getgroups
;}
284 {int(*p
)(char*,size_t) = gethostname
;}
285 {char*(*p
)(void) = getlogin
;}
286 {int(*p
)(char*,size_t) = getlogin_r
;}
287 {int(*p
)(int,char*const[],const char*) = getopt
;}
288 {pid_t(*p
)(pid_t
) = getpgid
;}
289 {pid_t(*p
)(void) = getpgrp
;}
290 {pid_t(*p
)(void) = getpid
;}
291 {pid_t(*p
)(void) = getppid
;}
292 {pid_t(*p
)(pid_t
) = getsid
;}
293 {uid_t(*p
)(void) = getuid
;}
294 {int(*p
)(int) = isatty
;}
295 {int(*p
)(const char*,uid_t
,gid_t
) = lchown
;}
296 {int(*p
)(const char*,const char*) = link
;}
297 {int(*p
)(int,const char*,int,const char*,int) = linkat
;}
298 {off_t(*p
)(int,off_t
,int) = lseek
;}
303 {long(*p
)(const char*,int) = pathconf
;}
304 {int(*p
)(void) = pause
;}
305 {int(*p
)(int[]) = pipe
;}
306 {ssize_t(*p
)(int,void*,size_t,off_t
) = pread
;}
307 {ssize_t(*p
)(int,const void*,size_t,off_t
) = pwrite
;}
308 {ssize_t(*p
)(int,void*,size_t) = read
;}
309 {ssize_t(*p
)(const char*restrict
,char*restrict
,size_t) = readlink
;}
310 {ssize_t(*p
)(int,const char*restrict
,char*restrict
,size_t) = readlinkat
;}
311 {int(*p
)(const char*) = rmdir
;}
312 {int(*p
)(gid_t
) = setegid
;}
313 {int(*p
)(uid_t
) = seteuid
;}
314 {int(*p
)(gid_t
) = setgid
;}
315 {int(*p
)(pid_t
,pid_t
) = setpgid
;}
316 {pid_t(*p
)(void) = setsid
;}
317 {int(*p
)(uid_t
) = setuid
;}
318 {unsigned(*p
)(unsigned) = sleep
;}
319 {int(*p
)(const char*,const char*) = symlink
;}
320 {int(*p
)(const char*,int,const char*) = symlinkat
;}
321 {long(*p
)(int) = sysconf
;}
322 {pid_t(*p
)(int) = tcgetpgrp
;}
323 {int(*p
)(int,pid_t
) = tcsetpgrp
;}
324 {int(*p
)(const char*,off_t
) = truncate
;}
325 {char*(*p
)(int) = ttyname
;}
326 {int(*p
)(int,char*,size_t) = ttyname_r
;}
327 {int(*p
)(const char*) = unlink
;}
328 {int(*p
)(int,const char*,int) = unlinkat
;}
329 {ssize_t(*p
)(int,const void*,size_t) = write
;}
331 {char*(*p
)(const char*,const char*) = crypt
;}
332 {void(*p
)(char[],int) = encrypt
;}
333 {long(*p
)(void) = gethostid
;}
334 {int(*p
)(int,int,off_t
) = lockf
;}
335 {int(*p
)(int) = nice
;}
336 {int(*p
)(gid_t
,gid_t
) = setregid
;}
337 {int(*p
)(uid_t
,uid_t
) = setreuid
;}
338 {void(*p
)(const void*restrict
,void*restrict
,ssize_t
) = swab
;}
339 {void(*p
)(void) = sync
;}