]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1318] Allow multiple -g options on ntpd command line.
authorDave Hart <hart@ntp.org>
Sat, 3 Oct 2009 05:13:07 +0000 (05:13 +0000)
committerDave Hart <hart@ntp.org>
Sat, 3 Oct 2009 05:13:07 +0000 (05:13 +0000)
[Bug 1327] ntpq, ntpdc, ntp-keygen -d and -D should work with configure
  --disable-debugging.
Add ntpd --saveconfigquit <filename> option for future build-time
  testing of saveconfig fidelity.

bk: 4ac6dd63AUTFprTd66oQ37No_psLmg

37 files changed:
ChangeLog
configure.ac
include/debug-opt.def
include/ntp_config.h
libntp/Makefile.am
libparse/Makefile.am
ntpd/Makefile.am
ntpd/ntp_config.c
ntpd/ntp_control.c
ntpd/ntp_io.c
ntpd/ntpd-opts.c
ntpd/ntpd-opts.h
ntpd/ntpd-opts.texi
ntpd/ntpd.1
ntpd/ntpd.c
ntpd/ntpdbase-opts.def
ntpdate/Makefile.am
ntpdc/Makefile.am
ntpdc/ntpdc-opts.c
ntpdc/ntpdc-opts.h
ntpdc/ntpdc-opts.texi
ntpdc/ntpdc.1
ntpq/Makefile.am
ntpq/ntpq-opts.c
ntpq/ntpq-opts.h
ntpq/ntpq-opts.texi
ntpq/ntpq.1
ntpsnmpd/Makefile.am
parseutil/Makefile.am
ports/winnt/ntpd/ntservice.c
ports/winnt/vs2008/libntp/libntp.vcproj
sntp/Makefile.am
util/Makefile.am
util/ntp-keygen-opts.c
util/ntp-keygen-opts.h
util/ntp-keygen-opts.texi
util/ntp-keygen.1

index 4e5698b09d055547d7c5ffc1d64286d09f219340..99f843c3ece4d16f5264f9dd374f86e50b7afa02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+[Bug 1318] Allow multiple -g options on ntpd command line.
+[Bug 1327] ntpq, ntpdc, ntp-keygen -d and -D should work with configure
+  --disable-debugging.
+* Add ntpd --saveconfigquit <filename> option for future build-time
+  testing of saveconfig fidelity.
 (4.2.5p225) 2009/09/30 Released by Harlan Stenn <stenn@ntp.org>
 * authopt documentation changes from Dave Mills/Dave Hart.
 * [Bug 1324] support bracketed IPv6 numeric addresses for restrict.
index ae60fb7c4d54482876d669744180202bf47d5e26..e3b466d863788ce237af4782b22fdeae79d9c949 100644 (file)
@@ -2002,12 +2002,12 @@ case "$ac_cv_var_no_parenb_ignpar" in
  yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
 esac
 
-AC_MSG_CHECKING([if we're including debugging code])
+AC_MSG_CHECKING([if we're including ntpd debugging code])
 AC_ARG_ENABLE(debugging,
-   AC_HELP_STRING([--enable-debugging], [+ include debugging code]),
+   AC_HELP_STRING([--enable-debugging], [+ include ntpd debugging code]),
     [ntp_ok=$enableval], [ntp_ok=yes])
 if test "$ntp_ok" = "yes"; then
-    AC_DEFINE(DEBUG, 1, [Enable debugging?])
+    AC_DEFINE(DEBUG, 1, [Enable ntpd debugging code?])
 fi
 AC_MSG_RESULT($ntp_ok)
 
index 2c3da2a635bdc21761626a3e584b42db94d72b26..783e5b0b1ff06d2b371a1bd1c1cefaa23779a603 100644 (file)
@@ -11,7 +11,6 @@ flag = {
     name      = debug-level;
     value     = d;
     max       = NOLIMIT;
-    ifdef     = DEBUG;
     nopreset;
     descrip   = "Increase output debug message level";
     doc = <<-  _EndOfDoc_
@@ -23,7 +22,6 @@ flag = {
     name      = set-debug-level;
     value     = D;
     max       = NOLIMIT;
-    ifdef     = DEBUG;
     descrip   = "Set the output debug message level";
     arg-type  = string;
     flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
index 4b3000e46a20010532261f8500ecb602ff635f0b..98cb868ab80801619a45a28caa1039b9e0d95c66 100644 (file)
@@ -224,8 +224,8 @@ extern struct REMOTE_CONFIG_INFO remote_config;
 void config_remotely(sockaddr_u *);
 
 #ifdef SAVECONFIG
-int dump_config_tree(struct config_tree *ptree, FILE *df);
-int dump_all_config_trees(FILE *df);
+int dump_config_tree(struct config_tree *ptree, FILE *df, int comment);
+int dump_all_config_trees(FILE *df, int comment);
 #endif
 
 
index a80fa4ac63a2d0542f9e911b824b8da55d0125f3..946cb424efe319aae6378df07434745571bf4bae 100644 (file)
@@ -49,15 +49,9 @@ libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
 libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
 libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
 EXTRA_libntp_a_SOURCES = adjtimex.c
-INCLUDES =     -I$(top_srcdir)/include                         \
-               -I../include                                    \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I../lib/isc/include                            \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I../lib/isc/nothreads/include                  \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               -I../lib/isc/unix/include                       \
-               $(NULL)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include
 ETAGS_ARGS = Makefile.am
 
 noinst_HEADERS = lib_strbuf.h 
index b05ed97366dad62c14a29af0c724c7a4f3f1a834..20ea2535665a6ffa7e957bb5dd255a639454edd3 100644 (file)
@@ -10,19 +10,19 @@ CLEANFILES = libparse.a libparse_kernel.a
 K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
 
 libparse_a_SOURCES = parse.c \
-                     parse_conf.c \
-                     clk_meinberg.c \
-                     clk_schmid.c \
+                    parse_conf.c \
+                    clk_meinberg.c \
+                    clk_schmid.c \
                     clk_rawdcf.c \
                     clk_trimtsip.c \
-                    clk_dcf7000.c \
-                     clk_trimtaip.c \
-                     clk_rcc8000.c \
-                     clk_hopf6021.c \
-                    clk_computime.c \
+                    clk_dcf7000.c \
+                    clk_trimtaip.c \
+                    clk_rcc8000.c \
+                    clk_hopf6021.c \
+                    clk_computime.c \
                     clk_wharton.c \
                     clk_varitext.c \
-                     data_mbg.c \
+                    data_mbg.c \
                     info_trimble.c \
                     trim_info.c \
                     binio.c \
@@ -52,12 +52,10 @@ libparse_kernel_a_LIBADD = kparse$U.o \
                            $(NULL)
 
 
-INCLUDES =     -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               -I$(top_srcdir)/kernel                          \
-               $(NULL)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include -I$(top_srcdir)/kernel
+
 ETAGS_ARGS = Makefile.am
 
 EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
index 6120a77a96be1a4f207fbac8f57b81484e836cad..a25b10a3e5e055704b2cd1ba6c683a230d8b58d7 100644 (file)
@@ -7,16 +7,10 @@ bin_PROGRAMS= ntpd @MAKE_NTPDSIM@
 
 noinst_LIBRARIES=      libntpd.a
 
-AM_CPPFLAGS=   -I$(top_srcdir)/include                         \
-               -I../include                                    \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I../lib/isc/include                            \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I../lib/isc/nothreads/include                  \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               -I../lib/isc/unix/include                       \
-               $(LIBOPTS_CFLAGS)                               \
-               $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
 # LDADD might need RESLIB and ADJLIB.
 LDADD= version.o libntpd.a @LIBPARSE@
 AM_YFLAGS=     -d -t -r all
@@ -58,11 +52,13 @@ vphack_after:
                )
 
 BUILT_SOURCES= $(VPHACK) ntp_parser.c ntp_parser.h $(VPHACK_AFTER) \
-               ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
+       ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
 
 man_MANS=      ntpd.1
 
-# What about ntpdsim.1?
+# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
+# simulator currently uses ntpd-opts.[ch].  This also means there is no
+# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
 
 # ntpd may need:
 # log10                               refclock_wwv.o
@@ -83,39 +79,91 @@ ETAGS_ARGS = Makefile.am
 check_PROGRAMS = @MAKE_CHECK_Y2K@
 EXTRA_PROGRAMS = check_y2k ntpdsim
 run_ag=                cd $(srcdir) && autogen -L ../include --writable
-std_def_list=  $(top_srcdir)/include/debug-opt.def             \
-               $(top_srcdir)/include/autogen-version.def       \
+std_def_list=  $(top_srcdir)/include/autogen-version.def       \
                $(top_srcdir)/include/copyright.def             \
                $(top_srcdir)/include/version.def
 
 check-local: @MAKE_CHECK_Y2K@
        test -z "@MAKE_CHECK_Y2K@" || ./@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 ntp_parser.y   \
-       ntp_data_structures.c ntp_scanner.c ntp_scanner.h ntpd.c \
-       ntpd-opts.c ntpd-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 \
-       ntp_proto.c ntp_refclock.c ntp_request.c \
-       ntp_restrict.c ntp_timer.c ntp_util.c ntp_signd.c \
-       ppsapi_timepps.h \
-       refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
-       refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
-       refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
-       refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
-       refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
-       refclock_jupiter.c refclock_leitch.c refclock_local.c \
-       refclock_mx4200.c refclock_neoclock4x.c \
-       refclock_nmea.c refclock_oncore.c refclock_palisade.c \
-       refclock_palisade.h refclock_parse.c \
-       refclock_pcf.c refclock_pst.c refclock_ripencc.c refclock_shm.c \
-       refclock_tpro.c refclock_true.c refclock_tt560.c \
-       refclock_ulink.c refclock_wwv.c refclock_wwvb.c \
-       refclock_zyfer.c
+ntpd_SOURCES =                 \
+       cmd_args.c              \
+       ntp_config.c            \
+       ntp_data_structures.c   \
+       ntp_io.c                \
+       ntp_parser.y            \
+       ntp_scanner.c           \
+       ntp_scanner.h           \
+       ntpd.c                  \
+       ntpd-opts.c             \
+       ntpd-opts.h             \
+       $(NULL)
+       
+ntpdsim_SOURCES =              \
+       $(ntpd_SOURCES)         \
+       ntpsim.c                \
+       $(NULL)
+
+# libntpd_a_SOURCES do not use #ifdef SIM
+
+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              \
+       ntp_proto.c             \
+       ntp_refclock.c          \
+       ntp_request.c           \
+       ntp_restrict.c          \
+       ntp_signd.c             \
+       ntp_timer.c             \
+       ntp_util.c              \
+       ppsapi_timepps.h        \
+       refclock_acts.c         \
+       refclock_arbiter.c      \
+       refclock_arc.c          \
+       refclock_as2201.c       \
+       refclock_atom.c         \
+       refclock_bancomm.c      \
+       refclock_chronolog.c    \
+       refclock_chu.c          \
+       refclock_conf.c         \
+       refclock_datum.c        \
+       refclock_dumbclock.c    \
+       refclock_fg.c           \
+       refclock_gpsvme.c       \
+       refclock_heath.c        \
+       refclock_hopfser.c      \
+       refclock_hopfpci.c      \
+       refclock_hpgps.c        \
+       refclock_irig.c         \
+       refclock_jjy.c          \
+       refclock_jupiter.c      \
+       refclock_leitch.c       \
+       refclock_local.c        \
+       refclock_mx4200.c       \
+       refclock_neoclock4x.c   \
+       refclock_nmea.c         \
+       refclock_oncore.c       \
+       refclock_palisade.c     \
+       refclock_palisade.h     \
+       refclock_parse.c        \
+       refclock_pcf.c          \
+       refclock_pst.c          \
+       refclock_ripencc.c      \
+       refclock_shm.c          \
+       refclock_tpro.c         \
+       refclock_true.c         \
+       refclock_tt560.c        \
+       refclock_ulink.c        \
+       refclock_wwv.c          \
+       refclock_wwvb.c         \
+       refclock_zyfer.c        \
+       $(NULL)
 
 $(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
 $(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
index 9ae41734310a2e2b152551b76a05e6d1eaf6b664..44b5f4166cd0357cad7a6e3b0e79fa05a0b5d319 100644 (file)
@@ -26,6 +26,7 @@
 #include "ntp_stdlib.h"
 #include "ntp_assert.h"
 #include "ntpsim.h"
+#include "ntpd-opts.h"
 #include <ntp_random.h>
 #include <isc/net.h>
 #include <isc/result.h>
@@ -470,15 +471,18 @@ free_config_tree(
 #ifdef SAVECONFIG
 /* Dump all trees */
 int
-dump_all_config_trees (
-               FILE *df
-               ) 
+dump_all_config_trees(
+       FILE *df,
+       int comment
+       ) 
 {
        struct config_tree *cfg_ptr = cfg_tree_history;
        int return_value = 0;
 
-       for(; cfg_ptr != NULL; cfg_ptr = cfg_ptr->link) 
-               return_value |= dump_config_tree(cfg_ptr, df);
+       for (cfg_ptr = cfg_tree_history;
+            cfg_ptr != NULL; 
+            cfg_ptr = cfg_ptr->link) 
+               return_value |= dump_config_tree(cfg_ptr, df, comment);
 
        return return_value;
 }
@@ -488,7 +492,8 @@ dump_all_config_trees (
 int
 dump_config_tree(
        struct config_tree *ptree,
-       FILE *df
+       FILE *df,
+       int comment
        )
 {
        struct peer_node *peer = NULL;
@@ -517,18 +522,21 @@ dump_config_tree(
        char timestamp[80];
        int enable;
 
-       printf("dump_config_tree(%p)\n", ptree);
+       DPRINTF(1, ("dump_config_tree(%p)\n", ptree));
 
-       if (!strftime(timestamp, sizeof(timestamp), "%Y-%m-%d %H:%M:%S",
-                     localtime(&ptree->timestamp)))
-               timestamp[0] = '\0';
+       if (comment) {
+               if (!strftime(timestamp, sizeof(timestamp),
+                             "%Y-%m-%d %H:%M:%S",
+                             localtime(&ptree->timestamp)))
+                       timestamp[0] = '\0';
 
-       fprintf(df, "# %s %s %s\n",
-               timestamp,
-               (CONF_SOURCE_NTPQ == ptree->source.attr)
-                   ? "ntpq remote config from"
-                   : "startup configuration file",
-               ptree->source.value.s);
+               fprintf(df, "# %s %s %s\n",
+                       timestamp,
+                       (CONF_SOURCE_NTPQ == ptree->source.attr)
+                           ? "ntpq remote config from"
+                           : "startup configuration file",
+                       ptree->source.value.s);
+       }
 
        /* For options I didn't find documentation I'll just output its name and the cor. value */
        list_ptr = queue_head(ptree->vars);
@@ -3834,6 +3842,22 @@ getconfig(
                free_netinfo_config(config_netinfo);
 #endif /* HAVE_NETINFO */
 
+#ifdef SAVECONFIG
+       if (HAVE_OPT( SAVECONFIGQUIT )) {
+               FILE *dumpfile;
+               int dumpfailed;
+
+               dumpfile = fopen(OPT_ARG( SAVECONFIGQUIT ), "w");
+               dumpfailed = dump_all_config_trees(dumpfile, 0);
+               if (dumpfailed)
+                       fprintf(stderr,
+                               "--saveconfigquit %s error %d\n",
+                               OPT_ARG( SAVECONFIGQUIT ),
+                               dumpfailed);
+               exit(dumpfailed);
+       }
+#endif /* SAVECONFIG */
+
        /*
        printf("getconfig: res_fp <%p> call_resolver: %d", res_fp, call_resolver);
        */
index b21445e5d48318f9e87e284bf1cc59739a36386f..4172c42c5daf66ad106549c15500afdd56933e3a 100644 (file)
@@ -629,7 +629,7 @@ save_config(
        else
                fptr = fdopen(fd, "w");
 
-       if (NULL == fptr || -1 == dump_all_config_trees(fptr)) {
+       if (NULL == fptr || -1 == dump_all_config_trees(fptr, 1)) {
                snprintf(reply, sizeof(reply),
                         "Unable to save configuration to file %s",
                         filename);
index ff2a1b5327d51cc68f5b70d086991afd3d5f3b6e..417a8646f7769ac26da62448ad996f6f11b4c561 100644 (file)
@@ -33,6 +33,7 @@
 #include "ntp.h"
 #include "ntp_unixtime.h"
 #include "ntp_assert.h"
+#include "ntpd-opts.h"
 
 /* Don't include ISC's version of IPv6 variables and structures */
 #define ISC_IPV6_H 1
@@ -581,7 +582,7 @@ io_open_sockets(void)
 {
        static int already_opened;
 
-       if (already_opened)
+       if (already_opened || HAVE_OPT( SAVECONFIGQUIT ))
                return;
 
        already_opened = 1;
index 2ad4b3f9dae9670114e2f6ac4f69da27900fc3fc..2674c51bf061f09e01fb747554d487adf2ea0268 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:33:07 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:52:55 AM UTC
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpd copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -51,7 +51,7 @@ extern tUsageProc optionUsage;
  *  global included definitions
  */
 #ifdef __windows
-  extern int atoi(const char*);
+  extern int atoi(const char *);
 #else
 # include <stdlib.h>
 #endif
@@ -317,6 +317,25 @@ tSCC    zPropagationdelay_Name[]   = "propagationdelay";
 #define PROPAGATIONDELAY_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
+/*
+ *  Saveconfigquit option description:
+ */
+#ifdef SAVECONFIG
+tSCC    zSaveconfigquitText[] =
+        "Save parsed configuration and quit";
+tSCC    zSaveconfigquit_NAME[]     = "SAVECONFIGQUIT";
+tSCC    zSaveconfigquit_Name[]     = "saveconfigquit";
+#define SAVECONFIGQUIT_FLAGS       (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+#else   /* disable Saveconfigquit */
+#define VALUE_OPT_SAVECONFIGQUIT NO_EQUIVALENT
+#define SAVECONFIGQUIT_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
+#define zSaveconfigquitText       NULL
+#define zSaveconfigquit_NAME      NULL
+#define zSaveconfigquit_Name      NULL
+#endif  /* SAVECONFIG */
+
 /*
  *  Statsdir option description:
  */
@@ -604,7 +623,7 @@ static tOptDesc optDesc[ OPTION_CT ] = {
   {  /* entry idx, value */ 9, VALUE_OPT_PANICGATE,
      /* equiv idx, value */ 9, VALUE_OPT_PANICGATE,
      /* equivalenced to  */ NO_EQUIVALENT,
-     /* min, max, act ct */ 0, 1, 0,
+     /* min, max, act ct */ 0, NOLIMIT, 0,
      /* opt state flags  */ PANICGATE_FLAGS, 0,
      /* last opt argumnt */ { NULL },
      /* arg list/cookie  */ NULL,
@@ -757,8 +776,20 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zPropagationdelayText, zPropagationdelay_NAME, zPropagationdelay_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 22, VALUE_OPT_STATSDIR,
-     /* equiv idx, value */ 22, VALUE_OPT_STATSDIR,
+  {  /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+     /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SAVECONFIGQUIT_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ zSaveconfigquitText, zSaveconfigquit_NAME, zSaveconfigquit_Name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
+     /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ STATSDIR_FLAGS, 0,
@@ -769,8 +800,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zStatsdirText, zStatsdir_NAME, zStatsdir_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 23, VALUE_OPT_TRUSTEDKEY,
-     /* equiv idx, value */ 23, VALUE_OPT_TRUSTEDKEY,
+  {  /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
+     /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, NOLIMIT, 0,
      /* opt state flags  */ TRUSTEDKEY_FLAGS, 0,
@@ -781,8 +812,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zTrustedkeyText, zTrustedkey_NAME, zTrustedkey_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 24, VALUE_OPT_USER,
-     /* equiv idx, value */ 24, VALUE_OPT_USER,
+  {  /* entry idx, value */ 25, VALUE_OPT_USER,
+     /* equiv idx, value */ 25, VALUE_OPT_USER,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ USER_FLAGS, 0,
@@ -793,8 +824,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zUserText, zUser_NAME, zUser_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 25, VALUE_OPT_UPDATEINTERVAL,
-     /* equiv idx, value */ 25, VALUE_OPT_UPDATEINTERVAL,
+  {  /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
+     /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ UPDATEINTERVAL_FLAGS, 0,
@@ -805,8 +836,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zUpdateintervalText, zUpdateinterval_NAME, zUpdateinterval_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 26, VALUE_OPT_VAR,
-     /* equiv idx, value */ 26, VALUE_OPT_VAR,
+  {  /* entry idx, value */ 27, VALUE_OPT_VAR,
+     /* equiv idx, value */ 27, VALUE_OPT_VAR,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, NOLIMIT, 0,
      /* opt state flags  */ VAR_FLAGS, 0,
@@ -817,8 +848,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zVarText, zVar_NAME, zVar_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 27, VALUE_OPT_DVAR,
-     /* equiv idx, value */ 27, VALUE_OPT_DVAR,
+  {  /* entry idx, value */ 28, VALUE_OPT_DVAR,
+     /* equiv idx, value */ 28, VALUE_OPT_DVAR,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, NOLIMIT, 0,
      /* opt state flags  */ DVAR_FLAGS, 0,
@@ -829,8 +860,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zDvarText, zDvar_NAME, zDvar_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 28, VALUE_OPT_SLEW,
-     /* equiv idx, value */ 28, VALUE_OPT_SLEW,
+  {  /* entry idx, value */ 29, VALUE_OPT_SLEW,
+     /* equiv idx, value */ 29, VALUE_OPT_SLEW,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SLEW_FLAGS, 0,
@@ -841,8 +872,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zSlewText, zSlew_NAME, zSlew_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 29, VALUE_OPT_USEPCC,
-     /* equiv idx, value */ 29, VALUE_OPT_USEPCC,
+  {  /* entry idx, value */ 30, VALUE_OPT_USEPCC,
+     /* equiv idx, value */ 30, VALUE_OPT_USEPCC,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ USEPCC_FLAGS, 0,
@@ -853,8 +884,8 @@ static tOptDesc optDesc[ OPTION_CT ] = {
      /* desc, NAME, name */ zUsepccText, zUsepcc_NAME, zUsepcc_Name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 30, VALUE_OPT_PCCFREQ,
-     /* equiv idx, value */ 30, VALUE_OPT_PCCFREQ,
+  {  /* entry idx, value */ 31, VALUE_OPT_PCCFREQ,
+     /* equiv idx, value */ 31, VALUE_OPT_PCCFREQ,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PCCFREQ_FLAGS, 0,
@@ -967,7 +998,7 @@ tOptions ntpdOptions = {
       NO_EQUIVALENT, /* '-#' option index */
       NO_EQUIVALENT /* index of default opt */
     },
-    34 /* full option count */, 31 /* user option count */,
+    35 /* full option count */, 32 /* user option count */,
     ntpd_full_usage, ntpd_short_usage,
     NULL, NULL
 };
@@ -994,7 +1025,7 @@ doUsageOpt(
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 29 */
+    /* extracted from ntpdbase-opts.def, line 98 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
 #endif /* defined DEBUG */
index 322fb469a0b10047a9d644d6792c87d3168b0dad..e22a078963663e1e1472dbf372d41933821c4c01 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.h)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:33:06 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:52:54 AM UTC
  *  From the definitions    ntpd-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpd copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -74,21 +74,22 @@ typedef enum {
     INDEX_OPT_PRIORITY          = 19,
     INDEX_OPT_QUIT              = 20,
     INDEX_OPT_PROPAGATIONDELAY  = 21,
-    INDEX_OPT_STATSDIR          = 22,
-    INDEX_OPT_TRUSTEDKEY        = 23,
-    INDEX_OPT_USER              = 24,
-    INDEX_OPT_UPDATEINTERVAL    = 25,
-    INDEX_OPT_VAR               = 26,
-    INDEX_OPT_DVAR              = 27,
-    INDEX_OPT_SLEW              = 28,
-    INDEX_OPT_USEPCC            = 29,
-    INDEX_OPT_PCCFREQ           = 30,
-    INDEX_OPT_VERSION           = 31,
-    INDEX_OPT_HELP              = 32,
-    INDEX_OPT_MORE_HELP         = 33
+    INDEX_OPT_SAVECONFIGQUIT    = 22,
+    INDEX_OPT_STATSDIR          = 23,
+    INDEX_OPT_TRUSTEDKEY        = 24,
+    INDEX_OPT_USER              = 25,
+    INDEX_OPT_UPDATEINTERVAL    = 26,
+    INDEX_OPT_VAR               = 27,
+    INDEX_OPT_DVAR              = 28,
+    INDEX_OPT_SLEW              = 29,
+    INDEX_OPT_USEPCC            = 30,
+    INDEX_OPT_PCCFREQ           = 31,
+    INDEX_OPT_VERSION           = 32,
+    INDEX_OPT_HELP              = 33,
+    INDEX_OPT_MORE_HELP         = 34
 } teOptIndex;
 
-#define OPTION_CT    34
+#define OPTION_CT    35
 #define NTPD_VERSION       "4.2.5p225"
 #define NTPD_FULL_VERSION  "ntpd - NTP daemon program - Ver. 4.2.5p225"
 
@@ -205,6 +206,10 @@ typedef enum {
 #  warning undefining PROPAGATIONDELAY due to option name conflict
 #  undef   PROPAGATIONDELAY
 # endif
+# ifdef    SAVECONFIGQUIT
+#  warning undefining SAVECONFIGQUIT due to option name conflict
+#  undef   SAVECONFIGQUIT
+# endif
 # ifdef    STATSDIR
 #  warning undefining STATSDIR due to option name conflict
 #  undef   STATSDIR
@@ -264,6 +269,7 @@ typedef enum {
 # undef PRIORITY
 # undef QUIT
 # undef PROPAGATIONDELAY
+# undef SAVECONFIGQUIT
 # undef STATSDIR
 # undef TRUSTEDKEY
 # undef USER
@@ -312,6 +318,9 @@ typedef enum {
 #define OPT_VALUE_PRIORITY       (DESC(PRIORITY).optArg.argInt)
 #define VALUE_OPT_QUIT           'q'
 #define VALUE_OPT_PROPAGATIONDELAY 'r'
+#ifdef SAVECONFIG
+#define VALUE_OPT_SAVECONFIGQUIT 22
+#endif /* SAVECONFIG */
 #define VALUE_OPT_STATSDIR       's'
 #define VALUE_OPT_TRUSTEDKEY     't'
 #ifdef HAVE_DROPROOT
@@ -319,14 +328,14 @@ typedef enum {
 #endif /* HAVE_DROPROOT */
 #define VALUE_OPT_UPDATEINTERVAL 'U'
 #define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
-#define VALUE_OPT_VAR            26
-#define VALUE_OPT_DVAR           27
+#define VALUE_OPT_VAR            27
+#define VALUE_OPT_DVAR           28
 #define VALUE_OPT_SLEW           'x'
 #ifdef SYS_WINNT
-#define VALUE_OPT_USEPCC         29
+#define VALUE_OPT_USEPCC         30
 #endif /* SYS_WINNT */
 #ifdef SYS_WINNT
-#define VALUE_OPT_PCCFREQ        30
+#define VALUE_OPT_PCCFREQ        31
 #endif /* SYS_WINNT */
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
index 2693eb76088a36573522fbab0063166e8d4fd2bb..f489c5e37a8f04a3fc2dfee53ec2b5da2be1ccdc 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpd-opts.texi)
 # 
-# It has been AutoGen-ed  September 30, 2009 at 07:33:10 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed  Saturday October  3, 2009 at 03:52:56 AM UTC
 # From the definitions    ntpd-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -44,6 +44,7 @@ This software is released under a specialized copyright license.
 * ntpd priority::               priority option (-P)
 * ntpd propagationdelay::       propagationdelay option (-r)
 * ntpd quit::                   quit option (-q)
+* ntpd saveconfigquit::         saveconfigquit option
 * ntpd set-debug-level::        set-debug-level option (-D)
 * ntpd slew::                   slew option (-x)
 * ntpd statsdir::               statsdir option (-s)
@@ -62,7 +63,7 @@ This is the automatically generated usage text for ntpd:
 
 @exampleindent 0
 @example
-ntpd - NTP daemon program - Ver. 4.2.5p220
+ntpd - NTP daemon program - Ver. 4.2.5p225
 USAGE:  ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -250,6 +251,13 @@ file.
 @cindex ntpd-panicgate
 
 This is the ``allow the first adjustment to be big'' option.
+
+This option has some usage constraints.  It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
 Normally,
 ntpd
 exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
@@ -403,6 +411,22 @@ Note: The kernel time discipline is disabled with this option.
 This is the ``broadcast/propagation delay'' option.
 Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
 
+@node ntpd saveconfigquit
+@subsection saveconfigquit option
+@cindex ntpd-saveconfigquit
+
+This is the ``save parsed configuration and quit'' option.
+
+This option has some usage constraints.  It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{SAVECONFIG} during the compilation.
+@end itemize
+
+Cause ntpd to parse its startup configuration file and save an
+equivalent to the given filename and exit.  This option was
+designed for automated testing.
+
 @node ntpd statsdir
 @subsection statsdir option (-s)
 @cindex ntpd-statsdir
index d9d2ceebf0ae597aafe15e43e12d51d05da589a0..548c8eaef846494bcebdc8e801e57f7f39f14931 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPD 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPD 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpd.1)
 .\"  
-.\"  It has been AutoGen-ed  September 30, 2009 at 07:33:09 AM by AutoGen 5.9.9pre5
+.\"  It has been AutoGen-ed  Saturday October  3, 2009 at 03:52:55 AM UTC
 .\"  From the definitions    ntpd-opts.def
 .\"  and the template file   agman1.tpl
 .\"
@@ -89,6 +89,7 @@ file.
 .TP
 .BR \-g ", " \--panicgate
 Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
 .sp
 Normally,
 ntpd
@@ -200,6 +201,13 @@ Broadcast/propagation delay.
 .sp
 Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
 .TP
+.BR \--saveconfigquit "=\fIstring\fP"
+Save parsed configuration and quit.
+.sp
+Cause ntpd to parse its startup configuration file and save an
+equivalent to the given filename and exit.  This option was
+designed for automated testing.
+.TP
 .BR \-s " \fIstring\fP, " \--statsdir "=" \fIstring\fP
 Statistics file location.
 .sp
index b7d54b6e093c8b322ba9468a9e502de6f590c98a..062fc5654c47e0bd0704b2ad3d0023b9c8aa81f5 100644 (file)
@@ -222,6 +222,7 @@ int         ntpdmain                (int, char **);
 static void    set_process_priority    (void);
 void           init_logging            (char const *, int);
 void           setup_logfile           (void);
+static void    process_commandline_opts(int *, char ***);
 
 static void    assertion_failed        (const char *file, int line,
        isc_assertiontype_t type, const char *cond);
@@ -314,6 +315,21 @@ setup_logfile(
        }
 }
 
+
+static void
+process_commandline_opts(
+       int *pargc,
+       char ***pargv
+       )
+{
+       int optct;
+       
+       optct = optionProcess(&ntpdOptions, *pargc, *pargv);
+       *pargc -= optct;
+       *pargv += optct;
+}
+
+
 #ifdef SIM
 int
 main(
@@ -321,6 +337,8 @@ main(
        char *argv[]
        )
 {
+       process_commandline_opts(&argc, &argv);
+
        return ntpsim(argc, argv);
 }
 #else /* SIM */
@@ -477,17 +495,8 @@ ntpdmain(
 #endif
 
        progname = argv[0];
-
        initializing = 1;               /* mark that we are initializing */
-
-       {
-               int optct = optionProcess(
-                                         &ntpdOptions
-                                         , argc, argv);
-               argc -= optct;
-               argv += optct;
-       }
-
+       process_commandline_opts(&argc, &argv);
        init_logging(progname, 1);      /* Open the log file */
 
 #ifdef HAVE_UMASK
@@ -507,8 +516,7 @@ ntpdmain(
                uid_t uid;
 
                uid = getuid();
-               if (uid)
-               {
+               if (uid && !HAVE_OPT( SAVECONFIGQUIT )) {
                        msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);
                        printf("must be run as root, not uid %ld\n", (long)uid);
                        exit(1);
@@ -534,7 +542,11 @@ ntpdmain(
                set_mm_timer(MM_TIMER_HIRES);
 #endif
 
-       if (HAVE_OPT( NOFORK ) || HAVE_OPT( QUIT ))
+       if (HAVE_OPT( NOFORK ) || HAVE_OPT( QUIT )
+#ifdef DEBUG
+           || debug
+#endif
+           || HAVE_OPT( SAVECONFIGQUIT ))
                nofork = 1;
 
        if (HAVE_OPT( NOVIRTUALIPS ))
@@ -588,20 +600,16 @@ ntpdmain(
        /*
         * Detach us from the terminal.  May need an #ifndef GIZMO.
         */
-       if (
-#  ifdef DEBUG
-           !debug &&
-#  endif /* DEBUG */
-           !nofork)
-       {
+       if (!nofork) {
 
-       /*
-        * Install trap handlers to log errors and assertion failures.
-        * Default handlers print to stderr which doesn't work if detached.
-        */
-       isc_assertion_setcallback(assertion_failed);
-       isc_error_setfatal(library_fatal_error);
-       isc_error_setunexpected(library_unexpected_error);
+               /*
+                * Install trap handlers to log errors and assertion
+                * failures.  Default handlers print to stderr which 
+                * doesn't work if detached.
+                */
+               isc_assertion_setcallback(assertion_failed);
+               isc_error_setfatal(library_fatal_error);
+               isc_error_setunexpected(library_unexpected_error);
 
 #  ifndef SYS_WINNT
 #   ifdef HAVE_DAEMON
@@ -862,13 +870,13 @@ ntpdmain(
 
 #ifdef HAVE_LINUX_CAPABILITIES
                /* set flag: keep privileges accross setuid() call (we only really need cap_sys_time): */
-               if( prctl( PR_SET_KEEPCAPS, 1L, 0L, 0L, 0L ) == -1 ) {
+               if (prctl( PR_SET_KEEPCAPS, 1L, 0L, 0L, 0L ) == -1) {
                        msyslog( LOG_ERR, "prctl( PR_SET_KEEPCAPS, 1L ) failed: %m" );
                        exit(-1);
                }
 #else
                /* we need a user to switch to */
-               if( user == NULL ) {
+               if (user == NULL) {
                        msyslog(LOG_ERR, "Need user name to drop root privileges (see -u flag!)" );
                        exit(-1);
                }
index 231c3a46898f37285b4aca082c9332992c229825..b2e04e2a014a23b27023c912037f64c0f5290131 100644 (file)
@@ -1,5 +1,13 @@
 #include autogen-version.def
 
+include = <<- _EOF_
+       #ifdef __windows
+         extern int atoi(const char *);
+       #else
+       # include <stdlib.h>
+       #endif
+       _EOF_;
+
 test-main;
 
 flag = {
@@ -68,7 +76,31 @@ flag = {
        _EndOfDoc_;
 };
 
-#include debug-opt.def
+flag = {
+    name      = debug-level;
+    value     = d;
+    max       = NOLIMIT;
+    ifdef     = DEBUG;
+    nopreset;
+    descrip   = "Increase output debug message level";
+    doc = <<-  _EndOfDoc_
+       Increase the debugging message output level.
+       _EndOfDoc_;
+};
+
+flag = {
+    name      = set-debug-level;
+    value     = D;
+    max       = NOLIMIT;
+    ifdef     = DEBUG;
+    descrip   = "Set the output debug message level";
+    arg-type  = string;
+    flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
+    doc = <<-  _EndOfDoc_
+       Set the output debugging level.  Can be supplied multiple times,
+       but each overrides the previous value(s).
+       _EndOfDoc_;
+};
 
 flag = {
     name      = driftfile;
@@ -90,6 +122,7 @@ flag = {
 flag = {
     name      = panicgate;
     value     = g;
+    max       = NOLIMIT;
     descrip   = "Allow the first adjustment to be Big";
     doc = <<-  _EndOfDoc_
        Normally,
@@ -260,6 +293,18 @@ flag = {
        _EndOfDoc_;
 };
 
+flag = {
+    ifdef     = SAVECONFIG;
+    name      = saveconfigquit;
+    arg-type  = string;
+    descrip   = "Save parsed configuration and quit";
+    doc = <<-  _EndOfDoc_
+       Cause ntpd to parse its startup configuration file and save an
+       equivalent to the given filename and exit.  This option was
+       designed for automated testing.
+       _EndOfDoc_;
+};
+
 flag = {
     name      = statsdir;
     value     = s;
index 32481d4aa9a25eef1d4c99cff43f616d2d6a7f46..1ab3d7b304a71ca441f1a5e5d7bdf66b2f09bfec 100644 (file)
@@ -7,11 +7,11 @@ bin_PROGRAMS= ntpdate
 EXTRA_PROGRAMS=        ntptimeset
 
 ntptimeset_SOURCES=    ntptimeset.c ntptime_config.c
-AM_CPPFLAGS=   -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               $(NULL)
+
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include
+
 # LDADD might need RESLIB and ADJLIB
 LDADD=         version.o ../libntp/libntp.a
 DISTCLEANFILES=        .version version.c stamp-v
index 09b36c43eb0fd4d6e9144b42e13c218d1fb8b591..64d546ed6d42ce680ed400be182f9375d255c684 100644 (file)
@@ -6,12 +6,9 @@ bin_PROGRAMS=  ntpdc
 EXTRA_PROGRAMS=        ntpdc-layout
 EXTRA_DATA=    check-layout
 BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
-AM_CPPFLAGS=   -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               $(LIBOPTS_CFLAGS)                               \
-               $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
 # LDADD might need RESLIB and ADJLIB
 ntpdc_LDADD=   version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 # ntpdc-layout doesn't need any additional libraries at all
index 71bf22aacb0fee4bdc8611a9b515c9f9b796cdb3..7dab6f438ab390600446f69924bc4465c3ac2801 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:35:47 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:35 AM UTC
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpdc copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdc copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -151,25 +151,15 @@ static const int
 /*
  *  Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zDebug_LevelText[] =
         "Increase output debug message level";
 tSCC    zDebug_Level_NAME[]        = "DEBUG_LEVEL";
 tSCC    zDebug_Level_Name[]        = "debug-level";
 #define DEBUG_LEVEL_FLAGS       (OPTST_DISABLED)
 
-#else   /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText       NULL
-#define zDebug_Level_NAME      NULL
-#define zDebug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Set_Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zSet_Debug_LevelText[] =
         "Set the output debug message level";
 tSCC    zSet_Debug_Level_NAME[]    = "SET_DEBUG_LEVEL";
@@ -177,14 +167,6 @@ tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
-#else   /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText       NULL
-#define zSet_Debug_Level_NAME      NULL
-#define zSet_Debug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Numeric option description:
  */
@@ -213,11 +195,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
 /*
  *  Declare option callback procedures
  */
-#ifdef DEBUG
-  static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
 #if defined(TEST_NTPDC_OPTS)
 /*
  *  Under test, omit argument processing, or call optionStackArg,
@@ -241,7 +218,7 @@ static tOptProc
 extern tOptProc
     optionPagedUsage, optionPrintVersion, optionStackArg;
 static tOptProc
-    doUsageOpt;
+    doOptSet_Debug_Level, doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs
@@ -548,16 +525,14 @@ doUsageOpt(
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *   For the set-debug-level option, when DEBUG is #define-d.
+ *   For the set-debug-level option.
  */
-#ifdef DEBUG
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 29 */
+    /* extracted from ../include/debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
-#endif /* defined DEBUG */
 #endif /* defined(TEST_NTPDC_OPTS) */
 /* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
 
index 6b30f8cbd6752cc6bc01c987a15ff948b9dfb21c..34b4d88c39bdd839e3f2405d9aab96d5521744d5 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.h)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:35:46 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:35 AM UTC
  *  From the definitions    ntpdc-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpdc copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdc copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -164,12 +164,8 @@ typedef enum {
 #define VALUE_OPT_PEERS          'p'
 #define VALUE_OPT_SHOWPEERS      's'
 #define VALUE_OPT_INTERACTIVE    'i'
-#ifdef DEBUG
 #define VALUE_OPT_DEBUG_LEVEL    'd'
-#endif /* DEBUG */
-#ifdef DEBUG
 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
 #define VALUE_OPT_NUMERIC        'n'
 #define VALUE_OPT_HELP          '?'
 #define VALUE_OPT_MORE_HELP     '!'
index 97d96ec7496ca4a62d657d33b759aa6652f343ae..62c4aa5a5a7a0d6f64fe6b7bc22820bf15b941b1 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpdc-opts.texi)
 # 
-# It has been AutoGen-ed  September 30, 2009 at 07:35:49 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:36 AM UTC
 # From the definitions    ntpdc-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -58,7 +58,7 @@ This is the automatically generated usage text for ntpdc:
 
 @exampleindent 0
 @example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.5p220
+ntpdc - vendor-specific NTP query program - Ver. 4.2.5p225
 USAGE:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -98,8 +98,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpdc/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/ntpdc/.ntprc
  - examining environment variables named NTPDC_*
 
 The
@@ -243,8 +243,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Increase the debugging message output level.
@@ -259,8 +257,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Set the output debugging level.  Can be supplied multiple times,
index 594c692732472b92e40b724c365d6d7399de9535..a22ef2da0f14daa8743431843be3e18500b499e2 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPDC 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPDC 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpdc.1)
 .\"  
-.\"  It has been AutoGen-ed  September 30, 2009 at 07:35:48 AM by AutoGen 5.9.9pre5
+.\"  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:35 AM UTC
 .\"  From the definitions    ntpdc-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index af421f97f562078f3e4703876de6219561ca4ffb..0109a3575c42aab65bde678781012abd475f2ad3 100644 (file)
@@ -2,12 +2,11 @@ NULL=
 AUTOMAKE_OPTIONS=      
 
 bin_PROGRAMS=  ntpq
-AM_CPPFLAGS=   -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               $(LIBOPTS_CFLAGS)                               \
-               $(NULL)
+
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
 # LDADD might need RESLIB and ADJLIB
 ntpq_LDADD=    version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 noinst_HEADERS=        ntpq.h
index 9405404e16b9dc4643595bb16ae1e1ff4a42bd55..6f6a9b8d7acb9b4d6fb6b19e6063b41776c3c8b9 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:36:23 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:53 AM UTC
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpq copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpq copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -96,25 +96,15 @@ tSCC    zCommand_Name[]            = "command";
 /*
  *  Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zDebug_LevelText[] =
         "Increase output debug message level";
 tSCC    zDebug_Level_NAME[]        = "DEBUG_LEVEL";
 tSCC    zDebug_Level_Name[]        = "debug-level";
 #define DEBUG_LEVEL_FLAGS       (OPTST_DISABLED)
 
-#else   /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText       NULL
-#define zDebug_Level_NAME      NULL
-#define zDebug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Set_Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zSet_Debug_LevelText[] =
         "Set the output debug message level";
 tSCC    zSet_Debug_Level_NAME[]    = "SET_DEBUG_LEVEL";
@@ -122,14 +112,6 @@ tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
-#else   /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText       NULL
-#define zSet_Debug_Level_NAME      NULL
-#define zSet_Debug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Peers option description with
  *  "Must also have options" and "Incompatible options":
@@ -185,11 +167,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
 /*
  *  Declare option callback procedures
  */
-#ifdef DEBUG
-  static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
 #if defined(TEST_NTPQ_OPTS)
 /*
  *  Under test, omit argument processing, or call optionStackArg,
@@ -215,7 +192,7 @@ static tOptProc
 extern tOptProc
     ntpq_custom_opt_handler, optionPagedUsage, optionPrintVersion;
 static tOptProc
-    doUsageOpt;
+    doOptSet_Debug_Level, doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs
@@ -494,16 +471,14 @@ doUsageOpt(
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *   For the set-debug-level option, when DEBUG is #define-d.
+ *   For the set-debug-level option.
  */
-#ifdef DEBUG
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 29 */
+    /* extracted from ../include/debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
-#endif /* defined DEBUG */
 #endif /* defined(TEST_NTPQ_OPTS) */
 /* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
 
index c5f9bc4075092880953c8970e05d55848854f9bc..60aa832e881c953140aac7b80ca74270c6d5ef76 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.h)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:36:22 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:53 AM UTC
  *  From the definitions    ntpq-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntpq copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpq copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -148,12 +148,8 @@ typedef enum {
 #define WHICH_IDX_IPV4           (DESC(IPV4).optActualIndex)
 #define VALUE_OPT_IPV6           '6'
 #define VALUE_OPT_COMMAND        'c'
-#ifdef DEBUG
 #define VALUE_OPT_DEBUG_LEVEL    'd'
-#endif /* DEBUG */
-#ifdef DEBUG
 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
 #define VALUE_OPT_PEERS          'p'
 #define VALUE_OPT_INTERACTIVE    'i'
 #define VALUE_OPT_NUMERIC        'n'
index 8324183fc08566aad3c4ebecba73a5ebe7e891d0..b9d1ee406a767843b524b0059140b137594b2855 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntpq-opts.texi)
 # 
-# It has been AutoGen-ed  September 30, 2009 at 07:36:25 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:54 AM UTC
 # From the definitions    ntpq-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -46,7 +46,7 @@ This is the automatically generated usage text for ntpq:
 
 @exampleindent 0
 @example
-ntpq - standard NTP query program - Ver. 4.2.5p220
+ntpq - standard NTP query program - Ver. 4.2.5p225
 USAGE:  ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
   Flg Arg Option-Name    Description
    -4 no  ipv4           Force IPv4 DNS name resolution
@@ -78,8 +78,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpq/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/ntpq/.ntprc
  - examining environment variables named NTPQ_*
 
 The
@@ -151,8 +151,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Increase the debugging message output level.
@@ -167,8 +165,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Set the output debugging level.  Can be supplied multiple times,
index a31a6f10b91a80d3f46d556480a70457280c9217..0e4a1df961b3e97a16f0a888d4dcc590155c8e18 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTPQ 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPQ 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntpq.1)
 .\"  
-.\"  It has been AutoGen-ed  September 30, 2009 at 07:36:24 AM by AutoGen 5.9.9pre5
+.\"  It has been AutoGen-ed  Saturday October  3, 2009 at 03:57:54 AM UTC
 .\"  From the definitions    ntpq-opts.def
 .\"  and the template file   agman1.tpl
 .\"
index 41f2b7317d88082a0aa54141246448413ae0e392..e508aab59feeffc2a854037a162b46b0fc5bb778 100644 (file)
@@ -9,14 +9,12 @@ noinst_HEADERS=       ntpSnmpSubagentObject.h
 # HMS: we probably want a version.o file here, too.
 LDADD=         ../ntpq/libntpq.a ../libntp/libntp.a @SNMP_LIBS@        \
                $(LIBOPTS_LDADD)
-AM_CPPFLAGS=   -I$(top_srcdir)/ntpq                            \
-               -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               @SNMP_CPPFLAGS@                                 \
-               $(LIBOPTS_CFLAGS)                               \
-               $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \
+       -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include \
+       @SNMP_CPPFLAGS@ $(LIBOPTS_CFLAGS)
+
 AM_CFLAGS=     @SNMP_CFLAGS@
 EXTRA_DIST=    ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \
                ntpsnmpd-opts.menu ntpv4-mib.mib
@@ -24,8 +22,7 @@ BUILT_SOURCES=        ntpsnmpd-opts.c ntpsnmpd-opts.h ntpsnmpd.1 ntpsnmpd-opts.texi \
                ntpsnmpd-opts.menu
 man_MANS=      ntpsnmpd.1
 run_ag=                cd $(srcdir) && autogen -L ../include --writable
-std_def_list=  $(top_srcdir)/include/debug-opt.def             \
-               $(top_srcdir)/include/autogen-version.def       \
+std_def_list=  $(top_srcdir)/include/autogen-version.def       \
                $(top_srcdir)/include/copyright.def             \
                $(top_srcdir)/include/homerc.def                \
                $(top_srcdir)/include/version.def
index 570aac668d769a887ded115e27a4b3e57e48e9bf..8f959aa98e8a47124de181d1a025bd5523155252 100644 (file)
@@ -3,11 +3,11 @@ NULL=
 AUTOMAKE_OPTIONS = 
 noinst_PROGRAMS = @TESTDCF@ @DCFD@
 EXTRA_PROGRAMS = testdcf dcfd
-INCLUDES =     -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               $(NULL)
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+               -I$(top_srcdir)/lib/isc/nothreads/include \
+               -I$(top_srcdir)/lib/isc/unix/include
+
 ETAGS_ARGS = Makefile.am
 DISTCLEANFILES = $(EXTRA_PROGRAMS)
 #EXTRA_DIST= TAGS
index a9b823c3f79f01478c596d283a7f3eb04a782482..a4cf01f19ae59203889f03a4d5a25e8d3ff28c5f 100644 (file)
@@ -88,9 +88,15 @@ int main( int argc, char *argv[] )
        /* Command line users should put -n in the options */
        while (argv[i]) {
                if (!_strnicmp(argv[i], "-d", 2) ||
+                       !strcmp(argv[i], "--debug_level") ||
+                       !strcmp(argv[i], "--set-debug_level") ||
                        !strcmp(argv[i], "-q") ||
+                       !strcmp(argv[i], "--quit") ||
+                       !strcmp(argv[i], "-?") ||
                        !strcmp(argv[i], "--help") ||
-                       !strcmp(argv[i], "-n")) {
+                       !strcmp(argv[i], "-n") ||
+                       !strcmp(argv[i], "--nofork") ||
+                       !strcmp(argv[i], "--saveconfigquit")) {
                        foreground = TRUE;
                        break;
                }
index 731aa46451448fc77a4ea0e8f9481ac48aa9529a..35811a51859ecf0644590e34eb4e3330d3d24e37 100644 (file)
                                RelativePath="..\..\..\..\include\ntp_malloc.h"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\..\..\include\ntp_md5.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\..\..\..\include\ntp_net.h"
                                >
                                >
                        </File>
                        <File
-                               RelativePath="..\..\include\sys\time.h"
+                               RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+                               RelativePath="..\..\include\sys\time.h"
                                >
                        </File>
                        <File
index cd38edf536e975e53aeda2e5276e1beff7be4c82..0367bb30b6bdc70581bdb5ebc77a97bcd0779d1b 100644 (file)
@@ -5,12 +5,11 @@ NULL=
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS= -I ../m4 -I libopts/m4
 
-AM_CPPFLAGS=   $(LIBOPTS_CFLAGS)                               \
-               -I$(top_srcdir)/../include                      \
-               -I$(top_srcdir)/../lib/isc/include              \
-               -I$(top_srcdir)/../lib/isc/nothreads/include    \
-               -I$(top_srcdir)/../lib/isc/unix/include         \
-               $(NULL)
+AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
+       -I$(top_srcdir)/../lib/isc/include \
+       -I$(top_srcdir)/../lib/isc/nothreads/include \
+       -I$(top_srcdir)/../lib/isc/unix/include
+
 LDADD= $(LIBOPTS_LDADD) -lm ../libntp/libntp.a
 
 run_ag=         cd $(srcdir) && autogen -L ../include --writable
index 84f8390535cc5a9ad9769c72781f515800fb4c96..4117beabd5c4a4bd1d14e7937a68c46c8268f853 100644 (file)
@@ -7,12 +7,10 @@ bin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
 EXTRA_PROGRAMS=        audio-pcm byteorder hist jitter kern longsize \
        ntptime pps-api precision sht testrs6000 tg tickadj timetrim
 
-AM_CPPFLAGS=   -I$(top_srcdir)/include                         \
-               -I$(top_srcdir)/lib/isc/include                 \
-               -I$(top_srcdir)/lib/isc/nothreads/include       \
-               -I$(top_srcdir)/lib/isc/unix/include            \
-               $(LIBOPTS_CFLAGS)                               \
-               $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+       -I$(top_srcdir)/lib/isc/nothreads/include \
+       -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
 # LDADD might need RESLIB and ADJLIB
 LDADD=         ../libntp/libntp.a
 ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
index 0dfbc469550429bf9e4095d22119647c2da592c2..53a25c003bacaf894d57a400e47e8dbffd0c728e 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:42:23 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:59:09 AM UTC
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntp-keygen copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntp-keygen copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -89,25 +89,15 @@ tSCC    zCertificate_Name[]        = "certificate";
 /*
  *  Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zDebug_LevelText[] =
         "Increase output debug message level";
 tSCC    zDebug_Level_NAME[]        = "DEBUG_LEVEL";
 tSCC    zDebug_Level_Name[]        = "debug-level";
 #define DEBUG_LEVEL_FLAGS       (OPTST_DISABLED)
 
-#else   /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText       NULL
-#define zDebug_Level_NAME      NULL
-#define zDebug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Set_Debug_Level option description:
  */
-#ifdef DEBUG
 tSCC    zSet_Debug_LevelText[] =
         "Set the output debug message level";
 tSCC    zSet_Debug_Level_NAME[]    = "SET_DEBUG_LEVEL";
@@ -115,14 +105,6 @@ tSCC    zSet_Debug_Level_Name[]    = "set-debug-level";
 #define SET_DEBUG_LEVEL_FLAGS       (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
-#else   /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS       (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText       NULL
-#define zSet_Debug_Level_NAME      NULL
-#define zSet_Debug_Level_Name      NULL
-#endif  /* DEBUG */
-
 /*
  *  Id_Key option description:
  */
@@ -411,11 +393,6 @@ tSCC zNotLoad_Opts_Pfx[]  = "no";
 /*
  *  Declare option callback procedures
  */
-#ifdef DEBUG
-  static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
 #ifdef OPENSSL
   static tOptProc doOptModulus;
 #else /* not OPENSSL */
@@ -454,7 +431,7 @@ static tOptProc
 extern tOptProc
     optionPagedUsage, optionPrintVersion;
 static tOptProc
-    doUsageOpt;
+    doOptSet_Debug_Level, doUsageOpt;
 
 /*
  *  #define map the "normal" callout procs
@@ -844,16 +821,14 @@ doUsageOpt(
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *   For the set-debug-level option, when DEBUG is #define-d.
+ *   For the set-debug-level option.
  */
-#ifdef DEBUG
 static void
 doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
 {
-    /* extracted from ../include/debug-opt.def, line 29 */
+    /* extracted from ../include/debug-opt.def, line 27 */
 DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
 }
-#endif /* defined DEBUG */
 #endif /* defined(TEST_NTP_KEYGEN_OPTS) */
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
index 693b9306773910741fed0f45c889d723296317cb..5eb01d5bc7ea503e059a319c9fbfe3648c3b6dcc 100644 (file)
@@ -1,7 +1,7 @@
 /*  
  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.h)
  *  
- *  It has been AutoGen-ed  September 30, 2009 at 07:42:22 AM by AutoGen 5.9.9pre5
+ *  It has been AutoGen-ed  Saturday October  3, 2009 at 03:59:08 AM UTC
  *  From the definitions    ntp-keygen-opts.def
  *  and the template file   options
  *
@@ -19,7 +19,7 @@
  *
  * This source file is copyrighted and licensed under the following terms:
  *
- * ntp-keygen copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntp-keygen copyright 1970-2009 David L. Mills and/or others - all rights reserved
  *
  * see html/copyright.html
  */
@@ -206,12 +206,8 @@ typedef enum {
 #ifdef OPENSSL
 #define VALUE_OPT_CERTIFICATE    'c'
 #endif /* OPENSSL */
-#ifdef DEBUG
 #define VALUE_OPT_DEBUG_LEVEL    'd'
-#endif /* DEBUG */
-#ifdef DEBUG
 #define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
 #ifdef OPENSSL
 #define VALUE_OPT_ID_KEY         'e'
 #endif /* OPENSSL */
index 172f42f44d65c2c0c66b814c0b54a24aa2923097..69ab65a75b0985d09828ee9ed69e163971951d28 100644 (file)
@@ -6,7 +6,7 @@
 # 
 # EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.texi)
 # 
-# It has been AutoGen-ed  September 30, 2009 at 07:42:25 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed  Saturday October  3, 2009 at 03:59:10 AM UTC
 # From the definitions    ntp-keygen-opts.def
 # and the template file   aginfo.tpl
 @end ignore
@@ -51,7 +51,7 @@ This is the automatically generated usage text for ntp-keygen:
 @exampleindent 0
 @example
 Using OpenSSL version 90704f
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p220
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p225
 USAGE:  ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
   Flg Arg Option-Name    Description
    -c Str certificate    certificate scheme
@@ -87,8 +87,8 @@ Options are specified by doubled hyphens and their name
 or by a single hyphen and the flag character.
 
 The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/util/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/util/.ntprc
  - examining environment variables named NTP_KEYGEN_*
 
 If there is no new host key, look for an existing one.
@@ -129,8 +129,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Increase the debugging message output level.
@@ -145,8 +143,6 @@ This option has some usage constraints.  It:
 @itemize @bullet
 @item
 may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
 @end itemize
 
 Set the output debugging level.  Can be supplied multiple times,
index 25433d61773479040854c9b7aa575e10a0ef9b23..83d1b5b91e30d62e9b08434f10f5acab56b46f8c 100644 (file)
@@ -1,7 +1,7 @@
-.TH NTP-KEYGEN 1 2009-09-30 "(ntp 4.2.5p225)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2009-10-03 "(ntp 4.2.5p225)" "Programmer's Manual"
 .\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen.1)
 .\"  
-.\"  It has been AutoGen-ed  September 30, 2009 at 07:42:24 AM by AutoGen 5.9.9pre5
+.\"  It has been AutoGen-ed  Saturday October  3, 2009 at 03:59:09 AM UTC
 .\"  From the definitions    ntp-keygen-opts.def
 .\"  and the template file   agman1.tpl
 .\"