]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
libopts 33.5.8 unmodified from AutoGen 5.11.6pre3
authorDave Hart <hart@ntp.org>
Fri, 17 Dec 2010 01:43:41 +0000 (01:43 +0000)
committerDave Hart <hart@ntp.org>
Fri, 17 Dec 2010 01:43:41 +0000 (01:43 +0000)
bk: 4d0ac04dpSb2GO2BGU006bNeDCdBBA

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

index 904b12e172d4289749f977ffad8c7fc9c2dc9f2f..1efeaae508a2211188f6024523c0ad5d4bb4e444 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,7 +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.
+* Upgrade to libopts 33.5.8 from AutoGen 5.11.6pre3.
 * 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 84c3e00c379601a013af3e81702e8f0dc0f6596b..6473fb4417a37c4dd4ab8e8b61559ca30ba68deb 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:4:8
+libopts_la_LDFLAGS      = -version-info  33:5:8
 EXTRA_DIST              = \
     COPYING.gplv3           COPYING.lgplv3          COPYING.mbsd  \
     MakeDefs.inc            README                  ag-char-map.h  \
-    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  \
+    autoopts/usage-txt.h    autoopts/options.h      autoopts.c  \
+    autoopts.h              boolean.c               compat/strchr.c  \
+    compat/snprintf.c       compat/windows-config.h compat/pathfind.c  \
+    compat/compat.h         compat/strdup.c         configfile.c  \
     cook.c                  enumeration.c           environment.c  \
     file.c                  genshell.c              genshell.h  \
     load.c                  m4/liboptschk.m4        m4/libopts.m4  \
index 2a98071c6af6b2c9e13e974dab816b4173e132f5..0d09595b5dc0bc2198f7f7770de3e0d7c745dd1c 100644 (file)
@@ -75,7 +75,7 @@ Usage Instructions for autoconf/automake/libtoolized projects:
 
      man_MANS = prog.1
      prog.1 : prog-opts.def
-         autogen -Tagman1.tpl -bprog prog-opts.def
+         autogen -Tagman-cmd.tpl -bprog prog-opts.def
 
      prog-invoke.texi : prog-opts.def
          autogen -Taginfo.tpl -bprog-invoke prog-opts.def
index c6f917ec42dbc97ff80dc455c7dd5d75825c2a3d..e19edce5b229e045198464c9ff67d235fe1eff2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *   Character mapping generated 12/15/10 17:47:59
+ *   Character mapping generated 12/16/10 15:59:15
  *
  *  This file contains the character classifications
  *  used by AutoGen and AutoOpts for identifying tokens.
index cdfd37fb4abded17602c278b987e0abe815a445a..e7a121ecaf9b6c09ce0fcb1f4b7b61a642990b3b 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  December 15, 2010 at 05:48:03 PM by AutoGen 5.11.5
+ *  It has been AutoGen-ed  December 16, 2010 at 03:59:18 PM by AutoGen 5.11.6pre3
  *  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  135172
-#define  OPTIONS_VERSION_STRING  "33:4:8"
+#define  OPTIONS_STRUCT_VERSION  135173
+#define  OPTIONS_VERSION_STRING  "33:5:8"
 #define  OPTIONS_MINIMUM_VERSION 102400
 #define  OPTIONS_MIN_VER_STRING  "25:0:0"
 
@@ -410,6 +410,13 @@ struct optSpecIndex {
  */
 typedef void (tOptionXlateProc)(void);
 
+/*
+ * Everything marked "PUBLIC" is also marked "const".
+ * Public access is not a license to modify.  Other fields
+ * are used and modified by the library.  They are also
+ * subject to change without any notice.  Do not even
+ * look at these outside of libopts.
+ */
 struct options {
     int const           structVersion;
     int                 origArgCt;
@@ -418,8 +425,8 @@ struct options {
     unsigned int        curOptIdx;
     char*               pzCurOpt;
 
-    char const*         pzProgPath;         /* PUBLIC */
-    char const*         pzProgName;         /* PUBLIC */
+    char const* const   pzProgPath;         /* PUBLIC */
+    char const* const   pzProgName;         /* PUBLIC */
     char const* const   pzPROGNAME;         /* PUBLIC */
     char const* const   pzRcName;           /* PUBLIC */
     char const* const   pzCopyright;        /* PUBLIC */
index 9e9651a36aeb2cb9f196a01dcd936e55f9c09432..3c77e40ef3d2b8384e9775364ec70ed74e8da86f 100644 (file)
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  December 15, 2010 at 05:48:01 PM by AutoGen 5.11.5
+ *  It has been AutoGen-ed  December 16, 2010 at 03:59:16 PM by AutoGen 5.11.6pre3
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
index d7f340c645db967b3b825d80e9f349e9dcc37712..80eaff895a0cde0d667dde69cf8a0042caa53de2 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * \file configfile.c
  *
- *  Time-stamp:      "2010-12-10 11:15:09 bkorb"
+ *  Time-stamp:      "2010-12-16 14:03:06 bkorb"
  *
  *  configuration/rc/ini file handling.
  *
@@ -972,7 +972,12 @@ optionFileLoad(tOptions* pOpts, char const* pzProgram)
     if (! SUCCESSFUL(validateOptionsStruct(pOpts, pzProgram)))
         return -1;
 
-    pOpts->pzProgName = pzProgram;
+    {
+        char const ** pp =
+            (char const **)(void *)&(pOpts->pzProgName);
+        *pp = pzProgram;
+    }
+
     internalFileLoad(pOpts);
     return 0;
 }
@@ -1252,13 +1257,15 @@ validateOptionsStruct(tOptions* pOpts, char const* pzProgram)
      *  and the set of equivalent characters.
      */
     if (pOpts->pzProgName == NULL) {
-        char const* pz = strrchr(pzProgram, DIRCH);
-
+        char const *  pz = strrchr(pzProgram, DIRCH);
+        char const ** pp =
+            (char const **)(void **)&(pOpts->pzProgName);
         if (pz == NULL)
-             pOpts->pzProgName = pzProgram;
-        else pOpts->pzProgName = pz+1;
+             *pp = pzProgram;
+        else *pp = pz+1;
 
-        pOpts->pzProgPath = pzProgram;
+        pp  = (char const **)(void **)&(pOpts->pzProgPath);
+        *pp = pzProgram;
 
         /*
          *  when comparing long names, these are equivalent
index c9d56c69c0a132846c43f7fda277c785a91b183c..c1deb9621ed3dc2de243ba8ed58ce1743416ead7 100644 (file)
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
+ *  It has been AutoGen-ed  December 16, 2010 at 03:59:15 PM by AutoGen 5.11.6pre3
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:4:8 templates.
+ * Generated from AutoOpts 33:5: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 9275fabbef2999d73e51ca4b6e8b8a8cf0ceef36..77397aedd06f77aac9a0c5a6799f023c03748948 100644 (file)
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
+ *  It has been AutoGen-ed  December 16, 2010 at 03:59:15 PM by AutoGen 5.11.6pre3
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 33:4:8 templates.
+ * Generated from AutoOpts 33:5: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 135172
+#define AO_TEMPLATE_VERSION 135173
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
index 51a76830ce508ff38e957703a46b8768f324cd9c..7841cf4e71775408ad69108c3fea5f7f287f65f8 100644 (file)
@@ -2,7 +2,7 @@ dnl  -*- buffer-read-only: t -*- vi: set ro:
 dnl 
 dnl DO NOT EDIT THIS FILE   (libopts.m4)
 dnl 
-dnl It has been AutoGen-ed  December 15, 2010 at 05:47:57 PM by AutoGen 5.11.5
+dnl It has been AutoGen-ed  December 16, 2010 at 03:59:13 PM by AutoGen 5.11.6pre3
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
@@ -436,11 +436,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
 
 ]) # end AC_DEFUN of INVOKE_LIBOPTS_MACROS
 
-dnl @synopsis  LIBOPTS_CHECK(libopts-path, options)
-dnl
-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 @synopsis  LIBOPTS_CHECK
 dnl
 dnl Time-stamp:        "2010-11-29 15:45:54 bkorb"
 dnl
@@ -535,12 +531,13 @@ AC_DEFUN([LIBOPTS_CHECK],[
   AC_SUBST(LIBOPTS_LDADD)
   AC_SUBST(LIBOPTS_CFLAGS)
   AC_SUBST(LIBOPTS_DIR, AO_Libopts_Dir)
-  AM_CONDITIONAL([BUILD_LIBOPTS], [test -n "${NEED_LIBOPTS_DIR}" -a -z "]$2["])
-  AM_COND_IF([BUILD_LIBOPTS],
-    [AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)])
+  AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
   m4_popdef([AO_Libopts_Dir])
 
-  AM_COND_IF([BUILD_LIBOPTS], [INVOKE_LIBOPTS_MACROS])
-  [
+  [if test -n "${NEED_LIBOPTS_DIR}" ; then]
+    INVOKE_LIBOPTS_MACROS
+  else
+    INVOKE_LIBOPTS_MACROS_FIRST
+  [fi
 # end of AC_DEFUN of LIBOPTS_CHECK]
 ])
index 5bc8fc1ee73949471865fbd3ea8bd780f7fb8949..f8f08eff26b601fcceeedb481224b2bf2dff4425 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * \file makeshell.c
  *
- * Time-stamp:      "2010-09-05 05:58:57 bkorb"
+ * Time-stamp:      "2010-12-16 14:09:32 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and create a Bourne shell script capable of parsing them.
@@ -612,21 +612,28 @@ emitUsage(tOptions* pOpts)
         printf(zPreamble, zStartMarker, pzOutName, zTimeBuf);
     }
 
+    printf(zEndPreamble, pOpts->pzPROGNAME);
+
     /*
-     *  Get a copy of the original program name in lower case
+     *  Get a copy of the original program name in lower case and
+     *  fill in an approximation of the program name from it.
      */
     {
-        char* pzPN = zTimeBuf;
-        tCC*  pz   = pOpts->pzPROGNAME;
+        char *       pzPN = zTimeBuf;
+        char const * pz   = pOpts->pzPROGNAME;
+        char **      pp;
+
         for (;;) {
             if ((*pzPN++ = tolower(*pz++)) == '\0')
                 break;
         }
-    }
 
-    printf(zEndPreamble, pOpts->pzPROGNAME);
+        pp = (char **)(void *)&(pOpts->pzProgPath);
+        *pp = zTimeBuf;
+        pp  = (char **)(void *)&(pOpts->pzProgName);
+        *pp = zTimeBuf;
+    }
 
-    pOpts->pzProgPath = pOpts->pzProgName = zTimeBuf;
     textToVariable(pOpts, TT_LONGUSAGE, NULL);
     textToVariable(pOpts, TT_USAGE,     NULL);
 
@@ -1063,9 +1070,10 @@ genshelloptUsage(tOptions*  pOpts, int exitCode)
      *  gets it from the command line
      */
     {
-        char* pz;
+        char *  pz;
+        char ** pp = (char **)(void *)&(pShellParseOptions->pzProgName);
         AGDUPSTR(pz, pShellParseOptions->pzPROGNAME, "program name");
-        pShellParseOptions->pzProgName = pz;
+        *pp = pz;
         while (*pz != NUL) {
             *pz = tolower(*pz);
             pz++;
index 591e72f3f3459e988cb1868cd4200a5997baf60a..fd19028aa52baea15a195d6667acc5f64cc95c70 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Wed Dec 15 17:48:08 PST 2010
+ * Generated Thu Dec 16 15:59:23 PST 2010
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
index 5ea18c23a3754fd706c45ccc12a4cb149cf1b769..0b13b2a19df6adc7386bd17435700d1077668f47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Wed Dec 15 17:48:00 PST 2010
+ *  Generated header for gperf generated source Thu Dec 16 15:59:15 PST 2010
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
index 8c51a73b1b3b9f10656a8a3ef06de68f370ec548..28009cd0b2a62214f913269f0e48c40f1fb824de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Wed Dec 15 17:47:59 PST 2010
+ *  Generated header for gperf generated source Thu Dec 16 15:59:15 PST 2010
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */