From: Dave Hart Date: Thu, 16 Dec 2010 09:07:58 +0000 (+0000) Subject: Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1. X-Git-Tag: NTP_4_2_7P95~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=146c50300f84c90f9dd7cbffdb03f25ac03880d3;p=thirdparty%2Fntp.git Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1. bk: 4d09d6eeJ-c3UQyreZRJ2bGmfRW77g --- diff --git a/ChangeLog b/ChangeLog index 2155846f2..904b12e17 100644 --- 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 diff --git a/sntp/libopts/Makefile.am b/sntp/libopts/Makefile.am index 11c6078cc..84c3e00c3 100644 --- a/sntp/libopts/Makefile.am +++ b/sntp/libopts/Makefile.am @@ -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 \ diff --git a/sntp/libopts/ag-char-map.h b/sntp/libopts/ag-char-map.h index 33c931d99..c6f917ec4 100644 --- a/sntp/libopts/ag-char-map.h +++ b/sntp/libopts/ag-char-map.h @@ -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. diff --git a/sntp/libopts/autoopts.c b/sntp/libopts/autoopts.c index d3d6b41ee..9b6cd5f6e 100644 --- a/sntp/libopts/autoopts.c +++ b/sntp/libopts/autoopts.c @@ -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) diff --git a/sntp/libopts/autoopts/options.h b/sntp/libopts/autoopts/options.h index 03810572f..cdfd37fb4 100644 --- a/sntp/libopts/autoopts/options.h +++ b/sntp/libopts/autoopts/options.h @@ -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 * diff --git a/sntp/libopts/autoopts/usage-txt.h b/sntp/libopts/autoopts/usage-txt.h index ad5ef473b..9e9651a36 100644 --- a/sntp/libopts/autoopts/usage-txt.h +++ b/sntp/libopts/autoopts/usage-txt.h @@ -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 * diff --git a/sntp/libopts/configfile.c b/sntp/libopts/configfile.c index 2ee062a8e..d7f340c64 100644 --- a/sntp/libopts/configfile.c +++ b/sntp/libopts/configfile.c @@ -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; } diff --git a/sntp/libopts/environment.c b/sntp/libopts/environment.c index 7771e0c0a..bc205f6ce 100644 --- a/sntp/libopts/environment.c +++ b/sntp/libopts/environment.c @@ -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); } } } diff --git a/sntp/libopts/genshell.c b/sntp/libopts/genshell.c index 059f8869c..c9d56c69c 100644 --- a/sntp/libopts/genshell.c +++ b/sntp/libopts/genshell.c @@ -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 diff --git a/sntp/libopts/genshell.h b/sntp/libopts/genshell.h index 507788b34..9275fabbe 100644 --- a/sntp/libopts/genshell.h +++ b/sntp/libopts/genshell.h @@ -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 */ /* * * * * * * diff --git a/sntp/libopts/load.c b/sntp/libopts/load.c index d7616cd57..69bb1bb40 100644 --- a/sntp/libopts/load.c +++ b/sntp/libopts/load.c @@ -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; } } diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4 index 97732ceae..51a76830c 100644 --- a/sntp/libopts/m4/libopts.m4 +++ b/sntp/libopts/m4/libopts.m4 @@ -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])]) diff --git a/sntp/libopts/m4/liboptschk.m4 b/sntp/libopts/m4/liboptschk.m4 index 896b05ea9..5d0eb9f44 100644 --- a/sntp/libopts/m4/liboptschk.m4 +++ b/sntp/libopts/m4/liboptschk.m4 @@ -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 , 1995-2000. -dnl Bruno Haible , 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]) diff --git a/sntp/libopts/proto.h b/sntp/libopts/proto.h index 13ce379a6..591e72f3f 100644 --- a/sntp/libopts/proto.h +++ b/sntp/libopts/proto.h @@ -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); diff --git a/sntp/libopts/value-type.h b/sntp/libopts/value-type.h index 16975e6b9..5ea18c23a 100644 --- a/sntp/libopts/value-type.h +++ b/sntp/libopts/value-type.h @@ -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. */ diff --git a/sntp/libopts/xat-attribute.h b/sntp/libopts/xat-attribute.h index 2e6ca6684..8c51a73b1 100644 --- a/sntp/libopts/xat-attribute.h +++ b/sntp/libopts/xat-attribute.h @@ -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. */