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 344 #include <sys/features.h> 345 346 #define STDIN_FILENO 0 /* standard input file descriptor */ 347 #define STDOUT_FILENO 1 /* standard output file descriptor */ 348 #define STDERR_FILENO 2 /* standard error file descriptor */ 349 350 /* 351 * sysconf values per IEEE Std 1003.1, 2008 Edition 352 */ 353 354 #define _SC_ARG_MAX 0 355 #define _SC_CHILD_MAX 1 356 #define _SC_CLK_TCK 2 357 #define _SC_NGROUPS_MAX 3 358 #define _SC_OPEN_MAX 4 359 #define _SC_JOB_CONTROL 5 360 #define _SC_SAVED_IDS 6 361 #define _SC_VERSION 7 362 #define _SC_PAGESIZE 8 363 #define _SC_PAGE_SIZE _SC_PAGESIZE 364 /* These are non-POSIX values we accidentally introduced in 2000 without 365 guarding them. Keeping them unguarded for backward compatibility. */ 366 #define _SC_NPROCESSORS_CONF 9 367 #define _SC_NPROCESSORS_ONLN 10 368 #define _SC_PHYS_PAGES 11 369 #define _SC_AVPHYS_PAGES 12 370 /* End of non-POSIX values. */ 371 #define _SC_MQ_OPEN_MAX 13 372 #define _SC_MQ_PRIO_MAX 14 373 #define _SC_RTSIG_MAX 15 374 #define _SC_SEM_NSEMS_MAX 16 375 #define _SC_SEM_VALUE_MAX 17 376 #define _SC_SIGQUEUE_MAX 18 377 #define _SC_TIMER_MAX 19 378 #define _SC_TZNAME_MAX 20 379 #define _SC_ASYNCHRONOUS_IO 21 380 #define _SC_FSYNC 22 381 #define _SC_MAPPED_FILES 23 382 #define _SC_MEMLOCK 24 383 #define _SC_MEMLOCK_RANGE 25 384 #define _SC_MEMORY_PROTECTION 26 385 #define _SC_MESSAGE_PASSING 27 386 #define _SC_PRIORITIZED_IO 28 387 #define _SC_REALTIME_SIGNALS 29 388 #define _SC_SEMAPHORES 30 389 #define _SC_SHARED_MEMORY_OBJECTS 31 390 #define _SC_SYNCHRONIZED_IO 32 391 #define _SC_TIMERS 33 392 #define _SC_AIO_LISTIO_MAX 34 393 #define _SC_AIO_MAX 35 394 #define _SC_AIO_PRIO_DELTA_MAX 36 395 #define _SC_DELAYTIMER_MAX 37 396 #define _SC_THREAD_KEYS_MAX 38 397 #define _SC_THREAD_STACK_MIN 39 398 #define _SC_THREAD_THREADS_MAX 40 399 #define _SC_TTY_NAME_MAX 41 400 #define _SC_THREADS 42 401 #define _SC_THREAD_ATTR_STACKADDR 43 402 #define _SC_THREAD_ATTR_STACKSIZE 44 403 #define _SC_THREAD_PRIORITY_SCHEDULING 45 404 #define _SC_THREAD_PRIO_INHERIT 46 405 /* _SC_THREAD_PRIO_PROTECT was _SC_THREAD_PRIO_CEILING in early drafts */ 406 #define _SC_THREAD_PRIO_PROTECT 47 407 #define _SC_THREAD_PRIO_CEILING _SC_THREAD_PRIO_PROTECT 408 #define _SC_THREAD_PROCESS_SHARED 48 409 #define _SC_THREAD_SAFE_FUNCTIONS 49 410 #define _SC_GETGR_R_SIZE_MAX 50 411 #define _SC_GETPW_R_SIZE_MAX 51 412 #define _SC_LOGIN_NAME_MAX 52 413 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 53 414 #define _SC_ADVISORY_INFO 54 415 #define _SC_ATEXIT_MAX 55 416 #define _SC_BARRIERS 56 417 #define _SC_BC_BASE_MAX 57 418 #define _SC_BC_DIM_MAX 58 419 #define _SC_BC_SCALE_MAX 59 420 #define _SC_BC_STRING_MAX 60 421 #define _SC_CLOCK_SELECTION 61 422 #define _SC_COLL_WEIGHTS_MAX 62 423 #define _SC_CPUTIME 63 424 #define _SC_EXPR_NEST_MAX 64 425 #define _SC_HOST_NAME_MAX 65 426 #define _SC_IOV_MAX 66 427 #define _SC_IPV6 67 428 #define _SC_LINE_MAX 68 429 #define _SC_MONOTONIC_CLOCK 69 430 #define _SC_RAW_SOCKETS 70 431 #define _SC_READER_WRITER_LOCKS 71 432 #define _SC_REGEXP 72 433 #define _SC_RE_DUP_MAX 73 434 #define _SC_SHELL 74 435 #define _SC_SPAWN 75 436 #define _SC_SPIN_LOCKS 76 437 #define _SC_SPORADIC_SERVER 77 438 #define _SC_SS_REPL_MAX 78 439 #define _SC_SYMLOOP_MAX 79 440 #define _SC_THREAD_CPUTIME 80 441 #define _SC_THREAD_SPORADIC_SERVER 81 442 #define _SC_TIMEOUTS 82 443 #define _SC_TRACE 83 444 #define _SC_TRACE_EVENT_FILTER 84 445 #define _SC_TRACE_EVENT_NAME_MAX 85 446 #define _SC_TRACE_INHERIT 86 447 #define _SC_TRACE_LOG 87 448 #define _SC_TRACE_NAME_MAX 88 449 #define _SC_TRACE_SYS_MAX 89 450 #define _SC_TRACE_USER_EVENT_MAX 90 451 #define _SC_TYPED_MEMORY_OBJECTS 91 452 #define _SC_V7_ILP32_OFF32 92 453 #define _SC_V6_ILP32_OFF32 _SC_V7_ILP32_OFF32 454 #define _SC_XBS5_ILP32_OFF32 _SC_V7_ILP32_OFF32 455 #define _SC_V7_ILP32_OFFBIG 93 456 #define _SC_V6_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG 457 #define _SC_XBS5_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG 458 #define _SC_V7_LP64_OFF64 94 459 #define _SC_V6_LP64_OFF64 _SC_V7_LP64_OFF64 460 #define _SC_XBS5_LP64_OFF64 _SC_V7_LP64_OFF64 461 #define _SC_V7_LPBIG_OFFBIG 95 462 #define _SC_V6_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG 463 #define _SC_XBS5_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG 464 #define _SC_XOPEN_CRYPT 96 465 #define _SC_XOPEN_ENH_I18N 97 466 #define _SC_XOPEN_LEGACY 98 467 #define _SC_XOPEN_REALTIME 99 468 #define _SC_STREAM_MAX 100 469 #define _SC_PRIORITY_SCHEDULING 101 470 #define _SC_XOPEN_REALTIME_THREADS 102 471 #define _SC_XOPEN_SHM 103 472 #define _SC_XOPEN_STREAMS 104 473 #define _SC_XOPEN_UNIX 105 474 #define _SC_XOPEN_VERSION 106 475 #define _SC_2_CHAR_TERM 107 476 #define _SC_2_C_BIND 108 477 #define _SC_2_C_DEV 109 478 #define _SC_2_FORT_DEV 110 479 #define _SC_2_FORT_RUN 111 480 #define _SC_2_LOCALEDEF 112 481 #define _SC_2_PBS 113 482 #define _SC_2_PBS_ACCOUNTING 114 483 #define _SC_2_PBS_CHECKPOINT 115 484 #define _SC_2_PBS_LOCATE 116 485 #define _SC_2_PBS_MESSAGE 117 486 #define _SC_2_PBS_TRACK 118 487 #define _SC_2_SW_DEV 119 488 #define _SC_2_UPE 120 489 #define _SC_2_VERSION 121 490 #define _SC_THREAD_ROBUST_PRIO_INHERIT 122 491 #define _SC_THREAD_ROBUST_PRIO_PROTECT 123 492 #define _SC_XOPEN_UUCP 124 493 #define _SC_LEVEL1_ICACHE_SIZE 125 494 #define _SC_LEVEL1_ICACHE_ASSOC 126 495 #define _SC_LEVEL1_ICACHE_LINESIZE 127 496 #define _SC_LEVEL1_DCACHE_SIZE 128 497 #define _SC_LEVEL1_DCACHE_ASSOC 129 498 #define _SC_LEVEL1_DCACHE_LINESIZE 130 499 #define _SC_LEVEL2_CACHE_SIZE 131 500 #define _SC_LEVEL2_CACHE_ASSOC 132 501 #define _SC_LEVEL2_CACHE_LINESIZE 133 502 #define _SC_LEVEL3_CACHE_SIZE 134 503 #define _SC_LEVEL3_CACHE_ASSOC 135 504 #define _SC_LEVEL3_CACHE_LINESIZE 136 505 #define _SC_LEVEL4_CACHE_SIZE 137 506 #define _SC_LEVEL4_CACHE_ASSOC 138 507 #define _SC_LEVEL4_CACHE_LINESIZE 139 508 #define _SC_POSIX_26_VERSION 140 509 510 /* 511 * pathconf values per IEEE Std 1003.1, 2008 Edition 512 */ 513 514 #define _PC_LINK_MAX 0 515 #define _PC_MAX_CANON 1 516 #define _PC_MAX_INPUT 2 517 #define _PC_NAME_MAX 3 518 #define _PC_PATH_MAX 4 519 #define _PC_PIPE_BUF 5 520 #define _PC_CHOWN_RESTRICTED 6 521 #define _PC_NO_TRUNC 7 522 #define _PC_VDISABLE 8 523 #define _PC_ASYNC_IO 9 524 #define _PC_PRIO_IO 10 525 #define _PC_SYNC_IO 11 526 #define _PC_FILESIZEBITS 12 527 #define _PC_2_SYMLINKS 13 528 #define _PC_SYMLINK_MAX 14 529 #define _PC_ALLOC_SIZE_MIN 15 530 #define _PC_REC_INCR_XFER_SIZE 16 531 #define _PC_REC_MAX_XFER_SIZE 17 532 #define _PC_REC_MIN_XFER_SIZE 18 533 #define _PC_REC_XFER_ALIGN 19 534 #define _PC_TIMESTAMP_RESOLUTION 20 535 #ifdef __CYGWIN__ 536 /* Ask for POSIX permission bits support. */ 537 #define _PC_POSIX_PERMISSIONS 90 538 /* Ask for full POSIX permission support including uid/gid settings. */ 539 #define _PC_POSIX_SECURITY 91 540 #define _PC_CASE_INSENSITIVE 92 541 #endif 542 543 /* 544 * confstr values per IEEE Std 1003.1, 2004 Edition 545 */ 546 547 /* Only defined on Cygwin and RTEMS for now. */ 548 #if defined (__CYGWIN__) || defined(__rtems__) 549 #define _CS_PATH 0 550 #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1 551 #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS 552 #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS 553 #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 2 554 #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 555 #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 556 #define _CS_POSIX_V7_ILP32_OFF32_LIBS 3 557 #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS 558 #define _CS_XBS5_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS 559 #define _CS_XBS5_ILP32_OFF32_LINTFLAGS 4 560 #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 5 561 #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 562 #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 563 #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 6 564 #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 565 #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 566 #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 7 567 #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS 568 #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS 569 #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 8 570 #define _CS_POSIX_V7_LP64_OFF64_CFLAGS 9 571 #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS 572 #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS 573 #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 10 574 #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS 575 #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS 576 #define _CS_POSIX_V7_LP64_OFF64_LIBS 11 577 #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS 578 #define _CS_XBS5_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS 579 #define _CS_XBS5_LP64_OFF64_LINTFLAGS 12 580 #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 13 581 #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 582 #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 583 #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 14 584 #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 585 #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 586 #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 15 587 #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 588 #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 589 #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16 590 #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17 591 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 592 #define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 593 #define _CS_POSIX_V7_THREADS_CFLAGS 18 594 #define _CS_POSIX_V7_THREADS_LDFLAGS 19 595 #define _CS_V7_ENV 20 596 #define _CS_V6_ENV _CS_V7_ENV 597 #define _CS_LFS_CFLAGS 21 598 #define _CS_LFS_LDFLAGS 22 599 #define _CS_LFS_LIBS 23 600 #define _CS_LFS_LINTFLAGS 24 601 #endif 602 603 #ifdef __cplusplus 604 } 605 #endif 606 607 #if __SSP_FORTIFY_LEVEL > 0 608 #include <ssp/unistd.h> 609 #endif 610 611 #endif /* _SYS_UNISTD_H */ 612