2 * Proto types for machines that are not ANSI and POSIX compliant.
17 #ifdef HAVE_SYS_TYPES_H
18 # include <sys/types.h>
21 /* Needed for speed_t. */
30 #include "ntp_types.h"
31 #include "ntp_proto.h"
33 /* Let's try to keep this more or less alphabetized... */
37 extern int adjtime P((struct timeval *, struct timeval *));
42 extern void bcopy P((const char *, char *, int));
48 extern void bzero P((char *, int));
52 #ifdef DECL_CFSETISPEED_0
54 extern int cfsetispeed P((struct termios *, speed_t));
55 extern int cfsetospeed P((struct termios *, speed_t));
58 extern char * getpass P((const char *));
60 #ifdef DECL_HSTRERROR_0
61 extern const char * hstrerror P((int));
64 #ifdef DECL_INET_NTOA_0
66 extern char * inet_ntoa P((struct in_addr));
70 extern int ioctl P((int, u_long, char *));
75 extern int bind P((int, struct sockaddr *, int));
76 extern int connect P((int, struct sockaddr *, int));
77 extern int recv P((int, char *, int, int));
78 extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
79 extern int send P((int, char *, int, int));
80 extern int sendto P((int, char *, int, int, struct sockaddr *, int));
81 extern int setsockopt P((int, int, int, char *, int));
82 extern int socket P((int, int, int));
86 extern void * memmove P((void *, const void *, size_t));
90 extern char * memset P((char *, int, int));
94 extern int mkstemp P((char *));
98 extern char *mktemp P((char *));
101 #ifdef DECL_MRAND48_0
102 extern long mrand48 P((void));
107 extern int nlist P((const char *, struct nlist *));
111 extern int plock P((int));
115 extern int rename P((const char *, const char *));
120 extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
124 #ifdef DECL_SETITIMER_0
126 extern int setitimer P((int , struct itimerval *, struct itimerval *));
130 #ifdef DECL_SETPRIORITY_0
131 extern int setpriority P((int, int, int));
133 #ifdef DECL_SETPRIORITY_1
134 extern int setpriority P((int, id_t, int));
140 extern int sigvec P((int, struct sigvec *, struct sigvec *));
143 #ifndef HAVE_SNPRINTF
145 extern int snprintf P((char *, size_t, const char *, ...));
148 #ifdef DECL_SRAND48_0
149 extern void srand48 P((long));
153 #if defined(FILE) || defined(BUFSIZ)
154 extern int _flsbuf P((int, FILE *));
155 extern int _filbuf P((FILE *));
156 extern int fclose P((FILE *));
157 extern int fflush P((FILE *));
158 extern int fprintf P((FILE *, const char *, ...));
159 extern int fscanf P((FILE *, const char *, ...));
160 extern int fputs P((const char *, FILE *));
161 extern int fputc P((int, FILE *));
162 extern int fread P((char *, int, int, FILE *));
163 extern void perror P((const char *));
164 extern int printf P((const char *, ...));
165 extern int setbuf P((FILE *, char *));
166 # ifdef HAVE_SETLINEBUF
167 extern int setlinebuf P((FILE *));
169 extern int setvbuf P((FILE *, char *, int, int));
170 extern int scanf P((const char *, ...));
171 extern int sscanf P((const char *, const char *, ...));
172 extern int vfprintf P((FILE *, const char *, ...));
173 extern int vsprintf P((char *, const char *, ...));
178 extern int stime P((const time_t *));
182 extern int stime P((long *));
185 #ifdef DECL_STRERROR_0
186 extern char * strerror P((int errnum));
190 extern long strtol P((const char *, char **, int));
194 extern int syscall P((int, ...));
198 extern void closelog P((void));
200 extern void openlog P((const char *, int));
202 extern void openlog P((const char *, int, int));
204 extern int setlogmask P((int));
205 extern void syslog P((int, const char *, ...));
209 extern time_t time P((time_t *));
212 #ifdef DECL_TIMEOFDAY_0
213 #ifdef SYSV_TIMEOFDAY
214 extern int gettimeofday P((struct timeval *));
215 extern int settimeofday P((struct timeval *));
216 #else /* not SYSV_TIMEOFDAY */
218 extern int gettimeofday P((struct timeval *, struct timezone *));
219 extern int settimeofday P((struct timeval *, void *));
220 #endif /* not SYSV_TIMEOFDAY */
223 #ifdef DECL_TOLOWER_0
224 extern int tolower P((int));
227 #ifdef DECL_TOUPPER_0
228 extern int toupper P((int));
232 * Necessary variable declarations.
242 /*******************************************************/
246 * Unprotoyped library functions for SunOS 4.x.x
249 extern void closelog P((void));
250 extern void openlog P((char *, int, int));
251 extern void syslog P((int, char *, ...));
252 extern int setlogmask P((int));
254 extern char * getpass P((char *));
256 extern int setpriority P((int ,int ,int));
258 extern long strtol P((char *, char **, int));
260 #if !defined(NTP_POSIX_SOURCE)
261 extern int atoi P((char *));
262 extern int dup2 P((int, int));
263 extern int execve P((char *, char **,char **));
264 extern int fork P((void));
265 extern int getdtablesize P((void));
266 extern int qsort (void *, int , int,
267 int P((*compar)(void *, void *)));
268 extern long random P((void));
269 extern long mrand48 P((void));
270 extern int setpgrp P((int, int));
271 extern void srandom P((unsigned int));
272 extern void bcopy P((const char *, char *, int));
275 #ifndef bzero /* XXX macro prototyping clash */
276 extern void bzero P((char *, int));
277 extern int bcmp P((char *, char *, int));
278 extern void bcopy P((const char *, char *, int));
280 extern char *mktemp P((char *));
282 extern int tolower P((int));
284 extern int isatty P((int));
286 extern unsigned sleep P((unsigned ));
287 extern unsigned int alarm P((unsigned int));
288 extern int pause P((void));
290 extern int getpid P((void));
291 extern int getppid P((void));
293 extern int close P((int));
294 extern int ioctl P((int, int, char *));
295 extern int rename P((char *, char *));
297 extern int read P((int, void *, size_t));
298 extern int write P((int, const void *, size_t));
300 extern int unlink P((const char *));
301 extern int link P((const char *, const char *));
304 extern int fclose P((FILE *));
305 extern int fflush P((FILE *));
306 extern int fprintf P((FILE *, char *, ...));
307 extern int fscanf P((FILE *, char *, ...));
308 extern int fputs P((char *, FILE *));
309 extern int fputc P((char, FILE *));
310 extern int fread P((char *, int, int, FILE *));
311 extern int printf P((char *, ...));
312 extern int setbuf P((FILE *, char *));
313 extern int setvbuf P((FILE *, char *, int, int));
314 extern int scanf P((char *, ...));
315 extern int sscanf P((char *, char *, ...));
316 extern int vsprintf P((char *, char *, ...));
317 extern int _flsbuf P((int, FILE *));
318 extern int _filbuf P((FILE *));
319 extern void perror P((char *));
320 #ifdef HAVE_SETLINEBUF
321 extern int setlinebuf P((FILE *));
326 #ifdef NTP_POSIX_SOURCE /* these are builtins */
327 #ifndef NTP_NEED_BOPS /* but may be emulated by bops */
328 extern char *memcpy P(());
329 extern char *memset P(());
330 extern int memcmp P(());
336 extern int bind P((int, struct sockaddr *, int));
337 extern int connect P((int, struct sockaddr *, int));
338 extern int sendto P((int, char *, int, int, struct sockaddr *, int));
339 extern int setsockopt P((int, int, int, char *, int));
340 extern int socket P((int, int, int));
341 extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
342 #endif /* _sys_socket_h */
345 extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
349 extern int adjtime P((struct timeval *, struct timeval *));
350 extern int setitimer P((int , struct itimerval *, struct itimerval *));
351 #ifdef SYSV_TIMEOFDAY
352 extern int gettimeofday P((struct timeval *));
353 extern int settimeofday P((struct timeval *));
354 #else /* ! SYSV_TIMEOFDAY */
355 extern int gettimeofday P((struct timeval *, struct timezone *));
356 extern int settimeofday P((struct timeval *, struct timezone *));
357 #endif /* SYSV_TIMEOFDAY */
358 #endif /* _sys_time_h */
361 extern time_t time P((time_t *));
365 extern int setjmp P((jmp_buf));
366 extern void longjmp P((jmp_buf, int));
369 #ifdef _sys_resource_h
370 extern int getrusage P((int, struct rusage *));
374 extern int nlist P((char *, struct nlist *));
377 #endif /* SYS_SUNOS4 */
380 * Unprototyped library functions for DEC OSF/1
383 #ifndef _MACHINE_ENDIAN_H_
384 #define _MACHINE_ENDIAN_H_
385 extern u_short htons P((u_short));
386 extern u_short ntohs P((u_short));
387 extern u_int32 htonl P((u_int32));
388 extern u_int32 ntohl P((u_int32));
389 #endif /* _MACHINE_ENDIAN_H_ */
392 extern char * getpass P((char *));
394 extern char * mktemp P((char *));
396 extern int ioctl P((int, u_long, char *));
397 extern void bzero P((char *, int));
401 extern int bind P((int, const struct sockaddr *, int));
402 extern int connect P((int, const struct sockaddr *, int));
403 extern int socket P((int, int, int));
404 extern int sendto P((int, const void *, int, int, const struct sockaddr *, int));
405 extern int setsockopt P((int, int, int, const void *, int));
406 extern int recvfrom P((int, void *, int, int, struct sockaddr *, int *));
407 #endif /* SOCK_STREAM */
410 extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
416 * Unprototyped library functions for Ultrix
419 extern int close P((int));
420 extern char * getpass P((char *));
421 extern int getpid P((void));
422 extern int ioctl P((int, int, char *));
423 extern char *mktemp P((char *));
424 extern int unlink P((const char *));
425 extern int link P((const char *, const char *));
427 extern void closelog P((void));
428 extern void syslog P((int, char *, ...));
430 extern void openlog P((char *, int));
432 extern void openlog P((char *, int, int));
435 extern int setpriority P((int ,int ,int ));
438 extern int bind P((int, struct sockaddr *, int));
439 extern int connect P((int, struct sockaddr *, int));
440 extern int socket P((int, int, int));
441 extern int sendto P((int, char *, int, int, struct sockaddr *, int));
442 extern int setsockopt P((int, int, int, char *, int));
443 extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
444 #endif /* SOCK_STREAM */
447 extern int gettimeofday P((struct timeval *, struct timezone *));
448 extern int settimeofday P((struct timeval *, struct timezone *));
449 extern int adjtime P((struct timeval *, struct timeval *));
450 extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
451 extern int setitimer P((int , struct itimerval *, struct itimerval *));
452 #endif /* _TIME_H_ */
455 extern int nlist P((char *, struct nlist *));
458 #ifndef bzero /* XXX macro prototyping clash */
459 extern void bzero P((char *, int));
460 extern int bcmp P((char *, char *, int));
461 extern void bcopy P((const char *, char *, int));
464 #ifndef NTP_POSIX_SOURCE
465 extern int atoi P((char *));
466 extern void bzero P((char *, int));
467 extern int bcmp P((char *, char *, int));
468 extern void bcopy P((const char *, char *, int));
469 extern int execve P((char *, char **,char **));
470 extern int fork P((void));
471 extern int getdtablesize P((void));
472 extern int ran P((void));
473 extern int rand P((void));
474 extern void srand P((unsigned int));
476 extern int gettimeofday P((struct timeval *, struct timezone *));
477 extern int settimeofday P((struct timeval *, struct timezone *));
482 extern int getrusage P((int, struct rusage *));
485 #endif /* SYS_ULTRIX */
487 #if defined(__convex__)
488 extern char * getpass P((char *));
492 extern char * getpass P((char *));
496 extern char * getpass P((char *));
500 extern char * getpass P((char *));
501 #endif /* SYS_DOMAINOS */
504 #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
508 #endif /* l_stdlib_h */