1 /* 2 Copyright (c) 1982, 1986, 1993 3 The Regents of the University of California. All rights reserved. 4 5 Redistribution and use in source and binary forms, with or without 6 modification, are permitted provided that the following conditions 7 are met: 8 1. Redistributions of source code must retain the above copyright 9 notice, this list of conditions and the following disclaimer. 10 2. Redistributions in binary form must reproduce the above copyright 11 notice, this list of conditions and the following disclaimer in the 12 documentation and/or other materials provided with the distribution. 13 3. Neither the name of the University nor the names of its contributors 14 may be used to endorse or promote products derived from this software 15 without specific prior written permission. 16 17 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 SUCH DAMAGE. 28 */ 29 #ifndef _SYS_UNISTD_H 30 #define _SYS_UNISTD_H 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #include <_ansi.h> 37 #define __need_size_t 38 #define __need_ptrdiff_t 39 #include <sys/cdefs.h> 40 #include <sys/types.h> 41 #include <sys/_types.h> 42 #include <stddef.h> 43 44 extern char **environ; 45 46 void _exit (int __status) _ATTRIBUTE ((__noreturn__)); 47 48 int access (const char *__path, int __amode); 49 unsigned alarm (unsigned __secs); 50 int chdir (const char *__path); 51 int chmod (const char *__path, mode_t __mode); 52 int chown (const char *__path, uid_t __owner, gid_t __group); 53 #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) 54 int chroot (const char *__path); 55 #endif 56 int close (int __fildes); 57 #if __POSIX_VISIBLE >= 199209 58 size_t confstr (int __name, char *__buf, size_t __len); 59 #endif 60 #if __XSI_VISIBLE 61 char * crypt (const char *__key, const char *__salt); 62 #endif 63 #if __XSI_VISIBLE && __XSI_VISIBLE < 700 64 char * ctermid (char *__s); 65 #endif 66 #if __XSI_VISIBLE && __XSI_VISIBLE < 600 67 char * cuserid (char *__s); 68 #endif 69 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 70 int daemon (int nochdir, int noclose); 71 #endif 72 int dup (int __fildes); 73 int dup2 (int __fildes, int __fildes2); 74 #if __GNU_VISIBLE 75 int dup3 (int __fildes, int __fildes2, int flags); 76 int eaccess (const char *__path, int __mode); 77 #endif 78 #if __XSI_VISIBLE 79 void encrypt (char *, int); 80 #endif 81 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 82 void endusershell (void); 83 #endif 84 #if __GNU_VISIBLE 85 int euidaccess (const char *__path, int __mode); 86 #endif 87 int execl (const char *__path, const char *, ...); 88 int execle (const char *__path, const char *, ...); 89 int execlp (const char *__file, const char *, ...); 90 #if __MISC_VISIBLE 91 int execlpe (const char *__file, const char *, ...); 92 #endif 93 int execv (const char *__path, char * const __argv[]); 94 int execve (const char *__path, char * const __argv[], char * const __envp[]); 95 int execvp (const char *__file, char * const __argv[]); 96 #if __GNU_VISIBLE 97 int execvpe (const char *__file, char * const __argv[], char * const __envp[]); 98 #endif 99 #if __ATFILE_VISIBLE 100 int faccessat (int __dirfd, const char *__path, int __mode, int __flags); 101 #endif 102 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 103 int fchdir (int __fildes); 104 #endif 105 #if __POSIX_VISIBLE >= 199309 106 int fchmod (int __fildes, mode_t __mode); 107 #endif 108 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 109 int fchown (int __fildes, uid_t __owner, gid_t __group); 110 #endif 111 #if __ATFILE_VISIBLE 112 int fchownat (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags); 113 #endif 114 #if __POSIX_VISIBLE >= 200809 115 int fexecve (int __fd, char * const __argv[], char * const __envp[]); 116 #endif 117 pid_t fork (void); 118 long fpathconf (int __fd, int __name); 119 int fsync (int __fd); 120 #if __POSIX_VISIBLE >= 199309 121 int fdatasync (int __fd); 122 #endif 123 #if __GNU_VISIBLE 124 char * get_current_dir_name (void); 125 #endif 126 char * getcwd (char *__buf, size_t __size); 127 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 128 int getdomainname (char *__name, size_t __len); 129 #endif 130 #if __BSD_VISIBLE 131 int getentropy (void *, size_t); 132 #endif 133 gid_t getegid (void); 134 uid_t geteuid (void); 135 gid_t getgid (void); 136 int getgroups (int __gidsetsize, gid_t __grouplist[]); 137 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 138 long gethostid (void); 139 #endif 140 char * getlogin (void); 141 #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) 142 int getlogin_r (char *name, size_t namesize) ; 143 #endif 144 #if __BSD_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) 145 char * getpass (const char *__prompt); 146 int getpagesize (void); 147 #endif 148 #if __BSD_VISIBLE 149 int getpeereid (int, uid_t *, gid_t *); 150 #endif 151 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 152 pid_t getpgid (pid_t); 153 #endif 154 pid_t getpgrp (void); 155 pid_t getpid (void); 156 pid_t getppid (void); 157 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 158 pid_t getsid (pid_t); 159 #endif 160 uid_t getuid (void); 161 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 162 char * getusershell (void); 163 #endif 164 #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) 165 char * getwd (char *__buf); 166 #endif 167 #if __BSD_VISIBLE 168 int iruserok (unsigned long raddr, int superuser, const char *ruser, const char *luser); 169 #endif 170 int isatty (int __fildes); 171 #if __BSD_VISIBLE 172 int issetugid (void); 173 #endif 174 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 175 int lchown (const char *__path, uid_t __owner, gid_t __group); 176 #endif 177 int link (const char *__path1, const char *__path2); 178 #if __ATFILE_VISIBLE 179 int linkat (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags); 180 #endif 181 #if __MISC_VISIBLE || __XSI_VISIBLE 182 int nice (int __nice_value); 183 #endif 184 #if !defined(__INSIDE_CYGWIN__) 185 off_t lseek (int __fildes, off_t __offset, int __whence); 186 #endif 187 #if __MISC_VISIBLE || __XSI_VISIBLE >= 4 188 #define F_ULOCK 0 189 #define F_LOCK 1 190 #define F_TLOCK 2 191 #define F_TEST 3 192 int lockf (int __fd, int __cmd, off_t __len); 193 #endif 194 long pathconf (const char *__path, int __name); 195 int pause (void); 196 #if __POSIX_VISIBLE >= 199506 197 int pthread_atfork (void (*)(void), void (*)(void), void (*)(void)); 198 #endif 199 int pipe (int __fildes[2]); 200 #if __GNU_VISIBLE 201 int pipe2 (int __fildes[2], int flags); 202 #endif 203 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 204 ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset); 205 ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset); 206 #endif 207 ssize_t read (int __fd, void *__buf, size_t __nbyte); 208 #if __BSD_VISIBLE 209 int rresvport (int *__alport); 210 int revoke (char *__path); 211 #endif 212 int rmdir (const char *__path); 213 #if __BSD_VISIBLE 214 int ruserok (const char *rhost, int superuser, const char *ruser, const char *luser); 215 #endif 216 #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) 217 void * sbrk (ptrdiff_t __incr); 218 #endif 219 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 220 int setegid (gid_t __gid); 221 int seteuid (uid_t __uid); 222 #endif 223 int setgid (gid_t __gid); 224 #if __BSD_VISIBLE 225 int setgroups (int ngroups, const gid_t *grouplist); 226 #endif 227 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 228 int sethostname (const char *, size_t); 229 #endif 230 int setpgid (pid_t __pid, pid_t __pgid); 231 #if __SVID_VISIBLE || __XSI_VISIBLE >= 500 232 int setpgrp (void); 233 #endif 234 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 235 int setregid (gid_t __rgid, gid_t __egid); 236 int setreuid (uid_t __ruid, uid_t __euid); 237 #endif 238 pid_t setsid (void); 239 int setuid (uid_t __uid); 240 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) 241 void setusershell (void); 242 #endif 243 unsigned sleep (unsigned int __seconds); 244 #if __XSI_VISIBLE 245 void swab (const void *__restrict, void *__restrict, ssize_t); 246 #endif 247 long sysconf (int __name); 248 pid_t tcgetpgrp (int __fildes); 249 int tcsetpgrp (int __fildes, pid_t __pgrp_id); 250 char * ttyname (int __fildes); 251 int ttyname_r (int, char *, size_t); 252 int unlink (const char *__path); 253 #if __XSI_VISIBLE >= 500 && __POSIX_VISIBLE < 200809 || __BSD_VISIBLE 254 int usleep (useconds_t __useconds); 255 #endif 256 #if __BSD_VISIBLE 257 int vhangup (void); 258 #endif 259 ssize_t write (int __fd, const void *__buf, size_t __nbyte); 260 261 #ifdef __CYGWIN__ 262 # define __UNISTD_GETOPT__ 263 # include <getopt.h> 264 # undef __UNISTD_GETOPT__ 265 #else 266 extern char *optarg; /* getopt(3) external variables */ 267 extern int optind, opterr, optopt; 268 int getopt(int, char * const [], const char *); 269 extern int optreset; /* getopt(3) external variable */ 270 #endif 271 272 #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) 273 pid_t vfork (void); 274 #endif 275 276 #ifdef _LIBC 277 /* Provide prototypes for most of the _<systemcall> names that are 278 provided in newlib for some compilers. */ 279 int close (int __fildes); 280 pid_t fork (void); 281 pid_t getpid (void); 282 int isatty (int __fildes); 283 int link (const char *__path1, const char *__path2); 284 _off_t lseek (int __fildes, _off_t __offset, int __whence); 285 #ifdef __LARGE64_FILES 286 _off64_t lseek64 (int __filedes, _off64_t __offset, int __whence); 287 #endif 288 void * sbrk (ptrdiff_t __incr); 289 int unlink (const char *__path); 290 #endif 291 292 #if !defined(__INSIDE_CYGWIN__) 293 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 294 int ftruncate (int __fd, off_t __length); 295 #endif 296 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 297 int truncate (const char *, off_t __length); 298 #endif 299 #endif 300 301 #if __BSD_VISIBLE || __POSIX_VISIBLE < 200112 302 int getdtablesize (void); 303 #endif 304 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 305 useconds_t ualarm (useconds_t __useconds, useconds_t __interval); 306 #endif 307 308 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 309 #if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) 310 /* winsock[2].h defines as __stdcall, and with int as 2nd arg */ 311 int gethostname (char *__name, size_t __len); 312 #endif 313 #endif 314 315 #if __MISC_VISIBLE 316 int setdtablesize (int); 317 #endif 318 319 #if __BSD_VISIBLE || __XSI_VISIBLE >= 500 320 void sync (void); 321 #endif 322 323 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 324 ssize_t readlink (const char *__restrict __path, 325 char *__restrict __buf, size_t __buflen); 326 int symlink (const char *__name1, const char *__name2); 327 #endif 328 #if __ATFILE_VISIBLE 329 ssize_t readlinkat (int __dirfd1, const char *__restrict __path, 330 char *__restrict __buf, size_t __buflen); 331 int symlinkat (const char *, int, const char *); 332 int unlinkat (int, const char *, int); 333 #endif 334 335 #define F_OK 0 336 #define R_OK 4 337 #define W_OK 2 338 #define X_OK 1 339 340 # define SEEK_SET 0 341 # define SEEK_CUR 1 342 # define SEEK_END 2 343 #if __GNU_VISIBLE 344 # define SEEK_DATA 3 345 # define SEEK_HOLE 4 346 #endif 347 348 #include <sys/features.h> 349 350 #define STDIN_FILENO 0 /* standard input file descriptor */ 351 #define STDOUT_FILENO 1 /* standard output file descriptor */ 352 #define STDERR_FILENO 2 /* standard error file descriptor */ 353 354 /* 355 * sysconf values per IEEE Std 1003.1, 2008 Edition 356 */ 357 358 #define _SC_ARG_MAX 0 359 #define _SC_CHILD_MAX 1 360 #define _SC_CLK_TCK 2 361 #define _SC_NGROUPS_MAX 3 362 #define _SC_OPEN_MAX 4 363 #define _SC_JOB_CONTROL 5 364 #define _SC_SAVED_IDS 6 365 #define _SC_VERSION 7 366 #define _SC_PAGESIZE 8 367 #define _SC_PAGE_SIZE _SC_PAGESIZE 368 /* These are non-POSIX values we accidentally introduced in 2000 without 369 guarding them. Keeping them unguarded for backward compatibility. */ 370 #define _SC_NPROCESSORS_CONF 9 371 #define _SC_NPROCESSORS_ONLN 10 372 #define _SC_PHYS_PAGES 11 373 #define _SC_AVPHYS_PAGES 12 374 /* End of non-POSIX values. */ 375 #define _SC_MQ_OPEN_MAX 13 376 #define _SC_MQ_PRIO_MAX 14 377 #define _SC_RTSIG_MAX 15 378 #define _SC_SEM_NSEMS_MAX 16 379 #define _SC_SEM_VALUE_MAX 17 380 #define _SC_SIGQUEUE_MAX 18 381 #define _SC_TIMER_MAX 19 382 #define _SC_TZNAME_MAX 20 383 #define _SC_ASYNCHRONOUS_IO 21 384 #define _SC_FSYNC 22 385 #define _SC_MAPPED_FILES 23 386 #define _SC_MEMLOCK 24 387 #define _SC_MEMLOCK_RANGE 25 388 #define _SC_MEMORY_PROTECTION 26 389 #define _SC_MESSAGE_PASSING 27 390 #define _SC_PRIORITIZED_IO 28 391 #define _SC_REALTIME_SIGNALS 29 392 #define _SC_SEMAPHORES 30 393 #define _SC_SHARED_MEMORY_OBJECTS 31 394 #define _SC_SYNCHRONIZED_IO 32 395 #define _SC_TIMERS 33 396 #define _SC_AIO_LISTIO_MAX 34 397 #define _SC_AIO_MAX 35 398 #define _SC_AIO_PRIO_DELTA_MAX 36 399 #define _SC_DELAYTIMER_MAX 37 400 #define _SC_THREAD_KEYS_MAX 38 401 #define _SC_THREAD_STACK_MIN 39 402 #define _SC_THREAD_THREADS_MAX 40 403 #define _SC_TTY_NAME_MAX 41 404 #define _SC_THREADS 42 405 #define _SC_THREAD_ATTR_STACKADDR 43 406 #define _SC_THREAD_ATTR_STACKSIZE 44 407 #define _SC_THREAD_PRIORITY_SCHEDULING 45 408 #define _SC_THREAD_PRIO_INHERIT 46 409 /* _SC_THREAD_PRIO_PROTECT was _SC_THREAD_PRIO_CEILING in early drafts */ 410 #define _SC_THREAD_PRIO_PROTECT 47 411 #define _SC_THREAD_PRIO_CEILING _SC_THREAD_PRIO_PROTECT 412 #define _SC_THREAD_PROCESS_SHARED 48 413 #define _SC_THREAD_SAFE_FUNCTIONS 49 414 #define _SC_GETGR_R_SIZE_MAX 50 415 #define _SC_GETPW_R_SIZE_MAX 51 416 #define _SC_LOGIN_NAME_MAX 52 417 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 53 418 #define _SC_ADVISORY_INFO 54 419 #define _SC_ATEXIT_MAX 55 420 #define _SC_BARRIERS 56 421 #define _SC_BC_BASE_MAX 57 422 #define _SC_BC_DIM_MAX 58 423 #define _SC_BC_SCALE_MAX 59 424 #define _SC_BC_STRING_MAX 60 425 #define _SC_CLOCK_SELECTION 61 426 #define _SC_COLL_WEIGHTS_MAX 62 427 #define _SC_CPUTIME 63 428 #define _SC_EXPR_NEST_MAX 64 429 #define _SC_HOST_NAME_MAX 65 430 #define _SC_IOV_MAX 66 431 #define _SC_IPV6 67 432 #define _SC_LINE_MAX 68 433 #define _SC_MONOTONIC_CLOCK 69 434 #define _SC_RAW_SOCKETS 70 435 #define _SC_READER_WRITER_LOCKS 71 436 #define _SC_REGEXP 72 437 #define _SC_RE_DUP_MAX 73 438 #define _SC_SHELL 74 439 #define _SC_SPAWN 75 440 #define _SC_SPIN_LOCKS 76 441 #define _SC_SPORADIC_SERVER 77 442 #define _SC_SS_REPL_MAX 78 443 #define _SC_SYMLOOP_MAX 79 444 #define _SC_THREAD_CPUTIME 80 445 #define _SC_THREAD_SPORADIC_SERVER 81 446 #define _SC_TIMEOUTS 82 447 #define _SC_TRACE 83 448 #define _SC_TRACE_EVENT_FILTER 84 449 #define _SC_TRACE_EVENT_NAME_MAX 85 450 #define _SC_TRACE_INHERIT 86 451 #define _SC_TRACE_LOG 87 452 #define _SC_TRACE_NAME_MAX 88 453 #define _SC_TRACE_SYS_MAX 89 454 #define _SC_TRACE_USER_EVENT_MAX 90 455 #define _SC_TYPED_MEMORY_OBJECTS 91 456 #define _SC_V7_ILP32_OFF32 92 457 #define _SC_V6_ILP32_OFF32 _SC_V7_ILP32_OFF32 458 #define _SC_XBS5_ILP32_OFF32 _SC_V7_ILP32_OFF32 459 #define _SC_V7_ILP32_OFFBIG 93 460 #define _SC_V6_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG 461 #define _SC_XBS5_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG 462 #define _SC_V7_LP64_OFF64 94 463 #define _SC_V6_LP64_OFF64 _SC_V7_LP64_OFF64 464 #define _SC_XBS5_LP64_OFF64 _SC_V7_LP64_OFF64 465 #define _SC_V7_LPBIG_OFFBIG 95 466 #define _SC_V6_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG 467 #define _SC_XBS5_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG 468 #define _SC_XOPEN_CRYPT 96 469 #define _SC_XOPEN_ENH_I18N 97 470 #define _SC_XOPEN_LEGACY 98 471 #define _SC_XOPEN_REALTIME 99 472 #define _SC_STREAM_MAX 100 473 #define _SC_PRIORITY_SCHEDULING 101 474 #define _SC_XOPEN_REALTIME_THREADS 102 475 #define _SC_XOPEN_SHM 103 476 #define _SC_XOPEN_STREAMS 104 477 #define _SC_XOPEN_UNIX 105 478 #define _SC_XOPEN_VERSION 106 479 #define _SC_2_CHAR_TERM 107 480 #define _SC_2_C_BIND 108 481 #define _SC_2_C_DEV 109 482 #define _SC_2_FORT_DEV 110 483 #define _SC_2_FORT_RUN 111 484 #define _SC_2_LOCALEDEF 112 485 #define _SC_2_PBS 113 486 #define _SC_2_PBS_ACCOUNTING 114 487 #define _SC_2_PBS_CHECKPOINT 115 488 #define _SC_2_PBS_LOCATE 116 489 #define _SC_2_PBS_MESSAGE 117 490 #define _SC_2_PBS_TRACK 118 491 #define _SC_2_SW_DEV 119 492 #define _SC_2_UPE 120 493 #define _SC_2_VERSION 121 494 #define _SC_THREAD_ROBUST_PRIO_INHERIT 122 495 #define _SC_THREAD_ROBUST_PRIO_PROTECT 123 496 #define _SC_XOPEN_UUCP 124 497 #define _SC_LEVEL1_ICACHE_SIZE 125 498 #define _SC_LEVEL1_ICACHE_ASSOC 126 499 #define _SC_LEVEL1_ICACHE_LINESIZE 127 500 #define _SC_LEVEL1_DCACHE_SIZE 128 501 #define _SC_LEVEL1_DCACHE_ASSOC 129 502 #define _SC_LEVEL1_DCACHE_LINESIZE 130 503 #define _SC_LEVEL2_CACHE_SIZE 131 504 #define _SC_LEVEL2_CACHE_ASSOC 132 505 #define _SC_LEVEL2_CACHE_LINESIZE 133 506 #define _SC_LEVEL3_CACHE_SIZE 134 507 #define _SC_LEVEL3_CACHE_ASSOC 135 508 #define _SC_LEVEL3_CACHE_LINESIZE 136 509 #define _SC_LEVEL4_CACHE_SIZE 137 510 #define _SC_LEVEL4_CACHE_ASSOC 138 511 #define _SC_LEVEL4_CACHE_LINESIZE 139 512 #define _SC_POSIX_26_VERSION 140 513 514 /* 515 * pathconf values per IEEE Std 1003.1, 2008 Edition 516 */ 517 518 #define _PC_LINK_MAX 0 519 #define _PC_MAX_CANON 1 520 #define _PC_MAX_INPUT 2 521 #define _PC_NAME_MAX 3 522 #define _PC_PATH_MAX 4 523 #define _PC_PIPE_BUF 5 524 #define _PC_CHOWN_RESTRICTED 6 525 #define _PC_NO_TRUNC 7 526 #define _PC_VDISABLE 8 527 #define _PC_ASYNC_IO 9 528 #define _PC_PRIO_IO 10 529 #define _PC_SYNC_IO 11 530 #define _PC_FILESIZEBITS 12 531 #define _PC_2_SYMLINKS 13 532 #define _PC_SYMLINK_MAX 14 533 #define _PC_ALLOC_SIZE_MIN 15 534 #define _PC_REC_INCR_XFER_SIZE 16 535 #define _PC_REC_MAX_XFER_SIZE 17 536 #define _PC_REC_MIN_XFER_SIZE 18 537 #define _PC_REC_XFER_ALIGN 19 538 #define _PC_TIMESTAMP_RESOLUTION 20 539 #ifdef __CYGWIN__ 540 /* Ask for POSIX permission bits support. */ 541 #define _PC_POSIX_PERMISSIONS 90 542 /* Ask for full POSIX permission support including uid/gid settings. */ 543 #define _PC_POSIX_SECURITY 91 544 #define _PC_CASE_INSENSITIVE 92 545 #endif 546 547 /* 548 * confstr values per IEEE Std 1003.1, 2004 Edition 549 */ 550 551 /* Only defined on Cygwin and RTEMS for now. */ 552 #if defined (__CYGWIN__) || defined(__rtems__) 553 #define _CS_PATH 0 554 #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1 555 #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS 556 #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS 557 #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 2 558 #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 559 #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 560 #define _CS_POSIX_V7_ILP32_OFF32_LIBS 3 561 #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS 562 #define _CS_XBS5_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS 563 #define _CS_XBS5_ILP32_OFF32_LINTFLAGS 4 564 #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 5 565 #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 566 #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 567 #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 6 568 #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 569 #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 570 #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 7 571 #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS 572 #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS 573 #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 8 574 #define _CS_POSIX_V7_LP64_OFF64_CFLAGS 9 575 #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS 576 #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS 577 #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 10 578 #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS 579 #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS 580 #define _CS_POSIX_V7_LP64_OFF64_LIBS 11 581 #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS 582 #define _CS_XBS5_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS 583 #define _CS_XBS5_LP64_OFF64_LINTFLAGS 12 584 #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 13 585 #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 586 #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 587 #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 14 588 #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 589 #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 590 #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 15 591 #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 592 #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 593 #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16 594 #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17 595 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 596 #define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 597 #define _CS_POSIX_V7_THREADS_CFLAGS 18 598 #define _CS_POSIX_V7_THREADS_LDFLAGS 19 599 #define _CS_V7_ENV 20 600 #define _CS_V6_ENV _CS_V7_ENV 601 #define _CS_LFS_CFLAGS 21 602 #define _CS_LFS_LDFLAGS 22 603 #define _CS_LFS_LIBS 23 604 #define _CS_LFS_LINTFLAGS 24 605 #endif 606 607 #ifdef __cplusplus 608 } 609 #endif 610 611 #if __SSP_FORTIFY_LEVEL > 0 612 #include <ssp/unistd.h> 613 #endif 614 615 #endif /* _SYS_UNISTD_H */ 616