unistd.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. #ifndef _SYS_UNISTD_H
  2. #define _SYS_UNISTD_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <_ansi.h>
  7. #define __need_size_t
  8. #define __need_ptrdiff_t
  9. #include <sys/cdefs.h>
  10. #include <sys/types.h>
  11. #include <sys/_types.h>
  12. #include <stddef.h>
  13. extern char **environ;
  14. void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((__noreturn__)));
  15. int _EXFUN(access,(const char *__path, int __amode ));
  16. unsigned _EXFUN(alarm, (unsigned __secs ));
  17. int _EXFUN(chdir, (const char *__path ));
  18. int _EXFUN(chmod, (const char *__path, mode_t __mode ));
  19. #if !defined(__INSIDE_CYGWIN__)
  20. int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
  21. #endif
  22. #if defined(__CYGWIN__) || defined(__rtems__)
  23. int _EXFUN(chroot, (const char *__path ));
  24. #endif
  25. int _EXFUN(close, (int __fildes ));
  26. #if defined(__CYGWIN__)
  27. size_t _EXFUN(confstr, (int __name, char *__buf, size_t __len));
  28. #endif
  29. char * _EXFUN(ctermid, (char *__s ));
  30. char * _EXFUN(cuserid, (char *__s ));
  31. #if defined(__CYGWIN__)
  32. int _EXFUN(daemon, (int nochdir, int noclose));
  33. #endif
  34. int _EXFUN(dup, (int __fildes ));
  35. int _EXFUN(dup2, (int __fildes, int __fildes2 ));
  36. #if defined(__CYGWIN__)
  37. int _EXFUN(dup3, (int __fildes, int __fildes2, int flags));
  38. int _EXFUN(eaccess, (const char *__path, int __mode));
  39. void _EXFUN(endusershell, (void));
  40. int _EXFUN(euidaccess, (const char *__path, int __mode));
  41. #endif
  42. int _EXFUN(execl, (const char *__path, const char *, ... ));
  43. int _EXFUN(execle, (const char *__path, const char *, ... ));
  44. int _EXFUN(execlp, (const char *__file, const char *, ... ));
  45. #if defined(__CYGWIN__)
  46. int _EXFUN(execlpe, (const char *__file, const char *, ... ));
  47. #endif
  48. int _EXFUN(execv, (const char *__path, char * const __argv[] ));
  49. int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
  50. int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
  51. #if defined(__CYGWIN__)
  52. int _EXFUN(execvpe, (const char *__file, char * const __argv[], char * const __envp[] ));
  53. #endif
  54. #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__)
  55. int _EXFUN(faccessat, (int __dirfd, const char *__path, int __mode, int __flags));
  56. #endif
  57. #if defined(__CYGWIN__) || defined(__rtems__) || defined(__SPU__)
  58. int _EXFUN(fchdir, (int __fildes));
  59. #endif
  60. int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
  61. #if !defined(__INSIDE_CYGWIN__)
  62. int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
  63. #endif
  64. #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__)
  65. int _EXFUN(fchownat, (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags));
  66. #endif
  67. #if defined(__CYGWIN__)
  68. int _EXFUN(fexecve, (int __fd, char * const __argv[], char * const __envp[] ));
  69. #endif
  70. pid_t _EXFUN(fork, (void ));
  71. long _EXFUN(fpathconf, (int __fd, int __name ));
  72. int _EXFUN(fsync, (int __fd));
  73. int _EXFUN(fdatasync, (int __fd));
  74. #if defined(__CYGWIN__)
  75. char * _EXFUN(get_current_dir_name, (void));
  76. #endif
  77. char * _EXFUN(getcwd, (char *__buf, size_t __size ));
  78. #if defined(__CYGWIN__)
  79. int _EXFUN(getdomainname ,(char *__name, size_t __len));
  80. #endif
  81. #if !defined(__INSIDE_CYGWIN__)
  82. gid_t _EXFUN(getegid, (void ));
  83. uid_t _EXFUN(geteuid, (void ));
  84. gid_t _EXFUN(getgid, (void ));
  85. #endif
  86. int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
  87. #if defined(__CYGWIN__)
  88. long _EXFUN(gethostid, (void));
  89. #endif
  90. char * _EXFUN(getlogin, (void ));
  91. #if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
  92. int _EXFUN(getlogin_r, (char *name, size_t namesize) );
  93. #endif
  94. char * _EXFUN(getpass, (const char *__prompt));
  95. int _EXFUN(getpagesize, (void));
  96. #if defined(__CYGWIN__)
  97. int _EXFUN(getpeereid, (int, uid_t *, gid_t *));
  98. #endif
  99. pid_t _EXFUN(getpgid, (pid_t));
  100. pid_t _EXFUN(getpgrp, (void ));
  101. pid_t _EXFUN(getpid, (void ));
  102. pid_t _EXFUN(getppid, (void ));
  103. #if defined(__CYGWIN__) || defined(__rtems__)
  104. pid_t _EXFUN(getsid, (pid_t));
  105. #endif
  106. #if !defined(__INSIDE_CYGWIN__)
  107. uid_t _EXFUN(getuid, (void ));
  108. #endif
  109. #ifdef __CYGWIN__
  110. char * _EXFUN(getusershell, (void));
  111. char * _EXFUN(getwd, (char *__buf ));
  112. int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser));
  113. #endif
  114. int _EXFUN(isatty, (int __fildes ));
  115. #if !defined(__INSIDE_CYGWIN__)
  116. int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
  117. #endif
  118. int _EXFUN(link, (const char *__path1, const char *__path2 ));
  119. #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__)
  120. int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags ));
  121. #endif
  122. int _EXFUN(nice, (int __nice_value ));
  123. #if !defined(__INSIDE_CYGWIN__)
  124. off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
  125. #endif
  126. #if defined(__SPU__) || defined(__CYGWIN__)
  127. #define F_ULOCK 0
  128. #define F_LOCK 1
  129. #define F_TLOCK 2
  130. #define F_TEST 3
  131. int _EXFUN(lockf, (int __fd, int __cmd, off_t __len));
  132. #endif
  133. long _EXFUN(pathconf, (const char *__path, int __name ));
  134. int _EXFUN(pause, (void ));
  135. #ifdef __CYGWIN__
  136. int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void)));
  137. #endif
  138. int _EXFUN(pipe, (int __fildes[2] ));
  139. #ifdef __CYGWIN__
  140. int _EXFUN(pipe2, (int __fildes[2], int flags));
  141. #endif
  142. ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
  143. ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
  144. _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
  145. #if defined(__CYGWIN__)
  146. int _EXFUN(rresvport, (int *__alport));
  147. int _EXFUN(revoke, (char *__path));
  148. #endif
  149. int _EXFUN(rmdir, (const char *__path ));
  150. #if defined(__CYGWIN__)
  151. int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser));
  152. #endif
  153. void * _EXFUN(sbrk, (ptrdiff_t __incr));
  154. #if !defined(__INSIDE_CYGWIN__)
  155. #if defined(__CYGWIN__) || defined(__rtems__)
  156. int _EXFUN(setegid, (gid_t __gid ));
  157. int _EXFUN(seteuid, (uid_t __uid ));
  158. #endif
  159. int _EXFUN(setgid, (gid_t __gid ));
  160. #endif
  161. #if defined(__CYGWIN__)
  162. int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist ));
  163. #endif
  164. #if __BSD_VISIBLE || (defined(_XOPEN_SOURCE) && __XSI_VISIBLE < 500)
  165. int _EXFUN(sethostname, (const char *, size_t));
  166. #endif
  167. int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
  168. int _EXFUN(setpgrp, (void ));
  169. #if defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
  170. int _EXFUN(setregid, (gid_t __rgid, gid_t __egid));
  171. int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid));
  172. #endif
  173. pid_t _EXFUN(setsid, (void ));
  174. #if !defined(__INSIDE_CYGWIN__)
  175. int _EXFUN(setuid, (uid_t __uid ));
  176. #endif
  177. #if defined(__CYGWIN__)
  178. void _EXFUN(setusershell, (void));
  179. #endif
  180. unsigned _EXFUN(sleep, (unsigned int __seconds ));
  181. void _EXFUN(swab, (const void *__restrict, void *__restrict, ssize_t));
  182. long _EXFUN(sysconf, (int __name ));
  183. pid_t _EXFUN(tcgetpgrp, (int __fildes ));
  184. int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
  185. char * _EXFUN(ttyname, (int __fildes ));
  186. #if defined(__CYGWIN__) || defined(__rtems__)
  187. int _EXFUN(ttyname_r, (int, char *, size_t));
  188. #endif
  189. int _EXFUN(unlink, (const char *__path ));
  190. int _EXFUN(usleep, (useconds_t __useconds));
  191. int _EXFUN(vhangup, (void ));
  192. _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
  193. #ifdef __CYGWIN__
  194. # define __UNISTD_GETOPT__
  195. # include <getopt.h>
  196. # undef __UNISTD_GETOPT__
  197. #else
  198. extern char *optarg; /* getopt(3) external variables */
  199. extern int optind, opterr, optopt;
  200. int getopt(int, char * const [], const char *);
  201. extern int optreset; /* getopt(3) external variable */
  202. #endif
  203. #ifndef _POSIX_SOURCE
  204. pid_t _EXFUN(vfork, (void ));
  205. #endif /* _POSIX_SOURCE */
  206. #ifdef _COMPILING_NEWLIB
  207. /* Provide prototypes for most of the _<systemcall> names that are
  208. provided in newlib for some compilers. */
  209. int _EXFUN(_close, (int __fildes ));
  210. pid_t _EXFUN(_fork, (void ));
  211. pid_t _EXFUN(_getpid, (void ));
  212. int _EXFUN(_isatty, (int __fildes ));
  213. int _EXFUN(_link, (const char *__path1, const char *__path2 ));
  214. _off_t _EXFUN(_lseek, (int __fildes, _off_t __offset, int __whence ));
  215. #ifdef __LARGE64_FILES
  216. _off64_t _EXFUN(_lseek64, (int __filedes, _off64_t __offset, int __whence ));
  217. #endif
  218. _READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte ));
  219. void * _EXFUN(_sbrk, (ptrdiff_t __incr));
  220. int _EXFUN(_unlink, (const char *__path ));
  221. _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte ));
  222. int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
  223. #endif
  224. #if defined(__CYGWIN__) || defined(__rtems__) || defined(__aarch64__) || defined (__arm__) || defined(__sh__) || defined(__SPU__)
  225. #if !defined(__INSIDE_CYGWIN__)
  226. int _EXFUN(ftruncate, (int __fd, off_t __length));
  227. int _EXFUN(truncate, (const char *, off_t __length));
  228. #endif
  229. #endif
  230. #if defined(__CYGWIN__) || defined(__rtems__)
  231. int _EXFUN(getdtablesize, (void));
  232. int _EXFUN(setdtablesize, (int));
  233. useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
  234. #if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
  235. /* winsock[2].h defines as __stdcall, and with int as 2nd arg */
  236. int _EXFUN(gethostname, (char *__name, size_t __len));
  237. #endif
  238. char * _EXFUN(mktemp, (char *));
  239. #endif
  240. #if defined(__CYGWIN__) || defined(__SPU__) || defined(__rtems__)
  241. void _EXFUN(sync, (void));
  242. #endif
  243. ssize_t _EXFUN(readlink, (const char *__restrict __path,
  244. char *__restrict __buf, size_t __buflen));
  245. #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__)
  246. ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__restrict __path,
  247. char *__restrict __buf, size_t __buflen));
  248. #endif
  249. int _EXFUN(symlink, (const char *__name1, const char *__name2));
  250. #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE || defined(__CYGWIN__)
  251. int _EXFUN(symlinkat, (const char *, int, const char *));
  252. int _EXFUN(unlinkat, (int, const char *, int));
  253. #endif
  254. #define F_OK 0
  255. #define R_OK 4
  256. #define W_OK 2
  257. #define X_OK 1
  258. # define SEEK_SET 0
  259. # define SEEK_CUR 1
  260. # define SEEK_END 2
  261. #include <sys/features.h>
  262. #define STDIN_FILENO 0 /* standard input file descriptor */
  263. #define STDOUT_FILENO 1 /* standard output file descriptor */
  264. #define STDERR_FILENO 2 /* standard error file descriptor */
  265. /*
  266. * sysconf values per IEEE Std 1003.1, 2008 Edition
  267. */
  268. #define _SC_ARG_MAX 0
  269. #define _SC_CHILD_MAX 1
  270. #define _SC_CLK_TCK 2
  271. #define _SC_NGROUPS_MAX 3
  272. #define _SC_OPEN_MAX 4
  273. #define _SC_JOB_CONTROL 5
  274. #define _SC_SAVED_IDS 6
  275. #define _SC_VERSION 7
  276. #define _SC_PAGESIZE 8
  277. #define _SC_PAGE_SIZE _SC_PAGESIZE
  278. /* These are non-POSIX values we accidentally introduced in 2000 without
  279. guarding them. Keeping them unguarded for backward compatibility. */
  280. #define _SC_NPROCESSORS_CONF 9
  281. #define _SC_NPROCESSORS_ONLN 10
  282. #define _SC_PHYS_PAGES 11
  283. #define _SC_AVPHYS_PAGES 12
  284. /* End of non-POSIX values. */
  285. #define _SC_MQ_OPEN_MAX 13
  286. #define _SC_MQ_PRIO_MAX 14
  287. #define _SC_RTSIG_MAX 15
  288. #define _SC_SEM_NSEMS_MAX 16
  289. #define _SC_SEM_VALUE_MAX 17
  290. #define _SC_SIGQUEUE_MAX 18
  291. #define _SC_TIMER_MAX 19
  292. #define _SC_TZNAME_MAX 20
  293. #define _SC_ASYNCHRONOUS_IO 21
  294. #define _SC_FSYNC 22
  295. #define _SC_MAPPED_FILES 23
  296. #define _SC_MEMLOCK 24
  297. #define _SC_MEMLOCK_RANGE 25
  298. #define _SC_MEMORY_PROTECTION 26
  299. #define _SC_MESSAGE_PASSING 27
  300. #define _SC_PRIORITIZED_IO 28
  301. #define _SC_REALTIME_SIGNALS 29
  302. #define _SC_SEMAPHORES 30
  303. #define _SC_SHARED_MEMORY_OBJECTS 31
  304. #define _SC_SYNCHRONIZED_IO 32
  305. #define _SC_TIMERS 33
  306. #define _SC_AIO_LISTIO_MAX 34
  307. #define _SC_AIO_MAX 35
  308. #define _SC_AIO_PRIO_DELTA_MAX 36
  309. #define _SC_DELAYTIMER_MAX 37
  310. #define _SC_THREAD_KEYS_MAX 38
  311. #define _SC_THREAD_STACK_MIN 39
  312. #define _SC_THREAD_THREADS_MAX 40
  313. #define _SC_TTY_NAME_MAX 41
  314. #define _SC_THREADS 42
  315. #define _SC_THREAD_ATTR_STACKADDR 43
  316. #define _SC_THREAD_ATTR_STACKSIZE 44
  317. #define _SC_THREAD_PRIORITY_SCHEDULING 45
  318. #define _SC_THREAD_PRIO_INHERIT 46
  319. /* _SC_THREAD_PRIO_PROTECT was _SC_THREAD_PRIO_CEILING in early drafts */
  320. #define _SC_THREAD_PRIO_PROTECT 47
  321. #define _SC_THREAD_PRIO_CEILING _SC_THREAD_PRIO_PROTECT
  322. #define _SC_THREAD_PROCESS_SHARED 48
  323. #define _SC_THREAD_SAFE_FUNCTIONS 49
  324. #define _SC_GETGR_R_SIZE_MAX 50
  325. #define _SC_GETPW_R_SIZE_MAX 51
  326. #define _SC_LOGIN_NAME_MAX 52
  327. #define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
  328. #define _SC_ADVISORY_INFO 54
  329. #define _SC_ATEXIT_MAX 55
  330. #define _SC_BARRIERS 56
  331. #define _SC_BC_BASE_MAX 57
  332. #define _SC_BC_DIM_MAX 58
  333. #define _SC_BC_SCALE_MAX 59
  334. #define _SC_BC_STRING_MAX 60
  335. #define _SC_CLOCK_SELECTION 61
  336. #define _SC_COLL_WEIGHTS_MAX 62
  337. #define _SC_CPUTIME 63
  338. #define _SC_EXPR_NEST_MAX 64
  339. #define _SC_HOST_NAME_MAX 65
  340. #define _SC_IOV_MAX 66
  341. #define _SC_IPV6 67
  342. #define _SC_LINE_MAX 68
  343. #define _SC_MONOTONIC_CLOCK 69
  344. #define _SC_RAW_SOCKETS 70
  345. #define _SC_READER_WRITER_LOCKS 71
  346. #define _SC_REGEXP 72
  347. #define _SC_RE_DUP_MAX 73
  348. #define _SC_SHELL 74
  349. #define _SC_SPAWN 75
  350. #define _SC_SPIN_LOCKS 76
  351. #define _SC_SPORADIC_SERVER 77
  352. #define _SC_SS_REPL_MAX 78
  353. #define _SC_SYMLOOP_MAX 79
  354. #define _SC_THREAD_CPUTIME 80
  355. #define _SC_THREAD_SPORADIC_SERVER 81
  356. #define _SC_TIMEOUTS 82
  357. #define _SC_TRACE 83
  358. #define _SC_TRACE_EVENT_FILTER 84
  359. #define _SC_TRACE_EVENT_NAME_MAX 85
  360. #define _SC_TRACE_INHERIT 86
  361. #define _SC_TRACE_LOG 87
  362. #define _SC_TRACE_NAME_MAX 88
  363. #define _SC_TRACE_SYS_MAX 89
  364. #define _SC_TRACE_USER_EVENT_MAX 90
  365. #define _SC_TYPED_MEMORY_OBJECTS 91
  366. #define _SC_V7_ILP32_OFF32 92
  367. #define _SC_V6_ILP32_OFF32 _SC_V7_ILP32_OFF32
  368. #define _SC_XBS5_ILP32_OFF32 _SC_V7_ILP32_OFF32
  369. #define _SC_V7_ILP32_OFFBIG 93
  370. #define _SC_V6_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
  371. #define _SC_XBS5_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
  372. #define _SC_V7_LP64_OFF64 94
  373. #define _SC_V6_LP64_OFF64 _SC_V7_LP64_OFF64
  374. #define _SC_XBS5_LP64_OFF64 _SC_V7_LP64_OFF64
  375. #define _SC_V7_LPBIG_OFFBIG 95
  376. #define _SC_V6_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
  377. #define _SC_XBS5_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
  378. #define _SC_XOPEN_CRYPT 96
  379. #define _SC_XOPEN_ENH_I18N 97
  380. #define _SC_XOPEN_LEGACY 98
  381. #define _SC_XOPEN_REALTIME 99
  382. #define _SC_STREAM_MAX 100
  383. #define _SC_PRIORITY_SCHEDULING 101
  384. #define _SC_XOPEN_REALTIME_THREADS 102
  385. #define _SC_XOPEN_SHM 103
  386. #define _SC_XOPEN_STREAMS 104
  387. #define _SC_XOPEN_UNIX 105
  388. #define _SC_XOPEN_VERSION 106
  389. #define _SC_2_CHAR_TERM 107
  390. #define _SC_2_C_BIND 108
  391. #define _SC_2_C_DEV 109
  392. #define _SC_2_FORT_DEV 110
  393. #define _SC_2_FORT_RUN 111
  394. #define _SC_2_LOCALEDEF 112
  395. #define _SC_2_PBS 113
  396. #define _SC_2_PBS_ACCOUNTING 114
  397. #define _SC_2_PBS_CHECKPOINT 115
  398. #define _SC_2_PBS_LOCATE 116
  399. #define _SC_2_PBS_MESSAGE 117
  400. #define _SC_2_PBS_TRACK 118
  401. #define _SC_2_SW_DEV 119
  402. #define _SC_2_UPE 120
  403. #define _SC_2_VERSION 121
  404. #define _SC_THREAD_ROBUST_PRIO_INHERIT 122
  405. #define _SC_THREAD_ROBUST_PRIO_PROTECT 123
  406. #define _SC_XOPEN_UUCP 124
  407. /*
  408. * pathconf values per IEEE Std 1003.1, 2008 Edition
  409. */
  410. #define _PC_LINK_MAX 0
  411. #define _PC_MAX_CANON 1
  412. #define _PC_MAX_INPUT 2
  413. #define _PC_NAME_MAX 3
  414. #define _PC_PATH_MAX 4
  415. #define _PC_PIPE_BUF 5
  416. #define _PC_CHOWN_RESTRICTED 6
  417. #define _PC_NO_TRUNC 7
  418. #define _PC_VDISABLE 8
  419. #define _PC_ASYNC_IO 9
  420. #define _PC_PRIO_IO 10
  421. #define _PC_SYNC_IO 11
  422. #define _PC_FILESIZEBITS 12
  423. #define _PC_2_SYMLINKS 13
  424. #define _PC_SYMLINK_MAX 14
  425. #define _PC_ALLOC_SIZE_MIN 15
  426. #define _PC_REC_INCR_XFER_SIZE 16
  427. #define _PC_REC_MAX_XFER_SIZE 17
  428. #define _PC_REC_MIN_XFER_SIZE 18
  429. #define _PC_REC_XFER_ALIGN 19
  430. #define _PC_TIMESTAMP_RESOLUTION 20
  431. #ifdef __CYGWIN__
  432. /* Ask for POSIX permission bits support. */
  433. #define _PC_POSIX_PERMISSIONS 90
  434. /* Ask for full POSIX permission support including uid/gid settings. */
  435. #define _PC_POSIX_SECURITY 91
  436. #endif
  437. /*
  438. * confstr values per IEEE Std 1003.1, 2004 Edition
  439. */
  440. #ifdef __CYGWIN__ /* Only defined on Cygwin for now. */
  441. #define _CS_PATH 0
  442. #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1
  443. #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
  444. #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
  445. #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 2
  446. #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
  447. #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
  448. #define _CS_POSIX_V7_ILP32_OFF32_LIBS 3
  449. #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
  450. #define _CS_XBS5_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
  451. #define _CS_XBS5_ILP32_OFF32_LINTFLAGS 4
  452. #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 5
  453. #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
  454. #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
  455. #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 6
  456. #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
  457. #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
  458. #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 7
  459. #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
  460. #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
  461. #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 8
  462. #define _CS_POSIX_V7_LP64_OFF64_CFLAGS 9
  463. #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
  464. #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
  465. #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 10
  466. #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
  467. #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
  468. #define _CS_POSIX_V7_LP64_OFF64_LIBS 11
  469. #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
  470. #define _CS_XBS5_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
  471. #define _CS_XBS5_LP64_OFF64_LINTFLAGS 12
  472. #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 13
  473. #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
  474. #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
  475. #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 14
  476. #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
  477. #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
  478. #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 15
  479. #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
  480. #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
  481. #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16
  482. #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17
  483. #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
  484. #define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
  485. #define _CS_POSIX_V7_THREADS_CFLAGS 18
  486. #define _CS_POSIX_V7_THREADS_LDFLAGS 19
  487. #define _CS_V7_ENV 20
  488. #define _CS_V6_ENV _CS_V7_ENV
  489. #endif
  490. #ifdef __cplusplus
  491. }
  492. #endif
  493. #endif /* _SYS_UNISTD_H */