FreeBSD/Linux Kernel Cross Reference
sys/sys/unistd.h
1 /* $OpenBSD: unistd.h,v 1.16 2008/08/22 14:39:21 deraadt Exp $ */
2 /* $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ */
3
4 /*
5 * Copyright (c) 1989, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)unistd.h 8.2 (Berkeley) 1/7/94
33 */
34
35 #ifndef _SYS_UNISTD_H_
36 #define _SYS_UNISTD_H_
37
38 #include <sys/cdefs.h>
39
40 /* compile-time symbolic constants */
41 /* implementation supports job control */
42 #define _POSIX_JOB_CONTROL 1
43 /* saved set-user-ID and set-group-ID */
44 #define _POSIX_SAVED_IDS 1
45
46 #define _POSIX_VERSION 199009L
47 #define _POSIX2_VERSION 199212L
48
49 /* execution-time symbolic constants */
50 /* chown requires appropriate privileges */
51 #define _POSIX_CHOWN_RESTRICTED 1
52 /* too-long path components generate errors */
53 #define _POSIX_NO_TRUNC 1
54 /* may disable terminal special characters */
55 #define _POSIX_VDISABLE (0377)
56 /* file synchronization is available */
57 #define _POSIX_FSYNC 1
58
59 /* access function */
60 #define F_OK 0 /* test for existence of file */
61 #define X_OK 0x01 /* test for execute or search permission */
62 #define W_OK 0x02 /* test for write permission */
63 #define R_OK 0x04 /* test for read permission */
64
65 /* whence values for lseek(2) */
66 #define SEEK_SET 0 /* set file offset to offset */
67 #define SEEK_CUR 1 /* set file offset to current plus offset */
68 #define SEEK_END 2 /* set file offset to EOF plus offset */
69
70 #if __BSD_VISIBLE
71 /* old BSD whence values for lseek(2); renamed by POSIX 1003.1 */
72 #define L_SET SEEK_SET
73 #define L_INCR SEEK_CUR
74 #define L_XTND SEEK_END
75 #endif
76
77 /* configurable pathname variables */
78 #define _PC_LINK_MAX 1
79 #define _PC_MAX_CANON 2
80 #define _PC_MAX_INPUT 3
81 #define _PC_NAME_MAX 4
82 #define _PC_PATH_MAX 5
83 #define _PC_PIPE_BUF 6
84 #define _PC_CHOWN_RESTRICTED 7
85 #define _PC_NO_TRUNC 8
86 #define _PC_VDISABLE 9
87
88 /* configurable system variables */
89 #define _SC_ARG_MAX 1
90 #define _SC_CHILD_MAX 2
91 #define _SC_CLK_TCK 3
92 #define _SC_NGROUPS_MAX 4
93 #define _SC_OPEN_MAX 5
94 #define _SC_JOB_CONTROL 6
95 #define _SC_SAVED_IDS 7
96 #define _SC_VERSION 8
97 #define _SC_BC_BASE_MAX 9
98 #define _SC_BC_DIM_MAX 10
99 #define _SC_BC_SCALE_MAX 11
100 #define _SC_BC_STRING_MAX 12
101 #define _SC_COLL_WEIGHTS_MAX 13
102 #define _SC_EXPR_NEST_MAX 14
103 #define _SC_LINE_MAX 15
104 #define _SC_RE_DUP_MAX 16
105 #define _SC_2_VERSION 17
106 #define _SC_2_C_BIND 18
107 #define _SC_2_C_DEV 19
108 #define _SC_2_CHAR_TERM 20
109 #define _SC_2_FORT_DEV 21
110 #define _SC_2_FORT_RUN 22
111 #define _SC_2_LOCALEDEF 23
112 #define _SC_2_SW_DEV 24
113 #define _SC_2_UPE 25
114 #define _SC_STREAM_MAX 26
115 #define _SC_TZNAME_MAX 27
116 #define _SC_PAGESIZE 28
117 #define _SC_PAGE_SIZE _SC_PAGESIZE /* 1170 compatibility */
118 #define _SC_FSYNC 29
119 #define _SC_XOPEN_SHM 30
120 #define _SC_SEM_NSEMS_MAX 31
121 #define _SC_SEM_VALUE_MAX 32
122
123 /* P1003.1c */
124 #define _SC_GETGR_R_SIZE_MAX 100
125 #define _SC_GETPW_R_SIZE_MAX 101
126 #define _SC_LOGIN_NAME_MAX 102
127 #define _SC_THREAD_SAFE_FUNCTIONS 103
128 #ifdef notyet
129 #define _SC_THREAD_DESTRUCTOR_ITERATIONS
130 #define _SC_THREAD_KEYS_MAX
131 #define _SC_THREAD_STACK_MIN
132 #define _SC_THREAD_THREADS_MAX
133 #define _SC_TTY_NAME_MAX
134 #define _SC_THREADS
135 #define _SC_THREAD_ATTR_STACKADDR
136 #define _SC_THREAD_ATTR_STACKSIZE
137 #define _SC_THREAD_PRIORITY_SCHEDULING
138 #define _SC_THREAD_PRIO_INHERIT
139 #define _SC_THREAD_PRIO_PROTECT
140 #define _SC_THREAD_PROCESS_SHARED
141 #endif
142
143 #define _SC_PHYS_PAGES 500
144 #define _SC_AVPHYS_PAGES 501
145
146 /* configurable system strings */
147 #define _CS_PATH 1
148
149 #endif /* !_SYS_UNISTD_H_ */
Cache object: 60aa242bdb3a078b8f65767d1810f693
|