Home | History | Annotate | Download | only in lbl
      1 /*
      2  * Copyright (c) 1989, 1990, 1993, 1994, 1995, 1996
      3  *	The Regents of the University of California.  All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that: (1) source code distributions
      7  * retain the above copyright notice and this paragraph in its entirety, (2)
      8  * distributions including binary code include the above copyright notice and
      9  * this paragraph in its entirety in the documentation or other materials
     10  * provided with the distribution, and (3) all advertising materials mentioning
     11  * features or use of this software display the following acknowledgement:
     12  * ``This product includes software developed by the University of California,
     13  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
     14  * the University nor the names of its contributors may be used to endorse
     15  * or promote products derived from this software without specific prior
     16  * written permission.
     17  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
     18  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
     19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     20  */
     21 
     22 /* Prototypes missing in SunOS 4 */
     23 #ifdef FILE
     24 int	_filbuf(FILE *);
     25 int	_flsbuf(u_char, FILE *);
     26 int	fclose(FILE *);
     27 int	fflush(FILE *);
     28 int	fgetc(FILE *);
     29 int	fprintf(FILE *, const char *, ...);
     30 int	fputc(int, FILE *);
     31 int	fputs(const char *, FILE *);
     32 u_int	fread(void *, u_int, u_int, FILE *);
     33 int	fseek(FILE *, long, int);
     34 u_int	fwrite(const void *, u_int, u_int, FILE *);
     35 int	pclose(FILE *);
     36 void	rewind(FILE *);
     37 void	setbuf(FILE *, char *);
     38 int	setlinebuf(FILE *);
     39 int	ungetc(int, FILE *);
     40 int	vfprintf(FILE *, const char *, ...);
     41 int	vprintf(const char *, ...);
     42 #endif
     43 
     44 #if __GNUC__ <= 1
     45 int	read(int, char *, u_int);
     46 int	write(int, char *, u_int);
     47 #endif
     48 
     49 long	a64l(const char *);
     50 #ifdef __STDC__
     51 struct	sockaddr;
     52 #endif
     53 int	accept(int, struct sockaddr *, int *);
     54 int	bind(int, struct sockaddr *, int);
     55 int	bcmp(const void *, const void *, u_int);
     56 void	bcopy(const void *, void *, u_int);
     57 void	bzero(void *, int);
     58 int	chroot(const char *);
     59 int	close(int);
     60 void	closelog(void);
     61 int	connect(int, struct sockaddr *, int);
     62 char	*crypt(const char *, const char *);
     63 int	daemon(int, int);
     64 int	fchmod(int, int);
     65 int	fchown(int, int, int);
     66 void	endgrent(void);
     67 void	endpwent(void);
     68 #ifdef __STDC__
     69 struct	ether_addr;
     70 #endif
     71 struct	ether_addr *ether_aton(const char *);
     72 int	flock(int, int);
     73 #ifdef __STDC__
     74 struct	stat;
     75 #endif
     76 int	fstat(int, struct stat *);
     77 #ifdef __STDC__
     78 struct statfs;
     79 #endif
     80 int	fstatfs(int, struct statfs *);
     81 int	fsync(int);
     82 #ifdef __STDC__
     83 struct timeb;
     84 #endif
     85 int	ftime(struct timeb *);
     86 int	ftruncate(int, off_t);
     87 int	getdtablesize(void);
     88 long	gethostid(void);
     89 int	gethostname(char *, int);
     90 int	getopt(int, char * const *, const char *);
     91 int	getpagesize(void);
     92 char	*getpass(char *);
     93 int	getpeername(int, struct sockaddr *, int *);
     94 int	getpriority(int, int);
     95 #ifdef __STDC__
     96 struct	rlimit;
     97 #endif
     98 int	getrlimit(int, struct rlimit *);
     99 int	getsockname(int, struct sockaddr *, int *);
    100 int	getsockopt(int, int, int, char *, int *);
    101 #ifdef __STDC__
    102 struct	timeval;
    103 struct	timezone;
    104 #endif
    105 int	gettimeofday(struct timeval *, struct timezone *);
    106 char	*getusershell(void);
    107 char	*getwd(char *);
    108 int	initgroups(const char *, int);
    109 int	ioctl(int, int, caddr_t);
    110 int	iruserok(u_long, int, char *, char *);
    111 int	isatty(int);
    112 int	killpg(int, int);
    113 int	listen(int, int);
    114 #ifdef __STDC__
    115 struct	utmp;
    116 #endif
    117 void	login(struct utmp *);
    118 int	logout(const char *);
    119 off_t	lseek(int, off_t, int);
    120 int	lstat(const char *, struct stat *);
    121 int	mkstemp(char *);
    122 char	*mktemp(char *);
    123 int	munmap(caddr_t, int);
    124 void	openlog(const char *, int, int);
    125 void	perror(const char *);
    126 int	printf(const char *, ...);
    127 int	puts(const char *);
    128 long	random(void);
    129 int	readlink(const char *, char *, int);
    130 #ifdef __STDC__
    131 struct	iovec;
    132 #endif
    133 int	readv(int, struct iovec *, int);
    134 int	recv(int, char *, u_int, int);
    135 int	recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
    136 int	rename(const char *, const char *);
    137 int	rcmd(char **, u_short, char *, char *, char *, int *);
    138 int	rresvport(int *);
    139 int	send(int, char *, u_int, int);
    140 int	sendto(int, char *, u_int, int, struct sockaddr *, int);
    141 int	setenv(const char *, const char *, int);
    142 int	seteuid(int);
    143 int	setpriority(int, int, int);
    144 int	select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
    145 int	setpgrp(int, int);
    146 void	setpwent(void);
    147 int	setrlimit(int, struct rlimit *);
    148 int	setsockopt(int, int, int, char *, int);
    149 int	shutdown(int, int);
    150 int	sigblock(int);
    151 void	(*signal (int, void (*) (int))) (int);
    152 int	sigpause(int);
    153 int	sigsetmask(int);
    154 #ifdef __STDC__
    155 struct	sigvec;
    156 #endif
    157 int	sigvec(int, struct sigvec *, struct sigvec*);
    158 int	pcap_snprintf(char *, size_t, const char *, ...);
    159 int	socket(int, int, int);
    160 int	socketpair(int, int, int, int *);
    161 int	symlink(const char *, const char *);
    162 void	srandom(int);
    163 int	sscanf(char *, const char *, ...);
    164 int	stat(const char *, struct stat *);
    165 int	statfs(char *, struct statfs *);
    166 char	*strerror(int);
    167 int	strcasecmp(const char *, const char *);
    168 #ifdef __STDC__
    169 struct	tm;
    170 #endif
    171 int	strftime(char *, int, char *, struct tm *);
    172 int	strncasecmp(const char *, const char *, int);
    173 long	strtol(const char *, char **, int);
    174 void	sync(void);
    175 void	syslog(int, const char *, ...);
    176 int	system(const char *);
    177 long	tell(int);
    178 time_t	time(time_t *);
    179 char	*timezone(int, int);
    180 int	tolower(int);
    181 int	toupper(int);
    182 int	truncate(char *, off_t);
    183 void	unsetenv(const char *);
    184 int	vfork(void);
    185 int	vsprintf(char *, const char *, ...);
    186 int	writev(int, struct iovec *, int);
    187 #ifdef __STDC__
    188 struct	rusage;
    189 #endif
    190 int	utimes(const char *, struct timeval *);
    191 #if __GNUC__ <= 1
    192 int	wait(int *);
    193 pid_t	wait3(int *, int, struct rusage *);
    194 #endif
    195 
    196 /* Ugly signal hacking */
    197 #ifdef SIG_ERR
    198 #undef SIG_ERR
    199 #define SIG_ERR		(void (*)(int))-1
    200 #undef SIG_DFL
    201 #define SIG_DFL		(void (*)(int))0
    202 #undef SIG_IGN
    203 #define SIG_IGN		(void (*)(int))1
    204 
    205 #ifdef KERNEL
    206 #undef SIG_CATCH
    207 #define SIG_CATCH	(void (*)(int))2
    208 #endif
    209 #undef SIG_HOLD
    210 #define SIG_HOLD	(void (*)(int))3
    211 #endif
    212