diff options
author | Simon Josefsson <simon@josefsson.org> | 2011-05-03 13:10:07 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2011-05-03 13:18:25 +0200 |
commit | c5f7aa11f5fb3095320cfd39903d933e9c27a67b (patch) | |
tree | d44bde69e53992d6a6e582818fb92ff315a35697 /gl/m4 | |
parent | 09ad4a8dfd18822961c5a8501467eab2a193f670 (diff) | |
download | libtasn1-c5f7aa11f5fb3095320cfd39903d933e9c27a67b.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 123 | ||||
-rw-r--r-- | gl/m4/manywarnings.m4 | 180 | ||||
-rw-r--r-- | gl/m4/stdio_h.m4 | 4 |
3 files changed, 159 insertions, 148 deletions
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 <errno.h>]) - AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>]) - # 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 <errno.h>]) +AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>]) +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 <stdio.h> likely needs them. GNULIB_FSCANF=1 GNULIB_SCANF=1 - GNULIB_VFSCANF=1 - GNULIB_VSCANF=1 GNULIB_FGETC=1 GNULIB_GETC=1 GNULIB_GETCHAR=1 |