]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Many files:
authorHarlan Stenn <stenn@ntp.org>
Sat, 8 Jan 2000 22:10:49 +0000 (22:10 -0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 8 Jan 2000 22:10:49 +0000 (22:10 -0000)
  * configure.in: <netinet/ip.h> 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 <sys/termios.h>
  From: Marc.Brett@westgeo.com
  * ntpd/refclock_chu.c: NetBSD needs sys/ioctl.h
  (chu_debug): NetBSED-specific debug output.
  From: Frederick Bruckman <fb@enteract.com>

bk: 3877b5e9Wqf7EszjfafXbv0VMuaNvw

ChangeLog
configure.in
libntp/icom.c
ntpd/ntp_io.c
ntpd/refclock_chu.c
ntpd/refclock_oncore.c
ntpq/ntpq_ops.c

index 3562dae8d920fff4fa7ce27756d5e750e43a49a6..408c1b8081e34cb44536c57e16d7926dfdd4dbdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-01-08  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * configure.in: <netinet/ip.h> 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 <sys/termios.h> 
+       From: Marc.Brett@westgeo.com
+
+       * ntpd/refclock_chu.c: NetBSD needs sys/ioctl.h
+       (chu_debug): NetBSED-specific debug output.
+       From: Frederick Bruckman <fb@enteract.com>
+
 2000-01-06  Harlan Stenn  <stenn@whimsy.udel.edu>
 
        * configure.in: 4.0.98m
index e9175dd19b856947583f05be394a43baa0dc2f0c..fc91254417e57b1135c17d6d957e7db5c702d3c5 100644 (file)
@@ -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)
index 0943c27d5c8fec0159e945934f40dbbcbcbe25fd..00307862b18440847c9d2f752226b5b073b0e744 100644 (file)
@@ -8,7 +8,14 @@
 #include "icom.h"
 #include <unistd.h>
 #include <stdio.h>
-#include <sys/termios.h>
+
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#endif /* HAVE_TERMIOS_H */
+#ifdef HAVE_SYS_TERMIOS_H
+# include <sys/termios.h>
+#endif /* HAVE_SYS_TERMIOS_H */
+
 #include <fcntl.h>
 #include <errno.h>
 
index 62ca80ab13441a0787341d1159e6f356e6e03118..6ab7d267d8a2b20a8431cd963a4d321d6e750cfc 100644 (file)
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif
-#ifdef HAVE_NETINET_IP_H
+#ifdef HAVE_NETINET_IN_SYSTM_H
 # include <netinet/in_systm.h>
-# include <netinet/ip.h>
-#endif
+#else /* Some old linux systems at least have in_system.h instead. */
+# include <netinet/in_system.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
+#include <netinet/ip.h>
 #ifdef HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
index 55892f7d887716d016c4278e42c203bbbea018f1..4d3ed54aa71df554273c62542181d9124dd29157 100644 (file)
 #include <math.h>
 
 #ifdef AUDIO_CHU
-#ifdef HAVE_SYS_AUDIOIO_H
-#include <sys/audioio.h>
-#endif /* HAVE_SYS_AUDIOIO_H */
-#ifdef HAVE_SUN_AUDIOIO_H
-#include <sun/audioio.h>
-#endif /* HAVE_SUN_AUDIOIO_H */
+# ifdef HAVE_SYS_AUDIOIO_H
+#  include <sys/audioio.h>
+# endif /* HAVE_SYS_AUDIOIO_H */
+# ifdef HAVE_SUN_AUDIOIO_H
+#  include <sun/audioio.h>
+# endif /* HAVE_SUN_AUDIOIO_H */
+# ifdef HAVE_SYS_IOCTL_H
+#  include <sys/ioctl.h>
+# 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 */
index a9ecbde5ac25f77ad0eebf6d4652b80a13167f6a..6ecf62a3c253ec4728519406ceb112cff3f9c601 100644 (file)
@@ -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)) {
index f94380a39c04cca4287963b48c807511716feb20..8827a84364445fe419951ecf989504ea47352472 100644 (file)
@@ -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<<max(min3(ppoll, hpoll, NTP_MAXPOLL), NTP_MINPOLL);
+       poll_sec = 1<<max(min3(ppoll, hpoll, NTP_MAXPOLL), NTP_MINPOLL);
        if (pktversion > 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));