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