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  * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32 1999-10-07 23:47:13 mcr Exp $ (LBL)
     22  */
     23 
     24 /* Prototypes missing in SunOS 4 */
     25 #ifdef FILE
     26 int	_filbuf(FILE *);
     27 int	_flsbuf(u_char, FILE *);
     28 int	fclose(FILE *);
     29 int	fflush(FILE *);
     30 int	fgetc(FILE *);
     31 int	fprintf(FILE *, const char *, ...);
     32 int	fputc(int, FILE *);
     33 int	fputs(const char *, FILE *);
     34 u_int	fread(void *, u_int, u_int, FILE *);
     35 int	fseek(FILE *, long, int);
     36 u_int	fwrite(const void *, u_int, u_int, FILE *);
     37 int	pclose(FILE *);
     38 void	rewind(FILE *);
     39 void	setbuf(FILE *, char *);
     40 int	setlinebuf(FILE *);
     41 int	ungetc(int, FILE *);
     42 int	vfprintf(FILE *, const char *, ...);
     43 int	vprintf(const char *, ...);
     44 #endif
     45 
     46 #if __GNUC__ <= 1
     47 int	read(int, char *, u_int);
     48 int	write(int, char *, u_int);
     49 #endif
     50 
     51 long	a64l(const char *);
     52 #ifdef __STDC__
     53 struct	sockaddr;
     54 #endif
     55 int	accept(int, struct sockaddr *, int *);
     56 int	bind(int, struct sockaddr *, int);
     57 int	bcmp(const void *, const void *, u_int);
     58 void	bcopy(const void *, void *, u_int);
     59 void	bzero(void *, int);
     60 int	chroot(const char *);
     61 int	close(int);
     62 void	closelog(void);
     63 int	connect(int, struct sockaddr *, int);
     64 char	*crypt(const char *, const char *);
     65 int	daemon(int, int);
     66 int	fchmod(int, int);
     67 int	fchown(int, int, int);
     68 void	endgrent(void);
     69 void	endpwent(void);
     70 void	endservent(void);
     71 #ifdef __STDC__
     72 struct	ether_addr;
     73 #endif
     74 struct	ether_addr *ether_aton(const char *);
     75 int	flock(int, int);
     76 #ifdef __STDC__
     77 struct	stat;
     78 #endif
     79 int	fstat(int, struct stat *);
     80 #ifdef __STDC__
     81 struct statfs;
     82 #endif
     83 int	fstatfs(int, struct statfs *);
     84 int	fsync(int);
     85 #ifdef __STDC__
     86 struct timeb;
     87 #endif
     88 int	ftime(struct timeb *);
     89 int	ftruncate(int, off_t);
     90 int	getdtablesize(void);
     91 long	gethostid(void);
     92 int	gethostname(char *, int);
     93 int	getopt(int, char * const *, const char *);
     94 int	getpagesize(void);
     95 char	*getpass(char *);
     96 int	getpeername(int, struct sockaddr *, int *);
     97 int	getpriority(int, int);
     98 #ifdef __STDC__
     99 struct	rlimit;
    100 #endif
    101 int	getrlimit(int, struct rlimit *);
    102 int	getsockname(int, struct sockaddr *, int *);
    103 int	getsockopt(int, int, int, char *, int *);
    104 #ifdef __STDC__
    105 struct	timeval;
    106 struct	timezone;
    107 #endif
    108 int	gettimeofday(struct timeval *, struct timezone *);
    109 char	*getusershell(void);
    110 char	*getwd(char *);
    111 int	initgroups(const char *, int);
    112 int	ioctl(int, int, caddr_t);
    113 int	iruserok(u_long, int, char *, char *);
    114 int	isatty(int);
    115 int	killpg(int, int);
    116 int	listen(int, int);
    117 #ifdef __STDC__
    118 struct	utmp;
    119 #endif
    120 void	login(struct utmp *);
    121 int	logout(const char *);
    122 off_t	lseek(int, off_t, int);
    123 int	lstat(const char *, struct stat *);
    124 int	mkstemp(char *);
    125 char	*mktemp(char *);
    126 int	munmap(caddr_t, int);
    127 void	openlog(const char *, int, int);
    128 void	perror(const char *);
    129 int	printf(const char *, ...);
    130 int	puts(const char *);
    131 long	random(void);
    132 int	readlink(const char *, char *, int);
    133 #ifdef __STDC__
    134 struct	iovec;
    135 #endif
    136 int	readv(int, struct iovec *, int);
    137 int	recv(int, char *, u_int, int);
    138 int	recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
    139 int	rename(const char *, const char *);
    140 int	rcmd(char **, u_short, char *, char *, char *, int *);
    141 int	rresvport(int *);
    142 int	send(int, char *, u_int, int);
    143 int	sendto(int, char *, u_int, int, struct sockaddr *, int);
    144 int	setenv(const char *, const char *, int);
    145 int	seteuid(int);
    146 int	setpriority(int, int, int);
    147 int	select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
    148 int	setpgrp(int, int);
    149 void	setpwent(void);
    150 int	setrlimit(int, struct rlimit *);
    151 void	setservent(int);
    152 int	setsockopt(int, int, int, char *, int);
    153 int	shutdown(int, int);
    154 int	sigblock(int);
    155 void	(*signal (int, void (*) (int))) (int);
    156 int	sigpause(int);
    157 int	sigsetmask(int);
    158 #ifdef __STDC__
    159 struct	sigvec;
    160 #endif
    161 int	sigvec(int, struct sigvec *, struct sigvec*);
    162 int	snprintf(char *, size_t, const char *, ...);
    163 int	socket(int, int, int);
    164 int	socketpair(int, int, int, int *);
    165 int	symlink(const char *, const char *);
    166 void	srandom(int);
    167 int	sscanf(char *, const char *, ...);
    168 int	stat(const char *, struct stat *);
    169 int	statfs(char *, struct statfs *);
    170 char	*strerror(int);
    171 int	strcasecmp(const char *, const char *);
    172 #ifdef __STDC__
    173 struct	tm;
    174 #endif
    175 int	strftime(char *, int, char *, struct tm *);
    176 int	strncasecmp(const char *, const char *, int);
    177 long	strtol(const char *, char **, int);
    178 void	sync(void);
    179 void	syslog(int, const char *, ...);
    180 int	system(const char *);
    181 long	tell(int);
    182 time_t	time(time_t *);
    183 char	*timezone(int, int);
    184 int	tolower(int);
    185 int	toupper(int);
    186 int	truncate(char *, off_t);
    187 void	unsetenv(const char *);
    188 int	vfork(void);
    189 int	vsprintf(char *, const char *, ...);
    190 int	writev(int, struct iovec *, int);
    191 #ifdef __STDC__
    192 struct	rusage;
    193 #endif
    194 int	utimes(const char *, struct timeval *);
    195 #if __GNUC__ <= 1
    196 int	wait(int *);
    197 pid_t	wait3(int *, int, struct rusage *);
    198 #endif
    199 
    200 /* Ugly signal hacking */
    201 #ifdef SIG_ERR
    202 #undef SIG_ERR
    203 #define SIG_ERR		(void (*)(int))-1
    204 #undef SIG_DFL
    205 #define SIG_DFL		(void (*)(int))0
    206 #undef SIG_IGN
    207 #define SIG_IGN		(void (*)(int))1
    208 
    209 #ifdef KERNEL
    210 #undef SIG_CATCH
    211 #define SIG_CATCH	(void (*)(int))2
    212 #endif
    213 #undef SIG_HOLD
    214 #define SIG_HOLD	(void (*)(int))3
    215 #endif
    216