From: Harlan Stenn Date: Thu, 26 Aug 1999 20:44:18 +0000 (-0000) Subject: Many files: X-Git-Tag: NTP_4_0_97_B~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e823e34e95bc7da941ae21bdec3b98940a9cfe;p=thirdparty%2Fntp.git Many files: * libntp/iosignal.c: * ntpd/ntp_peer.c: * ntpd/refclock_nmea.c: * ntpdate/ntptime_config.c: * ntpdate/ntptimeset.c: AIX, Irix, and SunOS lint cleanup From: Marc.Brett@westgeo.com bk: 37c5a722gLuojVI-swZ_u25aDFl6gQ --- diff --git a/ChangeLog b/ChangeLog index fd31a1559..4daaba8db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-08-26 Harlan Stenn + + * libntp/iosignal.c: + * ntpd/ntp_peer.c: + * ntpd/refclock_nmea.c: + * ntpdate/ntptime_config.c: + * ntpdate/ntptimeset.c: + AIX, Irix, and SunOS lint cleanup + From: Marc.Brett@westgeo.com + 1999-08-24 Harlan Stenn * configure.in 4.0.97a diff --git a/libntp/iosignal.c b/libntp/iosignal.c index 405b85ed0..a9a742a4b 100644 --- a/libntp/iosignal.c +++ b/libntp/iosignal.c @@ -516,5 +516,5 @@ wait_for_signal(void) # endif /* HAVE_SIGACTION */ #else -static int NotAnEmptyCompilationUnit; +int NotAnEmptyCompilationUnit; #endif diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c index 61403485e..748dc3604 100644 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@ -108,7 +108,7 @@ static u_short current_association_ID; */ u_long peer_timereset; /* time stat counters were zeroed */ u_long findpeer_calls; /* number of calls to findpeer */ -static u_long assocpeer_calls; /* number of calls to findpeerbyassoc */ +u_long assocpeer_calls; /* number of calls to findpeerbyassoc */ u_long peer_allocations; /* number of allocations from the free list */ u_long peer_demobilizations; /* number of structs freed to free list */ int total_peer_structs; /* number of peer structs in circulation */ diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c index 72ebeac5e..211d01e3d 100644 --- a/ntpd/refclock_nmea.c +++ b/ntpd/refclock_nmea.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "ntpd.h" #include "ntp_io.h" diff --git a/ntpdate/ntptime_config.c b/ntpdate/ntptime_config.c index ca8ed2784..1decb9ee1 100644 --- a/ntpdate/ntptime_config.c +++ b/ntpdate/ntptime_config.c @@ -154,9 +154,9 @@ loadservers( int peerversion; int minpoll; int maxpoll; - int ttl; + /* int ttl; */ int srvcnt; - u_long peerkey; + /* u_long peerkey; */ int peerflags; struct sockaddr_in peeraddr; FILE *fp; @@ -260,9 +260,9 @@ M peerversion = NTP_VERSION; minpoll = NTP_MINDPOLL; maxpoll = NTP_MAXDPOLL; - peerkey = 0; + /* peerkey = 0; */ peerflags = 0; - ttl = 0; + /* ttl = 0; */ for (i = 2; i < ntokens; i++) switch (matchkey(tokens[i], mod_keywords)) { case CONF_MOD_VERSION: @@ -289,7 +289,8 @@ M errflg = 1; break; } - peerkey = (int)atol(tokens[++i]); + ++i; + /* peerkey = (int)atol(tokens[i]); */ peerflags |= FLAG_AUTHENABLE; break; @@ -337,7 +338,8 @@ M errflg = 1; break; } - ttl = atoi(tokens[++i]); + ++i; + /* ttl = atoi(tokens[i]); */ break; case CONF_MOD_MODE: @@ -347,7 +349,8 @@ M errflg = 1; break; } - ttl = atoi(tokens[++i]); + ++i; + /* ttl = atoi(tokens[i]); */ break; case CONFIG_UNKNOWN: @@ -372,7 +375,7 @@ M case CONFIG_KEYS: if (ntokens >= 2) { - key_file = emalloc(strlen(tokens[1]) + 1); + key_file = (char *) emalloc(strlen(tokens[1]) + 1); strcpy(key_file, tokens[1]); } break; diff --git a/ntpdate/ntptimeset.c b/ntpdate/ntptimeset.c index 954468996..e97b6bc35 100644 --- a/ntpdate/ntptimeset.c +++ b/ntpdate/ntptimeset.c @@ -332,6 +332,12 @@ static void printserver P((register struct server *pp, FILE *fp)); int vsprintf P((char *str, const char *fmt, va_list ap)); #endif +#ifdef HAVE_SIGNALED_IO +extern void wait_for_signal P((void)); +extern void unblock_io_and_alarm P((void)); +extern void block_io_and_alarm P((void)); +#endif + #ifdef NO_MAIN_ALLOWED CALL(ntptimeset,"ntptimeset",ntptimesetmain); @@ -755,7 +761,7 @@ ntptimesetmain( /* * if we get here then we are in trouble */ - exit(1); + return(1); } @@ -1999,8 +2005,9 @@ input_handler(l_fp *xts) register struct recvbuf *rb; struct timeval tvzero; int fromlen; - l_fp ts = *xts; /* we ignore xts, but make the compiler happy */ fd_set fds; + l_fp ts; + ts = *xts; /* we ignore xts, but make the compiler happy */ /* * Do a poll to see if we have data