unistd.h revision 18286
11841Swollman/*- 21841Swollman * Copyright (c) 1991, 1993, 1994 31841Swollman * The Regents of the University of California. All rights reserved. 41841Swollman * 51841Swollman * Redistribution and use in source and binary forms, with or without 61841Swollman * modification, are permitted provided that the following conditions 71841Swollman * are met: 81841Swollman * 1. Redistributions of source code must retain the above copyright 91841Swollman * notice, this list of conditions and the following disclaimer. 101841Swollman * 2. Redistributions in binary form must reproduce the above copyright 111841Swollman * notice, this list of conditions and the following disclaimer in the 121841Swollman * documentation and/or other materials provided with the distribution. 131841Swollman * 3. All advertising materials mentioning features or use of this software 141841Swollman * must display the following acknowledgement: 151841Swollman * This product includes software developed by the University of 161841Swollman * California, Berkeley and its contributors. 171841Swollman * 4. Neither the name of the University nor the names of its contributors 181841Swollman * may be used to endorse or promote products derived from this software 191841Swollman * without specific prior written permission. 201841Swollman * 211841Swollman * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221841Swollman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231841Swollman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241841Swollman * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251841Swollman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261841Swollman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271841Swollman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281841Swollman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291841Swollman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301841Swollman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311841Swollman * SUCH DAMAGE. 321841Swollman * 331841Swollman * @(#)unistd.h 8.10 (Berkeley) 4/16/94 341841Swollman */ 351841Swollman 361841Swollman#ifndef _UNISTD_H_ 3784326Sobrien#define _UNISTD_H_ 3884326Sobrien 391841Swollman#include <sys/cdefs.h> 401841Swollman#include <sys/types.h> 411841Swollman#include <sys/unistd.h> 421841Swollman 431841Swollman#define STDIN_FILENO 0 /* standard input file descriptor */ 4484326Sobrien#define STDOUT_FILENO 1 /* standard output file descriptor */ 4584326Sobrien#define STDERR_FILENO 2 /* standard error file descriptor */ 461841Swollman 471841Swollman#ifndef NULL 481841Swollman#define NULL 0 /* null pointer constant */ 491841Swollman#endif 50117556Simp 51117556Simp__BEGIN_DECLS 521841Swollmanvoid _exit __P((int)) __dead2; 531841Swollmanint access __P((const char *, int)); 541841Swollmanunsigned int alarm __P((unsigned int)); 551841Swollmanint chdir __P((const char *)); 561841Swollmanint chown __P((const char *, uid_t, gid_t)); 571841Swollmanint close __P((int)); 581841Swollmanint dup __P((int)); 591841Swollmanint dup2 __P((int, int)); 601841Swollmanint execl __P((const char *, const char *, ...)); 6184326Sobrienint execle __P((const char *, const char *, ...)); 6284326Sobrienint execlp __P((const char *, const char *, ...)); 6384326Sobrienint execv __P((const char *, char * const *)); 641841Swollmanint execve __P((const char *, char * const *, char * const *)); 651841Swollmanint execvp __P((const char *, char * const *)); 661841Swollmanpid_t fork __P((void)); 671841Swollmanlong fpathconf __P((int, int)); 681841Swollmanchar *getcwd __P((char *, size_t)); 691841Swollmangid_t getegid __P((void)); 701841Swollmanuid_t geteuid __P((void)); 711841Swollmangid_t getgid __P((void)); 721841Swollmanint getgroups __P((int, gid_t [])); 731841Swollmanchar *getlogin __P((void)); 7484326Sobrienpid_t getpgrp __P((void)); 7584326Sobrienpid_t getpid __P((void)); 761841Swollmanpid_t getppid __P((void)); 771841Swollmanuid_t getuid __P((void)); 7884326Sobrienint isatty __P((int)); 7984326Sobrienint link __P((const char *, const char *)); 8084325Sobrienoff_t lseek __P((int, off_t, int)); 811841Swollmanlong pathconf __P((const char *, int)); 821841Swollmanint pause __P((void)); 831841Swollmanint pipe __P((int *)); 841841Swollmanssize_t read __P((int, void *, size_t)); 8584326Sobrienint rmdir __P((const char *)); 8684326Sobrienint setgid __P((gid_t)); 8784326Sobrienint setpgid __P((pid_t, pid_t)); 881841Swollmanpid_t setsid __P((void)); 891841Swollmanint setuid __P((uid_t)); 901841Swollmanunsigned int sleep __P((unsigned int)); 911841Swollmanlong sysconf __P((int)); 921841Swollmanpid_t tcgetpgrp __P((int)); 9384326Sobrienint tcsetpgrp __P((int, pid_t)); 9484326Sobrienchar *ttyname __P((int)); 9584326Sobrienint unlink __P((const char *)); 961841Swollmanssize_t write __P((int, const void *, size_t)); 971841Swollman 9884325Sobrien#ifndef _POSIX_SOURCE 9984325Sobrien#ifdef __STDC__ 10084325Sobrienstruct timeval; /* select(2) */ 10184325Sobrien#endif 10284325Sobrienint acct __P((const char *)); 1031841Swollmanint async_daemon __P((void)); 1041841Swollmanchar *brk __P((const char *)); 1051841Swollmanint chroot __P((const char *)); 10684326Sobriensize_t confstr __P((int, char *, size_t)); 1071841Swollmanchar *crypt __P((const char *, const char *)); 1081841Swollmanint des_cipher __P((const char *, char *, long, int)); 10984326Sobrienint des_setkey __P((const char *key)); 1101841Swollmanint encrypt __P((char *, int)); 11184326Sobrienvoid endusershell __P((void)); 11284326Sobrienint exect __P((const char *, char * const *, char * const *)); 1131841Swollmanint fchdir __P((int)); 1141841Swollmanint fchown __P((int, uid_t, gid_t)); 1151841Swollmanint fsync __P((int)); 1161841Swollmanint ftruncate __P((int, off_t)); 11784326Sobrienint getdomainname __P((char *, int)); 11884326Sobrienint getdtablesize __P((void)); 11984326Sobrienint getgrouplist __P((const char *, int, int *, int *)); 12084326Sobrienlong gethostid __P((void)); 1211841Swollmanint gethostname __P((char *, int)); 1221841Swollmanmode_t getmode __P((const void *, mode_t)); 1231841Swollmanint getpagesize __P((void)) __pure2; 1241841Swollmanchar *getpass __P((const char *)); 1251841Swollmanchar *getusershell __P((void)); 1261841Swollmanchar *getwd __P((char *)); /* obsoleted by getcwd() */ 1271841Swollmanint initgroups __P((const char *, int)); 12884326Sobrienint iruserok __P((unsigned long, int, const char *, const char *)); 12984325Sobrienint mknod __P((const char *, mode_t, dev_t)); 13084325Sobrienint mkstemp __P((char *)); 1311841Swollmanchar *mktemp __P((char *)); 1321841Swollmanint nfssvc __P((int, void *)); 1331841Swollmanint nice __P((int)); 1341841Swollmanvoid psignal __P((unsigned int, const char *)); 13584326Sobrienextern __const char *__const sys_siglist[]; 1361841Swollmanint profil __P((char *, int, int, int)); 1371841Swollmanint rcmd __P((char **, int, const char *, 1381841Swollman const char *, const char *, int *)); 1391841Swollmanchar *re_comp __P((const char *)); 1401841Swollmanint re_exec __P((const char *)); 1411841Swollmanint readlink __P((const char *, char *, int)); 14284326Sobrienint reboot __P((int)); 1431841Swollmanint revoke __P((const char *)); 1441841Swollmanpid_t rfork __P((int)); 1451841Swollmanint rresvport __P((int *)); 14698293Smdoddint ruserok __P((const char *, int, const char *, const char *)); 14798293Smdoddchar *sbrk __P((int)); 14898293Smdoddint select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); 14998293Smdoddint setdomainname __P((const char *, int)); 15098293Smdoddint setegid __P((gid_t)); 15198293Smdoddint seteuid __P((uid_t)); 1521841Swollmanint setgroups __P((int, const gid_t *)); 1531841Swollmanvoid sethostid __P((long)); 15484326Sobrienint sethostname __P((const char *, int)); 15584326Sobrienint setkey __P((const char *)); 15684326Sobrienint setlogin __P((const char *)); 1571841Swollmanvoid *setmode __P((const char *)); 1581841Swollmanint setpgrp __P((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */ 1591841Swollmanint setregid __P((gid_t, gid_t)); 1601841Swollmanint setreuid __P((uid_t, uid_t)); 1611841Swollmanint setrgid __P((gid_t)); 1621841Swollmanint setruid __P((uid_t)); 1631841Swollmanvoid setusershell __P((void)); 1641841Swollmanint swapon __P((const char *)); 16584326Sobrienint symlink __P((const char *, const char *)); 16684326Sobrienvoid sync __P((void)); 1671841Swollmanint syscall __P((int, ...)); 1681841Swollmanoff_t __syscall __P((quad_t, ...)); 1691841Swollmanint truncate __P((const char *, off_t)); 1701841Swollmanint ttyslot __P((void)); 1711841Swollmanunsigned int ualarm __P((unsigned int, unsigned int)); 17284326Sobrienvoid usleep __P((unsigned int)); 17384326Sobrienvoid *valloc __P((size_t)); /* obsoleted by malloc() */ 1741841Swollmanpid_t vfork __P((void)); 17584326Sobrien#endif /* !_POSIX_SOURCE */ 1761841Swollman__END_DECLS 17784326Sobrien 17884325Sobrien#endif /* !_UNISTD_H_ */ 1791841Swollman