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