From: Harlan Stenn Date: Thu, 4 Jan 2007 00:12:30 +0000 (-0500) Subject: ntpdsim no longer needs special command-line options X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816fed1f45aa77a82774de2fe6882ad20156ebd0;p=thirdparty%2Fntp.git ntpdsim no longer needs special command-line options bk: 459c466eMmSg9KQ6ZldCONHyFLhwZg --- diff --git a/NEWS b/NEWS index db1744b23f..86ff111745 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +* ntpdsim no longer needs special command-line options. +* New ntp.conf processing code from Sachin Kamboj. * codec (audio) and ICOM changes from Dave Mills. (4.2.4) Released by Harlan Stenn diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am index e755619f1d..37064a15ff 100644 --- a/ntpd/Makefile.am +++ b/ntpd/Makefile.am @@ -13,20 +13,17 @@ LDADD= version.o libntpd.a @LIBPARSE@ BUILT_SOURCES= ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu man_MANS= ntpd.1 -BUILT_SOURCES+= ntpdsim-opts.c ntpdsim-opts.h ntpdsim.1 ntpdsim-opts.texi ntpdsim-opts.menu -man_MANS+= ntpdsim.1 - # ntpd may need: # log10 refclock_wwv.o # sqrt ntp_control.o # floor refclock_wwv.o # which are (usually) provided by -lm. ntpd_LDADD = $(LDADD) -lm @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a -ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@ $(LIBOPTS_LDADD) +ntpdsim_LDADD = $(LDADD) -lm @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a ntpdsim_CFLAGS = $(CFLAGS) -DSIM check_y2k_LDADD = $(LDADD) ../libntp/libntp.a DISTCLEANFILES = .version version.c -EXTRA_DIST = ntpd-opts.def ntpdbase-opts.def ntpdsim-opts.def \ +EXTRA_DIST = ntpd-opts.def ntpdbase-opts.def \ refclock_msfees.c \ refclock_trak.c \ $(BUILT_SOURCES) @@ -46,7 +43,7 @@ check-local: @MAKE_CHECK_Y2K@ # SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h) # ntp_resolver.c is presently unused... ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntpd.c ntpd-opts.c ntpd-opts.h -ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c ntpdsim-opts.c ntpdsim-opts.h +ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c libntpd_a_SOURCES = jupiter.h ntp_control.c \ ntp_crypto.c ntp_filegen.c \ ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \ @@ -77,24 +74,11 @@ $(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_ $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def -$(srcdir)/ntpdsim-opts.h: $(srcdir)/ntpdsim-opts.c -$(srcdir)/ntpdsim-opts.c: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) - $(run_ag) ntpdsim-opts.def - -$(srcdir)/ntpdsim.1: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) - $(run_ag) -Tagman1.tpl -bntpdsim ntpdsim-opts.def - -$(srcdir)/ntpdsim-opts.texi $(srcdir)/ntpdsim-opts.menu: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) - $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdsim-opts.def - $(PROGRAMS): $(LDADD) ../libntp/libntp.a: cd ../libntp && $(MAKE) libntp.a -../libntp/libntpsim.a: - cd ../libntp && $(MAKE) libntpsim.a - ../libparse/libparse.a: cd ../libparse && $(MAKE) diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c index c71167ec1b..a48c598e80 100644 --- a/ntpd/cmd_args.c +++ b/ntpd/cmd_args.c @@ -9,14 +9,7 @@ #include "ntp_stdlib.h" #include "ntp_cmdargs.h" -#ifdef SIM -# include "ntpsim.h" -# include "ntpdsim-opts.h" -# define OPTSTRUCT ntpdsimOptions -#else -# include "ntpd-opts.h" -# define OPTSTRUCT ntpdOptions -#endif /* SIM */ +#include "ntpd-opts.h" /* * Definitions of things either imported from or exported to outside @@ -41,7 +34,7 @@ getCmdOpts( { extern const char *config_file; int errflg; - tOptions *myOptions = &OPTSTRUCT; + tOptions *myOptions = &ntpdOptions; /* * Initialize, initialize diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 6b01881c06..00582cede5 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -14,11 +14,10 @@ #ifdef SIM # include "ntpsim.h" -# include "ntpdsim-opts.h" -#else -# include "ntpd-opts.h" #endif +#include "ntpd-opts.h" + #ifdef HAVE_UNISTD_H # include #endif @@ -466,11 +465,7 @@ ntpdmain( { int optct = optionProcess( -#ifdef SIM - &ntpdsimOptions -#else &ntpdOptions -#endif , argc, argv); argc -= optct; argv += optct; diff --git a/ntpd/ntpsim.c b/ntpd/ntpsim.c index d5ed587d56..a9229ac0e1 100644 --- a/ntpd/ntpsim.c +++ b/ntpd/ntpsim.c @@ -3,8 +3,8 @@ * University of Delaware, 2001 */ #include "ntpd.h" -#include "ntpsim.h" -#include "ntpdsim-opts.h" +/*#include "ntpsim.h"*/ +#include "ntpd-opts.h" /* * Defines... @@ -75,7 +75,7 @@ ntpsim( mon_start(MON_OFF); { - int optct = optionProcess(&ntpdsimOptions, argc, argv); + int optct = optionProcess(&ntpdOptions, argc, argv); argc -= optct; argv += optct; }