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