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