]>
Commit | Line | Data |
---|---|---|
320054e8 DG |
1 | #ifndef _UNISTD_H |
2 | #define _UNISTD_H | |
3 | ||
4 | #ifdef __cplusplus | |
5 | extern "C" { | |
6 | #endif | |
7 | ||
8 | #include <features.h> | |
9 | ||
10 | #define STDIN_FILENO 0 | |
11 | #define STDOUT_FILENO 1 | |
12 | #define STDERR_FILENO 2 | |
13 | ||
e5f14be3 | 14 | #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
320054e8 DG |
15 | #define SEEK_SET 0 |
16 | #define SEEK_CUR 1 | |
17 | #define SEEK_END 2 | |
5d8a1409 DG |
18 | #define SEEK_DATA 3 |
19 | #define SEEK_HOLE 4 | |
320054e8 DG |
20 | #else |
21 | #include <__header_unistd.h> | |
22 | #endif | |
23 | ||
e5f14be3 | 24 | #ifdef __wasilibc_unmodified_upstream /* Use the compiler's definition of NULL */ |
5d8a1409 DG |
25 | #if __cplusplus >= 201103L |
26 | #define NULL nullptr | |
27 | #elif defined(__cplusplus) | |
320054e8 DG |
28 | #define NULL 0L |
29 | #else | |
30 | #define NULL ((void*)0) | |
31 | #endif | |
32 | #else | |
33 | #define __need_NULL | |
34 | #include <stddef.h> | |
35 | #endif | |
36 | ||
37 | #define __NEED_size_t | |
38 | #define __NEED_ssize_t | |
39 | #define __NEED_uid_t | |
40 | #define __NEED_gid_t | |
41 | #define __NEED_off_t | |
42 | #define __NEED_pid_t | |
43 | #define __NEED_intptr_t | |
44 | #define __NEED_useconds_t | |
45 | ||
46 | #include <bits/alltypes.h> | |
47 | ||
e5f14be3 | 48 | #ifdef __wasilibc_unmodified_upstream /* WASI has no pipe */ |
320054e8 DG |
49 | int pipe(int [2]); |
50 | int pipe2(int [2], int); | |
51 | #endif | |
52 | int close(int); | |
53 | int posix_close(int, int); | |
e5f14be3 | 54 | #ifdef __wasilibc_unmodified_upstream /* WASI has no dup */ |
320054e8 DG |
55 | int dup(int); |
56 | int dup2(int, int); | |
57 | int dup3(int, int, int); | |
58 | #endif | |
59 | off_t lseek(int, off_t, int); | |
cf366c06 DG |
60 | #ifdef __wasilibc_unmodified_upstream /* Optimize the readonly case of lseek */ |
61 | #else | |
7d2354e7 DG |
62 | off_t __wasilibc_tell(int); |
63 | ||
64 | #ifndef __cplusplus | |
cf366c06 DG |
65 | /* |
66 | * Optimize lseek in the case where it's just returning the current offset. | |
67 | * This avoids importing `__wasi_fd_seek` altogether in many common cases. | |
7d2354e7 DG |
68 | * |
69 | * But don't do this for C++ because a simple macro wouldn't handle namespaces | |
70 | * correctly: | |
71 | * - User code could qualify the `lseek` call with `::`. | |
72 | * - There may be another `lseek` in scope from a `using` declaration. | |
cf366c06 | 73 | */ |
cf366c06 DG |
74 | #define lseek(fd, offset, whence) \ |
75 | ({ \ | |
76 | off_t __f = (fd); \ | |
77 | off_t __o = (offset); \ | |
78 | off_t __w = (whence); \ | |
79 | __builtin_constant_p((offset)) && \ | |
80 | __builtin_constant_p((whence)) && \ | |
81 | __o == 0 && \ | |
82 | __w == SEEK_CUR \ | |
83 | ? __wasilibc_tell(__f) \ | |
84 | : lseek(__f, __o, __w); \ | |
85 | }) | |
86 | #endif | |
7d2354e7 | 87 | #endif |
320054e8 DG |
88 | int fsync(int); |
89 | int fdatasync(int); | |
90 | ||
91 | ssize_t read(int, void *, size_t); | |
92 | ssize_t write(int, const void *, size_t); | |
93 | ssize_t pread(int, void *, size_t, off_t); | |
94 | ssize_t pwrite(int, const void *, size_t, off_t); | |
95 | ||
e5f14be3 | 96 | #ifdef __wasilibc_unmodified_upstream /* WASI has no chown */ |
320054e8 DG |
97 | int chown(const char *, uid_t, gid_t); |
98 | int fchown(int, uid_t, gid_t); | |
99 | int lchown(const char *, uid_t, gid_t); | |
100 | int fchownat(int, const char *, uid_t, gid_t, int); | |
101 | #endif | |
102 | ||
103 | int link(const char *, const char *); | |
104 | int linkat(int, const char *, int, const char *, int); | |
105 | int symlink(const char *, const char *); | |
106 | int symlinkat(const char *, int, const char *); | |
107 | ssize_t readlink(const char *__restrict, char *__restrict, size_t); | |
108 | ssize_t readlinkat(int, const char *__restrict, char *__restrict, size_t); | |
109 | int unlink(const char *); | |
110 | int unlinkat(int, const char *, int); | |
111 | int rmdir(const char *); | |
112 | int truncate(const char *, off_t); | |
113 | int ftruncate(int, off_t); | |
114 | ||
e5f14be3 | 115 | #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
320054e8 DG |
116 | #define F_OK 0 |
117 | #define R_OK 4 | |
118 | #define W_OK 2 | |
119 | #define X_OK 1 | |
120 | #endif | |
121 | ||
122 | int access(const char *, int); | |
123 | int faccessat(int, const char *, int, int); | |
124 | ||
5b148b61 | 125 | #ifdef __wasilibc_unmodified_upstream /* WASI has no fchdir */ |
320054e8 | 126 | int fchdir(int); |
320054e8 | 127 | #endif |
5b148b61 AC |
128 | int chdir(const char *); |
129 | char *getcwd(char *, size_t); | |
320054e8 | 130 | |
e5f14be3 | 131 | #ifdef __wasilibc_unmodified_upstream /* WASI has no signals */ |
320054e8 DG |
132 | unsigned alarm(unsigned); |
133 | #endif | |
134 | unsigned sleep(unsigned); | |
5a7ba74c | 135 | #ifdef __wasilibc_unmodified_upstream /* WASI has no pause */ |
320054e8 | 136 | int pause(void); |
5a7ba74c | 137 | #endif |
320054e8 | 138 | |
e5f14be3 | 139 | #ifdef __wasilibc_unmodified_upstream /* WASI has no fork/exec */ |
320054e8 | 140 | pid_t fork(void); |
322bd4ff | 141 | pid_t _Fork(void); |
320054e8 DG |
142 | int execve(const char *, char *const [], char *const []); |
143 | int execv(const char *, char *const []); | |
144 | int execle(const char *, const char *, ...); | |
145 | int execl(const char *, const char *, ...); | |
146 | int execvp(const char *, char *const []); | |
147 | int execlp(const char *, const char *, ...); | |
148 | int fexecve(int, char *const [], char *const []); | |
149 | #endif | |
150 | _Noreturn void _exit(int); | |
151 | ||
659ff414 DG |
152 | #if defined(__wasilibc_unmodified_upstream) || defined(_WASI_EMULATED_GETPID) |
153 | pid_t getpid(void); | |
154 | #else | |
155 | __attribute__((__deprecated__( | |
156 | "WASI lacks process identifiers; to enable emulation of the `getpid` function using " | |
157 | "a placeholder value, which doesn't reflect the host PID of the program, " | |
158 | "compile with -D_WASI_EMULATED_GETPID and link with -lwasi-emulated-getpid" | |
159 | ))) | |
320054e8 | 160 | pid_t getpid(void); |
659ff414 DG |
161 | #endif |
162 | #ifdef __wasilibc_unmodified_upstream /* WASI has no getpid etc. */ | |
320054e8 DG |
163 | pid_t getppid(void); |
164 | pid_t getpgrp(void); | |
165 | pid_t getpgid(pid_t); | |
166 | int setpgid(pid_t, pid_t); | |
167 | pid_t setsid(void); | |
168 | pid_t getsid(pid_t); | |
169 | #endif | |
e5f14be3 | 170 | #ifdef __wasilibc_unmodified_upstream /* WASI has no ttyname */ |
320054e8 DG |
171 | char *ttyname(int); |
172 | int ttyname_r(int, char *, size_t); | |
173 | #endif | |
174 | int isatty(int); | |
e5f14be3 | 175 | #ifdef __wasilibc_unmodified_upstream /* WASI has no process groups */ |
320054e8 DG |
176 | pid_t tcgetpgrp(int); |
177 | int tcsetpgrp(int, pid_t); | |
178 | #endif | |
179 | ||
e5f14be3 | 180 | #ifdef __wasilibc_unmodified_upstream /* WASI has no getuid etc. */ |
320054e8 DG |
181 | uid_t getuid(void); |
182 | uid_t geteuid(void); | |
183 | gid_t getgid(void); | |
184 | gid_t getegid(void); | |
185 | int getgroups(int, gid_t []); | |
186 | int setuid(uid_t); | |
187 | int seteuid(uid_t); | |
188 | int setgid(gid_t); | |
189 | int setegid(gid_t); | |
190 | #endif | |
191 | ||
192 | char *getlogin(void); | |
193 | int getlogin_r(char *, size_t); | |
194 | int gethostname(char *, size_t); | |
195 | char *ctermid(char *); | |
196 | ||
197 | int getopt(int, char * const [], const char *); | |
198 | extern char *optarg; | |
199 | extern int optind, opterr, optopt; | |
200 | ||
201 | long pathconf(const char *, int); | |
202 | long fpathconf(int, int); | |
203 | long sysconf(int); | |
204 | size_t confstr(int, char *, size_t); | |
205 | ||
206 | #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | |
207 | #define F_ULOCK 0 | |
208 | #define F_LOCK 1 | |
209 | #define F_TLOCK 2 | |
210 | #define F_TEST 3 | |
e5f14be3 | 211 | #ifdef __wasilibc_unmodified_upstream /* WASI has no setreuid */ |
320054e8 DG |
212 | int setreuid(uid_t, uid_t); |
213 | int setregid(gid_t, gid_t); | |
214 | #endif | |
e5f14be3 | 215 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX file locking */ |
320054e8 DG |
216 | int lockf(int, int, off_t); |
217 | #endif | |
218 | long gethostid(void); | |
e5f14be3 | 219 | #ifdef __wasilibc_unmodified_upstream /* WASI has no nice, sync, or setpgrp */ |
320054e8 DG |
220 | int nice(int); |
221 | void sync(void); | |
222 | pid_t setpgrp(void); | |
223 | #endif | |
224 | char *crypt(const char *, const char *); | |
225 | void encrypt(char *, int); | |
226 | void swab(const void *__restrict, void *__restrict, ssize_t); | |
227 | #endif | |
228 | ||
229 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \ | |
230 | || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) | |
231 | int usleep(unsigned); | |
232 | unsigned ualarm(unsigned, unsigned); | |
233 | #endif | |
234 | ||
235 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | |
236 | #define L_SET 0 | |
237 | #define L_INCR 1 | |
238 | #define L_XTND 2 | |
e5f14be3 | 239 | #ifdef __wasilibc_unmodified_upstream /* WASI has no brk */ |
320054e8 DG |
240 | int brk(void *); |
241 | #endif | |
242 | void *sbrk(intptr_t); | |
e5f14be3 | 243 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
320054e8 DG |
244 | pid_t vfork(void); |
245 | int vhangup(void); | |
246 | int chroot(const char *); | |
e066a8b9 | 247 | #endif |
320054e8 | 248 | int getpagesize(void); |
e066a8b9 | 249 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
320054e8 DG |
250 | int getdtablesize(void); |
251 | int sethostname(const char *, size_t); | |
252 | int getdomainname(char *, size_t); | |
253 | int setdomainname(const char *, size_t); | |
254 | int setgroups(size_t, const gid_t *); | |
255 | char *getpass(const char *); | |
256 | int daemon(int, int); | |
257 | void setusershell(void); | |
258 | void endusershell(void); | |
259 | char *getusershell(void); | |
260 | int acct(const char *); | |
261 | long syscall(long, ...); | |
262 | int execvpe(const char *, char *const [], char *const []); | |
263 | int issetugid(void); | |
264 | #endif | |
265 | int getentropy(void *, size_t); | |
79a9b408 | 266 | extern int optreset; |
320054e8 DG |
267 | #endif |
268 | ||
269 | #ifdef _GNU_SOURCE | |
270 | extern char **environ; | |
e5f14be3 | 271 | #ifdef __wasilibc_unmodified_upstream /* WASI has no get/setresuid */ |
320054e8 DG |
272 | int setresuid(uid_t, uid_t, uid_t); |
273 | int setresgid(gid_t, gid_t, gid_t); | |
274 | int getresuid(uid_t *, uid_t *, uid_t *); | |
275 | int getresgid(gid_t *, gid_t *, gid_t *); | |
276 | #endif | |
e5f14be3 | 277 | #ifdef __wasilibc_unmodified_upstream /* WASI has no cwd */ |
320054e8 DG |
278 | char *get_current_dir_name(void); |
279 | #endif | |
e5f14be3 | 280 | #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */ |
320054e8 DG |
281 | int syncfs(int); |
282 | #endif | |
e5f14be3 | 283 | #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */ |
320054e8 DG |
284 | int euidaccess(const char *, int); |
285 | int eaccess(const char *, int); | |
79a9b408 | 286 | ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); |
322bd4ff | 287 | pid_t gettid(void); |
320054e8 DG |
288 | #endif |
289 | #endif | |
290 | ||
291 | #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) | |
292 | #define lseek64 lseek | |
293 | #define pread64 pread | |
294 | #define pwrite64 pwrite | |
9f0d8e85 | 295 | #ifdef __wasilibc_unmodified_upstream /* WASI has no truncate */ |
320054e8 | 296 | #define truncate64 truncate |
9f0d8e85 | 297 | #endif |
320054e8 | 298 | #define ftruncate64 ftruncate |
9f0d8e85 | 299 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX file locking */ |
320054e8 | 300 | #define lockf64 lockf |
9f0d8e85 | 301 | #endif |
320054e8 DG |
302 | #define off64_t off_t |
303 | #endif | |
304 | ||
305 | #define POSIX_CLOSE_RESTART 0 | |
306 | ||
307 | #define _XOPEN_VERSION 700 | |
308 | #define _XOPEN_UNIX 1 | |
309 | #define _XOPEN_ENH_I18N 1 | |
310 | ||
311 | #define _POSIX_VERSION 200809L | |
312 | #define _POSIX2_VERSION _POSIX_VERSION | |
313 | ||
314 | #define _POSIX_ADVISORY_INFO _POSIX_VERSION | |
315 | #define _POSIX_CHOWN_RESTRICTED 1 | |
316 | #define _POSIX_IPV6 _POSIX_VERSION | |
e5f14be3 | 317 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes, mmap, or mq */ |
320054e8 DG |
318 | #define _POSIX_JOB_CONTROL 1 |
319 | #define _POSIX_MAPPED_FILES _POSIX_VERSION | |
320 | #define _POSIX_MEMLOCK _POSIX_VERSION | |
321 | #define _POSIX_MEMLOCK_RANGE _POSIX_VERSION | |
322 | #define _POSIX_MEMORY_PROTECTION _POSIX_VERSION | |
323 | #define _POSIX_MESSAGE_PASSING _POSIX_VERSION | |
324 | #endif | |
325 | #define _POSIX_FSYNC _POSIX_VERSION | |
326 | #define _POSIX_NO_TRUNC 1 | |
e5f14be3 | 327 | #ifdef __wasilibc_unmodified_upstream /* WASI has no raw sockets */ |
320054e8 DG |
328 | #define _POSIX_RAW_SOCKETS _POSIX_VERSION |
329 | #endif | |
330 | #define _POSIX_REALTIME_SIGNALS _POSIX_VERSION | |
331 | #define _POSIX_REGEXP 1 | |
e5f14be3 | 332 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
320054e8 DG |
333 | #define _POSIX_SAVED_IDS 1 |
334 | #define _POSIX_SHELL 1 | |
335 | #define _POSIX_SPAWN _POSIX_VERSION | |
336 | #endif | |
337 | #define _POSIX_VDISABLE 0 | |
338 | ||
3df5dae4 | 339 | #if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT) |
320054e8 | 340 | #define _POSIX_THREADS _POSIX_VERSION |
3df5dae4 | 341 | #endif |
320054e8 DG |
342 | #define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION |
343 | #define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION | |
344 | #define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION | |
345 | #define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION | |
346 | #define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION | |
347 | #define _POSIX_THREAD_CPUTIME _POSIX_VERSION | |
348 | #define _POSIX_TIMERS _POSIX_VERSION | |
349 | #define _POSIX_TIMEOUTS _POSIX_VERSION | |
350 | #define _POSIX_MONOTONIC_CLOCK _POSIX_VERSION | |
351 | #define _POSIX_CPUTIME _POSIX_VERSION | |
352 | #define _POSIX_CLOCK_SELECTION _POSIX_VERSION | |
353 | #define _POSIX_BARRIERS _POSIX_VERSION | |
354 | #define _POSIX_SPIN_LOCKS _POSIX_VERSION | |
355 | #define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION | |
e5f14be3 | 356 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX async I/O, semaphores, or shared memory */ |
320054e8 DG |
357 | #define _POSIX_ASYNCHRONOUS_IO _POSIX_VERSION |
358 | #define _POSIX_SEMAPHORES _POSIX_VERSION | |
359 | #define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION | |
360 | #endif | |
361 | ||
362 | #define _POSIX2_C_BIND _POSIX_VERSION | |
363 | ||
364 | #include <bits/posix.h> | |
365 | ||
366 | ||
367 | ||
368 | #define _PC_LINK_MAX 0 | |
369 | #define _PC_MAX_CANON 1 | |
370 | #define _PC_MAX_INPUT 2 | |
371 | #define _PC_NAME_MAX 3 | |
372 | #define _PC_PATH_MAX 4 | |
373 | #define _PC_PIPE_BUF 5 | |
374 | #define _PC_CHOWN_RESTRICTED 6 | |
375 | #define _PC_NO_TRUNC 7 | |
376 | #define _PC_VDISABLE 8 | |
377 | #define _PC_SYNC_IO 9 | |
378 | #define _PC_ASYNC_IO 10 | |
379 | #define _PC_PRIO_IO 11 | |
380 | #define _PC_SOCK_MAXBUF 12 | |
381 | #define _PC_FILESIZEBITS 13 | |
382 | #define _PC_REC_INCR_XFER_SIZE 14 | |
383 | #define _PC_REC_MAX_XFER_SIZE 15 | |
384 | #define _PC_REC_MIN_XFER_SIZE 16 | |
385 | #define _PC_REC_XFER_ALIGN 17 | |
386 | #define _PC_ALLOC_SIZE_MIN 18 | |
387 | #define _PC_SYMLINK_MAX 19 | |
388 | #define _PC_2_SYMLINKS 20 | |
389 | ||
390 | #define _SC_ARG_MAX 0 | |
391 | #define _SC_CHILD_MAX 1 | |
392 | #define _SC_CLK_TCK 2 | |
393 | #define _SC_NGROUPS_MAX 3 | |
394 | #define _SC_OPEN_MAX 4 | |
395 | #define _SC_STREAM_MAX 5 | |
396 | #define _SC_TZNAME_MAX 6 | |
397 | #define _SC_JOB_CONTROL 7 | |
398 | #define _SC_SAVED_IDS 8 | |
399 | #define _SC_REALTIME_SIGNALS 9 | |
400 | #define _SC_PRIORITY_SCHEDULING 10 | |
401 | #define _SC_TIMERS 11 | |
402 | #define _SC_ASYNCHRONOUS_IO 12 | |
403 | #define _SC_PRIORITIZED_IO 13 | |
404 | #define _SC_SYNCHRONIZED_IO 14 | |
405 | #define _SC_FSYNC 15 | |
406 | #define _SC_MAPPED_FILES 16 | |
407 | #define _SC_MEMLOCK 17 | |
408 | #define _SC_MEMLOCK_RANGE 18 | |
409 | #define _SC_MEMORY_PROTECTION 19 | |
410 | #define _SC_MESSAGE_PASSING 20 | |
411 | #define _SC_SEMAPHORES 21 | |
412 | #define _SC_SHARED_MEMORY_OBJECTS 22 | |
413 | #define _SC_AIO_LISTIO_MAX 23 | |
414 | #define _SC_AIO_MAX 24 | |
415 | #define _SC_AIO_PRIO_DELTA_MAX 25 | |
416 | #define _SC_DELAYTIMER_MAX 26 | |
417 | #define _SC_MQ_OPEN_MAX 27 | |
418 | #define _SC_MQ_PRIO_MAX 28 | |
419 | #define _SC_VERSION 29 | |
420 | #define _SC_PAGE_SIZE 30 | |
421 | #define _SC_PAGESIZE 30 /* !! */ | |
422 | #define _SC_RTSIG_MAX 31 | |
423 | #define _SC_SEM_NSEMS_MAX 32 | |
424 | #define _SC_SEM_VALUE_MAX 33 | |
425 | #define _SC_SIGQUEUE_MAX 34 | |
426 | #define _SC_TIMER_MAX 35 | |
427 | #define _SC_BC_BASE_MAX 36 | |
428 | #define _SC_BC_DIM_MAX 37 | |
429 | #define _SC_BC_SCALE_MAX 38 | |
430 | #define _SC_BC_STRING_MAX 39 | |
431 | #define _SC_COLL_WEIGHTS_MAX 40 | |
432 | #define _SC_EXPR_NEST_MAX 42 | |
433 | #define _SC_LINE_MAX 43 | |
434 | #define _SC_RE_DUP_MAX 44 | |
435 | #define _SC_2_VERSION 46 | |
436 | #define _SC_2_C_BIND 47 | |
437 | #define _SC_2_C_DEV 48 | |
438 | #define _SC_2_FORT_DEV 49 | |
439 | #define _SC_2_FORT_RUN 50 | |
440 | #define _SC_2_SW_DEV 51 | |
441 | #define _SC_2_LOCALEDEF 52 | |
442 | #define _SC_UIO_MAXIOV 60 /* !! */ | |
443 | #define _SC_IOV_MAX 60 | |
444 | #define _SC_THREADS 67 | |
445 | #define _SC_THREAD_SAFE_FUNCTIONS 68 | |
446 | #define _SC_GETGR_R_SIZE_MAX 69 | |
447 | #define _SC_GETPW_R_SIZE_MAX 70 | |
448 | #define _SC_LOGIN_NAME_MAX 71 | |
449 | #define _SC_TTY_NAME_MAX 72 | |
450 | #define _SC_THREAD_DESTRUCTOR_ITERATIONS 73 | |
451 | #define _SC_THREAD_KEYS_MAX 74 | |
452 | #define _SC_THREAD_STACK_MIN 75 | |
453 | #define _SC_THREAD_THREADS_MAX 76 | |
454 | #define _SC_THREAD_ATTR_STACKADDR 77 | |
455 | #define _SC_THREAD_ATTR_STACKSIZE 78 | |
456 | #define _SC_THREAD_PRIORITY_SCHEDULING 79 | |
457 | #define _SC_THREAD_PRIO_INHERIT 80 | |
458 | #define _SC_THREAD_PRIO_PROTECT 81 | |
459 | #define _SC_THREAD_PROCESS_SHARED 82 | |
460 | #define _SC_NPROCESSORS_CONF 83 | |
461 | #define _SC_NPROCESSORS_ONLN 84 | |
462 | #define _SC_PHYS_PAGES 85 | |
463 | #define _SC_AVPHYS_PAGES 86 | |
464 | #define _SC_ATEXIT_MAX 87 | |
465 | #define _SC_PASS_MAX 88 | |
466 | #define _SC_XOPEN_VERSION 89 | |
467 | #define _SC_XOPEN_XCU_VERSION 90 | |
468 | #define _SC_XOPEN_UNIX 91 | |
469 | #define _SC_XOPEN_CRYPT 92 | |
470 | #define _SC_XOPEN_ENH_I18N 93 | |
471 | #define _SC_XOPEN_SHM 94 | |
472 | #define _SC_2_CHAR_TERM 95 | |
473 | #define _SC_2_UPE 97 | |
474 | #define _SC_XOPEN_XPG2 98 | |
475 | #define _SC_XOPEN_XPG3 99 | |
476 | #define _SC_XOPEN_XPG4 100 | |
477 | #define _SC_NZERO 109 | |
478 | #define _SC_XBS5_ILP32_OFF32 125 | |
479 | #define _SC_XBS5_ILP32_OFFBIG 126 | |
480 | #define _SC_XBS5_LP64_OFF64 127 | |
481 | #define _SC_XBS5_LPBIG_OFFBIG 128 | |
482 | #define _SC_XOPEN_LEGACY 129 | |
483 | #define _SC_XOPEN_REALTIME 130 | |
484 | #define _SC_XOPEN_REALTIME_THREADS 131 | |
485 | #define _SC_ADVISORY_INFO 132 | |
486 | #define _SC_BARRIERS 133 | |
487 | #define _SC_CLOCK_SELECTION 137 | |
488 | #define _SC_CPUTIME 138 | |
489 | #define _SC_THREAD_CPUTIME 139 | |
490 | #define _SC_MONOTONIC_CLOCK 149 | |
491 | #define _SC_READER_WRITER_LOCKS 153 | |
492 | #define _SC_SPIN_LOCKS 154 | |
493 | #define _SC_REGEXP 155 | |
494 | #define _SC_SHELL 157 | |
495 | #define _SC_SPAWN 159 | |
496 | #define _SC_SPORADIC_SERVER 160 | |
497 | #define _SC_THREAD_SPORADIC_SERVER 161 | |
498 | #define _SC_TIMEOUTS 164 | |
499 | #define _SC_TYPED_MEMORY_OBJECTS 165 | |
500 | #define _SC_2_PBS 168 | |
501 | #define _SC_2_PBS_ACCOUNTING 169 | |
502 | #define _SC_2_PBS_LOCATE 170 | |
503 | #define _SC_2_PBS_MESSAGE 171 | |
504 | #define _SC_2_PBS_TRACK 172 | |
505 | #define _SC_SYMLOOP_MAX 173 | |
506 | #define _SC_STREAMS 174 | |
507 | #define _SC_2_PBS_CHECKPOINT 175 | |
508 | #define _SC_V6_ILP32_OFF32 176 | |
509 | #define _SC_V6_ILP32_OFFBIG 177 | |
510 | #define _SC_V6_LP64_OFF64 178 | |
511 | #define _SC_V6_LPBIG_OFFBIG 179 | |
512 | #define _SC_HOST_NAME_MAX 180 | |
513 | #define _SC_TRACE 181 | |
514 | #define _SC_TRACE_EVENT_FILTER 182 | |
515 | #define _SC_TRACE_INHERIT 183 | |
516 | #define _SC_TRACE_LOG 184 | |
517 | ||
518 | #define _SC_IPV6 235 | |
519 | #define _SC_RAW_SOCKETS 236 | |
520 | #define _SC_V7_ILP32_OFF32 237 | |
521 | #define _SC_V7_ILP32_OFFBIG 238 | |
522 | #define _SC_V7_LP64_OFF64 239 | |
523 | #define _SC_V7_LPBIG_OFFBIG 240 | |
524 | #define _SC_SS_REPL_MAX 241 | |
525 | #define _SC_TRACE_EVENT_NAME_MAX 242 | |
526 | #define _SC_TRACE_NAME_MAX 243 | |
527 | #define _SC_TRACE_SYS_MAX 244 | |
528 | #define _SC_TRACE_USER_EVENT_MAX 245 | |
529 | #define _SC_XOPEN_STREAMS 246 | |
530 | #define _SC_THREAD_ROBUST_PRIO_INHERIT 247 | |
531 | #define _SC_THREAD_ROBUST_PRIO_PROTECT 248 | |
532 | ||
533 | #define _CS_PATH 0 | |
534 | #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1 | |
535 | #define _CS_GNU_LIBC_VERSION 2 | |
536 | #define _CS_GNU_LIBPTHREAD_VERSION 3 | |
537 | #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS 4 | |
538 | #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 5 | |
539 | ||
540 | #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 1116 | |
541 | #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 1117 | |
542 | #define _CS_POSIX_V6_ILP32_OFF32_LIBS 1118 | |
543 | #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 1119 | |
544 | #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 1120 | |
545 | #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 1121 | |
546 | #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 1122 | |
547 | #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 1123 | |
548 | #define _CS_POSIX_V6_LP64_OFF64_CFLAGS 1124 | |
549 | #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 1125 | |
550 | #define _CS_POSIX_V6_LP64_OFF64_LIBS 1126 | |
551 | #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS 1127 | |
552 | #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 1128 | |
553 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 1129 | |
554 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 1130 | |
555 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 1131 | |
556 | #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1132 | |
557 | #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 1133 | |
558 | #define _CS_POSIX_V7_ILP32_OFF32_LIBS 1134 | |
559 | #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS 1135 | |
560 | #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 1136 | |
561 | #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 1137 | |
562 | #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 1138 | |
563 | #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS 1139 | |
564 | #define _CS_POSIX_V7_LP64_OFF64_CFLAGS 1140 | |
565 | #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 1141 | |
566 | #define _CS_POSIX_V7_LP64_OFF64_LIBS 1142 | |
567 | #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS 1143 | |
568 | #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 1144 | |
569 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145 | |
570 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146 | |
571 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147 | |
572 | #define _CS_V6_ENV 1148 | |
573 | #define _CS_V7_ENV 1149 | |
574 | ||
575 | #ifdef __cplusplus | |
576 | } | |
577 | #endif | |
578 | ||
579 | #endif |