unistd.h revision 2859
11539Srgrimes/*-
21539Srgrimes * Copyright (c) 1991, 1993, 1994
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
321539Srgrimes *
331539Srgrimes *	@(#)unistd.h	8.10 (Berkeley) 4/16/94
341539Srgrimes */
351539Srgrimes
361539Srgrimes#ifndef _UNISTD_H_
371539Srgrimes#define	_UNISTD_H_
381539Srgrimes
391539Srgrimes#include <sys/cdefs.h>
401539Srgrimes#include <sys/types.h>
411539Srgrimes#include <sys/unistd.h>
421539Srgrimes
431539Srgrimes#define	 STDIN_FILENO	0	/* standard input file descriptor */
441539Srgrimes#define	STDOUT_FILENO	1	/* standard output file descriptor */
451539Srgrimes#define	STDERR_FILENO	2	/* standard error file descriptor */
461539Srgrimes
471539Srgrimes#ifndef NULL
481539Srgrimes#define	NULL		0	/* null pointer constant */
491539Srgrimes#endif
501539Srgrimes
511539Srgrimes__BEGIN_DECLS
521539Srgrimes__dead void
532572Sbde	 _exit __P((int)) __dead2;
541539Srgrimesint	 access __P((const char *, int));
551539Srgrimesunsigned int	 alarm __P((unsigned int));
561539Srgrimesint	 chdir __P((const char *));
571539Srgrimesint	 chown __P((const char *, uid_t, gid_t));
581539Srgrimesint	 close __P((int));
591539Srgrimessize_t	 confstr __P((int, char *, size_t));
601539Srgrimesint	 dup __P((int));
611539Srgrimesint	 dup2 __P((int, int));
621539Srgrimesint	 execl __P((const char *, const char *, ...));
631539Srgrimesint	 execle __P((const char *, const char *, ...));
641539Srgrimesint	 execlp __P((const char *, const char *, ...));
651539Srgrimesint	 execv __P((const char *, char * const *));
661539Srgrimesint	 execve __P((const char *, char * const *, char * const *));
671539Srgrimesint	 execvp __P((const char *, char * const *));
681539Srgrimespid_t	 fork __P((void));
691539Srgrimeslong	 fpathconf __P((int, int));
701539Srgrimeschar	*getcwd __P((char *, size_t));
711539Srgrimesgid_t	 getegid __P((void));
721539Srgrimesuid_t	 geteuid __P((void));
731539Srgrimesgid_t	 getgid __P((void));
741539Srgrimesint	 getgroups __P((int, gid_t []));
751539Srgrimeschar	*getlogin __P((void));
761539Srgrimespid_t	 getpgrp __P((void));
771539Srgrimespid_t	 getpid __P((void));
781539Srgrimespid_t	 getppid __P((void));
791539Srgrimesuid_t	 getuid __P((void));
801539Srgrimesint	 isatty __P((int));
811539Srgrimesint	 link __P((const char *, const char *));
821539Srgrimesoff_t	 lseek __P((int, off_t, int));
831539Srgrimeslong	 pathconf __P((const char *, int));
841539Srgrimesint	 pause __P((void));
851539Srgrimesint	 pipe __P((int *));
861539Srgrimesssize_t	 read __P((int, void *, size_t));
871539Srgrimesint	 rmdir __P((const char *));
881539Srgrimesint	 setgid __P((gid_t));
891539Srgrimesint	 setpgid __P((pid_t, pid_t));
901539Srgrimespid_t	 setsid __P((void));
911539Srgrimesint	 setuid __P((uid_t));
921539Srgrimesunsigned int	 sleep __P((unsigned int));
931539Srgrimeslong	 sysconf __P((int));
941539Srgrimespid_t	 tcgetpgrp __P((int));
951539Srgrimesint	 tcsetpgrp __P((int, pid_t));
961539Srgrimeschar	*ttyname __P((int));
971539Srgrimesint	 unlink __P((const char *));
981539Srgrimesssize_t	 write __P((int, const void *, size_t));
991539Srgrimes
1001539Srgrimes#ifndef	_POSIX_SOURCE
1011539Srgrimes#ifdef	__STDC__
1021539Srgrimesstruct timeval;				/* select(2) */
1031539Srgrimes#endif
1041539Srgrimesint	 acct __P((const char *));
1051539Srgrimesint	 async_daemon __P((void));
1061539Srgrimeschar	*brk __P((const char *));
1071539Srgrimesint	 chroot __P((const char *));
1081539Srgrimeschar	*crypt __P((const char *, const char *));
1091539Srgrimesint	 des_cipher __P((const char *, char *, long, int));
1101539Srgrimesint	 des_setkey __P((const char *key));
1111539Srgrimesint	 encrypt __P((char *, int));
1121539Srgrimesvoid	 endusershell __P((void));
1131539Srgrimesint	 exect __P((const char *, char * const *, char * const *));
1141539Srgrimesint	 fchdir __P((int));
1151539Srgrimesint	 fchown __P((int, int, int));
1161539Srgrimesint	 fsync __P((int));
1171539Srgrimesint	 ftruncate __P((int, off_t));
1182859Swollmanint	 getdomainname __P((char *, int));
1191539Srgrimesint	 getdtablesize __P((void));
1201539Srgrimeslong	 gethostid __P((void));
1211539Srgrimesint	 gethostname __P((char *, int));
1221539Srgrimesmode_t	 getmode __P((const void *, mode_t));
1231539Srgrimes__pure int
1241539Srgrimes	 getpagesize __P((void));
1251539Srgrimeschar	*getpass __P((const char *));
1261539Srgrimeschar	*getusershell __P((void));
1271539Srgrimeschar	*getwd __P((char *));			/* obsoleted by getcwd() */
1281539Srgrimesint	 initgroups __P((const char *, int));
1291539Srgrimesint	 iruserok __P((unsigned long, int, const char *, const char *));
1301539Srgrimesint	 mknod __P((const char *, mode_t, dev_t));
1311539Srgrimesint	 mkstemp __P((char *));
1321539Srgrimeschar	*mktemp __P((char *));
1331539Srgrimesint	 nfssvc __P((int, void *));
1341539Srgrimesint	 nice __P((int));
1351539Srgrimesvoid	 psignal __P((unsigned int, const char *));
1361539Srgrimesextern __const char *__const sys_siglist[];
1371539Srgrimesint	 profil __P((char *, int, int, int));
1381539Srgrimesint	 rcmd __P((char **, int, const char *,
1391539Srgrimes		const char *, const char *, int *));
1401539Srgrimeschar	*re_comp __P((const char *));
1411539Srgrimesint	 re_exec __P((const char *));
1421539Srgrimesint	 readlink __P((const char *, char *, int));
1431539Srgrimesint	 reboot __P((int));
1441539Srgrimesint	 revoke __P((const char *));
1451539Srgrimesint	 rresvport __P((int *));
1461539Srgrimesint	 ruserok __P((const char *, int, const char *, const char *));
1471539Srgrimeschar	*sbrk __P((int));
1481539Srgrimesint	 select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
1492859Swollmanint	 setdomainname __P((const char *, int));
1501539Srgrimesint	 setegid __P((gid_t));
1511539Srgrimesint	 seteuid __P((uid_t));
1521539Srgrimesint	 setgroups __P((int, const gid_t *));
1531539Srgrimesvoid	 sethostid __P((long));
1541539Srgrimesint	 sethostname __P((const char *, int));
1551539Srgrimesint	 setkey __P((const char *));
1561539Srgrimesint	 setlogin __P((const char *));
1571539Srgrimesvoid	*setmode __P((const char *));
1581539Srgrimesint	 setpgrp __P((pid_t pid, pid_t pgrp));	/* obsoleted by setpgid() */
1591539Srgrimesint	 setregid __P((gid_t, gid_t));
1601539Srgrimesint	 setreuid __P((uid_t, uid_t));
1611539Srgrimesint	 setrgid __P((gid_t));
1621539Srgrimesint	 setruid __P((uid_t));
1631539Srgrimesvoid	 setusershell __P((void));
1641539Srgrimesint	 swapon __P((const char *));
1651539Srgrimesint	 symlink __P((const char *, const char *));
1661539Srgrimesvoid	 sync __P((void));
1671539Srgrimesint	 syscall __P((int, ...));
1681539Srgrimesint	 truncate __P((const char *, off_t));
1691539Srgrimesint	 ttyslot __P((void));
1701539Srgrimesunsigned int	 ualarm __P((unsigned int, unsigned int));
1711539Srgrimesvoid	 usleep __P((unsigned int));
1721539Srgrimesvoid	*valloc __P((size_t));			/* obsoleted by malloc() */
1731539Srgrimespid_t	 vfork __P((void));
1741539Srgrimes#endif /* !_POSIX_SOURCE */
1751539Srgrimes__END_DECLS
1761539Srgrimes
1771539Srgrimes#endif /* !_UNISTD_H_ */
178