libtasn1-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libtasn1 branch, libtasn1_2_x, updated. libtasn1_2_13-19-g0f18


From: Simon Josefsson
Subject: [SCM] GNU libtasn1 branch, libtasn1_2_x, updated. libtasn1_2_13-19-g0f18245
Date: Mon, 24 Sep 2012 11:52:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=0f18245c6a19c407a65ae5b2d39dec032c41f8ac

The branch, libtasn1_2_x has been updated
       via  0f18245c6a19c407a65ae5b2d39dec032c41f8ac (commit)
       via  d03b33325f55071bcf075678caf6ca335e4235cd (commit)
      from  8608ce04d0fd1d919d0a6c38568bc1f08b2776dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0f18245c6a19c407a65ae5b2d39dec032c41f8ac
Author: Simon Josefsson <address@hidden>
Date:   Mon Sep 24 13:50:20 2012 +0200

    Fix syntax-check warnings.

commit d03b33325f55071bcf075678caf6ca335e4235cd
Author: Simon Josefsson <address@hidden>
Date:   Mon Sep 24 13:50:04 2012 +0200

    Update gnulib files.

-----------------------------------------------------------------------

Summary of changes:
 build-aux/gendocs.sh      |   35 ++++--
 build-aux/gnupload        |   28 ++++-
 gl/Makefile.am            |    2 +-
 gl/errno.in.h             |   48 +++++++-
 gl/fstat.c                |    2 +
 gl/gettext.h              |    9 +-
 gl/m4/errno_h.m4          |   11 ++-
 gl/m4/extensions.m4       |    4 +-
 gl/m4/getopt.m4           |  291 ++++++++++++++++++++++++--------------------
 gl/m4/gnulib-cache.m4     |    2 +-
 gl/m4/gnulib-common.m4    |    4 +-
 gl/m4/gnulib-comp.m4      |  190 +++++++++++++++---------------
 gl/m4/largefile.m4        |    2 +-
 gl/m4/manywarnings.m4     |  153 ++++++++++++++----------
 gl/m4/multiarch.m4        |    4 +-
 gl/m4/nocrash.m4          |    4 +-
 gl/m4/stdio_h.m4          |    4 +-
 gl/m4/sys_stat_h.m4       |    5 +-
 gl/m4/time_h.m4           |    4 +-
 gl/stdint.in.h            |    2 +-
 gl/stdio-impl.h           |    4 +-
 gl/stdlib.in.h            |    4 +-
 gl/unistd.in.h            |    2 +-
 lib/element.c             |    5 +-
 lib/gllib/stdint.in.h     |    2 +-
 lib/glm4/extensions.m4    |    4 +-
 lib/glm4/gnulib-cache.m4  |    2 +-
 lib/glm4/gnulib-common.m4 |    4 +-
 lib/glm4/gnulib-comp.m4   |   24 ++--
 lib/glm4/multiarch.m4     |    4 +-
 lib/glm4/visibility.m4    |    4 +-
 lib/libtasn1.map          |    1 -
 maint.mk                  |  149 ++++++++++++++++-------
 33 files changed, 600 insertions(+), 413 deletions(-)

diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index c8abd55..c293f96 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,10 @@
 # gendocs.sh -- generate a GNU manual in many formats.  This script is
 #   mentioned in maintain.texi.  See the help message below for usage details.
 
-scriptversion=2011-04-08.14
+scriptversion=2012-09-02.17
 
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+# Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -51,15 +51,16 @@ unset use_texi2html
 
 version="gendocs.sh $scriptversion
 
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2012 Free Software Foundation, Inc.
 There is NO warranty.  You may redistribute this software
 under the terms of the GNU General Public License.
 For more information about these matters, see the files named COPYING."
 
 usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
 
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source.  See the GNU Maintainers document for a more extensive
+discussion:
   http://www.gnu.org/prep/maintain_toc.html
 
 Options:
@@ -68,6 +69,7 @@ Options:
   --email ADR use ADR as contact in generated web pages.
   --docbook   convert to DocBook too (xml, txt, html, pdf and ps).
   --html ARG  pass indicated ARG to makeinfo or texi2html for HTML targets.
+  --info ARG  pass indicated ARG to makeinfo for Info, instead of --no-split.
   --texi2html use texi2html to generate HTML targets.
   --help      display this help and exit successfully.
   --version   display version information and exit successfully.
@@ -80,11 +82,11 @@ Typical sequence:
   wget \"$templateurl\"
   $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
 
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override).  Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override).  Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
 
-Please use the --email ADDRESS option to specify your bug-reporting
+Please do use the --email ADDRESS option to specify your bug-reporting
 address in the generated HTML pages.
 
 MANUAL-TITLE is included as part of the HTML <title> of the overall
@@ -102,6 +104,9 @@ If a manual's Texinfo sources are spread across several 
directories,
 first copy or symlink all Texinfo sources into a single directory.
 (Part of the script's work is to make a tar.gz of the sources.)
 
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
 You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
 DVIPS to control the programs that get executed, and
 GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
@@ -126,6 +131,7 @@ MANUAL_TITLE=
 PACKAGE=
 address@hidden  # please override with --email
 htmlarg=
+infoarg=--no-split
 outdir=manual
 srcfile=
 
@@ -138,6 +144,7 @@ while test $# -gt 0; do
     -o) shift; outdir=$1;;
     --docbook) docbook=yes;;
     --html) shift; htmlarg=$1;;
+    --info) shift; infoarg=$1;;
     --texi2html) use_texi2html=1;;
     -*)
       echo "$0: Unknown option \`$1'." >&2
@@ -188,10 +195,10 @@ case $outdir in
   *)  abs_outdir=$srcdir/$outdir;;
 esac
 
-echo Generating output formats for $srcfile
+echo "Generating output formats for $srcfile"
 
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $infoarg \"$srcfile\""
+echo "Generating info file(s)... ($cmd)"
 eval "$cmd"
 mkdir -p "$outdir/"
 tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
@@ -204,7 +211,7 @@ echo "Generating dvi ... ($cmd)"
 eval "$cmd"
 
 # now, before we compress dvi:
-echo Generating postscript...
+echo "Generating postscript..."
 ${DVIPS} $PACKAGE -o
 gzip -f -9 $PACKAGE.ps
 ps_gz_size=`calcsize $PACKAGE.ps.gz`
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 40a59d3..a0e5c7b 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2012-01-15.15; # UTC
+scriptversion=2012-06-11.00; # UTC
 
 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
 #
@@ -28,6 +28,7 @@ GPG='gpg --batch --no-tty'
 conffile=.gnuploadrc
 to=
 dry_run=false
+replace=
 symlink_files=
 delete_files=
 delete_symlinks=
@@ -53,8 +54,10 @@ Options:
   --to DEST                specify one destination for FILES
                            (multiple --to options are allowed)
   --user NAME              sign with key NAME
+  --replace                allow replacements of existing files
   --symlink-regex[=EXPR]   use sed script EXPR to compute symbolic link names
   --dry-run                do nothing, show what would have been done
+                           (including the constructed directive file)
   --version                output version information and exit
 
 If --symlink-regex is given without EXPR, then the link target name
@@ -146,6 +149,9 @@ while test -n "$1"; do
     --delete)
       collect_var=delete_files
       ;;
+    --replace)
+      replace="replace: true"
+      ;;
     --rmsymlink)
       collect_var=delete_symlinks
       ;;
@@ -243,11 +249,13 @@ unset passphrase
 # listings with their arguments...).
 # Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run; then :; else
+  PATH=/empty echo -n "Enter GPG passphrase: "
+  stty -echo
+  read -r passphrase
+  stty echo
+  echo
+fi
 
 if test $# -ne 0; then
   for file
@@ -270,7 +278,7 @@ filename: $3$stmt"
   fi
 
   cat >${2}.directive<<EOF
-version: 1.1
+version: 1.2
 directory: $1
 comment: gnupload v. $scriptversion$stmt
 EOF
@@ -393,6 +401,12 @@ do
   do
     echo "Uploading $file to $dest ..."
     stmt=
+    #
+    # allowing file replacement is all or nothing.
+    if test -n "$replace"; then stmt="$stmt
+$replace"
+    fi
+    #
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
     if test -n "$symlink_expr"; then
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 46e6f8f..2d2128e 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -157,7 +157,7 @@ libgnu_la_SOURCES += gettext.h
 
 distclean-local: clean-GNUmakefile
 clean-GNUmakefile:
-       test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+       test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
 
 EXTRA_DIST += $(top_srcdir)/GNUmakefile
 
diff --git a/gl/errno.in.h b/gl/errno.in.h
index 2f42612..5e5af92 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -84,6 +84,16 @@
 #   define GNULIB_defined_ECANCELED 1
 #  endif
 
+#  ifndef EOWNERDEAD
+#   define EOWNERDEAD 133
+#   define GNULIB_defined_EOWNERDEAD 1
+#  endif
+
+#  ifndef ENOTRECOVERABLE
+#   define ENOTRECOVERABLE 127
+#   define GNULIB_defined_ENOTRECOVERABLE 1
+#  endif
+
 #  ifndef EINPROGRESS
 #   define EINPROGRESS     112
 #   define EALREADY        103
@@ -108,15 +118,17 @@
 #   define ELOOP           114
 #   define EHOSTUNREACH    110
 #   define EWOULDBLOCK     140
+#   define GNULIB_defined_ESOCK 1
+#  endif
+
+#  ifndef ETXTBSY
 #   define ETXTBSY         139
 #   define ENODATA         120  /* not required by POSIX */
 #   define ENOSR           124  /* not required by POSIX */
 #   define ENOSTR          125  /* not required by POSIX */
-#   define ENOTRECOVERABLE 127  /* not required by POSIX */
-#   define EOWNERDEAD      133  /* not required by POSIX */
 #   define ETIME           137  /* not required by POSIX */
 #   define EOTHER          131  /* not required by POSIX */
-#   define GNULIB_defined_ESOCK 1
+#   define GNULIB_defined_ESTREAMS 1
 #  endif
 
 /* These are intentionally the same values as the WSA* error numbers, defined
@@ -227,6 +239,36 @@
 #  define GNULIB_defined_ECANCELED 1
 # endif
 
+/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
+   defined.  */
+
+# ifndef EOWNERDEAD
+#  if defined __sun
+    /* Use the same values as defined for Solaris >= 8, for
+       interoperability.  */
+#   define EOWNERDEAD      58
+#   define ENOTRECOVERABLE 59
+#  elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    /* We have a conflict here: pthreads-win32 defines these values
+       differently than MSVC 10.  It's hairy to decide which one to use.  */
+#   if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
+     /* Use the same values as defined by pthreads-win32, for
+        interoperability.  */
+#    define EOWNERDEAD      43
+#    define ENOTRECOVERABLE 44
+#   else
+     /* Use the same values as defined by MSVC 10, for
+        interoperability.  */
+#    define EOWNERDEAD      133
+#    define ENOTRECOVERABLE 127
+#   endif
+#  else
+#   define EOWNERDEAD      2013
+#   define ENOTRECOVERABLE 2014
+#  endif
+#  define GNULIB_defined_EOWNERDEAD 1
+#  define GNULIB_defined_ENOTRECOVERABLE 1
+# endif
 
 #endif /* address@hidden@_ERRNO_H */
 #endif /* address@hidden@_ERRNO_H */
diff --git a/gl/fstat.c b/gl/fstat.c
index ac2b1ef..6d5f5c2 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
 # define stat _stati64
+# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
 # define fstat _fstati64
 #endif
 #undef __need_system_sys_stat_h
diff --git a/gl/gettext.h b/gl/gettext.h
index 75875cd..65ca1e6 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -183,9 +183,12 @@ npgettext_aux (const char *domain,
 
 #include <string.h>
 
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-   /* || __STDC_VERSION__ >= 199901L */ )
+#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+     /* || __STDC_VERSION__ >= 199901L */ )
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 4f0bb83..1e76ba2 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 10
+# errno_h.m4 serial 11
 dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,9 @@ AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
     AC_EGREP_CPP([booboo],[
 #include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
 #if !defined ENOMSG
 booboo
 #endif
@@ -49,6 +52,12 @@ booboo
 #if !defined ECANCELED
 booboo
 #endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
       ],
       [gl_cv_header_errno_h_complete=no],
       [gl_cv_header_errno_h_complete=yes])
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 0bfaef6..6d17d8a 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 11  -*- Autoconf -*-
+# serial 12  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@@ -67,7 +67,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-/* Enable general extensions on MacOS X.  */
+/* Enable general extensions on Mac OS X.  */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 2aea895..f6902b5 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,4 +1,4 @@
-# getopt.m4 serial 39
+# getopt.m4 serial 44
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,18 +9,17 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
 [
   m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
   dnl Other modules can request the gnulib implementation of the getopt
   dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
   dnl argp.m4 does this.
   m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
-    gl_GETOPT_IFELSE([], [])
     REPLACE_GETOPT=1
   ], [
     REPLACE_GETOPT=0
-    gl_GETOPT_IFELSE([
+    if test -n "$gl_replace_getopt"; then
       REPLACE_GETOPT=1
-    ],
-    [])
+    fi
   ])
   if test $REPLACE_GETOPT = 1; then
     dnl Arrange for getopt.h to be created.
@@ -38,13 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
   AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
 ])
 
-# emacs' configure.in uses this.
-AC_DEFUN([gl_GETOPT_IFELSE],
-[
-  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
-  AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
-])
-
 # Determine whether to replace the entire getopt facility.
 AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
 [
@@ -74,11 +66,6 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
     AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
   fi
 
-  dnl mingw's getopt (in libmingwex.a) does weird things when the options
-  dnl strings starts with '+' and it's not the first call.  Some internal state
-  dnl is left over from earlier calls, and neither setting optind = 0 nor
-  dnl setting optreset = 1 get rid of this internal state.
-  dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
   dnl POSIX 2008 does not specify leading '+' behavior, but see
   dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
   dnl the next version of POSIX.  For now, we only guarantee leading '+'
@@ -87,30 +74,16 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
     AC_CACHE_CHECK([whether getopt is POSIX compatible],
       [gl_cv_func_getopt_posix],
       [
-        dnl BSD getopt_long uses an incompatible method to reset option
-        dnl processing.  Existence of the optreset variable, in and of
-        dnl itself, is not a reason to replace getopt, but knowledge
-        dnl of the variable is needed to determine how to reset and
-        dnl whether a reset reparses the environment.  Solaris
-        dnl supports neither optreset nor optind=0, but keeps no state
-        dnl that needs a reset beyond setting optind=1; detect Solaris
-        dnl by getopt_clip.
-        AC_LINK_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[#include <unistd.h>]],
-             [[int *p = &optreset; return optreset;]])],
-          [gl_optind_min=1],
-          [AC_COMPILE_IFELSE(
-             [AC_LANG_PROGRAM(
-                [[#include <getopt.h>]],
-                [[return !getopt_clip;]])],
-             [gl_optind_min=1],
-             [gl_optind_min=0])])
-
-        dnl This test fails on mingw and succeeds on many other platforms.
-        gl_save_CPPFLAGS=$CPPFLAGS
-        CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
-        AC_RUN_IFELSE([AC_LANG_SOURCE([[
+        dnl Merging these three different test programs into a single one
+        dnl would require a reset mechanism. On BSD systems, it can be done
+        dnl through 'optreset'; on some others (glibc), it can be done by
+        dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
+        dnl Solaris 9, musl libc), there is no such mechanism.
+        if test $cross_compiling = no; then
+          dnl Sanity check. Succeeds everywhere (except on MSVC,
+          dnl which lacks <unistd.h> and getopt() entirely).
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
@@ -118,89 +91,107 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
 int
 main ()
 {
-  {
-    static char program[] = "program";
-    static char a[] = "-a";
-    static char foo[] = "foo";
-    static char bar[] = "bar";
-    char *argv[] = { program, a, foo, bar, NULL };
-    int c;
+  static char program[] = "program";
+  static char a[] = "-a";
+  static char foo[] = "foo";
+  static char bar[] = "bar";
+  char *argv[] = { program, a, foo, bar, NULL };
+  int c;
 
-    optind = OPTIND_MIN;
-    opterr = 0;
-
-    c = getopt (4, argv, "ab");
-    if (!(c == 'a'))
-      return 1;
-    c = getopt (4, argv, "ab");
-    if (!(c == -1))
-      return 2;
-    if (!(optind == 2))
-      return 3;
-  }
-  /* Some internal state exists at this point.  */
-  {
-    static char program[] = "program";
-    static char donald[] = "donald";
-    static char p[] = "-p";
-    static char billy[] = "billy";
-    static char duck[] = "duck";
-    static char a[] = "-a";
-    static char bar[] = "bar";
-    char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
-    int c;
+  c = getopt (4, argv, "ab");
+  if (!(c == 'a'))
+    return 1;
+  c = getopt (4, argv, "ab");
+  if (!(c == -1))
+    return 2;
+  if (!(optind == 2))
+    return 3;
+  return 0;
+}
+]])],
+            [gl_cv_func_getopt_posix=maybe],
+            [gl_cv_func_getopt_posix=no])
+          if test $gl_cv_func_getopt_posix = maybe; then
+            dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
+            dnl which lacks <unistd.h> and getopt() entirely).
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
 
-    optind = OPTIND_MIN;
-    opterr = 0;
+int
+main ()
+{
+  static char program[] = "program";
+  static char donald[] = "donald";
+  static char p[] = "-p";
+  static char billy[] = "billy";
+  static char duck[] = "duck";
+  static char a[] = "-a";
+  static char bar[] = "bar";
+  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
+  int c;
 
-    c = getopt (7, argv, "+abp:q:");
-    if (!(c == -1))
-      return 4;
-    if (!(strcmp (argv[0], "program") == 0))
-      return 5;
-    if (!(strcmp (argv[1], "donald") == 0))
-      return 6;
-    if (!(strcmp (argv[2], "-p") == 0))
-      return 7;
-    if (!(strcmp (argv[3], "billy") == 0))
-      return 8;
-    if (!(strcmp (argv[4], "duck") == 0))
-      return 9;
-    if (!(strcmp (argv[5], "-a") == 0))
-      return 10;
-    if (!(strcmp (argv[6], "bar") == 0))
-      return 11;
-    if (!(optind == 1))
-      return 12;
-  }
-  /* Detect MacOS 10.5, AIX 7.1 bug.  */
-  {
-    static char program[] = "program";
-    static char ab[] = "-ab";
-    char *argv[3] = { program, ab, NULL };
-    optind = OPTIND_MIN;
-    opterr = 0;
-    if (getopt (2, argv, "ab:") != 'a')
-      return 13;
-    if (getopt (2, argv, "ab:") != '?')
-      return 14;
-    if (optopt != 'b')
-      return 15;
-    if (optind != 2)
-      return 16;
-  }
+  c = getopt (7, argv, "+abp:q:");
+  if (!(c == -1))
+    return 4;
+  if (!(strcmp (argv[0], "program") == 0))
+    return 5;
+  if (!(strcmp (argv[1], "donald") == 0))
+    return 6;
+  if (!(strcmp (argv[2], "-p") == 0))
+    return 7;
+  if (!(strcmp (argv[3], "billy") == 0))
+    return 8;
+  if (!(strcmp (argv[4], "duck") == 0))
+    return 9;
+  if (!(strcmp (argv[5], "-a") == 0))
+    return 10;
+  if (!(strcmp (argv[6], "bar") == 0))
+    return 11;
+  if (!(optind == 1))
+    return 12;
+  return 0;
+}
+]])],
+              [gl_cv_func_getopt_posix=maybe],
+              [gl_cv_func_getopt_posix=no])
+          fi
+          if test $gl_cv_func_getopt_posix = maybe; then
+            dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
+            AC_RUN_IFELSE(
+              [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
 
+int
+main ()
+{
+  static char program[] = "program";
+  static char ab[] = "-ab";
+  char *argv[3] = { program, ab, NULL };
+  if (getopt (2, argv, "ab:") != 'a')
+    return 13;
+  if (getopt (2, argv, "ab:") != '?')
+    return 14;
+  if (optopt != 'b')
+    return 15;
+  if (optind != 2)
+    return 16;
   return 0;
 }
 ]])],
-          [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
-          [case "$host_os" in
-             mingw*)         gl_cv_func_getopt_posix="guessing no";;
-             darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
-             *)              gl_cv_func_getopt_posix="guessing yes";;
-           esac
-          ])
-        CPPFLAGS=$gl_save_CPPFLAGS
+              [gl_cv_func_getopt_posix=yes],
+              [gl_cv_func_getopt_posix=no])
+          fi
+        else
+          case "$host_os" in
+            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
+            *)                       gl_cv_func_getopt_posix="guessing yes";;
+          esac
+        fi
       ])
     case "$gl_cv_func_getopt_posix" in
       *no) gl_replace_getopt=yes ;;
@@ -236,7 +227,7 @@ dnl is ambiguous with environment values that contain 
newlines.
              nocrash_init();
 
              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
-                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
                 OSF/1 5.1, Solaris 10.  */
              {
                static char conftest[] = "conftest";
@@ -247,7 +238,7 @@ dnl is ambiguous with environment values that contain 
newlines.
                  result |= 1;
              }
              /* This code succeeds on glibc 2.8, mingw,
-                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
              {
                static char program[] = "program";
@@ -276,7 +267,7 @@ dnl is ambiguous with environment values that contain 
newlines.
                if (getopt (3, argv, "-p") != 1)
                  result |= 16;
                else if (getopt (3, argv, "-p") != 'p')
-                 result |= 32;
+                 result |= 16;
              }
              /* This code fails on glibc 2.11.  */
              {
@@ -286,9 +277,9 @@ dnl is ambiguous with environment values that contain 
newlines.
                char *argv[] = { program, b, a, NULL };
                optind = opterr = 0;
                if (getopt (3, argv, "+:a:b") != 'b')
-                 result |= 64;
+                 result |= 32;
                else if (getopt (3, argv, "+:a:b") != ':')
-                 result |= 64;
+                 result |= 32;
              }
              /* This code dumps core on glibc 2.14.  */
              {
@@ -298,18 +289,14 @@ dnl is ambiguous with environment values that contain 
newlines.
                char *argv[] = { program, w, dummy, NULL };
                optind = opterr = 1;
                if (getopt (3, argv, "W;") != 'W')
-                 result |= 128;
+                 result |= 64;
              }
              return result;
            ]])],
         [gl_cv_func_getopt_gnu=yes],
         [gl_cv_func_getopt_gnu=no],
-        [dnl Cross compiling. Guess based on host and declarations.
-         case $host_os:$ac_cv_have_decl_optreset in
-           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
-           *:yes)               gl_cv_func_getopt_gnu=no;;
-           *)                   gl_cv_func_getopt_gnu=yes;;
-         esac
+        [dnl Cross compiling. Assume the worst, even on glibc platforms.
+         gl_cv_func_getopt_gnu="guessing no"
         ])
        case $gl_had_POSIXLY_CORRECT in
          exported) ;;
@@ -317,13 +304,54 @@ dnl is ambiguous with environment values that contain 
newlines.
          *) AS_UNSET([POSIXLY_CORRECT]) ;;
        esac
       ])
-    if test "$gl_cv_func_getopt_gnu" = "no"; then
+    if test "$gl_cv_func_getopt_gnu" != yes; then
       gl_replace_getopt=yes
+    else
+      AC_CACHE_CHECK([for working GNU getopt_long function],
+        [gl_cv_func_getopt_long_gnu],
+        [AC_RUN_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <getopt.h>
+                #include <stddef.h>
+                #include <string.h>
+              ]],
+              [[static const struct option long_options[] =
+                  {
+                    { "xtremely-",no_argument,       NULL, 1003 },
+                    { "xtra",     no_argument,       NULL, 1001 },
+                    { "xtreme",   no_argument,       NULL, 1002 },
+                    { "xtremely", no_argument,       NULL, 1003 },
+                    { NULL,       0,                 NULL, 0 }
+                  };
+                /* This code fails on OpenBSD 5.0.  */
+                {
+                  static char program[] = "program";
+                  static char xtremel[] = "--xtremel";
+                  char *argv[] = { program, xtremel, NULL };
+                  int option_index;
+                  optind = 1; opterr = 0;
+                  if (getopt_long (2, argv, "", long_options, &option_index) 
!= 1003)
+                    return 1;
+                }
+                return 0;
+              ]])],
+           [gl_cv_func_getopt_long_gnu=yes],
+           [gl_cv_func_getopt_long_gnu=no],
+           [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
+            case "$host_os" in
+              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
+              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
+            esac
+           ])
+        ])
+      case "$gl_cv_func_getopt_long_gnu" in
+        *yes) ;;
+        *) gl_replace_getopt=yes ;;
+      esac
     fi
   fi
 ])
 
-# emacs' configure.in uses this.
 AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
 [
   GETOPT_H=getopt.h
@@ -334,7 +362,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
 ])
 
 # Prerequisites of lib/getopt*.
-# emacs' configure.in uses this.
 AC_DEFUN([gl_PREREQ_GETOPT],
 [
   AC_CHECK_DECLS_ONCE([getenv])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index f9a6d3e..62b83f4 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -59,5 +59,5 @@ gl_MAKEFILE_NAME([])
 gl_LIBTOOL
 gl_MACRO_PREFIX([gl])
 gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
 gl_VC_FILES([false])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index d62b767..15d2b2b 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 32
+# gnulib-common.m4 serial 33
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE__ && __MACH__ test for Mac OS X.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined 
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 1b4254e..8093a87 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -111,100 +111,100 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='gl'
-gl_HEADER_ERRNO_H
-gl_FUNC_FSTAT
-if test $REPLACE_FSTAT = 1; then
-  AC_LIBOBJ([fstat])
-  gl_PREREQ_FSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([fstat])
-gl_FUNC_FTELL
-if test $REPLACE_FTELL = 1; then
-  AC_LIBOBJ([ftell])
-fi
-gl_STDIO_MODULE_INDICATOR([ftell])
-gl_FUNC_FTELLO
-if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
-  AC_LIBOBJ([ftello])
-  gl_PREREQ_FTELLO
-fi
-gl_STDIO_MODULE_INDICATOR([ftello])
-gl_FUNC_GETOPT_GNU
-if test $REPLACE_GETOPT = 1; then
-  AC_LIBOBJ([getopt])
-  AC_LIBOBJ([getopt1])
-  gl_PREREQ_GETOPT
-  dnl Arrange for unistd.h to include getopt.h.
-  GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
-gl_FUNC_GETOPT_POSIX
-if test $REPLACE_GETOPT = 1; then
-  AC_LIBOBJ([getopt])
-  AC_LIBOBJ([getopt1])
-  gl_PREREQ_GETOPT
-  dnl Arrange for unistd.h to include getopt.h.
-  GNULIB_GL_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
-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])])
-AC_REQUIRE([gl_LARGEFILE])
-gl_FUNC_LSEEK
-if test $REPLACE_LSEEK = 1; then
-  AC_LIBOBJ([lseek])
-fi
-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
-if test $REPLACE_MALLOC = 1; then
-  AC_LIBOBJ([malloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-gl_MSVC_INVAL
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-  AC_LIBOBJ([msvc-inval])
-fi
-gl_MSVC_NOTHROW
-if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-  AC_LIBOBJ([msvc-nothrow])
-fi
-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_PREREQ_READ_FILE
-gl_FUNC_REALLOC_POSIX
-if test $REPLACE_REALLOC = 1; then
-  AC_LIBOBJ([realloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([realloc-posix])
-gt_TYPE_SSIZE_T
-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_SYS_TYPES_H
-AC_PROG_MKDIR_P
-gl_HEADER_TIME_H
-gl_UNISTD_H
-gl_VALGRIND_TESTS
-gl_VERSION_ETC
+  gl_HEADER_ERRNO_H
+  gl_FUNC_FSTAT
+  if test $REPLACE_FSTAT = 1; then
+    AC_LIBOBJ([fstat])
+    gl_PREREQ_FSTAT
+  fi
+  gl_SYS_STAT_MODULE_INDICATOR([fstat])
+  gl_FUNC_FTELL
+  if test $REPLACE_FTELL = 1; then
+    AC_LIBOBJ([ftell])
+  fi
+  gl_STDIO_MODULE_INDICATOR([ftell])
+  gl_FUNC_FTELLO
+  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+    AC_LIBOBJ([ftello])
+    gl_PREREQ_FTELLO
+  fi
+  gl_STDIO_MODULE_INDICATOR([ftello])
+  gl_FUNC_GETOPT_GNU
+  if test $REPLACE_GETOPT = 1; then
+    AC_LIBOBJ([getopt])
+    AC_LIBOBJ([getopt1])
+    gl_PREREQ_GETOPT
+    dnl Arrange for unistd.h to include getopt.h.
+    GNULIB_GL_UNISTD_H_GETOPT=1
+  fi
+  AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+  gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+  gl_FUNC_GETOPT_POSIX
+  if test $REPLACE_GETOPT = 1; then
+    AC_LIBOBJ([getopt])
+    AC_LIBOBJ([getopt1])
+    gl_PREREQ_GETOPT
+    dnl Arrange for unistd.h to include getopt.h.
+    GNULIB_GL_UNISTD_H_GETOPT=1
+  fi
+  AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+  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])])
+  AC_REQUIRE([gl_LARGEFILE])
+  gl_FUNC_LSEEK
+  if test $REPLACE_LSEEK = 1; then
+    AC_LIBOBJ([lseek])
+  fi
+  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
+  if test $REPLACE_MALLOC = 1; then
+    AC_LIBOBJ([malloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+  gl_MSVC_INVAL
+  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+    AC_LIBOBJ([msvc-inval])
+  fi
+  gl_MSVC_NOTHROW
+  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+    AC_LIBOBJ([msvc-nothrow])
+  fi
+  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_PREREQ_READ_FILE
+  gl_FUNC_REALLOC_POSIX
+  if test $REPLACE_REALLOC = 1; then
+    AC_LIBOBJ([realloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+  gt_TYPE_SSIZE_T
+  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_SYS_TYPES_H
+  AC_PROG_MKDIR_P
+  gl_HEADER_TIME_H
+  gl_UNISTD_H
+  gl_VALGRIND_TESTS
+  gl_VERSION_ETC
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -251,7 +251,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/largefile.m4 b/gl/m4/largefile.m4
index a159f4a..a88850a 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -136,7 +136,7 @@ AC_DEFUN([gl_LARGEFILE],
     *)
       dnl Nothing to do on gnulib's side.
       dnl A 64-bit off_t is
-      dnl   - already the default on MacOS X, FreeBSD, NetBSD, OpenBSD, IRIX,
+      dnl   - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
       dnl     OSF/1, Cygwin,
       dnl   - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
       dnl     glibc, HP-UX, Solaris,
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 864fc85..2760efb 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -81,95 +81,118 @@ 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 \
+    -Wabi \
+    -Waddress \
+    -Wall \
+    -Warray-bounds \
+    -Wattributes \
     -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 \
+    -Wcast-align \
+    -Wchar-subscripts \
+    -Wclobbered \
+    -Wcomment \
+    -Wcomments \
     -Wcoverage-mismatch \
-    -Wunused-macros \
-    ; do
-    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
-  done
-  # More warnings from gcc 4.6.2 --help=warnings.
-  for gl_manywarn_item in \
-    -Wabi \
     -Wcpp \
     -Wdeprecated \
     -Wdeprecated-declarations \
+    -Wdisabled-optimization \
     -Wdiv-by-zero \
     -Wdouble-promotion \
+    -Wempty-body \
     -Wendif-labels \
+    -Wenum-compare \
     -Wextra \
     -Wformat-contains-nul \
     -Wformat-extra-args \
+    -Wformat-nonliteral \
+    -Wformat-security \
+    -Wformat-y2k \
     -Wformat-zero-length \
     -Wformat=2 \
+    -Wfree-nonheap-object \
+    -Wignored-qualifiers \
+    -Wimplicit \
+    -Wimplicit-function-declaration \
+    -Wimplicit-int \
+    -Winit-self \
+    -Winline \
+    -Wint-to-pointer-cast \
+    -Winvalid-memory-model \
+    -Winvalid-pch \
+    -Wjump-misses-init \
+    -Wlogical-op \
+    -Wmain \
+    -Wmaybe-uninitialized \
+    -Wmissing-braces \
+    -Wmissing-declarations \
+    -Wmissing-field-initializers \
+    -Wmissing-format-attribute \
+    -Wmissing-include-dirs \
+    -Wmissing-noreturn \
+    -Wmissing-parameter-type \
+    -Wmissing-prototypes \
+    -Wmudflap \
     -Wmultichar \
+    -Wnarrowing \
+    -Wnested-externs \
+    -Wnonnull \
     -Wnormalized=nfc \
+    -Wold-style-declaration \
+    -Wold-style-definition \
     -Woverflow \
+    -Woverlength-strings \
+    -Woverride-init \
+    -Wpacked \
+    -Wpacked-bitfield-compat \
+    -Wparentheses \
+    -Wpointer-arith \
+    -Wpointer-sign \
     -Wpointer-to-int-cast \
     -Wpragmas \
+    -Wreturn-type \
+    -Wsequence-point \
+    -Wshadow \
+    -Wsizeof-pointer-memaccess \
+    -Wstack-protector \
+    -Wstrict-aliasing \
+    -Wstrict-overflow \
+    -Wstrict-prototypes \
     -Wsuggest-attribute=const \
+    -Wsuggest-attribute=format \
     -Wsuggest-attribute=noreturn \
     -Wsuggest-attribute=pure \
+    -Wswitch \
+    -Wswitch-default \
+    -Wsync-nand \
+    -Wsystem-headers \
     -Wtrampolines \
+    -Wtrigraphs \
+    -Wtype-limits \
+    -Wuninitialized \
+    -Wunknown-pragmas \
+    -Wunreachable-code \
+    -Wunsafe-loop-optimizations \
+    -Wunused \
+    -Wunused-but-set-parameter \
+    -Wunused-but-set-variable \
+    -Wunused-function \
+    -Wunused-label \
+    -Wunused-local-typedefs \
+    -Wunused-macros \
+    -Wunused-parameter \
+    -Wunused-result \
+    -Wunused-value \
+    -Wunused-variable \
+    -Wvarargs \
+    -Wvariadic-macros \
+    -Wvector-operation-performance \
+    -Wvla \
+    -Wvolatile-register-var \
+    -Wwrite-strings \
+    \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index b424dce..0c288b8 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,4 +1,4 @@
-# multiarch.m4 serial 6
+# multiarch.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 # Determine whether the compiler is or may be producing universal binaries.
 #
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
 # executables that work on multiple system types--known as "fat" or
 # "universal" binaries--by specifying multiple '-arch' options to the
 # compiler but only a single '-arch' option to the preprocessor.  Like
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 08ef825..c2638df 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,4 +1,4 @@
-# nocrash.m4 serial 3
+# nocrash.m4 serial 4
 dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,7 @@ dnl          int main() { nocrash_init(); ... }
 AC_DEFUN([GL_NOCRASH],[[
 #include <stdlib.h>
 #if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X.  */
+/* Avoid a crash on Mac OS X.  */
 #include <mach/mach.h>
 #include <mach/mach_error.h>
 #include <mach/thread_status.h>
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index b03393b..5298dd6 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 41
+# stdio_h.m4 serial 42
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,9 @@ AC_DEFUN([gl_STDIO_H],
   dnl No need to create extra modules for these functions. Everyone who uses
   dnl <stdio.h> likely needs them.
   GNULIB_FSCANF=1
+  gl_MODULE_INDICATOR([fscanf])
   GNULIB_SCANF=1
+  gl_MODULE_INDICATOR([scanf])
   GNULIB_FGETC=1
   GNULIB_GETC=1
   GNULIB_GETCHAR=1
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index f45dee1..8af3353 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 27   -*- Autoconf -*-
+# sys_stat_h.m4 serial 28   -*- Autoconf -*-
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
 
-  dnl For the mkdir substitute.
-  AC_REQUIRE([AC_C_INLINE])
-
   dnl Check for broken stat macros.
   AC_REQUIRE([AC_HEADER_STAT])
 
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index b88da76..6415bfb 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
-# serial 6
+# serial 7
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 ])
 
-dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
+dnl Check whether 'struct timespec' is declared
 dnl in time.h, sys/time.h, or pthread.h.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 59c00d5..e2a0eb1 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -83,7 +83,7 @@
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
-   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @address@hidden  */
 #if @HAVE_SYS_TYPES_H@ && ! defined _AIX
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h
index 4935795..920b4d4 100644
--- a/gl/stdio-impl.h
+++ b/gl/stdio-impl.h
@@ -28,7 +28,7 @@
 
 #include <errno.h>                             /* For detecting Plan9.  */
 
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, 
DragonFly, MacOS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, 
DragonFly, Mac OS X, Cygwin */
 
 # if defined __DragonFly__          /* DragonFly */
   /* See 
<http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.
  */
@@ -66,7 +66,7 @@
       /* More fields, not relevant here.  */
     };
 #  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else                                         /* FreeBSD, NetBSD <= 1.5Z, 
DragonFly, MacOS X, Cygwin */
+# else                                         /* FreeBSD, NetBSD <= 1.5Z, 
DragonFly, Mac OS X, Cygwin */
 #  define fp_ub fp_->_ub
 # endif
 
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index b546133..1d67ec6 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -87,8 +87,8 @@ struct random_data
 #endif
 
 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined 
GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined 
__WIN32__) && ! defined __CYGWIN__)
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
-/* On MacOS X 10.5, only <unistd.h> declares mkstemps.  */
+/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
+/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
 /* But avoid namespace pollution on glibc systems and native Windows.  */
 # include <unistd.h>
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 9115486..e904e51 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1318,7 +1318,7 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
                                     _GL_ARG_NONNULL ((1)));
 # endif
-/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
    and FreeBSD 6.4 the second parameter is int.  On Solaris 11
    2011-10, the first parameter is not const.  */
 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
diff --git a/lib/element.c b/lib/element.c
index 8619a17..0d1b918 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -989,12 +989,13 @@ asn1_read_tag (ASN1_TYPE root, const char *name, int 
*tagValue,
  *
  * Since: 2.14
  **/
-asn1_retCode asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data)
+asn1_retCode
+asn1_read_node_value (ASN1_TYPE node, ASN1_DATA_NODE* data)
 {
   data->name = node->name;
   data->value = node->value;
   data->value_len = node->value_len;
   data->type = type_field(node->type);
-  
+
   return ASN1_SUCCESS;
 }
diff --git a/lib/gllib/stdint.in.h b/lib/gllib/stdint.in.h
index 3475dbe..4f61f95 100644
--- a/lib/gllib/stdint.in.h
+++ b/lib/gllib/stdint.in.h
@@ -83,7 +83,7 @@
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
-   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @address@hidden  */
 #if @HAVE_SYS_TYPES_H@ && ! defined _AIX
diff --git a/lib/glm4/extensions.m4 b/lib/glm4/extensions.m4
index 0bfaef6..6d17d8a 100644
--- a/lib/glm4/extensions.m4
+++ b/lib/glm4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 11  -*- Autoconf -*-
+# serial 12  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@@ -67,7 +67,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
-/* Enable general extensions on MacOS X.  */
+/* Enable general extensions on Mac OS X.  */
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
diff --git a/lib/glm4/gnulib-cache.m4 b/lib/glm4/gnulib-cache.m4
index d0e6acb..29475d4 100644
--- a/lib/glm4/gnulib-cache.m4
+++ b/lib/glm4/gnulib-cache.m4
@@ -49,5 +49,5 @@ gl_MAKEFILE_NAME([])
 gl_LIBTOOL
 gl_MACRO_PREFIX([lgl])
 gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
 gl_VC_FILES([false])
diff --git a/lib/glm4/gnulib-common.m4 b/lib/glm4/gnulib-common.m4
index d62b767..15d2b2b 100644
--- a/lib/glm4/gnulib-common.m4
+++ b/lib/glm4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 32
+# gnulib-common.m4 serial 33
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
    the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
    earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-   __APPLE__ && __MACH__ test for MacOS X.
+   __APPLE__ && __MACH__ test for Mac OS X.
    __APPLE_CC__ tests for the Apple compiler and its version.
    __STDC_VERSION__ tests for the C99 mode.  */
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined 
__cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
diff --git a/lib/glm4/gnulib-comp.m4 b/lib/glm4/gnulib-comp.m4
index b1d2854..ba837ae 100644
--- a/lib/glm4/gnulib-comp.m4
+++ b/lib/glm4/gnulib-comp.m4
@@ -67,18 +67,18 @@ AC_DEFUN([lgl_INIT],
   m4_pushdef([lgl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='lib/gllib'
-gl_LD_VERSION_SCRIPT
-gl_VISIBILITY
-gl_MULTIARCH
-gl_STDDEF_H
-gl_STDINT_H
-gl_HEADER_STRING_H
-gl_FUNC_STRVERSCMP
-if test $HAVE_STRVERSCMP = 0; then
-  AC_LIBOBJ([strverscmp])
-  gl_PREREQ_STRVERSCMP
-fi
-gl_STRING_MODULE_INDICATOR([strverscmp])
+  gl_LD_VERSION_SCRIPT
+  gl_VISIBILITY
+  gl_MULTIARCH
+  gl_STDDEF_H
+  gl_STDINT_H
+  gl_HEADER_STRING_H
+  gl_FUNC_STRVERSCMP
+  if test $HAVE_STRVERSCMP = 0; then
+    AC_LIBOBJ([strverscmp])
+    gl_PREREQ_STRVERSCMP
+  fi
+  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/lib/glm4/multiarch.m4 b/lib/glm4/multiarch.m4
index b424dce..0c288b8 100644
--- a/lib/glm4/multiarch.m4
+++ b/lib/glm4/multiarch.m4
@@ -1,4 +1,4 @@
-# multiarch.m4 serial 6
+# multiarch.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 # Determine whether the compiler is or may be producing universal binaries.
 #
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
 # executables that work on multiple system types--known as "fat" or
 # "universal" binaries--by specifying multiple '-arch' options to the
 # compiler but only a single '-arch' option to the preprocessor.  Like
diff --git a/lib/glm4/visibility.m4 b/lib/glm4/visibility.m4
index 7b24d39..a7d4d8c 100644
--- a/lib/glm4/visibility.m4
+++ b/lib/glm4/visibility.m4
@@ -1,4 +1,4 @@
-# visibility.m4 serial 4 (gettext-0.18.2)
+# visibility.m4 serial 5 (gettext-0.18.2)
 dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and
 dnl __attribute__((__visibility__("default"))).
 dnl Does *not* test for __visibility__("protected") - which has tricky
 dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
+dnl Mac OS X.
 dnl Does *not* test for __visibility__("internal") - which has processor
 dnl dependent semantics.
 dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
diff --git a/lib/libtasn1.map b/lib/libtasn1.map
index 83235ed..eb227d4 100644
--- a/lib/libtasn1.map
+++ b/lib/libtasn1.map
@@ -58,4 +58,3 @@ LIBTASN1_0_3
   local:
     *;
 };
-
diff --git a/maint.mk b/maint.mk
index 11cb6a6..5d63b49 100644
--- a/maint.mk
+++ b/maint.mk
@@ -61,7 +61,7 @@ endif
 # (i.e., with no $(srcdir) prefix), this definition is careful to
 # remove any $(srcdir) prefix, and to restore what it removes.
 _sc_excl = \
-  $(if $(exclude_file_name_regexp--$@),$(exclude_file_name_regexp--$@),^$$)
+  $(or $(exclude_file_name_regexp--$@),^$$)
 VC_LIST_EXCEPT = \
   $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
        | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
@@ -187,9 +187,11 @@ syntax-check: $(local-check)
 #
 #  in_vc_files | in_files
 #
-#     grep-E-style regexp denoting the files to check.  If no files
-#     are specified the default are all the files that are under
-#     version control.
+#     grep-E-style regexp selecting the files to check.  For in_vc_files,
+#     the regexp is used to select matching files from the list of all
+#     version-controlled files; for in_files, it's from the names printed
+#     by "find $(srcdir)".  When neither is specified, use all files that
+#     are under version control.
 #
 #  containing | non_containing
 #
@@ -261,7 +263,7 @@ define _sc_search_regexp
    : Filter by file name;                                              \
    if test -n "$$in_files"; then                                       \
      files=$$(find $(srcdir) | grep -E "$$in_files"                    \
-              | grep -Ev '$(exclude_file_name_regexp--$@)');           \
+              | grep -Ev '$(_sc_excl)');                               \
    else                                                                        
\
      files=$$($(VC_LIST_EXCEPT));                                      \
      if test -n "$$in_vc_files"; then                                  \
@@ -328,8 +330,8 @@ sc_prohibit_atoi_atof:
 sp_ = strcmp *\(.+\)
 sc_prohibit_strcmp:
        @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)'         \
-       exclude=':# *define STRN?EQ\('                                  \
-       halt='$(ME): replace strcmp calls above with STREQ/STRNEQ'      \
+       exclude='# *define STRN?EQ\('                                   \
+       halt='replace strcmp calls above with STREQ/STRNEQ'             \
          $(_sc_search_regexp)
 
 # Really.  You don't want to use this function.
@@ -351,8 +353,9 @@ sc_prohibit_strncpy:
 #  | xargs --no-run-if-empty \
 #      perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
 sc_prohibit_magic_number_exit:
-       @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,'     
\
-       halt='use EXIT_* values rather than magic number'                       
\
+       @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]'        \
+       exclude='exit \(77\)|error ?\(((0|77),|[^,]*)'                  \
+       halt='use EXIT_* values rather than magic number'               \
          $(_sc_search_regexp)
 
 # Using EXIT_SUCCESS as the first argument to error is misleading,
@@ -721,6 +724,7 @@ sc_require_test_exit_idiom:
 sc_trailing_blank:
        @prohibit='[     ]$$'                                           \
        halt='found trailing blank(s)'                                  \
+       exclude='^Binary file .* matches$$'                             \
          $(_sc_search_regexp)
 
 # Match lines like the following, but where there is only one space
@@ -741,7 +745,7 @@ _gl_translatable_diag_func_re ?= error
 sc_unmarked_diagnostics:
        @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
        exclude='(_|ngettext ?)\('                                      \
-       halt='$(ME): found unmarked diagnostic(s)'                      \
+       halt='found unmarked diagnostic(s)'                             \
          $(_sc_search_regexp)
 
 # Avoid useless parentheses like those in this example:
@@ -775,6 +779,11 @@ sc_prohibit_always_true_header_tests:
        '  with the corresponding gnulib module, they are always true') \
          $(_sc_search_regexp)
 
+sc_prohibit_defined_have_decl_tests:
+       @prohibit='#[    ]*if(n?def|.*\<defined)\>[      (]+HAVE_DECL_' \
+       halt='HAVE_DECL macros are always defined'                      \
+         $(_sc_search_regexp)
+
 # ==================================================================
 gl_other_headers_ ?= \
   intprops.h   \
@@ -1012,7 +1021,7 @@ sc_redundant_const:
 sc_const_long_option:
        @prohibit='^ *static.*struct option '                           \
        exclude='const struct option|struct option const'               \
-       halt='$(ME): add "const" to the above declarations'             \
+       halt='add "const" to the above declarations'                    \
          $(_sc_search_regexp)
 
 NEWS_hash =                                                            \
@@ -1059,7 +1068,7 @@ sc_makefile_at_at_check:
          && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
 
 news-check: NEWS
-       if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS              \
+       $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $<               \
            | grep -E $(news-check-regexp) >/dev/null; then             \
          :;                                                            \
        else                                                            \
@@ -1115,7 +1124,7 @@ sc_po_check:
 # Sometimes it is useful to change the PATH environment variable
 # in Makefiles.  When doing so, it's better not to use the Unix-centric
 # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
        @prohibit='PATH[=].*:'                                          \
        in_vc_files='akefile|\.mk$$'                                    \
@@ -1208,22 +1217,31 @@ sc_Wundef_boolean:
 # not be constant, or might overflow a stack.  In general, use PATH_MAX as
 # a limit, not an array or alloca size.
 sc_prohibit_path_max_allocation:
-       @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX'                 \
+       @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX'               \
        halt='Avoid stack allocations of size PATH_MAX'                 \
          $(_sc_search_regexp)
 
 sc_vulnerable_makefile_CVE-2009-4029:
        @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
-       in_files=$$(find $(srcdir) -name Makefile.in)                   \
+       in_files='(^|/)Makefile\.in$$'                                  \
        halt=$$(printf '%s\n'                                           \
          'the above files are vulnerable; beware of running'           \
          '  "make dist*" rules, and upgrade to fixed automake'         \
          '  see http://bugzilla.redhat.com/542609 for details')        \
          $(_sc_search_regexp)
 
+sc_vulnerable_makefile_CVE-2012-3386:
+       @prohibit='chmod a\+w \$$\(distdir\)'                           \
+       in_files='(^|/)Makefile\.in$$'                                  \
+       halt=$$(printf '%s\n'                                           \
+         'the above files are vulnerable; beware of running'           \
+         '  "make distcheck", and upgrade to fixed automake'           \
+         '  see http://bugzilla.redhat.com/CVE-2012-3386 for details') \
+         $(_sc_search_regexp)
+
 vc-diff-check:
-       (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
-       if test -s vc-diffs; then                               \
+       $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+       $(AM_V_at)if test -s vc-diffs; then                     \
          cat vc-diffs;                                         \
          echo "Some files are locally modified:" 1>&2;         \
          exit 1;                                               \
@@ -1239,10 +1257,11 @@ bootstrap-tools ?= autoconf,automake,gnulib
 
 # If it's not already specified, derive the GPG key ID from
 # the signed tag we've just applied to mark this release.
-gpg_key_ID ?= \
-  $$(git cat-file tag v$(VERSION) \
-     | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
-     | awk '/^\[GNUPG:\] ERRSIG / {print $3; exit}')
+gpg_key_ID ?=                                                          \
+  $$(cd $(srcdir)                                                      \
+     && git cat-file tag v$(VERSION)                                   \
+        | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null       \
+        | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
 
 translation_project_ ?= address@hidden
 
@@ -1261,13 +1280,14 @@ else
 endif
 
 announcement: NEWS ChangeLog $(rel-files)
-       @$(srcdir)/$(_build-aux)/announce-gen                           \
+       $(AM_V_GEN)$(srcdir)/$(_build-aux)/announce-gen                 \
            --mail-headers='$(announcement_mail_headers_)'              \
            --release-type=$(RELEASE_TYPE)                              \
            --package=$(PACKAGE)                                        \
            --prev=$(PREV_VERSION)                                      \
            --curr=$(VERSION)                                           \
            --gpg-key-id=$(gpg_key_ID)                                  \
+           --srcdir=$(srcdir)                                          \
            --news=$(srcdir)/NEWS                                       \
            --bootstrap-tools=$(bootstrap-tools)                        \
            $$(case ,$(bootstrap-tools), in (*,gnulib,*)                \
@@ -1275,6 +1295,12 @@ announcement: NEWS ChangeLog $(rel-files)
            --no-print-checksums                                        \
            $(addprefix --url-dir=, $(url_dir_list))
 
+.PHONY: release-commit
+release-commit:
+       $(AM_V_GEN)cd $(srcdir)                         \
+         && $(_build-aux)/do-release-commit-and-tag    \
+              -C $(abs_builddir) $(RELEASE)
+
 ## ---------------- ##
 ## Updating files.  ##
 ## ---------------- ##
@@ -1302,7 +1328,7 @@ endef
 
 .PHONY: no-submodule-changes
 no-submodule-changes:
-       if test -d $(srcdir)/.git; then                                 \
+       $(AM_V_GEN)if test -d $(srcdir)/.git; then                      \
          diff=$$(cd $(srcdir) && git submodule -q foreach              \
                  git diff-index --name-only HEAD)                      \
            || exit 1;                                                  \
@@ -1341,16 +1367,16 @@ check: $(gl_public_submodule_commit)
 .PHONY: alpha beta stable
 ALL_RECURSIVE_TARGETS += alpha beta stable
 alpha beta stable: $(local-check) writable-files $(submodule-checks)
-       test $@ = stable                                                \
+       $(AM_V_GEN)test $@ = stable                                     \
          && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$'         \
               || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
          || :
-       $(MAKE) vc-diff-check
-       $(MAKE) news-check
-       $(MAKE) distcheck
-       $(MAKE) dist
-       $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
-       $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+       $(AM_V_at)$(MAKE) vc-diff-check
+       $(AM_V_at)$(MAKE) news-check
+       $(AM_V_at)$(MAKE) distcheck
+       $(AM_V_at)$(MAKE) dist
+       $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+       $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
 
 # Override this in cfg.mk if you follow different procedures.
 release-prep-hook ?= release-prep
@@ -1358,19 +1384,21 @@ release-prep-hook ?= release-prep
 gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
 .PHONY: release-prep
 release-prep:
-       case $$RELEASE_TYPE in alpha|beta|stable) ;; \
+       $(AM_V_GEN)case $$RELEASE_TYPE in alpha|beta|stable) ;; \
          *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
-       $(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir)
-       if test -d $(release_archive_dir); then                 \
+       $(AM_V_at)$(MAKE) --no-print-directory -s announcement \
+         > ~/announce-$(my_distdir)
+       $(AM_V_at)if test -d $(release_archive_dir); then       \
          ln $(rel-files) $(release_archive_dir);               \
          chmod a-w $(rel-files);                               \
        fi
-       echo $(VERSION) > $(prev_version_file)
-       $(MAKE) update-NEWS-hash
-       perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
-       $(emit-commit-log) > .ci-msg
-       $(VC) commit -F .ci-msg -a
-       rm .ci-msg
+       $(AM_V_at)echo $(VERSION) > $(prev_version_file)
+       $(AM_V_at)$(MAKE) update-NEWS-hash
+       $(AM_V_at)perl -pi                                              \
+         -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"'        \
+         $(srcdir)/NEWS
+       $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1;         \
+       cd $(srcdir) && $(VC) commit -m "$$msg" -a
 
 # Override this with e.g., -s $(srcdir)/some_other_name.texi
 # if the default $(PACKAGE)-derived name doesn't apply.
@@ -1378,14 +1406,20 @@ gendocs_options_ ?=
 
 .PHONY: web-manual
 web-manual:
-       @test -z "$(manual_title)" \
+       $(AM_V_GEN)test -z "$(manual_title)" \
          && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
-       @cd '$(srcdir)/doc'; \
+       $(AM_V_at)cd '$(srcdir)/doc'; \
          $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
             -o '$(abs_builddir)/doc/manual' \
             --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
            "$(PACKAGE_NAME) - $(manual_title)"
-       @echo " *** Upload the doc/manual directory to web-cvs."
+       $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
+
+.PHONY: web-manual-update
+web-manual-update:
+       $(AM_V_GEN)cd $(srcdir) \
+         && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+
 
 # Code Coverage
 
@@ -1411,6 +1445,31 @@ gen-coverage:
 
 coverage: init-coverage build-coverage gen-coverage
 
+# Some projects carry local adjustments for gnulib modules via patches in
+# a gnulib patch directory whose default name is gl/ (defined in bootstrap
+# via local_gl_dir=gl).  Those patches become stale as the originals evolve
+# in gnulib.  Use this rule to refresh any stale patches.  It applies each
+# patch to the original in $(gnulib_dir) and uses the temporary result to
+# generate a fuzz-free .diff file.  If you customize the name of your local
+# gnulib patch directory via bootstrap.conf, this rule detects that name.
+# Run this from a non-VPATH (i.e., srcdir) build directory.
+.PHONY: refresh-gnulib-patches
+refresh-gnulib-patches:
+       gl=gl;                                                          \
+       if test -f bootstrap.conf; then                                 \
+         t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;'        \
+              -e 'END{defined $$d and print $$d}' bootstrap.conf);     \
+         test -n "$$t" && gl=$$t;                                      \
+       fi;                                                             \
+       for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do     \
+         b=$$(printf %s "$$diff"|sed 's/\.diff$$//');                  \
+         VERSION_CONTROL=none                                          \
+           patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1;          \
+         ( cd $(gnulib_dir) || exit 1;                                 \
+           git diff "$$b" > "../$$gl/$$diff";                          \
+           git checkout $$b ) || exit 1;                               \
+       done
+
 # Update gettext files.
 PACKAGE ?= $(shell basename $(PWD))
 PO_DOMAIN ?= $(PACKAGE)
@@ -1444,7 +1503,7 @@ update-copyright-env ?=
 # in the file .x-update-copyright.
 .PHONY: update-copyright
 update-copyright:
-       grep -l -w Copyright                                             \
+       $(AM_V_GEN)grep -l -w Copyright                                  \
          $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
          | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
 
@@ -1517,6 +1576,7 @@ _gl_TS_obj_files ?= *.$(OBJEXT)
 # Files in which to search for the one-line style extern declarations.
 # $(_gl_TS_dir)-relative.
 _gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
 
 .PHONY: _gl_tight_scope
 _gl_tight_scope: $(bin_PROGRAMS)
@@ -1539,7 +1599,8 @@ _gl_tight_scope: $(bin_PROGRAMS)
          && { echo the above functions should have static scope >&2;   \
               exit 1; } || : ;                                         \
        ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);       \
-         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"'           \
+               $$hdr $(_gl_TS_other_headers)                           \
        ) | sort -u > $$t;                                              \
        nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'          \
             | sort -u | grep -Ev -f $$t                                        
\


hooks/post-receive
-- 
GNU libtasn1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]