From c5f7aa11f5fb3095320cfd39903d933e9c27a67b Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 3 May 2011 13:10:07 +0200 Subject: [PATCH] Update gnulib files. --- build-aux/vc-list-files | 14 ++-- cfg.mk | 15 +--- gl/m4/gnulib-comp.m4 | 123 ++++++++++++--------------------- gl/m4/manywarnings.m4 | 180 +++++++++++++++++++++++++++++++----------------- gl/m4/stdio_h.m4 | 4 +- gl/stdlib.in.h | 3 +- lib/glm4/gnulib-comp.m4 | 29 +++----- maint.mk | 16 +++-- 8 files changed, 190 insertions(+), 194 deletions(-) diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index 9bb6fe6..2fced25 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -2,7 +2,7 @@ # List version-controlled file names. # Print a version string. -scriptversion=2010-04-23.22; # UTC +scriptversion=2011-04-29.20; # UTC # Copyright (C) 2006-2011 Free Software Foundation, Inc. @@ -94,12 +94,12 @@ elif test -d CVS; then eval cvsu --find --types=AFGM '"$dir"' $postprocess else eval awk -F/ \''{ \ - if (!$1 && $3 !~ /^-/) { \ - f=FILENAME; \ - if (f ~ /CVS\/Entries$/) \ - f = substr(f, 1, length(f)-11); \ - print f $2; \ - }}'\'' \ + if (!$1 && $3 !~ /^-/) { \ + f=FILENAME; \ + if (f ~ /CVS\/Entries$/) \ + f = substr(f, 1, length(f)-11); \ + print f $2; \ + }}'\'' \ `find "$dir" -name Entries -print` /dev/null' $postprocess fi elif test -d .svn; then diff --git a/cfg.mk b/cfg.mk index c32b614..c482e48 100644 --- a/cfg.mk +++ b/cfg.mk @@ -31,7 +31,7 @@ local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h \ sc_require_config_h sc_require_config_h_first \ sc_immutable_NEWS sc_prohibit_magic_number_exit \ sc_bindtextdomain -VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(build-aux/|gl/|lib/gllib/|lib/glm4/|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/|doc/fdl-1.3.texi)$ +VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(maint.mk|build-aux/|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi|build-aux/pmccabe2html|build-aux/pmccabe.css)$$ # Explicit syntax-check exceptions. exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$ @@ -49,19 +49,14 @@ autoreconf: bootstrap: autoreconf ./configure $(CFGFLAGS) -web-coverage: +coverage-web: rm -fv `find $(htmldir)/coverage -type f | grep -v CVS` cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/ -upload-web-coverage: +coverage-web-upload: cd $(htmldir) && \ cvs commit -m "Update." coverage -W32ROOT ?= $(HOME)/gnutls4win/inst - -mingw32: autoreconf - ./configure --enable-gtk-doc --host=i586-mingw32msvc --build=`./config.guess` --prefix=$(W32ROOT) - ChangeLog: git2cl > ChangeLog cat .clcopying >> ChangeLog @@ -101,7 +96,3 @@ review-diff: | grep -v -e ^index -e '^diff --git' \ | filterdiff -p 1 -x 'gl/*' -x 'build-aux/*' -x 'lib/gl*' -x 'po/*' -x 'maint.mk' -x '.gitignore' -x '.x-sc*' -x ChangeLog -x GNUmakefile -x 'lib/ASN1.c' \ | less - -# Work around maint.mk issue. -taint-distcheck: -my-distcheck: diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 1811b04..8be1edc 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -87,85 +87,48 @@ AC_DEFUN([gl_INIT], m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl' - # Code from module arg-nonnull: - # Code from module autobuild: - # Code from module c++defs: - # Code from module extensions: - # Code from module fdl-1.3: - # Code from module ftello: - gl_FUNC_FTELLO - gl_STDIO_MODULE_INDICATOR([ftello]) - # Code from module gendocs: - # Code from module getopt-gnu: - gl_FUNC_GETOPT_GNU - gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) - # Code from module getopt-posix: - gl_FUNC_GETOPT_POSIX - # Code from module gettext-h: - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - # Code from module gnumakefile: - # Autoconf 2.61a.99 and earlier don't support linking a file only - # in VPATH builds. But since GNUmakefile is for maintainer use - # only, it does not matter if we skip the link with older autoconf. - # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH - # builds, so use a shell variable to bypass this. - GNUmakefile=GNUmakefile - m4_if(m4_version_compare([2.61a.100], - m4_defn([m4_PACKAGE_VERSION])), [1], [], - [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], - [GNUmakefile=$GNUmakefile])]) - # Code from module include_next: - # Code from module lseek: - gl_FUNC_LSEEK - gl_UNISTD_MODULE_INDICATOR([lseek]) - # Code from module maintainer-makefile: - AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], - [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) - # Code from module malloc-posix: - gl_FUNC_MALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([malloc-posix]) - # Code from module manywarnings: - # Code from module multiarch: - gl_MULTIARCH - # Code from module pmccabe2html: - AC_PATH_PROG([PMCCABE], [pmccabe], [false]) - # Code from module progname: - AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) - AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) - # Code from module read-file: - gl_FUNC_READ_FILE - # Code from module realloc-posix: - gl_FUNC_REALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([realloc-posix]) - # Code from module stdarg: - gl_STDARG_H - # Code from module stddef: - gl_STDDEF_H - # Code from module stdint: - gl_STDINT_H - # Code from module stdio: - gl_STDIO_H - # Code from module stdlib: - gl_STDLIB_H - # Code from module sys_stat: - gl_HEADER_SYS_STAT_H - AC_PROG_MKDIR_P - # Code from module time: - gl_HEADER_TIME_H - # Code from module unistd: - gl_UNISTD_H - # Code from module update-copyright: - # Code from module useless-if-before-free: - # Code from module valgrind-tests: - gl_VALGRIND_TESTS - # Code from module vc-list-files: - # Code from module version-etc: - gl_VERSION_ETC - # Code from module version-etc-fsf: - # Code from module warn-on-use: - # Code from module warnings: - AC_SUBST([WARN_CFLAGS]) +gl_FUNC_FTELLO +gl_STDIO_MODULE_INDICATOR([ftello]) +gl_FUNC_GETOPT_GNU +gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) +gl_FUNC_GETOPT_POSIX +AC_SUBST([LIBINTL]) +AC_SUBST([LTLIBINTL]) +# Autoconf 2.61a.99 and earlier don't support linking a file only +# in VPATH builds. But since GNUmakefile is for maintainer use +# only, it does not matter if we skip the link with older autoconf. +# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH +# builds, so use a shell variable to bypass this. +GNUmakefile=GNUmakefile +m4_if(m4_version_compare([2.61a.100], + m4_defn([m4_PACKAGE_VERSION])), [1], [], + [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], + [GNUmakefile=$GNUmakefile])]) +gl_FUNC_LSEEK +gl_UNISTD_MODULE_INDICATOR([lseek]) +AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], + [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) +gl_FUNC_MALLOC_POSIX +gl_STDLIB_MODULE_INDICATOR([malloc-posix]) +gl_MULTIARCH +AC_PATH_PROG([PMCCABE], [pmccabe], [false]) +AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) +AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) +gl_FUNC_READ_FILE +gl_FUNC_REALLOC_POSIX +gl_STDLIB_MODULE_INDICATOR([realloc-posix]) +gl_STDARG_H +gl_STDDEF_H +gl_STDINT_H +gl_STDIO_H +gl_STDLIB_H +gl_HEADER_SYS_STAT_H +AC_PROG_MKDIR_P +gl_HEADER_TIME_H +gl_UNISTD_H +gl_VALGRIND_TESTS +gl_VERSION_ETC +AC_SUBST([WARN_CFLAGS]) # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || @@ -212,7 +175,7 @@ changequote([, ])dnl AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) - gl_VALGRIND_TESTS +gl_VALGRIND_TESTS m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 index e928821..67db064 100644 --- a/gl/m4/manywarnings.m4 +++ b/gl/m4/manywarnings.m4 @@ -35,74 +35,124 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT], # using gl_WARN_ADD if you want to make sure your gcc understands it. AC_DEFUN([gl_MANYWARN_ALL_GCC], [ - gl_manywarn_set= - for gl_manywarn_item in \ - -Wall \ - -W \ - -Wformat-y2k \ - -Wformat-nonliteral \ - -Wformat-security \ - -Winit-self \ - -Wmissing-include-dirs \ - -Wswitch-default \ - -Wswitch-enum \ - -Wunused \ - -Wunknown-pragmas \ - -Wstrict-aliasing \ - -Wstrict-overflow \ - -Wsystem-headers \ - -Wfloat-equal \ - -Wtraditional \ - -Wtraditional-conversion \ - -Wdeclaration-after-statement \ - -Wundef \ - -Wshadow \ - -Wunsafe-loop-optimizations \ - -Wpointer-arith \ - -Wbad-function-cast \ - -Wc++-compat \ - -Wcast-qual \ - -Wcast-align \ - -Wwrite-strings \ - -Wconversion \ - -Wsign-conversion \ - -Wlogical-op \ - -Waggregate-return \ - -Wstrict-prototypes \ - -Wold-style-definition \ - -Wmissing-prototypes \ - -Wmissing-declarations \ - -Wmissing-noreturn \ - -Wmissing-format-attribute \ - -Wpacked \ - -Wpadded \ - -Wredundant-decls \ - -Wnested-externs \ - -Wunreachable-code \ - -Winline \ - -Winvalid-pch \ - -Wlong-long \ - -Wvla \ - -Wvolatile-register-var \ - -Wdisabled-optimization \ - -Wstack-protector \ - -Woverlength-strings \ - -Wbuiltin-macro-redefined \ - -Wmudflap \ - -Wpacked-bitfield-compat \ - -Wsync-nand \ - ; do + dnl First, check if -Wno-missing-field-initializers is needed. + dnl -Wmissing-field-initializers is implied by -W, but that issues + dnl warnings with GCC version before 4.7, for the common idiom + dnl of initializing types on the stack to zero, using { 0, } + AC_REQUIRE([AC_PROG_CC]) + if test -n "$GCC"; then + + dnl First, check -W -Werror -Wno-missing-field-initializers is supported + dnl with the current $CC $CFLAGS $CPPFLAGS. + AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) + AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_nomfi_supported=yes], + [gl_cv_cc_nomfi_supported=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) + + if test "$gl_cv_cc_nomfi_supported" = yes; then + dnl Now check whether -Wno-missing-field-initializers is needed + dnl for the { 0, } construct. + AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) + AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[void f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + } + ]], + [[]])], + [gl_cv_cc_nomfi_needed=no], + [gl_cv_cc_nomfi_needed=yes]) + CFLAGS="$gl_save_CFLAGS" + ]) + AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) + fi + fi + + gl_manywarn_set= + for gl_manywarn_item in \ + -Wall \ + -W \ + -Wformat-y2k \ + -Wformat-nonliteral \ + -Wformat-security \ + -Winit-self \ + -Wmissing-include-dirs \ + -Wswitch-default \ + -Wswitch-enum \ + -Wunused \ + -Wunknown-pragmas \ + -Wstrict-aliasing \ + -Wstrict-overflow \ + -Wsystem-headers \ + -Wfloat-equal \ + -Wtraditional \ + -Wtraditional-conversion \ + -Wdeclaration-after-statement \ + -Wundef \ + -Wshadow \ + -Wunsafe-loop-optimizations \ + -Wpointer-arith \ + -Wbad-function-cast \ + -Wc++-compat \ + -Wcast-qual \ + -Wcast-align \ + -Wwrite-strings \ + -Wconversion \ + -Wsign-conversion \ + -Wlogical-op \ + -Waggregate-return \ + -Wstrict-prototypes \ + -Wold-style-definition \ + -Wmissing-prototypes \ + -Wmissing-declarations \ + -Wmissing-noreturn \ + -Wmissing-format-attribute \ + -Wpacked \ + -Wpadded \ + -Wredundant-decls \ + -Wnested-externs \ + -Wunreachable-code \ + -Winline \ + -Winvalid-pch \ + -Wlong-long \ + -Wvla \ + -Wvolatile-register-var \ + -Wdisabled-optimization \ + -Wstack-protector \ + -Woverlength-strings \ + -Wbuiltin-macro-redefined \ + -Wmudflap \ + -Wpacked-bitfield-compat \ + -Wsync-nand \ + ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done - # The following are not documented in the manual but are included in - # output from gcc --help=warnings. - for gl_manywarn_item in \ - -Wattributes \ - -Wcoverage-mismatch \ - -Wmultichar \ - -Wunused-macros \ - ; do + # The following are not documented in the manual but are included in + # output from gcc --help=warnings. + for gl_manywarn_item in \ + -Wattributes \ + -Wcoverage-mismatch \ + -Wmultichar \ + -Wunused-macros \ + ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done + + # Disable the missing-field-initializers warning if needed + if test "$gl_cv_cc_nomfi_needed" = yes; then + gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" + fi + $1=$gl_manywarn_set ]) diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 8b013c2..a8326f3 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 36 +# stdio_h.m4 serial 37 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,8 +14,6 @@ AC_DEFUN([gl_STDIO_H], dnl likely needs them. GNULIB_FSCANF=1 GNULIB_SCANF=1 - GNULIB_VFSCANF=1 - GNULIB_VSCANF=1 GNULIB_FGETC=1 GNULIB_GETC=1 GNULIB_GETCHAR=1 diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index b9ada2c..7513553 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -81,8 +81,9 @@ struct random_data # endif #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only declares mkstemp. */ +/* On MacOS X 10.5, only declares mkstemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include diff --git a/lib/glm4/gnulib-comp.m4 b/lib/glm4/gnulib-comp.m4 index 0a36bf7..1edfd35 100644 --- a/lib/glm4/gnulib-comp.m4 +++ b/lib/glm4/gnulib-comp.m4 @@ -55,27 +55,14 @@ AC_DEFUN([lgl_INIT], m4_pushdef([lgl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib/gllib' - # Code from module arg-nonnull: - # Code from module c++defs: - # Code from module extensions: - # Code from module include_next: - # Code from module lib-symbol-versions: - gl_LD_VERSION_SCRIPT - # Code from module lib-symbol-visibility: - gl_VISIBILITY - # Code from module multiarch: - gl_MULTIARCH - # Code from module stddef: - gl_STDDEF_H - # Code from module stdint: - gl_STDINT_H - # Code from module string: - gl_HEADER_STRING_H - # Code from module strverscmp: - gl_FUNC_STRVERSCMP - gl_STRING_MODULE_INDICATOR([strverscmp]) - # Code from module warn-on-use: - # Code from module dummy: +gl_LD_VERSION_SCRIPT +gl_VISIBILITY +gl_MULTIARCH +gl_STDDEF_H +gl_STDINT_H +gl_HEADER_STRING_H +gl_FUNC_STRVERSCMP +gl_STRING_MODULE_INDICATOR([strverscmp]) # End of code from modules m4_ifval(lgl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([lgl_LIBSOURCES_DIR])[ || diff --git a/maint.mk b/maint.mk index 07a7773..8727b3f 100644 --- a/maint.mk +++ b/maint.mk @@ -33,7 +33,6 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) -VC-tag = git tag -s -m '$(VERSION)' 'v$(VERSION)' -u '$(gpg_key_ID)' VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) @@ -942,16 +941,23 @@ update-NEWS-hash: NEWS # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. -# We use perl rather than "grep -nE ..." to exempt a single -# use of an @...@-delimited variable name in src/Makefile.am. +# However, there is still one case in which @VAR@ use is not just +# legitimate, but actually required: when augmenting an automake-defined +# variable with a prefix. For example, gettext uses this: +# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ +# otherwise, makeinfo would put German or French (current locale) +# navigation hints in the otherwise-English documentation. +# # Allow the package to add exceptions via a hook in cfg.mk; # for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. _makefile_at_at_check_exceptions ?= sc_makefile_at_at_check: - @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \ + @perl -ne '/\@[A-Z_0-9]+\@/' \ + -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/' \ + -e ''$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ - $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ + $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS -- 2.7.4