From: Dave Hart Date: Fri, 17 Dec 2010 01:43:41 +0000 (+0000) Subject: libopts 33.5.8 unmodified from AutoGen 5.11.6pre3 X-Git-Tag: NTP_4_2_7P95~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44a549a393000d9be8027ba665c7de114c898039;p=thirdparty%2Fntp.git libopts 33.5.8 unmodified from AutoGen 5.11.6pre3 bk: 4d0ac04dpSb2GO2BGU006bNeDCdBBA --- diff --git a/ChangeLog b/ChangeLog index 904b12e17..1efeaae50 100644 --- 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 diff --git a/sntp/libopts/Makefile.am b/sntp/libopts/Makefile.am index 84c3e00c3..6473fb441 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: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 \ diff --git a/sntp/libopts/README b/sntp/libopts/README index 2a98071c6..0d09595b5 100644 --- a/sntp/libopts/README +++ b/sntp/libopts/README @@ -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 diff --git a/sntp/libopts/ag-char-map.h b/sntp/libopts/ag-char-map.h index c6f917ec4..e19edce5b 100644 --- a/sntp/libopts/ag-char-map.h +++ b/sntp/libopts/ag-char-map.h @@ -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. diff --git a/sntp/libopts/autoopts/options.h b/sntp/libopts/autoopts/options.h index cdfd37fb4..e7a121eca 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 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 */ diff --git a/sntp/libopts/autoopts/usage-txt.h b/sntp/libopts/autoopts/usage-txt.h index 9e9651a36..3c77e40ef 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 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 * diff --git a/sntp/libopts/configfile.c b/sntp/libopts/configfile.c index d7f340c64..80eaff895 100644 --- a/sntp/libopts/configfile.c +++ b/sntp/libopts/configfile.c @@ -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 diff --git a/sntp/libopts/genshell.c b/sntp/libopts/genshell.c index c9d56c69c..c1deb9621 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 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 diff --git a/sntp/libopts/genshell.h b/sntp/libopts/genshell.h index 9275fabbe..77397aedd 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 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 diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4 index 51a76830c..7841cf4e7 100644 --- a/sntp/libopts/m4/libopts.m4 +++ b/sntp/libopts/m4/libopts.m4 @@ -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] ]) diff --git a/sntp/libopts/makeshell.c b/sntp/libopts/makeshell.c index 5bc8fc1ee..f8f08eff2 100644 --- a/sntp/libopts/makeshell.c +++ b/sntp/libopts/makeshell.c @@ -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++; diff --git a/sntp/libopts/proto.h b/sntp/libopts/proto.h index 591e72f3f..fd19028aa 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 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 diff --git a/sntp/libopts/value-type.h b/sntp/libopts/value-type.h index 5ea18c23a..0b13b2a19 100644 --- a/sntp/libopts/value-type.h +++ b/sntp/libopts/value-type.h @@ -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. */ diff --git a/sntp/libopts/xat-attribute.h b/sntp/libopts/xat-attribute.h index 8c51a73b1..28009cd0b 100644 --- a/sntp/libopts/xat-attribute.h +++ b/sntp/libopts/xat-attribute.h @@ -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. */