From: Sven Dietricht Date: Thu, 11 May 2000 22:58:43 +0000 (-0000) Subject: ntpd.c: X-Git-Tag: NTP_4_0_99_J~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11d4d4489490790731689153e87381d53ed11f64;p=thirdparty%2Fntp.git ntpd.c: Move hostname buffer into service_main, so that it is local in the WINNT build, where main blocks on service_main. config.h, unistd.h: Define AUTOKEY, MAXHOSTNAMELEN, and _finite to get compiling under WINNT ntpd.dsp: Add ntp_crypt.c to ntpd makefile. ChangeLog: Patch to get WINNT port running again. winnt.htm: Documentation about compile failure on 4.0.99i for WINNT. bk: 391b3b23b7Mwightj8XZdd41h_avWg --- diff --git a/ChangeLog b/ChangeLog index 09565c72b..2e9c037cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-05-11 Sven Dietrich + + * ports/winnt/include/config.h: New defines to support AUTOKEY + * ports/winnt/include/unistd.h: Added another dummy placeholder.h + * ports/winnt/ntpd/ntpd.dsp: Added ntp_crypt.c to makefile + * ports/winnt/ntpd/ntpd.c: service_main needs a local hostname[] + * html/hints/winnt.htm: Add remark about 4.0.99i not compiling. + These changes got WINNT running again. No idea if the keys stuff + works however. + 2000-05-10 Harlan Stenn * configure.in: 4.0.99i9 diff --git a/html/hints/winnt.htm b/html/hints/winnt.htm index a18237089..2b675edad 100644 --- a/html/hints/winnt.htm +++ b/html/hints/winnt.htm @@ -10,6 +10,12 @@

NTP 4.x for Windows NT

+

+Do not try to compile NTP-4.0.99i under WINNT, it will not work. +Fixed NTP-4.0.99i; look for next release to be functional. +Sven - May 11 2000 +

+

Download NTP-4.0.99g for the last stable WINNT port. I am working on adapting the major changes starting with 99i diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 6eeb98a17..4843c6d0e 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -524,7 +524,10 @@ service_main( char *cp; struct recvbuf *rbuflist; struct recvbuf *rbuf; - +#ifdef AUTOKEY + u_int n; + char hostname[MAXFILENAME]; +#endif /* AUTOKEY */ if(!debug) { /* register our service control handler */ diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h index 8f2084c28..538f2c91e 100644 --- a/ports/winnt/include/config.h +++ b/ports/winnt/include/config.h @@ -18,9 +18,13 @@ #endif # undef OPEN_BCAST_SOCKET /* for ntp_io.c */ # undef UDP_WILDCARD_DELIVERY /* for ntp_io.c */ /* 98/06/01 */ -# undef DES /* from libntp.mak */ +# undef DES /* from libntp.mak */ # define MD5 /* from libntp.mak */ # define HAVE_RANDOM +#define MAXHOSTNAMELEN 64 +#define AUTOKEY + +#define finite _finite # define random rand # define srandom srand diff --git a/ports/winnt/include/unistd.h b/ports/winnt/include/unistd.h new file mode 100644 index 000000000..5e1599737 --- /dev/null +++ b/ports/winnt/include/unistd.h @@ -0,0 +1,4 @@ +/************************************************************** + * Dummy Header for Unix to Windows NT portability + * Created for NTP package + **************************************************************/ diff --git a/ports/winnt/ntpd/ntpd.dsp b/ports/winnt/ntpd/ntpd.dsp index 2bc4991c1..0edd975fb 100644 --- a/ports/winnt/ntpd/ntpd.dsp +++ b/ports/winnt/ntpd/ntpd.dsp @@ -103,6 +103,10 @@ SOURCE=..\..\..\ntpd\ntp_control.c # End Source File # Begin Source File +SOURCE=..\..\..\ntpd\ntp_crypto.c +# End Source File +# Begin Source File + SOURCE=..\..\..\ntpd\ntp_filegen.c # End Source File # Begin Source File