|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
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: /* access function */
91: #define F_OK 0 /* test for existence of file */
92: #define X_OK 0x01 /* test for execute or search permission */
93: #define W_OK 0x02 /* test for write permission */
94: #define R_OK 0x04 /* test for read permission */
95:
96: /* whence values for lseek(2) */
97: #define SEEK_SET 0 /* set file offset to offset */
98: #define SEEK_CUR 1 /* set file offset to current plus offset */
99: #define SEEK_END 2 /* set file offset to EOF plus offset */
100:
101: #ifndef _POSIX_SOURCE
102: /* whence values for lseek(2); renamed by POSIX 1003.1 */
103: #define L_SET SEEK_SET
104: #define L_INCR SEEK_CUR
105: #define L_XTND SEEK_END
106: #endif
107:
108: /* configurable pathname variables */
109: #define _PC_LINK_MAX 1
110: #define _PC_MAX_CANON 2
111: #define _PC_MAX_INPUT 3
112: #define _PC_NAME_MAX 4
113: #define _PC_PATH_MAX 5
114: #define _PC_PIPE_BUF 6
115: #define _PC_CHOWN_RESTRICTED 7
116: #define _PC_NO_TRUNC 8
117: #define _PC_VDISABLE 9
118:
119: /* configurable system variables */
120: #define _SC_ARG_MAX 1
121: #define _SC_CHILD_MAX 2
122: #define _SC_CLK_TCK 3
123: #define _SC_NGROUPS_MAX 4
124: #define _SC_OPEN_MAX 5
125: #define _SC_JOB_CONTROL 6
126: #define _SC_SAVED_IDS 7
127: #define _SC_VERSION 8
128: #define _SC_BC_BASE_MAX 9
129: #define _SC_BC_DIM_MAX 10
130: #define _SC_BC_SCALE_MAX 11
131: #define _SC_BC_STRING_MAX 12
132: #define _SC_COLL_WEIGHTS_MAX 13
133: #define _SC_EXPR_NEST_MAX 14
134: #define _SC_LINE_MAX 15
135: #define _SC_RE_DUP_MAX 16
136: #define _SC_2_VERSION 17
137: #define _SC_2_C_BIND 18
138: #define _SC_2_C_DEV 19
139: #define _SC_2_CHAR_TERM 20
140: #define _SC_2_FORT_DEV 21
141: #define _SC_2_FORT_RUN 22
142: #define _SC_2_LOCALEDEF 23
143: #define _SC_2_SW_DEV 24
144: #define _SC_2_UPE 25
145: #define _SC_STREAM_MAX 26
146: #define _SC_TZNAME_MAX 27
147:
148: /* configurable system strings */
149: #define _CS_PATH 1
150:
151: #endif /* !_SYS_UNISTD_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.