]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | |
26 | /* | |
27 | * Copyright (c) 1989, 1993 | |
28 | * The Regents of the University of California. All rights reserved. | |
29 | * | |
30 | * Redistribution and use in source and binary forms, with or without | |
31 | * modification, are permitted provided that the following conditions | |
32 | * are met: | |
33 | * 1. Redistributions of source code must retain the above copyright | |
34 | * notice, this list of conditions and the following disclaimer. | |
35 | * 2. Redistributions in binary form must reproduce the above copyright | |
36 | * notice, this list of conditions and the following disclaimer in the | |
37 | * documentation and/or other materials provided with the distribution. | |
38 | * 3. All advertising materials mentioning features or use of this software | |
39 | * must display the following acknowledgement: | |
40 | * This product includes software developed by the University of | |
41 | * California, Berkeley and its contributors. | |
42 | * 4. Neither the name of the University nor the names of its contributors | |
43 | * may be used to endorse or promote products derived from this software | |
44 | * without specific prior written permission. | |
45 | * | |
46 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
56 | * SUCH DAMAGE. | |
57 | * | |
58 | * @(#)unistd.h 8.2 (Berkeley) 1/7/94 | |
59 | */ | |
60 | ||
61 | #ifndef _SYS_UNISTD_H_ | |
62 | #define _SYS_UNISTD_H_ | |
63 | ||
64 | /* compile-time symbolic constants */ | |
65 | #define _POSIX_JOB_CONTROL /* implementation supports job control */ | |
66 | ||
67 | /* | |
68 | * Although we have saved user/group IDs, we do not use them in setuid | |
69 | * as described in POSIX 1003.1, because the feature does not work for | |
70 | * root. We use the saved IDs in seteuid/setegid, which are not currently | |
71 | * part of the POSIX 1003.1 specification. | |
72 | */ | |
73 | #ifdef _NOT_AVAILABLE | |
74 | #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ | |
75 | #endif | |
76 | ||
77 | #define _POSIX_VERSION 198808L | |
78 | #define _POSIX2_VERSION 199212L | |
79 | ||
80 | /* execution-time symbolic constants */ | |
81 | /* chown requires appropriate privileges */ | |
82 | #define _POSIX_CHOWN_RESTRICTED 1 | |
83 | /* too-long path components generate errors */ | |
84 | #define _POSIX_NO_TRUNC 1 | |
85 | /* may disable terminal special characters */ | |
86 | #ifndef _POSIX_VDISABLE | |
87 | #define _POSIX_VDISABLE ((unsigned char)'\377') | |
88 | #endif | |
89 | ||
90 | #define _POSIX_THREADS | |
91 | #define _POSIX_THREAD_ATTR_STACKADDR | |
92 | #define _POSIX_THREAD_ATTR_STACKSIZE | |
93 | #define _POSIX_THREAD_PRIORITY_SCHEDULING | |
94 | #define _POSIX_THREAD_PRIO_INHERIT | |
95 | #define _POSIX_THREAD_PRIO_PROTECT | |
96 | ||
97 | #define _POSIX_THREAD_KEYS_MAX 128 | |
98 | ||
99 | /* access function */ | |
100 | #define F_OK 0 /* test for existence of file */ | |
101 | #define X_OK 0x01 /* test for execute or search permission */ | |
102 | #define W_OK 0x02 /* test for write permission */ | |
103 | #define R_OK 0x04 /* test for read permission */ | |
104 | ||
105 | /* whence values for lseek(2) */ | |
106 | #define SEEK_SET 0 /* set file offset to offset */ | |
107 | #define SEEK_CUR 1 /* set file offset to current plus offset */ | |
108 | #define SEEK_END 2 /* set file offset to EOF plus offset */ | |
109 | ||
110 | #ifndef _POSIX_SOURCE | |
111 | /* whence values for lseek(2); renamed by POSIX 1003.1 */ | |
112 | #define L_SET SEEK_SET | |
113 | #define L_INCR SEEK_CUR | |
114 | #define L_XTND SEEK_END | |
115 | #endif | |
116 | ||
117 | /* configurable pathname variables */ | |
118 | #define _PC_LINK_MAX 1 | |
119 | #define _PC_MAX_CANON 2 | |
120 | #define _PC_MAX_INPUT 3 | |
121 | #define _PC_NAME_MAX 4 | |
122 | #define _PC_PATH_MAX 5 | |
123 | #define _PC_PIPE_BUF 6 | |
124 | #define _PC_CHOWN_RESTRICTED 7 | |
125 | #define _PC_NO_TRUNC 8 | |
126 | #define _PC_VDISABLE 9 | |
127 | ||
128 | #ifndef _POSIX_SOURCE | |
129 | #define _PC_NAME_CHARS_MAX 10 | |
130 | #define _PC_CASE_SENSITIVE 11 | |
131 | #define _PC_CASE_PRESERVING 12 | |
132 | #endif | |
133 | ||
1c79356b A |
134 | /* configurable system strings */ |
135 | #define _CS_PATH 1 | |
136 | ||
55e303ae A |
137 | /* async IO support */ |
138 | #define _POSIX_ASYNCHRONOUS_IO | |
139 | ||
1c79356b | 140 | #endif /* !_SYS_UNISTD_H_ */ |