From: Harlan Stenn Date: Sat, 8 Jan 2000 22:10:49 +0000 (-0000) Subject: Many files: X-Git-Tag: NTP_4_0_99~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fdec6eacdede0d83f9a037eebcc96b53035e8d4;p=thirdparty%2Fntp.git Many files: * configure.in: cannot be detected... * ntpd/ntp_io.h: ...but every OS has it * ntpd/refclock_oncore.c: Lint removal * ntpq/ntpq_ops.c: Lint removal * ntpq/refclock_chu.c: chu_major() is not an audio routine (?), lint * libntp/icom.c: AIX doesn't have From: Marc.Brett@westgeo.com * ntpd/refclock_chu.c: NetBSD needs sys/ioctl.h (chu_debug): NetBSED-specific debug output. From: Frederick Bruckman bk: 3877b5e9Wqf7EszjfafXbv0VMuaNvw --- diff --git a/ChangeLog b/ChangeLog index 3562dae8d..408c1b808 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2000-01-08 Harlan Stenn + + * configure.in: cannot be detected... + * ntpd/ntp_io.h: ...but every OS has it + * ntpd/refclock_oncore.c: Lint removal + * ntpq/ntpq_ops.c: Lint removal + * ntpq/refclock_chu.c: chu_major() is not an audio routine (?), lint + * libntp/icom.c: AIX doesn't have + From: Marc.Brett@westgeo.com + + * ntpd/refclock_chu.c: NetBSD needs sys/ioctl.h + (chu_debug): NetBSED-specific debug output. + From: Frederick Bruckman + 2000-01-06 Harlan Stenn * configure.in: 4.0.98m diff --git a/configure.in b/configure.in index e9175dd19..fc9125441 100644 --- a/configure.in +++ b/configure.in @@ -189,7 +189,7 @@ AC_HEADER_STDC AC_CHECK_HEADERS(bstring.h errno.h fcntl.h memory.h netdb.h poll.h resolv.h) AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h termios.h) AC_CHECK_HEADERS(timepps.h timex.h unistd.h utmp.h utmpx.h) -AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in.h netinet/ip.h) +AC_CHECK_HEADERS(arpa/nameser.h net/if.h netinet/in_systm.h netinet/in.h) AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO)]) AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h) dnl AC_CHECK_HEADERS(sys/chudefs.h) diff --git a/libntp/icom.c b/libntp/icom.c index 0943c27d5..00307862b 100644 --- a/libntp/icom.c +++ b/libntp/icom.c @@ -8,7 +8,14 @@ #include "icom.h" #include #include -#include + +#ifdef HAVE_TERMIOS_H +# include +#endif /* HAVE_TERMIOS_H */ +#ifdef HAVE_SYS_TERMIOS_H +# include +#endif /* HAVE_SYS_TERMIOS_H */ + #include #include diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 62ca80ab1..6ab7d267d 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -19,10 +19,12 @@ #ifdef HAVE_NETINET_IN_H # include #endif -#ifdef HAVE_NETINET_IP_H +#ifdef HAVE_NETINET_IN_SYSTM_H # include -# include -#endif +#else /* Some old linux systems at least have in_system.h instead. */ +# include +#endif /* HAVE_NETINET_IN_SYSTM_H */ +#include #ifdef HAVE_SYS_IOCTL_H # include #endif diff --git a/ntpd/refclock_chu.c b/ntpd/refclock_chu.c index 55892f7d8..4d3ed54aa 100644 --- a/ntpd/refclock_chu.c +++ b/ntpd/refclock_chu.c @@ -14,12 +14,15 @@ #include #ifdef AUDIO_CHU -#ifdef HAVE_SYS_AUDIOIO_H -#include -#endif /* HAVE_SYS_AUDIOIO_H */ -#ifdef HAVE_SUN_AUDIOIO_H -#include -#endif /* HAVE_SUN_AUDIOIO_H */ +# ifdef HAVE_SYS_AUDIOIO_H +# include +# endif /* HAVE_SYS_AUDIOIO_H */ +# ifdef HAVE_SUN_AUDIOIO_H +# include +# endif /* HAVE_SUN_AUDIOIO_H */ +# ifdef HAVE_SYS_IOCTL_H +# include +# endif /* HAVE_SYS_IOCTL_H */ #endif /* AUDIO_CHU */ #include "ntpd.h" @@ -357,10 +360,10 @@ static void chu_clear P((struct peer *)); static void chu_a P((struct peer *, int)); static void chu_b P((struct peer *, int)); static int chu_dist P((int, int)); +static int chu_major P((struct peer *)); #ifdef AUDIO_CHU static void chu_uart P((struct surv *, double)); static void chu_rf P((struct peer *, double)); -static int chu_major P((struct peer *)); static void chu_gain P((struct peer *)); static int chu_audio P((void)); static void chu_debug P((void)); @@ -1269,7 +1272,7 @@ chu_poll( up->ident, up->tai, up->burstcnt, up->mindist, up->ntstamp); #else sprintf(pp->a_lastcode, - "%c%1X %4d %3d %02d:%02d:%02d.000 %c%x %+d %d %d %s %d %d %d", + "%c%1X %4d %3d %02d:%02d:%02d.000 %c%x %+d %d %s %d %d %d %d", synchar, qual, pp->year, pp->day, pp->hour, pp->minute, pp->second, leapchar, up->dst, up->dut, minset, up->ident, up->tai, up->burstcnt, up->mindist, up->ntstamp); @@ -1592,8 +1595,15 @@ chu_debug( info.record.samples, info.record.eof, info.record.pause, info.record.error, info.record.waiting, info.record.balance); - printf("chu: monitor %d, muted %d\n", - info.monitor_gain, info.output_muted); +#ifdef __NetBSD__ + printf("chu: monitor %d, blocksize %d, hiwat %d, lowat %d, mode %d\n", + info.monitor_gain, info.blocksize, info.hiwat, info.lowat, + info.mode); +#else /* __NetBSD__ */ + printf("chu: monitor %d, muted %d\n", + info.monitor_gain, info.output_muted); +#endif /* __NetBSD__ */ + return; } #endif /* DEBUG */ #endif /* AUDIO_CHU */ diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index a9ecbde5a..6ecf62a3c 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -631,7 +631,7 @@ oncore_init_shmem(struct instance *instance, char *filename) exit(4); } free(buf); - instance->shmem = mmap(0, oncore_shmem_length, + instance->shmem = (u_char *) mmap(0, oncore_shmem_length, PROT_READ | PROT_WRITE, #ifdef MAP_HASSEMAPHORE MAP_HASSEMAPHORE | @@ -771,12 +771,12 @@ oncore_read_config( /* Remove trailing space */ for (i = strlen(line); - i > 0 && isascii(line[i - 1]) && isspace(line[i - 1]); + i > 0 && isascii((int)line[i - 1]) && isspace((int)line[i - 1]); ) line[--i] = '\0'; /* Remove leading space */ - for (cc = line; *cc && isascii(*cc) && isspace(*cc); cc++) + for (cc = line; *cc && isascii((int)*cc) && isspace((int)*cc); cc++) continue; /* Stop if nothing left */ @@ -785,9 +785,9 @@ oncore_read_config( /* Lowercase the command and find the arg */ for (ca = cc; *ca; ca++) { - if (isascii(*ca) && islower(*ca)) { + if (isascii((int)*ca) && islower((int)*ca)) { *ca = toupper(*ca); - } else if (isascii(*ca) && isspace(*ca)) { + } else if (isascii((int)*ca) && isspace((int)*ca)) { break; } else if (*ca == '=') { *ca = ' '; @@ -796,7 +796,7 @@ oncore_read_config( } /* Remove space leading the arg */ - for (; *ca && isascii(*ca) && isspace(*ca); ca++) + for (; *ca && isascii((int)*ca) && isspace((int)*ca); ca++) continue; if (!strncmp(cc, "STATUS", 6)) { @@ -806,7 +806,7 @@ oncore_read_config( /* Uppercase argument as well */ for (cp = ca; *cp; cp++) - if (isascii(*cp) && islower(*cp)) + if (isascii((int)*cp) && islower((int)*cp)) *cp = toupper(*cp); if (!strncmp(cc, "LAT", 3)) { diff --git a/ntpq/ntpq_ops.c b/ntpq/ntpq_ops.c index f94380a39..8827a8436 100644 --- a/ntpq/ntpq_ops.c +++ b/ntpq/ntpq_ops.c @@ -1319,7 +1319,7 @@ doprintpeers( l_fp rec; l_fp ts; u_char havevar[MAXHAVE]; - u_long poll; + u_long poll_sec; char type = '?'; char refid_string[10]; char whenbuf[8], pollbuf[8]; @@ -1442,7 +1442,7 @@ doprintpeers( /* * Got everything, format the line */ - poll = 1< NTP_OLDVERSION) c = flash3[CTL_PEER_STATVAL(rstatus) & 0x7]; else @@ -1453,7 +1453,7 @@ doprintpeers( "%c%-15.15s %-15.15s %2ld %c %4.4s %4.4s %3lo %7.7s %8.7s %7.7s\n", c, nntohost(srcadr), dstadr_refid, stratum, type, prettyinterval(whenbuf, when(&ts, &rec, &reftime)), - prettyinterval(pollbuf, (int)poll), reach, + prettyinterval(pollbuf, (int)poll_sec), reach, lfptoms(&estdelay, 3), lfptoms(&estoffset, 3), havevar[HAVE_JITTER] ? lfptoms(&estjitter, 3) : lfptoms(&estdisp, 3));