You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

600 line
22KB

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