2011-02-12 08:22:29 +03:00
|
|
|
#ifndef _UNISTD_H
|
|
|
|
#define _UNISTD_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-09-08 07:13:55 +04:00
|
|
|
#include <features.h>
|
further use of _Noreturn, for non-plain-C functions
note that POSIX does not specify these functions as _Noreturn, because
POSIX is aligned with C99, not the new C11 standard. when POSIX is
eventually updated to C11, it will almost surely give these functions
the _Noreturn attribute. for now, the actual _Noreturn keyword is not
used anyway when compiling with a c99 compiler, which is what POSIX
requires; the GCC __attribute__ is used instead if it's available,
however.
in a few places, I've added infinite for loops at the end of _Noreturn
functions to silence compiler warnings. presumably
__buildin_unreachable could achieve the same thing, but it would only
work on newer GCCs and would not be portable. the loops should have
near-zero code size cost anyway.
like the previous _Noreturn commit, this one is based on patches
contributed by philomath.
2012-09-07 07:34:10 +04:00
|
|
|
|
2011-02-12 08:22:29 +03:00
|
|
|
#define STDIN_FILENO 0
|
|
|
|
#define STDOUT_FILENO 1
|
|
|
|
#define STDERR_FILENO 2
|
|
|
|
|
|
|
|
#define SEEK_SET 0
|
|
|
|
#define SEEK_CUR 1
|
|
|
|
#define SEEK_END 2
|
|
|
|
|
2013-11-25 06:42:55 +04:00
|
|
|
#ifdef __cplusplus
|
use a common definition of NULL as 0L for C and C++
the historical mess of having different definitions for C and C++
comes from the historical C definition as (void *)0 and the fact that
(void *)0 can't be used in C++ because it does not convert to other
pointer types implicitly. however, using plain 0 in C++ exposed bugs
in C++ programs that call variadic functions with NULL as an argument
and (wrongly; this is UB) expect it to arrive as a null pointer. on
64-bit machines, the high bits end up containing junk. glibc dodges
the issue by using a GCC extension __null to define NULL; this is
observably non-conforming because a conforming application could
observe the definition of NULL via stringizing and see that it is
neither an integer constant expression with value zero nor such an
expression cast to void.
switching to 0L eliminates the issue and provides compatibility with
broken applications, since on all musl targets, long and pointers have
the same size, representation, and argument-passing convention. we
could maintain separate C and C++ definitions of NULL (i.e. just use
0L on C++ and use (void *)0 on C) but after careful analysis, it seems
extremely difficult for a C program to even determine whether NULL has
integer or pointer type, much less depend in subtle, unintentional
ways, on whether it does. C89 seems to have no way to make the
distinction. on C99, the fact that (int)(void *)0 is not an integer
constant expression, along with subtle VLA/sizeof semantics, can be
used to make the distinction, but many compilers are non-conforming
and give the wrong result to this test anyway. on C11, _Generic can
trivially make the distinction, but it seems unlikely that code
targetting C11 would be so backwards in caring which definition of
NULL an implementation uses.
as such, the simplest path of using the same definition for NULL in
both C and C++ was chosen. the #undef directive was also removed so
that the compiler can catch and give a warning or error on
redefinition if buggy programs have defined their own versions of
NULL prior to inclusion of standard headers.
2013-01-19 05:35:26 +04:00
|
|
|
#define NULL 0L
|
2013-11-25 06:42:55 +04:00
|
|
|
#else
|
|
|
|
#define NULL ((void*)0)
|
|
|
|
#endif
|
2011-02-12 08:22:29 +03:00
|
|
|
|
|
|
|
#define __NEED_size_t
|
|
|
|
#define __NEED_ssize_t
|
|
|
|
#define __NEED_uid_t
|
|
|
|
#define __NEED_gid_t
|
|
|
|
#define __NEED_off_t
|
|
|
|
#define __NEED_pid_t
|
|
|
|
#define __NEED_intptr_t
|
2013-04-02 06:38:23 +04:00
|
|
|
#define __NEED_useconds_t
|
2011-02-12 08:22:29 +03:00
|
|
|
|
|
|
|
#include <bits/alltypes.h>
|
|
|
|
|
|
|
|
int pipe(int [2]);
|
2012-09-30 01:42:21 +04:00
|
|
|
int pipe2(int [2], int);
|
2011-02-12 08:22:29 +03:00
|
|
|
int close(int);
|
2013-12-07 06:59:01 +04:00
|
|
|
int posix_close(int, int);
|
2011-02-12 08:22:29 +03:00
|
|
|
int dup(int);
|
|
|
|
int dup2(int, int);
|
2012-09-30 01:42:21 +04:00
|
|
|
int dup3(int, int, int);
|
2011-02-12 08:22:29 +03:00
|
|
|
off_t lseek(int, off_t, int);
|
|
|
|
int fsync(int);
|
|
|
|
int fdatasync(int);
|
|
|
|
|
|
|
|
ssize_t read(int, void *, size_t);
|
|
|
|
ssize_t write(int, const void *, size_t);
|
|
|
|
ssize_t pread(int, void *, size_t, off_t);
|
|
|
|
ssize_t pwrite(int, const void *, size_t, off_t);
|
|
|
|
|
|
|
|
int chown(const char *, uid_t, gid_t);
|
|
|
|
int fchown(int, uid_t, gid_t);
|
|
|
|
int lchown(const char *, uid_t, gid_t);
|
|
|
|
int fchownat(int, const char *, uid_t, gid_t, int);
|
|
|
|
|
|
|
|
int link(const char *, const char *);
|
|
|
|
int linkat(int, const char *, int, const char *, int);
|
|
|
|
int symlink(const char *, const char *);
|
|
|
|
int symlinkat(const char *, int, const char *);
|
2012-09-07 06:44:55 +04:00
|
|
|
ssize_t readlink(const char *__restrict, char *__restrict, size_t);
|
|
|
|
ssize_t readlinkat(int, const char *__restrict, char *__restrict, size_t);
|
2011-02-12 08:22:29 +03:00
|
|
|
int unlink(const char *);
|
|
|
|
int unlinkat(int, const char *, int);
|
|
|
|
int rmdir(const char *);
|
|
|
|
int truncate(const char *, off_t);
|
|
|
|
int ftruncate(int, off_t);
|
|
|
|
|
|
|
|
#define F_OK 0
|
|
|
|
#define R_OK 4
|
|
|
|
#define W_OK 2
|
|
|
|
#define X_OK 1
|
2012-05-23 05:52:08 +04:00
|
|
|
|
2011-02-12 08:22:29 +03:00
|
|
|
int access(const char *, int);
|
|
|
|
int faccessat(int, const char *, int, int);
|
|
|
|
|
|
|
|
int chdir(const char *);
|
|
|
|
int fchdir(int);
|
|
|
|
char *getcwd(char *, size_t);
|
|
|
|
|
|
|
|
unsigned alarm(unsigned);
|
|
|
|
unsigned sleep(unsigned);
|
|
|
|
int pause(void);
|
|
|
|
|
|
|
|
pid_t fork(void);
|
|
|
|
int execve(const char *, char *const [], char *const []);
|
|
|
|
int execv(const char *, char *const []);
|
2011-04-28 00:06:33 +04:00
|
|
|
int execle(const char *, const char *, ...);
|
|
|
|
int execl(const char *, const char *, ...);
|
2011-02-12 08:22:29 +03:00
|
|
|
int execvp(const char *, char *const []);
|
2011-04-28 00:06:33 +04:00
|
|
|
int execlp(const char *, const char *, ...);
|
2011-02-27 10:59:23 +03:00
|
|
|
int fexecve(int, char *const [], char *const []);
|
further use of _Noreturn, for non-plain-C functions
note that POSIX does not specify these functions as _Noreturn, because
POSIX is aligned with C99, not the new C11 standard. when POSIX is
eventually updated to C11, it will almost surely give these functions
the _Noreturn attribute. for now, the actual _Noreturn keyword is not
used anyway when compiling with a c99 compiler, which is what POSIX
requires; the GCC __attribute__ is used instead if it's available,
however.
in a few places, I've added infinite for loops at the end of _Noreturn
functions to silence compiler warnings. presumably
__buildin_unreachable could achieve the same thing, but it would only
work on newer GCCs and would not be portable. the loops should have
near-zero code size cost anyway.
like the previous _Noreturn commit, this one is based on patches
contributed by philomath.
2012-09-07 07:34:10 +04:00
|
|
|
_Noreturn void _exit(int);
|
2011-02-12 08:22:29 +03:00
|
|
|
|
|
|
|
pid_t getpid(void);
|
|
|
|
pid_t getppid(void);
|
|
|
|
pid_t getpgrp(void);
|
|
|
|
pid_t getpgid(pid_t);
|
|
|
|
int setpgid(pid_t, pid_t);
|
|
|
|
pid_t setsid(void);
|
|
|
|
pid_t getsid(pid_t);
|
|
|
|
char *ttyname(int);
|
|
|
|
int ttyname_r(int, char *, size_t);
|
|
|
|
int isatty(int);
|
|
|
|
pid_t tcgetpgrp(int);
|
|
|
|
int tcsetpgrp(int, pid_t);
|
|
|
|
|
|
|
|
uid_t getuid(void);
|
|
|
|
uid_t geteuid(void);
|
|
|
|
gid_t getgid(void);
|
|
|
|
gid_t getegid(void);
|
|
|
|
int getgroups(int, gid_t []);
|
|
|
|
int setuid(uid_t);
|
|
|
|
int seteuid(uid_t);
|
|
|
|
int setgid(gid_t);
|
|
|
|
int setegid(gid_t);
|
|
|
|
|
|
|
|
char *getlogin(void);
|
|
|
|
int getlogin_r(char *, size_t);
|
|
|
|
int gethostname(char *, size_t);
|
|
|
|
char *ctermid(char *);
|
|
|
|
|
|
|
|
int getopt(int, char * const [], const char *);
|
|
|
|
extern char *optarg;
|
|
|
|
extern int optind, opterr, optopt;
|
|
|
|
|
|
|
|
long pathconf(const char *, int);
|
|
|
|
long fpathconf(int, int);
|
|
|
|
long sysconf(int);
|
|
|
|
size_t confstr(int, char *, size_t);
|
|
|
|
|
2018-03-11 02:02:05 +03:00
|
|
|
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
2011-02-16 00:28:36 +03:00
|
|
|
#define F_ULOCK 0
|
|
|
|
#define F_LOCK 1
|
|
|
|
#define F_TLOCK 2
|
|
|
|
#define F_TEST 3
|
2016-10-21 00:20:01 +03:00
|
|
|
int setreuid(uid_t, uid_t);
|
|
|
|
int setregid(gid_t, gid_t);
|
2011-02-16 00:28:36 +03:00
|
|
|
int lockf(int, int, off_t);
|
2012-05-23 06:28:17 +04:00
|
|
|
long gethostid(void);
|
|
|
|
int nice(int);
|
|
|
|
void sync(void);
|
2011-09-14 05:09:35 +04:00
|
|
|
pid_t setpgrp(void);
|
2011-02-16 00:28:36 +03:00
|
|
|
char *crypt(const char *, const char *);
|
|
|
|
void encrypt(char *, int);
|
2020-07-22 03:16:04 +03:00
|
|
|
// Copies n bytes from the array pointed to by _src to the array pointed to by _dest,
|
|
|
|
// exchanging adjacent even and odd bytes.
|
|
|
|
void swab(const void *restrict _src : itype(restrict _Array_ptr<const void>) byte_count(n),
|
|
|
|
void *restrict _dest : itype(restrict _Array_ptr<void>) byte_count(n),
|
|
|
|
ssize_t n);
|
2011-02-16 00:28:36 +03:00
|
|
|
#endif
|
|
|
|
|
2012-08-15 23:35:32 +04:00
|
|
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
|
2012-11-01 11:49:43 +04:00
|
|
|
|| (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
|
2012-08-15 23:35:32 +04:00
|
|
|
int usleep(unsigned);
|
|
|
|
unsigned ualarm(unsigned, unsigned);
|
|
|
|
#endif
|
|
|
|
|
2012-05-23 05:52:08 +04:00
|
|
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
2012-05-23 06:28:17 +04:00
|
|
|
#define L_SET 0
|
|
|
|
#define L_INCR 1
|
|
|
|
#define L_XTND 2
|
2011-02-19 09:02:46 +03:00
|
|
|
int brk(void *);
|
|
|
|
void *sbrk(intptr_t);
|
2011-02-16 00:28:36 +03:00
|
|
|
pid_t vfork(void);
|
|
|
|
int vhangup(void);
|
|
|
|
int chroot(const char *);
|
|
|
|
int getpagesize(void);
|
2012-05-23 06:28:17 +04:00
|
|
|
int getdtablesize(void);
|
2011-02-16 00:28:36 +03:00
|
|
|
int sethostname(const char *, size_t);
|
2012-05-23 06:28:17 +04:00
|
|
|
int getdomainname(char *, size_t);
|
2012-09-10 00:50:20 +04:00
|
|
|
int setdomainname(const char *, size_t);
|
2012-12-06 22:48:14 +04:00
|
|
|
int setgroups(size_t, const gid_t *);
|
2012-05-23 05:52:08 +04:00
|
|
|
char *getpass(const char *);
|
2012-05-23 06:28:17 +04:00
|
|
|
int daemon(int, int);
|
|
|
|
void setusershell(void);
|
|
|
|
void endusershell(void);
|
|
|
|
char *getusershell(void);
|
2012-09-09 04:22:08 +04:00
|
|
|
int acct(const char *);
|
2012-12-11 01:40:45 +04:00
|
|
|
long syscall(long, ...);
|
2014-04-19 07:40:28 +04:00
|
|
|
int execvpe(const char *, char *const [], char *const []);
|
add issetugid function to check for elevated privilege
this function provides a way for third-party library code to use the
same logic that's used internally in libc for suppressing untrusted
input/state (e.g. the environment) when the application is running
with privleges elevated by the setuid or setgid bit or some other
mechanism. its semantics are intended to match the openbsd function by
the same name.
there was some question as to whether this function is necessary:
getauxval(AT_SECURE) was proposed as an alternative. however, this has
several drawbacks. the most obvious is that it asks programmers to be
aware of an implementation detail of ELF-based systems (the aux
vector) rather than simply the semantic predicate to be checked. and
trying to write a safe, reliable version of issetugid in terms of
getauxval is difficult. for example, early versions of the glibc
getauxval did not report ENOENT, which could lead to false negatives
if AT_SECURE was not present in the aux vector (this could probably
only happen when running on non-linux kernels under linux emulation,
since glibc does not support linux versions old enough to lack
AT_SECURE). as for musl, getauxval has always properly reported
errors, but prior to commit 7bece9c2095ee81f14b1088f6b0ba2f37fecb283,
the musl implementation did not emulate AT_SECURE if missing, which
would result in a false positive. since musl actually does partially
support kernels that lack AT_SECURE, this was problematic.
the intent is that library authors will use issetugid if its
availability is detected at build time, and only fall back to the
unreliable alternatives on systems that lack it.
patch by Brent Cook. commit message/rationale by Rich Felker.
2014-07-15 20:30:07 +04:00
|
|
|
int issetugid(void);
|
2018-02-23 10:54:01 +03:00
|
|
|
int getentropy(void *, size_t);
|
2019-08-31 00:48:47 +03:00
|
|
|
extern int optreset;
|
2012-05-23 05:52:08 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _GNU_SOURCE
|
2012-06-03 00:51:04 +04:00
|
|
|
extern char **environ;
|
2011-04-04 00:20:57 +04:00
|
|
|
int setresuid(uid_t, uid_t, uid_t);
|
|
|
|
int setresgid(gid_t, gid_t, gid_t);
|
2012-04-22 18:37:19 +04:00
|
|
|
int getresuid(uid_t *, uid_t *, uid_t *);
|
|
|
|
int getresgid(gid_t *, gid_t *, gid_t *);
|
2012-02-18 08:10:00 +04:00
|
|
|
char *get_current_dir_name(void);
|
2015-07-09 20:07:35 +03:00
|
|
|
int syncfs(int);
|
2013-08-03 10:18:19 +04:00
|
|
|
int euidaccess(const char *, int);
|
|
|
|
int eaccess(const char *, int);
|
2019-08-20 02:41:14 +03:00
|
|
|
ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
|
2011-02-16 00:28:36 +03:00
|
|
|
#endif
|
|
|
|
|
2012-06-04 16:03:56 +04:00
|
|
|
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
2012-05-04 08:13:23 +04:00
|
|
|
#define lseek64 lseek
|
|
|
|
#define pread64 pread
|
|
|
|
#define pwrite64 pwrite
|
|
|
|
#define truncate64 truncate
|
|
|
|
#define ftruncate64 ftruncate
|
|
|
|
#define lockf64 lockf
|
|
|
|
#define off64_t off_t
|
|
|
|
#endif
|
|
|
|
|
2013-12-07 06:59:01 +04:00
|
|
|
#define POSIX_CLOSE_RESTART 0
|
|
|
|
|
2011-02-12 08:22:29 +03:00
|
|
|
#define _XOPEN_VERSION 700
|
|
|
|
#define _XOPEN_UNIX 1
|
|
|
|
#define _XOPEN_ENH_I18N 1
|
|
|
|
|
|
|
|
#define _POSIX_VERSION 200809L
|
|
|
|
#define _POSIX2_VERSION _POSIX_VERSION
|
|
|
|
|
2013-07-27 07:07:54 +04:00
|
|
|
#define _POSIX_ADVISORY_INFO _POSIX_VERSION
|
2011-02-12 08:22:29 +03:00
|
|
|
#define _POSIX_CHOWN_RESTRICTED 1
|
|
|
|
#define _POSIX_IPV6 _POSIX_VERSION
|
|
|
|
#define _POSIX_JOB_CONTROL 1
|
|
|
|
#define _POSIX_MAPPED_FILES _POSIX_VERSION
|
|
|
|
#define _POSIX_MEMLOCK _POSIX_VERSION
|
|
|
|
#define _POSIX_MEMLOCK_RANGE _POSIX_VERSION
|
|
|
|
#define _POSIX_MEMORY_PROTECTION _POSIX_VERSION
|
2013-07-27 07:07:54 +04:00
|
|
|
#define _POSIX_MESSAGE_PASSING _POSIX_VERSION
|
2012-09-30 09:52:17 +04:00
|
|
|
#define _POSIX_FSYNC _POSIX_VERSION
|
2011-02-12 08:22:29 +03:00
|
|
|
#define _POSIX_NO_TRUNC 1
|
|
|
|
#define _POSIX_RAW_SOCKETS _POSIX_VERSION
|
|
|
|
#define _POSIX_REALTIME_SIGNALS _POSIX_VERSION
|
|
|
|
#define _POSIX_REGEXP 1
|
|
|
|
#define _POSIX_SAVED_IDS 1
|
|
|
|
#define _POSIX_SHELL 1
|
2013-07-26 23:51:28 +04:00
|
|
|
#define _POSIX_SPAWN _POSIX_VERSION
|
2011-02-12 08:22:29 +03:00
|
|
|
#define _POSIX_VDISABLE 0
|
|
|
|
|
|
|
|
#define _POSIX_THREADS _POSIX_VERSION
|
|
|
|
#define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
|
|
|
|
#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
|
2012-09-30 09:52:17 +04:00
|
|
|
#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
|
|
|
|
#define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
|
2012-11-12 00:54:20 +04:00
|
|
|
#define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION
|
2013-06-27 03:43:24 +04:00
|
|
|
#define _POSIX_THREAD_CPUTIME _POSIX_VERSION
|
2011-02-12 08:22:29 +03:00
|
|
|
#define _POSIX_TIMERS _POSIX_VERSION
|
|
|
|
#define _POSIX_TIMEOUTS _POSIX_VERSION
|
|
|
|
#define _POSIX_MONOTONIC_CLOCK _POSIX_VERSION
|
|
|
|
#define _POSIX_CPUTIME _POSIX_VERSION
|
|
|
|
#define _POSIX_CLOCK_SELECTION _POSIX_VERSION
|
|
|
|
#define _POSIX_BARRIERS _POSIX_VERSION
|
|
|
|
#define _POSIX_SPIN_LOCKS _POSIX_VERSION
|
|
|
|
#define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
|
|
|
|
#define _POSIX_ASYNCHRONOUS_IO _POSIX_VERSION
|
|
|
|
#define _POSIX_SEMAPHORES _POSIX_VERSION
|
2013-07-27 08:02:39 +04:00
|
|
|
#define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION
|
2011-02-12 08:22:29 +03:00
|
|
|
|
|
|
|
#define _POSIX2_C_BIND _POSIX_VERSION
|
|
|
|
|
|
|
|
#include <bits/posix.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define _PC_LINK_MAX 0
|
|
|
|
#define _PC_MAX_CANON 1
|
|
|
|
#define _PC_MAX_INPUT 2
|
|
|
|
#define _PC_NAME_MAX 3
|
|
|
|
#define _PC_PATH_MAX 4
|
|
|
|
#define _PC_PIPE_BUF 5
|
|
|
|
#define _PC_CHOWN_RESTRICTED 6
|
|
|
|
#define _PC_NO_TRUNC 7
|
|
|
|
#define _PC_VDISABLE 8
|
|
|
|
#define _PC_SYNC_IO 9
|
|
|
|
#define _PC_ASYNC_IO 10
|
|
|
|
#define _PC_PRIO_IO 11
|
|
|
|
#define _PC_SOCK_MAXBUF 12
|
|
|
|
#define _PC_FILESIZEBITS 13
|
|
|
|
#define _PC_REC_INCR_XFER_SIZE 14
|
|
|
|
#define _PC_REC_MAX_XFER_SIZE 15
|
|
|
|
#define _PC_REC_MIN_XFER_SIZE 16
|
|
|
|
#define _PC_REC_XFER_ALIGN 17
|
|
|
|
#define _PC_ALLOC_SIZE_MIN 18
|
|
|
|
#define _PC_SYMLINK_MAX 19
|
|
|
|
#define _PC_2_SYMLINKS 20
|
|
|
|
|
|
|
|
#define _SC_ARG_MAX 0
|
|
|
|
#define _SC_CHILD_MAX 1
|
|
|
|
#define _SC_CLK_TCK 2
|
|
|
|
#define _SC_NGROUPS_MAX 3
|
|
|
|
#define _SC_OPEN_MAX 4
|
|
|
|
#define _SC_STREAM_MAX 5
|
|
|
|
#define _SC_TZNAME_MAX 6
|
|
|
|
#define _SC_JOB_CONTROL 7
|
|
|
|
#define _SC_SAVED_IDS 8
|
|
|
|
#define _SC_REALTIME_SIGNALS 9
|
|
|
|
#define _SC_PRIORITY_SCHEDULING 10
|
|
|
|
#define _SC_TIMERS 11
|
|
|
|
#define _SC_ASYNCHRONOUS_IO 12
|
|
|
|
#define _SC_PRIORITIZED_IO 13
|
|
|
|
#define _SC_SYNCHRONIZED_IO 14
|
|
|
|
#define _SC_FSYNC 15
|
|
|
|
#define _SC_MAPPED_FILES 16
|
|
|
|
#define _SC_MEMLOCK 17
|
|
|
|
#define _SC_MEMLOCK_RANGE 18
|
|
|
|
#define _SC_MEMORY_PROTECTION 19
|
|
|
|
#define _SC_MESSAGE_PASSING 20
|
|
|
|
#define _SC_SEMAPHORES 21
|
|
|
|
#define _SC_SHARED_MEMORY_OBJECTS 22
|
|
|
|
#define _SC_AIO_LISTIO_MAX 23
|
|
|
|
#define _SC_AIO_MAX 24
|
|
|
|
#define _SC_AIO_PRIO_DELTA_MAX 25
|
|
|
|
#define _SC_DELAYTIMER_MAX 26
|
|
|
|
#define _SC_MQ_OPEN_MAX 27
|
|
|
|
#define _SC_MQ_PRIO_MAX 28
|
|
|
|
#define _SC_VERSION 29
|
|
|
|
#define _SC_PAGE_SIZE 30
|
|
|
|
#define _SC_PAGESIZE 30 /* !! */
|
|
|
|
#define _SC_RTSIG_MAX 31
|
|
|
|
#define _SC_SEM_NSEMS_MAX 32
|
|
|
|
#define _SC_SEM_VALUE_MAX 33
|
|
|
|
#define _SC_SIGQUEUE_MAX 34
|
|
|
|
#define _SC_TIMER_MAX 35
|
|
|
|
#define _SC_BC_BASE_MAX 36
|
|
|
|
#define _SC_BC_DIM_MAX 37
|
|
|
|
#define _SC_BC_SCALE_MAX 38
|
|
|
|
#define _SC_BC_STRING_MAX 39
|
|
|
|
#define _SC_COLL_WEIGHTS_MAX 40
|
|
|
|
#define _SC_EXPR_NEST_MAX 42
|
|
|
|
#define _SC_LINE_MAX 43
|
|
|
|
#define _SC_RE_DUP_MAX 44
|
|
|
|
#define _SC_2_VERSION 46
|
|
|
|
#define _SC_2_C_BIND 47
|
|
|
|
#define _SC_2_C_DEV 48
|
|
|
|
#define _SC_2_FORT_DEV 49
|
|
|
|
#define _SC_2_FORT_RUN 50
|
|
|
|
#define _SC_2_SW_DEV 51
|
|
|
|
#define _SC_2_LOCALEDEF 52
|
|
|
|
#define _SC_UIO_MAXIOV 60 /* !! */
|
|
|
|
#define _SC_IOV_MAX 60
|
|
|
|
#define _SC_THREADS 67
|
|
|
|
#define _SC_THREAD_SAFE_FUNCTIONS 68
|
|
|
|
#define _SC_GETGR_R_SIZE_MAX 69
|
|
|
|
#define _SC_GETPW_R_SIZE_MAX 70
|
|
|
|
#define _SC_LOGIN_NAME_MAX 71
|
|
|
|
#define _SC_TTY_NAME_MAX 72
|
|
|
|
#define _SC_THREAD_DESTRUCTOR_ITERATIONS 73
|
|
|
|
#define _SC_THREAD_KEYS_MAX 74
|
|
|
|
#define _SC_THREAD_STACK_MIN 75
|
|
|
|
#define _SC_THREAD_THREADS_MAX 76
|
|
|
|
#define _SC_THREAD_ATTR_STACKADDR 77
|
|
|
|
#define _SC_THREAD_ATTR_STACKSIZE 78
|
|
|
|
#define _SC_THREAD_PRIORITY_SCHEDULING 79
|
|
|
|
#define _SC_THREAD_PRIO_INHERIT 80
|
|
|
|
#define _SC_THREAD_PRIO_PROTECT 81
|
|
|
|
#define _SC_THREAD_PROCESS_SHARED 82
|
|
|
|
#define _SC_NPROCESSORS_CONF 83
|
|
|
|
#define _SC_NPROCESSORS_ONLN 84
|
|
|
|
#define _SC_PHYS_PAGES 85
|
|
|
|
#define _SC_AVPHYS_PAGES 86
|
|
|
|
#define _SC_ATEXIT_MAX 87
|
|
|
|
#define _SC_PASS_MAX 88
|
|
|
|
#define _SC_XOPEN_VERSION 89
|
|
|
|
#define _SC_XOPEN_XCU_VERSION 90
|
|
|
|
#define _SC_XOPEN_UNIX 91
|
|
|
|
#define _SC_XOPEN_CRYPT 92
|
|
|
|
#define _SC_XOPEN_ENH_I18N 93
|
|
|
|
#define _SC_XOPEN_SHM 94
|
|
|
|
#define _SC_2_CHAR_TERM 95
|
|
|
|
#define _SC_2_UPE 97
|
|
|
|
#define _SC_XOPEN_XPG2 98
|
|
|
|
#define _SC_XOPEN_XPG3 99
|
|
|
|
#define _SC_XOPEN_XPG4 100
|
|
|
|
#define _SC_NZERO 109
|
|
|
|
#define _SC_XBS5_ILP32_OFF32 125
|
|
|
|
#define _SC_XBS5_ILP32_OFFBIG 126
|
|
|
|
#define _SC_XBS5_LP64_OFF64 127
|
|
|
|
#define _SC_XBS5_LPBIG_OFFBIG 128
|
|
|
|
#define _SC_XOPEN_LEGACY 129
|
|
|
|
#define _SC_XOPEN_REALTIME 130
|
|
|
|
#define _SC_XOPEN_REALTIME_THREADS 131
|
|
|
|
#define _SC_ADVISORY_INFO 132
|
|
|
|
#define _SC_BARRIERS 133
|
|
|
|
#define _SC_CLOCK_SELECTION 137
|
|
|
|
#define _SC_CPUTIME 138
|
|
|
|
#define _SC_THREAD_CPUTIME 139
|
|
|
|
#define _SC_MONOTONIC_CLOCK 149
|
|
|
|
#define _SC_READER_WRITER_LOCKS 153
|
|
|
|
#define _SC_SPIN_LOCKS 154
|
|
|
|
#define _SC_REGEXP 155
|
|
|
|
#define _SC_SHELL 157
|
|
|
|
#define _SC_SPAWN 159
|
|
|
|
#define _SC_SPORADIC_SERVER 160
|
|
|
|
#define _SC_THREAD_SPORADIC_SERVER 161
|
|
|
|
#define _SC_TIMEOUTS 164
|
|
|
|
#define _SC_TYPED_MEMORY_OBJECTS 165
|
|
|
|
#define _SC_2_PBS 168
|
|
|
|
#define _SC_2_PBS_ACCOUNTING 169
|
|
|
|
#define _SC_2_PBS_LOCATE 170
|
|
|
|
#define _SC_2_PBS_MESSAGE 171
|
|
|
|
#define _SC_2_PBS_TRACK 172
|
|
|
|
#define _SC_SYMLOOP_MAX 173
|
|
|
|
#define _SC_STREAMS 174
|
|
|
|
#define _SC_2_PBS_CHECKPOINT 175
|
|
|
|
#define _SC_V6_ILP32_OFF32 176
|
|
|
|
#define _SC_V6_ILP32_OFFBIG 177
|
|
|
|
#define _SC_V6_LP64_OFF64 178
|
|
|
|
#define _SC_V6_LPBIG_OFFBIG 179
|
|
|
|
#define _SC_HOST_NAME_MAX 180
|
|
|
|
#define _SC_TRACE 181
|
|
|
|
#define _SC_TRACE_EVENT_FILTER 182
|
|
|
|
#define _SC_TRACE_INHERIT 183
|
|
|
|
#define _SC_TRACE_LOG 184
|
|
|
|
|
|
|
|
#define _SC_IPV6 235
|
|
|
|
#define _SC_RAW_SOCKETS 236
|
|
|
|
#define _SC_V7_ILP32_OFF32 237
|
|
|
|
#define _SC_V7_ILP32_OFFBIG 238
|
|
|
|
#define _SC_V7_LP64_OFF64 239
|
|
|
|
#define _SC_V7_LPBIG_OFFBIG 240
|
|
|
|
#define _SC_SS_REPL_MAX 241
|
|
|
|
#define _SC_TRACE_EVENT_NAME_MAX 242
|
|
|
|
#define _SC_TRACE_NAME_MAX 243
|
|
|
|
#define _SC_TRACE_SYS_MAX 244
|
|
|
|
#define _SC_TRACE_USER_EVENT_MAX 245
|
|
|
|
#define _SC_XOPEN_STREAMS 246
|
|
|
|
#define _SC_THREAD_ROBUST_PRIO_INHERIT 247
|
|
|
|
#define _SC_THREAD_ROBUST_PRIO_PROTECT 248
|
|
|
|
|
|
|
|
#define _CS_PATH 0
|
|
|
|
#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1
|
|
|
|
#define _CS_GNU_LIBC_VERSION 2
|
|
|
|
#define _CS_GNU_LIBPTHREAD_VERSION 3
|
|
|
|
#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS 4
|
|
|
|
#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 5
|
|
|
|
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 1116
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 1117
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFF32_LIBS 1118
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS 1119
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 1120
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 1121
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 1122
|
|
|
|
#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS 1123
|
|
|
|
#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 1124
|
|
|
|
#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 1125
|
|
|
|
#define _CS_POSIX_V6_LP64_OFF64_LIBS 1126
|
|
|
|
#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS 1127
|
|
|
|
#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 1128
|
|
|
|
#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 1129
|
|
|
|
#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 1130
|
|
|
|
#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 1131
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1132
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 1133
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFF32_LIBS 1134
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS 1135
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 1136
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 1137
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 1138
|
|
|
|
#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS 1139
|
|
|
|
#define _CS_POSIX_V7_LP64_OFF64_CFLAGS 1140
|
|
|
|
#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 1141
|
|
|
|
#define _CS_POSIX_V7_LP64_OFF64_LIBS 1142
|
|
|
|
#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS 1143
|
|
|
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 1144
|
|
|
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
|
|
|
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
|
|
|
|
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
|
2016-09-04 17:42:47 +03:00
|
|
|
#define _CS_V6_ENV 1148
|
|
|
|
#define _CS_V7_ENV 1149
|
2011-02-12 08:22:29 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|