]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /*- | |
23 | * Copyright (c) 1998-1999 Apple Computer, Inc. All Rights Reserved | |
24 | * Copyright (c) 1991, 1993, 1994 | |
25 | * The Regents of the University of California. All rights reserved. | |
26 | * | |
27 | * Redistribution and use in source and binary forms, with or without | |
28 | * modification, are permitted provided that the following conditions | |
29 | * are met: | |
30 | * 1. Redistributions of source code must retain the above copyright | |
31 | * notice, this list of conditions and the following disclaimer. | |
32 | * 2. Redistributions in binary form must reproduce the above copyright | |
33 | * notice, this list of conditions and the following disclaimer in the | |
34 | * documentation and/or other materials provided with the distribution. | |
35 | * 3. All advertising materials mentioning features or use of this software | |
36 | * must display the following acknowledgement: | |
37 | * This product includes software developed by the University of | |
38 | * California, Berkeley and its contributors. | |
39 | * 4. Neither the name of the University nor the names of its contributors | |
40 | * may be used to endorse or promote products derived from this software | |
41 | * without specific prior written permission. | |
42 | * | |
43 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
44 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
46 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
49 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
51 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
52 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
53 | * SUCH DAMAGE. | |
54 | * | |
55 | * @(#)unistd.h 8.12 (Berkeley) 4/27/95 | |
56 | * | |
57 | * Copyright (c) 1998 Apple Compter, Inc. | |
58 | * All Rights Reserved | |
59 | */ | |
60 | ||
61 | /* History: | |
62 | 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr | |
63 | 3/26/98 CHW at Apple added real interface to searchfs call | |
64 | 3/5/98 CHW at Apple added hfs semantic system calls headers | |
65 | */ | |
66 | ||
67 | #ifndef _UNISTD_H_ | |
68 | #define _UNISTD_H_ | |
69 | ||
70 | #include <sys/cdefs.h> | |
71 | #include <sys/types.h> | |
72 | #include <sys/unistd.h> | |
73 | ||
74 | #define STDIN_FILENO 0 /* standard input file descriptor */ | |
75 | #define STDOUT_FILENO 1 /* standard output file descriptor */ | |
76 | #define STDERR_FILENO 2 /* standard error file descriptor */ | |
77 | ||
78 | #ifndef NULL | |
79 | #define NULL 0 /* null pointer constant */ | |
80 | #endif | |
81 | ||
82 | #define _POSIX_THREADS /* We support pthreads */ | |
83 | ||
84 | __BEGIN_DECLS | |
85 | __dead void | |
86 | _exit __P((int)); | |
87 | int access __P((const char *, int)); | |
88 | unsigned int alarm __P((unsigned int)); | |
89 | int chdir __P((const char *)); | |
90 | int chown __P((const char *, uid_t, gid_t)); | |
91 | int close __P((int)); | |
92 | size_t confstr __P((int, char *, size_t)); | |
93 | int dup __P((int)); | |
94 | int dup2 __P((int, int)); | |
95 | int execl __P((const char *, const char *, ...)); | |
96 | int execle __P((const char *, const char *, ...)); | |
97 | int execlp __P((const char *, const char *, ...)); | |
98 | int execv __P((const char *, char * const *)); | |
99 | int execve __P((const char *, char * const *, char * const *)); | |
100 | int execvp __P((const char *, char * const *)); | |
101 | pid_t fork __P((void)); | |
102 | long fpathconf __P((int, int)); | |
103 | char *getcwd __P((char *, size_t)); | |
104 | gid_t getegid __P((void)); | |
105 | uid_t geteuid __P((void)); | |
106 | gid_t getgid __P((void)); | |
107 | int getgroups __P((int, gid_t [])); | |
108 | char *getlogin __P((void)); | |
109 | pid_t getpgrp __P((void)); | |
110 | pid_t getpid __P((void)); | |
111 | pid_t getppid __P((void)); | |
112 | uid_t getuid __P((void)); | |
113 | int isatty __P((int)); | |
114 | int link __P((const char *, const char *)); | |
115 | off_t lseek __P((int, off_t, int)); | |
116 | long pathconf __P((const char *, int)); | |
117 | int pause __P((void)); | |
118 | int pipe __P((int *)); | |
119 | ssize_t read __P((int, void *, size_t)); | |
120 | int rmdir __P((const char *)); | |
121 | int setgid __P((gid_t)); | |
122 | int setpgid __P((pid_t, pid_t)); | |
123 | pid_t setsid __P((void)); | |
124 | int setuid __P((uid_t)); | |
125 | unsigned int sleep __P((unsigned int)); | |
126 | long sysconf __P((int)); | |
127 | pid_t tcgetpgrp __P((int)); | |
128 | int tcsetpgrp __P((int, pid_t)); | |
129 | char *ttyname __P((int)); | |
130 | int unlink __P((const char *)); | |
131 | ssize_t write __P((int, const void *, size_t)); | |
132 | ||
133 | extern char *optarg; /* getopt(3) external variables */ | |
134 | extern int optind, opterr, optopt, optreset; | |
135 | int getopt __P((int, char * const [], const char *)); | |
136 | ||
137 | #ifndef _POSIX_SOURCE | |
138 | #ifdef __STDC__ | |
139 | struct timeval; /* select(2) */ | |
140 | #endif | |
141 | int acct __P((const char *)); | |
142 | int async_daemon __P((void)); | |
143 | char *brk __P((const char *)); | |
144 | int chroot __P((const char *)); | |
145 | char *crypt __P((const char *, const char *)); | |
146 | int des_cipher __P((const char *, char *, long, int)); | |
147 | int des_setkey __P((const char *key)); | |
148 | int encrypt __P((char *, int)); | |
149 | void endusershell __P((void)); | |
150 | int exect __P((const char *, char * const *, char * const *)); | |
151 | int fchdir __P((int)); | |
152 | int fchown __P((int, int, int)); | |
153 | int fsync __P((int)); | |
154 | int ftruncate __P((int, off_t)); | |
155 | int getdtablesize __P((void)); | |
156 | int getgrouplist __P((const char *, int, int *, int *)); | |
157 | long gethostid __P((void)); | |
158 | int gethostname __P((char *, int)); | |
159 | mode_t getmode __P((const void *, mode_t)); | |
160 | __pure int | |
161 | getpagesize __P((void)); | |
162 | char *getpass __P((const char *)); | |
163 | char *getusershell __P((void)); | |
164 | char *getwd __P((char *)); /* obsoleted by getcwd() */ | |
165 | int initgroups __P((const char *, int)); | |
166 | int iruserok __P((unsigned long, int, const char *, const char *)); | |
167 | int mknod __P((const char *, mode_t, dev_t)); | |
168 | int mkstemp __P((char *)); | |
169 | char *mktemp __P((char *)); | |
170 | int nfssvc __P((int, void *)); | |
171 | int nice __P((int)); | |
172 | #if 0 | |
173 | void psignal __P((unsigned int, const char *)); | |
174 | extern __const char *__const sys_siglist[]; | |
175 | #else | |
176 | #include <signal.h> | |
177 | #endif | |
178 | int profil __P((char *, int, int, int)); | |
179 | int rcmd __P((char **, int, const char *, | |
180 | const char *, const char *, int *)); | |
181 | char *re_comp __P((const char *)); | |
182 | int re_exec __P((const char *)); | |
183 | int readlink __P((const char *, char *, int)); | |
184 | int reboot __P((int)); | |
185 | int revoke __P((const char *)); | |
186 | int rresvport __P((int *)); | |
187 | int ruserok __P((const char *, int, const char *, const char *)); | |
188 | char *sbrk __P((int)); | |
189 | int select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); | |
190 | int setegid __P((gid_t)); | |
191 | int seteuid __P((uid_t)); | |
192 | int setgroups __P((int, const gid_t *)); | |
193 | void sethostid __P((long)); | |
194 | int sethostname __P((const char *, int)); | |
195 | int setkey __P((const char *)); | |
196 | int setlogin __P((const char *)); | |
197 | void *setmode __P((const char *)); | |
198 | int setpgrp __P((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */ | |
199 | int setregid __P((gid_t, gid_t)); | |
200 | int setreuid __P((uid_t, uid_t)); | |
201 | int setrgid __P((gid_t)); | |
202 | int setruid __P((uid_t)); | |
203 | void setusershell __P((void)); | |
204 | int swapon __P((const char *)); | |
205 | int symlink __P((const char *, const char *)); | |
206 | void sync __P((void)); | |
207 | int syscall __P((int, ...)); | |
208 | int truncate __P((const char *, off_t)); | |
209 | int ttyslot __P((void)); | |
210 | unsigned int ualarm __P((unsigned int, unsigned int)); | |
211 | int unwhiteout __P((const char *)); | |
212 | void usleep __P((unsigned int)); | |
213 | void *valloc __P((size_t)); /* obsoleted by malloc() */ | |
214 | pid_t vfork __P((void)); | |
215 | ||
216 | extern char *suboptarg; /* getsubopt(3) external variable */ | |
217 | int getsubopt __P((char **, char * const *, char **)); | |
218 | ||
219 | /* HFS & HFS Plus semantics system calls go here */ | |
220 | int getattrlist __P((const char*,void*,void*,size_t,unsigned long)); | |
221 | int setattrlist __P((const char*,void*,void*,size_t,unsigned long)); | |
222 | int exchangedata __P((const char*,const char*,unsigned long)); | |
223 | int checkuseraccess __P((const char*,uid_t,gid_t*,int,int,unsigned long)); | |
224 | int getdirentriesattr __P((int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long)); | |
225 | int searchfs __P((const char*,void*,void*,unsigned long,unsigned long,void*)); | |
226 | ||
227 | int fsctl __P((const char *,unsigned long,void*,unsigned long)); | |
228 | ||
229 | ||
230 | #endif /* !_POSIX_SOURCE */ | |
231 | __END_DECLS | |
232 | ||
233 | #endif /* !_UNISTD_H_ */ |