]> git.saurik.com Git - apple/xnu.git/blame_incremental - bsd/include/unistd.h
xnu-201.42.3.tar.gz
[apple/xnu.git] / bsd / include / unistd.h
... / ...
CommitLineData
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));
87int access __P((const char *, int));
88unsigned int alarm __P((unsigned int));
89int chdir __P((const char *));
90int chown __P((const char *, uid_t, gid_t));
91int close __P((int));
92size_t confstr __P((int, char *, size_t));
93int dup __P((int));
94int dup2 __P((int, int));
95int execl __P((const char *, const char *, ...));
96int execle __P((const char *, const char *, ...));
97int execlp __P((const char *, const char *, ...));
98int execv __P((const char *, char * const *));
99int execve __P((const char *, char * const *, char * const *));
100int execvp __P((const char *, char * const *));
101pid_t fork __P((void));
102long fpathconf __P((int, int));
103char *getcwd __P((char *, size_t));
104gid_t getegid __P((void));
105uid_t geteuid __P((void));
106gid_t getgid __P((void));
107int getgroups __P((int, gid_t []));
108char *getlogin __P((void));
109pid_t getpgrp __P((void));
110pid_t getpid __P((void));
111pid_t getppid __P((void));
112uid_t getuid __P((void));
113int isatty __P((int));
114int link __P((const char *, const char *));
115off_t lseek __P((int, off_t, int));
116long pathconf __P((const char *, int));
117int pause __P((void));
118int pipe __P((int *));
119ssize_t read __P((int, void *, size_t));
120int rmdir __P((const char *));
121int setgid __P((gid_t));
122int setpgid __P((pid_t, pid_t));
123pid_t setsid __P((void));
124int setuid __P((uid_t));
125unsigned int sleep __P((unsigned int));
126long sysconf __P((int));
127pid_t tcgetpgrp __P((int));
128int tcsetpgrp __P((int, pid_t));
129char *ttyname __P((int));
130int unlink __P((const char *));
131ssize_t write __P((int, const void *, size_t));
132
133extern char *optarg; /* getopt(3) external variables */
134extern int optind, opterr, optopt, optreset;
135int getopt __P((int, char * const [], const char *));
136
137#ifndef _POSIX_SOURCE
138#ifdef __STDC__
139struct timeval; /* select(2) */
140#endif
141int acct __P((const char *));
142int async_daemon __P((void));
143char *brk __P((const char *));
144int chroot __P((const char *));
145char *crypt __P((const char *, const char *));
146int des_cipher __P((const char *, char *, long, int));
147int des_setkey __P((const char *key));
148int encrypt __P((char *, int));
149void endusershell __P((void));
150int exect __P((const char *, char * const *, char * const *));
151int fchdir __P((int));
152int fchown __P((int, int, int));
153int fsync __P((int));
154int ftruncate __P((int, off_t));
155int getdtablesize __P((void));
156int getgrouplist __P((const char *, int, int *, int *));
157long gethostid __P((void));
158int gethostname __P((char *, int));
159mode_t getmode __P((const void *, mode_t));
160__pure int
161 getpagesize __P((void));
162char *getpass __P((const char *));
163char *getusershell __P((void));
164char *getwd __P((char *)); /* obsoleted by getcwd() */
165int initgroups __P((const char *, int));
166int iruserok __P((unsigned long, int, const char *, const char *));
167int mknod __P((const char *, mode_t, dev_t));
168int mkstemp __P((char *));
169char *mktemp __P((char *));
170int nfssvc __P((int, void *));
171int nice __P((int));
172#if 0
173void psignal __P((unsigned int, const char *));
174extern __const char *__const sys_siglist[];
175#else
176#include <signal.h>
177#endif
178int profil __P((char *, int, int, int));
179int rcmd __P((char **, int, const char *,
180 const char *, const char *, int *));
181char *re_comp __P((const char *));
182int re_exec __P((const char *));
183int readlink __P((const char *, char *, int));
184int reboot __P((int));
185int revoke __P((const char *));
186int rresvport __P((int *));
187int ruserok __P((const char *, int, const char *, const char *));
188char *sbrk __P((int));
189int select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
190int setegid __P((gid_t));
191int seteuid __P((uid_t));
192int setgroups __P((int, const gid_t *));
193void sethostid __P((long));
194int sethostname __P((const char *, int));
195int setkey __P((const char *));
196int setlogin __P((const char *));
197void *setmode __P((const char *));
198int setpgrp __P((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */
199int setregid __P((gid_t, gid_t));
200int setreuid __P((uid_t, uid_t));
201int setrgid __P((gid_t));
202int setruid __P((uid_t));
203void setusershell __P((void));
204int swapon __P((const char *));
205int symlink __P((const char *, const char *));
206void sync __P((void));
207int syscall __P((int, ...));
208int truncate __P((const char *, off_t));
209int ttyslot __P((void));
210unsigned int ualarm __P((unsigned int, unsigned int));
211int unwhiteout __P((const char *));
212void usleep __P((unsigned int));
213void *valloc __P((size_t)); /* obsoleted by malloc() */
214pid_t vfork __P((void));
215
216extern char *suboptarg; /* getsubopt(3) external variable */
217int getsubopt __P((char **, char * const *, char **));
218
219/* HFS & HFS Plus semantics system calls go here */
220int getattrlist __P((const char*,void*,void*,size_t,unsigned long));
221int setattrlist __P((const char*,void*,void*,size_t,unsigned long));
222int exchangedata __P((const char*,const char*,unsigned long));
223int checkuseraccess __P((const char*,uid_t,gid_t*,int,int,unsigned long));
224int getdirentriesattr __P((int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long));
225int searchfs __P((const char*,void*,void*,unsigned long,unsigned long,void*));
226
227int fsctl __P((const char *,unsigned long,void*,unsigned long));
228
229
230#endif /* !_POSIX_SOURCE */
231__END_DECLS
232
233#endif /* !_UNISTD_H_ */