vm: reduce noise in merged pagetable.c
[minix.git] / include / sys / unistd.h
blobb0f3c31a74f3abf318e6e3fb75b95e1d05b9f940
1 /* $NetBSD: unistd.h,v 1.52 2009/08/30 16:38:48 christos Exp $ */
3 /*
4 * Copyright (c) 1989, 1993
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
31 * @(#)unistd.h 8.2 (Berkeley) 1/7/94
34 #ifndef _SYS_UNISTD_H_
35 #define _SYS_UNISTD_H_
37 #include <sys/featuretest.h>
39 /* compile-time symbolic constants */
40 #define _POSIX_JOB_CONTROL 1
41 /* implementation supports job control */
44 * According to POSIX 1003.1:
45 * "The saved set-user-ID capability allows a program to regain the
46 * effective user ID established at the last exec call."
47 * However, the setuid/setgid function as specified by POSIX 1003.1 does
48 * not allow changing the effective ID from the super-user without also
49 * changed the saved ID, so it is impossible to get super-user privileges
50 * back later. Instead we provide this feature independent of the current
51 * effective ID through the seteuid/setegid function. In addition, we do
52 * not use the saved ID as specified by POSIX 1003.1 in setuid/setgid,
53 * because this would make it impossible for a set-user-ID executable
54 * owned by a user other than the super-user to permanently revoke its
55 * extra privileges.
57 #ifdef _NOT_AVAILABLE
58 #define _POSIX_SAVED_IDS 1
59 /* saved set-user-ID and set-group-ID */
60 #endif
62 #define _POSIX_VERSION 200112L
63 #define _POSIX2_VERSION 200112L
65 /* execution-time symbolic constants */
68 * POSIX options and option groups we unconditionally do or don't
69 * implement. Those options which are implemented (or not) entirely
70 * in user mode are defined in <unistd.h>. Please keep this list in
71 * alphabetical order.
73 * Anything which is defined as zero below **must** have an
74 * implementation for the corresponding sysconf() which is able to
75 * determine conclusively whether or not the feature is supported.
76 * Anything which is defined as other than -1 below **must** have
77 * complete headers, types, and function declarations as specified by
78 * the POSIX standard; however, if the relevant sysconf() function
79 * returns -1, the functions may be stubbed out.
81 /* Advisory information */
82 #undef _POSIX_ADVISORY_INFO
83 /* asynchronous I/O is available */
84 #define _POSIX_ASYNCHRONOUS_IO 200112L
85 /* barriers */
86 #define _POSIX_BARRIERS 200112L
87 /* chown requires correct privileges */
88 #define _POSIX_CHOWN_RESTRICTED 1
89 /* clock selection */
90 #define _POSIX_CLOCK_SELECTION -1
91 /* CPU type */
92 #undef _POSIX_CPUTYPE
93 /* file synchronization is available */
94 #define _POSIX_FSYNC 1
95 /* support IPv6 */
96 #define _POSIX_IPV6 0
97 /* job control is available */
98 #define _POSIX_JOB_CONTROL 1
99 /* memory mapped files */
100 #define _POSIX_MAPPED_FILES 1
101 /* memory locking whole address space */
102 #define _POSIX_MEMLOCK 1
103 /* memory locking address ranges */
104 #define _POSIX_MEMLOCK_RANGE 1
105 /* memory access protections */
106 #define _POSIX_MEMORY_PROTECTION 1
107 /* message passing is available */
108 #define _POSIX_MESSAGE_PASSING 200112L
109 /* monotonic clock */
110 #define _POSIX_MONOTONIC_CLOCK 200112L
111 /* too-long path comp generate errors */
112 #define _POSIX_NO_TRUNC 1
113 /* prioritized I/O */
114 #define _POSIX_PRIORITIZED_IO -1
115 /* priority scheduling */
116 #define _POSIX_PRIORITY_SCHEDULING 200112L
117 /* raw sockets */
118 #define _POSIX_RAW_SOCKETS 200112L
119 /* read/write locks */
120 #define _POSIX_READER_WRITER_LOCKS 200112L
121 /* realtime signals */
122 #undef _POSIX_REALTIME_SIGNALS
123 /* regular expressions */
124 #define _POSIX_REGEXP 1
125 /* semaphores */
126 #define _POSIX_SEMAPHORES 0
127 /* shared memory */
128 #undef _POSIX_SHARED_MEMORY_OBJECTS
129 /* shell */
130 #define _POSIX_SHELL 1
131 /* spin locks */
132 #define _POSIX_SPIN_LOCKS 200112L
133 /* sporadic server */
134 #undef _POSIX_SPORADIC_SERVER
135 /* synchronized I/O is available */
136 #define _POSIX_SYNCHRONIZED_IO 1
137 /* threads */
138 #define _POSIX_THREADS 200112L
139 /* pthread_attr for stack size */
140 #define _POSIX_THREAD_ATTR_STACKSIZE 200112L
141 /* pthread_attr for stack address */
142 #define _POSIX_THREAD_ATTR_STACKADDR 200112L
143 /* _r functions */
144 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
145 /* timeouts */
146 #undef _POSIX_TIMEOUTS
147 /* timers */
148 #undef _POSIX_TIMERS
149 /* typed memory objects */
150 #undef _POSIX_TYPED_MEMORY_OBJECTS
151 /* may disable terminal spec chars */
152 #define _POSIX_VDISABLE __CAST(unsigned char, '\377')
154 /* C binding */
155 #define _POSIX2_C_BIND 200112L
157 /* XPG4.2 shared memory */
158 #define _XOPEN_SHM 0
160 /* access function */
161 #define F_OK 0 /* test for existence of file */
162 #define X_OK 0x01 /* test for execute or search permission */
163 #define W_OK 0x02 /* test for write permission */
164 #define R_OK 0x04 /* test for read permission */
166 /* whence values for lseek(2) */
167 #define SEEK_SET 0 /* set file offset to offset */
168 #define SEEK_CUR 1 /* set file offset to current plus offset */
169 #define SEEK_END 2 /* set file offset to EOF plus offset */
171 #if defined(_NETBSD_SOURCE)
172 /* whence values for lseek(2); renamed by POSIX 1003.1 */
173 #define L_SET SEEK_SET
174 #define L_INCR SEEK_CUR
175 #define L_XTND SEEK_END
176 #endif
178 /* configurable pathname variables; use as argument to pathconf(3) */
179 #define _PC_LINK_MAX 1 /* link count */
180 #define _PC_MAX_CANON 2 /* size of the canonical input queue */
181 #define _PC_MAX_INPUT 3 /* type-ahead buffer size */
182 #define _PC_NAME_MAX 4 /* file name size */
183 #define _PC_PATH_MAX 5 /* pathname size */
184 #define _PC_PIPE_BUF 6 /* pipe size */
185 #define _PC_NO_TRUNC 7 /* treatment of long name components */
186 #define _PC_VDISABLE 8 /* tty disable */
187 #define _PC_CHOWN_RESTRICTED 9 /* chown restricted or not */
189 /* configurable system variables; use as argument to sysconf(3) */
191 * XXX The value of _SC_CLK_TCK is embedded in <time.h>.
192 * XXX The value of _SC_PAGESIZE is embedded in <sys/shm.h>.
194 #define _SC_ARG_MAX 1
195 #define _SC_CHILD_MAX 2
196 #define _SC_CLOCKS_PER_SEC 3
197 #define _SC_CLK_TCK 3
198 #define _SC_NGROUPS_MAX 4
199 #define _SC_OPEN_MAX 5
200 #define _SC_JOB_CONTROL 6
201 #define _SC_SAVED_IDS 7
202 #define _SC_VERSION 8
203 #define _SC_STREAM_MAX 9
204 #define _SC_TZNAME_MAX 10
205 #define _SC_PAGESIZE 11
206 #define _SC_PAGE_SIZE _SC_PAGESIZE
208 #endif /* !_SYS_UNISTD_H_ */