| 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 | |
| 14 | #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
| 15 | #define SEEK_SET 0 |
| 16 | #define SEEK_CUR 1 |
| 17 | #define SEEK_END 2 |
| 18 | #define SEEK_DATA 3 |
| 19 | #define SEEK_HOLE 4 |
| 20 | #else |
| 21 | #include <__header_unistd.h> |
| 22 | #endif |
| 23 | |
| 24 | #ifdef __wasilibc_unmodified_upstream /* Use the compiler's definition of NULL */ |
| 25 | #if __cplusplus >= 201103L |
| 26 | #define NULL nullptr |
| 27 | #elif defined(__cplusplus) |
| 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 | |
| 48 | #ifdef __wasilibc_unmodified_upstream /* WASI has no pipe */ |
| 49 | int pipe(int [2]); |
| 50 | int pipe2(int [2], int); |
| 51 | #endif |
| 52 | int close(int); |
| 53 | int posix_close(int, int); |
| 54 | #ifdef __wasilibc_unmodified_upstream /* WASI has no dup */ |
| 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); |
| 60 | #ifdef __wasilibc_unmodified_upstream /* Optimize the readonly case of lseek */ |
| 61 | #else |
| 62 | off_t __wasilibc_tell(int); |
| 63 | |
| 64 | #ifndef __cplusplus |
| 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. |
| 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. |
| 73 | */ |
| 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 |
| 87 | #endif |
| 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 | |
| 96 | #ifdef __wasilibc_unmodified_upstream /* WASI has no chown */ |
| 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 | |
| 115 | #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
| 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 | |
| 125 | #ifdef __wasilibc_unmodified_upstream /* WASI has no fchdir */ |
| 126 | int fchdir(int); |
| 127 | #endif |
| 128 | int chdir(const char *); |
| 129 | char *getcwd(char *, size_t); |
| 130 | |
| 131 | #ifdef __wasilibc_unmodified_upstream /* WASI has no signals */ |
| 132 | unsigned alarm(unsigned); |
| 133 | #endif |
| 134 | unsigned sleep(unsigned); |
| 135 | #ifdef __wasilibc_unmodified_upstream /* WASI has no pause */ |
| 136 | int pause(void); |
| 137 | #endif |
| 138 | |
| 139 | #ifdef __wasilibc_unmodified_upstream /* WASI has no fork/exec */ |
| 140 | pid_t fork(void); |
| 141 | pid_t _Fork(void); |
| 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 | |
| 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 | ))) |
| 160 | pid_t getpid(void); |
| 161 | #endif |
| 162 | #ifdef __wasilibc_unmodified_upstream /* WASI has no getpid etc. */ |
| 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 |
| 170 | #ifdef __wasilibc_unmodified_upstream /* WASI has no ttyname */ |
| 171 | char *ttyname(int); |
| 172 | int ttyname_r(int, char *, size_t); |
| 173 | #endif |
| 174 | int isatty(int); |
| 175 | #ifdef __wasilibc_unmodified_upstream /* WASI has no process groups */ |
| 176 | pid_t tcgetpgrp(int); |
| 177 | int tcsetpgrp(int, pid_t); |
| 178 | #endif |
| 179 | |
| 180 | #ifdef __wasilibc_unmodified_upstream /* WASI has no getuid etc. */ |
| 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 |
| 211 | #ifdef __wasilibc_unmodified_upstream /* WASI has no setreuid */ |
| 212 | int setreuid(uid_t, uid_t); |
| 213 | int setregid(gid_t, gid_t); |
| 214 | #endif |
| 215 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX file locking */ |
| 216 | int lockf(int, int, off_t); |
| 217 | #endif |
| 218 | long gethostid(void); |
| 219 | #ifdef __wasilibc_unmodified_upstream /* WASI has no nice, sync, or setpgrp */ |
| 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 |
| 239 | #ifdef __wasilibc_unmodified_upstream /* WASI has no brk */ |
| 240 | int brk(void *); |
| 241 | #endif |
| 242 | void *sbrk(intptr_t); |
| 243 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
| 244 | pid_t vfork(void); |
| 245 | int vhangup(void); |
| 246 | int chroot(const char *); |
| 247 | #endif |
| 248 | int getpagesize(void); |
| 249 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
| 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); |
| 266 | extern int optreset; |
| 267 | #endif |
| 268 | |
| 269 | #ifdef _GNU_SOURCE |
| 270 | extern char **environ; |
| 271 | #ifdef __wasilibc_unmodified_upstream /* WASI has no get/setresuid */ |
| 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 |
| 277 | #ifdef __wasilibc_unmodified_upstream /* WASI has no cwd */ |
| 278 | char *get_current_dir_name(void); |
| 279 | #endif |
| 280 | #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */ |
| 281 | int syncfs(int); |
| 282 | #endif |
| 283 | #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */ |
| 284 | int euidaccess(const char *, int); |
| 285 | int eaccess(const char *, int); |
| 286 | ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); |
| 287 | pid_t gettid(void); |
| 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 |
| 295 | #ifdef __wasilibc_unmodified_upstream /* WASI has no truncate */ |
| 296 | #define truncate64 truncate |
| 297 | #endif |
| 298 | #define ftruncate64 ftruncate |
| 299 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX file locking */ |
| 300 | #define lockf64 lockf |
| 301 | #endif |
| 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 |
| 317 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes, mmap, or mq */ |
| 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 |
| 327 | #ifdef __wasilibc_unmodified_upstream /* WASI has no raw sockets */ |
| 328 | #define _POSIX_RAW_SOCKETS _POSIX_VERSION |
| 329 | #endif |
| 330 | #define _POSIX_REALTIME_SIGNALS _POSIX_VERSION |
| 331 | #define _POSIX_REGEXP 1 |
| 332 | #ifdef __wasilibc_unmodified_upstream /* WASI has no processes */ |
| 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 | |
| 339 | #if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT) || !defined(_WASI_STRICT_PTHREAD) |
| 340 | #define _POSIX_THREADS _POSIX_VERSION |
| 341 | #define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION |
| 342 | #define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION |
| 343 | #endif |
| 344 | #if defined(__wasilibc_unmodified_upstream) /* wasi-libc doesn't provide pthread_attr_{get,set}stackaddr */ |
| 345 | #define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION |
| 346 | #endif |
| 347 | #if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT) || !defined(_WASI_STRICT_PTHREAD) |
| 348 | #define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION |
| 349 | #endif |
| 350 | #if defined(__wasilibc_unmodified_upstream) /* WASI has no scheduling control, and wasi-libc doesn't provide pthread_getcpuclockid */ |
| 351 | #define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION |
| 352 | #define _POSIX_THREAD_CPUTIME _POSIX_VERSION |
| 353 | #endif |
| 354 | #define _POSIX_TIMERS _POSIX_VERSION |
| 355 | #define _POSIX_TIMEOUTS _POSIX_VERSION |
| 356 | #define _POSIX_MONOTONIC_CLOCK _POSIX_VERSION |
| 357 | #define _POSIX_CPUTIME _POSIX_VERSION |
| 358 | #define _POSIX_CLOCK_SELECTION _POSIX_VERSION |
| 359 | #define _POSIX_BARRIERS _POSIX_VERSION |
| 360 | #define _POSIX_SPIN_LOCKS _POSIX_VERSION |
| 361 | #define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION |
| 362 | #ifdef __wasilibc_unmodified_upstream /* WASI has no POSIX async I/O, semaphores, or shared memory */ |
| 363 | #define _POSIX_ASYNCHRONOUS_IO _POSIX_VERSION |
| 364 | #define _POSIX_SEMAPHORES _POSIX_VERSION |
| 365 | #define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION |
| 366 | #endif |
| 367 | |
| 368 | #define _POSIX2_C_BIND _POSIX_VERSION |
| 369 | |
| 370 | #include <bits/posix.h> |
| 371 | |
| 372 | |
| 373 | |
| 374 | #define _PC_LINK_MAX	0 |
| 375 | #define _PC_MAX_CANON	1 |
| 376 | #define _PC_MAX_INPUT	2 |
| 377 | #define _PC_NAME_MAX	3 |
| 378 | #define _PC_PATH_MAX	4 |
| 379 | #define _PC_PIPE_BUF	5 |
| 380 | #define _PC_CHOWN_RESTRICTED	6 |
| 381 | #define _PC_NO_TRUNC	7 |
| 382 | #define _PC_VDISABLE	8 |
| 383 | #define _PC_SYNC_IO	9 |
| 384 | #define _PC_ASYNC_IO	10 |
| 385 | #define _PC_PRIO_IO	11 |
| 386 | #define _PC_SOCK_MAXBUF	12 |
| 387 | #define _PC_FILESIZEBITS	13 |
| 388 | #define _PC_REC_INCR_XFER_SIZE	14 |
| 389 | #define _PC_REC_MAX_XFER_SIZE	15 |
| 390 | #define _PC_REC_MIN_XFER_SIZE	16 |
| 391 | #define _PC_REC_XFER_ALIGN	17 |
| 392 | #define _PC_ALLOC_SIZE_MIN	18 |
| 393 | #define _PC_SYMLINK_MAX	19 |
| 394 | #define _PC_2_SYMLINKS	20 |
| 395 | |
| 396 | #define _SC_ARG_MAX	0 |
| 397 | #define _SC_CHILD_MAX	1 |
| 398 | #define _SC_CLK_TCK	2 |
| 399 | #define _SC_NGROUPS_MAX	3 |
| 400 | #define _SC_OPEN_MAX	4 |
| 401 | #define _SC_STREAM_MAX	5 |
| 402 | #define _SC_TZNAME_MAX	6 |
| 403 | #define _SC_JOB_CONTROL	7 |
| 404 | #define _SC_SAVED_IDS	8 |
| 405 | #define _SC_REALTIME_SIGNALS	9 |
| 406 | #define _SC_PRIORITY_SCHEDULING	10 |
| 407 | #define _SC_TIMERS	11 |
| 408 | #define _SC_ASYNCHRONOUS_IO	12 |
| 409 | #define _SC_PRIORITIZED_IO	13 |
| 410 | #define _SC_SYNCHRONIZED_IO	14 |
| 411 | #define _SC_FSYNC	15 |
| 412 | #define _SC_MAPPED_FILES	16 |
| 413 | #define _SC_MEMLOCK	17 |
| 414 | #define _SC_MEMLOCK_RANGE	18 |
| 415 | #define _SC_MEMORY_PROTECTION	19 |
| 416 | #define _SC_MESSAGE_PASSING	20 |
| 417 | #define _SC_SEMAPHORES	21 |
| 418 | #define _SC_SHARED_MEMORY_OBJECTS	22 |
| 419 | #define _SC_AIO_LISTIO_MAX	23 |
| 420 | #define _SC_AIO_MAX	24 |
| 421 | #define _SC_AIO_PRIO_DELTA_MAX	25 |
| 422 | #define _SC_DELAYTIMER_MAX	26 |
| 423 | #define _SC_MQ_OPEN_MAX	27 |
| 424 | #define _SC_MQ_PRIO_MAX	28 |
| 425 | #define _SC_VERSION	29 |
| 426 | #define _SC_PAGE_SIZE	30 |
| 427 | #define _SC_PAGESIZE	30 /* !! */ |
| 428 | #define _SC_RTSIG_MAX	31 |
| 429 | #define _SC_SEM_NSEMS_MAX	32 |
| 430 | #define _SC_SEM_VALUE_MAX	33 |
| 431 | #define _SC_SIGQUEUE_MAX	34 |
| 432 | #define _SC_TIMER_MAX	35 |
| 433 | #define _SC_BC_BASE_MAX	36 |
| 434 | #define _SC_BC_DIM_MAX	37 |
| 435 | #define _SC_BC_SCALE_MAX	38 |
| 436 | #define _SC_BC_STRING_MAX	39 |
| 437 | #define _SC_COLL_WEIGHTS_MAX	40 |
| 438 | #define _SC_EXPR_NEST_MAX	42 |
| 439 | #define _SC_LINE_MAX	43 |
| 440 | #define _SC_RE_DUP_MAX	44 |
| 441 | #define _SC_2_VERSION	46 |
| 442 | #define _SC_2_C_BIND	47 |
| 443 | #define _SC_2_C_DEV	48 |
| 444 | #define _SC_2_FORT_DEV	49 |
| 445 | #define _SC_2_FORT_RUN	50 |
| 446 | #define _SC_2_SW_DEV	51 |
| 447 | #define _SC_2_LOCALEDEF	52 |
| 448 | #define _SC_UIO_MAXIOV	60 /* !! */ |
| 449 | #define _SC_IOV_MAX	60 |
| 450 | #define _SC_THREADS	67 |
| 451 | #define _SC_THREAD_SAFE_FUNCTIONS	68 |
| 452 | #define _SC_GETGR_R_SIZE_MAX	69 |
| 453 | #define _SC_GETPW_R_SIZE_MAX	70 |
| 454 | #define _SC_LOGIN_NAME_MAX	71 |
| 455 | #define _SC_TTY_NAME_MAX	72 |
| 456 | #define _SC_THREAD_DESTRUCTOR_ITERATIONS	73 |
| 457 | #define _SC_THREAD_KEYS_MAX	74 |
| 458 | #define _SC_THREAD_STACK_MIN	75 |
| 459 | #define _SC_THREAD_THREADS_MAX	76 |
| 460 | #define _SC_THREAD_ATTR_STACKADDR	77 |
| 461 | #define _SC_THREAD_ATTR_STACKSIZE	78 |
| 462 | #define _SC_THREAD_PRIORITY_SCHEDULING	79 |
| 463 | #define _SC_THREAD_PRIO_INHERIT	80 |
| 464 | #define _SC_THREAD_PRIO_PROTECT	81 |
| 465 | #define _SC_THREAD_PROCESS_SHARED	82 |
| 466 | #define _SC_NPROCESSORS_CONF	83 |
| 467 | #define _SC_NPROCESSORS_ONLN	84 |
| 468 | #define _SC_PHYS_PAGES	85 |
| 469 | #define _SC_AVPHYS_PAGES	86 |
| 470 | #define _SC_ATEXIT_MAX	87 |
| 471 | #define _SC_PASS_MAX	88 |
| 472 | #define _SC_XOPEN_VERSION	89 |
| 473 | #define _SC_XOPEN_XCU_VERSION	90 |
| 474 | #define _SC_XOPEN_UNIX	91 |
| 475 | #define _SC_XOPEN_CRYPT	92 |
| 476 | #define _SC_XOPEN_ENH_I18N	93 |
| 477 | #define _SC_XOPEN_SHM	94 |
| 478 | #define _SC_2_CHAR_TERM	95 |
| 479 | #define _SC_2_UPE	97 |
| 480 | #define _SC_XOPEN_XPG2	98 |
| 481 | #define _SC_XOPEN_XPG3	99 |
| 482 | #define _SC_XOPEN_XPG4	100 |
| 483 | #define _SC_NZERO	109 |
| 484 | #define _SC_XBS5_ILP32_OFF32	125 |
| 485 | #define _SC_XBS5_ILP32_OFFBIG	126 |
| 486 | #define _SC_XBS5_LP64_OFF64	127 |
| 487 | #define _SC_XBS5_LPBIG_OFFBIG	128 |
| 488 | #define _SC_XOPEN_LEGACY	129 |
| 489 | #define _SC_XOPEN_REALTIME	130 |
| 490 | #define _SC_XOPEN_REALTIME_THREADS	131 |
| 491 | #define _SC_ADVISORY_INFO	132 |
| 492 | #define _SC_BARRIERS	133 |
| 493 | #define _SC_CLOCK_SELECTION	137 |
| 494 | #define _SC_CPUTIME	138 |
| 495 | #define _SC_THREAD_CPUTIME	139 |
| 496 | #define _SC_MONOTONIC_CLOCK	149 |
| 497 | #define _SC_READER_WRITER_LOCKS	153 |
| 498 | #define _SC_SPIN_LOCKS	154 |
| 499 | #define _SC_REGEXP	155 |
| 500 | #define _SC_SHELL	157 |
| 501 | #define _SC_SPAWN	159 |
| 502 | #define _SC_SPORADIC_SERVER	160 |
| 503 | #define _SC_THREAD_SPORADIC_SERVER	161 |
| 504 | #define _SC_TIMEOUTS	164 |
| 505 | #define _SC_TYPED_MEMORY_OBJECTS	165 |
| 506 | #define _SC_2_PBS	168 |
| 507 | #define _SC_2_PBS_ACCOUNTING	169 |
| 508 | #define _SC_2_PBS_LOCATE	170 |
| 509 | #define _SC_2_PBS_MESSAGE	171 |
| 510 | #define _SC_2_PBS_TRACK	172 |
| 511 | #define _SC_SYMLOOP_MAX	173 |
| 512 | #define _SC_STREAMS	174 |
| 513 | #define _SC_2_PBS_CHECKPOINT	175 |
| 514 | #define _SC_V6_ILP32_OFF32	176 |
| 515 | #define _SC_V6_ILP32_OFFBIG	177 |
| 516 | #define _SC_V6_LP64_OFF64	178 |
| 517 | #define _SC_V6_LPBIG_OFFBIG	179 |
| 518 | #define _SC_HOST_NAME_MAX	180 |
| 519 | #define _SC_TRACE	181 |
| 520 | #define _SC_TRACE_EVENT_FILTER	182 |
| 521 | #define _SC_TRACE_INHERIT	183 |
| 522 | #define _SC_TRACE_LOG	184 |
| 523 | |
| 524 | #define _SC_IPV6	235 |
| 525 | #define _SC_RAW_SOCKETS	236 |
| 526 | #define _SC_V7_ILP32_OFF32	237 |
| 527 | #define _SC_V7_ILP32_OFFBIG	238 |
| 528 | #define _SC_V7_LP64_OFF64	239 |
| 529 | #define _SC_V7_LPBIG_OFFBIG	240 |
| 530 | #define _SC_SS_REPL_MAX	241 |
| 531 | #define _SC_TRACE_EVENT_NAME_MAX	242 |
| 532 | #define _SC_TRACE_NAME_MAX	243 |
| 533 | #define _SC_TRACE_SYS_MAX	244 |
| 534 | #define _SC_TRACE_USER_EVENT_MAX	245 |
| 535 | #define _SC_XOPEN_STREAMS	246 |
| 536 | #define _SC_THREAD_ROBUST_PRIO_INHERIT	247 |
| 537 | #define _SC_THREAD_ROBUST_PRIO_PROTECT	248 |
| 538 | #define _SC_MINSIGSTKSZ	249 |
| 539 | #define _SC_SIGSTKSZ	250 |
| 540 | |
| 541 | #define _CS_PATH	0 |
| 542 | #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	1 |
| 543 | #define _CS_GNU_LIBC_VERSION	2 |
| 544 | #define _CS_GNU_LIBPTHREAD_VERSION	3 |
| 545 | #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS	4 |
| 546 | #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS	5 |
| 547 | |
| 548 | #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS	1116 |
| 549 | #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS	1117 |
| 550 | #define _CS_POSIX_V6_ILP32_OFF32_LIBS	1118 |
| 551 | #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS	1119 |
| 552 | #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	1120 |
| 553 | #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	1121 |
| 554 | #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS	1122 |
| 555 | #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS	1123 |
| 556 | #define _CS_POSIX_V6_LP64_OFF64_CFLAGS	1124 |
| 557 | #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS	1125 |
| 558 | #define _CS_POSIX_V6_LP64_OFF64_LIBS	1126 |
| 559 | #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS	1127 |
| 560 | #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	1128 |
| 561 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	1129 |
| 562 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS	1130 |
| 563 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS	1131 |
| 564 | #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS	1132 |
| 565 | #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS	1133 |
| 566 | #define _CS_POSIX_V7_ILP32_OFF32_LIBS	1134 |
| 567 | #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS	1135 |
| 568 | #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS	1136 |
| 569 | #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS	1137 |
| 570 | #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS	1138 |
| 571 | #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS	1139 |
| 572 | #define _CS_POSIX_V7_LP64_OFF64_CFLAGS	1140 |
| 573 | #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS	1141 |
| 574 | #define _CS_POSIX_V7_LP64_OFF64_LIBS	1142 |
| 575 | #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS	1143 |
| 576 | #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS	1144 |
| 577 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS	1145 |
| 578 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS	1146 |
| 579 | #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS	1147 |
| 580 | #define _CS_V6_ENV	1148 |
| 581 | #define _CS_V7_ENV	1149 |
| 582 | #define _CS_POSIX_V7_THREADS_CFLAGS	1150 |
| 583 | #define _CS_POSIX_V7_THREADS_LDFLAGS	1151 |
| 584 | |
| 585 | #ifdef __cplusplus |
| 586 | } |
| 587 | #endif |
| 588 | |
| 589 | #endif |