]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1.
authorDave Hart <hart@ntp.org>
Thu, 16 Dec 2010 09:07:58 +0000 (09:07 +0000)
committerDave Hart <hart@ntp.org>
Thu, 16 Dec 2010 09:07:58 +0000 (09:07 +0000)
bk: 4d09d6eeJ-c3UQyreZRJ2bGmfRW77g

16 files changed:
ChangeLog
sntp/libopts/Makefile.am
sntp/libopts/ag-char-map.h
sntp/libopts/autoopts.c
sntp/libopts/autoopts/options.h
sntp/libopts/autoopts/usage-txt.h
sntp/libopts/configfile.c
sntp/libopts/environment.c
sntp/libopts/genshell.c
sntp/libopts/genshell.h
sntp/libopts/load.c
sntp/libopts/m4/libopts.m4
sntp/libopts/m4/liboptschk.m4
sntp/libopts/proto.h
sntp/libopts/value-type.h
sntp/libopts/xat-attribute.h

index 2155846f25da40d8d7557d399be37e532abd9ab2..904b12e172d4289749f977ffad8c7fc9c2dc9f2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
   local timezone.
 * [Bug 1751] Support for Atari FreeMiNT OS.
 * [Bug 1754] --version output should be more verbose.
+* Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1.
 * Suppress ntp-keygen OpenSSL version display for --help, --version,
   display both build and runtime OpenSSL versions when they differ.
 * Clean up m4 quoting in configure.ac, *.m4 files, resolving
index 11c6078cca418f37ba4b7a6a08363ee645b9a48b..84c3e00c379601a013af3e81702e8f0dc0f6596b 100644 (file)
@@ -7,14 +7,14 @@ noinst_LTLIBRARIES      = libopts.la
 endif
 libopts_la_SOURCES      = libopts.c
 libopts_la_CPPFLAGS     = -I$(top_srcdir)
-libopts_la_LDFLAGS      = -version-info  33:3:8
+libopts_la_LDFLAGS      = -version-info  33:4:8
 EXTRA_DIST              = \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
     MakeDefs.inc            README                  ag-char-map.h  \
-    autoopts/usage-txt.h    autoopts/options.h      autoopts.c  \
-    autoopts.h              boolean.c               compat/strchr.c  \
-    compat/strdup.c         compat/compat.h         compat/windows-config.h  \
-    compat/pathfind.c       compat/snprintf.c       configfile.c  \
+    autoopts/options.h      autoopts/usage-txt.h    autoopts.c  \
+    autoopts.h              boolean.c               compat/windows-config.h  \
+    compat/strchr.c         compat/pathfind.c       compat/snprintf.c  \
+    compat/strdup.c         compat/compat.h         configfile.c  \
     cook.c                  enumeration.c           environment.c  \
     file.c                  genshell.c              genshell.h  \
     load.c                  m4/liboptschk.m4        m4/libopts.m4  \
index 33c931d99358a1ae796e207458da047d409553d3..c6f917ec42dbc97ff80dc455c7dd5d75825c2a3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *   Character mapping generated 11/18/10 11:54:12
+ *   Character mapping generated 12/15/10 17:47:59
  *
  *  This file contains the character classifications
  *  used by AutoGen and AutoOpts for identifying tokens.
index d3d6b41ee2c338c9a4282b1bf2a49afc453d4a15..9b6cd5f6e694a3eb54543a01c02301e525498095 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * \file autoopts.c
  *
- *  Time-stamp:      "2010-07-17 10:41:35 bkorb"
+ *  Time-stamp:      "2010-12-06 14:02:35 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -122,13 +122,13 @@ ao_strdup(char const *str)
 #endif
 
 /*
- *  handleOption
+ *  handle_opt
  *
  *  This routine handles equivalencing, sets the option state flags and
  *  invokes the handler procedure, if any.
  */
 LOCAL tSuccess
-handleOption(tOptions* pOpts, tOptState* pOptState)
+handle_opt(tOptions* pOpts, tOptState* pOptState)
 {
     /*
      *  Save a copy of the option procedure pointer.
@@ -821,7 +821,7 @@ doImmediateOpts(tOptions* pOpts)
         if (! DO_IMMEDIATELY(optState.flags))
             continue;
 
-        if (! SUCCESSFUL(handleOption(pOpts, &optState)))
+        if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
             break;
     } optionsDone:;
 
@@ -858,7 +858,7 @@ doRegularOpts(tOptions* pOpts)
             optState.pOD->optOccCt--; /* don't count last time */
         }
 
-        if (! SUCCESSFUL(handleOption(pOpts, &optState)))
+        if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
             break;
     } optionsDone:;
     if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
index 03810572f6988c73817956749efdebdd7162642e..cdfd37fb4abded17602c278b987e0abe815a445a 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  November 16, 2010 at 05:41:49 PM by AutoGen 5.11.2pre7
+ *  It has been AutoGen-ed  December 15, 2010 at 05:48:03 PM by AutoGen 5.11.5
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
@@ -65,8 +65,8 @@
  *  See the relevant generated header file to determine which and what
  *  values for "opt_name" are available.
  */
-#define  OPTIONS_STRUCT_VERSION  135171
-#define  OPTIONS_VERSION_STRING  "33:3:8"
+#define  OPTIONS_STRUCT_VERSION  135172
+#define  OPTIONS_VERSION_STRING  "33:4:8"
 #define  OPTIONS_MINIMUM_VERSION 102400
 #define  OPTIONS_MIN_VER_STRING  "25:0:0"
 
@@ -573,7 +573,7 @@ extern token_list_t* ao_string_tokenize(char const*);
 extern const tOptionValue* configFileLoad(char const*);
 
 
-/* From: configfile.c line 934
+/* From: configfile.c line 936
  *
  * optionFileLoad - Load the locatable config files, in order
  *
index ad5ef473b2246d7463eb74f064cd1a2a122d7d93..9e9651a36aeb2cb9f196a01dcd936e55f9c09432 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  November 16, 2010 at 05:41:47 PM by AutoGen 5.11.2pre7
+ *  It has been AutoGen-ed  December 15, 2010 at 05:48:01 PM by AutoGen 5.11.5
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
index 2ee062a8e5efe37fefddafdee5b415cafbce812c..d7f340c645db967b3b825d80e9f349e9dcc37712 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * \file configfile.c
  *
- *  Time-stamp:      "2010-11-18 08:24:46 bkorb"
+ *  Time-stamp:      "2010-12-10 11:15:09 bkorb"
  *
  *  configuration/rc/ini file handling.
  *
@@ -1241,6 +1241,9 @@ validateOptionsStruct(tOptions* pOpts, char const* pzProgram)
         else
             fputs(zAO_Sml, stderr);
 
+        fputs(ShellAsString(AO_CURRENT)  ":"
+              ShellAsString(AO_REVISION) ":"
+              ShellAsString(AO_AGE)      "\n", stderr);
         return FAILURE;
     }
 
index 7771e0c0abc5f5c723f6e387937f8704d03e48fa..bc205f6ceeec2205b6fb61a4be86be48e06c1dea 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * \file environment.c
  *
- * Time-stamp:      "2010-07-17 10:39:52 bkorb"
+ * Time-stamp:      "2010-12-06 15:01:45 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -32,7 +32,7 @@
 
 /* = = = START-STATIC-FORWARD = = = */
 static void
-checkEnvOpt(tOptState * os, char * env_name,
+do_env_opt(tOptState * os, char * env_name,
             tOptions* pOpts, teEnvPresetType type);
 /* = = = END-STATIC-FORWARD = = = */
 
@@ -110,15 +110,15 @@ doPrognameEnv(tOptions* pOpts, teEnvPresetType type)
 }
 
 static void
-checkEnvOpt(tOptState * os, char * env_name,
+do_env_opt(tOptState * os, char * env_name,
             tOptions* pOpts, teEnvPresetType type)
 {
     os->pzOptArg = getenv(env_name);
     if (os->pzOptArg == NULL)
         return;
 
-    os->flags    = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState;
-    os->optType  = TOPT_UNDEFINED;
+    os->flags   = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState;
+    os->optType = TOPT_UNDEFINED;
 
     if (  (os->pOD->pz_DisablePfx != NULL)
        && (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) {
@@ -153,21 +153,27 @@ checkEnvOpt(tOptState * os, char * env_name,
      *  The interpretation of the option value depends
      *  on the type of value argument the option takes
      */
-    if (os->pzOptArg != NULL) {
-        if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) {
-            os->pzOptArg = NULL;
-        } else if (  (os->pOD->fOptState & OPTST_ARG_OPTIONAL)
-                  && (*os->pzOptArg == NUL)) {
-            os->pzOptArg = NULL;
-        } else if (*os->pzOptArg == NUL) {
-            os->pzOptArg = zNil;
-        } else {
-            AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument");
-            os->flags |= OPTST_ALLOC_ARG;
-        }
+    if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) {
+        /*
+         *  Ignore any value.
+         */
+        os->pzOptArg = NULL;
+
+    } else if (os->pzOptArg[0] == NUL) {
+        /*
+         * If the argument is the empty string and the argument is
+         * optional, then treat it as if the option was not specified.
+         */
+        if ((os->pOD->fOptState & OPTST_ARG_OPTIONAL) == 0)
+            return;
+        os->pzOptArg = NULL;
+
+    } else {
+        AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument");
+        os->flags |= OPTST_ALLOC_ARG;
     }
 
-    handleOption(pOpts, os);
+    handle_opt(pOpts, os);
 }
 
 /*
@@ -218,7 +224,7 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type)
          *  Set up the option state
          */
         strcpy(pzFlagName, st.pOD->pz_NAME);
-        checkEnvOpt(&st, zEnvName, pOpts, type);
+        do_env_opt(&st, zEnvName, pOpts, type);
     }
 
     /*
@@ -230,7 +236,7 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type)
 
         if (st.pOD->pz_NAME != NULL) {
             strcpy(pzFlagName, st.pOD->pz_NAME);
-            checkEnvOpt(&st, zEnvName, pOpts, type);
+            do_env_opt(&st, zEnvName, pOpts, type);
         }
     }
 }
index 059f8869c4eba93d01121b1ee61ea91e0e14e3e9..c9d56c69c0a132846c43f7fda277c785a91b183c 100644 (file)
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  November 18, 2010 at 11:54:12 AM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 33:4:8 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
index 507788b3411f40e3399172879df3d861a99ac92a..9275fabbef2999d73e51ca4b6e8b8a8cf0ceef36 100644 (file)
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  November 18, 2010 at 11:54:12 AM by AutoGen 5.11.2
+ *  It has been AutoGen-ed  December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 33:4:8 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -50,7 +50,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 135171
+#define AO_TEMPLATE_VERSION 135172
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -93,6 +93,15 @@ typedef enum {
                     DESC(n).fOptState |= OPTST_DISABLED; \
                 DESC(n).optCookie = NULL )
 
+/* * * * * *
+ *
+ *  Enumeration of genshellopt exit codes
+ */
+typedef enum {
+    GENSHELLOPT_EXIT_SUCCESS = 0,
+    GENSHELLOPT_EXIT_FAILURE = 1
+} genshellopt_exit_code_t;
+
 /* * * * * *
  *
  *  Interface defines for specific options.
@@ -112,7 +121,7 @@ typedef enum {
                 genshelloptOptions.pzCurOpt  = NULL)
 #define START_OPT       RESTART_OPT(1)
 #define USAGE(c)        (*genshelloptOptions.pUsageProc)(&genshelloptOptions, c)
-/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/opthead.tpl near line 408 */
+/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/opthead.tpl near line 435 */
 
 /* * * * * *
  *
index d7616cd57606ee15397d20048a33f6327cb86ec9..69bb1bb4077f92c683d3078a2d2b50e0cc93cfde 100644 (file)
@@ -1,7 +1,7 @@
 
 /**
  *  \file load.c
- *  Time-stamp:      "2010-07-17 10:38:19 bkorb"
+ *  Time-stamp:      "2010-12-06 14:03:01 bkorb"
  *
  *  This file contains the routines that deal with processing text strings
  *  for options, either from a NUL-terminated string passed in or from an
@@ -473,7 +473,7 @@ loadOptionLine(
     {
         tOptionLoadMode sv = option_load_mode;
         option_load_mode = load_mode;
-        handleOption(pOpts, pOS);
+        handle_opt(pOpts, pOS);
         option_load_mode = sv;
     }
 }
index 97732ceae1709b8ecc347f8be95de357093c039e..51a76830ce508ff38e957703a46b8768f324cd9c 100644 (file)
@@ -2,14 +2,14 @@ dnl  -*- buffer-read-only: t -*- vi: set ro:
 dnl 
 dnl DO NOT EDIT THIS FILE   (libopts.m4)
 dnl 
-dnl It has been AutoGen-ed  November 16, 2010 at 05:41:43 PM by AutoGen 5.11.2pre7
+dnl It has been AutoGen-ed  December 15, 2010 at 05:47:57 PM by AutoGen 5.11.5
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
 dnl do always before generated macros:
 dnl
 AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
-  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_HEADER_STDC])
   AC_HEADER_DIRENT
   
   # =================
@@ -104,7 +104,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
   AC_FUNC_VPRINTF
   AC_FUNC_FORK
   AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
-                  strrchr strsignal])
+                 strrchr strsignal])
 ])
 
 dnl
@@ -406,7 +406,7 @@ AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
 
 
 AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
-  AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])dnl
+  AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
   # Check to see if a reg expr header is specified.
   LIBOPTS_WITH_REGEX_HEADER
 
@@ -442,7 +442,7 @@ dnl libopts-path defaults to [libopts] if not provided.
 dnl Only one option is supported, [skip-makefile], which
 dnl conditionalizes away the AC_CONFIG_FILES(libopts-path/Makefile).
 dnl
-dnl Time-stamp:        "2010-02-24 08:37:21 bkorb"
+dnl Time-stamp:        "2010-11-29 15:45:54 bkorb"
 dnl
 dnl If autoopts-config works, add the linking information to LIBS.
 dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
@@ -468,7 +468,7 @@ dnl
 dnl Default to system libopts
 dnl
 AC_DEFUN([LIBOPTS_CHECK],[
-  AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])dnl
+  AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
   [NEED_LIBOPTS_DIR='']
   m4_pushdef([AO_Libopts_Dir],
            [ifelse($1, , [libopts], [$1])])
index 896b05ea9687b1fe0fd60ceb01cd35578eea3f77..5d0eb9f44dd49ae96912e3c7b2ba9b3ba25046a2 100644 (file)
@@ -1,42 +1,29 @@
-# liboptschk.m4 serial 1 (autogen - 5.7.3)
+# liboptschk.m4 serial 2 (autogen - 5.11.4)
 dnl Copyright (c) 2005-2010 by Bruce Korb - all rights reserved
 dnl
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
-
-dnl Time-stamp:        "2010-02-24 08:38:55 bkorb"
-
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
+dnl
+dnl Time-stamp:        "2010-12-07 12:57:56 bkorb"
+dnl
 AC_DEFUN([ag_FIND_LIBOPTS],
-    [if test "X${ac_cv_header_autoopts_options_h}" == Xno
+  [if test "X${ac_cv_header_autoopts_options_h}" = Xno
+  then :
+  else
+    f=`autoopts-config cflags` 2>/dev/null
+    if test X"${f}" = X
     then
       :
     else
-      f=`autoopts-config cflags` 2>/dev/null
-      test X"${f}" = X && f=`libopts-config cflags` 2>/dev/null
-      if test X"${f}" = X
-      then
-        :
-      else
-        AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts])
-        CFLAGS="${CFLAGS} ${f}"
-        f=`autoopts-config ldflags` 2>/dev/null
-        test X"${f}" = X && f=`libopts-config ldflags` 2>/dev/null
-        LIBS="${LIBS} ${f}"
-      fi
-    fi])
+      AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts])
+      CFLAGS="${CFLAGS} ${f}"
+      ao_CFLAGS="${f}"
+      AC_SUBST(ao_CFLAGS)
+
+      f=`autoopts-config ldflags` 2>/dev/null
+      LIBS="${LIBS} ${f}"
+      ao_LIBS="${f}"
+      AC_SUBST(ao_LIBS)
+    fi
+  fi])
index 13ce379a665314b802707b341dd2037aadeab120..591e72f3f3459e988cb1868cd4200a5997baf60a 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Thu Nov 18 11:54:20 PST 2010
+ * Generated Wed Dec 15 17:48:08 PST 2010
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
@@ -28,7 +28,7 @@ LOCAL char *
 ao_strdup(char const *str);
 
 LOCAL tSuccess
-handleOption(tOptions* pOpts, tOptState* pOptState);
+handle_opt(tOptions* pOpts, tOptState* pOptState);
 
 LOCAL tSuccess
 longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState);
index 16975e6b92f3be813c56f530d75f96fe62f71703..5ea18c23a3754fd706c45ccc12a4cb149cf1b769 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Thu Nov 18 11:54:12 PST 2010
+ *  Generated header for gperf generated source Wed Dec 15 17:48:00 PST 2010
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
index 2e6ca668472e0011f46e280117697f8c47441dbb..8c51a73b1b3b9f10656a8a3ef06de68f370ec548 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Thu Nov 18 11:54:12 PST 2010
+ *  Generated header for gperf generated source Wed Dec 15 17:47:59 PST 2010
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */