xref: /netbsd/external/bsd/libpcap/dist/lbl/os-sunos4.h (revision 03e25b48)
1 /*	$NetBSD: os-sunos4.h,v 1.3 2017/01/24 22:29:29 christos Exp $	*/
2 
3 /*
4  * Copyright (c) 1989, 1990, 1993, 1994, 1995, 1996
5  *	The Regents of the University of California.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that: (1) source code distributions
9  * retain the above copyright notice and this paragraph in its entirety, (2)
10  * distributions including binary code include the above copyright notice and
11  * this paragraph in its entirety in the documentation or other materials
12  * provided with the distribution, and (3) all advertising materials mentioning
13  * features or use of this software display the following acknowledgement:
14  * ``This product includes software developed by the University of California,
15  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16  * the University nor the names of its contributors may be used to endorse
17  * or promote products derived from this software without specific prior
18  * written permission.
19  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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 #ifdef __STDC__
71 struct	ether_addr;
72 #endif
73 struct	ether_addr *ether_aton(const char *);
74 int	flock(int, int);
75 #ifdef __STDC__
76 struct	stat;
77 #endif
78 int	fstat(int, struct stat *);
79 #ifdef __STDC__
80 struct statfs;
81 #endif
82 int	fstatfs(int, struct statfs *);
83 int	fsync(int);
84 #ifdef __STDC__
85 struct timeb;
86 #endif
87 int	ftime(struct timeb *);
88 int	ftruncate(int, off_t);
89 int	getdtablesize(void);
90 long	gethostid(void);
91 int	gethostname(char *, int);
92 int	getopt(int, char * const *, const char *);
93 int	getpagesize(void);
94 char	*getpass(char *);
95 int	getpeername(int, struct sockaddr *, int *);
96 int	getpriority(int, int);
97 #ifdef __STDC__
98 struct	rlimit;
99 #endif
100 int	getrlimit(int, struct rlimit *);
101 int	getsockname(int, struct sockaddr *, int *);
102 int	getsockopt(int, int, int, char *, int *);
103 #ifdef __STDC__
104 struct	timeval;
105 struct	timezone;
106 #endif
107 int	gettimeofday(struct timeval *, struct timezone *);
108 char	*getusershell(void);
109 char	*getwd(char *);
110 int	initgroups(const char *, int);
111 int	ioctl(int, int, caddr_t);
112 int	iruserok(u_long, int, char *, char *);
113 int	isatty(int);
114 int	killpg(int, int);
115 int	listen(int, int);
116 #ifdef __STDC__
117 struct	utmp;
118 #endif
119 void	login(struct utmp *);
120 int	logout(const char *);
121 off_t	lseek(int, off_t, int);
122 int	lstat(const char *, struct stat *);
123 int	mkstemp(char *);
124 char	*mktemp(char *);
125 int	munmap(caddr_t, int);
126 void	openlog(const char *, int, int);
127 void	perror(const char *);
128 int	printf(const char *, ...);
129 int	puts(const char *);
130 long	random(void);
131 int	readlink(const char *, char *, int);
132 #ifdef __STDC__
133 struct	iovec;
134 #endif
135 int	readv(int, struct iovec *, int);
136 int	recv(int, char *, u_int, int);
137 int	recvfrom(int, char *, u_int, int, struct sockaddr *, int *);
138 int	rename(const char *, const char *);
139 int	rcmd(char **, u_short, char *, char *, char *, int *);
140 int	rresvport(int *);
141 int	send(int, char *, u_int, int);
142 int	sendto(int, char *, u_int, int, struct sockaddr *, int);
143 int	setenv(const char *, const char *, int);
144 int	seteuid(int);
145 int	setpriority(int, int, int);
146 int	select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
147 int	setpgrp(int, int);
148 void	setpwent(void);
149 int	setrlimit(int, struct rlimit *);
150 int	setsockopt(int, int, int, char *, int);
151 int	shutdown(int, int);
152 int	sigblock(int);
153 void	(*signal (int, void (*) (int))) (int);
154 int	sigpause(int);
155 int	sigsetmask(int);
156 #ifdef __STDC__
157 struct	sigvec;
158 #endif
159 int	sigvec(int, struct sigvec *, struct sigvec*);
160 int	pcap_snprintf(char *, size_t, const char *, ...);
161 int	socket(int, int, int);
162 int	socketpair(int, int, int, int *);
163 int	symlink(const char *, const char *);
164 void	srandom(int);
165 int	sscanf(char *, const char *, ...);
166 int	stat(const char *, struct stat *);
167 int	statfs(char *, struct statfs *);
168 char	*strerror(int);
169 int	strcasecmp(const char *, const char *);
170 #ifdef __STDC__
171 struct	tm;
172 #endif
173 int	strftime(char *, int, char *, struct tm *);
174 int	strncasecmp(const char *, const char *, int);
175 long	strtol(const char *, char **, int);
176 void	sync(void);
177 void	syslog(int, const char *, ...);
178 int	system(const char *);
179 long	tell(int);
180 time_t	time(time_t *);
181 char	*timezone(int, int);
182 int	tolower(int);
183 int	toupper(int);
184 int	truncate(char *, off_t);
185 void	unsetenv(const char *);
186 int	vfork(void);
187 int	vsprintf(char *, const char *, ...);
188 int	writev(int, struct iovec *, int);
189 #ifdef __STDC__
190 struct	rusage;
191 #endif
192 int	utimes(const char *, struct timeval *);
193 #if __GNUC__ <= 1
194 int	wait(int *);
195 pid_t	wait3(int *, int, struct rusage *);
196 #endif
197 
198 /* Ugly signal hacking */
199 #ifdef SIG_ERR
200 #undef SIG_ERR
201 #define SIG_ERR		(void (*)(int))-1
202 #undef SIG_DFL
203 #define SIG_DFL		(void (*)(int))0
204 #undef SIG_IGN
205 #define SIG_IGN		(void (*)(int))1
206 
207 #ifdef KERNEL
208 #undef SIG_CATCH
209 #define SIG_CATCH	(void (*)(int))2
210 #endif
211 #undef SIG_HOLD
212 #define SIG_HOLD	(void (*)(int))3
213 #endif
214