xref: /original-bsd/include/unistd.h (revision e8ab4623)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)unistd.h	5.27 (Berkeley) 05/02/93
8  */
9 
10 #ifndef _UNISTD_H_
11 #define	_UNISTD_H_
12 
13 #include <sys/cdefs.h>
14 #include <sys/types.h>
15 #include <sys/unistd.h>
16 
17 #define	 STDIN_FILENO	0	/* standard input file descriptor */
18 #define	STDOUT_FILENO	1	/* standard output file descriptor */
19 #define	STDERR_FILENO	2	/* standard error file descriptor */
20 
21 #ifndef NULL
22 #define	NULL		0	/* null pointer constant */
23 #endif
24 
25 __BEGIN_DECLS
26 __dead void
27 	 _exit __P((int));
28 int	 access __P((const char *, int));
29 unsigned int	 alarm __P((unsigned int));
30 int	 chdir __P((const char *));
31 int	 chown __P((const char *, uid_t, gid_t));
32 int	 close __P((int));
33 int	 dup __P((int));
34 int	 dup2 __P((int, int));
35 int	 execl __P((const char *, const char *, ...));
36 int	 execle __P((const char *, const char *, ...));
37 int	 execlp __P((const char *, const char *, ...));
38 int	 execv __P((const char *, char * const *));
39 int	 execve __P((const char *, char * const *, char * const *));
40 int	 execvp __P((const char *, char * const *));
41 pid_t	 fork __P((void));
42 long	 fpathconf __P((int, int));		/* not yet */
43 char	*getcwd __P((char *, size_t));
44 gid_t	 getegid __P((void));
45 uid_t	 geteuid __P((void));
46 gid_t	 getgid __P((void));
47 int	 getgroups __P((int, int *));		/* XXX (gid_t *) */
48 char	*getlogin __P((void));
49 pid_t	 getpgrp __P((void));
50 pid_t	 getpid __P((void));
51 pid_t	 getppid __P((void));
52 uid_t	 getuid __P((void));
53 int	 isatty __P((int));
54 int	 link __P((const char *, const char *));
55 #ifndef lseek
56 #define	 lseek __lseek
57 off_t	 lseek __P((int, off_t, int));
58 #endif
59 long	 pathconf __P((const char *, int));	/* not yet */
60 int	 pause __P((void));
61 int	 pipe __P((int *));
62 ssize_t	 read __P((int, void *, size_t));
63 int	 rmdir __P((const char *));
64 int	 setgid __P((gid_t));
65 int	 setpgid __P((pid_t, pid_t));
66 pid_t	 setsid __P((void));
67 int	 setuid __P((uid_t));
68 unsigned int	 sleep __P((unsigned int));
69 long	 sysconf __P((int));			/* not yet */
70 pid_t	 tcgetpgrp __P((int));
71 int	 tcsetpgrp __P((int, pid_t));
72 char	*ttyname __P((int));
73 int	 unlink __P((const char *));
74 ssize_t	 write __P((int, const void *, size_t));
75 
76 #ifndef	_POSIX_SOURCE
77 
78 /* structure timeval required for select() */
79 #include <sys/time.h>
80 
81 int	 acct __P((const char *));
82 int	 async_daemon __P((void));
83 char	*brk __P((const char *));
84 int	 chroot __P((const char *));
85 char	*crypt __P((const char *, const char *));
86 int	 des_cipher __P((const char *, char *, long, int));
87 int	 des_setkey __P((const char *key));
88 int	 encrypt __P((char *, int));
89 void	 endusershell __P((void));
90 int	 exect __P((const char *, char * const *, char * const *));
91 int	 fchdir __P((int));
92 int	 fchown __P((int, int, int));
93 int	 fsync __P((int));
94 #define	 ftruncate __ftruncate
95 int	 ftruncate __P((int, off_t));
96 int	 getdtablesize __P((void));
97 long	 gethostid __P((void));
98 int	 gethostname __P((char *, int));
99 mode_t	 getmode __P((const void *, mode_t));
100 __pure int
101 	 getpagesize __P((void));
102 char	*getpass __P((const char *));
103 char	*getusershell __P((void));
104 char	*getwd __P((char *));			/* obsoleted by getcwd() */
105 int	 initgroups __P((const char *, int));
106 int	 iruserok __P((unsigned long, int, const char *, const char *));
107 int	 mknod __P((const char *, mode_t, dev_t));
108 int	 mkstemp __P((char *));
109 char	*mktemp __P((char *));
110 int	 nfssvc __P((int, caddr_t));
111 int	 nice __P((int));
112 void	 psignal __P((unsigned int, const char *));
113 extern char *const sys_siglist[];
114 int	 profil __P((char *, int, int, int));
115 int	 rcmd __P((char **, int, const char *,
116 		const char *, const char *, int *));
117 char	*re_comp __P((const char *));
118 int	 re_exec __P((const char *));
119 int	 readlink __P((const char *, char *, int));
120 int	 reboot __P((int));
121 int	 revoke __P((const char *));
122 int	 rresvport __P((int *));
123 int	 ruserok __P((const char *, int, const char *, const char *));
124 char	*sbrk __P((int));
125 int	 select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
126 int	 setegid __P((gid_t));
127 int	 seteuid __P((uid_t));
128 int	 setgroups __P((int, const int *));
129 void	 sethostid __P((long));
130 int	 sethostname __P((const char *, int));
131 int	 setkey __P((const char *));
132 int	 setlogin __P((const char *));
133 void	*setmode __P((const char *));
134 int	 setpgrp __P((pid_t pid, pid_t pgrp));	/* obsoleted by setpgid() */
135 int	 setregid __P((int, int));
136 int	 setreuid __P((int, int));
137 int	 setrgid __P((gid_t));
138 int	 setruid __P((uid_t));
139 void	 setusershell __P((void));
140 int	 swapon __P((const char *));
141 int	 symlink __P((const char *, const char *));
142 void	 sync __P((void));
143 int	 syscall __P((int, ...));
144 #define	 truncate __truncate
145 int	 truncate __P((const char *, off_t));
146 int	 ttyslot __P((void));
147 unsigned int	 ualarm __P((unsigned int, unsigned int));
148 void	 usleep __P((unsigned int));
149 void	*valloc __P((size_t));			/* obsoleted by malloc() */
150 int	 vfork __P((void));
151 
152 #endif /* !_POSIX_SOURCE */
153 __END_DECLS
154 
155 #endif /* !_UNISTD_H_ */
156