gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, master, updated. gnutls_3_1_2-33-g3cc4ba2


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_2-33-g3cc4ba2
Date: Tue, 02 Oct 2012 18:35:05 +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 gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=3cc4ba2845a42dddd444795d36056aaf270f2980

The branch, master has been updated
       via  3cc4ba2845a42dddd444795d36056aaf270f2980 (commit)
       via  ebaccbc79f699e064e3474b9f4a2965eb4620ecc (commit)
       via  8cc987bea13ed1ed8efc90572a711fbc84512687 (commit)
       via  064f9fe191932be96ecfc79fa5accf1eb25142ef (commit)
       via  9cd70cbfc4cfc015c10d38b2e356d286b40be416 (commit)
      from  5a9b47c3365cd07189e7449e9bb91a4e3bacc62e (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 3cc4ba2845a42dddd444795d36056aaf270f2980
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Oct 2 20:31:39 2012 +0200

    changed generation of manpages.

commit ebaccbc79f699e064e3474b9f4a2965eb4620ecc
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Oct 2 20:15:04 2012 +0200

    upload -> upload-tarballs

commit 8cc987bea13ed1ed8efc90572a711fbc84512687
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Oct 2 20:13:18 2012 +0200

    Use hash-pjw-bare instead of asn1_bhash().

commit 064f9fe191932be96ecfc79fa5accf1eb25142ef
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Oct 2 20:02:44 2012 +0200

    Updated gnulib and added hash-pjw-bare

commit 9cd70cbfc4cfc015c10d38b2e356d286b40be416
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Oct 2 19:28:42 2012 +0200

    Added test to verify that callbacks are being actually called.

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

Summary of changes:
 .gitignore                                         |    2 +
 build-aux/config.rpath                             |  106 +-
 build-aux/gendocs.sh                               |   35 +-
 cfg.mk                                             |   10 +-
 doc/manpages/Makefile.am                           |   15 +-
 gl/Makefile.am                                     |   14 +-
 gl/base64.h                                        |    8 +
 gl/getpass.h                                       |    2 +-
 gl/hash-pjw-bare.c                                 |   42 +
 .../snippet/arg-nonnull.h => gl/hash-pjw-bare.h    |   22 +-
 gl/m4/eealloc.m4                                   |    3 +-
 gl/m4/extern-inline.m4                             |   57 +
 gl/m4/fcntl-o.m4                                   |   13 +-
 gl/m4/gnulib-cache.m4                              |    5 +-
 gl/m4/gnulib-comp.m4                               | 1221 ++++++++++----------
 gl/m4/lib-ld.m4                                    |   58 +-
 gl/m4/manywarnings.m4                              |  185 ++--
 gl/m4/timer_time.m4                                |    4 +-
 gl/m4/timespec.m4                                  |    8 +-
 gl/m4/xsize.m4                                     |    3 +-
 gl/stdbool.in.h                                    |   51 +-
 gl/sys_select.in.h                                 |    2 +-
 gl/tests/Makefile.am                               |    2 +-
 gl/tests/binary-io.c                               |    3 +
 gl/tests/binary-io.h                               |   11 +-
 gl/tests/ioctl.c                                   |    2 -
 gl/tests/malloca.h                                 |    2 +-
 gl/tests/test-select.h                             |    6 +-
 gl/timespec.c                                      |    3 +
 gl/timespec.h                                      |   13 +-
 gl/u64.c                                           |    3 +
 gl/u64.h                                           |   27 +-
 gl/verify.h                                        |    6 +-
 gl/xsize.c                                         |    3 +
 gl/xsize.h                                         |   17 +-
 lib/Makefile.am                                    |    4 +-
 lib/hash.c                                         |  234 ----
 lib/hash.h                                         |   24 -
 lib/minitasn1/hash.c                               |  235 ----
 lib/minitasn1/int.h                                |    1 -
 lib/minitasn1/parser_aux.c                         |   15 +-
 lib/verify-tofu.c                                  |    1 -
 lib/x509/ocsp.c                                    |    1 -
 lib/x509/verify-high.c                             |   21 +-
 lib/x509/verify-high2.c                            |    1 -
 maint.mk                                           |  243 +++--
 tests/Makefile.am                                  |    2 +-
 tests/{mini-x509.c => mini-x509-callbacks.c}       |   44 +-
 48 files changed, 1335 insertions(+), 1455 deletions(-)
 create mode 100644 gl/hash-pjw-bare.c
 copy build-aux/snippet/arg-nonnull.h => gl/hash-pjw-bare.h (53%)
 create mode 100644 gl/m4/extern-inline.m4
 create mode 100644 gl/tests/binary-io.c
 create mode 100644 gl/timespec.c
 create mode 100644 gl/u64.c
 create mode 100644 gl/xsize.c
 delete mode 100644 lib/hash.c
 delete mode 100644 lib/hash.h
 delete mode 100644 lib/minitasn1/hash.c
 copy tests/{mini-x509.c => mini-x509-callbacks.c} (85%)

diff --git a/.gitignore b/.gitignore
index e74a620..36c5151 100644
--- a/.gitignore
+++ b/.gitignore
@@ -592,3 +592,5 @@ win64
 tests/chainverify-unsorted
 tests/mini-dtls-heartbeat
 tests/mini-handshake-timeout
+tests/mini-x509-callbacks
+doc/manpages/stamp_mans
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 17298f2..1a07018 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2010 Free Software Foundation, Inc.
+#   Copyright 1996-2012 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <address@hidden>, 1996
 #
@@ -25,7 +25,7 @@
 #   known workaround is to choose shorter directory names for the build
 #   directory and/or the installation directory.
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 shrext=.so
@@ -57,13 +57,6 @@ else
     aix*)
       wl='-Wl,'
       ;;
-    darwin*)
-      case $cc_basename in
-        xlc*)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       ;;
     hpux9* | hpux10* | hpux11*)
@@ -72,9 +65,7 @@ else
     irix5* | irix6* | nonstopux*)
       wl='-Wl,'
       ;;
-    newsos6)
-      ;;
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
         ecc*)
           wl='-Wl,'
@@ -85,17 +76,26 @@ else
         lf95*)
           wl='-Wl,'
           ;;
-        pgcc | pgf77 | pgf90)
+        nagfor*)
+          wl='-Wl,-Wl,,'
+          ;;
+        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
           wl='-Wl,'
           ;;
         ccc*)
           wl='-Wl,'
           ;;
+        xl* | bgxl* | bgf* | mpixl*)
+          wl='-Wl,'
+          ;;
         como)
           wl='-lopt='
           ;;
         *)
           case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ F* | *Sun*Fortran*)
+              wl=
+              ;;
             *Sun\ C*)
               wl='-Wl,'
               ;;
@@ -103,13 +103,24 @@ else
           ;;
       esac
       ;;
+    newsos6)
+      ;;
+    *nto* | *qnx*)
+      ;;
     osf3* | osf4* | osf5*)
       wl='-Wl,'
       ;;
     rdos*)
       ;;
     solaris*)
-      wl='-Wl,'
+      case $cc_basename in
+        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+          wl='-Qoption ld '
+          ;;
+        *)
+          wl='-Wl,'
+          ;;
+      esac
       ;;
     sunos4*)
       wl='-Qoption ld '
@@ -171,15 +182,14 @@ if test "$with_gnu_ld" = yes; then
       fi
       ;;
     amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # Samuel A. Falvo II <address@hidden> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we cannot use
-      # them.
-      ld_shlibs=no
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
       ;;
     beos*)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
@@ -198,11 +208,13 @@ if test "$with_gnu_ld" = yes; then
         ld_shlibs=no
       fi
       ;;
+    haiku*)
+      ;;
     interix[3-9]*)
       hardcode_direct=no
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       ;;
-    gnu* | linux* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         :
       else
@@ -325,10 +337,14 @@ else
       fi
       ;;
     amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
+      case "$host_cpu" in
+        powerpc)
+          ;;
+        m68k)
+          hardcode_libdir_flag_spec='-L$libdir'
+          hardcode_minus_L=yes
+          ;;
+      esac
       ;;
     bsdi[45]*)
       ;;
@@ -342,24 +358,15 @@ else
       ;;
     darwin* | rhapsody*)
       hardcode_direct=no
-      if test "$GCC" = yes ; then
+      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; 
then
         :
       else
-        case $cc_basename in
-          xlc*)
-            ;;
-          *)
-            ld_shlibs=no
-            ;;
-        esac
+        ld_shlibs=no
       fi
       ;;
     dgux*)
       hardcode_libdir_flag_spec='-L$libdir'
       ;;
-    freebsd1*)
-      ld_shlibs=no
-      ;;
     freebsd2.2*)
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
@@ -420,6 +427,8 @@ else
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
       ;;
+    *nto* | *qnx*)
+      ;;
     openbsd*)
       if test -f /usr/libexec/ld.so; then
         hardcode_direct=yes
@@ -515,7 +524,12 @@ case "$host_os" in
     library_names_spec='$libname$shrext'
     ;;
   amigaos*)
-    library_names_spec='$libname.a'
+    case "$host_cpu" in
+      powerpc*)
+        library_names_spec='$libname$shrext' ;;
+      m68k)
+        library_names_spec='$libname.a' ;;
+    esac
     ;;
   beos*)
     library_names_spec='$libname$shrext'
@@ -534,8 +548,6 @@ case "$host_os" in
   dgux*)
     library_names_spec='$libname$shrext'
     ;;
-  freebsd1*)
-    ;;
   freebsd* | dragonfly*)
     case "$host_os" in
       freebsd[123]*)
@@ -547,6 +559,9 @@ case "$host_os" in
   gnu*)
     library_names_spec='$libname$shrext'
     ;;
+  haiku*)
+    library_names_spec='$libname$shrext'
+    ;;
   hpux9* | hpux10* | hpux11*)
     case $host_cpu in
       ia64*)
@@ -582,7 +597,7 @@ case "$host_os" in
     ;;
   linux*oldld* | linux*aout* | linux*coff*)
     ;;
-  linux* | k*bsd*-gnu)
+  linux* | k*bsd*-gnu | kopensolaris*-gnu)
     library_names_spec='$libname$shrext'
     ;;
   knetbsd*-gnu)
@@ -594,7 +609,7 @@ case "$host_os" in
   newsos6)
     library_names_spec='$libname$shrext'
     ;;
-  nto-qnx*)
+  *nto* | *qnx*)
     library_names_spec='$libname$shrext'
     ;;
   openbsd*)
@@ -625,6 +640,9 @@ case "$host_os" in
   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
     library_names_spec='$libname$shrext'
     ;;
+  tpf*)
+    library_names_spec='$libname$shrext'
+    ;;
   uts4*)
     library_names_spec='$libname$shrext'
     ;;
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/cfg.mk b/cfg.mk
index a84f772..5fbb5cf 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -131,13 +131,13 @@ prepare:
        git commit -m Generated. ChangeLog
        git tag -u b565716f! -m $(VERSION) $(tag)
 
-upload:
+upload-tarballs:
        git push
        git push --tags
-       build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.bz2
-       scp $(distdir).tar.bz2 $(distdir).tar.bz2.sig 
igloo.linux.gr:~ftp/pub/gnutls/devel/
-       ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/devel/ && sha1sum *.tar.bz2 > 
CHECKSUMS'
-       cp $(distdir).tar.bz2 $(distdir).tar.bz2.sig ../releases/$(PACKAGE)/
+       build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.xz
+       build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.lz
+       cp $(distdir).tar.xz $(distdir).tar.xz.sig ../releases/$(PACKAGE)/
+       cp $(distdir).tar.lz $(distdir).tar.lz.sig ../releases/$(PACKAGE)/
 
 
 web:
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index 7a9979d..fdf3587 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -26,6 +26,13 @@ if ENABLE_SRP
 dist_man_MANS += srptool.1
 endif
 
+HEADER_FILES = $(top_srcdir)/lib/includes/gnutls/gnutls.h.in \
+       $(top_srcdir)/lib/includes/gnutls/x509.h 
$(top_srcdir)/lib/includes/gnutls/openpgp.h \
+       $(top_srcdir)/lib/includes/gnutls/pkcs12.h 
$(top_srcdir)/lib/includes/gnutls/pkcs11.h \
+       $(top_srcdir)/lib/includes/gnutls/abstract.h 
$(top_srcdir)/lib/includes/gnutls/compat.h \
+       $(top_srcdir)/lib/includes/gnutls/dtls.h 
$(top_srcdir)/lib/includes/gnutls/crypto.h \
+       $(top_srcdir)/lib/includes/gnutls/ocsp.h 
$(top_srcdir)/lib/includes/gnutls/tpm.h
+
 # Note that our .def files depend on autogen
 # supporting the @subheading texi keyword. This
 # is not currently the case so we do remove it
@@ -844,8 +851,7 @@ APIMANS += gnutls_x509_trust_list_verify_named_crt.3
 
 dist_man_MANS += $(APIMANS)
 
-$(APIMANS):
-       make doit
+$(APIMANS): stamp_mans
 
 compare-makefile:
        FUNCS=`cat $(top_srcdir)/lib/includes/gnutls/*.h | 
$(top_srcdir)/doc/scripts/getfuncs.pl|sort`; \
@@ -857,7 +863,7 @@ compare-makefile:
                perl -p -e "s/^APIMANS =/APIMANS =$$MANS/" > tmp-$@; \
        diff -u $(srcdir)/Makefile.am tmp-$@
 
-doit:
+stamp_mans: $(HEADER_FILES)
        @echo -n "Creating man pages for gnutls.h..." && \
        for i in `$(top_srcdir)/doc/scripts/getfuncs.pl 
<$(top_srcdir)/lib/includes/gnutls/gnutls.h.in`; do \
                $(top_srcdir)/doc/scripts/gdoc -man \
@@ -1012,5 +1018,6 @@ doit:
                echo -n "."; \
        done
        @echo ""
+       echo $@ > $@
 
-.PHONY: update-makefile doit
+.PHONY: update-makefile
diff --git a/gl/Makefile.am b/gl/Makefile.am
index eb6b6bd..a277b6f 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests 
--avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind 
byteswap c-ctype close connect error extensions func gendocs getaddrinfo 
getpass getsubopt gettext gettime havelib inet_ntop inet_pton lib-msvc-compat 
lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple 
minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir 
select send sendto servent setsockopt shutdown snprintf socket sockets socklen 
stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r 
timer-time timespec u64 unistd valgrind-tests vasprintf version-etc 
version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests 
--avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind 
byteswap c-ctype close connect error extensions func gendocs getaddrinfo 
getpass getsubopt gettext gettime hash-pjw-bare havelib inet_ntop inet_pton 
lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings 
memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv 
recvfrom scandir select send sendto servent setsockopt shutdown snprintf socket 
sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat 
time_r timer-time timespec u64 unistd valgrind-tests vasprintf version-etc 
version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
 
 AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
 
@@ -591,12 +591,18 @@ EXTRA_libgnu_la_SOURCES += gettimeofday.c
 
 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
 
 ## end   gnulib module gnumakefile
 
+## begin gnulib module hash-pjw-bare
+
+libgnu_la_SOURCES += hash-pjw-bare.h hash-pjw-bare.c
+
+## end   gnulib module hash-pjw-bare
+
 ## begin gnulib module havelib
 
 
@@ -2333,6 +2339,7 @@ EXTRA_libgnu_la_SOURCES += time_r.c
 
 ## begin gnulib module timespec
 
+libgnu_la_SOURCES += timespec.c
 
 EXTRA_DIST += timespec.h
 
@@ -2340,6 +2347,7 @@ EXTRA_DIST += timespec.h
 
 ## begin gnulib module u64
 
+libgnu_la_SOURCES += u64.c
 
 EXTRA_DIST += u64.h
 
@@ -2696,7 +2704,7 @@ EXTRA_DIST += wchar.in.h
 
 ## begin gnulib module xsize
 
-libgnu_la_SOURCES += xsize.h
+libgnu_la_SOURCES += xsize.h xsize.c
 
 ## end   gnulib module xsize
 
diff --git a/gl/base64.h b/gl/base64.h
index dc6f2a4..b7e155c 100644
--- a/gl/base64.h
+++ b/gl/base64.h
@@ -24,6 +24,10 @@
 /* Get bool. */
 # include <stdbool.h>
 
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 /* This uses that the expression (n+(k-1))/k means the smallest
    integer >= n/k, i.e., the ceiling of n/k.  */
 # define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
@@ -57,4 +61,8 @@ extern bool base64_decode_alloc_ctx (struct 
base64_decode_context *ctx,
 #define base64_decode_alloc(in, inlen, out, outlen) \
         base64_decode_alloc_ctx (NULL, in, inlen, out, outlen)
 
+# ifdef __cplusplus
+}
+# endif
+
 #endif /* BASE64_H */
diff --git a/gl/getpass.h b/gl/getpass.h
index 4eabf9d..afe6d2d 100644
--- a/gl/getpass.h
+++ b/gl/getpass.h
@@ -21,7 +21,7 @@
 /* Get getpass declaration, if available.  */
 # include <unistd.h>
 
-# if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS
+# if !HAVE_DECL_GETPASS
 /* Read a password of arbitrary length from /dev/tty or stdin.  */
 char *getpass (const char *prompt);
 
diff --git a/gl/hash-pjw-bare.c b/gl/hash-pjw-bare.c
new file mode 100644
index 0000000..a83cfac
--- /dev/null
+++ b/gl/hash-pjw-bare.c
@@ -0,0 +1,42 @@
+/* hash-pjw-bare.c -- compute a hash value from a provided buffer.
+
+   Copyright (C) 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 the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include "hash-pjw-bare.h"
+
+#include <limits.h>
+
+#define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* Return a hash of the N bytes of X using the method described by
+   Bruno Haible in http://www.haible.de/bruno/hashfunc.html.
+   Note that while many hash functions reduce their result via modulo
+   to a 0..table_size-1 range, this function does not do that.  */
+
+size_t
+hash_pjw_bare (const void *x, size_t n)
+{
+  const unsigned char *s = x;
+  size_t h = 0;
+  unsigned i;
+
+  for (i = 0; i < n; i++)
+    h = s[i] + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+  return h;
+}
diff --git a/build-aux/snippet/arg-nonnull.h b/gl/hash-pjw-bare.h
similarity index 53%
copy from build-aux/snippet/arg-nonnull.h
copy to gl/hash-pjw-bare.h
index 3a9dd26..5adbc64 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/gl/hash-pjw-bare.h
@@ -1,5 +1,5 @@
-/* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+/* hash-pjw-bare.h -- declaration for a simple hash function
+   Copyright (C) 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
@@ -14,13 +14,11 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
-   that the values passed as arguments n, ..., m must be non-NULL pointers.
-   n = 1 stands for the first argument, n = 2 for the second argument etc.  */
-#ifndef _GL_ARG_NONNULL
-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
-#  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
-# else
-#  define _GL_ARG_NONNULL(params)
-# endif
-#endif
+#include <stddef.h>
+
+/* Compute a hash code for a buffer starting at X and of size N,
+   and return the hash code.  Note that unlike hash_pjw(), it does not
+   return it modulo a table size.
+   The result is platform dependent: it depends on the size of the 'size_t'
+   type and on the signedness of the 'char' type.  */
+extern size_t hash_pjw_bare (const void *x, size_t n) _GL_ATTRIBUTE_PURE;
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index 75f17e2..9e5df45 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,4 +1,4 @@
-# eealloc.m4 serial 2
+# eealloc.m4 serial 3
 dnl Copyright (C) 2003, 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,
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
 [
   AC_REQUIRE([gl_EEMALLOC])
   AC_REQUIRE([gl_EEREALLOC])
-  AC_REQUIRE([AC_C_INLINE])
 ])
 
 AC_DEFUN([gl_EEMALLOC],
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
new file mode 100644
index 0000000..600c8d3
--- /dev/null
+++ b/gl/m4/extern-inline.m4
@@ -0,0 +1,57 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AH_VERBATIM([extern_inline],
+[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
+   _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
+   _GL_INLINE_HEADER_BEGIN contains useful stuff to put
+     in an include file, before uses of _GL_INLINE.
+     It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
+     when FOO is an inline function in the header; see
+     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
+   _GL_INLINE_HEADER_END contains useful stuff to put
+     in the same include file, after uses of _GL_INLINE.  */
+#if (__GNUC__ \
+     ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+     : 199901L <= __STDC_VERSION__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# if __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static inline
+# define _GL_EXTERN_INLINE static inline
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 9862741..740e78b 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
             #if HAVE_SYMLINK
             {
               static char const sym[] = "conftest.sym";
-              if (symlink (".", sym) != 0)
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
                 result |= 2;
               else
                 {
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index ee3d1b6..04f3d46 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests 
--aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests 
--avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close 
connect error extensions func gendocs getaddrinfo getpass getsubopt gettext 
gettime havelib inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen 
maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in 
pmccabe2html progname read-file recv recvfrom scandir select send sendto 
servent setsockopt shutdown snprintf socket sockets socklen stdint strcase 
strndup strtok_r strverscmp sys_socket sys_stat time_r timer-time timespec u64 
unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix 
vprintf-posix vsnprintf warnings
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests 
--aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests 
--avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close 
connect error extensions func gendocs getaddrinfo getpass getsubopt gettext 
gettime hash-pjw-bare havelib inet_ntop inet_pton lib-msvc-compat 
lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple 
minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir 
select send sendto servent setsockopt shutdown snprintf socket sockets socklen 
stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r 
timer-time timespec u64 unistd valgrind-tests vasprintf version-etc 
version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -51,6 +51,7 @@ gl_MODULES([
   getsubopt
   gettext
   gettime
+  hash-pjw-bare
   havelib
   inet_ntop
   inet_pton
@@ -112,5 +113,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-comp.m4 b/gl/m4/gnulib-comp.m4
index aad1024..9b61562 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -79,6 +79,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module error:
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  # Code from module extern-inline:
   # Code from module fcntl-h:
   # Code from module fcntl-h-tests:
   # Code from module fd-hook:
@@ -139,6 +140,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module gettimeofday:
   # Code from module gettimeofday-tests:
   # Code from module gnumakefile:
+  # Code from module hash-pjw-bare:
   # Code from module havelib:
   # Code from module hostent:
   # Code from module ignore-value:
@@ -365,484 +367,484 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='gl'
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([accept])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([accept])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([accept])
 changequote(,)dnl
 LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
 changequote([, ])dnl
 AC_SUBST([LTALLOCA])
-gl_FUNC_ALLOCA
-gl_FUNC_ALPHASORT
-if test $HAVE_ALPHASORT = 0; then
-  AC_LIBOBJ([alphasort])
-  gl_PREREQ_ALPHASORT
-fi
-gl_DIRENT_MODULE_INDICATOR([alphasort])
-gl_ARGP
-m4_ifdef([AM_XGETTEXT_OPTION],
-  [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
-   AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
-gl_HEADER_ARPA_INET
-AC_PROG_MKDIR_P
-gl_FUNC_BASE64
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([bind])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([bind])
-gl_BYTESWAP
-gl_CLOCK_TIME
-gl_FUNC_CLOSE
-if test $REPLACE_CLOSE = 1; then
-  AC_LIBOBJ([close])
-fi
-gl_UNISTD_MODULE_INDICATOR([close])
-gl_FUNC_CLOSEDIR
-if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
-  AC_LIBOBJ([closedir])
-fi
-gl_DIRENT_MODULE_INDICATOR([closedir])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([connect])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([connect])
-gl_DIRENT_H
-gl_DIRNAME_LGPL
-gl_DOUBLE_SLASH_ROOT
-gl_HEADER_ERRNO_H
-gl_ERROR
-if test $ac_cv_lib_error_at_line = no; then
-  AC_LIBOBJ([error])
-  gl_PREREQ_ERROR
-fi
-m4_ifdef([AM_XGETTEXT_OPTION],
-  [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
-   AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
-gl_FLOAT_H
-if test $REPLACE_FLOAT_LDBL = 1; then
-  AC_LIBOBJ([float])
-fi
-if test $REPLACE_ITOLD = 1; then
-  AC_LIBOBJ([itold])
-fi
-gl_FUNC_FREXP_NO_LIBM
-if test $gl_func_frexp_no_libm != yes; then
-  AC_LIBOBJ([frexp])
-fi
-gl_MATH_MODULE_INDICATOR([frexp])
-gl_FUNC_FREXPL_NO_LIBM
-if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
-  AC_LIBOBJ([frexpl])
-fi
-gl_MATH_MODULE_INDICATOR([frexpl])
-gl_FUNC_FSEEK
-if test $REPLACE_FSEEK = 1; then
-  AC_LIBOBJ([fseek])
-fi
-gl_STDIO_MODULE_INDICATOR([fseek])
-gl_FUNC_FSEEKO
-if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
-  AC_LIBOBJ([fseeko])
-  gl_PREREQ_FSEEKO
-fi
-gl_STDIO_MODULE_INDICATOR([fseeko])
-gl_FUNC_FSETERR
-if test $ac_cv_func___fseterr = no; then
-  AC_LIBOBJ([fseterr])
-fi
-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
-gl_GETADDRINFO
-if test $HAVE_GETADDRINFO = 0; then
-  AC_LIBOBJ([getaddrinfo])
-fi
-if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
-  AC_LIBOBJ([gai_strerror])
-fi
-gl_NETDB_MODULE_INDICATOR([getaddrinfo])
-gl_FUNC_GETDELIM
-if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
-  AC_LIBOBJ([getdelim])
-  gl_PREREQ_GETDELIM
-fi
-gl_STDIO_MODULE_INDICATOR([getdelim])
-gl_FUNC_GETLINE
-if test $REPLACE_GETLINE = 1; then
-  AC_LIBOBJ([getline])
-  gl_PREREQ_GETLINE
-fi
-gl_STDIO_MODULE_INDICATOR([getline])
-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])
-gl_FUNC_GETPASS
-if test $HAVE_GETPASS = 0; then
-  AC_LIBOBJ([getpass])
-  gl_PREREQ_GETPASS
-fi
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([getpeername])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
-gl_FUNC_GETSUBOPT
-if test $HAVE_GETSUBOPT = 0; then
-  AC_LIBOBJ([getsubopt])
-  gl_PREREQ_GETSUBOPT
-fi
-gl_STDLIB_MODULE_INDICATOR([getsubopt])
-dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
-AM_GNU_GETTEXT_VERSION([0.18.1])
-AC_SUBST([LIBINTL])
-AC_SUBST([LTLIBINTL])
-gl_GETTIME
-gl_FUNC_GETTIMEOFDAY
-if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
-  AC_LIBOBJ([gettimeofday])
-  gl_PREREQ_GETTIMEOFDAY
-fi
-gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
-# 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_HOSTENT
-gl_FUNC_INET_NTOP
-if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
-  AC_LIBOBJ([inet_ntop])
-  gl_PREREQ_INET_NTOP
-fi
-gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
-gl_FUNC_INET_PTON
-if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
-  AC_LIBOBJ([inet_pton])
-  gl_PREREQ_INET_PTON
-fi
-gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
-gl_FUNC_ISNAND_NO_LIBM
-if test $gl_func_isnand_no_libm != yes; then
-  AC_LIBOBJ([isnand])
-  gl_PREREQ_ISNAND
-fi
-gl_FUNC_ISNANF_NO_LIBM
-if test $gl_func_isnanf_no_libm != yes; then
-  AC_LIBOBJ([isnanf])
-  gl_PREREQ_ISNANF
-fi
-gl_FUNC_ISNANL_NO_LIBM
-if test $gl_func_isnanl_no_libm != yes; then
-  AC_LIBOBJ([isnanl])
-  gl_PREREQ_ISNANL
-fi
-AC_REQUIRE([gl_LARGEFILE])
-gl_LD_OUTPUT_DEF
-gl_LD_VERSION_SCRIPT
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([listen])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([listen])
-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_GNU
-if test $REPLACE_MALLOC = 1; then
-  AC_LIBOBJ([malloc])
-fi
-gl_MODULE_INDICATOR([malloc-gnu])
-gl_FUNC_MALLOC_POSIX
-if test $REPLACE_MALLOC = 1; then
-  AC_LIBOBJ([malloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-gl_MATH_H
-gl_FUNC_MEMCHR
-if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
-  AC_LIBOBJ([memchr])
-  gl_PREREQ_MEMCHR
-fi
-gl_STRING_MODULE_INDICATOR([memchr])
-gl_FUNC_MEMMEM_SIMPLE
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
-  AC_LIBOBJ([memmem])
-fi
-gl_STRING_MODULE_INDICATOR([memmem])
-gl_FUNC_MEMPCPY
-if test $HAVE_MEMPCPY = 0; then
-  AC_LIBOBJ([mempcpy])
-  gl_PREREQ_MEMPCPY
-fi
-gl_STRING_MODULE_INDICATOR([mempcpy])
-gl_MINMAX
-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
-gl_HEADER_NETDB
-gl_HEADER_NETINET_IN
-AC_PROG_MKDIR_P
-gl_FUNC_OPENDIR
-if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
-  AC_LIBOBJ([opendir])
-fi
-gl_DIRENT_MODULE_INDICATOR([opendir])
-AC_PATH_PROG([PMCCABE], [pmccabe], [false])
-gl_FUNC_PRINTF_FREXP
-gl_FUNC_PRINTF_FREXPL
-m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
-AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
-AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
-gl_FUNC_RAWMEMCHR
-if test $HAVE_RAWMEMCHR = 0; then
-  AC_LIBOBJ([rawmemchr])
-  gl_PREREQ_RAWMEMCHR
-fi
-gl_STRING_MODULE_INDICATOR([rawmemchr])
-gl_PREREQ_READ_FILE
-gl_FUNC_READDIR
-if test $HAVE_READDIR = 0; then
-  AC_LIBOBJ([readdir])
-fi
-gl_DIRENT_MODULE_INDICATOR([readdir])
-gl_FUNC_REALLOC_POSIX
-if test $REPLACE_REALLOC = 1; then
-  AC_LIBOBJ([realloc])
-fi
-gl_STDLIB_MODULE_INDICATOR([realloc-posix])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([recv])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([recv])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([recvfrom])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
-gl_FUNC_SCANDIR
-if test $HAVE_SCANDIR = 0; then
-  AC_LIBOBJ([scandir])
-  gl_PREREQ_SCANDIR
-fi
-gl_DIRENT_MODULE_INDICATOR([scandir])
-gl_FUNC_SELECT
-if test $REPLACE_SELECT = 1; then
-  AC_LIBOBJ([select])
-fi
-gl_SYS_SELECT_MODULE_INDICATOR([select])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([send])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([send])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([sendto])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
-gl_SERVENT
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([setsockopt])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([shutdown])
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
-gl_SIGNAL_H
-gl_SIGNBIT
-if test $REPLACE_SIGNBIT = 1; then
-  AC_LIBOBJ([signbitf])
-  AC_LIBOBJ([signbitd])
-  AC_LIBOBJ([signbitl])
-fi
-gl_MATH_MODULE_INDICATOR([signbit])
-gl_SIZE_MAX
-gl_FUNC_SLEEP
-if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
-  AC_LIBOBJ([sleep])
-fi
-gl_UNISTD_MODULE_INDICATOR([sleep])
-gl_FUNC_SNPRINTF
-gl_STDIO_MODULE_INDICATOR([snprintf])
-gl_MODULE_INDICATOR([snprintf])
-AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  AC_LIBOBJ([socket])
-fi
-# When this module is used, sockets may actually occur as file descriptors,
-# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
-m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
-AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
-if test "$ac_cv_header_winsock2_h" = yes; then
-  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-fi
-gl_SYS_SOCKET_MODULE_INDICATOR([socket])
-gl_SOCKETLIB
-gl_SOCKETS
-gl_TYPE_SOCKLEN_T
-gt_TYPE_SSIZE_T
-gl_STDALIGN_H
-gl_STDARG_H
-AM_STDBOOL_H
-gl_STDDEF_H
-gl_STDINT_H
-gl_STDIO_H
-gl_STDLIB_H
-gl_STRCASE
-if test $HAVE_STRCASECMP = 0; then
-  AC_LIBOBJ([strcasecmp])
-  gl_PREREQ_STRCASECMP
-fi
-if test $HAVE_STRNCASECMP = 0; then
-  AC_LIBOBJ([strncasecmp])
-  gl_PREREQ_STRNCASECMP
-fi
-gl_FUNC_STRCHRNUL
-if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
-  AC_LIBOBJ([strchrnul])
-  gl_PREREQ_STRCHRNUL
-fi
-gl_STRING_MODULE_INDICATOR([strchrnul])
-gl_FUNC_STRDUP_POSIX
-if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
-  AC_LIBOBJ([strdup])
-  gl_PREREQ_STRDUP
-fi
-gl_STRING_MODULE_INDICATOR([strdup])
-gl_FUNC_STRERROR
-if test $REPLACE_STRERROR = 1; then
-  AC_LIBOBJ([strerror])
-fi
-gl_MODULE_INDICATOR([strerror])
-gl_STRING_MODULE_INDICATOR([strerror])
-AC_REQUIRE([gl_HEADER_ERRNO_H])
-AC_REQUIRE([gl_FUNC_STRERROR_0])
-if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
-  AC_LIBOBJ([strerror-override])
-  gl_PREREQ_SYS_H_WINSOCK2
-fi
-gl_HEADER_STRING_H
-gl_HEADER_STRINGS_H
-gl_FUNC_STRNDUP
-if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
-  AC_LIBOBJ([strndup])
-fi
-gl_STRING_MODULE_INDICATOR([strndup])
-gl_FUNC_STRNLEN
-if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
-  AC_LIBOBJ([strnlen])
-  gl_PREREQ_STRNLEN
-fi
-gl_STRING_MODULE_INDICATOR([strnlen])
-gl_FUNC_STRTOK_R
-if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
-  AC_LIBOBJ([strtok_r])
-  gl_PREREQ_STRTOK_R
-fi
-gl_STRING_MODULE_INDICATOR([strtok_r])
-gl_FUNC_STRVERSCMP
-if test $HAVE_STRVERSCMP = 0; then
-  AC_LIBOBJ([strverscmp])
-  gl_PREREQ_STRVERSCMP
-fi
-gl_STRING_MODULE_INDICATOR([strverscmp])
-gl_HEADER_SYS_SELECT
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_SOCKET
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_STAT_H
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_TIME_H
-AC_PROG_MKDIR_P
-gl_SYS_TYPES_H
-AC_PROG_MKDIR_P
-gl_HEADER_SYS_UIO
-AC_PROG_MKDIR_P
-gl_SYSEXITS
-gl_THREADLIB
-gl_HEADER_TIME_H
-gl_TIME_R
-if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
-  AC_LIBOBJ([time_r])
-  gl_PREREQ_TIME_R
-fi
-gl_TIME_MODULE_INDICATOR([time_r])
-gl_TIMER_TIME
-gl_TIMESPEC
-AC_REQUIRE([AC_C_INLINE])
-gl_UNISTD_H
-gl_VALGRIND_TESTS
-gl_FUNC_VASNPRINTF
-gl_FUNC_VASPRINTF
-gl_STDIO_MODULE_INDICATOR([vasprintf])
-m4_ifdef([AM_XGETTEXT_OPTION],
-  [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
-   AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
-gl_VERSION_ETC
-gl_FUNC_VFPRINTF_POSIX
-gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
-gl_FUNC_VPRINTF_POSIX
-gl_STDIO_MODULE_INDICATOR([vprintf-posix])
-gl_FUNC_VSNPRINTF
-gl_STDIO_MODULE_INDICATOR([vsnprintf])
-gl_WCHAR_H
-gl_XSIZE
+  gl_FUNC_ALLOCA
+  gl_FUNC_ALPHASORT
+  if test $HAVE_ALPHASORT = 0; then
+    AC_LIBOBJ([alphasort])
+    gl_PREREQ_ALPHASORT
+  fi
+  gl_DIRENT_MODULE_INDICATOR([alphasort])
+  gl_ARGP
+  m4_ifdef([AM_XGETTEXT_OPTION],
+    [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
+     AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
+  gl_HEADER_ARPA_INET
+  AC_PROG_MKDIR_P
+  gl_FUNC_BASE64
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([bind])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+  gl_BYTESWAP
+  gl_CLOCK_TIME
+  gl_FUNC_CLOSE
+  if test $REPLACE_CLOSE = 1; then
+    AC_LIBOBJ([close])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([close])
+  gl_FUNC_CLOSEDIR
+  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+    AC_LIBOBJ([closedir])
+  fi
+  gl_DIRENT_MODULE_INDICATOR([closedir])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([connect])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+  gl_DIRENT_H
+  gl_DIRNAME_LGPL
+  gl_DOUBLE_SLASH_ROOT
+  gl_HEADER_ERRNO_H
+  gl_ERROR
+  if test $ac_cv_lib_error_at_line = no; then
+    AC_LIBOBJ([error])
+    gl_PREREQ_ERROR
+  fi
+  m4_ifdef([AM_XGETTEXT_OPTION],
+    [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+     AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+  AC_REQUIRE([gl_EXTERN_INLINE])
+  gl_FLOAT_H
+  if test $REPLACE_FLOAT_LDBL = 1; then
+    AC_LIBOBJ([float])
+  fi
+  if test $REPLACE_ITOLD = 1; then
+    AC_LIBOBJ([itold])
+  fi
+  gl_FUNC_FREXP_NO_LIBM
+  if test $gl_func_frexp_no_libm != yes; then
+    AC_LIBOBJ([frexp])
+  fi
+  gl_MATH_MODULE_INDICATOR([frexp])
+  gl_FUNC_FREXPL_NO_LIBM
+  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
+    AC_LIBOBJ([frexpl])
+  fi
+  gl_MATH_MODULE_INDICATOR([frexpl])
+  gl_FUNC_FSEEK
+  if test $REPLACE_FSEEK = 1; then
+    AC_LIBOBJ([fseek])
+  fi
+  gl_STDIO_MODULE_INDICATOR([fseek])
+  gl_FUNC_FSEEKO
+  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+    AC_LIBOBJ([fseeko])
+    gl_PREREQ_FSEEKO
+  fi
+  gl_STDIO_MODULE_INDICATOR([fseeko])
+  gl_FUNC_FSETERR
+  if test $ac_cv_func___fseterr = no; then
+    AC_LIBOBJ([fseterr])
+  fi
+  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
+  gl_GETADDRINFO
+  if test $HAVE_GETADDRINFO = 0; then
+    AC_LIBOBJ([getaddrinfo])
+  fi
+  if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
+    AC_LIBOBJ([gai_strerror])
+  fi
+  gl_NETDB_MODULE_INDICATOR([getaddrinfo])
+  gl_FUNC_GETDELIM
+  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+    AC_LIBOBJ([getdelim])
+    gl_PREREQ_GETDELIM
+  fi
+  gl_STDIO_MODULE_INDICATOR([getdelim])
+  gl_FUNC_GETLINE
+  if test $REPLACE_GETLINE = 1; then
+    AC_LIBOBJ([getline])
+    gl_PREREQ_GETLINE
+  fi
+  gl_STDIO_MODULE_INDICATOR([getline])
+  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])
+  gl_FUNC_GETPASS
+  if test $HAVE_GETPASS = 0; then
+    AC_LIBOBJ([getpass])
+    gl_PREREQ_GETPASS
+  fi
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([getpeername])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
+  gl_FUNC_GETSUBOPT
+  if test $HAVE_GETSUBOPT = 0; then
+    AC_LIBOBJ([getsubopt])
+    gl_PREREQ_GETSUBOPT
+  fi
+  gl_STDLIB_MODULE_INDICATOR([getsubopt])
+  dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+  AM_GNU_GETTEXT_VERSION([0.18.1])
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  gl_GETTIME
+  gl_FUNC_GETTIMEOFDAY
+  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+    AC_LIBOBJ([gettimeofday])
+    gl_PREREQ_GETTIMEOFDAY
+  fi
+  gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+  # 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_HOSTENT
+  gl_FUNC_INET_NTOP
+  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
+    AC_LIBOBJ([inet_ntop])
+    gl_PREREQ_INET_NTOP
+  fi
+  gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
+  gl_FUNC_INET_PTON
+  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
+    AC_LIBOBJ([inet_pton])
+    gl_PREREQ_INET_PTON
+  fi
+  gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+  gl_FUNC_ISNAND_NO_LIBM
+  if test $gl_func_isnand_no_libm != yes; then
+    AC_LIBOBJ([isnand])
+    gl_PREREQ_ISNAND
+  fi
+  gl_FUNC_ISNANF_NO_LIBM
+  if test $gl_func_isnanf_no_libm != yes; then
+    AC_LIBOBJ([isnanf])
+    gl_PREREQ_ISNANF
+  fi
+  gl_FUNC_ISNANL_NO_LIBM
+  if test $gl_func_isnanl_no_libm != yes; then
+    AC_LIBOBJ([isnanl])
+    gl_PREREQ_ISNANL
+  fi
+  AC_REQUIRE([gl_LARGEFILE])
+  gl_LD_OUTPUT_DEF
+  gl_LD_VERSION_SCRIPT
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([listen])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+  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_GNU
+  if test $REPLACE_MALLOC = 1; then
+    AC_LIBOBJ([malloc])
+  fi
+  gl_MODULE_INDICATOR([malloc-gnu])
+  gl_FUNC_MALLOC_POSIX
+  if test $REPLACE_MALLOC = 1; then
+    AC_LIBOBJ([malloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+  gl_MATH_H
+  gl_FUNC_MEMCHR
+  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+    AC_LIBOBJ([memchr])
+    gl_PREREQ_MEMCHR
+  fi
+  gl_STRING_MODULE_INDICATOR([memchr])
+  gl_FUNC_MEMMEM_SIMPLE
+  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+    AC_LIBOBJ([memmem])
+  fi
+  gl_STRING_MODULE_INDICATOR([memmem])
+  gl_FUNC_MEMPCPY
+  if test $HAVE_MEMPCPY = 0; then
+    AC_LIBOBJ([mempcpy])
+    gl_PREREQ_MEMPCPY
+  fi
+  gl_STRING_MODULE_INDICATOR([mempcpy])
+  gl_MINMAX
+  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
+  gl_HEADER_NETDB
+  gl_HEADER_NETINET_IN
+  AC_PROG_MKDIR_P
+  gl_FUNC_OPENDIR
+  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+    AC_LIBOBJ([opendir])
+  fi
+  gl_DIRENT_MODULE_INDICATOR([opendir])
+  AC_PATH_PROG([PMCCABE], [pmccabe], [false])
+  gl_FUNC_PRINTF_FREXP
+  gl_FUNC_PRINTF_FREXPL
+  m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
+  AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+  AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+  gl_FUNC_RAWMEMCHR
+  if test $HAVE_RAWMEMCHR = 0; then
+    AC_LIBOBJ([rawmemchr])
+    gl_PREREQ_RAWMEMCHR
+  fi
+  gl_STRING_MODULE_INDICATOR([rawmemchr])
+  gl_PREREQ_READ_FILE
+  gl_FUNC_READDIR
+  if test $HAVE_READDIR = 0; then
+    AC_LIBOBJ([readdir])
+  fi
+  gl_DIRENT_MODULE_INDICATOR([readdir])
+  gl_FUNC_REALLOC_POSIX
+  if test $REPLACE_REALLOC = 1; then
+    AC_LIBOBJ([realloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([recv])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([recvfrom])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
+  gl_FUNC_SCANDIR
+  if test $HAVE_SCANDIR = 0; then
+    AC_LIBOBJ([scandir])
+    gl_PREREQ_SCANDIR
+  fi
+  gl_DIRENT_MODULE_INDICATOR([scandir])
+  gl_FUNC_SELECT
+  if test $REPLACE_SELECT = 1; then
+    AC_LIBOBJ([select])
+  fi
+  gl_SYS_SELECT_MODULE_INDICATOR([select])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([send])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([send])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([sendto])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
+  gl_SERVENT
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([setsockopt])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([shutdown])
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
+  gl_SIGNAL_H
+  gl_SIGNBIT
+  if test $REPLACE_SIGNBIT = 1; then
+    AC_LIBOBJ([signbitf])
+    AC_LIBOBJ([signbitd])
+    AC_LIBOBJ([signbitl])
+  fi
+  gl_MATH_MODULE_INDICATOR([signbit])
+  gl_SIZE_MAX
+  gl_FUNC_SLEEP
+  if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+    AC_LIBOBJ([sleep])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([sleep])
+  gl_FUNC_SNPRINTF
+  gl_STDIO_MODULE_INDICATOR([snprintf])
+  gl_MODULE_INDICATOR([snprintf])
+  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    AC_LIBOBJ([socket])
+  fi
+  # When this module is used, sockets may actually occur as file descriptors,
+  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
+  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+  AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+  fi
+  gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+  gl_SOCKETLIB
+  gl_SOCKETS
+  gl_TYPE_SOCKLEN_T
+  gt_TYPE_SSIZE_T
+  gl_STDALIGN_H
+  gl_STDARG_H
+  AM_STDBOOL_H
+  gl_STDDEF_H
+  gl_STDINT_H
+  gl_STDIO_H
+  gl_STDLIB_H
+  gl_STRCASE
+  if test $HAVE_STRCASECMP = 0; then
+    AC_LIBOBJ([strcasecmp])
+    gl_PREREQ_STRCASECMP
+  fi
+  if test $HAVE_STRNCASECMP = 0; then
+    AC_LIBOBJ([strncasecmp])
+    gl_PREREQ_STRNCASECMP
+  fi
+  gl_FUNC_STRCHRNUL
+  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
+    AC_LIBOBJ([strchrnul])
+    gl_PREREQ_STRCHRNUL
+  fi
+  gl_STRING_MODULE_INDICATOR([strchrnul])
+  gl_FUNC_STRDUP_POSIX
+  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+    AC_LIBOBJ([strdup])
+    gl_PREREQ_STRDUP
+  fi
+  gl_STRING_MODULE_INDICATOR([strdup])
+  gl_FUNC_STRERROR
+  if test $REPLACE_STRERROR = 1; then
+    AC_LIBOBJ([strerror])
+  fi
+  gl_MODULE_INDICATOR([strerror])
+  gl_STRING_MODULE_INDICATOR([strerror])
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+    AC_LIBOBJ([strerror-override])
+    gl_PREREQ_SYS_H_WINSOCK2
+  fi
+  gl_HEADER_STRING_H
+  gl_HEADER_STRINGS_H
+  gl_FUNC_STRNDUP
+  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
+    AC_LIBOBJ([strndup])
+  fi
+  gl_STRING_MODULE_INDICATOR([strndup])
+  gl_FUNC_STRNLEN
+  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+    AC_LIBOBJ([strnlen])
+    gl_PREREQ_STRNLEN
+  fi
+  gl_STRING_MODULE_INDICATOR([strnlen])
+  gl_FUNC_STRTOK_R
+  if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
+    AC_LIBOBJ([strtok_r])
+    gl_PREREQ_STRTOK_R
+  fi
+  gl_STRING_MODULE_INDICATOR([strtok_r])
+  gl_FUNC_STRVERSCMP
+  if test $HAVE_STRVERSCMP = 0; then
+    AC_LIBOBJ([strverscmp])
+    gl_PREREQ_STRVERSCMP
+  fi
+  gl_STRING_MODULE_INDICATOR([strverscmp])
+  gl_HEADER_SYS_SELECT
+  AC_PROG_MKDIR_P
+  gl_HEADER_SYS_SOCKET
+  AC_PROG_MKDIR_P
+  gl_HEADER_SYS_STAT_H
+  AC_PROG_MKDIR_P
+  gl_HEADER_SYS_TIME_H
+  AC_PROG_MKDIR_P
+  gl_SYS_TYPES_H
+  AC_PROG_MKDIR_P
+  gl_HEADER_SYS_UIO
+  AC_PROG_MKDIR_P
+  gl_SYSEXITS
+  gl_THREADLIB
+  gl_HEADER_TIME_H
+  gl_TIME_R
+  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+    AC_LIBOBJ([time_r])
+    gl_PREREQ_TIME_R
+  fi
+  gl_TIME_MODULE_INDICATOR([time_r])
+  gl_TIMER_TIME
+  gl_TIMESPEC
+  gl_UNISTD_H
+  gl_VALGRIND_TESTS
+  gl_FUNC_VASNPRINTF
+  gl_FUNC_VASPRINTF
+  gl_STDIO_MODULE_INDICATOR([vasprintf])
+  m4_ifdef([AM_XGETTEXT_OPTION],
+    [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+     AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+  gl_VERSION_ETC
+  gl_FUNC_VFPRINTF_POSIX
+  gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
+  gl_FUNC_VPRINTF_POSIX
+  gl_STDIO_MODULE_INDICATOR([vprintf-posix])
+  gl_FUNC_VSNPRINTF
+  gl_STDIO_MODULE_INDICATOR([vsnprintf])
+  gl_WCHAR_H
+  gl_XSIZE
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -889,139 +891,137 @@ changequote([, ])dnl
   AC_SUBST([gltests_WITNESS])
   gl_module_indicator_condition=$gltests_WITNESS
   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-AC_REQUIRE([AC_C_INLINE])
-gl_FUNC_DUP2
-if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
-  AC_LIBOBJ([dup2])
-  gl_PREREQ_DUP2
-fi
-gl_UNISTD_MODULE_INDICATOR([dup2])
-gl_ENVIRON
-gl_UNISTD_MODULE_INDICATOR([environ])
-gl_FCNTL_H
-gl_FUNC_FDOPEN
-if test $REPLACE_FDOPEN = 1; then
-  AC_LIBOBJ([fdopen])
-  gl_PREREQ_FDOPEN
-fi
-gl_STDIO_MODULE_INDICATOR([fdopen])
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_UNGETC_WORKS
-gl_FUNC_FTRUNCATE
-if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
-  AC_LIBOBJ([ftruncate])
-  gl_PREREQ_FTRUNCATE
-fi
-gl_UNISTD_MODULE_INDICATOR([ftruncate])
-gl_FUNC_GETCWD_LGPL
-if test $REPLACE_GETCWD = 1; then
-  AC_LIBOBJ([getcwd-lgpl])
-fi
-gl_UNISTD_MODULE_INDICATOR([getcwd])
-gl_FUNC_GETPAGESIZE
-if test $REPLACE_GETPAGESIZE = 1; then
-  AC_LIBOBJ([getpagesize])
-fi
-gl_UNISTD_MODULE_INDICATOR([getpagesize])
-AC_REQUIRE([AC_C_INLINE])
-AC_C_BIGENDIAN
-AC_C_BIGENDIAN
-gl_INTTYPES_H
-gl_INTTYPES_INCOMPLETE
-gl_FUNC_IOCTL
-if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
-  AC_LIBOBJ([ioctl])
-fi
-gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
-gl_DOUBLE_EXPONENT_LOCATION
-gl_FLOAT_EXPONENT_LOCATION
-gl_LONG_DOUBLE_EXPONENT_LOCATION
-AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
-gl_LOCK
-gl_FUNC_LSTAT
-if test $REPLACE_LSTAT = 1; then
-  AC_LIBOBJ([lstat])
-  gl_PREREQ_LSTAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([lstat])
-gl_MALLOCA
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-gl_FUNC_OPEN
-if test $REPLACE_OPEN = 1; then
-  AC_LIBOBJ([open])
-  gl_PREREQ_OPEN
-fi
-gl_FCNTL_MODULE_INDICATOR([open])
-gl_PATHMAX
-gl_FUNC_PERROR
-if test $REPLACE_PERROR = 1; then
-  AC_LIBOBJ([perror])
-fi
-gl_STRING_MODULE_INDICATOR([perror])
-gl_FUNC_PIPE
-if test $HAVE_PIPE = 0; then
-  AC_LIBOBJ([pipe])
-fi
-gl_UNISTD_MODULE_INDICATOR([pipe])
-gl_FUNC_PUTENV
-if test $REPLACE_PUTENV = 1; then
-  AC_LIBOBJ([putenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([putenv])
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-AC_CHECK_HEADERS_ONCE([sys/wait.h])
-gl_FUNC_SETENV
-if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
-  AC_LIBOBJ([setenv])
-fi
-gl_STDLIB_MODULE_INDICATOR([setenv])
-AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
-AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
-AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
-AC_CHECK_DECLS_ONCE([alarm])
-gl_FUNC_STAT
-if test $REPLACE_STAT = 1; then
-  AC_LIBOBJ([stat])
-  gl_PREREQ_STAT
-fi
-gl_SYS_STAT_MODULE_INDICATOR([stat])
-gt_TYPE_WCHAR_T
-gt_TYPE_WINT_T
-gl_FUNC_STRERROR_R
-if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
-  AC_LIBOBJ([strerror_r])
-  gl_PREREQ_STRERROR_R
-fi
-gl_STRING_MODULE_INDICATOR([strerror_r])
-dnl Check for prerequisites for memory fence checks.
-gl_FUNC_MMAP_ANON
-AC_CHECK_HEADERS_ONCE([sys/mman.h])
-AC_CHECK_FUNCS_ONCE([mprotect])
-gl_FUNC_SYMLINK
-if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
-  AC_LIBOBJ([symlink])
-fi
-gl_UNISTD_MODULE_INDICATOR([symlink])
-gl_SYS_IOCTL_H
-AC_PROG_MKDIR_P
-AC_CHECK_FUNCS_ONCE([shutdown])
-gl_FUNC_UNSETENV
-if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
-  AC_LIBOBJ([unsetenv])
-  gl_PREREQ_UNSETENV
-fi
-gl_STDLIB_MODULE_INDICATOR([unsetenv])
-gl_VALGRIND_TESTS
-abs_aux_dir=`cd "$ac_aux_dir"; pwd`
-AC_SUBST([abs_aux_dir])
+  gl_FUNC_DUP2
+  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+    AC_LIBOBJ([dup2])
+    gl_PREREQ_DUP2
+  fi
+  gl_UNISTD_MODULE_INDICATOR([dup2])
+  gl_ENVIRON
+  gl_UNISTD_MODULE_INDICATOR([environ])
+  gl_FCNTL_H
+  gl_FUNC_FDOPEN
+  if test $REPLACE_FDOPEN = 1; then
+    AC_LIBOBJ([fdopen])
+    gl_PREREQ_FDOPEN
+  fi
+  gl_STDIO_MODULE_INDICATOR([fdopen])
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_UNGETC_WORKS
+  gl_FUNC_FTRUNCATE
+  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
+    AC_LIBOBJ([ftruncate])
+    gl_PREREQ_FTRUNCATE
+  fi
+  gl_UNISTD_MODULE_INDICATOR([ftruncate])
+  gl_FUNC_GETCWD_LGPL
+  if test $REPLACE_GETCWD = 1; then
+    AC_LIBOBJ([getcwd-lgpl])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([getcwd])
+  gl_FUNC_GETPAGESIZE
+  if test $REPLACE_GETPAGESIZE = 1; then
+    AC_LIBOBJ([getpagesize])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([getpagesize])
+  AC_C_BIGENDIAN
+  AC_C_BIGENDIAN
+  gl_INTTYPES_H
+  gl_INTTYPES_INCOMPLETE
+  gl_FUNC_IOCTL
+  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+    AC_LIBOBJ([ioctl])
+  fi
+  gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
+  gl_DOUBLE_EXPONENT_LOCATION
+  gl_FLOAT_EXPONENT_LOCATION
+  gl_LONG_DOUBLE_EXPONENT_LOCATION
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+  gl_LOCK
+  gl_FUNC_LSTAT
+  if test $REPLACE_LSTAT = 1; then
+    AC_LIBOBJ([lstat])
+    gl_PREREQ_LSTAT
+  fi
+  gl_SYS_STAT_MODULE_INDICATOR([lstat])
+  gl_MALLOCA
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_FUNC_OPEN
+  if test $REPLACE_OPEN = 1; then
+    AC_LIBOBJ([open])
+    gl_PREREQ_OPEN
+  fi
+  gl_FCNTL_MODULE_INDICATOR([open])
+  gl_PATHMAX
+  gl_FUNC_PERROR
+  if test $REPLACE_PERROR = 1; then
+    AC_LIBOBJ([perror])
+  fi
+  gl_STRING_MODULE_INDICATOR([perror])
+  gl_FUNC_PIPE
+  if test $HAVE_PIPE = 0; then
+    AC_LIBOBJ([pipe])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([pipe])
+  gl_FUNC_PUTENV
+  if test $REPLACE_PUTENV = 1; then
+    AC_LIBOBJ([putenv])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([putenv])
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  AC_CHECK_HEADERS_ONCE([sys/wait.h])
+  gl_FUNC_SETENV
+  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+    AC_LIBOBJ([setenv])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([setenv])
+  AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+  AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
+  AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
+  AC_CHECK_DECLS_ONCE([alarm])
+  gl_FUNC_STAT
+  if test $REPLACE_STAT = 1; then
+    AC_LIBOBJ([stat])
+    gl_PREREQ_STAT
+  fi
+  gl_SYS_STAT_MODULE_INDICATOR([stat])
+  gt_TYPE_WCHAR_T
+  gt_TYPE_WINT_T
+  gl_FUNC_STRERROR_R
+  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+    AC_LIBOBJ([strerror_r])
+    gl_PREREQ_STRERROR_R
+  fi
+  gl_STRING_MODULE_INDICATOR([strerror_r])
+  dnl Check for prerequisites for memory fence checks.
+  gl_FUNC_MMAP_ANON
+  AC_CHECK_HEADERS_ONCE([sys/mman.h])
+  AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_FUNC_SYMLINK
+  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+    AC_LIBOBJ([symlink])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([symlink])
+  gl_SYS_IOCTL_H
+  AC_PROG_MKDIR_P
+  AC_CHECK_FUNCS_ONCE([shutdown])
+  gl_FUNC_UNSETENV
+  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+    AC_LIBOBJ([unsetenv])
+    gl_PREREQ_UNSETENV
+  fi
+  gl_STDLIB_MODULE_INDICATOR([unsetenv])
+  gl_VALGRIND_TESTS
+  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+  AC_SUBST([abs_aux_dir])
   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(gltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -1195,6 +1195,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/gettime.c
   lib/gettimeofday.c
   lib/glthread/threadlib.c
+  lib/hash-pjw-bare.c
+  lib/hash-pjw-bare.h
   lib/inet_ntop.c
   lib/inet_pton.c
   lib/intprops.h
@@ -1289,7 +1291,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/sysexits.in.h
   lib/time.in.h
   lib/time_r.c
+  lib/timespec.c
   lib/timespec.h
+  lib/u64.c
   lib/u64.h
   lib/unistd.in.h
   lib/vasnprintf.c
@@ -1304,6 +1308,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/vsnprintf.c
   lib/w32sock.h
   lib/wchar.in.h
+  lib/xsize.c
   lib/xsize.h
   m4/00gnulib.m4
   m4/alloca.m4
@@ -1328,6 +1333,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/exponentf.m4
   m4/exponentl.m4
   m4/extensions.m4
+  m4/extern-inline.m4
   m4/fcntl-o.m4
   m4/fcntl_h.m4
   m4/fdopen.m4
@@ -1654,6 +1660,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-vsnprintf.c
   tests/test-wchar.c
   tests/zerosize-ptr.h
+  tests=lib/binary-io.c
   tests=lib/binary-io.h
   tests=lib/dup2.c
   tests=lib/fcntl.in.h
diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index 4e1374d..e1feab5 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,33 +1,39 @@
-# lib-ld.m4 serial 5 (gettext-0.18.2)
+# lib-ld.m4 serial 6
 dnl Copyright (C) 1996-2003, 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,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
 
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
+  acl_cv_prog_gnu_ld=yes
+  ;;
 *)
-  acl_cv_prog_gnu_ld=no ;;
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
@@ -40,10 +46,11 @@ if test "${PATH_SEPARATOR+set}" != set; then
            || PATH_SEPARATOR=';'
        }
 fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
+  AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -53,11 +60,11 @@ if test "$GCC" = yes; then
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
@@ -78,23 +85,26 @@ else
 fi
 AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       acl_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-        test "$with_gnu_ld" != no && break ;;
+        test "$with_gnu_ld" != no && break
+        ;;
       *)
-        test "$with_gnu_ld" != yes && break ;;
+        test "$with_gnu_ld" != yes && break
+        ;;
       esac
     fi
   done
-  IFS="$ac_save_ifs"
+  IFS="$acl_save_ifs"
 else
   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 fi])
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 864fc85..f3cb23b 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 4
+# manywarnings.m4 serial 5
 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,
@@ -35,14 +35,12 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
 # make sure your gcc understands it.
 AC_DEFUN([gl_MANYWARN_ALL_GCC],
 [
-  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, }
+  dnl First, check for some issues that only occur when combining multiple
+  dnl gcc warning categories.
   AC_REQUIRE([AC_PROG_CC])
   if test -n "$GCC"; then
 
-    dnl First, check -W -Werror -Wno-missing-field-initializers is supported
+    dnl Check if -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], [
@@ -77,107 +75,150 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
       ])
       AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
     fi
+
+    dnl Next, check if -Werror -Wuninitialized is useful with the
+    dnl user's choice of $CFLAGS; some versions of gcc warn that it
+    dnl has no effect if -O is not also used
+    AC_MSG_CHECKING([whether -Wuninitialized is supported])
+    AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror -Wuninitialized"
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[]], [[]])],
+        [gl_cv_cc_uninitialized_supported=yes],
+        [gl_cv_cc_uninitialized_supported=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
   fi
 
+  # List all gcc warning categories.
   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
 
-  # Disable the missing-field-initializers warning if needed
+  # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
   fi
 
+  if test "$gl_cv_cc_uninitialized_supported" = no; then
+    gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+  fi
+
   $1=$gl_manywarn_set
 ])
diff --git a/gl/m4/timer_time.m4 b/gl/m4/timer_time.m4
index d6e0efe..bc84554 100644
--- a/gl/m4/timer_time.m4
+++ b/gl/m4/timer_time.m4
@@ -1,4 +1,4 @@
-# timer_time.m4 serial 1
+# timer_time.m4 serial 2
 dnl Copyright (C) 2011-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,
@@ -33,7 +33,7 @@ AC_DEFUN([gl_TIMER_TIME],
  #endif
 #endif
       ],
-      [LIB_TIMER_TIME="$LIBMULTITHREAD $LIB_TIMER_TIME"])
+      [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
     AC_CHECK_FUNCS([timer_settime])
   LIBS=$gl_saved_libs
 ])
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 597b9c2..63c00e8 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
 
@@ -8,8 +8,4 @@
 
 dnl From Jim Meyering
 
-AC_DEFUN([gl_TIMESPEC],
-[
-  dnl Prerequisites of lib/timespec.h.
-  AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_TIMESPEC], [:])
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index b3b7fee..d85a5f1 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,4 +1,4 @@
-# xsize.m4 serial 4
+# xsize.m4 serial 5
 dnl Copyright (C) 2003-2004, 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,
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS([stdint.h])
 ])
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index ed1f9aa..1f8caee 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -66,24 +66,19 @@
 # undef true
 #endif
 
-/* For the sake of symbolic names in gdb, we define true and false as
-   enum constants, not only as macros.
-   It is tempting to write
-      typedef enum { false = 0, true = 1 } _Bool;
-   so that gdb prints values of type 'bool' symbolically. But if we do
-   this, values of type '_Bool' may promote to 'int' or 'unsigned int'
-   (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
-   (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
-   enum; this ensures that '_Bool' promotes to 'int'.  */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
   /* A compiler known to have 'bool'.  */
   /* If the compiler already has both 'bool' and '_Bool', we can assume they
      are the same types.  */
-# if address@hidden@
+#  if address@hidden@
 typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+#  endif
+# else
+#  if !defined __GNUC__
    /* If @HAVE__BOOL@:
         Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
         the built-in _Bool type is used.  See
@@ -103,19 +98,35 @@ typedef bool _Bool;
           "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
         The only benefit of the enum, debuggability, is not important
         with these compilers.  So use 'signed char' and no enum.  */
-#  define _Bool signed char
-# else
+#   define _Bool signed char
+#  else
    /* With this compiler, trust the _Bool type if the compiler has it.  */
-#  if address@hidden@
+#   if address@hidden@
+   /* For the sake of symbolic names in gdb, define true and false as
+      enum constants, not only as macros.
+      It is tempting to write
+         typedef enum { false = 0, true = 1 } _Bool;
+      so that gdb prints values of type 'bool' symbolically.  But then
+      values of type '_Bool' might promote to 'int' or 'unsigned int'
+      (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+      (see ISO C 99 6.3.1.1.(2)).  So add a negative value to the
+      enum; this ensures that '_Bool' promotes to 'int'.  */
 typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+#   endif
 #  endif
 # endif
+# define bool _Bool
 #endif
-#define bool _Bool
 
 /* The other macros must be usable in preprocessor directives.  */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
 #define __bool_true_false_are_defined 1
 
 #endif /* _GL_STDBOOL_H */
diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h
index 0aee2a1..ae8f90c 100644
--- a/gl/sys_select.in.h
+++ b/gl/sys_select.in.h
@@ -130,7 +130,7 @@
 
 /* Re-define FD_ISSET to avoid a WSA call while we are not using
    network sockets.  */
-static inline int
+static int
 rpl_fd_isset (SOCKET fd, fd_set * set)
 {
   u_int i;
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index f73d26b..5a74e77 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -103,7 +103,7 @@ EXTRA_DIST += test-base64.c macros.h
 
 ## begin gnulib module binary-io
 
-libtests_a_SOURCES += binary-io.h
+libtests_a_SOURCES += binary-io.h binary-io.c
 
 ## end   gnulib module binary-io
 
diff --git a/gl/tests/binary-io.c b/gl/tests/binary-io.c
new file mode 100644
index 0000000..8bbdb44
--- /dev/null
+++ b/gl/tests/binary-io.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
diff --git a/gl/tests/binary-io.h b/gl/tests/binary-io.h
index a33e32a..0f376e3 100644
--- a/gl/tests/binary-io.h
+++ b/gl/tests/binary-io.h
@@ -25,6 +25,11 @@
    so we include it here first.  */
 #include <stdio.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# define BINARY_IO_INLINE _GL_INLINE
+#endif
+
 /* set_binary_mode (fd, mode)
    sets the binary/text I/O mode of file descriptor fd to the given mode
    (must be O_BINARY or O_TEXT) and returns the previous mode.  */
@@ -39,9 +44,9 @@
 # endif
 #else
   /* On reasonable systems, binary I/O is the only choice.  */
-  /* Use an inline function rather than a macro, to avoid gcc warnings
+  /* Use a function rather than a macro, to avoid gcc warnings
      "warning: statement with no effect".  */
-static inline int
+BINARY_IO_INLINE int
 set_binary_mode (int fd, int mode)
 {
   (void) fd;
@@ -62,4 +67,6 @@ set_binary_mode (int fd, int mode)
 # define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
 #endif
 
+_GL_INLINE_HEADER_END
+
 #endif /* _BINARY_H */
diff --git a/gl/tests/ioctl.c b/gl/tests/ioctl.c
index aa5df60..4a2fd39 100644
--- a/gl/tests/ioctl.c
+++ b/gl/tests/ioctl.c
@@ -53,8 +53,6 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
 # include "fd-hook.h"
 /* Get _get_osfhandle.  */
 # include "msvc-nothrow.h"
-/* Get HANDLE */
-# include <windows.h>
 
 static int
 primary_ioctl (int fd, int request, void *arg)
diff --git a/gl/tests/malloca.h b/gl/tests/malloca.h
index 0cedf5f..f06e9e7 100644
--- a/gl/tests/malloca.h
+++ b/gl/tests/malloca.h
@@ -42,7 +42,7 @@ extern "C" {
    and a page size can be as small as 4096 bytes.  So we cannot safely
    allocate anything larger than 4096 bytes.  Also care for the possibility
    of a few compiler-allocated temporary stack slots.
-   This must be a macro, not an inline function.  */
+   This must be a macro, not a function.  */
 # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
 #else
 # define safe_alloca(N) ((void) (N), NULL)
diff --git a/gl/tests/test-select.h b/gl/tests/test-select.h
index 1169e59..af0e38c 100644
--- a/gl/tests/test-select.h
+++ b/gl/tests/test-select.h
@@ -84,6 +84,9 @@ open_server_socket (void)
 
   s = socket (AF_INET, SOCK_STREAM, 0);
 
+  x = 1;
+  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
+
   memset (&ia, 0, sizeof (ia));
   ia.sin_family = AF_INET;
   inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr);
@@ -94,9 +97,6 @@ open_server_socket (void)
       exit (77);
     }
 
-  x = 1;
-  setsockopt (s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof (x));
-
   if (listen (s, 1) < 0)
     {
       perror ("listen");
diff --git a/gl/timespec.c b/gl/timespec.c
new file mode 100644
index 0000000..2b6098e
--- /dev/null
+++ b/gl/timespec.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE
+#include "timespec.h"
diff --git a/gl/timespec.h b/gl/timespec.h
index a587079..d0a2194 100644
--- a/gl/timespec.h
+++ b/gl/timespec.h
@@ -21,6 +21,11 @@
 
 # include <time.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_TIMESPEC_INLINE
+# define _GL_TIMESPEC_INLINE _GL_INLINE
+#endif
+
 /* Return negative, zero, positive if A < B, A == B, A > B, respectively.
 
    For each time stamp T, this code assumes that either:
@@ -49,7 +54,7 @@
 
    The (int) cast avoids a gcc -Wconversion warning.  */
 
-static inline int
+_GL_TIMESPEC_INLINE int
 timespec_cmp (struct timespec a, struct timespec b)
 {
   return (a.tv_sec < b.tv_sec ? -1
@@ -59,7 +64,7 @@ timespec_cmp (struct timespec a, struct timespec b)
 
 /* Return -1, 0, 1, depending on the sign of A.  A.tv_nsec must be
    nonnegative.  */
-static inline int
+_GL_TIMESPEC_INLINE int
 timespec_sign (struct timespec a)
 {
   return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
@@ -73,7 +78,7 @@ struct timespec dtotimespec (double)
   _GL_ATTRIBUTE_CONST;
 
 /* Return an approximation to A, of type 'double'.  */
-static inline double
+_GL_TIMESPEC_INLINE double
 timespectod (struct timespec a)
 {
   return a.tv_sec + a.tv_nsec / 1e9;
@@ -82,4 +87,6 @@ timespectod (struct timespec a)
 void gettime (struct timespec *);
 int settime (struct timespec const *);
 
+_GL_INLINE_HEADER_END
+
 #endif
diff --git a/gl/u64.c b/gl/u64.c
new file mode 100644
index 0000000..04cf7a2
--- /dev/null
+++ b/gl/u64.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_U64_INLINE _GL_EXTERN_INLINE
+#include "u64.h"
diff --git a/gl/u64.h b/gl/u64.h
index f5ec9eb..6a7d370 100644
--- a/gl/u64.h
+++ b/gl/u64.h
@@ -19,6 +19,11 @@
 
 #include <stdint.h>
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_U64_INLINE
+# define _GL_U64_INLINE _GL_INLINE
+#endif
+
 /* Return X rotated left by N bits, where 0 < N < 64.  */
 #define u64rol(x, n) u64or (u64shl (x, n), u64shr (x, 64 - n))
 
@@ -54,7 +59,7 @@ typedef struct { uint32_t lo, hi; } u64;
 
 /* Given the high and low-order 32-bit quantities HI and LO, return a u64
    value representing (HI << 32) + LO.  */
-static inline u64
+_GL_U64_INLINE u64
 u64hilo (uint32_t hi, uint32_t lo)
 {
   u64 r;
@@ -64,7 +69,7 @@ u64hilo (uint32_t hi, uint32_t lo)
 }
 
 /* Return a u64 value representing LO.  */
-static inline u64
+_GL_U64_INLINE u64
 u64lo (uint32_t lo)
 {
   u64 r;
@@ -74,7 +79,7 @@ u64lo (uint32_t lo)
 }
 
 /* Return a u64 value representing SIZE.  */
-static inline u64
+_GL_U64_INLINE u64
 u64size (size_t size)
 {
   u64 r;
@@ -84,14 +89,14 @@ u64size (size_t size)
 }
 
 /* Return X < Y.  */
-static inline int
+_GL_U64_INLINE int
 u64lt (u64 x, u64 y)
 {
   return x.hi < y.hi || (x.hi == y.hi && x.lo < y.lo);
 }
 
 /* Return X & Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64and (u64 x, u64 y)
 {
   u64 r;
@@ -101,7 +106,7 @@ u64and (u64 x, u64 y)
 }
 
 /* Return X | Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64or (u64 x, u64 y)
 {
   u64 r;
@@ -111,7 +116,7 @@ u64or (u64 x, u64 y)
 }
 
 /* Return X ^ Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64xor (u64 x, u64 y)
 {
   u64 r;
@@ -121,7 +126,7 @@ u64xor (u64 x, u64 y)
 }
 
 /* Return X + Y.  */
-static inline u64
+_GL_U64_INLINE u64
 u64plus (u64 x, u64 y)
 {
   u64 r;
@@ -131,7 +136,7 @@ u64plus (u64 x, u64 y)
 }
 
 /* Return X << N.  */
-static inline u64
+_GL_U64_INLINE u64
 u64shl (u64 x, int n)
 {
   u64 r;
@@ -149,7 +154,7 @@ u64shl (u64 x, int n)
 }
 
 /* Return X >> N.  */
-static inline u64
+_GL_U64_INLINE u64
 u64shr (u64 x, int n)
 {
   u64 r;
@@ -167,3 +172,5 @@ u64shr (u64 x, int n)
 }
 
 #endif
+
+_GL_INLINE_HEADER_END
diff --git a/gl/verify.h b/gl/verify.h
index cef14ad..0c320b1 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -125,7 +125,7 @@
        extern int (*dummy (void)) [sizeof (struct {...})];
 
    * GCC warns about duplicate declarations of the dummy function if
-     -Wredundant_decls is used.  GCC 4.3 and later have a builtin
+     -Wredundant-decls is used.  GCC 4.3 and later have a builtin
      __COUNTER__ macro that can let us generate unique identifiers for
      each dummy function, to suppress this warning.
 
@@ -133,6 +133,10 @@
      which do not support _Static_assert, also do not warn about the
      last declaration mentioned above.
 
+   * GCC warns if -Wnested-externs is enabled and verify() is used
+     within a function body; but inside a function, you can always
+     arrange to use verify_expr() instead.
+
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
 
diff --git a/gl/xsize.c b/gl/xsize.c
new file mode 100644
index 0000000..4b4914c
--- /dev/null
+++ b/gl/xsize.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XSIZE_INLINE _GL_EXTERN_INLINE
+#include "xsize.h"
diff --git a/gl/xsize.h b/gl/xsize.h
index 515327e..a2942b9 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -27,6 +27,11 @@
 # include <stdint.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:
       void* p = malloc (header_size + n * element_size).
@@ -48,7 +53,7 @@
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -59,7 +64,7 @@ xsum (size_t size1, size_t size2)
 }
 
 /* Sum of three sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -69,7 +74,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
 }
 
 /* Sum of four sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -79,7 +84,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
 }
 
 /* Maximum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -92,7 +97,7 @@ xmax (size_t size1, size_t size2)
 
 /* Multiplication of a count with an element size, with overflow check.
    The count must be >= 0 and the element size must be > 0.
-   This is a macro, not an inline function, so that it works correctly even
+   This is a macro, not a function, so that it works correctly even
    when N is of a wider type and N > SIZE_MAX.  */
 #define xtimes(N, ELSIZE) \
   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -104,4 +109,6 @@ xmax (size_t size1, size_t size2)
 #define size_in_bounds_p(SIZE) \
   ((SIZE) != SIZE_MAX)
 
+_GL_INLINE_HEADER_END
+
 #endif /* _XSIZE_H */
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 41adaba..3b7b7ab 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -76,7 +76,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c 
gnutls_cipher.c  \
        system.c gnutls_str.c gnutls_state.c gnutls_x509.c              \
        gnutls_rsa_export.c gnutls_helper.c gnutls_supplemental.c       \
        random.c crypto-api.c gnutls_privkey.c gnutls_pcert.c           \
-       gnutls_pubkey.c locks.c hash.c gnutls_dtls.c system_override.c  \
+       gnutls_pubkey.c locks.c gnutls_dtls.c system_override.c \
        crypto-backend.c verify-tofu.c pin.c
 
 if ENABLE_TROUSERS
@@ -103,7 +103,7 @@ HFILES = abstract_int.h debug.h gnutls_compress.h 
gnutls_cipher.h   \
        gnutls_state.h gnutls_x509.h crypto-backend.h                   \
        gnutls_rsa_export.h gnutls_srp.h auth/srp.h auth/srp_passwd.h   \
        gnutls_helper.h gnutls_supplemental.h crypto.h random.h system.h\
-       locks.h gnutls_mbuffers.h hash.h gnutls_ecc.h pin.h
+       locks.h gnutls_mbuffers.h gnutls_ecc.h pin.h
 
 if ENABLE_PKCS11
 HFILES += pkcs11_int.h
diff --git a/lib/hash.c b/lib/hash.c
deleted file mode 100644
index 8ba36f5..0000000
--- a/lib/hash.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2011-2012 Free Software Foundation, Inc.
- *
- * Author: Nikos Mavrogiannopoulos
- *
- * This file is part of GnuTLS.
- *
- * The GnuTLS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-#include <gnutls_int.h>
-#include <hash.h>
-/*
--------------------------------------------------------------------------------
-lookup3.c, by Bob Jenkins, May 2006, Public Domain.
-
-These are functions for producing 32-bit hashes for hash table lookup.
-hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() 
-are externally useful functions.  Routines to test the hash are included 
-if SELF_TEST is defined.  You can use this free for any purpose.  It's in
-the public domain.  It has no warranty.
-
-You probably want to use hashlittle().  hashlittle() and hashbig()
-hash byte arrays.  hashlittle() is faster than hashbig() on
-little-endian machines.  Intel and AMD are little-endian machines.
-On second thought, you probably want hashlittle2(), which is identical to
-hashlittle() except it returns two 32-bit hashes for the price of one.  
-You could implement hashbig2() if you wanted but I haven't bothered here.
-
-If you want to find a hash of, say, exactly 7 integers, do
-  a = i1;  b = i2;  c = i3;
-  mix(a,b,c);
-  a += i4; b += i5; c += i6;
-  mix(a,b,c);
-  a += i7;
-  final(a,b,c);
-then use c as the hash value.  If you have a variable length array of
-4-byte integers to hash, use hashword().  If you have a byte array (like
-a character string), use hashlittle().  If you have several byte arrays, or
-a mix of things, see the comments above hashlittle().  
-
-Why is this so big?  I read 12 bytes at a time into 3 4-byte integers, 
-then mix those integers.  This is fast (you can do a lot more thorough
-mixing with 12*3 instructions on 3 integers than you can with 3 instructions
-on 1 byte), but shoehorning those bytes into integers efficiently is messy.
--------------------------------------------------------------------------------
-*/
-#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
-
-/*
--------------------------------------------------------------------------------
-mix -- mix 3 32-bit values reversibly.
-
-This is reversible, so any information in (a,b,c) before mix() is
-still in (a,b,c) after mix().
-
-If four pairs of (a,b,c) inputs are run through mix(), or through
-mix() in reverse, there are at least 32 bits of the output that
-are sometimes the same for one pair and different for another pair.
-This was tested for:
-* pairs that differed by one bit, by two bits, in any combination
-  of top bits of (a,b,c), or in any combination of bottom bits of
-  (a,b,c).
-* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
-  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
-  is commonly produced by subtraction) look like a single 1-bit
-  difference.
-* the base values were pseudorandom, all zero but one bit set, or 
-  all zero plus a counter that starts at zero.
-
-Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
-satisfy this are
-    4  6  8 16 19  4
-    9 15  3 18 27 15
-   14  9  3  7 17  3
-Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
-for "differ" defined as + with a one-bit base and a two-bit delta.  I
-used http://burtleburtle.net/bob/hash/avalanche.html to choose 
-the operations, constants, and arrangements of the variables.
-
-This does not achieve avalanche.  There are input bits of (a,b,c)
-that fail to affect some output bits of (a,b,c), especially of a.  The
-most thoroughly mixed value is c, but it doesn't really even achieve
-avalanche in c.
-
-This allows some parallelism.  Read-after-writes are good at doubling
-the number of bits affected, so the goal of mixing pulls in the opposite
-direction as the goal of parallelism.  I did what I could.  Rotates
-seem to cost as much as shifts on every machine I could lay my hands
-on, and rotates are much kinder to the top and bottom bits, so I used
-rotates.
--------------------------------------------------------------------------------
-*/
-#define mix(a,b,c) \
-{ \
-  a -= c;  a ^= rot(c, 4);  c += b; \
-  b -= a;  b ^= rot(a, 6);  a += c; \
-  c -= b;  c ^= rot(b, 8);  b += a; \
-  a -= c;  a ^= rot(c,16);  c += b; \
-  b -= a;  b ^= rot(a,19);  a += c; \
-  c -= b;  c ^= rot(b, 4);  b += a; \
-}
-
-/*
--------------------------------------------------------------------------------
-final -- final mixing of 3 32-bit values (a,b,c) into c
-
-Pairs of (a,b,c) values differing in only a few bits will usually
-produce values of c that look totally different.  This was tested for
-* pairs that differed by one bit, by two bits, in any combination
-  of top bits of (a,b,c), or in any combination of bottom bits of
-  (a,b,c).
-* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
-  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
-  is commonly produced by subtraction) look like a single 1-bit
-  difference.
-* the base values were pseudorandom, all zero but one bit set, or 
-  all zero plus a counter that starts at zero.
-
-These constants passed:
- 14 11 25 16 4 14 24
- 12 14 25 16 4 14 24
-and these came close:
-  4  8 15 26 3 22 24
- 10  8 15 26 3 22 24
- 11  8 15 26 3 22 24
--------------------------------------------------------------------------------
-*/
-#define final(a,b,c) \
-{ \
-  c ^= b; c -= rot(b,14); \
-  a ^= c; a -= rot(c,11); \
-  b ^= a; b -= rot(a,25); \
-  c ^= b; c -= rot(b,16); \
-  a ^= c; a -= rot(c,4);  \
-  b ^= a; b -= rot(a,14); \
-  c ^= b; c -= rot(b,24); \
-}
-
-
-/*
--------------------------------------------------------------------------------
-hashlittle() -- hash a variable-length key into a 32-bit value
-  k       : the key (the unaligned variable-length array of bytes)
-  length  : the length of the key, counting by bytes
-  initval : can be any 4-byte value
-Returns a 32-bit value.  Every bit of the key affects every bit of
-the return value.  Two keys differing by one or two bits will have
-totally different hash values.
-
-The best hash table sizes are powers of 2.  There is no need to do
-mod a prime (mod is sooo slow!).  If you need less than 32 bits,
-use a bitmask.  For example, if you need only 10 bits, do
-  h = (h & hashmask(10));
-In which case, the hash table should have hashsize(10) elements.
-
-If you are hashing n strings (uint8_t **)k, do it like this:
-  for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
-
-By Bob Jenkins, 2006.  address@hidden  You may use this
-code any way you wish, private, educational, or commercial.  It's free.
-
-Use for hash table lookup, or anything where one collision in 2^^32 is
-acceptable.  Do NOT use for cryptographic purposes.
--------------------------------------------------------------------------------
-*/
-
-uint32_t _gnutls_bhash( const void *key, size_t length, uint32_t initval)
-{
-  uint32_t a,b,c;                                          /* internal state */
-  const uint8_t *k;
-
-  /* Set up the internal state */
-  a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
-
-  k = (const uint8_t *)key;
-
-  /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
-  while (length > 12)
-  {
-    a += k[0];
-    a += ((uint32_t)k[1])<<8;
-    a += ((uint32_t)k[2])<<16;
-    a += ((uint32_t)k[3])<<24;
-    b += k[4];
-    b += ((uint32_t)k[5])<<8;
-    b += ((uint32_t)k[6])<<16;
-    b += ((uint32_t)k[7])<<24;
-    c += k[8];
-    c += ((uint32_t)k[9])<<8;
-    c += ((uint32_t)k[10])<<16;
-    c += ((uint32_t)k[11])<<24;
-    mix(a,b,c);
-    length -= 12;
-    k += 12;
-  }
-
-  /*-------------------------------- last block: affect all 32 bits of (c) */
-  switch(length)                   /* all the case statements fall through */
-  {
-    case 12: c+=((uint32_t)k[11])<<24;
-    case 11: c+=((uint32_t)k[10])<<16;
-    case 10: c+=((uint32_t)k[9])<<8;
-    case 9 : c+=k[8];
-    case 8 : b+=((uint32_t)k[7])<<24;
-    case 7 : b+=((uint32_t)k[6])<<16;
-    case 6 : b+=((uint32_t)k[5])<<8;
-    case 5 : b+=k[4];
-    case 4 : a+=((uint32_t)k[3])<<24;
-    case 3 : a+=((uint32_t)k[2])<<16;
-    case 2 : a+=((uint32_t)k[1])<<8;
-    case 1 : a+=k[0];
-             break;
-    case 0 : return c;
-  }
-
-  final(a,b,c);
-  return c;
-}
-
-
-
diff --git a/lib/hash.h b/lib/hash.h
deleted file mode 100644
index b256474..0000000
--- a/lib/hash.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2011-2012 Free Software Foundation, Inc.
- *
- * Author: Nikos Mavrogiannopoulos
- *
- * This file is part of GnuTLS.
- *
- * The GnuTLS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-uint32_t _gnutls_bhash( const void *key, size_t length, uint32_t initval);
-
diff --git a/lib/minitasn1/hash.c b/lib/minitasn1/hash.c
deleted file mode 100644
index 50da70c..0000000
--- a/lib/minitasn1/hash.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2011-2012 Free Software Foundation, Inc.
- *
- * Author: Nikos Mavrogiannopoulos
- *
- * This file is part of GnuTLS.
- *
- * The GnuTLS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-#include <int.h>
-
-#define INIT_VAL 0x33a1
-/*
--------------------------------------------------------------------------------
-lookup3.c, by Bob Jenkins, May 2006, Public Domain.
-
-These are functions for producing 32-bit hashes for hash table lookup.
-hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() 
-are externally useful functions.  Routines to test the hash are included 
-if SELF_TEST is defined.  You can use this free for any purpose.  It's in
-the public domain.  It has no warranty.
-
-You probably want to use hashlittle().  hashlittle() and hashbig()
-hash byte arrays.  hashlittle() is faster than hashbig() on
-little-endian machines.  Intel and AMD are little-endian machines.
-On second thought, you probably want hashlittle2(), which is identical to
-hashlittle() except it returns two 32-bit hashes for the price of one.  
-You could implement hashbig2() if you wanted but I haven't bothered here.
-
-If you want to find a hash of, say, exactly 7 integers, do
-  a = i1;  b = i2;  c = i3;
-  mix(a,b,c);
-  a += i4; b += i5; c += i6;
-  mix(a,b,c);
-  a += i7;
-  final(a,b,c);
-then use c as the hash value.  If you have a variable length array of
-4-byte integers to hash, use hashword().  If you have a byte array (like
-a character string), use hashlittle().  If you have several byte arrays, or
-a mix of things, see the comments above hashlittle().  
-
-Why is this so big?  I read 12 bytes at a time into 3 4-byte integers, 
-then mix those integers.  This is fast (you can do a lot more thorough
-mixing with 12*3 instructions on 3 integers than you can with 3 instructions
-on 1 byte), but shoehorning those bytes into integers efficiently is messy.
--------------------------------------------------------------------------------
-*/
-#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
-
-/*
--------------------------------------------------------------------------------
-mix -- mix 3 32-bit values reversibly.
-
-This is reversible, so any information in (a,b,c) before mix() is
-still in (a,b,c) after mix().
-
-If four pairs of (a,b,c) inputs are run through mix(), or through
-mix() in reverse, there are at least 32 bits of the output that
-are sometimes the same for one pair and different for another pair.
-This was tested for:
-* pairs that differed by one bit, by two bits, in any combination
-  of top bits of (a,b,c), or in any combination of bottom bits of
-  (a,b,c).
-* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
-  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
-  is commonly produced by subtraction) look like a single 1-bit
-  difference.
-* the base values were pseudorandom, all zero but one bit set, or 
-  all zero plus a counter that starts at zero.
-
-Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
-satisfy this are
-    4  6  8 16 19  4
-    9 15  3 18 27 15
-   14  9  3  7 17  3
-Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
-for "differ" defined as + with a one-bit base and a two-bit delta.  I
-used http://burtleburtle.net/bob/hash/avalanche.html to choose 
-the operations, constants, and arrangements of the variables.
-
-This does not achieve avalanche.  There are input bits of (a,b,c)
-that fail to affect some output bits of (a,b,c), especially of a.  The
-most thoroughly mixed value is c, but it doesn't really even achieve
-avalanche in c.
-
-This allows some parallelism.  Read-after-writes are good at doubling
-the number of bits affected, so the goal of mixing pulls in the opposite
-direction as the goal of parallelism.  I did what I could.  Rotates
-seem to cost as much as shifts on every machine I could lay my hands
-on, and rotates are much kinder to the top and bottom bits, so I used
-rotates.
--------------------------------------------------------------------------------
-*/
-#define mix(a,b,c) \
-{ \
-  a -= c;  a ^= rot(c, 4);  c += b; \
-  b -= a;  b ^= rot(a, 6);  a += c; \
-  c -= b;  c ^= rot(b, 8);  b += a; \
-  a -= c;  a ^= rot(c,16);  c += b; \
-  b -= a;  b ^= rot(a,19);  a += c; \
-  c -= b;  c ^= rot(b, 4);  b += a; \
-}
-
-/*
--------------------------------------------------------------------------------
-final -- final mixing of 3 32-bit values (a,b,c) into c
-
-Pairs of (a,b,c) values differing in only a few bits will usually
-produce values of c that look totally different.  This was tested for
-* pairs that differed by one bit, by two bits, in any combination
-  of top bits of (a,b,c), or in any combination of bottom bits of
-  (a,b,c).
-* "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
-  the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
-  is commonly produced by subtraction) look like a single 1-bit
-  difference.
-* the base values were pseudorandom, all zero but one bit set, or 
-  all zero plus a counter that starts at zero.
-
-These constants passed:
- 14 11 25 16 4 14 24
- 12 14 25 16 4 14 24
-and these came close:
-  4  8 15 26 3 22 24
- 10  8 15 26 3 22 24
- 11  8 15 26 3 22 24
--------------------------------------------------------------------------------
-*/
-#define final(a,b,c) \
-{ \
-  c ^= b; c -= rot(b,14); \
-  a ^= c; a -= rot(c,11); \
-  b ^= a; b -= rot(a,25); \
-  c ^= b; c -= rot(b,16); \
-  a ^= c; a -= rot(c,4);  \
-  b ^= a; b -= rot(a,14); \
-  c ^= b; c -= rot(b,24); \
-}
-
-
-/*
--------------------------------------------------------------------------------
-hashlittle() -- hash a variable-length key into a 32-bit value
-  k       : the key (the unaligned variable-length array of bytes)
-  length  : the length of the key, counting by bytes
-  initval : can be any 4-byte value
-Returns a 32-bit value.  Every bit of the key affects every bit of
-the return value.  Two keys differing by one or two bits will have
-totally different hash values.
-
-The best hash table sizes are powers of 2.  There is no need to do
-mod a prime (mod is sooo slow!).  If you need less than 32 bits,
-use a bitmask.  For example, if you need only 10 bits, do
-  h = (h & hashmask(10));
-In which case, the hash table should have hashsize(10) elements.
-
-If you are hashing n strings (uint8_t **)k, do it like this:
-  for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
-
-By Bob Jenkins, 2006.  address@hidden  You may use this
-code any way you wish, private, educational, or commercial.  It's free.
-
-Use for hash table lookup, or anything where one collision in 2^^32 is
-acceptable.  Do NOT use for cryptographic purposes.
--------------------------------------------------------------------------------
-*/
-
-uint32_t _asn1_bhash( const void *key, size_t length)
-{
-  uint32_t a,b,c;                                          /* internal state */
-  const uint8_t *k;
-
-  /* Set up the internal state */
-  a = b = c = 0xdeadbeef + ((uint32_t)length) + INIT_VAL;
-
-  k = (const uint8_t *)key;
-
-  /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
-  while (length > 12)
-  {
-    a += k[0];
-    a += ((uint32_t)k[1])<<8;
-    a += ((uint32_t)k[2])<<16;
-    a += ((uint32_t)k[3])<<24;
-    b += k[4];
-    b += ((uint32_t)k[5])<<8;
-    b += ((uint32_t)k[6])<<16;
-    b += ((uint32_t)k[7])<<24;
-    c += k[8];
-    c += ((uint32_t)k[9])<<8;
-    c += ((uint32_t)k[10])<<16;
-    c += ((uint32_t)k[11])<<24;
-    mix(a,b,c);
-    length -= 12;
-    k += 12;
-  }
-
-  /*-------------------------------- last block: affect all 32 bits of (c) */
-  switch(length)                   /* all the case statements fall through */
-  {
-    case 12: c+=((uint32_t)k[11])<<24;
-    case 11: c+=((uint32_t)k[10])<<16;
-    case 10: c+=((uint32_t)k[9])<<8;
-    case 9 : c+=k[8];
-    case 8 : b+=((uint32_t)k[7])<<24;
-    case 7 : b+=((uint32_t)k[6])<<16;
-    case 6 : b+=((uint32_t)k[5])<<8;
-    case 5 : b+=k[4];
-    case 4 : a+=((uint32_t)k[3])<<24;
-    case 3 : a+=((uint32_t)k[2])<<16;
-    case 2 : a+=((uint32_t)k[1])<<8;
-    case 1 : a+=k[0];
-             break;
-    case 0 : return c;
-  }
-
-  final(a,b,c);
-  return c;
-}
-
-
-
diff --git a/lib/minitasn1/int.h b/lib/minitasn1/int.h
index 9e6bc89..ccc4737 100644
--- a/lib/minitasn1/int.h
+++ b/lib/minitasn1/int.h
@@ -64,7 +64,6 @@ struct node_asn_struct
 #define _asn1_strcmp(a,b) strcmp((const char *)a, (const char *)b)
 #define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b)
 #define _asn1_strcat(a,b) strcat((char *)a, (const char *)b)
-uint32_t _asn1_bhash( const void *key, size_t length);
 
 #define MAX_LOG_SIZE 1024      /* maximum number of characters of a log 
message */
 
diff --git a/lib/minitasn1/parser_aux.c b/lib/minitasn1/parser_aux.c
index ff701bc..e35bfa4 100644
--- a/lib/minitasn1/parser_aux.c
+++ b/lib/minitasn1/parser_aux.c
@@ -20,6 +20,7 @@
  */
 
 #include <int.h>
+#include <hash-pjw-bare.h>
 #include "parser_aux.h"
 #include "gstr.h"
 #include "structure.h"
@@ -118,12 +119,12 @@ asn1_find_node (ASN1_TYPE pointer, const char *name)
          n_start = n_end;
          n_start++;
 
-          nhash = _asn1_bhash(n, nsize);
+          nhash = hash_pjw_bare(n, nsize);
        }
       else
        {
          nsize = _asn1_str_cpy (n, sizeof (n), n_start);
-          nhash = _asn1_bhash(n, nsize);
+          nhash = hash_pjw_bare(n, nsize);
 
          n_start = NULL;
        }
@@ -156,12 +157,12 @@ asn1_find_node (ASN1_TYPE pointer, const char *name)
          n_start = n_end;
          n_start++;
 
-          nhash = _asn1_bhash(n, nsize);
+          nhash = hash_pjw_bare(n, nsize);
        }
       else
        {
          nsize = _asn1_str_cpy (n, sizeof (n), n_start);
-          nhash = _asn1_bhash(n, nsize);
+          nhash = hash_pjw_bare(n, nsize);
          n_start = NULL;
        }
 
@@ -365,12 +366,12 @@ unsigned int nsize;
   if (name == NULL)
     {
       node->name[0] = 0;
-      node->name_hash = _asn1_bhash(node->name, 0);
+      node->name_hash = hash_pjw_bare(node->name, 0);
       return node;
     }
 
   nsize = _asn1_str_cpy (node->name, sizeof (node->name), name);
-  node->name_hash = _asn1_bhash(node->name, nsize);
+  node->name_hash = hash_pjw_bare(node->name, nsize);
 
   return node;
 }
@@ -394,7 +395,7 @@ unsigned int nsize;
   if (src == NULL)
     {
       dst->name[0] = 0;
-      dst->name_hash = _asn1_bhash(dst->name, 0);
+      dst->name_hash = hash_pjw_bare(dst->name, 0);
       return dst;
     }
 
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c
index 5b2ce17..d97d43d 100644
--- a/lib/verify-tofu.c
+++ b/lib/verify-tofu.c
@@ -28,7 +28,6 @@
 #include <gnutls_sig.h>
 #include <gnutls_str.h>
 #include <gnutls_datum.h>
-#include <hash.h>
 #include "x509_int.h"
 #include <common.h>
 #include <base64.h>
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index 5b2d3d6..67892e8 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -28,7 +28,6 @@
 #include <libtasn1.h>
 #include <gnutls_pk.h>
 #include "common.h"
-#include "hash.h"
 #include "verify-high.h"
 
 #include <gnutls/ocsp.h>
diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c
index 369e79e..5dafd63 100644
--- a/lib/x509/verify-high.c
+++ b/lib/x509/verify-high.c
@@ -28,7 +28,7 @@
 #include <gnutls_sig.h>
 #include <gnutls_str.h>
 #include <gnutls_datum.h>
-#include <hash.h>
+#include <hash-pjw-bare.h>
 #include "x509_int.h"
 #include <common.h>
 #include "verify-high.h"
@@ -57,7 +57,6 @@ struct gnutls_x509_trust_list_st {
   struct node_st *node;
 };
 
-#define INIT_HASH 0x33a1
 #define DEFAULT_SIZE 503
 
 /**
@@ -171,7 +170,7 @@ gnutls_x509_trust_list_add_cas(gnutls_x509_trust_list_t 
list,
             return i;
         }
 
-        hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+        hash = hash_pjw_bare(dn.data, dn.size);
         hash %= list->size;
 
         _gnutls_free_datum(&dn);
@@ -237,7 +236,7 @@ 
gnutls_x509_trust_list_add_named_crt(gnutls_x509_trust_list_t list,
         return ret;
     }
 
-    hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+    hash = hash_pjw_bare(dn.data, dn.size);
     hash %= list->size;
 
     _gnutls_free_datum(&dn);
@@ -305,7 +304,7 @@ gnutls_x509_trust_list_add_crls(gnutls_x509_trust_list_t 
list,
             return i;
         }
 
-        hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+        hash = hash_pjw_bare(dn.data, dn.size);
         hash %= list->size;
 
         _gnutls_free_datum(&dn);
@@ -384,7 +383,7 @@ static int shorten_clist(gnutls_x509_trust_list_t list,
             return ret;
         }
 
-        hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+        hash = hash_pjw_bare(dn.data, dn.size);
         hash %= list->size;
 
         _gnutls_free_datum(&dn);
@@ -499,7 +498,7 @@ int 
gnutls_x509_trust_list_get_issuer(gnutls_x509_trust_list_t list,
         return ret;
     }
 
-    hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+    hash = hash_pjw_bare(dn.data, dn.size);
     hash %= list->size;
 
     _gnutls_free_datum(&dn);
@@ -568,7 +567,7 @@ gnutls_x509_trust_list_verify_crt(gnutls_x509_trust_list_t 
list,
         return ret;
     }
 
-    hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+    hash = hash_pjw_bare(dn.data, dn.size);
     hash %= list->size;
 
     _gnutls_free_datum(&dn);
@@ -602,7 +601,7 @@ gnutls_x509_trust_list_verify_crt(gnutls_x509_trust_list_t 
list,
             return ret;
         }
 
-        hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+        hash = hash_pjw_bare(dn.data, dn.size);
         hash %= list->size;
 
         _gnutls_free_datum(&dn);
@@ -660,7 +659,7 @@ 
gnutls_x509_trust_list_verify_named_crt(gnutls_x509_trust_list_t list,
         return ret;
     }
 
-    hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+    hash = hash_pjw_bare(dn.data, dn.size);
     hash %= list->size;
 
     _gnutls_free_datum(&dn);
@@ -714,7 +713,7 @@ _gnutls_trustlist_inlist (gnutls_x509_trust_list_t list,
       return ret;
     }
 
-  hash = _gnutls_bhash(dn.data, dn.size, INIT_HASH);
+  hash = hash_pjw_bare(dn.data, dn.size);
   hash %= list->size;
 
   _gnutls_free_datum (&dn);
diff --git a/lib/x509/verify-high2.c b/lib/x509/verify-high2.c
index b0d5471..02ab478 100644
--- a/lib/x509/verify-high2.c
+++ b/lib/x509/verify-high2.c
@@ -28,7 +28,6 @@
 #include <gnutls_sig.h>
 #include <gnutls_str.h>
 #include <gnutls_datum.h>
-#include <hash.h>
 #include "x509_int.h"
 #include <common.h>
 #include "verify-high.h"
diff --git a/maint.mk b/maint.mk
index d5af750..e52deb4 100644
--- a/maint.mk
+++ b/maint.mk
@@ -28,6 +28,28 @@ ifneq ($(build_aux),)
 set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
 endif
 
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it.  Die otherwise.
+member-check =                                                         \
+  $(strip                                                              \
+    $(if $($(1)),                                                      \
+      $(if $(findstring $(_sp),$($(1))),                               \
+          $(error invalid $(1): '$($(1))', expected $(2)),             \
+          $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)),     \
+            $(error invalid $(1): '$($(1))', expected $(2)))),         \
+      $(error $(1) undefined)))
+
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
@@ -52,9 +74,9 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
 # Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
 # when $(srcdir) is not ".".
 ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+  _prepend_srcdir_prefix =
 else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+  _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
 endif
 
 # In order to be able to consistently filter "."-relative names,
@@ -78,32 +100,41 @@ VERSION_REGEXP = $(subst .,\.,$(VERSION))
 PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
 
 ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+  this-vc-tag = v$(VERSION)
+  this-vc-tag-regexp = v$(VERSION_REGEXP)
 else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+  tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+  tag-this-version = $(subst .,_,$(VERSION))
+  this-vc-tag = $(tag-package)-$(tag-this-version)
+  this-vc-tag-regexp = $(this-vc-tag)
 endif
 my_distdir = $(PACKAGE)-$(VERSION)
 
 # Old releases are stored here.
 release_archive_dir ?= ../release
 
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+  VERSION := $(word 1, $(RELEASE))
+  RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
 # Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
 # Use alpha.gnu.org for alpha and beta releases.
 # Use ftp.gnu.org for stable releases.
 gnu_ftp_host-alpha = alpha.gnu.org
 gnu_ftp_host-beta = alpha.gnu.org
 gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
 
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org),       \
+                     http://ftpmirror.gnu.org/$(PACKAGE),              \
+                     ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
 
 # Override this in cfg.mk if you are using a different format in your
 # NEWS file.
@@ -132,9 +163,9 @@ syntax-check-rules := $(sort $(shell sed -n 
's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
 .PHONY: $(syntax-check-rules)
 
 ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+  local-checks-available += $(syntax-check-rules)
 else
-local-checks-available += no-vc-detected
+  local-checks-available += no-vc-detected
 no-vc-detected:
        @echo "No version control files detected; skipping syntax check"
 endif
@@ -330,8 +361,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.
@@ -353,8 +384,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,
@@ -569,8 +601,6 @@ sc_prohibit_c_ctype_without_use:
        @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
          $(_sc_header_without_use)
 
-_empty =
-_sp = $(_empty) $(_empty)
 # The following list was generated by running:
 # man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
 #   | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -723,6 +753,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
@@ -743,7 +774,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:
@@ -779,7 +810,7 @@ sc_prohibit_always_true_header_tests:
 
 sc_prohibit_defined_have_decl_tests:
        @prohibit='#[    ]*if(n?def|.*\<defined)\>[      (]+HAVE_DECL_' \
-       halt='$(ME): HAVE_DECL macros are always defined'               \
+       halt='HAVE_DECL macros are always defined'                      \
          $(_sc_search_regexp)
 
 # ==================================================================
@@ -1019,7 +1050,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 =                                                            \
@@ -1066,7 +1097,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 $<                          \
+       $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $<               \
            | grep -E $(news-check-regexp) >/dev/null; then             \
          :;                                                            \
        else                                                            \
@@ -1122,7 +1153,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$$'                                    \
@@ -1133,7 +1164,7 @@ sc_makefile_path_separator_check:
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
 writable-files:
-       if test -d $(release_archive_dir); then                         \
+       $(AM_V_GEN)if test -d $(release_archive_dir); then              \
          for file in $(DIST_ARCHIVES); do                              \
            for p in ./ $(release_archive_dir)/; do                     \
              test -e $$p$$file || continue;                            \
@@ -1215,13 +1246,13 @@ 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=(^\|/)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'         \
@@ -1230,7 +1261,7 @@ sc_vulnerable_makefile_CVE-2009-4029:
 
 sc_vulnerable_makefile_CVE-2012-3386:
        @prohibit='chmod a\+w \$$\(distdir\)'                           \
-       in_files=(^\|/)Makefile\\.in$$                                  \
+       in_files='(^|/)Makefile\.in$$'                                  \
        halt=$$(printf '%s\n'                                           \
          'the above files are vulnerable; beware of running'           \
          '  "make distcheck", and upgrade to fixed automake'           \
@@ -1238,8 +1269,8 @@ sc_vulnerable_makefile_CVE-2012-3386:
          $(_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;                                               \
@@ -1255,31 +1286,37 @@ 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
 
 # Make info-gnu the default only for a stable release.
-ifeq ($(RELEASE_TYPE),stable)
-  announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-  announcement_mail_headers_ ?=                                                
\
-    To: address@hidden                                         \
-    Cc: $(announcement_Cc_)                                            \
-    Mail-Followup-To: $(PACKAGE_BUGREPORT)
-else
-  announcement_Cc_ ?= $(translation_project_)
-  announcement_mail_headers_ ?=                                                
\
-    To: $(PACKAGE_BUGREPORT)                                           \
-    Cc: $(announcement_Cc_)
-endif
-
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable =             \
+  To: address@hidden                           \
+  Cc: $(announcement_Cc_)                      \
+  Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha =              \
+  To: $(PACKAGE_BUGREPORT)                     \
+  Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
 announcement: NEWS ChangeLog $(rel-files)
-       @$(srcdir)/$(_build-aux)/announce-gen                           \
+# Not $(AM_V_GEN) since the output of this command serves as
+# annoucement message: it would start with " GEN announcement".
+       $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen                  \
            --mail-headers='$(announcement_mail_headers_)'              \
-           --release-type=$(RELEASE_TYPE)                              \
+           --release-type=$(release-type)                              \
            --package=$(PACKAGE)                                        \
            --prev=$(PREV_VERSION)                                      \
            --curr=$(VERSION)                                           \
@@ -1292,6 +1329,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.  ##
 ## ---------------- ##
@@ -1300,16 +1343,22 @@ ftp-gnu = ftp://ftp.gnu.org/gnu
 www-gnu = http://www.gnu.org
 
 upload_dest_dir_ ?= $(PACKAGE)
+upload_command =                                               \
+  $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS)            \
+  --to $(gnu_rel_host):$(upload_dest_dir_)                     \
+  $(rel-files)
 emit_upload_commands:
        @echo =====================================
        @echo =====================================
-       @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\"
-       @echo "    --to $(gnu_rel_host):$(upload_dest_dir_) \\"
-       @echo "  $(rel-files)"
+       @echo '$(upload_command)'
        @echo '# send the ~/announce-$(my_distdir) e-mail'
        @echo =====================================
        @echo =====================================
 
+.PHONY: upload
+upload:
+       $(AM_V_GEN)$(upload_command)
+
 define emit-commit-log
   printf '%s\n' 'maint: post-release administrivia' ''                 \
     '* NEWS: Add header line for next release.'                                
\
@@ -1319,7 +1368,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;                                                  \
@@ -1355,19 +1404,22 @@ public-submodule-commit:
 gl_public_submodule_commit ?= public-submodule-commit
 check: $(gl_public_submodule_commit)
 
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
 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=$@
+
+release:
+       $(AM_V_GEN)$(MAKE) $(release-type)
 
 # Override this in cfg.mk if you follow different procedures.
 release-prep-hook ?= release-prep
@@ -1375,19 +1427,19 @@ release-prep-hook ?= release-prep
 gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
 .PHONY: release-prep
 release-prep:
-       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_GEN)$(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"' 
$(srcdir)/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.
@@ -1395,14 +1447,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
 
@@ -1428,6 +1486,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)
@@ -1461,7 +1544,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)/$@
 
@@ -1534,6 +1617,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)
@@ -1556,7 +1640,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                                        
\
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2e797a9..d0061c1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -70,7 +70,7 @@ ctests = mini-deflate simple gc set_pkcs12_cred certder 
certuniqueid  \
         mini-loss-time mini-tdb mini-dtls-rehandshake mini-record \
         mini-termination mini-x509-cas mini-x509-2 pkcs12_simple \
         mini-emsgsize-dtls mini-handshake-timeout chainverify-unsorted \
-        mini-dtls-heartbeat
+        mini-dtls-heartbeat mini-x509-callbacks
 
 if ENABLE_OCSP
 ctests += ocsp
diff --git a/tests/mini-x509.c b/tests/mini-x509-callbacks.c
similarity index 85%
copy from tests/mini-x509.c
copy to tests/mini-x509-callbacks.c
index 5b58147..9c7a748 100644
--- a/tests/mini-x509.c
+++ b/tests/mini-x509-callbacks.c
@@ -32,7 +32,32 @@
 #include "utils.h"
 #include "eagain-common.h"
 
+/* Tests whether the verify callbacks are operational.
+ */
+
 const char* side;
+static int client_ok = 0, server_ok = 0;
+static int pch_ok = 0;
+
+static int
+client_callback (gnutls_session_t session)
+{
+  client_ok = 1;
+  return 0;
+}
+
+static int post_client_hello_callback (gnutls_session_t session)
+{
+  pch_ok = 1;
+  return 0;
+}
+
+static int
+server_callback (gnutls_session_t session)
+{
+  server_ok = 1;
+  return 0;
+}
 
 static void
 tls_log_func (int level, const char *str)
@@ -83,7 +108,6 @@ const gnutls_datum_t server_key = { server_key_pem,
 
 void doit(void)
 {
-  int exit_code = EXIT_SUCCESS;
   /* Server stuff. */
   gnutls_certificate_credentials_t serverx509cred;
   gnutls_session_t server;
@@ -110,6 +134,8 @@ void doit(void)
   gnutls_transport_set_push_function (server, server_push);
   gnutls_transport_set_pull_function (server, server_pull);
   gnutls_transport_set_ptr (server, (gnutls_transport_ptr_t)server);
+  gnutls_certificate_set_verify_function (serverx509cred, server_callback);
+  gnutls_handshake_set_post_client_hello_function (server, 
post_client_hello_callback);
 
   /* Init client */
   gnutls_certificate_allocate_credentials (&clientx509cred);
@@ -119,6 +145,7 @@ void doit(void)
   gnutls_transport_set_push_function (client, client_push);
   gnutls_transport_set_pull_function (client, client_pull);
   gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t)client);
+  gnutls_certificate_set_verify_function (clientx509cred, client_callback);
 
   HANDSHAKE(client, server);
 
@@ -132,12 +159,13 @@ void doit(void)
   gnutls_certificate_free_credentials (clientx509cred);
 
   gnutls_global_deinit ();
+  
+  if (pch_ok == 0)
+    fail("Post client hello callback wasn't called\n");
+
+  if (server_ok == 0)
+    fail("Server certificate verify callback wasn't called\n");
 
-  if (debug > 0)
-    {
-      if (exit_code == 0)
-        puts ("Self-test successful");
-      else
-        puts ("Self-test failed");
-    }
+  if (client_ok == 0)
+    fail("Client certificate verify callback wasn't called\n");
 }


hooks/post-receive
-- 
GNU gnutls



reply via email to

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