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