]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
MIscellaneous fixes for warnings and include problems for NT.
authorDanny Mayer <mayer@ntp.org>
Sat, 12 Apr 2003 04:38:17 +0000 (00:38 -0400)
committerDanny Mayer <mayer@ntp.org>
Sat, 12 Apr 2003 04:38:17 +0000 (00:38 -0400)
bk: 3e979839jqZdqh1KOp3931rL5tcDQg

libntp/dofptoa.c
libntp/ieee754io.c
libntp/machines.c
ntpd/ntpd.c
ports/winnt/include/config.h

index 40432906df1efca408c3abbc2fb3d4e805429532..8d9427ff16e41fe844e363054371ec5c047003c8 100644 (file)
@@ -62,7 +62,7 @@ dofptoa(
         * Figure out how much of the fraction to do
         */
        if (msec) {
-               dec = ndec + 3;
+               dec = (short)(ndec + 3);
                if (dec < 3)
                    dec = 3;
                cpdec = &cbuf[8];
index 4aa9920a32783319ebcbce831e38726b64cd1f0b..979fed9b43848fd2240a9fa804ca688a401ab5ef 100644 (file)
@@ -139,7 +139,7 @@ fetch_ieee754(
   unsigned int sign;
   unsigned int bias;
   unsigned int maxexp;
-  unsigned int mbits;
+  int mbits;
   u_long mantissa_low;
   u_long mantissa_high;
   u_long characteristic;
index 9a3457d874d2cad9ff6e385bcd4f9a6f8b8395b6..9e318bf29088a32cbd770da2cd27b5efbe57214b 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 
 #ifdef SYS_WINNT
-# include <conio.h>
+int _getch(void);      /* Declare the one function rather than include conio.h */
 #else
 
 #ifdef SYS_VXWORKS
index 6108b3957c1378f958e3edc8b7e4c51f9fd0dd16..eb3b6ab343959d4c4009132eae2cc6c2ea38e086 100644 (file)
@@ -1031,7 +1031,9 @@ getgroup:
                 * Go around again
                 */
        }
+#ifndef SYS_WINNT
        exit(1); /* unreachable */
+#endif
 #ifndef SYS_WINNT
        return 1;               /* DEC OSF cc braindamage */
 #endif
@@ -1105,7 +1107,7 @@ lessdebug(
 }
 #endif
 #else /* not DEBUG */
-/*
+#ifndef SYS_WINNT/*
  * no_debug - We don't do the debug here.
  */
 static RETSIGTYPE
@@ -1118,6 +1120,7 @@ no_debug(
        msyslog(LOG_DEBUG, "ntpd not compiled for debugging (signal %d)", sig);
        errno = saved_errno;
 }
+#endif  /* not SYS_WINNT */
 #endif /* not DEBUG */
 
 #ifdef SYS_WINNT
index 11a88f5e3a4815ca0ced3fb410e8f16d40e0f858..209fcaa854e064c2fec7e23f52d065bb372702d6 100644 (file)
@@ -105,4 +105,7 @@ int NT_set_process_priority(void);  /* Define this function */
 # endif
 #define  SIOCGIFFLAGS SIO_GET_INTERFACE_LIST /* used in ntp_io.c */
 
+/* Include Windows headers */
+#include <windows.h>
+
 #endif /* __config */