Subversion Repositories Kolibri OS

Rev

Rev 4921 | Rev 6536 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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