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_2_11_4-56-g705bd41


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_11_4-56-g705bd41
Date: Mon, 06 Dec 2010 15:21:53 +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=705bd41bc85effe81660de90acf10f65bb23977c

The branch, master has been updated
       via  705bd41bc85effe81660de90acf10f65bb23977c (commit)
      from  3ec531a07ddfaddacdef08af6d49abc0eb8d8edd (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 705bd41bc85effe81660de90acf10f65bb23977c
Author: Simon Josefsson <address@hidden>
Date:   Mon Dec 6 16:20:45 2010 +0100

    Update gnulib files.

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

Summary of changes:
 GNUmakefile                       |    2 +-
 build-aux/gendocs.sh              |   12 +++++--
 build-aux/pmccabe.css             |   68 -----------------------------------
 build-aux/pmccabe2html            |   66 +++++++++++++++++-----------------
 gl/Makefile.am                    |   15 +++++++-
 gl/arpa_inet.in.h                 |    4 ++
 gl/float+.h                       |    6 ++--
 gl/gettext.h                      |    2 +-
 gl/inet_ntop.c                    |    2 +-
 gl/intprops.h                     |   14 +++++---
 gl/m4/alloca.m4                   |    6 +---
 gl/m4/arpa_inet_h.m4              |    8 +++--
 gl/m4/getdelim.m4                 |    4 +-
 gl/m4/getline.m4                  |    4 +-
 gl/m4/getpass.m4                  |    8 ++++-
 gl/m4/gnulib-common.m4            |   15 +++++++-
 gl/m4/gnulib-comp.m4              |    3 +-
 gl/m4/mmap-anon.m4                |    6 +---
 gl/m4/printf.m4                   |   26 +++++++-------
 gl/m4/readline.m4                 |   18 ++++++---
 gl/m4/string_h.m4                 |    9 +++--
 gl/m4/sys_ioctl_h.m4              |    4 +-
 gl/m4/sys_select_h.m4             |    4 +-
 gl/m4/sys_socket_h.m4             |   26 +++++++++++---
 gl/m4/unistd_h.m4                 |    7 ++--
 gl/m4/vasnprintf.m4               |    3 +-
 gl/m4/wchar_h.m4                  |    6 ++-
 gl/printf-parse.c                 |    7 ++++
 gl/printf-parse.h                 |    7 ++++
 gl/stdint.in.h                    |   71 +++++++++++++++++++++---------------
 gl/stdio.in.h                     |    7 ++++
 gl/stdlib.in.h                    |    5 +++
 gl/string.in.h                    |   47 ++++++++++++++++++++-----
 gl/sys_select.in.h                |    5 ++-
 gl/sys_socket.in.h                |    9 ++++-
 gl/tests/Makefile.am              |    8 +----
 gl/tests/init.sh                  |    6 +++
 gl/tests/test-select-stdin.c      |    7 +++-
 gl/tests/test-select.c            |   44 ++++++++++++-----------
 gl/tests/test-update-copyright.sh |    1 +
 gl/time.in.h                      |    9 +++++
 gl/unistd.in.h                    |   29 ++++++++++++---
 gl/vasnprintf.c                   |   28 ++++++++++-----
 gl/{tests => }/verify.h           |    0
 gl/wchar.in.h                     |    4 ++
 lib/gl/Makefile.am                |   14 +++++++-
 lib/gl/float+.h                   |    6 ++--
 lib/gl/gettext.h                  |    2 +-
 lib/gl/m4/alloca.m4               |    6 +---
 lib/gl/m4/glibc2.m4               |    6 ++--
 lib/gl/m4/glibc21.m4              |   13 ++++---
 lib/gl/m4/gnulib-common.m4        |   15 +++++++-
 lib/gl/m4/gnulib-comp.m4          |    3 +-
 lib/gl/m4/iconv.m4                |    9 ++++-
 lib/gl/m4/memmem.m4               |   14 ++++---
 lib/gl/m4/mmap-anon.m4            |    6 +---
 lib/gl/m4/printf.m4               |   26 +++++++-------
 lib/gl/m4/string_h.m4             |    9 +++--
 lib/gl/m4/sys_socket_h.m4         |   26 +++++++++++---
 lib/gl/m4/unistd_h.m4             |    7 ++--
 lib/gl/m4/vasnprintf.m4           |    3 +-
 lib/gl/m4/wchar_h.m4              |    6 ++-
 lib/gl/printf-parse.c             |    7 ++++
 lib/gl/printf-parse.h             |    7 ++++
 lib/gl/stdint.in.h                |   71 +++++++++++++++++++++---------------
 lib/gl/stdio.in.h                 |    7 ++++
 lib/gl/stdlib.in.h                |    5 +++
 lib/gl/string.in.h                |   47 ++++++++++++++++++++-----
 lib/gl/sys_socket.in.h            |    9 ++++-
 lib/gl/tests/Makefile.am          |    6 ---
 lib/gl/tests/init.sh              |    6 +++
 lib/gl/tests/intprops.h           |   14 +++++---
 lib/gl/time.in.h                  |    9 +++++
 lib/gl/unistd.in.h                |   29 ++++++++++++---
 lib/gl/vasnprintf.c               |   28 ++++++++++-----
 lib/gl/{tests => }/verify.h       |    8 ++--
 lib/gl/wchar.in.h                 |    4 ++
 libextra/gl/m4/gnulib-common.m4   |   15 +++++++-
 maint.mk                          |   25 +++++++++++--
 79 files changed, 716 insertions(+), 394 deletions(-)
 rename gl/{tests => }/verify.h (100%)
 rename lib/gl/{tests => }/verify.h (95%)

diff --git a/GNUmakefile b/GNUmakefile
index 97fea36..0394d98 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -57,7 +57,7 @@ _have-git-version-gen := \
   $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
 ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
   _is-dist-target ?= $(filter-out %clean, \
-    $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
+    $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
   _is-install-target ?= $(filter-out %check, $(filter 
install%,$(MAKECMDGOALS)))
   ifneq (,$(_is-dist-target)$(_is-install-target))
     _curr-ver := $(shell cd $(srcdir)                          \
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 3c5ca76..3180841 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,9 @@
 # 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=2010-09-17.07
+scriptversion=2010-11-27.07
 
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 2003-2010 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
@@ -22,6 +21,13 @@ scriptversion=2010-09-17.07
 #
 # Original author: Mohit Agarwal.
 # Send bug reports and any other correspondence to address@hidden
+#
+# The latest version of this script, and the companion template, is
+# available from Texinfo CVS:
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template
+#
+# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
 
 prog=`basename "$0"`
 srcdir=`pwd`
diff --git a/build-aux/pmccabe.css b/build-aux/pmccabe.css
index 2d94c91..b78bc10 100644
--- a/build-aux/pmccabe.css
+++ b/build-aux/pmccabe.css
@@ -1,56 +1,41 @@
 body {
-
     font-family: Helvetica, sans-serif;
-
 }
 
 .page_title {
-
     font: 18pt Georgia, serif;
-/*    font-size: 1.5em;
-    font-weight: bold; */
     color: darkred;
-    border-bottom: 2px solid darkred;
 }
 
 .section_title {
-
     font: 14pt Georgia, serif;
     color: darkred;
-    border-bottom: 2px dashed darkred;
 }
 
 .report_timestamp {
-
     color: darkred;
     font-weight: bold;
-
 }
 
 .function_src {
-
     text-align: left;
     background: white;
 }
 
 .resume_table {
-
 }
 
 .resume_header_entry {
-    
     color: black;
 }
 
 .resume_number_entry {
-
     color: darkred;
     font-weight: bold;
     text-align: right;
 }
 
 .ranges_table {
-
     border-spacing: 0px;
     border-bottom: solid 2px black;
     border-top: solid 2px black;
@@ -59,7 +44,6 @@ body {
 }
 
 .ranges_header_entry {
-
     padding: 5px;
     border-bottom: solid 1px black;
     font-size: 1em;
@@ -69,36 +53,26 @@ body {
 }
 
 .ranges_entry {
-
 }
 
 .ranges_entry_simple {
-
     background: #87ff75; 
-
 }
 
 .ranges_entry_moderate {
-
     background: #fffc60;
-
 }
 
 .ranges_entry_high {
-
     background: #ff5a5d;
-
 }
 
 .ranges_entry_untestable {
-
     background: #993300
-
 }
 
 
 .function_table {
-
     border-spacing: 0px;
     border-bottom: solid 2px black;
     border-top: solid 2px black;
@@ -107,7 +81,6 @@ body {
 }
 
 .function_table_caption {
-
     font-size: 1.1em;
     font-weight: bold;
     color: black;
@@ -115,12 +88,10 @@ body {
 }
 
 .function_table_header {
-    
 }
 
 
 .function_table_header_entry {
-
     padding: 5px;
     border-bottom: solid 1px black;
     font-size: 1em;
@@ -130,38 +101,27 @@ body {
 }
 
 .function_entry {
-
-
 }
 
 
 .function_entry_simple {
-
     background: #87ff75; 
-
 }
 
 .function_entry_moderate {
-
     background: #fffc60;
-
 }
 
 .function_entry_high {
-
     background: #ff5a5d;
-
 }
 
 .function_entry_untestable {
-
     background: #993300
-
 }
 
 
 .function_entry_name {
-
     font-size: 1em;
     text-align: left;
     font-weight: bold;
@@ -172,7 +132,6 @@ body {
 }
 
 .function_entry_cyclo {
-
     font-size: 1em;
     text-align: right;
     text-valign: top;
@@ -182,7 +141,6 @@ body {
 }
 
 .function_entry_number {
-
     font-size: 1em;
     text-align: right;
     text-valign: top;
@@ -192,7 +150,6 @@ body {
 }
 
 .function_entry_filename {
-
     font-size: 1em;
     text-align: left;
     text-valign: top;
@@ -200,28 +157,3 @@ body {
     border-top: solid 1px black;
     padding: 3px;
 }
-
-.sidemenu {
-    
-    border: 1px black solid;
-    padding: 5px;
-
-}
-
-.sidemenuheader {
- 
-    color: darkred;
-    font-size: 1.1em;
-    font-weight: bold;
-    border-bottom: 1px dashed darkred;
-}
-
-.sidemenuentry {
-
-
-}
-
-.menu {
-
-}
-
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 28117af..1a4cdd1 100644
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -21,8 +21,10 @@
 
 # Typical Invocation is from a Makefile.am:
 #
-# cyclo-$(PACKAGE).html:
-#      $(PMCCABE) ${top_srcdir}/src/*.[ch] \
+# CYCLO_SOURCES = ${top_srcdir}/src/*.[ch]
+#
+# cyclo-$(PACKAGE).html: $(CYCLO_SOURCES)
+#      $(PMCCABE) $(CYCLO_SOURCES) \
 #              | sort -nr \
 #              | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
 #                      -v lang=html -v name="$(PACKAGE_NAME)" \
@@ -112,12 +114,12 @@ function build_stats()
 
 function html_fnc_table_complete (caption)
 {
-    html_fnc_table(caption, 1, 0, 1, 1, 1, 0, 1)
+    html_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1)
 }
 
 function html_fnc_table_abbrev (caption)
 {
-    html_fnc_table(caption, 1, 0, 1, 0, 1, 0, 0)
+    html_fnc_table(caption, 1, 1, 0, 0, 1, 0, 0)
 }
 
 
@@ -142,7 +144,7 @@ function html_fnc_table (caption,
                     num_lines_p,
                     first_line_p,
                     file_p)
-    for (nfnc = 1; nfnc < nfuncs; nfnc++)
+    for (nfnc = 1; nfnc <= nfuncs; nfnc++)
     {
         html_fnc(nfnc,
                  fname_p,
@@ -423,7 +425,7 @@ function html_fnc (nfun,
                 print codeline
             }
             close(fname nfun "_fn.txt")
-            system("rm " fname nfun "_fn.txt")
+            system("rm " "'" fname "'" nfun "_fn.txt")
             print "</pre>"
             print "</div>"
             print "</td>"
@@ -435,52 +437,51 @@ function html_fnc (nfun,
 
 function html_global_stats ()
 {
-    print "<div class=\"section_title\">Resume</div>"
+    print "<div class=\"section_title\">Summary</div>"
 
-    print "<br/>"
-    print "<table class=\"resume_table\">"
+    print "<table class=\"summary_table\">"
     # Total number of functions
     print "<tr>"
-    print "<td class=\"resume_header_entry\">"
+    print "<td class=\"summary_header_entry\">"
     print "Total number of functions"
     print "</td>"
-    print "<td class=\"resume_number_entry\">"
+    print "<td class=\"summary_number_entry\">"
     print num_of_functions
     print "</td>"
     print "</tr>"
     # Number of simple functions
     print "<tr>"
-    print "<td class=\"resume_header_entry\">"
+    print "<td class=\"summary_header_entry\">"
     print "Number of low risk functions"
     print "</td>"
-    print "<td class=\"resume_number_entry\">"
+    print "<td class=\"summary_number_entry\">"
     print num_of_simple_functions
     print "</td>"
     print "</tr>"
     # Number of moderate functions
     print "<tr>"
-    print "<td class=\"resume_header_entry\">"
+    print "<td class=\"summary_header_entry\">"
     print "Number of moderate risk functions"
     print "</td>"
-    print "<td class=\"resume_number_entry\">"
+    print "<td class=\"summary_number_entry\">"
     print num_of_moderate_functions
     print "</td>"
     print "</tr>"
     # Number of high functions
     print "<tr>"
-    print "<td class=\"resume_header_entry\">"
+    print "<td class=\"summary_header_entry\">"
     print "Number of high risk functions"
     print "</td>"
-    print "<td class=\"resume_number_entry\">"
+    print "<td class=\"summary_number_entry\">"
     print num_of_high_functions
     print "</td>"
     print "</tr>"
     # Number of untestable functions
     print "<tr>"
-    print "<td class=\"resume_header_entry\">"
+    print "<td class=\"summary_header_entry\">"
     print "Number of untestable functions"
     print "</td>"
-    print "<td class=\"resume_number_entry\">"
+    print "<td class=\"summary_number_entry\">"
     print num_of_untestable_functions
     print "</td>"
     print "</tr>"
@@ -491,7 +492,6 @@ function html_global_stats ()
 function html_function_cyclo ()
 {
     print "<div class=\"section_title\">Details for all functions</div>"
-    print "<p>Used ranges:</p>"
 
     print "<table class=\"ranges_table\">"
     print "<tr>"
@@ -560,27 +560,27 @@ function html_function_cyclo ()
 
 function wiki_global_stats ()
 {
-    print "{| class=\"cyclo_resume_table\""
+    print "{| class=\"cyclo_summary_table\""
     # Total number of functions
     print "|-"
-    print "| class=\"cyclo_resume_header_entry\" | Total number of functions"
-    print "| class=\"cyclo_resume_number_entry\" |" num_of_functions
+    print "| class=\"cyclo_summary_header_entry\" | Total number of functions"
+    print "| class=\"cyclo_summary_number_entry\" |" num_of_functions
     # Number of simple functions
     print "|-"
-    print "| class=\"cyclo_resume_header_entry\" | Number of low risk 
functions"
-    print "| class=\"cyclo_resume_number_entry\" |" num_of_simple_functions
+    print "| class=\"cyclo_summary_header_entry\" | Number of low risk 
functions"
+    print "| class=\"cyclo_summary_number_entry\" |" num_of_simple_functions
     # Number of moderate functions
     print "|-"
-    print "| class=\"cyclo_resume_header_entry\" | Number of moderate risk 
functions"
-    print "| class=\"cyclo_resume_number_entry\" |" num_of_moderate_functions
+    print "| class=\"cyclo_summary_header_entry\" | Number of moderate risk 
functions"
+    print "| class=\"cyclo_summary_number_entry\" |" num_of_moderate_functions
     # Number of high functions
     print "|-"
-    print "| class=\"cyclo_resume_header_entry\" | Number of high risk 
functions"
-    print "| class=\"cyclo_resume_number_entry\" |" num_of_high_functions
+    print "| class=\"cyclo_summary_header_entry\" | Number of high risk 
functions"
+    print "| class=\"cyclo_summary_number_entry\" |" num_of_high_functions
     # Number of untestable functions
     print "|-"
-    print "| class=\"cyclo_resume_header_entry\" | Number of untestable 
functions"
-    print "| class=\"cyclo_resume_number_entry\" |" num_of_untestable_functions
+    print "| class=\"cyclo_summary_header_entry\" | Number of untestable 
functions"
+    print "| class=\"cyclo_summary_number_entry\" |" 
num_of_untestable_functions
     print "|}"
 }
 
@@ -624,7 +624,7 @@ function wiki_function_cyclo ()
 
 function wiki_fnc_table_complete (caption)
 {
-    wiki_fnc_table(caption, 1, 0, 1, 1, 1, 0, 1)
+    wiki_fnc_table(caption, 1, 1, 0, 1, 1, 0, 1)
 }
 
 function wiki_fnc_table_abbrev (caption)
@@ -653,7 +653,7 @@ function wiki_fnc_table (caption,
                     num_lines_p,
                     first_line_p,
                     file_p)
-    for (nfnc = 1; nfnc < nfuncs; nfnc++)
+    for (nfnc = 1; nfnc <= nfuncs; nfnc++)
     {
         wiki_fnc(nfnc,
                  fname_p,
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e1b67d7..a4c50aa 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -131,6 +131,7 @@ arpa/inet.h: arpa_inet.in.h $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
              -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
              -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
              -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
@@ -1003,6 +1004,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
              -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
              -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+             -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
              -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
              -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
              < $(srcdir)/string.in.h | \
@@ -1022,6 +1024,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+             -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -1031,6 +1034,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
              -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
              -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
              -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
              -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
@@ -1113,6 +1117,7 @@ sys/socket.h: sys_socket.in.h $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 
's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
+             -e 
's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g'
 \
              -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
              -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -1330,7 +1335,6 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-             -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
              -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
              -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
@@ -1351,6 +1355,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' 
\
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
              -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
              -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@@ -1362,6 +1367,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
              -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
              -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
              -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
@@ -1422,6 +1428,12 @@ EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
 
 ## end   gnulib module vc-list-files
 
+## begin gnulib module verify
+
+libgnu_la_SOURCES += verify.h
+
+## end   gnulib module verify
+
 ## begin gnulib module version-etc
 
 libgnu_la_SOURCES += version-etc.h version-etc.c
@@ -1465,6 +1477,7 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
              -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
              -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
              -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 84a4006..f17d642 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -23,6 +23,10 @@
 #endif
 @PRAGMA_COLUMNS@
 
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
 /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
    under MinGW.
    But avoid namespace pollution on glibc systems.  */
diff --git a/gl/float+.h b/gl/float+.h
index b55e5e6..bf6714a 100644
--- a/gl/float+.h
+++ b/gl/float+.h
@@ -141,8 +141,8 @@
 #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
 
 /* Verify that SIZEOF_FLT <= sizeof (float) etc.  */
-typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
-typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
-typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
+typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1];
+typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1];
+typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1];
 
 #endif /* _FLOATPLUS_H */
diff --git a/gl/gettext.h b/gl/gettext.h
index b1145d5..f08759e 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -54,7 +54,7 @@
    it now, to make later inclusions of <libintl.h> a NOP.  */
 #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
 # include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
 #  include <libintl.h>
 # endif
 #endif
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index baaa23f..8746114 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -49,7 +49,7 @@
  * WARNING: Don't even consider trying to compile this on a system where
  * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
  */
-typedef int verify_int_size[2 * sizeof (int) - 7];
+typedef int verify_int_size[4 <= sizeof (int) ? 1 : -1];
 
 static const char *inet_ntop4 (const unsigned char *src, char *dst, socklen_t 
size);
 #if HAVE_IPV6
diff --git a/gl/intprops.h b/gl/intprops.h
index 46f4d47..0c27875 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -68,13 +68,17 @@
 #  define signed_type_or_expr__(t) 1
 # endif
 
+/* Bound on length of the string representing an unsigned integer
+   value representable in B bits.  log10 (2.0) < 146/485.  The
+   smallest value of B where this bound is not tight is 2621.  */
+# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
 /* Bound on length of the string representing an integer type or expression T.
-   Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
-   add 1 for integer division truncation; add 1 more for a minus sign
-   if needed.  */
+   Subtract 1 for the sign bit if T is signed, and then add 1 more for
+   a minus sign if needed.  */
 # define INT_STRLEN_BOUND(t) \
-  ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
-   + signed_type_or_expr__ (t) + 1)
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
+   + signed_type_or_expr__ (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
    including the terminating null.  */
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index f3ee343..80d67aa 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 9
+# alloca.m4 serial 10
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_ALLOCA],
 [
-  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
-  AC_REQUIRE([AC_PROG_CPP])
-  AC_REQUIRE([AC_PROG_EGREP])
-
   AC_REQUIRE([AC_FUNC_ALLOCA])
   if test $ac_cv_func_alloca_works = no; then
     gl_PREREQ_ALLOCA
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 15a30e2..80fdb40 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
-# arpa_inet_h.m4 serial 8
-dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 10
+dnl Copyright (C) 2006, 2008-2010 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.
@@ -22,11 +22,13 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
   dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
   gl_CHECK_NEXT_HEADERS([arpa/inet.h])
 
+  AC_REQUIRE([gl_FEATURES_H])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
 /* On some systems, this header is not self-consistent.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ || defined __UCLIBC__)
 # include <sys/socket.h>
 #endif
 #include <arpa/inet.h>
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 4beb150..2bbd5cf 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 6
+# getdelim.m4 serial 7
 
 dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
 dnl
@@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
          [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
   Lucky GNU user
  #endif
 #endif
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 8300560..0f8e313 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 21
+# getline.m4 serial 22
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation,
 dnl Inc.
@@ -65,7 +65,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
          [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
   Lucky GNU user
  #endif
 #endif
diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4
index cb80a65..8072e46 100644
--- a/gl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
@@ -1,4 +1,4 @@
-# getpass.m4 serial 11
+# getpass.m4 serial 12
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -8,6 +8,9 @@ dnl with or without modifications, as long as this notice is 
preserved.
 # Provide a getpass() function if the system doesn't have it.
 AC_DEFUN([gl_FUNC_GETPASS],
 [
+  dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   AC_REPLACE_FUNCS([getpass])
   AC_CHECK_DECLS_ONCE([getpass])
   if test $ac_cv_func_getpass = no; then
@@ -19,6 +22,9 @@ AC_DEFUN([gl_FUNC_GETPASS],
 # arbitrary length (not just 8 bytes as on HP-UX).
 AC_DEFUN([gl_FUNC_GETPASS_GNU],
 [
+  dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   AC_CHECK_DECLS_ONCE([getpass])
   dnl TODO: Detect when GNU getpass() is already found in glibc.
   AC_LIBOBJ([getpass])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 4c7ac30..d0c8b66 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 20
+# gnulib-common.m4 serial 21
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
     [Define to 1 when the gnulib module $1 should be tested.])
 ])
 
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+  AC_CHECK_HEADERS_ONCE([features.h])
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+  AC_SUBST([HAVE_FEATURES_H])
+])
+
 # m4_foreach_w
 # is a backport of autoconf-2.59c's m4_foreach_w.
 # Remove this macro when we can assume autoconf >= 2.60.
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 201ec0f..56f86b8 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -437,6 +437,7 @@ AC_SUBST([LTALLOCA])
   # Code from module vasnprintf:
   gl_FUNC_VASNPRINTF
   # Code from module vc-list-files:
+  # Code from module verify:
   # Code from module version-etc:
   gl_VERSION_ETC
   # Code from module version-etc-fsf:
@@ -705,6 +706,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/unistd.in.h
   lib/vasnprintf.c
   lib/vasnprintf.h
+  lib/verify.h
   lib/version-etc-fsf.c
   lib/version-etc.c
   lib/version-etc.h
@@ -861,7 +863,6 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/getpagesize.c
   tests=lib/ioctl.c
   tests=lib/sys_ioctl.in.h
-  tests=lib/verify.h
   tests=lib/w32sock.h
   top/GNUmakefile
   top/maint.mk
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index a6b7b9a..e20fc3c 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 8
+# mmap-anon.m4 serial 9
 dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,10 +15,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_MMAP_ANON],
 [
-  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
-  AC_REQUIRE([AC_PROG_CPP])
-  AC_REQUIRE([AC_PROG_EGREP])
-
   dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index e850862..b1ac378 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 35
+# printf.m4 serial 39
 dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -439,16 +439,9 @@ changequote(,)dnl
                                          # Guess yes on FreeBSD >= 6.
                    freebsd[1-5]*)        
gl_cv_func_printf_infinite_long_double="guessing no";;
                    freebsd* | kfreebsd*) 
gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                         # Guess yes on MacOS X >= 10.3.
-                   darwin[1-6].*)        
gl_cv_func_printf_infinite_long_double="guessing no";;
-                   darwin*)              
gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on HP-UX >= 11.
                    hpux[7-9]* | hpux10*) 
gl_cv_func_printf_infinite_long_double="guessing no";;
                    hpux*)                
gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                         # Guess yes on NetBSD >= 3.
-                   netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | 
netbsdcoff[1-2]*)
-                                         
gl_cv_func_printf_infinite_long_double="guessing no";;
-                   netbsd*)              
gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # If we don't know, assume the worst.
                    *)                    
gl_cv_func_printf_infinite_long_double="guessing no";;
                  esac
@@ -533,7 +526,7 @@ int main ()
              AC_EGREP_CPP([BZ2908], [
                #include <features.h>
                #ifdef __GNU_LIBRARY__
-                #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+                #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 
2)) && !defined __UCLIBC__
                  BZ2908
                 #endif
                #endif
@@ -889,8 +882,9 @@ changequote([,])dnl
 
 dnl Test whether the *printf family of functions supports large precisions.
 dnl On mingw, precisions larger than 512 are treated like 512, in integer,
-dnl floating-point or pointer output. On BeOS, precisions larger than 1044
-dnl crash the program.
+dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
+dnl than 510 in floating-point output crash the program. On BeOS, precisions
+dnl larger than 1044 crash the program.
 dnl Result is gl_cv_func_printf_precision.
 
 AC_DEFUN([gl_PRINTF_PRECISION],
@@ -913,6 +907,8 @@ int main ()
 #endif
   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
     return 1;
+  if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
+    return 2;
   return 0;
 }]])],
         [gl_cv_func_printf_precision=yes],
@@ -920,7 +916,8 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-           # Guess no only on native Win32 and BeOS systems.
+           # Guess no only on Solaris, native Win32, and BeOS systems.
+           solaris*)     gl_cv_func_printf_precision="guessing no" ;;
            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
            beos*)        gl_cv_func_printf_precision="guessing no" ;;
            *)            gl_cv_func_printf_precision="guessing yes" ;;
@@ -1439,12 +1436,14 @@ dnl                                  1  2  3  4  5  6  
7  8  9 10 11 12 13 14 15
 dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  
.  .  .  .  .  .
 dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  
.  .  .  .  .  .
 dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
+dnl   MacOS X 10.5.8                 .  .  .  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
 dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  
.  .  .  .  .  .
 dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  
.  .  .  .  .  .
 dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  
.  .  .  .  .  .
 dnl   Cygwin 1.5.19 (2006)           #  .  .  #  #  #  .  #  .  #  .  #  #  #  
.  .  .  .  .  .
-dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  
.  .  .  .  .  .
 dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  
#  #  #  #  #  #
 dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
@@ -1455,6 +1454,7 @@ dnl   HP-UX 10.20                    #  .  #  .  #  #  .  
?  .  .  #  #  .  .  .
 dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  
.  .  #  .  .  .
 dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  
.  .  #  .  .  #
 dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  
#  #  #  #  #  #
+dnl   NetBSD 5.0                     .  .  .  #  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
 dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  
.  .  .  ?  ?  ?
 dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  
.  .  .  .  .  .
 dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  
.  .  .  .  .  .
diff --git a/gl/m4/readline.m4 b/gl/m4/readline.m4
index 27f8162..7a97ecb 100644
--- a/gl/m4/readline.m4
+++ b/gl/m4/readline.m4
@@ -1,4 +1,4 @@
-# readline.m4 serial 7
+# readline.m4 serial 8
 dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,7 +40,12 @@ AC_DEFUN([gl_FUNC_READLINE],
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
 #include <readline/readline.h>]],
           [[readline((char*)0);]])],
-        [gl_cv_lib_readline=" -l$extra_lib"])
+        [if test -n "$extra_lib"; then
+           gl_cv_lib_readline="yes, requires -l$extra_lib"
+         else
+           gl_cv_lib_readline="yes"
+         fi
+        ])
       if test "$gl_cv_lib_readline" != no; then
         break
       fi
@@ -50,9 +55,10 @@ AC_DEFUN([gl_FUNC_READLINE],
 
   if test "$gl_cv_lib_readline" != no; then
     AC_DEFINE([HAVE_READLINE], [1], [Define if you have the readline library.])
-    if test "$gl_cv_lib_readline" != " -l"; then
-      LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
-      LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"
+    extra_lib=`echo "$gl_cv_lib_readline" | sed -n -e 's/yes, requires //p'`
+    if test -n "$extra_lib"; then
+      LIBREADLINE="$LIBREADLINE $extra_lib"
+      LTLIBREADLINE="$LTLIBREADLINE $extra_lib"
     fi
     AC_MSG_CHECKING([how to link with libreadline])
     AC_MSG_RESULT([$LIBREADLINE])
@@ -68,7 +74,7 @@ AC_DEFUN([gl_FUNC_READLINE],
 
   AC_CHECK_HEADERS([readline/readline.h])
 
-  if test $gl_cv_lib_readline = no; then
+  if test "$gl_cv_lib_readline" = no; then
     AC_LIBOBJ([readline])
     gl_PREREQ_READLINE
   fi
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 1977aec..5844b2d 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 17
+# serial 18
 
 # Written by Paul Eggert.
 
@@ -28,8 +28,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
   gl_WARN_ON_USE_PREPARE([[#include <string.h>
     ]],
     [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
-     strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal
-     strverscmp])
+     strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
+     strsignal strverscmp])
 ])
 
 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -75,6 +75,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
   GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
   GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
+  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
   GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
   GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
   HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
@@ -94,6 +95,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   HAVE_STRSEP=1;                AC_SUBST([HAVE_STRSEP])
   HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
   HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
+  HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
   HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
   HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
@@ -103,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
   REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
   REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
+  REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
   REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
   REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
   REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index f6face2..5c342a5 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,4 +1,4 @@
-# sys_ioctl_h.m4 serial 8
+# sys_ioctl_h.m4 serial 9
 dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,7 @@ AC_DEFUN([gl_SYS_IOCTL_H],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <sys/ioctl.h>
 /* Some platforms declare ioctl in the wrong header.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <unistd.h>
 #endif
     ]], [ioctl])
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index 95e7818..0e8063e 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,4 +1,4 @@
-# sys_select_h.m4 serial 14
+# sys_select_h.m4 serial 15
 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -61,7 +61,7 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
   gl_WARN_ON_USE_PREPARE([[
 /* Some systems require prerequisite headers.  */
 #include <sys/types.h>
-#if !defined __GLIBC__ && HAVE_SYS_TIME_H
+#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
 #include <sys/select.h>
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 9f4db56..c7627cb 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 17
+# sys_socket_h.m4 serial 20
 dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,6 +57,23 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
   if test $ac_cv_type_sa_family_t = no; then
     HAVE_SA_FAMILY_T=0
   fi
+  if test $ac_cv_type_struct_sockaddr_storage != no; then
+    AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
+      [],
+      [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
+      [#include <sys/types.h>
+       #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+       #endif
+       #ifdef HAVE_WS2TCPIP_H
+       #include <ws2tcpip.h>
+       #endif
+      ])
+  fi
+  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+    SYS_SOCKET_H='sys/socket.h'
+  fi
   gl_PREREQ_SYS_H_WINSOCK2
 
   dnl Check for declarations of anything we want to poison if the
@@ -64,10 +81,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
   gl_WARN_ON_USE_PREPARE([[
 /* Some systems require prerequisite headers.  */
 #include <sys/types.h>
-#if !defined __GLIBC__ && HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <sys/select.h>
+#include <sys/socket.h>
     ]], [socket connect accept bind getpeername getsockname getsockopt
     listen recv send recvfrom sendto setsockopt shutdown accept4])
 ])
@@ -148,6 +162,8 @@ AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
   GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
   GNULIB_ACCEPT4=0;     AC_SUBST([GNULIB_ACCEPT4])
   HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+                        AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
   HAVE_SA_FAMILY_T=1;   AC_SUBST([HAVE_SA_FAMILY_T])
   HAVE_ACCEPT4=1;       AC_SUBST([HAVE_ACCEPT4])
 ])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 48d06c7..e2f7f2b 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 46
+# unistd_h.m4 serial 48
 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_UNISTD_H],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
 /* Some systems declare various items in the wrong headers.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <fcntl.h>
 # include <stdio.h>
 # include <stdlib.h>
@@ -104,7 +104,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
-  HAVE_GETDOMAINNAME=1;   AC_SUBST([HAVE_GETDOMAINNAME])
   HAVE_GETDTABLESIZE=1;   AC_SUBST([HAVE_GETDTABLESIZE])
   HAVE_GETGROUPS=1;       AC_SUBST([HAVE_GETGROUPS])
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
@@ -125,6 +124,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
+  HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
   HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
@@ -136,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
+  REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index ebe3c52..9c04520 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 31
+# vasnprintf.m4 serial 32
 dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,6 +40,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 # Prequisites of lib/printf-parse.h, lib/printf-parse.c.
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
+  AC_REQUIRE([gl_FEATURES_H])
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 8cae82d..8c8fad9 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 33
+# wchar_h.m4 serial 35
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -26,6 +26,8 @@ AC_DEFUN([gl_WCHAR_H],
   fi
   AC_SUBST([HAVE_WCHAR_H])
 
+  AC_REQUIRE([gl_FEATURES_H])
+
   AC_REQUIRE([gt_TYPE_WINT_T])
   if test $gt_cv_c_wint_t = yes; then
     HAVE_WINT_T=1
@@ -38,7 +40,7 @@ AC_DEFUN([gl_WCHAR_H],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
 /* Some systems require additional headers.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <stddef.h>
 # include <stdio.h>
 # include <time.h>
diff --git a/gl/printf-parse.c b/gl/printf-parse.c
index f612beb..58cd889 100644
--- a/gl/printf-parse.c
+++ b/gl/printf-parse.c
@@ -206,6 +206,13 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, 
arguments *a)
                   dp->flags |= FLAG_ZERO;
                   cp++;
                 }
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+              else if (*cp == 'I')
+                {
+                  dp->flags |= FLAG_LOCALIZED;
+                  cp++;
+                }
+#endif
               else
                 break;
             }
diff --git a/gl/printf-parse.h b/gl/printf-parse.h
index 0f2b708..1b27040 100644
--- a/gl/printf-parse.h
+++ b/gl/printf-parse.h
@@ -23,6 +23,10 @@
      ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
      STATIC             Set to 'static' to declare the function static.  */
 
+#if HAVE_FEATURES_H
+# include <features.h> /* for __GLIBC__, __UCLIBC__ */
+#endif
+
 #include "printf-args.h"
 
 
@@ -33,6 +37,9 @@
 #define FLAG_SPACE       8      /* space flag */
 #define FLAG_ALT        16      /* # flag */
 #define FLAG_ZERO       32
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+# define FLAG_LOCALIZED 64      /* I flag, uses localized digits */
+#endif
 
 /* arg_index value indicating that no argument is consumed.  */
 #define ARG_NONE        (~(size_t)0)
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 9e81110..9909f57 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -134,40 +134,53 @@ typedef unsigned int gl_uint32_t;
 #define int32_t gl_int32_t
 #define uint32_t gl_uint32_t
 
+/* If the system defines INT64_MAX, assume int64_t works.  That way,
+   if the underlying platform defines int64_t to be a 64-bit long long
+   int, the code below won't mistakenly define it to be a 64-bit long
+   int, which would mess up C++ name mangling.  */
+
+#if INT64_MAX
+# define GL_INT64_T
+#else
 /* Do not undefine int64_t if gnulib is not being used with 64-bit
    types, since otherwise it breaks platforms like Tandem/NSK.  */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+#  undef int64_t
 typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif defined _MSC_VER
+#  undef int64_t
 typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+#  undef int64_t
 typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# endif
 #endif
 
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+#if UINT64_MAX
 # define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
+#else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+#  undef uint64_t
+typedef unsigned long int gl_uint64_t;
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif defined _MSC_VER
+#  undef uint64_t
 typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#  undef uint64_t
 typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# endif
 #endif
 
 /* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
@@ -279,7 +292,8 @@ typedef unsigned long int gl_uintmax_t;
 /* Verify that intmax_t and uintmax_t have the same size.  Too much code
    breaks if this is not the case.  If this check fails, the reason is likely
    to be found in the autoconf macros.  */
-typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) 
- 1];
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
+                                ? 1 : -1];
 
 /* 7.18.2. Limits of specified-width integer types */
 
@@ -311,17 +325,14 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == 
sizeof (uintmax_t)) -
 #define INT32_MAX  2147483647
 #define UINT32_MAX  4294967295U
 
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
+#if defined GL_INT64_T && ! defined INT64_MAX
 /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
    evaluates the latter incorrectly in preprocessor expressions.  */
 # define INT64_MIN  (- INTMAX_C (1) << 63)
 # define INT64_MAX  INTMAX_C (9223372036854775807)
 #endif
 
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
+#if defined GL_UINT64_T && ! defined UINT64_MAX
 # define UINT64_MAX  UINTMAX_C (18446744073709551615)
 #endif
 
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index fedcdfc..45eaa1c 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -57,6 +57,13 @@
 # endif
 #endif
 
+/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+    && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 6fe75d3..e6dcdbc 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -61,6 +61,9 @@
 #endif
 
 #if address@hidden@
+/* Define 'struct random_data'.
+   But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
+# if !GNULIB_defined_struct_random_data
 struct random_data
 {
   int32_t *fptr;                /* Front pointer.  */
@@ -71,6 +74,8 @@ struct random_data
   int rand_sep;                 /* Distance between front and rear.  */
   int32_t *end_ptr;             /* Pointer behind state table.  */
 };
+#  define GNULIB_defined_struct_random_data 1
+# endif
 #endif
 
 #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! 
defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined 
__CYGWIN__)
diff --git a/gl/string.in.h b/gl/string.in.h
index 3d3af33..b0c2ba1 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -51,8 +51,8 @@
 #endif
 
 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
-/* But avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK)  \
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
     && ! defined __GLIBC__
 # include <unistd.h>
 #endif
@@ -87,7 +87,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
                         void *, (void const *__s, int __c, size_t __n),
                         void const *, (void const *__s, int __c, size_t __n));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
 _GL_CXXALIASWARN1 (memchr, void const *,
@@ -172,7 +172,7 @@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, 
size_t)
 _GL_CXXALIAS_SYS_CAST2 (memrchr,
                         void *, (void const *, int, size_t),
                         void const *, (void const *, int, size_t));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
@@ -202,7 +202,7 @@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int 
__c_in)
 _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
                         void *, (void const *__s, int __c_in),
                         void const *, (void const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
 _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
@@ -293,7 +293,7 @@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int 
__c_in)
 _GL_CXXALIAS_SYS_CAST2 (strchrnul,
                         char *, (char const *__s, int __c_in),
                         char const *, (char const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
 _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
@@ -439,7 +439,7 @@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char 
const *__accept)
 _GL_CXXALIAS_SYS_CAST2 (strpbrk,
                         char *, (char const *__s, char const *__accept),
                         const char *, (char const *__s, char const *__accept));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
 _GL_CXXALIASWARN1 (strpbrk, char const *,
@@ -541,7 +541,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
                         char *, (const char *haystack, const char *needle),
                         const char *, (const char *haystack, const char 
*needle));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
 _GL_CXXALIASWARN1 (strstr, const char *,
@@ -590,7 +590,7 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr,
                         char *, (const char *haystack, const char *needle),
                         const char *, (const char *haystack, const char 
*needle));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
 _GL_CXXALIASWARN1 (strcasestr, const char *,
@@ -902,6 +902,35 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
                  "use gnulib module strerror to guarantee non-NULL result");
 #endif
 
+/* Map any int, typically from errno, into an error message.  Multithread-safe.
+   Uses the POSIX declaration, not the glibc declaration.  */
+#if @GNULIB_STRERROR_R@
+# if @REPLACE_STRERROR_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerror_r
+#   define strerror_r rpl_strerror_r
+#  endif
+_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# else
+#  if address@hidden@
+_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# endif
+# if @HAVE_DECL_STRERROR_R@
+_GL_CXXALIASWARN (strerror_r);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror_r
+# if HAVE_RAW_DECL_STRERROR_R
+_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
+                 "use gnulib module strerror_r-posix for portability");
+# endif
+#endif
+
 #if @GNULIB_STRSIGNAL@
 # if @REPLACE_STRSIGNAL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h
index 4ce48e2..49347b6 100644
--- a/gl/sys_select.in.h
+++ b/gl/sys_select.in.h
@@ -51,8 +51,9 @@
 
 /* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
    that relies on memset(), but without including <string.h>.
-   But avoid namespace pollution on glibc systems.  */
-# ifndef __GLIBC__
+   But in any case avoid namespace pollution on glibc systems.  */
+# if (defined __OpenBSD__ || defined __sun || defined __osf__ || defined 
__BEOS__) \
+     && ! defined __GLIBC__
 #  include <string.h>
 # endif
 
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 8fded70..339cabb 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -70,7 +70,14 @@
 typedef unsigned short  sa_family_t;
 #endif
 
-#if address@hidden@
+#if @HAVE_STRUCT_SOCKADDR_STORAGE@
+/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1.  */
+# if address@hidden@
+#  ifndef ss_family
+#   define ss_family __ss_family
+#  endif
+# endif
+#else
 # include <alignof.h>
 /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
    2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
diff --git a/gl/tests/Makefile.am b/gl/tests/Makefile.am
index 9aaf714..acfc33e 100644
--- a/gl/tests/Makefile.am
+++ b/gl/tests/Makefile.am
@@ -298,7 +298,7 @@ check_PROGRAMS += test-select test-select-fd 
test-select-stdin
 test_select_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
 test_select_fd_LDADD = $(LDADD) @LIBSOCKET@
 test_select_stdin_LDADD = $(LDADD) @LIBSOCKET@
-EXTRA_DIST += signature.h test-select.c test-select-fd.c test-select-in.sh 
test-select-out.sh test-select-stdin.c
+EXTRA_DIST += macros.h signature.h test-select.c test-select-fd.c 
test-select-in.sh test-select-out.sh test-select-stdin.c
 
 ## end   gnulib module select-tests
 
@@ -489,12 +489,6 @@ EXTRA_DIST += test-vc-list-files-git.sh 
test-vc-list-files-cvs.sh init.sh
 
 ## end   gnulib module vc-list-files-tests
 
-## begin gnulib module verify
-
-libtests_a_SOURCES += verify.h
-
-## end   gnulib module verify
-
 ## begin gnulib module verify-tests
 
 TESTS_ENVIRONMENT += MAKE='$(MAKE)'
diff --git a/gl/tests/init.sh b/gl/tests/init.sh
index a57de77..14f3b19 100644
--- a/gl/tests/init.sh
+++ b/gl/tests/init.sh
@@ -330,6 +330,12 @@ setup_()
     || fail_ "failed to create temporary directory in $initial_cwd_"
   cd "$test_dir_"
 
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
   # This trap statement, along with a trap on 0 below, ensure that the
   # temporary directory, $test_dir_, is removed upon exit as well as
   # upon receipt of any of the listed signals.
diff --git a/gl/tests/test-select-stdin.c b/gl/tests/test-select-stdin.c
index e9cee96..c88698c 100644
--- a/gl/tests/test-select-stdin.c
+++ b/gl/tests/test-select-stdin.c
@@ -24,6 +24,8 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#include "macros.h"
+
 int
 main (void)
 {
@@ -67,14 +69,15 @@ main (void)
               exit (1);
             }
           /* Timeout */
-          printf ("."); fflush (stdout);
+          printf (".");
+          ASSERT (fflush (stdout) == 0);
         }
       else
         {
           char c;
 
           printf ("Input available! Trying to read 1 byte...\n");
-          read (0, &c, 1);
+          ASSERT (read (0, &c, 1) == 1);
         }
     }
 }
diff --git a/gl/tests/test-select.c b/gl/tests/test-select.c
index 884e823..9c895c3 100644
--- a/gl/tests/test-select.c
+++ b/gl/tests/test-select.c
@@ -48,6 +48,8 @@ SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
 #include <sys/ioctl.h>
 #include <errno.h>
 
+#include "macros.h"
+
 enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 };
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -263,9 +265,9 @@ test_connect_first (void)
 
   addrlen = sizeof (ia);
   c2 = accept (s, (struct sockaddr *) &ia, &addrlen);
-  close (s);
-  close (c1);
-  close (c2);
+  ASSERT (close (s) == 0);
+  ASSERT (close (c1) == 0);
+  ASSERT (close (c2) == 0);
 }
 
 
@@ -289,26 +291,26 @@ test_accept_first (void)
     {
       addrlen = sizeof (ia);
       c = accept (s, (struct sockaddr *) &ia, &addrlen);
-      close (s);
-      write (c, "foo", 3);
-      read (c, buf, 3);
+      ASSERT (close (s) == 0);
+      ASSERT (write (c, "foo", 3) == 3);
+      ASSERT (read (c, buf, 3) == 3);
       shutdown (c, SHUT_RD);
-      close (c);
+      ASSERT (close (c) == 0);
       exit (0);
     }
   else
     {
-      close (s);
+      ASSERT (close (s) == 0);
       c = connect_to_socket (true);
       if (do_select_nowait (c, SEL_OUT) != SEL_OUT)
         failed ("cannot write after blocking connect");
-      write (c, "foo", 3);
+      ASSERT (write (c, "foo", 3) == 3);
       wait (&pid);
       if (do_select_wait (c, SEL_IN) != SEL_IN)
         failed ("cannot read data left in the socket by closed process");
-      read (c, buf, 3);
-      write (c, "foo", 3);
-      close (c);
+      ASSERT (read (c, buf, 3) == 3);
+      ASSERT (write (c, "foo", 3) == 3);
+      ASSERT (close (c) == 0);
     }
 #endif
 }
@@ -325,13 +327,13 @@ test_pair (int rd, int wd)
   if (do_select_nowait (wd, SEL_IN | SEL_OUT | SEL_EXC) != SEL_OUT)
     failed ("expecting writability before writing");
 
-  write (wd, "foo", 3);
+  ASSERT (write (wd, "foo", 3) == 3);
   if (do_select_wait (rd, SEL_IN) != SEL_IN)
     failed ("expecting readability after writing");
   if (do_select_nowait (rd, SEL_IN) != SEL_IN)
     failed ("expecting readability after writing");
 
-  read (rd, buf, 3);
+  ASSERT (read (rd, buf, 3) == 3);
 }
 
 
@@ -347,12 +349,12 @@ test_socket_pair (void)
   int c1 = connect_to_socket (false);
   int c2 = accept (s, (struct sockaddr *) &ia, &addrlen);
 
-  close (s);
+  ASSERT (close (s) == 0);
 
   test_pair (c1, c2);
-  close (c1);
-  write (c2, "foo", 3);
-  close (c2);
+  ASSERT (close (c1) == 0);
+  ASSERT (write (c2, "foo", 3) == 3);
+  ASSERT (close (c2) == 0);
 }
 
 
@@ -363,10 +365,10 @@ test_pipe (void)
 {
   int fd[2];
 
-  pipe (fd);
+  ASSERT (pipe (fd) == 0);
   test_pair (fd[0], fd[1]);
-  close (fd[0]);
-  close (fd[1]);
+  ASSERT (close (fd[0]) == 0);
+  ASSERT (close (fd[1]) == 0);
 }
 
 
diff --git a/gl/tests/test-update-copyright.sh 
b/gl/tests/test-update-copyright.sh
index fbf4f23..ea700c9 100755
--- a/gl/tests/test-update-copyright.sh
+++ b/gl/tests/test-update-copyright.sh
@@ -25,6 +25,7 @@ fi
 
 # Ensure the update-copyright program gets found.
 PATH=$abs_aux_dir:$PATH
+export PATH
 
 TMP_BASE=update-copyright.test
 trap 'rm -f $TMP_BASE*' 0 1 2 3 15
diff --git a/gl/time.in.h b/gl/time.in.h
index 1d34416..0f6adac 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -84,6 +84,15 @@ struct timespec
 #  endif
 # endif
 
+/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
+   time_t to be an integer type, even though C99 permits floating
+   point.  We don't know of any implementation that uses floating
+   point, and it is much easier to write code that doesn't have to
+   worry about that corner case, so we force the issue.  */
+struct __time_t_must_be_integral {
+  unsigned int __floating_time_t_unsupported : (time_t) 1;
+};
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
    <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index fb44e48..fcf7c43 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -61,14 +61,16 @@
 /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
-     || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+     || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
+         && defined __CYGWIN__)) \
     && ! defined __GLIBC__
 # include <stdio.h>
 #endif
 
 /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
+    && ! defined __GLIBC__
 # include <fcntl.h>
 #endif
 
@@ -86,6 +88,13 @@
 # include <io.h>
 #endif
 
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+    && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
 #if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
      || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
 /* Get ssize_t.  */
@@ -549,13 +558,21 @@ _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
    Null terminate it if the name is shorter than LEN.
    If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
    Return 0 if successful, otherwise set errno and return -1.  */
-# if address@hidden@
+# if @REPLACE_GETDOMAINNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getdomainname
+#   define getdomainname rpl_getdomainname
+#  endif
+_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
+                                      _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
+# else
+#  if address@hidden@
 _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
                                       _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
 # endif
-/* Need to cast, because on MacOS X 10.5 systems, the second parameter is
-                                                        int len.  */
-_GL_CXXALIAS_SYS_CAST (getdomainname, int, (char *name, size_t len));
 _GL_CXXALIASWARN (getdomainname);
 #elif defined GNULIB_POSIXCHECK
 # undef getdomainname
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index e618901..1e9cd43 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -88,6 +88,8 @@
 /* Checked size_t computations.  */
 #include "xsize.h"
 
+#include "verify.h"
+
 #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
 # include <math.h>
 # include "float+.h"
@@ -277,7 +279,7 @@ decimal_point_char (void)
      multithread-safe on glibc systems and MacOS X systems, but is not required
      to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
      localeconv() is rarely multithread-safe.  */
-#  if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined 
__MACH__))
+#  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined 
__APPLE__ && defined __MACH__))
   point = nl_langinfo (RADIXCHAR);
 #  elif 1
   char pointbuf[5];
@@ -322,11 +324,11 @@ is_infinite_or_zerol (long double x)
 
 typedef unsigned int mp_limb_t;
 # define GMP_LIMB_BITS 32
-typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == 
GMP_LIMB_BITS) - 1];
+verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
 
 typedef unsigned long long mp_twolimb_t;
 # define GMP_TWOLIMB_BITS 64
-typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == 
GMP_TWOLIMB_BITS) - 1];
+verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
 
 /* Representation of a bignum >= 0.  */
 typedef struct
@@ -2621,7 +2623,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 #  if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1];
+                  verify (sizeof (TCHAR_T) == 1);
                   TCHAR_T *tmpsrc;
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -4597,6 +4599,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 TCHAR_T *fbp;
                 unsigned int prefix_count;
                 int prefixes[2] IF_LINT (= { 0 });
+                int orig_errno;
 #if !USE_SNPRINTF
                 size_t tmp_length;
                 TCHAR_T tmpbuf[700];
@@ -4751,6 +4754,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   *fbp++ = ' ';
                 if (flags & FLAG_ALT)
                   *fbp++ = '#';
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+                if (flags & FLAG_LOCALIZED)
+                  *fbp++ = 'I';
+#endif
                 if (!pad_ourselves)
                   {
                     if (flags & FLAG_ZERO)
@@ -4834,14 +4841,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #endif
                   *fbp = dp->conversion;
 #if USE_SNPRINTF
-# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined 
_WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && 
!defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined 
__CYGWIN__))
                 fbp[1] = '%';
                 fbp[2] = 'n';
                 fbp[3] = '\0';
 # else
                 /* On glibc2 systems from glibc >= 2.3 - probably also older
-                   ones - we know that snprintf's returns value conforms to
-                   ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
+                   ones - we know that snprintf's return value conforms to
+                   ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+                   gl_SNPRINTF_TRUNCATION_C99 pass.
                    Therefore we can avoid using %n in this situation.
                    On glibc2 systems from 2004-10-18 or newer, the use of %n
                    in format strings in writable memory may crash the program
@@ -4900,6 +4908,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 *(TCHAR_T *) (result + length) = '\0';
 #endif
 
+                orig_errno = errno;
+
                 for (;;)
                   {
                     int count = -1;
@@ -5284,8 +5294,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                         DCHAR_T *tmpdst;
                         size_t tmpdst_len;
                         /* This code assumes that TCHAR_T is 'char'.  */
-                        typedef int TCHAR_T_verify
-                                    [2 * (sizeof (TCHAR_T) == 1) - 1];
+                        verify (sizeof (TCHAR_T) == 1);
 # if USE_SNPRINTF
                         tmpsrc = (TCHAR_T *) (result + length);
 # else
@@ -5498,6 +5507,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     length += count;
                     break;
                   }
+                errno = orig_errno;
 #undef pad_ourselves
 #undef prec_ourselves
               }
diff --git a/gl/tests/verify.h b/gl/verify.h
similarity index 100%
rename from gl/tests/verify.h
rename to gl/verify.h
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index c0ff224..c22dc06 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -53,6 +53,10 @@
 
 #define _GL_ALREADY_INCLUDING_WCHAR_H
 
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 423ad33..210cecc 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -693,6 +693,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
              -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
              -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+             -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
              -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
              -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
              < $(srcdir)/string.in.h | \
@@ -712,6 +713,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+             -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -721,6 +723,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
              -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+             -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
              -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
              -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
              -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
@@ -808,6 +811,7 @@ sys/socket.h: sys_socket.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 
's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
+             -e 
's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g'
 \
              -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
              -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -996,7 +1000,6 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-             -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
              -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
              -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
@@ -1017,6 +1020,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' 
\
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
              -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
              -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@@ -1028,6 +1032,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
              -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
              -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
              -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
@@ -1076,6 +1081,12 @@ EXTRA_liblgnu_la_SOURCES += asprintf.c vasprintf.c
 
 ## end   gnulib module vasprintf
 
+## begin gnulib module verify
+
+liblgnu_la_SOURCES += verify.h
+
+## end   gnulib module verify
+
 ## begin gnulib module vsnprintf
 
 
@@ -1116,6 +1127,7 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
              -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
              -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
              -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
diff --git a/lib/gl/float+.h b/lib/gl/float+.h
index 3167ebf..bc35df8 100644
--- a/lib/gl/float+.h
+++ b/lib/gl/float+.h
@@ -141,8 +141,8 @@
 #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
 
 /* Verify that SIZEOF_FLT <= sizeof (float) etc.  */
-typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
-typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
-typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
+typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1];
+typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1];
+typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1];
 
 #endif /* _FLOATPLUS_H */
diff --git a/lib/gl/gettext.h b/lib/gl/gettext.h
index 5c7e22d..d743a2b 100644
--- a/lib/gl/gettext.h
+++ b/lib/gl/gettext.h
@@ -54,7 +54,7 @@
    it now, to make later inclusions of <libintl.h> a NOP.  */
 #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
 # include <cstdlib>
-# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
 #  include <libintl.h>
 # endif
 #endif
diff --git a/lib/gl/m4/alloca.m4 b/lib/gl/m4/alloca.m4
index f3ee343..80d67aa 100644
--- a/lib/gl/m4/alloca.m4
+++ b/lib/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 9
+# alloca.m4 serial 10
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_ALLOCA],
 [
-  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
-  AC_REQUIRE([AC_PROG_CPP])
-  AC_REQUIRE([AC_PROG_EGREP])
-
   AC_REQUIRE([AC_FUNC_ALLOCA])
   if test $ac_cv_func_alloca_works = no; then
     gl_PREREQ_ALLOCA
diff --git a/lib/gl/m4/glibc2.m4 b/lib/gl/m4/glibc2.m4
index f148c12..b92208a 100644
--- a/lib/gl/m4/glibc2.m4
+++ b/lib/gl/m4/glibc2.m4
@@ -1,5 +1,5 @@
-# glibc2.m4 serial 2
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc2.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010 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.
@@ -15,7 +15,7 @@ AC_DEFUN([gt_GLIBC2],
         [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
   Lucky GNU user
  #endif
 #endif
diff --git a/lib/gl/m4/glibc21.m4 b/lib/gl/m4/glibc21.m4
index 68ada9d..bd08b38 100644
--- a/lib/gl/m4/glibc21.m4
+++ b/lib/gl/m4/glibc21.m4
@@ -1,17 +1,17 @@
-# glibc21.m4 serial 4
-dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010 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.
 
-# Test for the GNU C Library, version 2.1 or newer.
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
 # From Bruno Haible.
 
 AC_DEFUN([gl_GLIBC21],
   [
-    AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+    AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
       [ac_cv_gnu_library_2_1],
-      [AC_EGREP_CPP([Lucky GNU user],
+      [AC_EGREP_CPP([Lucky],
         [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
@@ -19,6 +19,9 @@ AC_DEFUN([gl_GLIBC21],
   Lucky GNU user
  #endif
 #endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
         ],
         [ac_cv_gnu_library_2_1=yes],
         [ac_cv_gnu_library_2_1=no])
diff --git a/lib/gl/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4
index 4c7ac30..d0c8b66 100644
--- a/lib/gl/m4/gnulib-common.m4
+++ b/lib/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 20
+# gnulib-common.m4 serial 21
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
     [Define to 1 when the gnulib module $1 should be tested.])
 ])
 
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+  AC_CHECK_HEADERS_ONCE([features.h])
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+  AC_SUBST([HAVE_FEATURES_H])
+])
+
 # m4_foreach_w
 # is a backport of autoconf-2.59c's m4_foreach_w.
 # Remove this macro when we can assume autoconf >= 2.60.
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 733ed45..58358c5 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -240,6 +240,7 @@ AC_DEFUN([lgl_INIT],
   m4_ifdef([AM_XGETTEXT_OPTION],
     [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
      AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+  # Code from module verify:
   # Code from module vsnprintf:
   gl_FUNC_VSNPRINTF
   gl_STDIO_MODULE_INDICATOR([vsnprintf])
@@ -455,6 +456,7 @@ AC_DEFUN([lgl_FILE_LIST], [
   lib/vasnprintf.c
   lib/vasnprintf.h
   lib/vasprintf.c
+  lib/verify.h
   lib/vsnprintf.c
   lib/w32sock.h
   lib/wchar.in.h
@@ -588,5 +590,4 @@ AC_DEFUN([lgl_FILE_LIST], [
   tests=lib/dummy.c
   tests=lib/getpagesize.c
   tests=lib/intprops.h
-  tests=lib/verify.h
 ])
diff --git a/lib/gl/m4/iconv.m4 b/lib/gl/m4/iconv.m4
index 425145c..7d19594 100644
--- a/lib/gl/m4/iconv.m4
+++ b/lib/gl/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 15 (gettext-0.18.2)
+# iconv.m4 serial 16 (gettext-0.18.2)
 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -252,5 +252,12 @@ size_t iconv();
          $am_cv_proto_iconv])
     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
       [Define as const if the declaration of iconv() needs const.])
+    dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+    m4_ifdef([gl_ICONV_H_DEFAULTS],
+      [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+       if test -n "$am_cv_proto_iconv_arg1"; then
+         ICONV_CONST="const"
+       fi
+      ])
   fi
 ])
diff --git a/lib/gl/m4/memmem.m4 b/lib/gl/m4/memmem.m4
index 553a81c..a4284dc 100644
--- a/lib/gl/m4/memmem.m4
+++ b/lib/gl/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 16
+# memmem.m4 serial 19
 dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software
 dnl Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -35,12 +35,13 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
            [
 #ifdef __GNU_LIBRARY__
  #include <features.h>
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
   Lucky user
  #endif
 #elif defined __CYGWIN__
  #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_MAJOR >= 1007 && CYGWIN_VERSION_DLL_MINOR > 7
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
   Lucky user
  #endif
 #else
@@ -63,7 +64,7 @@ dnl Additionally, check that memmem is efficient and handles 
empty needles.
 AC_DEFUN([gl_FUNC_MEMMEM],
 [
   AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE])
-  if test $HAVE_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
+  if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
     AC_CACHE_CHECK([whether memmem works in linear time],
       [gl_cv_func_memmem_works_fast],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -98,13 +99,14 @@ static void quit (int sig) { exit (sig + 128); }
            [
 #include <features.h>
 #ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !defined __UCLIBC__
   Lucky user
  #endif
 #endif
 #ifdef __CYGWIN__
  #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_MAJOR >= 1007 && CYGWIN_VERSION_DLL_MINOR > 7
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
   Lucky user
  #endif
 #endif
diff --git a/lib/gl/m4/mmap-anon.m4 b/lib/gl/m4/mmap-anon.m4
index a6b7b9a..e20fc3c 100644
--- a/lib/gl/m4/mmap-anon.m4
+++ b/lib/gl/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 8
+# mmap-anon.m4 serial 9
 dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,10 +15,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_MMAP_ANON],
 [
-  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
-  AC_REQUIRE([AC_PROG_CPP])
-  AC_REQUIRE([AC_PROG_EGREP])
-
   dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
diff --git a/lib/gl/m4/printf.m4 b/lib/gl/m4/printf.m4
index e850862..b1ac378 100644
--- a/lib/gl/m4/printf.m4
+++ b/lib/gl/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 35
+# printf.m4 serial 39
 dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -439,16 +439,9 @@ changequote(,)dnl
                                          # Guess yes on FreeBSD >= 6.
                    freebsd[1-5]*)        
gl_cv_func_printf_infinite_long_double="guessing no";;
                    freebsd* | kfreebsd*) 
gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                         # Guess yes on MacOS X >= 10.3.
-                   darwin[1-6].*)        
gl_cv_func_printf_infinite_long_double="guessing no";;
-                   darwin*)              
gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on HP-UX >= 11.
                    hpux[7-9]* | hpux10*) 
gl_cv_func_printf_infinite_long_double="guessing no";;
                    hpux*)                
gl_cv_func_printf_infinite_long_double="guessing yes";;
-                                         # Guess yes on NetBSD >= 3.
-                   netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | 
netbsdcoff[1-2]*)
-                                         
gl_cv_func_printf_infinite_long_double="guessing no";;
-                   netbsd*)              
gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # If we don't know, assume the worst.
                    *)                    
gl_cv_func_printf_infinite_long_double="guessing no";;
                  esac
@@ -533,7 +526,7 @@ int main ()
              AC_EGREP_CPP([BZ2908], [
                #include <features.h>
                #ifdef __GNU_LIBRARY__
-                #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+                #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 
2)) && !defined __UCLIBC__
                  BZ2908
                 #endif
                #endif
@@ -889,8 +882,9 @@ changequote([,])dnl
 
 dnl Test whether the *printf family of functions supports large precisions.
 dnl On mingw, precisions larger than 512 are treated like 512, in integer,
-dnl floating-point or pointer output. On BeOS, precisions larger than 1044
-dnl crash the program.
+dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
+dnl than 510 in floating-point output crash the program. On BeOS, precisions
+dnl larger than 1044 crash the program.
 dnl Result is gl_cv_func_printf_precision.
 
 AC_DEFUN([gl_PRINTF_PRECISION],
@@ -913,6 +907,8 @@ int main ()
 #endif
   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
     return 1;
+  if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
+    return 2;
   return 0;
 }]])],
         [gl_cv_func_printf_precision=yes],
@@ -920,7 +916,8 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-           # Guess no only on native Win32 and BeOS systems.
+           # Guess no only on Solaris, native Win32, and BeOS systems.
+           solaris*)     gl_cv_func_printf_precision="guessing no" ;;
            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
            beos*)        gl_cv_func_printf_precision="guessing no" ;;
            *)            gl_cv_func_printf_precision="guessing yes" ;;
@@ -1439,12 +1436,14 @@ dnl                                  1  2  3  4  5  6  
7  8  9 10 11 12 13 14 15
 dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  
.  .  .  .  .  .
 dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  
.  .  .  .  .  .
 dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
+dnl   MacOS X 10.5.8                 .  .  .  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   MacOS X 10.3.9                 .  .  .  .  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
 dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  
.  .  .  .  .  .
 dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  
.  .  .  .  .  .
 dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  
.  .  .  .  .  .
 dnl   Cygwin 1.5.19 (2006)           #  .  .  #  #  #  .  #  .  #  .  #  #  #  
.  .  .  .  .  .
-dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  
.  .  .  .  .  .
 dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  
#  #  #  #  #  #
 dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
@@ -1455,6 +1454,7 @@ dnl   HP-UX 10.20                    #  .  #  .  #  #  .  
?  .  .  #  #  .  .  .
 dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  
.  .  #  .  .  .
 dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  
.  .  #  .  .  #
 dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  
#  #  #  #  #  #
+dnl   NetBSD 5.0                     .  .  .  #  #  .  .  .  .  .  .  #  .  #  
.  .  .  .  .  .
 dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  
.  .  .  ?  ?  ?
 dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  
.  .  .  .  .  .
 dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  
.  .  .  .  .  .
diff --git a/lib/gl/m4/string_h.m4 b/lib/gl/m4/string_h.m4
index 1977aec..5844b2d 100644
--- a/lib/gl/m4/string_h.m4
+++ b/lib/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 17
+# serial 18
 
 # Written by Paul Eggert.
 
@@ -28,8 +28,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
   gl_WARN_ON_USE_PREPARE([[#include <string.h>
     ]],
     [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
-     strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal
-     strverscmp])
+     strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
+     strsignal strverscmp])
 ])
 
 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -75,6 +75,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
   GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
   GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
+  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
   GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
   GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
   HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
@@ -94,6 +95,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   HAVE_STRSEP=1;                AC_SUBST([HAVE_STRSEP])
   HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
   HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
+  HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
   HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
   HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
@@ -103,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRSTR=0;             AC_SUBST([REPLACE_STRSTR])
   REPLACE_STRCASESTR=0;         AC_SUBST([REPLACE_STRCASESTR])
   REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
+  REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
   REPLACE_STRNCAT=0;            AC_SUBST([REPLACE_STRNCAT])
   REPLACE_STRNDUP=0;            AC_SUBST([REPLACE_STRNDUP])
   REPLACE_STRNLEN=0;            AC_SUBST([REPLACE_STRNLEN])
diff --git a/lib/gl/m4/sys_socket_h.m4 b/lib/gl/m4/sys_socket_h.m4
index 9f4db56..c7627cb 100644
--- a/lib/gl/m4/sys_socket_h.m4
+++ b/lib/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 17
+# sys_socket_h.m4 serial 20
 dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,6 +57,23 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
   if test $ac_cv_type_sa_family_t = no; then
     HAVE_SA_FAMILY_T=0
   fi
+  if test $ac_cv_type_struct_sockaddr_storage != no; then
+    AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
+      [],
+      [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
+      [#include <sys/types.h>
+       #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+       #endif
+       #ifdef HAVE_WS2TCPIP_H
+       #include <ws2tcpip.h>
+       #endif
+      ])
+  fi
+  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+    SYS_SOCKET_H='sys/socket.h'
+  fi
   gl_PREREQ_SYS_H_WINSOCK2
 
   dnl Check for declarations of anything we want to poison if the
@@ -64,10 +81,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
   gl_WARN_ON_USE_PREPARE([[
 /* Some systems require prerequisite headers.  */
 #include <sys/types.h>
-#if !defined __GLIBC__ && HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <sys/select.h>
+#include <sys/socket.h>
     ]], [socket connect accept bind getpeername getsockname getsockopt
     listen recv send recvfrom sendto setsockopt shutdown accept4])
 ])
@@ -148,6 +162,8 @@ AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
   GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
   GNULIB_ACCEPT4=0;     AC_SUBST([GNULIB_ACCEPT4])
   HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+                        AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
   HAVE_SA_FAMILY_T=1;   AC_SUBST([HAVE_SA_FAMILY_T])
   HAVE_ACCEPT4=1;       AC_SUBST([HAVE_ACCEPT4])
 ])
diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index 48d06c7..e2f7f2b 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 46
+# unistd_h.m4 serial 48
 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,7 @@ AC_DEFUN([gl_UNISTD_H],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
 /* Some systems declare various items in the wrong headers.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <fcntl.h>
 # include <stdio.h>
 # include <stdlib.h>
@@ -104,7 +104,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
-  HAVE_GETDOMAINNAME=1;   AC_SUBST([HAVE_GETDOMAINNAME])
   HAVE_GETDTABLESIZE=1;   AC_SUBST([HAVE_GETDTABLESIZE])
   HAVE_GETGROUPS=1;       AC_SUBST([HAVE_GETGROUPS])
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
@@ -125,6 +124,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
+  HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
   HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
@@ -136,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
+  REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETGROUPS=0;    AC_SUBST([REPLACE_GETGROUPS])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
diff --git a/lib/gl/m4/vasnprintf.m4 b/lib/gl/m4/vasnprintf.m4
index ebe3c52..9c04520 100644
--- a/lib/gl/m4/vasnprintf.m4
+++ b/lib/gl/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 31
+# vasnprintf.m4 serial 32
 dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,6 +40,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 # Prequisites of lib/printf-parse.h, lib/printf-parse.c.
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
+  AC_REQUIRE([gl_FEATURES_H])
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
diff --git a/lib/gl/m4/wchar_h.m4 b/lib/gl/m4/wchar_h.m4
index 8cae82d..8c8fad9 100644
--- a/lib/gl/m4/wchar_h.m4
+++ b/lib/gl/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 33
+# wchar_h.m4 serial 35
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -26,6 +26,8 @@ AC_DEFUN([gl_WCHAR_H],
   fi
   AC_SUBST([HAVE_WCHAR_H])
 
+  AC_REQUIRE([gl_FEATURES_H])
+
   AC_REQUIRE([gt_TYPE_WINT_T])
   if test $gt_cv_c_wint_t = yes; then
     HAVE_WINT_T=1
@@ -38,7 +40,7 @@ AC_DEFUN([gl_WCHAR_H],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
 /* Some systems require additional headers.  */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <stddef.h>
 # include <stdio.h>
 # include <time.h>
diff --git a/lib/gl/printf-parse.c b/lib/gl/printf-parse.c
index 85be6d1..2b8cc7b 100644
--- a/lib/gl/printf-parse.c
+++ b/lib/gl/printf-parse.c
@@ -206,6 +206,13 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, 
arguments *a)
                   dp->flags |= FLAG_ZERO;
                   cp++;
                 }
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+              else if (*cp == 'I')
+                {
+                  dp->flags |= FLAG_LOCALIZED;
+                  cp++;
+                }
+#endif
               else
                 break;
             }
diff --git a/lib/gl/printf-parse.h b/lib/gl/printf-parse.h
index 685f7f7..853cc47 100644
--- a/lib/gl/printf-parse.h
+++ b/lib/gl/printf-parse.h
@@ -23,6 +23,10 @@
      ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
      STATIC             Set to 'static' to declare the function static.  */
 
+#if HAVE_FEATURES_H
+# include <features.h> /* for __GLIBC__, __UCLIBC__ */
+#endif
+
 #include "printf-args.h"
 
 
@@ -33,6 +37,9 @@
 #define FLAG_SPACE       8      /* space flag */
 #define FLAG_ALT        16      /* # flag */
 #define FLAG_ZERO       32
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+# define FLAG_LOCALIZED 64      /* I flag, uses localized digits */
+#endif
 
 /* arg_index value indicating that no argument is consumed.  */
 #define ARG_NONE        (~(size_t)0)
diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h
index 1da1635..6fafca4 100644
--- a/lib/gl/stdint.in.h
+++ b/lib/gl/stdint.in.h
@@ -134,40 +134,53 @@ typedef unsigned int gl_uint32_t;
 #define int32_t gl_int32_t
 #define uint32_t gl_uint32_t
 
+/* If the system defines INT64_MAX, assume int64_t works.  That way,
+   if the underlying platform defines int64_t to be a 64-bit long long
+   int, the code below won't mistakenly define it to be a 64-bit long
+   int, which would mess up C++ name mangling.  */
+
+#if INT64_MAX
+# define GL_INT64_T
+#else
 /* Do not undefine int64_t if gnulib is not being used with 64-bit
    types, since otherwise it breaks platforms like Tandem/NSK.  */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+#  undef int64_t
 typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif defined _MSC_VER
+#  undef int64_t
 typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+#  undef int64_t
 typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+#  define int64_t gl_int64_t
+#  define GL_INT64_T
+# endif
 #endif
 
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+#if UINT64_MAX
 # define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
+#else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+#  undef uint64_t
+typedef unsigned long int gl_uint64_t;
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif defined _MSC_VER
+#  undef uint64_t
 typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#  undef uint64_t
 typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+#  define uint64_t gl_uint64_t
+#  define GL_UINT64_T
+# endif
 #endif
 
 /* Avoid collision with Solaris 2.5.1 <pthread.h> etc.  */
@@ -279,7 +292,8 @@ typedef unsigned long int gl_uintmax_t;
 /* Verify that intmax_t and uintmax_t have the same size.  Too much code
    breaks if this is not the case.  If this check fails, the reason is likely
    to be found in the autoconf macros.  */
-typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) 
- 1];
+typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
+                                ? 1 : -1];
 
 /* 7.18.2. Limits of specified-width integer types */
 
@@ -311,17 +325,14 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == 
sizeof (uintmax_t)) -
 #define INT32_MAX  2147483647
 #define UINT32_MAX  4294967295U
 
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
+#if defined GL_INT64_T && ! defined INT64_MAX
 /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
    evaluates the latter incorrectly in preprocessor expressions.  */
 # define INT64_MIN  (- INTMAX_C (1) << 63)
 # define INT64_MAX  INTMAX_C (9223372036854775807)
 #endif
 
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
+#if defined GL_UINT64_T && ! defined UINT64_MAX
 # define UINT64_MAX  UINTMAX_C (18446744073709551615)
 #endif
 
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 3f34727..b219d46 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -57,6 +57,13 @@
 # endif
 #endif
 
+/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
+    && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
diff --git a/lib/gl/stdlib.in.h b/lib/gl/stdlib.in.h
index bc43725..9c7cad9 100644
--- a/lib/gl/stdlib.in.h
+++ b/lib/gl/stdlib.in.h
@@ -61,6 +61,9 @@
 #endif
 
 #if address@hidden@
+/* Define 'struct random_data'.
+   But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
+# if !GNULIB_defined_struct_random_data
 struct random_data
 {
   int32_t *fptr;                /* Front pointer.  */
@@ -71,6 +74,8 @@ struct random_data
   int rand_sep;                 /* Distance between front and rear.  */
   int32_t *end_ptr;             /* Pointer behind state table.  */
 };
+#  define GNULIB_defined_struct_random_data 1
+# endif
 #endif
 
 #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! 
defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined 
__CYGWIN__)
diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h
index 6c94178..b5711c0 100644
--- a/lib/gl/string.in.h
+++ b/lib/gl/string.in.h
@@ -51,8 +51,8 @@
 #endif
 
 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
-/* But avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK)  \
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
     && ! defined __GLIBC__
 # include <unistd.h>
 #endif
@@ -87,7 +87,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
                         void *, (void const *__s, int __c, size_t __n),
                         void const *, (void const *__s, int __c, size_t __n));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
 _GL_CXXALIASWARN1 (memchr, void const *,
@@ -172,7 +172,7 @@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, 
size_t)
 _GL_CXXALIAS_SYS_CAST2 (memrchr,
                         void *, (void const *, int, size_t),
                         void const *, (void const *, int, size_t));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
@@ -202,7 +202,7 @@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int 
__c_in)
 _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
                         void *, (void const *__s, int __c_in),
                         void const *, (void const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
 _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
@@ -293,7 +293,7 @@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int 
__c_in)
 _GL_CXXALIAS_SYS_CAST2 (strchrnul,
                         char *, (char const *__s, int __c_in),
                         char const *, (char const *__s, int __c_in));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
 _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
@@ -439,7 +439,7 @@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char 
const *__accept)
 _GL_CXXALIAS_SYS_CAST2 (strpbrk,
                         char *, (char const *__s, char const *__accept),
                         const char *, (char const *__s, char const *__accept));
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
 _GL_CXXALIASWARN1 (strpbrk, char const *,
@@ -541,7 +541,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
                         char *, (const char *haystack, const char *needle),
                         const char *, (const char *haystack, const char 
*needle));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
 _GL_CXXALIASWARN1 (strstr, const char *,
@@ -590,7 +590,7 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr,
                         char *, (const char *haystack, const char *needle),
                         const char *, (const char *haystack, const char 
*needle));
 # endif
-# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
 _GL_CXXALIASWARN1 (strcasestr, const char *,
@@ -902,6 +902,35 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - "
                  "use gnulib module strerror to guarantee non-NULL result");
 #endif
 
+/* Map any int, typically from errno, into an error message.  Multithread-safe.
+   Uses the POSIX declaration, not the glibc declaration.  */
+#if @GNULIB_STRERROR_R@
+# if @REPLACE_STRERROR_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerror_r
+#   define strerror_r rpl_strerror_r
+#  endif
+_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# else
+#  if address@hidden@
+_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
+                                   _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
+# endif
+# if @HAVE_DECL_STRERROR_R@
+_GL_CXXALIASWARN (strerror_r);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror_r
+# if HAVE_RAW_DECL_STRERROR_R
+_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
+                 "use gnulib module strerror_r-posix for portability");
+# endif
+#endif
+
 #if @GNULIB_STRSIGNAL@
 # if @REPLACE_STRSIGNAL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/lib/gl/sys_socket.in.h b/lib/gl/sys_socket.in.h
index 6bed6cc..d62d8cf 100644
--- a/lib/gl/sys_socket.in.h
+++ b/lib/gl/sys_socket.in.h
@@ -70,7 +70,14 @@
 typedef unsigned short  sa_family_t;
 #endif
 
-#if address@hidden@
+#if @HAVE_STRUCT_SOCKADDR_STORAGE@
+/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1.  */
+# if address@hidden@
+#  ifndef ss_family
+#   define ss_family __ss_family
+#  endif
+# endif
+#else
 # include <alignof.h>
 /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
    2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
diff --git a/lib/gl/tests/Makefile.am b/lib/gl/tests/Makefile.am
index 9283775..4be0a1f 100644
--- a/lib/gl/tests/Makefile.am
+++ b/lib/gl/tests/Makefile.am
@@ -341,12 +341,6 @@ EXTRA_DIST += test-vasprintf.c signature.h macros.h
 
 ## end   gnulib module vasprintf-tests
 
-## begin gnulib module verify
-
-libtests_a_SOURCES += verify.h
-
-## end   gnulib module verify
-
 ## begin gnulib module verify-tests
 
 TESTS_ENVIRONMENT += MAKE='$(MAKE)'
diff --git a/lib/gl/tests/init.sh b/lib/gl/tests/init.sh
index a57de77..14f3b19 100644
--- a/lib/gl/tests/init.sh
+++ b/lib/gl/tests/init.sh
@@ -330,6 +330,12 @@ setup_()
     || fail_ "failed to create temporary directory in $initial_cwd_"
   cd "$test_dir_"
 
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
   # This trap statement, along with a trap on 0 below, ensure that the
   # temporary directory, $test_dir_, is removed upon exit as well as
   # upon receipt of any of the listed signals.
diff --git a/lib/gl/tests/intprops.h b/lib/gl/tests/intprops.h
index 46f4d47..0c27875 100644
--- a/lib/gl/tests/intprops.h
+++ b/lib/gl/tests/intprops.h
@@ -68,13 +68,17 @@
 #  define signed_type_or_expr__(t) 1
 # endif
 
+/* Bound on length of the string representing an unsigned integer
+   value representable in B bits.  log10 (2.0) < 146/485.  The
+   smallest value of B where this bound is not tight is 2621.  */
+# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
 /* Bound on length of the string representing an integer type or expression T.
-   Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
-   add 1 for integer division truncation; add 1 more for a minus sign
-   if needed.  */
+   Subtract 1 for the sign bit if T is signed, and then add 1 more for
+   a minus sign if needed.  */
 # define INT_STRLEN_BOUND(t) \
-  ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
-   + signed_type_or_expr__ (t) + 1)
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
+   + signed_type_or_expr__ (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
    including the terminating null.  */
diff --git a/lib/gl/time.in.h b/lib/gl/time.in.h
index 8b93a3e..9d0d680 100644
--- a/lib/gl/time.in.h
+++ b/lib/gl/time.in.h
@@ -84,6 +84,15 @@ struct timespec
 #  endif
 # endif
 
+/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
+   time_t to be an integer type, even though C99 permits floating
+   point.  We don't know of any implementation that uses floating
+   point, and it is much easier to write code that doesn't have to
+   worry about that corner case, so we force the issue.  */
+struct __time_t_must_be_integral {
+  unsigned int __floating_time_t_unsupported : (time_t) 1;
+};
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
    <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
diff --git a/lib/gl/unistd.in.h b/lib/gl/unistd.in.h
index e636163..255869a 100644
--- a/lib/gl/unistd.in.h
+++ b/lib/gl/unistd.in.h
@@ -61,14 +61,16 @@
 /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
-     || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+     || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
+         && defined __CYGWIN__)) \
     && ! defined __GLIBC__
 # include <stdio.h>
 #endif
 
 /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
+    && ! defined __GLIBC__
 # include <fcntl.h>
 #endif
 
@@ -86,6 +88,13 @@
 # include <io.h>
 #endif
 
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+    && !defined __GLIBC__
+# include <netdb.h>
+#endif
+
 #if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
      || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
 /* Get ssize_t.  */
@@ -549,13 +558,21 @@ _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
    Null terminate it if the name is shorter than LEN.
    If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
    Return 0 if successful, otherwise set errno and return -1.  */
-# if address@hidden@
+# if @REPLACE_GETDOMAINNAME@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getdomainname
+#   define getdomainname rpl_getdomainname
+#  endif
+_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
+                                      _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
+# else
+#  if address@hidden@
 _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
                                       _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
 # endif
-/* Need to cast, because on MacOS X 10.5 systems, the second parameter is
-                                                        int len.  */
-_GL_CXXALIAS_SYS_CAST (getdomainname, int, (char *name, size_t len));
 _GL_CXXALIASWARN (getdomainname);
 #elif defined GNULIB_POSIXCHECK
 # undef getdomainname
diff --git a/lib/gl/vasnprintf.c b/lib/gl/vasnprintf.c
index 54cda0e..8585e84 100644
--- a/lib/gl/vasnprintf.c
+++ b/lib/gl/vasnprintf.c
@@ -88,6 +88,8 @@
 /* Checked size_t computations.  */
 #include "xsize.h"
 
+#include "verify.h"
+
 #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
 # include <math.h>
 # include "float+.h"
@@ -277,7 +279,7 @@ decimal_point_char (void)
      multithread-safe on glibc systems and MacOS X systems, but is not required
      to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
      localeconv() is rarely multithread-safe.  */
-#  if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined 
__MACH__))
+#  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined 
__APPLE__ && defined __MACH__))
   point = nl_langinfo (RADIXCHAR);
 #  elif 1
   char pointbuf[5];
@@ -322,11 +324,11 @@ is_infinite_or_zerol (long double x)
 
 typedef unsigned int mp_limb_t;
 # define GMP_LIMB_BITS 32
-typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == 
GMP_LIMB_BITS) - 1];
+verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
 
 typedef unsigned long long mp_twolimb_t;
 # define GMP_TWOLIMB_BITS 64
-typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == 
GMP_TWOLIMB_BITS) - 1];
+verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
 
 /* Representation of a bignum >= 0.  */
 typedef struct
@@ -2621,7 +2623,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 #  if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1];
+                  verify (sizeof (TCHAR_T) == 1);
                   TCHAR_T *tmpsrc;
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -4597,6 +4599,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 TCHAR_T *fbp;
                 unsigned int prefix_count;
                 int prefixes[2] IF_LINT (= { 0 });
+                int orig_errno;
 #if !USE_SNPRINTF
                 size_t tmp_length;
                 TCHAR_T tmpbuf[700];
@@ -4751,6 +4754,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   *fbp++ = ' ';
                 if (flags & FLAG_ALT)
                   *fbp++ = '#';
+#if __GLIBC__ >= 2 && !defined __UCLIBC__
+                if (flags & FLAG_LOCALIZED)
+                  *fbp++ = 'I';
+#endif
                 if (!pad_ourselves)
                   {
                     if (flags & FLAG_ZERO)
@@ -4834,14 +4841,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #endif
                   *fbp = dp->conversion;
 #if USE_SNPRINTF
-# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined 
_WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && 
!defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined 
__CYGWIN__))
                 fbp[1] = '%';
                 fbp[2] = 'n';
                 fbp[3] = '\0';
 # else
                 /* On glibc2 systems from glibc >= 2.3 - probably also older
-                   ones - we know that snprintf's returns value conforms to
-                   ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
+                   ones - we know that snprintf's return value conforms to
+                   ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+                   gl_SNPRINTF_TRUNCATION_C99 pass.
                    Therefore we can avoid using %n in this situation.
                    On glibc2 systems from 2004-10-18 or newer, the use of %n
                    in format strings in writable memory may crash the program
@@ -4900,6 +4908,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 *(TCHAR_T *) (result + length) = '\0';
 #endif
 
+                orig_errno = errno;
+
                 for (;;)
                   {
                     int count = -1;
@@ -5284,8 +5294,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                         DCHAR_T *tmpdst;
                         size_t tmpdst_len;
                         /* This code assumes that TCHAR_T is 'char'.  */
-                        typedef int TCHAR_T_verify
-                                    [2 * (sizeof (TCHAR_T) == 1) - 1];
+                        verify (sizeof (TCHAR_T) == 1);
 # if USE_SNPRINTF
                         tmpsrc = (TCHAR_T *) (result + length);
 # else
@@ -5498,6 +5507,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     length += count;
                     break;
                   }
+                errno = orig_errno;
 #undef pad_ourselves
 #undef prec_ourselves
               }
diff --git a/lib/gl/tests/verify.h b/lib/gl/verify.h
similarity index 95%
rename from lib/gl/tests/verify.h
rename to lib/gl/verify.h
index 4ad780c..a29f866 100644
--- a/lib/gl/tests/verify.h
+++ b/lib/gl/verify.h
@@ -3,16 +3,16 @@
    Copyright (C) 2005-2006, 2009-2010 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
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 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.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   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/>.  */
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
diff --git a/lib/gl/wchar.in.h b/lib/gl/wchar.in.h
index 568ef32..edae751 100644
--- a/lib/gl/wchar.in.h
+++ b/lib/gl/wchar.in.h
@@ -53,6 +53,10 @@
 
 #define _GL_ALREADY_INCLUDING_WCHAR_H
 
+#if @HAVE_FEATURES_H@
+# include <features.h> /* for __GLIBC__ */
+#endif
+
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
diff --git a/libextra/gl/m4/gnulib-common.m4 b/libextra/gl/m4/gnulib-common.m4
index 4c7ac30..d0c8b66 100644
--- a/libextra/gl/m4/gnulib-common.m4
+++ b/libextra/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 20
+# gnulib-common.m4 serial 21
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
     [Define to 1 when the gnulib module $1 should be tested.])
 ])
 
+# Test whether <features.h> exists.
+# Set HAVE_FEATURES_H.
+AC_DEFUN([gl_FEATURES_H],
+[
+  AC_CHECK_HEADERS_ONCE([features.h])
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+  AC_SUBST([HAVE_FEATURES_H])
+])
+
 # m4_foreach_w
 # is a backport of autoconf-2.59c's m4_foreach_w.
 # Remove this macro when we can assume autoconf >= 2.60.
diff --git a/maint.mk b/maint.mk
index c9d7a22..a3b6451 100644
--- a/maint.mk
+++ b/maint.mk
@@ -590,10 +590,19 @@ sc_changelog:
 sc_program_name:
        @require='set_program_name *\(m?argv\[0\]\);'                   \
        in_vc_files='\.c$$'                                             \
-       containing='^main *('                                           \
+       containing='\<main *('                                          \
        halt='the above files do not call set_program_name'             \
          $(_sc_search_regexp)
 
+# Ensure that each .c file containing a "main" function also
+# calls bindtextdomain.
+sc_bindtextdomain:
+       @require='bindtextdomain *\('                                   \
+       in_vc_files='\.c$$'                                             \
+       containing='\<main *('                                          \
+       halt='the above files do not call bindtextdomain'               \
+         $(_sc_search_regexp)
+
 # Require that the final line of each test-lib.sh-using test be this one:
 # Exit $fail
 # Note: this test requires GNU grep's --label= option.
@@ -732,7 +741,8 @@ sc_GFDL_version:
        halt='GFDL vN, N!=3'                                            \
          $(_sc_search_regexp)
 
-# Don't use Texinfo @acronym{} as it is not a good idea.
+# Don't use Texinfo's @acronym{}.
+# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
 texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
 sc_texinfo_acronym:
        @prohibit='@acronym\{'                                          \
@@ -808,6 +818,13 @@ sc_prohibit_test_minus_ao:
        halt='$(_ptm1); $(_ptm2)'                                       \
          $(_sc_search_regexp)
 
+# Avoid a test bashism.
+sc_prohibit_test_double_equal:
+       @prohibit='(\<test| \[+) .+ == '                                \
+       containing='#! */bin/[a-z]*sh'                                  \
+       halt='use "test x = x", not "test x =''= x"'                    \
+         $(_sc_search_regexp)
+
 # Each program that uses proper_name_utf8 must link with one of the
 # ICONV libraries.  Otherwise, some ICONV library must appear in LDADD.
 # The perl -0777 invocation below extracts the possibly-multi-line
@@ -1081,7 +1098,6 @@ emit_upload_commands:
        @echo =====================================
        @echo =====================================
 
-noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
 define emit-commit-log
   printf '%s\n' 'post-release administrivia' '' \
     '* NEWS: Add header line for next release.' \
@@ -1119,6 +1135,7 @@ alpha beta stable: $(local-check) writable-files 
no-submodule-changes
 # Override this in cfg.mk if you follow different procedures.
 release-prep-hook ?= release-prep
 
+gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
 .PHONY: release-prep
 release-prep:
        case $$RELEASE_TYPE in alpha|beta|stable) ;; \
@@ -1130,7 +1147,7 @@ release-prep:
        fi
        echo $(VERSION) > $(prev_version_file)
        $(MAKE) update-NEWS-hash
-       perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
+       perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
        $(emit-commit-log) > .ci-msg
        $(VC) commit -F .ci-msg -a
        rm .ci-msg


hooks/post-receive
-- 
GNU gnutls



reply via email to

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