From: Danny Mayer Date: Sat, 12 Apr 2003 04:38:17 +0000 (-0400) Subject: MIscellaneous fixes for warnings and include problems for NT. X-Git-Tag: NTP_4_1_80_RC1~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0baae2140913fa33f0a8435901aae6c459382b0;p=thirdparty%2Fntp.git MIscellaneous fixes for warnings and include problems for NT. bk: 3e979839jqZdqh1KOp3931rL5tcDQg --- diff --git a/libntp/dofptoa.c b/libntp/dofptoa.c index 40432906d..8d9427ff1 100644 --- a/libntp/dofptoa.c +++ b/libntp/dofptoa.c @@ -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]; diff --git a/libntp/ieee754io.c b/libntp/ieee754io.c index 4aa9920a3..979fed9b4 100644 --- a/libntp/ieee754io.c +++ b/libntp/ieee754io.c @@ -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; diff --git a/libntp/machines.c b/libntp/machines.c index 9a3457d87..9e318bf29 100644 --- a/libntp/machines.c +++ b/libntp/machines.c @@ -18,7 +18,7 @@ #endif #ifdef SYS_WINNT -# include +int _getch(void); /* Declare the one function rather than include conio.h */ #else #ifdef SYS_VXWORKS diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 6108b3957..eb3b6ab34 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -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 diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h index 11a88f5e3..209fcaa85 100644 --- a/ports/winnt/include/config.h +++ b/ports/winnt/include/config.h @@ -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 + #endif /* __config */