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