117683Spst/*
217683Spst * Copyright (c) 1989, 1990, 1993, 1994, 1995, 1996
317683Spst *	The Regents of the University of California.  All rights reserved.
417683Spst *
517683Spst * Redistribution and use in source and binary forms, with or without
617683Spst * modification, are permitted provided that: (1) source code distributions
717683Spst * retain the above copyright notice and this paragraph in its entirety, (2)
817683Spst * distributions including binary code include the above copyright notice and
917683Spst * this paragraph in its entirety in the documentation or other materials
1017683Spst * provided with the distribution, and (3) all advertising materials mentioning
1117683Spst * features or use of this software display the following acknowledgement:
1217683Spst * ``This product includes software developed by the University of California,
1317683Spst * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1417683Spst * the University nor the names of its contributors may be used to endorse
1517683Spst * or promote products derived from this software without specific prior
1617683Spst * written permission.
1717683Spst * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1817683Spst * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1917683Spst * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2017683Spst *
21214518Srpaulo * @(#) $Header: /tcpdump/master/libpcap/lbl/os-sunos4.h,v 1.32 1999-10-07 23:46:41 mcr Exp $ (LBL)
2217683Spst */
2317683Spst
2417683Spst/* Prototypes missing in SunOS 4 */
2517683Spst#ifdef FILE
2617683Spstint	_filbuf(FILE *);
2717683Spstint	_flsbuf(u_char, FILE *);
2817683Spstint	fclose(FILE *);
2917683Spstint	fflush(FILE *);
3017683Spstint	fgetc(FILE *);
3117683Spstint	fprintf(FILE *, const char *, ...);
3217683Spstint	fputc(int, FILE *);
3317683Spstint	fputs(const char *, FILE *);
3417683Spstu_int	fread(void *, u_int, u_int, FILE *);
3517683Spstint	fseek(FILE *, long, int);
3617683Spstu_int	fwrite(const void *, u_int, u_int, FILE *);
3717683Spstint	pclose(FILE *);
3817683Spstvoid	rewind(FILE *);
3917683Spstvoid	setbuf(FILE *, char *);
4017683Spstint	setlinebuf(FILE *);
4117683Spstint	ungetc(int, FILE *);
4217683Spstint	vfprintf(FILE *, const char *, ...);
4317683Spstint	vprintf(const char *, ...);
4417683Spst#endif
4517683Spst
4617683Spst#if __GNUC__ <= 1
4717683Spstint	read(int, char *, u_int);
4817683Spstint	write(int, char *, u_int);
4917683Spst#endif
5017683Spst
5117683Spstlong	a64l(const char *);
5217683Spst#ifdef __STDC__
5317683Spststruct	sockaddr;
5417683Spst#endif
5517683Spstint	accept(int, struct sockaddr *, int *);
5617683Spstint	bind(int, struct sockaddr *, int);
5717683Spstint	bcmp(const void *, const void *, u_int);
5817683Spstvoid	bcopy(const void *, void *, u_int);
5917683Spstvoid	bzero(void *, int);
6017683Spstint	chroot(const char *);
6117683Spstint	close(int);
6217683Spstvoid	closelog(void);
6317683Spstint	connect(int, struct sockaddr *, int);
6417683Spstchar	*crypt(const char *, const char *);
6517683Spstint	daemon(int, int);
6617683Spstint	fchmod(int, int);
6717683Spstint	fchown(int, int, int);
6817683Spstvoid	endgrent(void);
6917683Spstvoid	endpwent(void);
7017683Spstvoid	endservent(void);
7117683Spst#ifdef __STDC__
7217683Spststruct	ether_addr;
7317683Spst#endif
7417683Spststruct	ether_addr *ether_aton(const char *);
7517683Spstint	flock(int, int);
7617683Spst#ifdef __STDC__
7717683Spststruct	stat;
7817683Spst#endif
7917683Spstint	fstat(int, struct stat *);
8017683Spst#ifdef __STDC__
8117683Spststruct statfs;
8217683Spst#endif
8317683Spstint	fstatfs(int, struct statfs *);
8417683Spstint	fsync(int);
8517683Spst#ifdef __STDC__
8617683Spststruct timeb;
8717683Spst#endif
8817683Spstint	ftime(struct timeb *);
8917683Spstint	ftruncate(int, off_t);
9017683Spstint	getdtablesize(void);
9117683Spstlong	gethostid(void);
9217683Spstint	gethostname(char *, int);
9317683Spstint	getopt(int, char * const *, const char *);
9417683Spstint	getpagesize(void);
9517683Spstchar	*getpass(char *);
9617683Spstint	getpeername(int, struct sockaddr *, int *);
9717683Spstint	getpriority(int, int);
9817683Spst#ifdef __STDC__
9917683Spststruct	rlimit;
10017683Spst#endif
10117683Spstint	getrlimit(int, struct rlimit *);
10217683Spstint	getsockname(int, struct sockaddr *, int *);
10317683Spstint	getsockopt(int, int, int, char *, int *);
10417683Spst#ifdef __STDC__
10517683Spststruct	timeval;
10617683Spststruct	timezone;
10717683Spst#endif
10817683Spstint	gettimeofday(struct timeval *, struct timezone *);
10917683Spstchar	*getusershell(void);
11017683Spstchar	*getwd(char *);
11117683Spstint	initgroups(const char *, int);
11217683Spstint	ioctl(int, int, caddr_t);
11317683Spstint	iruserok(u_long, int, char *, char *);
11417683Spstint	isatty(int);
11517683Spstint	killpg(int, int);
11617683Spstint	listen(int, int);
11717683Spst#ifdef __STDC__
11817683Spststruct	utmp;
11917683Spst#endif
12017683Spstvoid	login(struct utmp *);
12117683Spstint	logout(const char *);
12217683Spstoff_t	lseek(int, off_t, int);
12317683Spstint	lstat(const char *, struct stat *);
12417683Spstint	mkstemp(char *);
12517683Spstchar	*mktemp(char *);
12617683Spstint	munmap(caddr_t, int);
12717683Spstvoid	openlog(const char *, int, int);
12817683Spstvoid	perror(const char *);
12917683Spstint	printf(const char *, ...);
13017683Spstint	puts(const char *);
13117683Spstlong	random(void);
13217683Spstint	readlink(const char *, char *, int);
13317683Spst#ifdef __STDC__
13417683Spststruct	iovec;
13517683Spst#endif
13617683Spstint	readv(int, struct iovec *, int);
13717683Spstint	recv(int, char *, u_int, int);
13817683Spstint	recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
13917683Spstint	rename(const char *, const char *);
14017683Spstint	rcmd(char **, u_short, char *, char *, char *, int *);
14117683Spstint	rresvport(int *);
14217683Spstint	send(int, char *, u_int, int);
14317683Spstint	sendto(int, char *, u_int, int, struct sockaddr *, int);
14417683Spstint	setenv(const char *, const char *, int);
14517683Spstint	seteuid(int);
14617683Spstint	setpriority(int, int, int);
14717683Spstint	select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
14817683Spstint	setpgrp(int, int);
14917683Spstvoid	setpwent(void);
15017683Spstint	setrlimit(int, struct rlimit *);
15117683Spstvoid	setservent(int);
15217683Spstint	setsockopt(int, int, int, char *, int);
15317683Spstint	shutdown(int, int);
15417683Spstint	sigblock(int);
15517683Spstvoid	(*signal (int, void (*) (int))) (int);
15617683Spstint	sigpause(int);
15717683Spstint	sigsetmask(int);
15817683Spst#ifdef __STDC__
15917683Spststruct	sigvec;
16017683Spst#endif
16117683Spstint	sigvec(int, struct sigvec *, struct sigvec*);
16217683Spstint	snprintf(char *, size_t, const char *, ...);
16317683Spstint	socket(int, int, int);
16417683Spstint	socketpair(int, int, int, int *);
16517683Spstint	symlink(const char *, const char *);
16617683Spstvoid	srandom(int);
16717683Spstint	sscanf(char *, const char *, ...);
16817683Spstint	stat(const char *, struct stat *);
16917683Spstint	statfs(char *, struct statfs *);
17017683Spstchar	*strerror(int);
17117683Spstint	strcasecmp(const char *, const char *);
17217683Spst#ifdef __STDC__
17317683Spststruct	tm;
17417683Spst#endif
17517683Spstint	strftime(char *, int, char *, struct tm *);
17617683Spstint	strncasecmp(const char *, const char *, int);
17717683Spstlong	strtol(const char *, char **, int);
17817683Spstvoid	sync(void);
17917683Spstvoid	syslog(int, const char *, ...);
18017683Spstint	system(const char *);
18117683Spstlong	tell(int);
18217683Spsttime_t	time(time_t *);
18317683Spstchar	*timezone(int, int);
18417683Spstint	tolower(int);
18517683Spstint	toupper(int);
18617683Spstint	truncate(char *, off_t);
18717683Spstvoid	unsetenv(const char *);
18817683Spstint	vfork(void);
18917683Spstint	vsprintf(char *, const char *, ...);
19017683Spstint	writev(int, struct iovec *, int);
19117683Spst#ifdef __STDC__
19217683Spststruct	rusage;
19317683Spst#endif
19417683Spstint	utimes(const char *, struct timeval *);
19517683Spst#if __GNUC__ <= 1
19617683Spstint	wait(int *);
19717683Spstpid_t	wait3(int *, int, struct rusage *);
19817683Spst#endif
19917683Spst
20017683Spst/* Ugly signal hacking */
20117683Spst#ifdef SIG_ERR
20217683Spst#undef SIG_ERR
20317683Spst#define SIG_ERR		(void (*)(int))-1
20417683Spst#undef SIG_DFL
20517683Spst#define SIG_DFL		(void (*)(int))0
20617683Spst#undef SIG_IGN
20717683Spst#define SIG_IGN		(void (*)(int))1
20817683Spst
20917683Spst#ifdef KERNEL
21017683Spst#undef SIG_CATCH
21117683Spst#define SIG_CATCH	(void (*)(int))2
21217683Spst#endif
21317683Spst#undef SIG_HOLD
21417683Spst#define SIG_HOLD	(void (*)(int))3
21517683Spst#endif
216