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