]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntpdsim no longer needs special command-line options
authorHarlan Stenn <stenn@ntp.org>
Thu, 4 Jan 2007 00:12:30 +0000 (19:12 -0500)
committerHarlan Stenn <stenn@ntp.org>
Thu, 4 Jan 2007 00:12:30 +0000 (19:12 -0500)
bk: 459c466eMmSg9KQ6ZldCONHyFLhwZg

NEWS
ntpd/Makefile.am
ntpd/cmd_args.c
ntpd/ntpd.c
ntpd/ntpsim.c

diff --git a/NEWS b/NEWS
index db1744b23fe5c14b15c43855e6328096a080ccee..86ff1117459d5af9cebff35aba2e62cad254c445 100644 (file)
--- 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.
 \f
 (4.2.4) Released by Harlan Stenn <stenn@ntp.org>
index e755619f1dfc3b2a9e616e5df3cc1551b68355cc..37064a15ff02ddcef3bfc9208362605e2d6b4aff 100644 (file)
@@ -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)
 
index c71167ec1bb6a69b34b03897b8dabf89d60fcab6..a48c598e80ac79e8250c31df32712cd8f054a5a0 100644 (file)
@@ -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
index 6b01881c0637465f21349a1a605ec2d80b8f0dde..00582cede59fc9ca8dac52e6dfaba5ad24cba801 100644 (file)
 
 #ifdef SIM
 # include "ntpsim.h"
-# include "ntpdsim-opts.h"
-#else
-# include "ntpd-opts.h"
 #endif
 
+#include "ntpd-opts.h"
+
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -466,11 +465,7 @@ ntpdmain(
 
        {
                int optct = optionProcess(
-#ifdef SIM
-                                         &ntpdsimOptions
-#else
                                          &ntpdOptions
-#endif
                                          , argc, argv);
                argc -= optct;
                argv += optct;
index d5ed587d562e63dee4f174c569c4fd6ea59ffc75..a9229ac0e1300fcba48442e67a81cbfedd593838 100644 (file)
@@ -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;
        }