gsasl-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gsasl branch, master, updated. gsasl-1-6-0-17-g9f13211


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-6-0-17-g9f13211
Date: Wed, 29 Jun 2011 06:44:10 +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 gsasl".

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=9f1321107070d1cc99da48301b5a6bb634e62617

The branch, master has been updated
       via  9f1321107070d1cc99da48301b5a6bb634e62617 (commit)
       via  09e0efb6cf03af03bcc3b0c47a969a80665fe5a1 (commit)
      from  24c2708e845c563e3179b781e8969bb66bca1feb (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 9f1321107070d1cc99da48301b5a6bb634e62617
Author: Simon Josefsson <address@hidden>
Date:   Tue Jun 28 13:51:49 2011 +0200

    Sync with TP.

commit 09e0efb6cf03af03bcc3b0c47a969a80665fe5a1
Author: Simon Josefsson <address@hidden>
Date:   Tue Jun 28 13:47:06 2011 +0200

    Update gnulib files.

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

Summary of changes:
 cfg.mk                            |    2 +-
 doc/lgpl-2.1.texi                 |   16 +-
 gl/Makefile.am                    |  637 +++++++++++++---------
 gl/alignof.h                      |    2 +-
 gl/alloca.c                       |   31 +-
 gl/arpa_inet.in.h                 |   10 +-
 gl/errno.in.h                     |   10 +-
 gl/error.c                        |    6 +-
 gl/fclose.c                       |   47 ++-
 gl/float.c                        |   33 ++
 gl/float.in.h                     |  121 ++++-
 gl/fseek.c                        |   30 +
 {gltests => gl}/ftell.c           |    0
 gl/getopt.c                       |   86 +++-
 gl/getopt.in.h                    |   10 +-
 gl/iconv.c                        |  450 +++++++++++++++
 gl/iconv.in.h                     |   10 +-
 gl/iconv_close.c                  |   47 ++
 gl/intprops.h                     |  303 +++++++++--
 gl/m4/alloca.m4                   |   79 +++-
 gl/m4/arpa_inet_h.m4              |    9 +-
 gl/m4/btowc.m4                    |    7 +-
 gl/m4/dup2.m4                     |    9 +-
 gl/m4/error.m4                    |   17 +-
 gl/m4/fclose.m4                   |    6 +-
 gl/m4/fflush.m4                   |   26 +-
 gl/m4/float_h.m4                  |   35 ++-
 gl/m4/fpieee.m4                   |   52 ++
 gl/m4/fpurge.m4                   |    6 +-
 gl/m4/fseek.m4                    |   15 +
 gl/m4/fseeko.m4                   |   50 +--
 gl/m4/ftell.m4                    |    5 +-
 gl/m4/ftello.m4                   |   10 +-
 gl/m4/getaddrinfo.m4              |   10 +-
 gl/m4/getcwd.m4                   |  111 ++++
 gl/m4/getdelim.m4                 |   16 +-
 gl/m4/getline.m4                  |    7 +-
 gl/m4/getopt.m4                   |   39 +-
 gl/m4/getpagesize.m4              |    3 +-
 gl/m4/getpass.m4                  |   26 +-
 gl/m4/gettimeofday.m4             |   19 +-
 gl/m4/gnulib-cache.m4             |    3 +-
 gl/m4/gnulib-common.m4            |   57 ++-
 gl/m4/gnulib-comp.m4              |  820 ++++++++++++++++++----------
 gl/m4/iconv_open.m4               |  243 +--------
 gl/m4/inet_ntop.m4                |   23 +-
 gl/m4/inet_pton.m4                |   23 +-
 {lib/gl => gl}/m4/inttypes-pri.m4 |    0
 gl/m4/inttypes.m4                 |  172 ++++++
 gl/m4/ioctl.m4                    |    8 +-
 gl/m4/libunistring-base.m4        |  141 +++++
 gl/m4/locale-zh.m4                |    8 +-
 gl/m4/locale_h.m4                 |   15 +-
 gl/m4/lseek.m4                    |   15 +-
 gl/m4/lstat.m4                    |   37 +-
 gl/m4/malloc.m4                   |   12 +-
 gl/m4/mbrtowc.m4                  |   10 +-
 gl/m4/mbsinit.m4                  |    7 +-
 gl/m4/mbtowc.m4                   |    6 +-
 gl/m4/memchr.m4                   |    6 +-
 gl/m4/pathmax.m4                  |   13 -
 gl/m4/perror.m4                   |   46 ++-
 gl/m4/pipe.m4                     |    3 +-
 gl/m4/poll.m4                     |    6 +-
 gl/m4/poll_h.m4                   |   10 +-
 gl/m4/printf.m4                   |   11 +-
 gl/m4/putenv.m4                   |    3 +-
 gl/m4/quote.m4                    |    5 +-
 gl/m4/quotearg.m4                 |    4 +-
 gl/m4/readline.m4                 |    7 +-
 gl/m4/realloc.m4                  |   12 +-
 gl/m4/select.m4                   |    9 +-
 gl/m4/setenv.m4                   |   35 +-
 gl/m4/setlocale.m4                |   14 +-
 gl/m4/stat.m4                     |   14 +-
 gl/m4/stdint.m4                   |    4 +-
 gl/m4/strdup.m4                   |   11 +-
 gl/m4/strerror.m4                 |   86 ++--
 gl/m4/strerror_r.m4               |  168 ++++++
 gl/m4/strtok_r.m4                 |   12 +-
 gl/m4/symlink.m4                  |    4 +-
 gl/m4/sys_ioctl_h.m4              |    9 +-
 gl/m4/unistd_h.m4                 |    8 +-
 gl/m4/warnings.m4                 |    6 +-
 gl/m4/wchar_h.m4                  |    9 +-
 gl/m4/wcrtomb.m4                  |    7 +-
 gl/m4/wctob.m4                    |   14 +-
 gl/m4/wctomb.m4                   |    6 +-
 gl/m4/xalloc.m4                   |    4 +-
 gl/netdb.in.h                     |   10 +-
 gl/netinet_in.in.h                |   10 +-
 gl/poll.in.h                      |   10 +-
 gl/sockets.c                      |    4 +
 gl/stdarg.in.h                    |   10 +-
 gl/stddef.in.h                    |   14 +-
 gl/stdint.in.h                    |   14 +-
 gl/stdio.in.h                     |   48 +--
 gl/stdlib.in.h                    |   10 +-
 gl/strerror-override.c            |  269 +++++++++
 gl/strerror-override.h            |   50 ++
 gl/strerror.c                     |  358 ++-----------
 gl/string.in.h                    |   14 +-
 gl/sys_select.in.h                |   16 +-
 gl/sys_socket.in.h                |   14 +-
 gl/sys_time.in.h                  |    6 +-
 gl/sys_uio.in.h                   |   10 +-
 gl/unistd.in.h                    |   32 +-
 gl/unistr.in.h                    |  692 +++++++++++++++++++++++
 gl/unistr/u8-mbtoucr.c            |  285 ++++++++++
 gl/unistr/u8-uctomb-aux.c         |   69 +++
 gl/unistr/u8-uctomb.c             |   88 +++
 gl/unitypes.in.h                  |   26 +
 gl/verify.h                       |  143 +++--
 gl/wchar.in.h                     |   10 +-
 gl/wctype.in.h                    |   23 +-
 gltests/Makefile.am               |  258 +++++++--
 gltests/fcntl.in.h                |   10 +-
 gltests/fpucw.h                   |  107 ++++
 gltests/getcwd-lgpl.c             |  125 +++++
 gltests/glthread/thread.c         |   14 +
 gltests/glthread/thread.h         |   34 +-
 gltests/init.sh                   |   12 +-
 gltests/inttypes.in.h             | 1110 +++++++++++++++++++++++++++++++++++++
 gltests/locale.in.h               |   10 +-
 gltests/localename.c              |   18 +-
 gltests/localename.h              |   18 +-
 gltests/macros.h                  |    4 +
 gltests/pathmax.h                 |   48 --
 gltests/perror.c                  |   20 +-
 gltests/setenv.c                  |    3 +
 gltests/stat.c                    |    8 +
 gltests/strerror_r.c              |  306 ++++++++++
 gltests/sys_ioctl.in.h            |   10 +-
 gltests/sys_stat.in.h             |   10 +-
 gltests/test-fclose.c             |   90 +++
 gltests/test-fflush.c             |    3 +-
 gltests/test-float.c              |  384 +++++++++++++
 gltests/test-fseek.c              |   70 +++
 gltests/test-fseek.sh             |    5 +
 gltests/test-fseek2.sh            |    3 +
 gltests/test-getaddrinfo.c        |    2 +-
 gltests/test-getcwd-lgpl.c        |  102 ++++
 gltests/test-intprops.c           |  275 +++++++++
 gltests/test-inttypes.c           |  121 ++++
 gltests/test-lock.c               |   60 +-
 gltests/test-perror.sh            |   33 +-
 gltests/test-perror2.c            |  137 +++++
 gltests/test-stat.c               |    1 -
 gltests/test-stat.h               |    4 +-
 gltests/test-strerror.c           |   21 +-
 gltests/test-strerror_r.c         |  182 ++++++
 gltests/test-verify.c             |    4 +-
 gltests/time.in.h                 |    4 +-
 gltests/unistr/test-u8-mbtoucr.c  |  187 +++++++
 gltests/unistr/test-u8-uctomb.c   |  157 ++++++
 gltests/unsetenv.c                |    7 +
 lib/build-aux/unused-parameter.h  |   36 ++
 lib/build-aux/vc-list-files       |   89 ++--
 lib/gl/Makefile.am                |  442 ++++++++-------
 lib/gl/errno.in.h                 |   10 +-
 lib/gl/float.c                    |   33 ++
 lib/gl/float.in.h                 |  121 ++++-
 lib/gl/gc.h                       |    2 +-
 lib/gl/m4/alloca.m4               |   79 +++-
 lib/gl/m4/float_h.m4              |   35 ++-
 lib/gl/m4/fpieee.m4               |   52 ++
 lib/gl/m4/gc-hmac-md5.m4          |    3 +-
 lib/gl/m4/gc-hmac-sha1.m4         |    3 +-
 lib/gl/m4/gc-pbkdf2-sha1.m4       |   10 -
 lib/gl/m4/gc-sha1.m4              |    5 +-
 lib/gl/m4/gc.m4                   |   14 +-
 lib/gl/m4/getdelim.m4             |   16 +-
 lib/gl/m4/getline.m4              |    7 +-
 lib/gl/m4/getpagesize.m4          |    3 +-
 lib/gl/m4/gnulib-cache.m4         |    3 +-
 lib/gl/m4/gnulib-common.m4        |   57 ++-
 lib/gl/m4/gnulib-comp.m4          |  256 ++++++---
 lib/gl/m4/hmac-md5.m4             |   10 -
 lib/gl/m4/hmac-sha1.m4            |   10 -
 lib/gl/m4/inttypes.m4             |  172 ++++++
 lib/gl/m4/malloc.m4               |   12 +-
 lib/gl/m4/md5.m4                  |    4 +-
 lib/gl/m4/memchr.m4               |    6 +-
 lib/gl/m4/memmem.m4               |   11 +-
 lib/gl/m4/memxor.m4               |    3 +-
 lib/gl/m4/printf.m4               |   11 +-
 lib/gl/m4/realloc.m4              |   12 +-
 lib/gl/m4/sha1.m4                 |    4 +-
 lib/gl/m4/stdint.m4               |    4 +-
 lib/gl/m4/strnlen.m4              |   10 +-
 lib/gl/m4/strverscmp.m4           |    5 +-
 lib/gl/m4/unistd_h.m4             |    8 +-
 lib/gl/m4/wchar_h.m4              |    9 +-
 lib/gl/stddef.in.h                |   14 +-
 lib/gl/stdint.in.h                |   14 +-
 lib/gl/stdio.in.h                 |   48 +--
 lib/gl/stdlib.in.h                |   10 +-
 lib/gl/string.in.h                |   14 +-
 lib/gl/unistd.in.h                |   32 +-
 lib/gl/verify.h                   |  143 +++--
 lib/gl/wchar.in.h                 |   10 +-
 lib/gltests/Makefile.am           |   73 +++
 lib/gltests/fpucw.h               |  107 ++++
 lib/gltests/init.sh               |   12 +-
 lib/gltests/intprops.h            |  303 +++++++++--
 lib/gltests/inttypes.in.h         | 1110 +++++++++++++++++++++++++++++++++++++
 lib/gltests/macros.h              |    4 +
 lib/gltests/test-float.c          |  384 +++++++++++++
 lib/gltests/test-intprops.c       |  275 +++++++++
 lib/gltests/test-inttypes.c       |  121 ++++
 lib/gltests/test-verify.c         |    4 +-
 lib/maint.mk                      |  261 +++++++--
 lib/po/LINGUAS                    |    1 +
 lib/po/eo.po.in                   |  166 ++++---
 lib/po/fi.po.in                   |  161 +++---
 lib/po/it.po.in                   |  158 +++---
 lib/po/nl.po.in                   |  161 +++---
 lib/po/pl.po.in                   |  159 +++---
 lib/po/uk.po.in                   |  284 ++++++++++
 lib/po/zh_CN.po.in                |  163 ++++---
 maint.mk                          |  261 +++++++--
 po/LINGUAS                        |    1 +
 po/de.po.in                       |  154 +++--
 po/eo.po.in                       |  120 +++--
 po/fi.po.in                       |  125 +++--
 po/it.po.in                       |  124 +++--
 po/nl.po.in                       |  127 +++--
 po/pl.po.in                       |  118 ++--
 po/uk.po.in                       |  264 +++++++++
 po/zh_CN.po.in                    |  123 +++--
 230 files changed, 14284 insertions(+), 3658 deletions(-)
 create mode 100644 gl/float.c
 create mode 100644 gl/fseek.c
 rename {gltests => gl}/ftell.c (100%)
 create mode 100644 gl/iconv.c
 create mode 100644 gl/iconv_close.c
 create mode 100644 gl/m4/fpieee.m4
 create mode 100644 gl/m4/fseek.m4
 create mode 100644 gl/m4/getcwd.m4
 copy {lib/gl => gl}/m4/inttypes-pri.m4 (100%)
 create mode 100644 gl/m4/inttypes.m4
 create mode 100644 gl/m4/libunistring-base.m4
 delete mode 100644 gl/m4/pathmax.m4
 create mode 100644 gl/m4/strerror_r.m4
 create mode 100644 gl/strerror-override.c
 create mode 100644 gl/strerror-override.h
 create mode 100644 gl/unistr.in.h
 create mode 100644 gl/unistr/u8-mbtoucr.c
 create mode 100644 gl/unistr/u8-uctomb-aux.c
 create mode 100644 gl/unistr/u8-uctomb.c
 create mode 100644 gl/unitypes.in.h
 create mode 100644 gltests/fpucw.h
 create mode 100644 gltests/getcwd-lgpl.c
 create mode 100644 gltests/inttypes.in.h
 delete mode 100644 gltests/pathmax.h
 create mode 100644 gltests/strerror_r.c
 create mode 100644 gltests/test-fclose.c
 create mode 100644 gltests/test-float.c
 create mode 100644 gltests/test-fseek.c
 create mode 100755 gltests/test-fseek.sh
 create mode 100755 gltests/test-fseek2.sh
 create mode 100644 gltests/test-getcwd-lgpl.c
 create mode 100644 gltests/test-intprops.c
 create mode 100644 gltests/test-inttypes.c
 create mode 100644 gltests/test-perror2.c
 create mode 100644 gltests/test-strerror_r.c
 create mode 100644 gltests/unistr/test-u8-mbtoucr.c
 create mode 100644 gltests/unistr/test-u8-uctomb.c
 create mode 100644 lib/build-aux/unused-parameter.h
 create mode 100644 lib/gl/float.c
 create mode 100644 lib/gl/m4/fpieee.m4
 delete mode 100644 lib/gl/m4/gc-pbkdf2-sha1.m4
 delete mode 100644 lib/gl/m4/hmac-md5.m4
 delete mode 100644 lib/gl/m4/hmac-sha1.m4
 create mode 100644 lib/gl/m4/inttypes.m4
 create mode 100644 lib/gltests/fpucw.h
 create mode 100644 lib/gltests/inttypes.in.h
 create mode 100644 lib/gltests/test-float.c
 create mode 100644 lib/gltests/test-intprops.c
 create mode 100644 lib/gltests/test-inttypes.c
 create mode 100644 lib/po/uk.po.in
 create mode 100644 po/uk.po.in

diff --git a/cfg.mk b/cfg.mk
index 81ba354..ac41c29 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -34,7 +34,7 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = \
        
^(gtk-doc.make|m4/pkg.m4|doc/fdl-1.3.texi|doc/specification|doc/doxygen/Doxyfile|(lib/)?maint.mk|((lib/)?(gl|gltests|build-aux))/.*)
 
 # Explicit syntax-check exceptions.
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^doc/.*.(dia|png)
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^doc/.*\.(dia|png)|tests/gssapi.tkt$$
 exclude_file_name_regexp--sc_copyright_check = ^doc/gsasl.texi$$
 exclude_file_name_regexp--sc_GPL_version = ^doc/lgpl-2.1.texi|lib/.*$$
 exclude_file_name_regexp--sc_unmarked_diagnostics = ^examples/.*|src/gsasl.c$$
diff --git a/doc/lgpl-2.1.texi b/doc/lgpl-2.1.texi
index a2ba64b..ab03d6c 100644
--- a/doc/lgpl-2.1.texi
+++ b/doc/lgpl-2.1.texi
@@ -470,13 +470,7 @@ decision will be guided by the two goals of preserving the 
free status
 of all derivatives of our free software and of promoting the sharing
 and reuse of software generally.
 
address@hidden
address@hidden NO WARRANTY
address@hidden iftex
address@hidden
address@hidden NO WARRANTY
-
address@hidden ifinfo
address@hidden @b{NO WARRANTY}
 
 @item
 BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
@@ -502,13 +496,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 
POSSIBILITY OF SUCH
 DAMAGES.
 @end enumerate
 
address@hidden
address@hidden END OF TERMS AND CONDITIONS
address@hidden iftex
address@hidden
address@hidden END OF TERMS AND CONDITIONS
-
address@hidden ifinfo
address@hidden END OF TERMS AND CONDITIONS
 
 @page
 @subheading How to Apply These Terms to Your New Libraries
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 180460f..caf3e0a 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,9 +9,9 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=lib/build-aux --with-tests 
--avoid=fcntl-h-c++-tests --avoid=iconv-h-c++-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=sys_ioctl-c++-tests 
--avoid=sys_select-c++-tests --avoid=sys_socket-c++-tests 
--avoid=sys_stat-c++-tests --avoid=sys_time-c++-tests --avoid=time-c++-tests 
--avoid=unistd-c++-tests --avoid=wchar-c++-tests --avoid=wctype-c++-tests 
--libtool --macro-prefix=gl --no-vc-files autobuild close connect error fdl-1.3 
gendocs getaddrinfo getopt-gnu getpass gpl-3.0 lgpl-2.1 maintainer-makefile 
manywarnings netdb netinet_in pmccabe2html poll progname quote readline recv 
shutdown socket striconv strtok_r sys_time unistd valgrind-tests vasprintf 
version-etc warnings xalloc
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=lib/build-aux --with-tests 
--avoid=fcntl-h-c++-tests --avoid=iconv-h-c++-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=sys_ioctl-c++-tests 
--avoid=sys_select-c++-tests --avoid=sys_socket-c++-tests 
--avoid=sys_stat-c++-tests --avoid=sys_time-c++-tests --avoid=time-c++-tests 
--avoid=unistd-c++-tests --avoid=wchar-c++-tests --avoid=wctype-c++-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files 
autobuild close connect error fdl-1.3 gendocs getaddrinfo getopt-gnu getpass 
gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings netdb netinet_in pmccabe2html 
poll progname quote readline recv shutdown socket striconv strtok_r sys_time 
unistd valgrind-tests vasprintf version-etc warnings xalloc
 
-AUTOMAKE_OPTIONS = 1.5 gnits
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
 
 SUBDIRS =
 noinst_HEADERS =
@@ -57,12 +57,12 @@ EXTRA_DIST += alignof.h
 ## begin gnulib module alloca
 
 
+libgl_la_LIBADD += @LTALLOCA@
+libgl_la_DEPENDENCIES += @LTALLOCA@
 EXTRA_DIST += alloca.c
 
 EXTRA_libgl_la_SOURCES += alloca.c
 
-libgl_la_LIBADD += @LTALLOCA@
-libgl_la_DEPENDENCIES += @LTALLOCA@
 ## end   gnulib module alloca
 
 ## begin gnulib module alloca-opt
@@ -122,14 +122,15 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON
        $(AM_V_at)$(MKDIR_P) arpa
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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' \
-             -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
+             -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
+             -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
              -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
              -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -257,7 +258,8 @@ if GL_GENERATE_ERRNO_H
 errno.h: errno.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
@@ -333,7 +335,8 @@ if GL_GENERATE_FLOAT_H
 float.h: float.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
@@ -346,7 +349,9 @@ float.h: $(top_builddir)/config.status
 endif
 MOSTLYCLEANFILES += float.h float.h-t
 
-EXTRA_DIST += float.in.h
+EXTRA_DIST += float.c float.in.h
+
+EXTRA_libgl_la_SOURCES += float.c
 
 ## end   gnulib module float
 
@@ -367,6 +372,15 @@ EXTRA_DIST += freading.h stdio-impl.h
 
 ## end   gnulib module freading
 
+## begin gnulib module fseek
+
+
+EXTRA_DIST += fseek.c
+
+EXTRA_libgl_la_SOURCES += fseek.c
+
+## end   gnulib module fseek
+
 ## begin gnulib module fseeko
 
 
@@ -376,6 +390,15 @@ EXTRA_libgl_la_SOURCES += fseeko.c
 
 ## end   gnulib module fseeko
 
+## begin gnulib module ftell
+
+
+EXTRA_DIST += ftell.c
+
+EXTRA_libgl_la_SOURCES += ftell.c
+
+## end   gnulib module ftell
+
 ## begin gnulib module ftello
 
 
@@ -428,7 +451,8 @@ BUILT_SOURCES += $(GETOPT_H)
 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -493,11 +517,12 @@ if GL_GENERATE_ICONV_H
 iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \
-             -e 's|@''GNULIB_ICONV''@|$(GNULIB_ICONV)|g' \
+             -e 's/@''GNULIB_ICONV''@/$(GNULIB_ICONV)/g' \
              -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \
              -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
              -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
@@ -540,9 +565,9 @@ MOSTLYCLEANFILES     += iconv_open-aix.h-t 
iconv_open-hpux.h-t iconv_open-irix.h
 MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h
 EXTRA_DIST           += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h
 
-EXTRA_DIST += iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf 
iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
+EXTRA_DIST += iconv.c iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf 
iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
 
-EXTRA_libgl_la_SOURCES += iconv_open.c
+EXTRA_libgl_la_SOURCES += iconv.c iconv_close.c iconv_open.c
 
 ## end   gnulib module iconv_open
 
@@ -696,12 +721,13 @@ BUILT_SOURCES += netdb.h
 netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \
              -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \
-             -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \
+             -e 's/@''GNULIB_GETADDRINFO''@/$(GNULIB_GETADDRINFO)/g' \
              -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \
              -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \
              -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \
@@ -731,7 +757,8 @@ netinet/in.h: netinet_in.in.h $(top_builddir)/config.status
        $(AM_V_at)$(MKDIR_P) netinet
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
@@ -775,12 +802,13 @@ BUILT_SOURCES += poll.h
 poll.h: poll.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_POLL_H''@|$(HAVE_POLL_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_POLL_H''@|$(HAVE_POLL_H)|g' \
              -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|@''NEXT_POLL_H''@|$(NEXT_POLL_H)|g' \
-             -e 's|@''GNULIB_POLL''@|$(GNULIB_POLL)|g' \
+             -e 's/@''GNULIB_POLL''@/$(GNULIB_POLL)/g' \
              -e 's|@''HAVE_POLL''@|$(HAVE_POLL)|g' \
              -e 's|@''REPLACE_POLL''@|$(REPLACE_POLL)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -802,19 +830,17 @@ libgl_la_SOURCES += progname.h progname.c
 
 ## begin gnulib module quote
 
+libgl_la_SOURCES += quote.c
 
-EXTRA_DIST += quote.c quote.h
-
-EXTRA_libgl_la_SOURCES += quote.c
+EXTRA_DIST += quote.h
 
 ## end   gnulib module quote
 
 ## begin gnulib module quotearg
 
+libgl_la_SOURCES += quotearg.c
 
-EXTRA_DIST += quotearg.c quotearg.h
-
-EXTRA_libgl_la_SOURCES += quotearg.c
+EXTRA_DIST += quotearg.h
 
 ## end   gnulib module quotearg
 
@@ -905,7 +931,8 @@ if GL_GENERATE_STDARG_H
 stdarg.h: stdarg.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
@@ -955,7 +982,8 @@ if GL_GENERATE_STDDEF_H
 stddef.h: stddef.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@@ -984,7 +1012,8 @@ if GL_GENERATE_STDINT_H
 stdint.h: stdint.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1032,62 +1061,63 @@ BUILT_SOURCES += stdio.h
 stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
-             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
-             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-             -e 's|@''GNULIB_FGETC''@|$(GNULIB_FGETC)|g' \
-             -e 's|@''GNULIB_FGETS''@|$(GNULIB_FGETS)|g' \
-             -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
-             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
-             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
-             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
-             -e 's|@''GNULIB_FREAD''@|$(GNULIB_FREAD)|g' \
-             -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
-             -e 's|@''GNULIB_FSCANF''@|$(GNULIB_FSCANF)|g' \
-             -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
-             -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
-             -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-             -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-             -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-             -e 's|@''GNULIB_GETC''@|$(GNULIB_GETC)|g' \
-             -e 's|@''GNULIB_GETCHAR''@|$(GNULIB_GETCHAR)|g' \
-             -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
-             -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-             -e 's|@''GNULIB_GETS''@|$(GNULIB_GETS)|g' \
-             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
-             -e 
's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
-             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
-             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
-             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
-             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
-             -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
-             -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
-             -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
-             -e 's|@''GNULIB_SCANF''@|$(GNULIB_SCANF)|g' \
-             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-             -e 
's|@''GNULIB_STDIO_H_NONBLOCKING''@|$(GNULIB_STDIO_H_NONBLOCKING)|g' \
-             -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
-             -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
-             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VFSCANF''@|$(GNULIB_VFSCANF)|g' \
-             -e 's|@''GNULIB_VSCANF''@|$(GNULIB_VSCANF)|g' \
-             -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
-             -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-             -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+             -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+             -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+             -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+             -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+             -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+             -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+             -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+             -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+             -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+             -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+             -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+             -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+             -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+             -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+             -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+             -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+             -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+             -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+             -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+             -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+             -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+             -e 
's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+             -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+             -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+             -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+             -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+             -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+             -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+             -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+             -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+             -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+             -e 
's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+             -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+             -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+             -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+             -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
              < $(srcdir)/stdio.in.h | \
          sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
@@ -1155,38 +1185,39 @@ BUILT_SOURCES += stdlib.h
 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-             -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-             -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
-             -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-             -e 
's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
-             -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
-             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-             -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-             -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-             -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
-             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-             -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-             -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-             -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-             -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
-             -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-             -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-             -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-             -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
-             -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-             -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-             -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-             -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
-             -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
-             -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-             -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-             -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-             -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+             -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+             -e 
's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+             -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+             -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+             -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+             -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+             -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+             -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+             -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+             -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+             -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+             -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+             -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+             -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+             -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+             -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+             -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@@ -1260,6 +1291,15 @@ EXTRA_libgl_la_SOURCES += strerror.c
 
 ## end   gnulib module strerror
 
+## begin gnulib module strerror-override
+
+
+EXTRA_DIST += strerror-override.c strerror-override.h
+
+EXTRA_libgl_la_SOURCES += strerror-override.c
+
+## end   gnulib module strerror-override
+
 ## begin gnulib module striconv
 
 libgl_la_SOURCES += striconv.h striconv.c
@@ -1278,45 +1318,46 @@ BUILT_SOURCES += string.h
 string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-             -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-             -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
-             -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
-             -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
-             -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
-             -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
-             -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
-             -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
-             -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
-             -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
-             -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
-             -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
-             -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
-             -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
-             -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
-             -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
-             -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
-             -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
-             -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
-             -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
-             -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
-             -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
-             -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
-             -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
-             -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
-             -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
-             -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
-             -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
-             -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
-             -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' \
+             -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+             -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+             -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+             -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+             -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+             -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+             -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+             -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+             -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+             -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+             -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+             -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+             -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+             -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+             -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+             -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+             -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+             -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+             -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+             -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+             -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+             -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+             -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+             -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+             -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+             -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+             -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+             -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+             -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+             -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 | \
          sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
              -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
@@ -1383,12 +1424,13 @@ sys/select.h: sys_select.in.h 
$(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
              -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
-             -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \
+             -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -1413,27 +1455,28 @@ sys/socket.h: sys_socket.in.h 
$(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
              -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-             -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-             -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \
-             -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \
-             -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \
-             -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \
-             -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \
-             -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \
-             -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \
-             -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \
-             -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \
-             -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \
-             -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \
-             -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \
-             -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \
-             -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \
-             -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
+             -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
+             -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
+             -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
+             -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
+             -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
+             -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
+             -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
+             -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
+             -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
+             -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
+             -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
+             -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
              -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' \
@@ -1463,7 +1506,8 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNU
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1494,7 +1538,8 @@ sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
@@ -1518,54 +1563,56 @@ BUILT_SOURCES += unistd.h
 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
              -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|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-             -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-             -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
-             -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-             -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
-             -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
-             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-             -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
-             -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
-             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-             -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
-             -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-             -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-             -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-             -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-             -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-             -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
-             -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
-             -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
-             -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-             -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
-             -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-             -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
-             -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-             -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \
-             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-             -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
-             -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-             -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
-             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-             -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
-             -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
-             -e 
's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \
-             -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' 
\
-             -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
-             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-             -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-             -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+             -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+             -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+             -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+             -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+             -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+             -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+             -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+             -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+             -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+             -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+             -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+             -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+             -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+             -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+             -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+             -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+             -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+             -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+             -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+             -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+             -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+             -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+             -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+             -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+             -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+             -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+             -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+             -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+             -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+             -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+             -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
+             -e 
's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' 
\
+             -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+             -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+             -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+             -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
              -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
@@ -1581,6 +1628,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
              -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -1644,6 +1692,79 @@ EXTRA_DIST += unistd.in.h
 
 ## end   gnulib module unistd
 
+## begin gnulib module unistr/base
+
+BUILT_SOURCES += $(LIBUNISTRING_UNISTR_H)
+
+unistr.h: unistr.in.h
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/unistr.in.h; \
+       } > address@hidden && \
+       mv -f address@hidden $@
+MOSTLYCLEANFILES += unistr.h unistr.h-t
+
+EXTRA_DIST += unistr.in.h
+
+## end   gnulib module unistr/base
+
+## begin gnulib module unistr/u8-mbtoucr
+
+if LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR
+libgl_la_SOURCES += unistr/u8-mbtoucr.c
+endif
+
+## end   gnulib module unistr/u8-mbtoucr
+
+## begin gnulib module unistr/u8-uctomb
+
+if LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB
+libgl_la_SOURCES += unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
+endif
+
+## end   gnulib module unistr/u8-uctomb
+
+## begin gnulib module unitypes
+
+BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H)
+
+unitypes.h: unitypes.in.h
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/unitypes.in.h; \
+       } > address@hidden && \
+       mv -f address@hidden $@
+MOSTLYCLEANFILES += unitypes.h unitypes.h-t
+
+EXTRA_DIST += unitypes.in.h
+
+## end   gnulib module unitypes
+
+## begin gnulib module unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/lib/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/lib/build-aux/unused-parameter.h \
+         > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/lib/build-aux/unused-parameter.h
+
+## end   gnulib module unused-parameter
+
 ## begin gnulib module useless-if-before-free
 
 
@@ -1678,7 +1799,8 @@ EXTRA_DIST += $(top_srcdir)/lib/build-aux/vc-list-files
 
 ## begin gnulib module verify
 
-libgl_la_SOURCES += verify.h
+
+EXTRA_DIST += verify.h
 
 ## end   gnulib module verify
 
@@ -1716,51 +1838,52 @@ BUILT_SOURCES += wchar.h
 wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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' \
-             -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-             -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-             -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-             -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-             -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-             -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-             -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-             -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-             -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-             -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-             -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
-             -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
-             -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
-             -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
-             -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
-             -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
-             -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
-             -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
-             -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
-             -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
-             -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
-             -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
-             -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
-             -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
-             -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
-             -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
-             -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
-             -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
-             -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
-             -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
-             -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
-             -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
-             -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
-             -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
-             -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
-             -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
-             -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
-             -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+             -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+             -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+             -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+             -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+             -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+             -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+             -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+             -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+             -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+             -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+             -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+             -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+             -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+             -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+             -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+             -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+             -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+             -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+             -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+             -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+             -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+             -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+             -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+             -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+             -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+             -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+             -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+             -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+             -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+             -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+             -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+             -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+             -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+             -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+             -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+             -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+             -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -1836,7 +1959,8 @@ BUILT_SOURCES += wctype.h
 wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1866,10 +1990,9 @@ EXTRA_DIST += wctype.in.h
 
 ## begin gnulib module xalloc
 
+libgl_la_SOURCES += xmalloc.c
 
-EXTRA_DIST += xalloc.h xmalloc.c
-
-EXTRA_libgl_la_SOURCES += xmalloc.c
+EXTRA_DIST += xalloc.h
 
 ## end   gnulib module xalloc
 
diff --git a/gl/alignof.h b/gl/alignof.h
index 03bed6f..1c1f75c 100644
--- a/gl/alignof.h
+++ b/gl/alignof.h
@@ -31,7 +31,7 @@
 # define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, 
__slot2)
 #endif
 
-/* Determine the good alignment of a object of the given type at compile time.
+/* Determine the good alignment of an object of the given type at compile time.
    Note that this is not necessarily the same as alignof_slot(type).
    For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
    - when -malign-double is not specified:  alignof_slot(double) = 4,
diff --git a/gl/alloca.c b/gl/alloca.c
index 771c2fa..06b12a7 100644
--- a/gl/alloca.c
+++ b/gl/alloca.c
@@ -93,25 +93,15 @@ long i00afunc ();
 static int stack_dir;           /* 1 or -1 once known.  */
 #   define STACK_DIR    stack_dir
 
-static void
-find_stack_direction (char **ptr)
+static int
+find_stack_direction (int *addr, int depth)
 {
-  auto char dummy;              /* To get stack address.  */
-
-  if (*ptr == NULL)
-    {                           /* Initial entry.  */
-      *ptr = ADDRESS_FUNCTION (dummy);
-
-      find_stack_direction (ptr);  /* Recurse once.  */
-    }
-  else
-    {
-      /* Second entry.  */
-      if (ADDRESS_FUNCTION (dummy) > *ptr)
-        stack_dir = 1;          /* Stack grew upward.  */
-      else
-        stack_dir = -1;         /* Stack grew downward.  */
-    }
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
 }
 
 #  endif /* STACK_DIRECTION == 0 */
@@ -154,10 +144,7 @@ alloca (size_t size)
 
 #  if STACK_DIRECTION == 0
   if (STACK_DIR == 0)           /* Unknown growth direction.  */
-    {
-      char *addr = NULL;        /* Address of first `dummy', once known.  */
-      find_stack_direction (&addr);
-    }
+    STACK_DIR = find_stack_direction (NULL, (size & 1) + 20);
 #  endif
 
   /* Reclaim garbage, defined as all alloca'd storage that
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 925dfbb..4dde1dc 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ARPA_INET_H
+#ifndef address@hidden@_ARPA_INET_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -47,8 +47,8 @@
 
 #endif
 
-#ifndef _GL_ARPA_INET_H
-#define _GL_ARPA_INET_H
+#ifndef address@hidden@_ARPA_INET_H
+#define address@hidden@_ARPA_INET_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -111,5 +111,5 @@ _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
 #endif
 
 
-#endif /* _GL_ARPA_INET_H */
-#endif /* _GL_ARPA_INET_H */
+#endif /* address@hidden@_ARPA_INET_H */
+#endif /* address@hidden@_ARPA_INET_H */
diff --git a/gl/errno.in.h b/gl/errno.in.h
index a91f591..a63b92a 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ERRNO_H
+#ifndef address@hidden@_ERRNO_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_ERRNO_H@
 
-#ifndef _GL_ERRNO_H
-#define _GL_ERRNO_H
+#ifndef address@hidden@_ERRNO_H
+#define address@hidden@_ERRNO_H
 
 
 /* On native Windows platforms, many macros are not defined.  */
@@ -163,5 +163,5 @@
 # endif
 
 
-#endif /* _GL_ERRNO_H */
-#endif /* _GL_ERRNO_H */
+#endif /* address@hidden@_ERRNO_H */
+#endif /* address@hidden@_ERRNO_H */
diff --git a/gl/error.c b/gl/error.c
index a2d1c1b..7482baa 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -97,11 +97,15 @@ extern void __error_at_line (int status, int errnum, const 
char *file_name,
 /* The gnulib override of fcntl is not needed in this file.  */
 # undef fcntl
 
-# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# if !HAVE_DECL_STRERROR_R
 #  ifndef HAVE_DECL_STRERROR_R
 "this configure-time declaration test was not run"
 #  endif
+#  if STRERROR_R_CHAR_P
 char *strerror_r ();
+#  else
+int strerror_r ();
+#  endif
 # endif
 
 /* The calling program should define program_name and set it to the
diff --git a/gl/fclose.c b/gl/fclose.c
index bce409c..27f6836 100644
--- a/gl/fclose.c
+++ b/gl/fclose.c
@@ -24,28 +24,61 @@
 
 #include "freading.h"
 
-/* Override fclose() to call the overridden close().  */
+/* Override fclose() to call the overridden fflush() or close().  */
 
 int
 rpl_fclose (FILE *fp)
 #undef fclose
 {
   int saved_errno = 0;
+  int fd;
+  int result = 0;
+
+  /* Don't change behavior on memstreams.  */
+  fd = fileno (fp);
+  if (fd < 0)
+    return fclose (fp);
 
   /* We only need to flush the file if it is not reading or if it is
-     seekable.  */
-  if ((!freading (fp) || fseeko (fp, 0, SEEK_CUR) == 0) && fflush (fp))
+     seekable.  This only guarantees the file position of input files
+     if the fflush module is also in use.  */
+  if ((!freading (fp) || lseek (fileno (fp), 0, SEEK_CUR) != -1)
+      && fflush (fp))
     saved_errno = errno;
 
-  if (close (fileno (fp)) < 0 && saved_errno == 0)
+  /* fclose() calls close(), but we need to also invoke all hooks that our
+     overridden close() function invokes.  See lib/close.c.  */
+#if WINDOWS_SOCKETS
+  /* Call the overridden close(), then the original fclose().
+     Note about multithread-safety: There is a race condition where some
+     other thread could open fd between our close and fclose.  */
+  if (close (fd) < 0 && saved_errno == 0)
     saved_errno = errno;
 
-  fclose (fp); /* will fail with errno = EBADF */
+  fclose (fp); /* will fail with errno = EBADF, if we did not lose a race */
+
+#else /* !WINDOWS_SOCKETS */
+  /* Call fclose() and invoke all hooks of the overridden close().  */
+
+# if REPLACE_FCHDIR
+  /* Note about multithread-safety: There is a race condition here as well.
+     Some other thread could open fd between our calls to fclose and
+     _gl_unregister_fd.  */
+  result = fclose (fp);
+  if (result == 0)
+    _gl_unregister_fd (fd);
+# else
+  /* No race condition here.  */
+  result = fclose (fp);
+# endif
+
+#endif /* !WINDOWS_SOCKETS */
 
   if (saved_errno != 0)
     {
       errno = saved_errno;
-      return EOF;
+      result = EOF;
     }
-  return 0;
+
+  return result;
 }
diff --git a/gl/float.c b/gl/float.c
new file mode 100644
index 0000000..c453d6d
--- /dev/null
+++ b/gl/float.c
@@ -0,0 +1,33 @@
+/* Auxiliary definitions for <float.h>.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2011.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <float.h>
+
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 
106) && defined __GNUC__
+const union gl_long_double_union gl_LDBL_MAX =
+  { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
+#elif defined __i386__
+const union gl_long_double_union gl_LDBL_MAX =
+  { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
+#else
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+#endif
diff --git a/gl/float.in.h b/gl/float.in.h
index d32f20e..57b7bc9 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -15,7 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _GL_FLOAT_H
+#ifndef address@hidden@_FLOAT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -25,10 +25,11 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_FLOAT_H@
 
-#ifndef _GL_FLOAT_H
-#define _GL_FLOAT_H
+#ifndef address@hidden@_FLOAT_H
+#define address@hidden@_FLOAT_H
 
 /* 'long double' properties.  */
+
 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
 /* Number of mantissa units, in base FLT_RADIX.  */
 # undef LDBL_MANT_DIG
@@ -59,5 +60,115 @@
 # define LDBL_MAX_10_EXP 4932
 #endif
 
-#endif /* _GL_FLOAT_H */
-#endif /* _GL_FLOAT_H */
+/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+   precision in the compiler but 64 bits of precision at runtime.  See
+   <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.  */
+#if defined __i386__ && defined __FreeBSD__
+/* Number of mantissa units, in base FLT_RADIX.  */
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG   64
+/* Number of decimal digits that is sufficient for representing a number.  */
+# undef LDBL_DIG
+# define LDBL_DIG        18
+/* x-1 where x is the smallest representable number > 1.  */
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 
*/
+/* Minimum e such that FLT_RADIX^(e-1) is a normalized number.  */
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number.  */
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP    16384
+/* Minimum positive normalized number.  */
+# undef LDBL_MIN
+# define LDBL_MIN        3.3621031431120935E-4932L /* = 0x1p-16382L */
+/* Maximum representable finite number.  */
+# undef LDBL_MAX
+/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }.
+   But the largest literal that GCC allows us to write is
+   0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }.
+   So, define it like this through a reference to an external variable
+
+     const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 };
+     extern const long double LDBL_MAX;
+
+   Unfortunately, this is not a constant expression.  */
+union gl_long_double_union
+  {
+    struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
+    long double ld;
+  };
+extern const union gl_long_double_union gl_LDBL_MAX;
+# define LDBL_MAX (gl_LDBL_MAX.ld)
+/* Minimum e such that 10^e is in the range of normalized numbers.  */
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-4931)
+/* Maximum e such that 10^e is in the range of representable finite numbers.  
*/
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP 4932
+#endif
+
+/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
+   wrong.  */
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 
106) && defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
+# undef LDBL_MIN
+# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 
2^-1022 */
+# undef LDBL_MAX
+/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF 
}.
+   It is not easy to define:
+     #define LDBL_MAX 1.79769313486231580793728971405302307166e308L
+   is too small, whereas
+     #define LDBL_MAX 1.79769313486231580793728971405302307167e308L
+   is too large.  Apparently a bug in GCC decimal-to-binary conversion.
+   Also, I can't get values larger than
+     #define LDBL63 ((long double) (1ULL << 63))
+     #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
+     #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
+     #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 
* LDBL63)
+     #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 
9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL)
+   which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }.
+   So, define it like this through a reference to an external variable
+
+     const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / 
(double)134217728UL };
+     extern const long double LDBL_MAX;
+
+   or through a pointer cast
+
+     #define LDBL_MAX \
+       (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / 
(double)134217728UL / (double)134217728UL })
+
+   Unfortunately, this is not a constant expression, and the latter expression
+   does not work well when GCC is optimizing..  */
+union gl_long_double_union
+  {
+    struct { double hi; double lo; } dd;
+    long double ld;
+  };
+extern const union gl_long_double_union gl_LDBL_MAX;
+# define LDBL_MAX (gl_LDBL_MAX.ld)
+#endif
+
+/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
+   On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, 
LDBL_EPSILON
+   are wrong.  */
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG 106
+# if defined __GNUC__
+#  undef LDBL_MIN_EXP
+#  define LDBL_MIN_EXP DBL_MIN_EXP
+#  undef LDBL_MIN_10_EXP
+#  define LDBL_MIN_10_EXP DBL_MIN_10_EXP
+#  undef LDBL_MIN
+#  define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 
2^-1022 */
+#  undef LDBL_EPSILON
+#  define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 
*/
+# endif
+#endif
+
+#endif /* address@hidden@_FLOAT_H */
+#endif /* address@hidden@_FLOAT_H */
diff --git a/gl/fseek.c b/gl/fseek.c
new file mode 100644
index 0000000..bcb76d8
--- /dev/null
+++ b/gl/fseek.c
@@ -0,0 +1,30 @@
+/* An fseek() function that, together with fflush(), is POSIX compliant.
+   Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+/* Get off_t.  */
+#include <unistd.h>
+
+int
+fseek (FILE *fp, long offset, int whence)
+{
+  /* Use the replacement fseeko function with all its workarounds.  */
+  return fseeko (fp, (off_t)offset, whence);
+}
diff --git a/gltests/ftell.c b/gl/ftell.c
similarity index 100%
rename from gltests/ftell.c
rename to gl/ftell.c
diff --git a/gl/getopt.c b/gl/getopt.c
index c8b3013..2af8352 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -479,23 +479,28 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
                             || !strchr (optstring, argv[d->optind][1])))))
     {
       char *nameend;
+      unsigned int namelen;
       const struct option *p;
       const struct option *pfound = NULL;
+      struct option_list
+      {
+        const struct option *p;
+        struct option_list *next;
+      } *ambig_list = NULL;
       int exact = 0;
-      int ambig = 0;
       int indfound = -1;
       int option_index;
 
       for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
         /* Do nothing.  */ ;
+      namelen = nameend - d->__nextchar;
 
       /* Test all long options for either exact match
          or abbreviated matches.  */
       for (p = longopts, option_index = 0; p->name; p++, option_index++)
-        if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+        if (!strncmp (p->name, d->__nextchar, namelen))
           {
-            if ((unsigned int) (nameend - d->__nextchar)
-                == (unsigned int) strlen (p->name))
+            if (namelen == (unsigned int) strlen (p->name))
               {
                 /* Exact match found.  */
                 pfound = p;
@@ -513,35 +518,71 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
                      || pfound->has_arg != p->has_arg
                      || pfound->flag != p->flag
                      || pfound->val != p->val)
-              /* Second or later nonexact match found.  */
-              ambig = 1;
+              {
+                /* Second or later nonexact match found.  */
+                struct option_list *newp = malloc (sizeof (*newp));
+                newp->p = p;
+                newp->next = ambig_list;
+                ambig_list = newp;
+              }
           }
 
-      if (ambig && !exact)
+      if (ambig_list != NULL && !exact)
         {
           if (print_errors)
             {
+              struct option_list first;
+              first.p = pfound;
+              first.next = ambig_list;
+              ambig_list = &first;
+
 #if defined _LIBC && defined USE_IN_LIBIO
-              char *buf;
+              char *buf = NULL;
+              size_t buflen = 0;
 
-              if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
-                              argv[0], argv[d->optind]) >= 0)
+              FILE *fp = open_memstream (&buf, &buflen);
+              if (fp != NULL)
                 {
-                  _IO_flockfile (stderr);
+                  fprintf (fp,
+                           _("%s: option '%s' is ambiguous; possibilities:"),
+                           argv[0], argv[d->optind]);
 
-                  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
-                  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+                  do
+                    {
+                      fprintf (fp, " '--%s'", ambig_list->p->name);
+                      ambig_list = ambig_list->next;
+                    }
+                  while (ambig_list != NULL);
 
-                  __fxprintf (NULL, "%s", buf);
+                  fputc_unlocked ('\n', fp);
 
-                  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
-                  _IO_funlockfile (stderr);
+                  if (__builtin_expect (fclose (fp) != EOF, 1))
+                    {
+                      _IO_flockfile (stderr);
 
-                  free (buf);
+                      int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+                      ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+                      __fxprintf (NULL, "%s", buf);
+
+                      ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+                      _IO_funlockfile (stderr);
+
+                      free (buf);
+                    }
                 }
 #else
-              fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
+              fprintf (stderr,
+                       _("%s: option '%s' is ambiguous; possibilities:"),
                        argv[0], argv[d->optind]);
+              do
+                {
+                  fprintf (stderr, " '--%s'", ambig_list->p->name);
+                  ambig_list = ambig_list->next;
+                }
+              while (ambig_list != NULL);
+
+              fputc ('\n', stderr);
 #endif
             }
           d->__nextchar += strlen (d->__nextchar);
@@ -550,6 +591,13 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
           return '?';
         }
 
+      while (ambig_list != NULL)
+        {
+          struct option_list *pn = ambig_list->next;
+          free (ambig_list);
+          ambig_list = pn;
+        }
+
       if (pfound != NULL)
         {
           option_index = indfound;
@@ -781,7 +829,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
         return '?';
       }
     /* Convenience. Treat POSIX -W foo same as long option --foo */
-    if (temp[0] == 'W' && temp[1] == ';')
+    if (temp[0] == 'W' && temp[1] == ';' && longopts)
       {
         char *nameend;
         const struct option *p;
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 82e2937..0f3918a 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -16,7 +16,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _GL_GETOPT_H
+#ifndef address@hidden@_GETOPT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -32,10 +32,10 @@
 # undef _GL_SYSTEM_GETOPT
 #endif
 
-#ifndef _GL_GETOPT_H
+#ifndef address@hidden@_GETOPT_H
 
 #ifndef __need_getopt
-# define _GL_GETOPT_H 1
+# define address@hidden@_GETOPT_H 1
 #endif
 
 /* Standalone applications should #define __GETOPT_PREFIX to an
@@ -249,5 +249,5 @@ extern int getopt_long_only (int ___argc, char 
*__getopt_argv_const *___argv,
 /* Make sure we later can get all the definitions and declarations.  */
 #undef __need_getopt
 
-#endif /* getopt.h */
-#endif /* getopt.h */
+#endif /* address@hidden@_GETOPT_H */
+#endif /* address@hidden@_GETOPT_H */
diff --git a/gl/iconv.c b/gl/iconv.c
new file mode 100644
index 0000000..8928376
--- /dev/null
+++ b/gl/iconv.c
@@ -0,0 +1,450 @@
+/* Character set conversion.
+   Copyright (C) 1999-2001, 2007, 2009-2011 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, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <iconv.h>
+
+#include <stddef.h>
+
+#if REPLACE_ICONV_UTF
+# include <errno.h>
+# include <stdint.h>
+# include <stdlib.h>
+# include "unistr.h"
+# ifndef uintptr_t
+#  define uintptr_t unsigned long
+# endif
+#endif
+
+#if REPLACE_ICONV_UTF
+
+/* UTF-{16,32}{BE,LE} converters taken from GNU libiconv 1.11.  */
+
+/* Return code if invalid. (xxx_mbtowc) */
+# define RET_ILSEQ      -1
+/* Return code if no bytes were read. (xxx_mbtowc) */
+# define RET_TOOFEW     -2
+
+/* Return code if invalid. (xxx_wctomb) */
+# define RET_ILUNI      -1
+/* Return code if output buffer is too small. (xxx_wctomb, xxx_reset) */
+# define RET_TOOSMALL   -2
+
+/*
+ * UTF-16BE
+ */
+
+/* Specification: RFC 2781 */
+
+static int
+utf16be_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n)
+{
+  if (n >= 2)
+    {
+      ucs4_t wc = (s[0] << 8) + s[1];
+      if (wc >= 0xd800 && wc < 0xdc00)
+        {
+          if (n >= 4)
+            {
+              ucs4_t wc2 = (s[2] << 8) + s[3];
+              if (!(wc2 >= 0xdc00 && wc2 < 0xe000))
+                return RET_ILSEQ;
+              *pwc = 0x10000 + ((wc - 0xd800) << 10) + (wc2 - 0xdc00);
+              return 4;
+            }
+        }
+      else if (wc >= 0xdc00 && wc < 0xe000)
+        {
+          return RET_ILSEQ;
+        }
+      else
+        {
+          *pwc = wc;
+          return 2;
+        }
+    }
+  return RET_TOOFEW;
+}
+
+static int
+utf16be_wctomb (unsigned char *r, ucs4_t wc, size_t n)
+{
+  if (!(wc >= 0xd800 && wc < 0xe000))
+    {
+      if (wc < 0x10000)
+        {
+          if (n >= 2)
+            {
+              r[0] = (unsigned char) (wc >> 8);
+              r[1] = (unsigned char) wc;
+              return 2;
+            }
+          else
+            return RET_TOOSMALL;
+        }
+      else if (wc < 0x110000)
+        {
+          if (n >= 4)
+            {
+              ucs4_t wc1 = 0xd800 + ((wc - 0x10000) >> 10);
+              ucs4_t wc2 = 0xdc00 + ((wc - 0x10000) & 0x3ff);
+              r[0] = (unsigned char) (wc1 >> 8);
+              r[1] = (unsigned char) wc1;
+              r[2] = (unsigned char) (wc2 >> 8);
+              r[3] = (unsigned char) wc2;
+              return 4;
+            }
+          else
+            return RET_TOOSMALL;
+        }
+    }
+  return RET_ILUNI;
+}
+
+/*
+ * UTF-16LE
+ */
+
+/* Specification: RFC 2781 */
+
+static int
+utf16le_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n)
+{
+  if (n >= 2)
+    {
+      ucs4_t wc = s[0] + (s[1] << 8);
+      if (wc >= 0xd800 && wc < 0xdc00)
+        {
+          if (n >= 4)
+            {
+              ucs4_t wc2 = s[2] + (s[3] << 8);
+              if (!(wc2 >= 0xdc00 && wc2 < 0xe000))
+                return RET_ILSEQ;
+              *pwc = 0x10000 + ((wc - 0xd800) << 10) + (wc2 - 0xdc00);
+              return 4;
+            }
+        }
+      else if (wc >= 0xdc00 && wc < 0xe000)
+        {
+          return RET_ILSEQ;
+        }
+      else
+        {
+          *pwc = wc;
+          return 2;
+        }
+    }
+  return RET_TOOFEW;
+}
+
+static int
+utf16le_wctomb (unsigned char *r, ucs4_t wc, size_t n)
+{
+  if (!(wc >= 0xd800 && wc < 0xe000))
+    {
+      if (wc < 0x10000)
+        {
+          if (n >= 2)
+            {
+              r[0] = (unsigned char) wc;
+              r[1] = (unsigned char) (wc >> 8);
+              return 2;
+            }
+          else
+            return RET_TOOSMALL;
+        }
+      else if (wc < 0x110000)
+        {
+          if (n >= 4)
+            {
+              ucs4_t wc1 = 0xd800 + ((wc - 0x10000) >> 10);
+              ucs4_t wc2 = 0xdc00 + ((wc - 0x10000) & 0x3ff);
+              r[0] = (unsigned char) wc1;
+              r[1] = (unsigned char) (wc1 >> 8);
+              r[2] = (unsigned char) wc2;
+              r[3] = (unsigned char) (wc2 >> 8);
+              return 4;
+            }
+          else
+            return RET_TOOSMALL;
+        }
+    }
+  return RET_ILUNI;
+}
+
+/*
+ * UTF-32BE
+ */
+
+/* Specification: Unicode 3.1 Standard Annex #19 */
+
+static int
+utf32be_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n)
+{
+  if (n >= 4)
+    {
+      ucs4_t wc = (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3];
+      if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000))
+        {
+          *pwc = wc;
+          return 4;
+        }
+      else
+        return RET_ILSEQ;
+    }
+  return RET_TOOFEW;
+}
+
+static int
+utf32be_wctomb (unsigned char *r, ucs4_t wc, size_t n)
+{
+  if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000))
+    {
+      if (n >= 4)
+        {
+          r[0] = 0;
+          r[1] = (unsigned char) (wc >> 16);
+          r[2] = (unsigned char) (wc >> 8);
+          r[3] = (unsigned char) wc;
+          return 4;
+        }
+      else
+        return RET_TOOSMALL;
+    }
+  return RET_ILUNI;
+}
+
+/*
+ * UTF-32LE
+ */
+
+/* Specification: Unicode 3.1 Standard Annex #19 */
+
+static int
+utf32le_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n)
+{
+  if (n >= 4)
+    {
+      ucs4_t wc = s[0] + (s[1] << 8) + (s[2] << 16) + (s[3] << 24);
+      if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000))
+        {
+          *pwc = wc;
+          return 4;
+        }
+      else
+        return RET_ILSEQ;
+    }
+  return RET_TOOFEW;
+}
+
+static int
+utf32le_wctomb (unsigned char *r, ucs4_t wc, size_t n)
+{
+  if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000))
+    {
+      if (n >= 4)
+        {
+          r[0] = (unsigned char) wc;
+          r[1] = (unsigned char) (wc >> 8);
+          r[2] = (unsigned char) (wc >> 16);
+          r[3] = 0;
+          return 4;
+        }
+      else
+        return RET_TOOSMALL;
+    }
+  return RET_ILUNI;
+}
+
+#endif
+
+size_t
+rpl_iconv (iconv_t cd,
+           ICONV_CONST char **inbuf, size_t *inbytesleft,
+           char **outbuf, size_t *outbytesleft)
+#undef iconv
+{
+#if REPLACE_ICONV_UTF
+  switch ((uintptr_t) cd)
+    {
+      {
+        int (*xxx_wctomb) (unsigned char *, ucs4_t, size_t);
+
+        case (uintptr_t) _ICONV_UTF8_UTF16BE:
+          xxx_wctomb = utf16be_wctomb;
+          goto loop_from_utf8;
+        case (uintptr_t) _ICONV_UTF8_UTF16LE:
+          xxx_wctomb = utf16le_wctomb;
+          goto loop_from_utf8;
+        case (uintptr_t) _ICONV_UTF8_UTF32BE:
+          xxx_wctomb = utf32be_wctomb;
+          goto loop_from_utf8;
+        case (uintptr_t) _ICONV_UTF8_UTF32LE:
+          xxx_wctomb = utf32le_wctomb;
+          goto loop_from_utf8;
+
+       loop_from_utf8:
+        if (inbuf == NULL || *inbuf == NULL)
+          return 0;
+        {
+          ICONV_CONST char *inptr = *inbuf;
+          size_t inleft = *inbytesleft;
+          char *outptr = *outbuf;
+          size_t outleft = *outbytesleft;
+          size_t res = 0;
+          while (inleft > 0)
+            {
+              ucs4_t uc;
+              int m = u8_mbtoucr (&uc, (const uint8_t *) inptr, inleft);
+              if (m <= 0)
+                {
+                  if (m == -1)
+                    {
+                      errno = EILSEQ;
+                      res = (size_t)(-1);
+                      break;
+                    }
+                  if (m == -2)
+                    {
+                      errno = EINVAL;
+                      res = (size_t)(-1);
+                      break;
+                    }
+                  abort ();
+                }
+              else
+                {
+                  int n = xxx_wctomb ((uint8_t *) outptr, uc, outleft);
+                  if (n < 0)
+                    {
+                      if (n == RET_ILUNI)
+                        {
+                          errno = EILSEQ;
+                          res = (size_t)(-1);
+                          break;
+                        }
+                      if (n == RET_TOOSMALL)
+                        {
+                          errno = E2BIG;
+                          res = (size_t)(-1);
+                          break;
+                        }
+                      abort ();
+                    }
+                  else
+                    {
+                      inptr += m;
+                      inleft -= m;
+                      outptr += n;
+                      outleft -= n;
+                    }
+                }
+            }
+          *inbuf = inptr;
+          *inbytesleft = inleft;
+          *outbuf = outptr;
+          *outbytesleft = outleft;
+          return res;
+        }
+      }
+
+      {
+        int (*xxx_mbtowc) (ucs4_t *, const unsigned char *, size_t);
+
+        case (uintptr_t) _ICONV_UTF16BE_UTF8:
+          xxx_mbtowc = utf16be_mbtowc;
+          goto loop_to_utf8;
+        case (uintptr_t) _ICONV_UTF16LE_UTF8:
+          xxx_mbtowc = utf16le_mbtowc;
+          goto loop_to_utf8;
+        case (uintptr_t) _ICONV_UTF32BE_UTF8:
+          xxx_mbtowc = utf32be_mbtowc;
+          goto loop_to_utf8;
+        case (uintptr_t) _ICONV_UTF32LE_UTF8:
+          xxx_mbtowc = utf32le_mbtowc;
+          goto loop_to_utf8;
+
+       loop_to_utf8:
+        if (inbuf == NULL || *inbuf == NULL)
+          return 0;
+        {
+          ICONV_CONST char *inptr = *inbuf;
+          size_t inleft = *inbytesleft;
+          char *outptr = *outbuf;
+          size_t outleft = *outbytesleft;
+          size_t res = 0;
+          while (inleft > 0)
+            {
+              ucs4_t uc;
+              int m = xxx_mbtowc (&uc, (const uint8_t *) inptr, inleft);
+              if (m <= 0)
+                {
+                  if (m == RET_ILSEQ)
+                    {
+                      errno = EILSEQ;
+                      res = (size_t)(-1);
+                      break;
+                    }
+                  if (m == RET_TOOFEW)
+                    {
+                      errno = EINVAL;
+                      res = (size_t)(-1);
+                      break;
+                    }
+                  abort ();
+                }
+              else
+                {
+                  int n = u8_uctomb ((uint8_t *) outptr, uc, outleft);
+                  if (n < 0)
+                    {
+                      if (n == -1)
+                        {
+                          errno = EILSEQ;
+                          res = (size_t)(-1);
+                          break;
+                        }
+                      if (n == -2)
+                        {
+                          errno = E2BIG;
+                          res = (size_t)(-1);
+                          break;
+                        }
+                      abort ();
+                    }
+                  else
+                    {
+                      inptr += m;
+                      inleft -= m;
+                      outptr += n;
+                      outleft -= n;
+                    }
+                }
+            }
+          *inbuf = inptr;
+          *inbytesleft = inleft;
+          *outbuf = outptr;
+          *outbytesleft = outleft;
+          return res;
+        }
+      }
+    }
+#endif
+  return iconv (cd, inbuf, inbytesleft, outbuf, outbytesleft);
+}
diff --git a/gl/iconv.in.h b/gl/iconv.in.h
index 6f9b4f1..83ca719 100644
--- a/gl/iconv.in.h
+++ b/gl/iconv.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ICONV_H
+#ifndef address@hidden@_ICONV_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_ICONV_H@
 
-#ifndef _GL_ICONV_H
-#define _GL_ICONV_H
+#ifndef address@hidden@_ICONV_H
+#define address@hidden@_ICONV_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -107,5 +107,5 @@ _GL_CXXALIASWARN (iconv_close);
 #endif
 
 
-#endif /* _GL_ICONV_H */
-#endif /* _GL_ICONV_H */
+#endif /* address@hidden@_ICONV_H */
+#endif /* address@hidden@_ICONV_H */
diff --git a/gl/iconv_close.c b/gl/iconv_close.c
new file mode 100644
index 0000000..72cbf88
--- /dev/null
+++ b/gl/iconv_close.c
@@ -0,0 +1,47 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2009-2011 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, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <iconv.h>
+
+#include <stdint.h>
+#ifndef uintptr_t
+# define uintptr_t unsigned long
+#endif
+
+int
+rpl_iconv_close (iconv_t cd)
+#undef iconv_close
+{
+#if REPLACE_ICONV_UTF
+  switch ((uintptr_t) cd)
+    {
+    case (uintptr_t) _ICONV_UTF8_UTF16BE:
+    case (uintptr_t) _ICONV_UTF8_UTF16LE:
+    case (uintptr_t) _ICONV_UTF8_UTF32BE:
+    case (uintptr_t) _ICONV_UTF8_UTF32LE:
+    case (uintptr_t) _ICONV_UTF16BE_UTF8:
+    case (uintptr_t) _ICONV_UTF16LE_UTF8:
+    case (uintptr_t) _ICONV_UTF32BE_UTF8:
+    case (uintptr_t) _ICONV_UTF32LE_UTF8:
+      return 0;
+    }
+#endif
+  return iconv_close (cd);
+}
diff --git a/gl/intprops.h b/gl/intprops.h
index 58b1b3f..1f6a539 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -17,70 +17,303 @@
 
 /* Written by Paul Eggert.  */
 
-#ifndef GL_INTPROPS_H
-# define GL_INTPROPS_H
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
 
-# include <limits.h>
+#include <limits.h>
+
+/* Return an integer value, converted to the same type as the integer
+   expression E after integer type promotion.  V is the unconverted value.  */
+#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
 
 /* The extra casts in the following macros work around compiler bugs,
    e.g., in Cray C 5.0.3.0.  */
 
 /* True if the arithmetic type T is an integer type.  bool counts as
    an integer.  */
-# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
 
 /* True if negative values of the signed integer type T use two's
    complement, ones' complement, or signed magnitude representation,
    respectively.  Much GNU code assumes two's complement, but some
    people like to be portable to all possible C hosts.  */
-# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement.  */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
 
 /* True if the arithmetic type T is signed.  */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+   a signed type.  */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
 
-/* The maximum and minimum values for the integer type T.  These
+/* Minimum and maximum values for integer types and expressions.  These
    macros have undefined behavior if T is signed and has padding bits.
    If this is a problem for you, please let us know how to fix it for
    your host.  */
-# define TYPE_MINIMUM(t) \
-  ((t) (! TYPE_SIGNED (t) \
-        ? (t) 0 \
-        : TYPE_SIGNED_MAGNITUDE (t) \
-        ? ~ (t) 0 \
+
+/* The maximum and minimum values for the integer type T.  */
+#define TYPE_MINIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) 0                                                         \
+        : TYPE_SIGNED_MAGNITUDE (t)                                     \
+        ? ~ (t) 0                                                       \
         : ~ TYPE_MAXIMUM (t)))
-# define TYPE_MAXIMUM(t) \
-  ((t) (! TYPE_SIGNED (t) \
-        ? (t) -1 \
+#define TYPE_MAXIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) -1                                                        \
         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
 
-/* Return zero if T can be determined to be an unsigned type.
-   Otherwise, return 1.
-   When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
-   tighter bound.  Otherwise, it overestimates the true bound by one byte
-   when applied to unsigned types of size 2, 4, 16, ... bytes.
-   The symbol signed_type_or_expr__ is private to this header file.  */
-# if __GNUC__ >= 2
-#  define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
-# else
-#  define signed_type_or_expr__(t) 1
-# endif
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E should not have side effects.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works.  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  This macro does not evaluate its argument,
+   and expands to an integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_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)
+#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, and then add 1 more for
-   a minus sign if needed.  */
-# define INT_STRLEN_BOUND(t) \
-  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
-   + signed_type_or_expr__ (t))
+   a minus sign if needed.
+
+   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+   signed, this macro may overestimate the true bound by one byte when
+   applied to unsigned types of size 2, 4, 16, ... bytes.  */
+#define INT_STRLEN_BOUND(t)                                     \
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT                 \
+                          - _GL_SIGNED_TYPE_OR_EXPR (t))        \
+   + _GL_SIGNED_TYPE_OR_EXPR (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
    including the terminating null.  */
-# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+   The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
+   operators might not yield numerically correct answers due to
+   arithmetic overflow.  They do not rely on undefined or
+   implementation-defined behavior.  Their implementations are simple
+   and straightforward, but they are a bit harder to use than the
+   INT_<op>_OVERFLOW macros described below.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   Restrictions on *_RANGE_OVERFLOW macros:
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times,
+   so the arguments should not have side effects.  The arithmetic
+   arguments (including the MIN and MAX arguments) must be of the same
+   integer type after the usual arithmetic conversions, and the type
+   must have minimum value MIN and maximum MAX.  Unsigned types should
+   use a zero MIN of the proper type.
+
+   These macros are tuned for constant MIN and MAX.  For commutative
+   operations such as A + B, they are also tuned for constant B.  */
+
+/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_ADD_RANGE_OVERFLOW(a, b, min, max)          \
+  ((b) < 0                                              \
+   ? (a) < (min) - (b)                                  \
+   : (max) - (b) < (a))
+
+/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? (max) + (b) < (a)                                  \
+   : (a) < (min) + (b))
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
+  ((min) < 0                                            \
+   ? (a) < - (max)                                      \
+   : 0 < (a))
+
+/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Avoid && and || as they tickle
+   bugs in Sun C 5.11 2010/08/13 and other compilers; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? ((a) < 0                                           \
+      ? (a) < (max) / (b)                               \
+      : (b) == -1                                       \
+      ? 0                                               \
+      : (min) / (b) < (a))                              \
+   : (b) == 0                                           \
+   ? 0                                                  \
+   : ((a) < 0                                           \
+      ? (a) < (min) / (b)                               \
+      : (max) / (b) < (a)))
+
+/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.  */
+#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max)       \
+  ((min) < 0 && (b) == -1 && (a) < - (max))
+
+/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.
+   Mathematically, % should never overflow, but on x86-like hosts
+   INT_MIN % -1 traps, and the C standard permits this, so treat this
+   as an overflow too.  */
+#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max)    \
+  INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
+
+/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Here, MIN and MAX are for A only, and B need
+   not be of the same type as the other arguments.  The C standard says that
+   behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
+   A is negative then A << B has undefined behavior and A >> B has
+   implementation-defined behavior, but do not check these other
+   restrictions.  */
+#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max)   \
+  ((a) < 0                                              \
+   ? (a) < (min) >> (b)                                 \
+   : (max) >> (b) < (a))
+
+
+/* The _GL*_OVERFLOW macros have the same restrictions as the
+   *_RANGE_OVERFLOW macros, except that they do not assume that operands
+   (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
+   that the result (e.g., A + B) has that type.  */
+#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+   : (a) < 0 ? (b) <= (a) + (b)                                         \
+   : (b) < 0 ? (a) <= (a) + (b)                                         \
+   : (a) + (b) < (b))
+#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+   : (a) < 0 ? 1                                                        \
+   : (b) < 0 ? (a) - (b) <= (a)                                         \
+   : (a) < (b))
+#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
+   : (b) < 0 && (a) + (b) <= (a))
+#define _GL_REMAINDER_OVERFLOW(a, b, min, max)                          \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b)                     \
+   : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
+
+/* Return a nonzero value if A is a mathematical multiple of B, where
+   A is unsigned, B is negative, and MAX is the maximum value of A's
+   type.  A's type must be the same as (A % B)'s type.  Normally (A %
+   -B == 0) suffices, but things get tricky if -B would overflow.  */
+#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max)                            \
+  (((b) < -_GL_SIGNED_INT_MAXIMUM (b)                                   \
+    ? (_GL_SIGNED_INT_MAXIMUM (b) == (max)                              \
+       ? (a)                                                            \
+       : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1))   \
+    : (a) % - (b))                                                      \
+   == 0)
+
+
+/* Integer overflow checks.
+
+   The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
+   might not yield numerically correct answers due to arithmetic overflow.
+   They work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_OVERFLOW (i, j))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for their last argument being a constant.
+
+   Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
+   A % B, and A << B would overflow, respectively.  */
+
+#define INT_ADD_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+#define INT_SUBTRACT_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+#define INT_NEGATE_OVERFLOW(a) \
+  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#define INT_MULTIPLY_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
+#define INT_DIVIDE_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
+#define INT_REMAINDER_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
+#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
+                                 _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+
+/* Return 1 if the expression A <op> B would overflow,
+   where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+   assuming MIN and MAX are the minimum and maximum for the result type.
+   Arguments should be free of side effects.  */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow)        \
+  op_result_overflow (a, b,                                     \
+                      _GL_INT_MINIMUM (0 * (b) + (a)),          \
+                      _GL_INT_MAXIMUM (0 * (b) + (a)))
 
-#endif /* GL_INTPROPS_H */
+#endif /* _GL_INTPROPS_H */
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index 689da75..891fc8b 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 11
+# alloca.m4 serial 12
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -42,3 +42,80 @@ AC_DEFUN([gl_FUNC_ALLOCA],
 # Prerequisites of lib/alloca.c.
 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
+
+# This works around a bug in autoconf <= 2.68.
+# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+
+m4_version_prereq([2.69], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+
+# _AC_LIBOBJ_ALLOCA
+# -----------------
+# Set up the LIBOBJ replacement of `alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Nevertheless, for Automake, AC_LIBSOURCES it.
+m4_define([_AC_LIBOBJ_ALLOCA],
+[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+AC_LIBSOURCES(alloca.c)
+AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+
+AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
+[AC_EGREP_CPP(webecray,
+[#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    AC_CHECK_FUNC($ac_func,
+                 [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
+                                     [Define to one of `_getb67', `GETB67',
+                                      `getb67' for Cray-2 and Cray-YMP
+                                      systems. This function is required for
+                                      `alloca.c' support on those systems.])
+    break])
+  done
+fi
+
+AC_CACHE_CHECK([stack direction for C alloca],
+              [ac_cv_c_stack_direction],
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}])],
+              [ac_cv_c_stack_direction=1],
+              [ac_cv_c_stack_direction=-1],
+              [ac_cv_c_stack_direction=0])])
+AH_VERBATIM([STACK_DIRECTION],
+[/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
address@hidden:@undef STACK_DIRECTION])dnl
+AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
+])# _AC_LIBOBJ_ALLOCA
+])
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index d21b162..6dc0fdb 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,4 +1,4 @@
-# arpa_inet_h.m4 serial 11
+# arpa_inet_h.m4 serial 12
 dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,13 +38,6 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
     ]], [inet_ntop inet_pton])
 ])
 
-dnl Unconditionally enables the replacement of <arpa/inet.h>.
-AC_DEFUN([gl_REPLACE_ARPA_INET_H],
-[
-  dnl This is a no-op, because <arpa/inet.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index 603298f..2b845e7 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,4 +1,4 @@
-# btowc.m4 serial 8
+# btowc.m4 serial 10
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -108,11 +108,6 @@ int main ()
       *) REPLACE_BTOWC=1 ;;
     esac
   fi
-  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([btowc])
-    gl_PREREQ_BTOWC
-  fi
 ])
 
 # Prerequisites of lib/btowc.c.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index 62e31a8..8d7f62c 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 12
+#serial 13
 dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,6 @@ AC_DEFUN([gl_FUNC_DUP2],
   ], [
     AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
   ])
-  AC_CHECK_FUNCS_ONCE([fcntl])
   if test $HAVE_DUP2 = 1; then
     AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
       [AC_RUN_IFELSE([
@@ -25,13 +24,13 @@ AC_DEFUN([gl_FUNC_DUP2],
 #include <fcntl.h>
 #include <errno.h>]],
            [int result = 0;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
               result |= 1;
-#endif HAVE_FCNTL
+#endif
             if (dup2 (1, 1) == 0)
               result |= 2;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
               result |= 4;
 #endif
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 6ea75ac..e7022fe 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
 
 # Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
 #
@@ -8,16 +8,8 @@
 
 AC_DEFUN([gl_ERROR],
 [
-  AC_FUNC_ERROR_AT_LINE
-  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
-  gl_PREREQ_ERROR
-])
-
-# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
-# Autoconf.
-AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
-[
-  AC_LIBSOURCES([error.h, error.c])dnl
+  dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+  dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
   AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
     [AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
@@ -25,9 +17,6 @@ AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
           [[error_at_line (0, 0, "", 0, "an error occurred");]])],
        [ac_cv_lib_error_at_line=yes],
        [ac_cv_lib_error_at_line=no])])
-  if test $ac_cv_lib_error_at_line = no; then
-    AC_LIBOBJ([error])
-  fi
 ])
 
 # Prerequisites of lib/error.c.
diff --git a/gl/m4/fclose.m4 b/gl/m4/fclose.m4
index 278859c..349b5f1 100644
--- a/gl/m4/fclose.m4
+++ b/gl/m4/fclose.m4
@@ -1,4 +1,4 @@
-# fclose.m4 serial 2
+# fclose.m4 serial 4
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,10 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_FCLOSE],
 [
+  gl_FUNC_FFLUSH_STDIN
+  if test $gl_cv_func_fflush_stdin = no; then
+    gl_REPLACE_FCLOSE
+  fi
 ])
 
 AC_DEFUN([gl_REPLACE_FCLOSE],
diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4
index f7645de..a91ee0b 100644
--- a/gl/m4/fflush.m4
+++ b/gl/m4/fflush.m4
@@ -1,4 +1,4 @@
-# fflush.m4 serial 8
+# fflush.m4 serial 12
 
 # Copyright (C) 2007-2011 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -12,6 +12,18 @@ dnl unread input on seekable streams, rather than C99 
undefined semantics.
 
 AC_DEFUN([gl_FUNC_FFLUSH],
 [
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  gl_FUNC_FFLUSH_STDIN
+  if test $gl_cv_func_fflush_stdin = no; then
+    REPLACE_FFLUSH=1
+  fi
+])
+
+dnl Determine whether fflush works on input streams.
+dnl Sets gl_cv_func_fflush_stdin.
+
+AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
+[
   AC_CACHE_CHECK([whether fflush works on input streams],
     [gl_cv_func_fflush_stdin],
     [echo hello world > conftest.txt
@@ -59,18 +71,6 @@ AC_DEFUN([gl_FUNC_FFLUSH],
       gl_cv_func_fflush_stdin=no])
      rm conftest.txt
     ])
-  if test $gl_cv_func_fflush_stdin = no; then
-    gl_REPLACE_FFLUSH
-  fi
-])
-
-AC_DEFUN([gl_REPLACE_FFLUSH],
-[
-  AC_LIBOBJ([fflush])
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  REPLACE_FFLUSH=1
-  gl_PREREQ_FFLUSH
-  gl_REPLACE_FSEEKO
 ])
 
 # Prerequisites of lib/fflush.c.
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 21a7529..261f1ac 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,4 +1,4 @@
-# float_h.m4 serial 6
+# float_h.m4 serial 7
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,12 +9,41 @@ AC_DEFUN([gl_FLOAT_H],
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
   FLOAT_H=
+  REPLACE_FLOAT_LDBL=0
   case "$host_os" in
-    beos* | openbsd* | mirbsd*)
+    aix* | beos* | openbsd* | mirbsd* | irix*)
       FLOAT_H=float.h
-      gl_NEXT_HEADERS([float.h])
+      ;;
+    freebsd*)
+      case "$host_cpu" in
+changequote(,)dnl
+        i[34567]86 )
+changequote([,])dnl
+          FLOAT_H=float.h
+          ;;
+        x86_64 )
+          # On x86_64 systems, the C compiler may still be generating
+          # 32-bit code.
+          AC_EGREP_CPP([yes],
+            [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
+             yes
+             #endif],
+            [],
+            [FLOAT_H=float.h])
+          ;;
+      esac
+      ;;
+  esac
+  case "$host_os" in
+    aix* | freebsd*)
+      if test -n "$FLOAT_H"; then
+        REPLACE_FLOAT_LDBL=1
+      fi
       ;;
   esac
+  if test -n "$FLOAT_H"; then
+    gl_NEXT_HEADERS([float.h])
+  fi
   AC_SUBST([FLOAT_H])
   AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
 ])
diff --git a/gl/m4/fpieee.m4 b/gl/m4/fpieee.m4
new file mode 100644
index 0000000..7872876
--- /dev/null
+++ b/gl/m4/fpieee.m4
@@ -0,0 +1,52 @@
+# fpieee.m4 serial 1
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl IEEE 754 standardized three items:
+dnl - The formats of single-float and double-float - nowadays commonly
+dnl   available as 'float' and 'double' in C and C++.
+dnl   No autoconf test needed.
+dnl - The overflow and division by zero behaviour: The result are values
+dnl   '±Inf' and 'NaN', rather than exceptions as it was before.
+dnl   This file provides an autoconf macro for ensuring this behaviour of
+dnl   floating-point operations.
+dnl - A set of conditions (overflow, underflow, inexact, etc.) which can
+dnl   be configured to trigger an exception.
+dnl   This cannot be done in a portable way: it depends on the compiler,
+dnl   libc, kernel, and CPU.  No autoconf macro is provided for this.
+
+dnl Ensure non-trapping behaviour of floating-point overflow and
+dnl floating-point division by zero.
+dnl (For integer overflow, see gcc's -ftrapv option; for integer division by
+dnl zero, see the autoconf macro in intdiv0.m4.)
+
+AC_DEFUN([gl_FP_IEEE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  # IEEE behaviour is the default on all CPUs except Alpha and SH
+  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+  # and the GCC 4.1.2 manual).
+  case "$host_cpu" in
+    alpha*)
+      # On Alpha systems, a compiler option provides the behaviour.
+      # See the ieee(3) manual page, also available at
+      # 
<http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+      if test -n "$GCC"; then
+        # GCC has the option -mieee.
+        CPPFLAGS="$CPPFLAGS -mieee"
+      else
+        # Compaq (ex-DEC) C has the option -ieee.
+        CPPFLAGS="$CPPFLAGS -ieee"
+      fi
+      ;;
+    sh*)
+      if test -n "$GCC"; then
+        # GCC has the option -mieee.
+        CPPFLAGS="$CPPFLAGS -mieee"
+      fi
+      ;;
+  esac
+])
diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4
index a62c2fe..234f563 100644
--- a/gl/m4/fpurge.m4
+++ b/gl/m4/fpurge.m4
@@ -1,4 +1,4 @@
-# fpurge.m4 serial 6
+# fpurge.m4 serial 7
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_FPURGE],
   AC_CHECK_FUNCS_ONCE([__fpurge])
   AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
   if test "x$ac_cv_func_fpurge" = xyes; then
+    HAVE_FPURGE=1
     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
     AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
@@ -34,10 +35,9 @@ AC_DEFUN([gl_FUNC_FPURGE],
       [gl_cv_func_fpurge_works='guessing no'])])
     if test "x$gl_cv_func_fpurge_works" != xyes; then
       REPLACE_FPURGE=1
-      AC_LIBOBJ([fpurge])
     fi
   else
-    AC_LIBOBJ([fpurge])
+    HAVE_FPURGE=0
   fi
   if test "x$ac_cv_have_decl_fpurge" = xno; then
     HAVE_DECL_FPURGE=0
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4
new file mode 100644
index 0000000..135a22b
--- /dev/null
+++ b/gl/m4/fseek.m4
@@ -0,0 +1,15 @@
+# fseek.m4 serial 4
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FSEEK],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_FSEEKO])
+  dnl When fseeko needs fixes, fseek needs them too.
+  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+    REPLACE_FSEEK=1
+  fi
+])
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 76507d1..391948d 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 11
+# fseeko.m4 serial 15
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,28 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_FSEEKO],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  AC_REQUIRE([gl_HAVE_FSEEKO])
   AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
-
-  AC_CHECK_DECLS_ONCE([fseeko])
-  if test $ac_cv_have_decl_fseeko = no; then
-    HAVE_DECL_FSEEKO=0
-  fi
-
-  if test $gl_cv_func_fseeko = no; then
-    HAVE_FSEEKO=0
-    gl_REPLACE_FSEEKO
-  else
-    if test $gl_cv_var_stdin_large_offset = no; then
-      gl_REPLACE_FSEEKO
-    fi
-  fi
-])
-
-dnl Tests whether fseeko is available.
-dnl Result is gl_cv_func_fseeko.
-AC_DEFUN([gl_HAVE_FSEEKO],
-[
   AC_REQUIRE([AC_PROG_CC])
 
   dnl Persuade glibc <stdio.h> to declare fseeko().
@@ -40,18 +19,25 @@ AC_DEFUN([gl_HAVE_FSEEKO],
 ]], [fseeko (stdin, 0, 0);])],
         [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
     ])
-])
 
-AC_DEFUN([gl_REPLACE_FSEEKO],
-[
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  AC_REQUIRE([gl_HAVE_FSEEKO])
-  if test $gl_cv_func_fseeko = yes; then
-    REPLACE_FSEEKO=1
+  AC_CHECK_DECLS_ONCE([fseeko])
+  if test $ac_cv_have_decl_fseeko = no; then
+    HAVE_DECL_FSEEKO=0
+  fi
+
+  if test $gl_cv_func_fseeko = no; then
+    HAVE_FSEEKO=0
+  else
+    if test $gl_cv_var_stdin_large_offset = no; then
+      REPLACE_FSEEKO=1
+    fi
+    m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
+      gl_FUNC_FFLUSH_STDIN
+      if test $gl_cv_func_fflush_stdin = no; then
+        REPLACE_FSEEKO=1
+      fi
+    ])
   fi
-  AC_LIBOBJ([fseeko])
-  dnl If we are also using the fseek module, then fseek needs replacing, too.
-  m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
 ])
 
 dnl Code shared by fseeko and ftello.  Determine if large files are supported,
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index 8d88485..c529c50 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,4 +1,4 @@
-# ftell.m4 serial 1
+# ftell.m4 serial 3
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,8 +9,7 @@ AC_DEFUN([gl_FUNC_FTELL],
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_FTELLO])
   dnl When ftello needs fixes, ftell needs them too.
-  if test $REPLACE_FTELLO != 0; then
-    AC_LIBOBJ([ftell])
+  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
     REPLACE_FTELL=1
   fi
 ])
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index 599f8f2..10cf429 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,4 +1,4 @@
-# ftello.m4 serial 9
+# ftello.m4 serial 10
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -124,12 +124,4 @@ main (void)
       esac
     fi
   fi
-  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
-    gl_REPLACE_FTELLO
-  fi
-])
-
-AC_DEFUN([gl_REPLACE_FTELLO],
-[
-  AC_LIBOBJ([ftello])
 ])
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index f29e903..20a6226 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 25
+# getaddrinfo.m4 serial 26
 dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -24,6 +24,7 @@ AC_DEFUN([gl_GETADDRINFO],
      fi])
   LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
 
+  HAVE_GETADDRINFO=1
   AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
@@ -55,7 +56,7 @@ AC_DEFUN([gl_GETADDRINFO],
       GETADDRINFO_LIB="-lws2_32"
       LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
     else
-      AC_LIBOBJ([getaddrinfo])
+      HAVE_GETADDRINFO=0
     fi
   fi
 
@@ -75,9 +76,7 @@ AC_DEFUN([gl_GETADDRINFO],
 #endif
 #include <stddef.h>
 ]])
-  if test $ac_cv_have_decl_gai_strerror = no; then
-    AC_LIBOBJ([gai_strerror])
-  else
+  if test $ac_cv_have_decl_gai_strerror = yes; then
     dnl check for correct signature
     AC_CACHE_CHECK([for gai_strerror with POSIX signature],
      [gl_cv_func_gai_strerror_posix_signature], [
@@ -98,7 +97,6 @@ extern const char *gai_strerror(int);]])],
         [gl_cv_func_gai_strerror_posix_signature=no])])
     if test $gl_cv_func_gai_strerror_posix_signature = no; then
       REPLACE_GAI_STRERROR=1
-      AC_LIBOBJ([gai_strerror])
     fi
   fi
 
diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
new file mode 100644
index 0000000..269fdd7
--- /dev/null
+++ b/gl/m4/getcwd.m4
@@ -0,0 +1,111 @@
+# getcwd.m4 - check for working getcwd that is compatible with glibc
+
+# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+# serial 7
+
+AC_DEFUN([gl_FUNC_GETCWD_NULL],
+  [
+   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+   AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
+     [gl_cv_func_getcwd_null],
+     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#        include <unistd.h>
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
+]], [[
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.
+   However, mingw fails to honor non-zero size.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 return 3;
+               if (f[1] != '\0')
+                 return 4;
+               return 0;
+             }
+#endif
+         /* If size is non-zero, allocation must fail if size is too small */
+         if (getcwd (NULL, 1))
+           return 5;
+         ]])],
+        [gl_cv_func_getcwd_null=yes],
+        [gl_cv_func_getcwd_null=no],
+        [[
+       case "$host_os" in
+                               # Guess yes on glibc systems.
+         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
+                               # Guess yes on Cygwin.
+         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
+                               # If we don't know, assume the worst.
+         *)                    gl_cv_func_getcwd_null="guessing no";;
+       esac
+        ]])])
+])
+
+
+dnl Guarantee that getcwd will malloc with a NULL first argument.  Assumes
+dnl that either the system getcwd is robust, or that calling code is okay
+dnl with spurious failures when run from a directory with an absolute name
+dnl larger than 4k bytes.
+dnl
+dnl Assumes that getcwd exists; if you are worried about obsolete
+dnl platforms that lacked getcwd(), then you need to use the GPL module.
+AC_DEFUN([gl_FUNC_GETCWD_LGPL],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+
+  case $gl_cv_func_getcwd_null in
+  *yes) ;;
+  *)
+    dnl Minimal replacement lib/getcwd-lgpl.c.
+    REPLACE_GETCWD=1
+    ;;
+  esac
+])
+
+dnl Check for all known getcwd bugs; useful for a program likely to be
+dnl executed from an arbitrary location.
+AC_DEFUN([gl_FUNC_GETCWD],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  gl_abort_bug=no
+  case $gl_cv_func_getcwd_null,$host_os in
+  *,mingw*)
+    gl_cv_func_getcwd_path_max=yes;;
+  yes,*)
+    gl_FUNC_GETCWD_PATH_MAX
+    gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);;
+  esac
+
+  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
+  *yes,yes,no) ;;
+  *)
+    dnl Full replacement lib/getcwd.c, overrides LGPL replacement.
+    REPLACE_GETCWD=1;;
+  esac
+])
+
+# Prerequisites of lib/getcwd.c, when full replacement is in effect.
+AC_DEFUN([gl_PREREQ_GETCWD],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+  :
+])
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index ef12736..6a0f632 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 8
+# getdelim.m4 serial 9
 
 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
 dnl
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
 
   AC_CHECK_FUNCS_ONCE([getdelim])
   if test $ac_cv_func_getdelim = yes; then
+    HAVE_GETDELIM=1
     dnl Found it in some library.  Verify that it works.
     AC_CACHE_CHECK([for working getdelim function], 
[gl_cv_func_working_getdelim],
     [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -65,21 +66,16 @@ AC_DEFUN([gl_FUNC_GETDELIM],
          [gl_cv_func_working_getdelim=yes],
          [gl_cv_func_working_getdelim=no])]
     )])
+    if test $gl_cv_func_working_getdelim = no; then
+      REPLACE_GETDELIM=1
+    fi
   else
-    gl_cv_func_working_getdelim=no
+    HAVE_GETDELIM=0
   fi
 
   if test $ac_cv_have_decl_getdelim = no; then
     HAVE_DECL_GETDELIM=0
   fi
-
-  if test $gl_cv_func_working_getdelim = no; then
-    if test $ac_cv_func_getdelim = yes; then
-      REPLACE_GETDELIM=1
-    fi
-    AC_LIBOBJ([getdelim])
-    gl_PREREQ_GETDELIM
-  fi
 ])
 
 # Prerequisites of lib/getdelim.c.
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index ec001b9..4c57797 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 23
+# getline.m4 serial 25
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
@@ -84,14 +84,11 @@ AC_DEFUN([gl_FUNC_GETLINE],
     dnl getline function among $LIBS, it may exist in libinet and the
     dnl executable may be linked with -linet.
     REPLACE_GETLINE=1
-    AC_LIBOBJ([getline])
-
-    gl_PREREQ_GETLINE
   fi
 ])
 
 # Prerequisites of lib/getline.c.
 AC_DEFUN([gl_PREREQ_GETLINE],
 [
-  gl_FUNC_GETDELIM
+  :
 ])
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 035a530..4d8450f 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,4 +1,4 @@
-# getopt.m4 serial 34
+# getopt.m4 serial 35
 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,10 +9,25 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
 [
   m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  gl_GETOPT_IFELSE([
-    gl_REPLACE_GETOPT
-  ],
-  [])
+  dnl Other modules can request the gnulib implementation of the getopt
+  dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
+  dnl argp.m4 does this.
+  m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
+    gl_GETOPT_IFELSE([], [])
+    REPLACE_GETOPT=1
+  ], [
+    REPLACE_GETOPT=0
+    gl_GETOPT_IFELSE([
+      REPLACE_GETOPT=1
+    ],
+    [])
+  ])
+  if test $REPLACE_GETOPT = 1; then
+    dnl Arrange for getopt.h to be created.
+    gl_GETOPT_SUBSTITUTE_HEADER
+    dnl Arrange for unistd.h to include getopt.h.
+    GNULIB_UNISTD_H_GETOPT=1
+  fi
 ])
 
 # Request a POSIX compliant getopt function with GNU extensions (such as
@@ -25,20 +40,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
   AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
 ])
 
-# Request the gnulib implementation of the getopt functions unconditionally.
-# argp.m4 uses this.
-AC_DEFUN([gl_REPLACE_GETOPT],
-[
-  dnl Arrange for getopt.h to be created.
-  gl_GETOPT_SUBSTITUTE_HEADER
-  dnl Arrange for unistd.h to include getopt.h.
-  GNULIB_UNISTD_H_GETOPT=1
-  dnl Arrange to compile the getopt implementation.
-  AC_LIBOBJ([getopt])
-  AC_LIBOBJ([getopt1])
-  gl_PREREQ_GETOPT
-])
-
 # emacs' configure.in uses this.
 AC_DEFUN([gl_GETOPT_IFELSE],
 [
diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4
index 79dfbbe..f7ac1ef 100644
--- a/gl/m4/getpagesize.m4
+++ b/gl/m4/getpagesize.m4
@@ -1,4 +1,4 @@
-# getpagesize.m4 serial 8
+# getpagesize.m4 serial 9
 dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -24,7 +24,6 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE],
   case "$host_os" in
     mingw*)
       REPLACE_GETPAGESIZE=1
-      AC_LIBOBJ([getpagesize])
       ;;
   esac
   dnl Also check whether it's declared.
diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4
index c6ec427..64cee1e 100644
--- a/gl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
@@ -1,4 +1,4 @@
-# getpass.m4 serial 12
+# getpass.m4 serial 13
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -11,10 +11,12 @@ 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_FUNCS([getpass])
   AC_CHECK_DECLS_ONCE([getpass])
-  if test $ac_cv_func_getpass = no; then
-    gl_PREREQ_GETPASS
+  if test $ac_cv_func_getpass = yes; then
+    HAVE_GETPASS=1
+  else
+    HAVE_GETPASS=0
   fi
 ])
 
@@ -27,13 +29,15 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 
   AC_CHECK_DECLS_ONCE([getpass])
   dnl TODO: Detect when GNU getpass() is already found in glibc.
-  AC_LIBOBJ([getpass])
-  gl_PREREQ_GETPASS
-  dnl We must choose a different name for our function, since on ELF systems
-  dnl an unusable getpass() in libc.so would override our getpass() if it is
-  dnl compiled into a shared library.
-  AC_DEFINE([getpass], [gnu_getpass],
-    [Define to a replacement function name for getpass().])
+  REPLACE_GETPASS=1
+
+  if test $REPLACE_GETPASS = 1; then
+    dnl We must choose a different name for our function, since on ELF systems
+    dnl an unusable getpass() in libc.so would override our getpass() if it is
+    dnl compiled into a shared library.
+    AC_DEFINE([getpass], [gnu_getpass],
+      [Define to a replacement function name for getpass().])
+  fi
 ])
 
 # Prerequisites of lib/getpass.c.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 84acadf..47c1e1d 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 15
+# serial 17
 
 # Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -17,8 +17,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
   gl_gettimeofday_timezone=void
   if test $ac_cv_func_gettimeofday != yes; then
     HAVE_GETTIMEOFDAY=0
-    AC_LIBOBJ([gettimeofday])
-    gl_PREREQ_GETTIMEOFDAY
   else
     gl_FUNC_GETTIMEOFDAY_CLOBBER
     AC_CACHE_CHECK([for gettimeofday with POSIX signature],
@@ -51,9 +49,18 @@ int gettimeofday (struct timeval *restrict, struct timezone 
*restrict);
       gl_gettimeofday_timezone='struct timezone'
     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
       REPLACE_GETTIMEOFDAY=1
-      AC_LIBOBJ([gettimeofday])
-      gl_PREREQ_GETTIMEOFDAY
     fi
+    m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
+      gl_FUNC_TZSET_CLOBBER
+      if test $gl_cv_func_tzset_clobber = yes; then
+        REPLACE_GETTIMEOFDAY=1
+        gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+        AC_DEFINE([tzset], [rpl_tzset],
+          [Define to rpl_tzset if the wrapper function should be used.])
+        AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
+          [Define if tzset clobbers localtime's static buffer.])
+      fi
+    ])
   fi
   AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
     [Define this to 'void' or 'struct timezone' to match the system's
@@ -105,8 +112,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
 ])
 
 AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
-  AC_LIBOBJ([gettimeofday])
-  gl_PREREQ_GETTIMEOFDAY
   AC_DEFINE([gmtime], [rpl_gmtime],
     [Define to rpl_gmtime if the replacement function should be used.])
   AC_DEFINE([localtime], [rpl_localtime],
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index d6caf15..1a8e645 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=lib/build-aux --with-tests --avoid=fcntl-h-c++-tests 
--avoid=iconv-h-c++-tests --avoid=stdio-c++-tests --avoid=stdlib-c++-tests 
--avoid=string-c++-tests --avoid=sys_ioctl-c++-tests 
--avoid=sys_select-c++-tests --avoid=sys_socket-c++-tests 
--avoid=sys_stat-c++-tests --avoid=sys_time-c++-tests --avoid=time-c++-tests 
--avoid=unistd-c++-tests --avoid=wchar-c++-tests --avoid=wctype-c++-tests 
--libtool --macro-prefix=gl --no-vc-files autobuild close connect error fdl-1.3 
gendocs getaddrinfo getopt-gnu getpass gpl-3.0 lgpl-2.1 maintainer-makefile 
manywarnings netdb netinet_in pmccabe2html poll progname quote readline recv 
shutdown socket striconv strtok_r sys_time unistd valgrind-tests vasprintf 
version-etc warnings xalloc
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=lib/build-aux --with-tests --avoid=fcntl-h-c++-tests 
--avoid=iconv-h-c++-tests --avoid=stdio-c++-tests --avoid=stdlib-c++-tests 
--avoid=string-c++-tests --avoid=sys_ioctl-c++-tests 
--avoid=sys_select-c++-tests --avoid=sys_socket-c++-tests 
--avoid=sys_stat-c++-tests --avoid=sys_time-c++-tests --avoid=time-c++-tests 
--avoid=unistd-c++-tests --avoid=wchar-c++-tests --avoid=wctype-c++-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files 
autobuild close connect error fdl-1.3 gendocs getaddrinfo getopt-gnu getpass 
gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings netdb netinet_in pmccabe2html 
poll progname quote readline recv shutdown socket striconv strtok_r sys_time 
unistd valgrind-tests vasprintf version-etc warnings xalloc
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -65,4 +65,5 @@ gl_MAKEFILE_NAME([])
 gl_LIBTOOL
 gl_MACRO_PREFIX([gl])
 gl_PO_DOMAIN([])
+gl_WITNESS_C_DOMAIN([])
 gl_VC_FILES([false])
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index c4d7a20..843efe0 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 24
+# gnulib-common.m4 serial 26
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,20 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
 ])
   dnl Preparation for running test programs:
   dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -47,16 +61,49 @@ AC_DEFUN([gl_COMMON_BODY], [
 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
 # whether a gnulib module that has been requested shall be considered present
 # or not.
-AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
 
 # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
 # sets the shell variable that indicates the presence of the given module to
 # a C preprocessor expression that will evaluate to 1.
 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
 [
-  GNULIB_[]m4_translit([[$1]],
-    [abcdefghijklmnopqrstuvwxyz./-],
-    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+  gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
+    [GNULIB_[]m4_translit([[$1]],
+                          [abcdefghijklmnopqrstuvwxyz./-],
+                          [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+    [gl_MODULE_INDICATOR_CONDITION])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
+# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
+# The shell variable's value is a C preprocessor expression that evaluates
+# to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
+[
+  m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
+    [
+     dnl Simplify the expression VALUE || 1 to 1.
+     $1=1
+    ],
+    [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
+                                             [gl_MODULE_INDICATOR_CONDITION])])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
+# modifies the shell variable to include the given condition.  The shell
+# variable's value is a C preprocessor expression that evaluates to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
+[
+  dnl Simplify the expression 1 || CONDITION to 1.
+  if test "$[]$1" != 1; then
+    dnl Simplify the expression 0 || CONDITION to CONDITION.
+    if test "$[]$1" = 0; then
+      $1=$2
+    else
+      $1="($[]$1 || $2)"
+    fi
+  fi
 ])
 
 # gl_MODULE_INDICATOR([modulename])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 5396e92..2037879 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -26,6 +26,7 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([AC_PROG_RANLIB])
+  AC_REQUIRE([AM_PROG_CC_C_O])
   # Code from module accept:
   # Code from module alignof:
   # Code from module alignof-tests:
@@ -62,6 +63,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   # Code from module fclose:
+  # Code from module fclose-tests:
   # Code from module fcntl-h:
   # Code from module fcntl-h-tests:
   # Code from module fd-hook:
@@ -70,10 +72,16 @@ AC_DEFUN([gl_EARLY],
   AC_REQUIRE([AC_FUNC_FSEEKO])
   # Code from module fflush-tests:
   # Code from module float:
+  # Code from module float-tests:
+  # Code from module fpieee:
+  AC_REQUIRE([gl_FP_IEEE])
+  # Code from module fpucw:
   # Code from module fpurge:
   # Code from module fpurge-tests:
   # Code from module freading:
   # Code from module freading-tests:
+  # Code from module fseek:
+  # Code from module fseek-tests:
   # Code from module fseeko:
   AC_REQUIRE([AC_FUNC_FSEEKO])
   # Code from module fseeko-tests:
@@ -85,6 +93,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module gendocs:
   # Code from module getaddrinfo:
   # Code from module getaddrinfo-tests:
+  # Code from module getcwd-lgpl:
+  # Code from module getcwd-lgpl-tests:
   # Code from module getdelim:
   # Code from module getdelim-tests:
   # Code from module getline:
@@ -116,6 +126,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module inet_pton-tests:
   # Code from module inline:
   # Code from module intprops:
+  # Code from module intprops-tests:
+  # Code from module inttypes:
+  # Code from module inttypes-incomplete:
+  # Code from module inttypes-tests:
   # Code from module ioctl:
   # Code from module lgpl-2.1:
   # Code from module listen:
@@ -149,7 +163,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module netinet_in-tests:
   # Code from module open:
   # Code from module open-tests:
-  # Code from module pathmax:
   # Code from module perror:
   # Code from module perror-tests:
   # Code from module pipe-posix:
@@ -207,7 +220,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module strdup-posix:
   # Code from module streq:
   # Code from module strerror:
+  # Code from module strerror-override:
   # Code from module strerror-tests:
+  # Code from module strerror_r-posix:
+  # Code from module strerror_r-posix-tests:
   # Code from module striconv:
   # Code from module striconv-tests:
   # Code from module string:
@@ -234,8 +250,15 @@ AC_DEFUN([gl_EARLY],
   # Code from module time-tests:
   # Code from module unistd:
   # Code from module unistd-tests:
+  # Code from module unistr/base:
+  # Code from module unistr/u8-mbtoucr:
+  # Code from module unistr/u8-mbtoucr-tests:
+  # Code from module unistr/u8-uctomb:
+  # Code from module unistr/u8-uctomb-tests:
+  # Code from module unitypes:
   # Code from module unsetenv:
   # Code from module unsetenv-tests:
+  # Code from module unused-parameter:
   # Code from module useless-if-before-free:
   # Code from module valgrind-tests:
   # Code from module vasnprintf:
@@ -285,168 +308,294 @@ changequote(,)dnl
 LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
 changequote([, ])dnl
 AC_SUBST([LTALLOCA])
-  gl_FUNC_ALLOCA
-  gl_HEADER_ARPA_INET
-  AC_PROG_MKDIR_P
-  gl_FUNC_CLOSE
-  gl_UNISTD_MODULE_INDICATOR([close])
-  gl_CONFIGMAKE_PREP
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([connect])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([connect])
-  gl_HEADER_ERRNO_H
-  gl_ERROR
-  m4_ifdef([AM_XGETTEXT_OPTION],
-    [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
-     AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
-  gl_FUNC_FCLOSE
-  gl_STDIO_MODULE_INDICATOR([fclose])
-  gl_FUNC_FFLUSH
-  gl_STDIO_MODULE_INDICATOR([fflush])
-  gl_FLOAT_H
-  gl_FUNC_FPURGE
-  gl_STDIO_MODULE_INDICATOR([fpurge])
-  gl_FUNC_FREADING
-  gl_FUNC_FSEEKO
-  gl_STDIO_MODULE_INDICATOR([fseeko])
-  gl_FUNC_FTELLO
-  gl_STDIO_MODULE_INDICATOR([ftello])
-  gl_GETADDRINFO
-  gl_NETDB_MODULE_INDICATOR([getaddrinfo])
-  gl_FUNC_GETDELIM
-  gl_STDIO_MODULE_INDICATOR([getdelim])
-  gl_FUNC_GETLINE
-  gl_STDIO_MODULE_INDICATOR([getline])
-  gl_FUNC_GETOPT_GNU
-  gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
-  gl_FUNC_GETOPT_POSIX
-  gl_FUNC_GETPASS
-  AC_SUBST([LIBINTL])
-  AC_SUBST([LTLIBINTL])
-  # Autoconf 2.61a.99 and earlier don't support linking a file only
-  # in VPATH builds.  But since GNUmakefile is for maintainer use
-  # only, it does not matter if we skip the link with older autoconf.
-  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
-  # builds, so use a shell variable to bypass this.
-  GNUmakefile=GNUmakefile
-  m4_if(m4_version_compare([2.61a.100],
-          m4_defn([m4_PACKAGE_VERSION])), [1], [],
-        [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
-          [GNUmakefile=$GNUmakefile])])
-  gl_HOSTENT
-  AM_ICONV
-  m4_ifdef([gl_ICONV_MODULE_INDICATOR],
-    [gl_ICONV_MODULE_INDICATOR([iconv])])
-  gl_ICONV_H
-  gl_FUNC_ICONV_OPEN
-  gl_FUNC_INET_NTOP
-  gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
-  gl_INLINE
-  gl_LOCALCHARSET
-  
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
-  AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
-  gl_FUNC_LSEEK
-  gl_UNISTD_MODULE_INDICATOR([lseek])
-  AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
-    [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
-  gl_FUNC_MALLOC_POSIX
-  gl_STDLIB_MODULE_INDICATOR([malloc-posix])
-  gl_FUNC_MBRTOWC
-  gl_WCHAR_MODULE_INDICATOR([mbrtowc])
-  gl_FUNC_MBSINIT
-  gl_WCHAR_MODULE_INDICATOR([mbsinit])
-  gl_FUNC_MEMCHR
-  gl_STRING_MODULE_INDICATOR([memchr])
-  gl_MULTIARCH
-  gl_HEADER_NETDB
-  gl_HEADER_NETINET_IN
-  AC_PROG_MKDIR_P
-  AC_PATH_PROG([PMCCABE], [pmccabe], [false])
-  gl_FUNC_POLL
-  gl_POLL_MODULE_INDICATOR([poll])
-  gl_POLL_H
-  AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
-  AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
-  gl_QUOTE
-  gl_QUOTEARG
-  gl_FUNC_READLINE
-  gl_FUNC_REALLOC_POSIX
-  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([recv])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([recv])
-  gl_FUNC_SELECT
-  gl_SYS_SELECT_MODULE_INDICATOR([select])
-  gl_SERVENT
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([shutdown])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
-  gl_SIZE_MAX
-  gl_FUNC_SNPRINTF
-  gl_STDIO_MODULE_INDICATOR([snprintf])
-  gl_MODULE_INDICATOR([snprintf])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([socket])
-  fi
-  # When this module is used, sockets may actually occur as file descriptors,
-  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
-  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
-  AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([socket])
-  gl_SOCKETLIB
-  gl_SOCKETS
-  gl_TYPE_SOCKLEN_T
-  gl_STDARG_H
-  AM_STDBOOL_H
-  gl_STDDEF_H
-  gl_STDINT_H
-  gl_STDIO_H
-  gl_STDLIB_H
-  gl_FUNC_STRDUP_POSIX
-  gl_STRING_MODULE_INDICATOR([strdup])
-  gl_FUNC_STRERROR
-  gl_STRING_MODULE_INDICATOR([strerror])
-  if test $gl_cond_libtool = false; then
-    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
-    gl_libdeps="$gl_libdeps $LIBICONV"
-  fi
-  gl_HEADER_STRING_H
-  gl_FUNC_STRTOK_R
-  gl_STRING_MODULE_INDICATOR([strtok_r])
-  gl_HEADER_SYS_SELECT
-  AC_PROG_MKDIR_P
-  gl_HEADER_SYS_SOCKET
-  AC_PROG_MKDIR_P
-  gl_HEADER_SYS_TIME_H
-  AC_PROG_MKDIR_P
-  gl_HEADER_SYS_UIO
-  AC_PROG_MKDIR_P
-  gl_UNISTD_H
-  gl_VALGRIND_TESTS
-  gl_FUNC_VASNPRINTF
-  gl_FUNC_VASPRINTF
-  gl_STDIO_MODULE_INDICATOR([vasprintf])
-  m4_ifdef([AM_XGETTEXT_OPTION],
-    [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
-     AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
-  gl_VERSION_ETC
-  AC_SUBST([WARN_CFLAGS])
-  gl_WCHAR_H
-  gl_WCTYPE_H
-  gl_XALLOC
-  gl_XSIZE
+gl_FUNC_ALLOCA
+gl_HEADER_ARPA_INET
+AC_PROG_MKDIR_P
+gl_FUNC_CLOSE
+gl_UNISTD_MODULE_INDICATOR([close])
+gl_CONFIGMAKE_PREP
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([connect])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+gl_HEADER_ERRNO_H
+gl_ERROR
+if test $ac_cv_lib_error_at_line = no; then
+  AC_LIBOBJ([error])
+  gl_PREREQ_ERROR
+fi
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+   AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+gl_FUNC_FCLOSE
+gl_STDIO_MODULE_INDICATOR([fclose])
+gl_FUNC_FFLUSH
+if test $REPLACE_FFLUSH = 1; then
+  AC_LIBOBJ([fflush])
+  gl_PREREQ_FFLUSH
+fi
+gl_MODULE_INDICATOR([fflush])
+gl_STDIO_MODULE_INDICATOR([fflush])
+gl_FLOAT_H
+if test $REPLACE_FLOAT_LDBL = 1; then
+  AC_LIBOBJ([float])
+fi
+gl_FUNC_FPURGE
+if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
+  AC_LIBOBJ([fpurge])
+fi
+gl_STDIO_MODULE_INDICATOR([fpurge])
+gl_FUNC_FREADING
+gl_FUNC_FSEEK
+if test $REPLACE_FSEEK = 1; then
+  AC_LIBOBJ([fseek])
+fi
+gl_STDIO_MODULE_INDICATOR([fseek])
+gl_FUNC_FSEEKO
+if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+  AC_LIBOBJ([fseeko])
+fi
+gl_STDIO_MODULE_INDICATOR([fseeko])
+gl_FUNC_FTELL
+if test $REPLACE_FTELL = 1; then
+  AC_LIBOBJ([ftell])
+fi
+gl_STDIO_MODULE_INDICATOR([ftell])
+gl_FUNC_FTELLO
+if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+  AC_LIBOBJ([ftello])
+fi
+gl_STDIO_MODULE_INDICATOR([ftello])
+gl_GETADDRINFO
+if test $HAVE_GETADDRINFO = 0; then
+  AC_LIBOBJ([getaddrinfo])
+fi
+if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
+  AC_LIBOBJ([gai_strerror])
+fi
+gl_NETDB_MODULE_INDICATOR([getaddrinfo])
+gl_FUNC_GETDELIM
+if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+  AC_LIBOBJ([getdelim])
+  gl_PREREQ_GETDELIM
+fi
+gl_STDIO_MODULE_INDICATOR([getdelim])
+gl_FUNC_GETLINE
+if test $REPLACE_GETLINE = 1; then
+  AC_LIBOBJ([getline])
+  gl_PREREQ_GETLINE
+fi
+gl_STDIO_MODULE_INDICATOR([getline])
+gl_FUNC_GETOPT_GNU
+if test $REPLACE_GETOPT = 1; then
+  AC_LIBOBJ([getopt])
+  AC_LIBOBJ([getopt1])
+  gl_PREREQ_GETOPT
+fi
+gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
+gl_FUNC_GETOPT_POSIX
+if test $REPLACE_GETOPT = 1; then
+  AC_LIBOBJ([getopt])
+  AC_LIBOBJ([getopt1])
+  gl_PREREQ_GETOPT
+fi
+gl_FUNC_GETPASS
+if test $HAVE_GETPASS = 0; then
+  AC_LIBOBJ([getpass])
+  gl_PREREQ_GETPASS
+fi
+AC_SUBST([LIBINTL])
+AC_SUBST([LTLIBINTL])
+# Autoconf 2.61a.99 and earlier don't support linking a file only
+# in VPATH builds.  But since GNUmakefile is for maintainer use
+# only, it does not matter if we skip the link with older autoconf.
+# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+# builds, so use a shell variable to bypass this.
+GNUmakefile=GNUmakefile
+m4_if(m4_version_compare([2.61a.100],
+        m4_defn([m4_PACKAGE_VERSION])), [1], [],
+      [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+        [GNUmakefile=$GNUmakefile])])
+gl_HOSTENT
+AM_ICONV
+m4_ifdef([gl_ICONV_MODULE_INDICATOR],
+  [gl_ICONV_MODULE_INDICATOR([iconv])])
+gl_ICONV_H
+gl_FUNC_ICONV_OPEN
+if test $REPLACE_ICONV_OPEN = 1; then
+  AC_LIBOBJ([iconv_open])
+fi
+if test $REPLACE_ICONV = 1; then
+  AC_LIBOBJ([iconv])
+  AC_LIBOBJ([iconv_close])
+fi
+gl_FUNC_INET_NTOP
+if test $HAVE_INET_NTOP = 0; then
+  AC_LIBOBJ([inet_ntop])
+  gl_PREREQ_INET_NTOP
+fi
+gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
+gl_INLINE
+gl_LOCALCHARSET
+LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+gl_FUNC_LSEEK
+if test $REPLACE_LSEEK = 1; then
+  AC_LIBOBJ([lseek])
+fi
+gl_UNISTD_MODULE_INDICATOR([lseek])
+AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+  [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+gl_FUNC_MALLOC_POSIX
+if test $REPLACE_MALLOC = 1; then
+  AC_LIBOBJ([malloc])
+fi
+gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+gl_FUNC_MBRTOWC
+if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+  AC_LIBOBJ([mbrtowc])
+  gl_PREREQ_MBRTOWC
+fi
+gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+gl_FUNC_MBSINIT
+if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+  AC_LIBOBJ([mbsinit])
+  gl_PREREQ_MBSINIT
+fi
+gl_WCHAR_MODULE_INDICATOR([mbsinit])
+gl_FUNC_MEMCHR
+if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  AC_LIBOBJ([memchr])
+  gl_PREREQ_MEMCHR
+fi
+gl_STRING_MODULE_INDICATOR([memchr])
+gl_MULTIARCH
+gl_HEADER_NETDB
+gl_HEADER_NETINET_IN
+AC_PROG_MKDIR_P
+AC_PATH_PROG([PMCCABE], [pmccabe], [false])
+gl_FUNC_POLL
+if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then
+  AC_LIBOBJ([poll])
+  gl_PREREQ_POLL
+fi
+gl_POLL_MODULE_INDICATOR([poll])
+gl_POLL_H
+AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+gl_QUOTE
+gl_QUOTEARG
+gl_FUNC_READLINE
+if test "$gl_cv_lib_readline" = no; then
+  AC_LIBOBJ([readline])
+  gl_PREREQ_READLINE
+fi
+gl_FUNC_REALLOC_POSIX
+if test $REPLACE_REALLOC = 1; then
+  AC_LIBOBJ([realloc])
+fi
+gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([recv])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+gl_FUNC_SELECT
+if test $REPLACE_SELECT = 1; then
+  AC_LIBOBJ([select])
+fi
+gl_SYS_SELECT_MODULE_INDICATOR([select])
+gl_SERVENT
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([shutdown])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
+gl_SIZE_MAX
+gl_FUNC_SNPRINTF
+gl_STDIO_MODULE_INDICATOR([snprintf])
+gl_MODULE_INDICATOR([snprintf])
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([socket])
+fi
+# When this module is used, sockets may actually occur as file descriptors,
+# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
+m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+gl_SOCKETLIB
+gl_SOCKETS
+gl_TYPE_SOCKLEN_T
+gl_STDARG_H
+AM_STDBOOL_H
+gl_STDDEF_H
+gl_STDINT_H
+gl_STDIO_H
+gl_STDLIB_H
+gl_FUNC_STRDUP_POSIX
+if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+  AC_LIBOBJ([strdup])
+  gl_PREREQ_STRDUP
+fi
+gl_STRING_MODULE_INDICATOR([strdup])
+gl_FUNC_STRERROR
+if test $REPLACE_STRERROR = 1; then
+  AC_LIBOBJ([strerror])
+fi
+gl_MODULE_INDICATOR([strerror])
+gl_STRING_MODULE_INDICATOR([strerror])
+AC_REQUIRE([gl_HEADER_ERRNO_H])
+AC_REQUIRE([gl_FUNC_STRERROR_0])
+if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+  AC_LIBOBJ([strerror-override])
+  gl_PREREQ_SYS_H_WINSOCK2
+fi
+if test $gl_cond_libtool = false; then
+  gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+  gl_libdeps="$gl_libdeps $LIBICONV"
+fi
+gl_HEADER_STRING_H
+gl_FUNC_STRTOK_R
+if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
+  AC_LIBOBJ([strtok_r])
+  gl_PREREQ_STRTOK_R
+fi
+gl_STRING_MODULE_INDICATOR([strtok_r])
+gl_HEADER_SYS_SELECT
+AC_PROG_MKDIR_P
+gl_HEADER_SYS_SOCKET
+AC_PROG_MKDIR_P
+gl_HEADER_SYS_TIME_H
+AC_PROG_MKDIR_P
+gl_HEADER_SYS_UIO
+AC_PROG_MKDIR_P
+gl_UNISTD_H
+gl_LIBUNISTRING_LIBHEADER([0.9.2], [unistr.h])
+gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
+gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr])
+gl_MODULE_INDICATOR([unistr/u8-uctomb])
+gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb])
+gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
+gl_VALGRIND_TESTS
+gl_FUNC_VASNPRINTF
+gl_FUNC_VASPRINTF
+gl_STDIO_MODULE_INDICATOR([vasprintf])
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+   AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+gl_VERSION_ETC
+AC_SUBST([WARN_CFLAGS])
+gl_WCHAR_H
+gl_WCTYPE_H
+gl_XALLOC
+gl_XSIZE
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -493,121 +642,197 @@ changequote([, ])dnl
   AC_SUBST([gltests_WITNESS])
   gl_module_indicator_condition=$gltests_WITNESS
   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([accept])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([accept])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([bind])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([bind])
-  gl_FUNC_BTOWC
-  gl_WCHAR_MODULE_INDICATOR([btowc])
-  gt_LOCALE_FR
-  gt_LOCALE_FR_UTF8
-  gt_LOCALE_FR
-  gt_LOCALE_TR_UTF8
-  gl_FUNC_DUP2
-  gl_UNISTD_MODULE_INDICATOR([dup2])
-  gl_ENVIRON
-  gl_UNISTD_MODULE_INDICATOR([environ])
-  gl_FCNTL_H
-  gl_FUNC_UNGETC_WORKS
-  gl_FUNC_FTELL
-  gl_STDIO_MODULE_INDICATOR([ftell])
-  gl_FUNC_UNGETC_WORKS
-  gl_FUNC_UNGETC_WORKS
-  gl_FUNC_GETPAGESIZE
-  gl_UNISTD_MODULE_INDICATOR([getpagesize])
-  gl_FUNC_GETTIMEOFDAY
-  gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
-  AC_REQUIRE([AC_C_INLINE])
-  AC_C_BIGENDIAN
-  gl_FUNC_INET_PTON
-  gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
-  AC_C_BIGENDIAN
-  gl_FUNC_IOCTL
-  gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([listen])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([listen])
-  gl_LOCALE_H
-  AC_CHECK_FUNCS_ONCE([newlocale])
-  gl_LOCALENAME
-  AC_CHECK_FUNCS_ONCE([newlocale])
-  gl_LOCK
-  gl_FUNC_LSTAT
-  gl_SYS_STAT_MODULE_INDICATOR([lstat])
-  gl_MALLOCA
-  gt_LOCALE_FR
-  gt_LOCALE_FR_UTF8
-  gt_LOCALE_JA
-  gt_LOCALE_ZH_CN
-  gt_LOCALE_FR_UTF8
-  gl_FUNC_MBTOWC
-  gl_STDLIB_MODULE_INDICATOR([mbtowc])
-  dnl Check for prerequisites for memory fence checks.
-  gl_FUNC_MMAP_ANON
-  AC_CHECK_HEADERS_ONCE([sys/mman.h])
-  AC_CHECK_FUNCS_ONCE([mprotect])
-  gl_FUNC_OPEN
-  gl_FCNTL_MODULE_INDICATOR([open])
-  gl_PATHMAX
-  gl_FUNC_PERROR
-  gl_STRING_MODULE_INDICATOR([perror])
-  gl_FUNC_PIPE
-  gl_UNISTD_MODULE_INDICATOR([pipe])
-  AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
-  gl_FUNC_PUTENV
-  gl_STDLIB_MODULE_INDICATOR([putenv])
-  AC_CHECK_HEADERS_ONCE([sys/wait.h])
-  gl_FUNC_SETENV
-  gl_STDLIB_MODULE_INDICATOR([setenv])
-  gl_FUNC_SETLOCALE
-  gl_LOCALE_MODULE_INDICATOR([setlocale])
-  gt_LOCALE_FR
-  gt_LOCALE_FR_UTF8
-  gt_LOCALE_JA
-  gt_LOCALE_ZH_CN
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([setsockopt])
-  fi
-  gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
-  gl_FUNC_STAT
-  gl_SYS_STAT_MODULE_INDICATOR([stat])
-  gt_TYPE_WCHAR_T
-  gt_TYPE_WINT_T
-  gl_FUNC_SYMLINK
-  gl_UNISTD_MODULE_INDICATOR([symlink])
-  gl_SYS_IOCTL_H
-  AC_PROG_MKDIR_P
-  AC_CHECK_FUNCS_ONCE([shutdown])
-  gl_HEADER_SYS_STAT_H
-  AC_PROG_MKDIR_P
-  gl_THREAD
-  gl_THREADLIB
-  gl_HEADER_TIME_H
-  gl_FUNC_UNSETENV
-  gl_STDLIB_MODULE_INDICATOR([unsetenv])
-  gl_VALGRIND_TESTS
-  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
-  AC_SUBST([abs_aux_dir])
-  gl_FUNC_WCRTOMB
-  gl_WCHAR_MODULE_INDICATOR([wcrtomb])
-  gt_LOCALE_FR
-  gt_LOCALE_FR_UTF8
-  gt_LOCALE_JA
-  gt_LOCALE_ZH_CN
-  gl_FUNC_WCTOB
-  gl_WCHAR_MODULE_INDICATOR([wctob])
-  gl_FUNC_WCTOMB
-  gl_STDLIB_MODULE_INDICATOR([wctomb])
-  gl_YIELD
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([accept])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([bind])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+gl_FUNC_BTOWC
+if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+  AC_LIBOBJ([btowc])
+  gl_PREREQ_BTOWC
+fi
+gl_WCHAR_MODULE_INDICATOR([btowc])
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+gt_LOCALE_FR
+gt_LOCALE_TR_UTF8
+gl_FUNC_DUP2
+gl_UNISTD_MODULE_INDICATOR([dup2])
+gl_ENVIRON
+gl_UNISTD_MODULE_INDICATOR([environ])
+gl_FCNTL_H
+gl_FUNC_UNGETC_WORKS
+gl_FUNC_UNGETC_WORKS
+gl_FUNC_UNGETC_WORKS
+gl_FUNC_UNGETC_WORKS
+gl_FUNC_GETCWD_LGPL
+if test $REPLACE_GETCWD = 1; then
+  AC_LIBOBJ([getcwd-lgpl])
+fi
+gl_UNISTD_MODULE_INDICATOR([getcwd])
+gl_FUNC_GETPAGESIZE
+if test $REPLACE_GETPAGESIZE = 1; then
+  AC_LIBOBJ([getpagesize])
+fi
+gl_UNISTD_MODULE_INDICATOR([getpagesize])
+gl_FUNC_GETTIMEOFDAY
+if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+  AC_LIBOBJ([gettimeofday])
+  gl_PREREQ_GETTIMEOFDAY
+fi
+gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+AC_REQUIRE([AC_C_INLINE])
+AC_C_BIGENDIAN
+gl_FUNC_INET_PTON
+if test $HAVE_INET_PTON = 0; then
+  AC_LIBOBJ([inet_pton])
+  gl_PREREQ_INET_PTON
+fi
+gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+AC_C_BIGENDIAN
+gl_INTTYPES_H
+gl_INTTYPES_INCOMPLETE
+gl_FUNC_IOCTL
+if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+  AC_LIBOBJ([ioctl])
+fi
+gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([listen])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+gl_LOCALE_H
+AC_CHECK_FUNCS_ONCE([newlocale])
+gl_LOCALENAME
+AC_CHECK_FUNCS_ONCE([newlocale])
+gl_LOCK
+gl_FUNC_LSTAT
+if test $REPLACE_LSTAT = 1; then
+  AC_LIBOBJ([lstat])
+  gl_PREREQ_LSTAT
+fi
+gl_SYS_STAT_MODULE_INDICATOR([lstat])
+gl_MALLOCA
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+gt_LOCALE_JA
+gt_LOCALE_ZH_CN
+gt_LOCALE_FR_UTF8
+gl_FUNC_MBTOWC
+if test $REPLACE_MBTOWC = 1; then
+  AC_LIBOBJ([mbtowc])
+  gl_PREREQ_MBTOWC
+fi
+gl_STDLIB_MODULE_INDICATOR([mbtowc])
+dnl Check for prerequisites for memory fence checks.
+gl_FUNC_MMAP_ANON
+AC_CHECK_HEADERS_ONCE([sys/mman.h])
+AC_CHECK_FUNCS_ONCE([mprotect])
+gl_FUNC_OPEN
+gl_FCNTL_MODULE_INDICATOR([open])
+gl_FUNC_PERROR
+if test $REPLACE_PERROR = 1; then
+  AC_LIBOBJ([perror])
+fi
+gl_STRING_MODULE_INDICATOR([perror])
+gl_FUNC_PIPE
+if test $HAVE_PIPE = 0; then
+  AC_LIBOBJ([pipe])
+fi
+gl_UNISTD_MODULE_INDICATOR([pipe])
+AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
+gl_FUNC_PUTENV
+if test $REPLACE_PUTENV = 1; then
+  AC_LIBOBJ([putenv])
+fi
+gl_STDLIB_MODULE_INDICATOR([putenv])
+AC_CHECK_HEADERS_ONCE([sys/wait.h])
+gl_FUNC_SETENV
+if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+  AC_LIBOBJ([setenv])
+fi
+gl_STDLIB_MODULE_INDICATOR([setenv])
+gl_FUNC_SETLOCALE
+if test $REPLACE_SETLOCALE = 1; then
+  AC_LIBOBJ([setlocale])
+  gl_PREREQ_SETLOCALE
+fi
+gl_LOCALE_MODULE_INDICATOR([setlocale])
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+gt_LOCALE_JA
+gt_LOCALE_ZH_CN
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+  AC_LIBOBJ([setsockopt])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+gl_FUNC_STAT
+if test $REPLACE_STAT = 1; then
+  AC_LIBOBJ([stat])
+  gl_PREREQ_STAT
+fi
+gl_SYS_STAT_MODULE_INDICATOR([stat])
+gt_TYPE_WCHAR_T
+gt_TYPE_WINT_T
+gl_FUNC_STRERROR_R
+if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+  AC_LIBOBJ([strerror_r])
+  gl_PREREQ_STRERROR_R
+fi
+gl_STRING_MODULE_INDICATOR([strerror_r])
+gl_FUNC_SYMLINK
+if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+  AC_LIBOBJ([symlink])
+fi
+gl_UNISTD_MODULE_INDICATOR([symlink])
+gl_SYS_IOCTL_H
+AC_PROG_MKDIR_P
+AC_CHECK_FUNCS_ONCE([shutdown])
+gl_HEADER_SYS_STAT_H
+AC_PROG_MKDIR_P
+gl_THREAD
+gl_THREADLIB
+gl_HEADER_TIME_H
+gl_FUNC_UNSETENV
+if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+  AC_LIBOBJ([unsetenv])
+  gl_PREREQ_UNSETENV
+fi
+gl_STDLIB_MODULE_INDICATOR([unsetenv])
+gl_VALGRIND_TESTS
+abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+AC_SUBST([abs_aux_dir])
+gl_FUNC_WCRTOMB
+if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+  AC_LIBOBJ([wcrtomb])
+  gl_PREREQ_WCRTOMB
+fi
+gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+gt_LOCALE_JA
+gt_LOCALE_ZH_CN
+gl_FUNC_WCTOB
+if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
+  AC_LIBOBJ([wctob])
+  gl_PREREQ_WCTOB
+fi
+gl_WCHAR_MODULE_INDICATOR([wctob])
+gl_FUNC_WCTOMB
+if test $REPLACE_WCTOMB = 1; then
+  AC_LIBOBJ([wctomb])
+  gl_PREREQ_WCTOMB
+fi
+gl_STDLIB_MODULE_INDICATOR([wctomb])
+gl_YIELD
   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(gltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -706,6 +931,7 @@ AC_DEFUN([gl_FILE_LIST], [
   build-aux/gendocs.sh
   build-aux/pmccabe.css
   build-aux/pmccabe2html
+  build-aux/unused-parameter.h
   build-aux/useless-if-before-free
   build-aux/vc-list-files
   build-aux/warn-on-use.h
@@ -737,11 +963,14 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fd-hook.h
   lib/fflush.c
   lib/float+.h
+  lib/float.c
   lib/float.in.h
   lib/fpurge.c
   lib/freading.c
   lib/freading.h
+  lib/fseek.c
   lib/fseeko.c
+  lib/ftell.c
   lib/ftello.c
   lib/gai_strerror.c
   lib/getaddrinfo.c
@@ -754,7 +983,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/getpass.c
   lib/getpass.h
   lib/gettext.h
+  lib/iconv.c
   lib/iconv.in.h
+  lib/iconv_close.c
   lib/iconv_open-aix.gperf
   lib/iconv_open-hpux.gperf
   lib/iconv_open-irix.gperf
@@ -807,6 +1038,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stdlib.in.h
   lib/strdup.c
   lib/streq.h
+  lib/strerror-override.c
+  lib/strerror-override.h
   lib/strerror.c
   lib/striconv.c
   lib/striconv.h
@@ -817,6 +1050,11 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/sys_time.in.h
   lib/sys_uio.in.h
   lib/unistd.in.h
+  lib/unistr.in.h
+  lib/unistr/u8-mbtoucr.c
+  lib/unistr/u8-uctomb-aux.c
+  lib/unistr/u8-uctomb.c
+  lib/unitypes.in.h
   lib/vasnprintf.c
   lib/vasnprintf.h
   lib/vasprintf.c
@@ -850,12 +1088,15 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/fcntl_h.m4
   m4/fflush.m4
   m4/float_h.m4
+  m4/fpieee.m4
   m4/fpurge.m4
   m4/freading.m4
+  m4/fseek.m4
   m4/fseeko.m4
   m4/ftell.m4
   m4/ftello.m4
   m4/getaddrinfo.m4
+  m4/getcwd.m4
   m4/getdelim.m4
   m4/getline.m4
   m4/getopt.m4
@@ -874,12 +1115,15 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/inline.m4
   m4/intlmacosx.m4
   m4/intmax_t.m4
+  m4/inttypes-pri.m4
+  m4/inttypes.m4
   m4/inttypes_h.m4
   m4/ioctl.m4
   m4/lcmessage.m4
   m4/lib-ld.m4
   m4/lib-link.m4
   m4/lib-prefix.m4
+  m4/libunistring-base.m4
   m4/localcharset.m4
   m4/locale-fr.m4
   m4/locale-ja.m4
@@ -905,7 +1149,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/netdb_h.m4
   m4/netinet_in_h.m4
   m4/open.m4
-  m4/pathmax.m4
   m4/perror.m4
   m4/pipe.m4
   m4/poll.m4
@@ -936,6 +1179,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stdlib_h.m4
   m4/strdup.m4
   m4/strerror.m4
+  m4/strerror_r.m4
   m4/string_h.m4
   m4/strtok_r.m4
   m4/symlink.m4
@@ -984,12 +1228,17 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-dup2.c
   tests/test-environ.c
   tests/test-errno.c
+  tests/test-fclose.c
   tests/test-fcntl-h.c
   tests/test-fflush.c
   tests/test-fflush2.c
   tests/test-fflush2.sh
+  tests/test-float.c
   tests/test-fpurge.c
   tests/test-freading.c
+  tests/test-fseek.c
+  tests/test-fseek.sh
+  tests/test-fseek2.sh
   tests/test-fseeko.c
   tests/test-fseeko.sh
   tests/test-fseeko2.sh
@@ -1002,6 +1251,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-ftello2.sh
   tests/test-ftello3.c
   tests/test-getaddrinfo.c
+  tests/test-getcwd-lgpl.c
   tests/test-getdelim.c
   tests/test-getline.c
   tests/test-getopt.c
@@ -1013,6 +1263,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-ignore-value.c
   tests/test-inet_ntop.c
   tests/test-inet_pton.c
+  tests/test-intprops.c
+  tests/test-inttypes.c
   tests/test-locale.c
   tests/test-localename.c
   tests/test-lock.c
@@ -1041,6 +1293,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-open.h
   tests/test-perror.c
   tests/test-perror.sh
+  tests/test-perror2.c
   tests/test-pipe.c
   tests/test-poll-h.c
   tests/test-poll.c
@@ -1066,6 +1319,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-stdio.c
   tests/test-stdlib.c
   tests/test-strerror.c
+  tests/test-strerror_r.c
   tests/test-striconv.c
   tests/test-string.c
   tests/test-symlink.c
@@ -1100,6 +1354,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-wctype-h.c
   tests/test-xalloc-die.c
   tests/test-xalloc-die.sh
+  tests/unistr/test-u8-mbtoucr.c
+  tests/unistr/test-u8-uctomb.c
   tests/zerosize-ptr.h
   tests=lib/accept.c
   tests=lib/binary-io.h
@@ -1108,7 +1364,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/dosname.h
   tests=lib/dup2.c
   tests=lib/fcntl.in.h
-  tests=lib/ftell.c
+  tests=lib/fpucw.h
+  tests=lib/getcwd-lgpl.c
   tests=lib/getpagesize.c
   tests=lib/gettimeofday.c
   tests=lib/glthread/lock.c
@@ -1119,6 +1376,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/glthread/yield.h
   tests=lib/ignore-value.h
   tests=lib/inet_pton.c
+  tests=lib/inttypes.in.h
   tests=lib/ioctl.c
   tests=lib/listen.c
   tests=lib/locale.in.h
@@ -1131,7 +1389,6 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/mbtowc-impl.h
   tests=lib/mbtowc.c
   tests=lib/open.c
-  tests=lib/pathmax.h
   tests=lib/perror.c
   tests=lib/pipe.c
   tests=lib/putenv.c
@@ -1140,6 +1397,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/setlocale.c
   tests=lib/setsockopt.c
   tests=lib/stat.c
+  tests=lib/strerror_r.c
   tests=lib/symlink.c
   tests=lib/sys_ioctl.in.h
   tests=lib/sys_stat.in.h
diff --git a/gl/m4/iconv_open.m4 b/gl/m4/iconv_open.m4
index b062e73..accdecc 100644
--- a/gl/m4/iconv_open.m4
+++ b/gl/m4/iconv_open.m4
@@ -1,4 +1,4 @@
-# iconv_open.m4 serial 12
+# iconv_open.m4 serial 14
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,6 +36,16 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
         gl_REPLACE_ICONV_OPEN
       fi
     fi
+    m4_ifdef([gl_FUNC_ICONV_OPEN_UTF_SUPPORT], [
+      gl_FUNC_ICONV_OPEN_UTF_SUPPORT
+      if test $gl_cv_func_iconv_supports_utf = no; then
+        REPLACE_ICONV_UTF=1
+        AC_DEFINE([REPLACE_ICONV_UTF], [1],
+          [Define if the iconv() functions are enhanced to handle the 
UTF-{16,32}{BE,LE} encodings.])
+        REPLACE_ICONV=1
+        gl_REPLACE_ICONV_OPEN
+      fi
+    ])
   fi
 ])
 
@@ -43,235 +53,4 @@ AC_DEFUN([gl_REPLACE_ICONV_OPEN],
 [
   gl_REPLACE_ICONV_H
   REPLACE_ICONV_OPEN=1
-  AC_LIBOBJ([iconv_open])
-])
-
-AC_DEFUN([gl_FUNC_ICONV_OPEN_UTF],
-[
-  AC_REQUIRE([gl_FUNC_ICONV_OPEN])
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-  AC_REQUIRE([gl_ICONV_H_DEFAULTS])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_CACHE_CHECK([whether iconv supports conversion between UTF-8 and 
UTF-{16,32}{BE,LE}],
-      [gl_cv_func_iconv_supports_utf],
-      [
-        save_LIBS="$LIBS"
-        LIBS="$LIBS $LIBICONV"
-        AC_RUN_IFELSE(
-          [AC_LANG_SOURCE([[
-#include <iconv.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-int main ()
-{
-  int result = 0;
-  /* Test conversion from UTF-8 to UTF-16BE with no errors.  */
-  {
-    static const char input[] =
-      "Japanese (\346\227\245\346\234\254\350\252\236) 
[\360\235\224\215\360\235\224\236\360\235\224\255]";
-    static const char expected[] =
-      "\000J\000a\000p\000a\000n\000e\000s\000e\000 
\000(\145\345\147\054\212\236\000)\000 
\000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
-    iconv_t cd;
-    cd = iconv_open ("UTF-16BE", "UTF-8");
-    if (cd == (iconv_t)(-1))
-      result |= 1;
-    else
-      {
-        char buf[100];
-        const char *inptr;
-        size_t inbytesleft;
-        char *outptr;
-        size_t outbytesleft;
-        size_t res;
-        inptr = input;
-        inbytesleft = sizeof (input) - 1;
-        outptr = buf;
-        outbytesleft = sizeof (buf);
-        res = iconv (cd,
-                     (ICONV_CONST char **) &inptr, &inbytesleft,
-                     &outptr, &outbytesleft);
-        if (!(res == 0 && inbytesleft == 0))
-          result |= 1;
-        else if (!(outptr == buf + (sizeof (expected) - 1)))
-          result |= 1;
-        else if (!(memcmp (buf, expected, sizeof (expected) - 1) == 0))
-          result |= 1;
-        else if (!(iconv_close (cd) == 0))
-          result |= 1;
-      }
-  }
-  /* Test conversion from UTF-8 to UTF-16LE with no errors.  */
-  {
-    static const char input[] =
-      "Japanese (\346\227\245\346\234\254\350\252\236) 
[\360\235\224\215\360\235\224\236\360\235\224\255]";
-    static const char expected[] =
-      "J\000a\000p\000a\000n\000e\000s\000e\000 
\000(\000\345\145\054\147\236\212)\000 
\000[\000\065\330\015\335\065\330\036\335\065\330\055\335]\000";
-    iconv_t cd;
-    cd = iconv_open ("UTF-16LE", "UTF-8");
-    if (cd == (iconv_t)(-1))
-      result |= 2;
-    else
-      {
-        char buf[100];
-        const char *inptr;
-        size_t inbytesleft;
-        char *outptr;
-        size_t outbytesleft;
-        size_t res;
-        inptr = input;
-        inbytesleft = sizeof (input) - 1;
-        outptr = buf;
-        outbytesleft = sizeof (buf);
-        res = iconv (cd,
-                     (ICONV_CONST char **) &inptr, &inbytesleft,
-                     &outptr, &outbytesleft);
-        if (!(res == 0 && inbytesleft == 0))
-          result |= 2;
-        else if (!(outptr == buf + (sizeof (expected) - 1)))
-          result |= 2;
-        else if (!(memcmp (buf, expected, sizeof (expected) - 1) == 0))
-          result |= 2;
-        else if (!(iconv_close (cd) == 0))
-          result |= 2;
-      }
-  }
-  /* Test conversion from UTF-8 to UTF-32BE with no errors.  */
-  {
-    static const char input[] =
-      "Japanese (\346\227\245\346\234\254\350\252\236) 
[\360\235\224\215\360\235\224\236\360\235\224\255]";
-    static const char expected[] =
-      
"\000\000\000J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000
 
\000\000\000(\000\000\145\345\000\000\147\054\000\000\212\236\000\000\000)\000\000\000
 \000\000\000[\000\001\325\015\000\001\325\036\000\001\325\055\000\000\000]";
-    iconv_t cd;
-    cd = iconv_open ("UTF-32BE", "UTF-8");
-    if (cd == (iconv_t)(-1))
-      result |= 4;
-    else
-      {
-        char buf[100];
-        const char *inptr;
-        size_t inbytesleft;
-        char *outptr;
-        size_t outbytesleft;
-        size_t res;
-        inptr = input;
-        inbytesleft = sizeof (input) - 1;
-        outptr = buf;
-        outbytesleft = sizeof (buf);
-        res = iconv (cd,
-                     (ICONV_CONST char **) &inptr, &inbytesleft,
-                     &outptr, &outbytesleft);
-        if (!(res == 0 && inbytesleft == 0))
-          result |= 4;
-        else if (!(outptr == buf + (sizeof (expected) - 1)))
-          result |= 4;
-        else if (!(memcmp (buf, expected, sizeof (expected) - 1) == 0))
-          result |= 4;
-        else if (!(iconv_close (cd) == 0))
-          result |= 4;
-      }
-  }
-  /* Test conversion from UTF-8 to UTF-32LE with no errors.  */
-  {
-    static const char input[] =
-      "Japanese (\346\227\245\346\234\254\350\252\236) 
[\360\235\224\215\360\235\224\236\360\235\224\255]";
-    static const char expected[] =
-      
"J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000
 
\000\000\000(\000\000\000\345\145\000\000\054\147\000\000\236\212\000\000)\000\000\000
 
\000\000\000[\000\000\000\015\325\001\000\036\325\001\000\055\325\001\000]\000\000\000";
-    iconv_t cd;
-    cd = iconv_open ("UTF-32LE", "UTF-8");
-    if (cd == (iconv_t)(-1))
-      result |= 8;
-    else
-      {
-        char buf[100];
-        const char *inptr;
-        size_t inbytesleft;
-        char *outptr;
-        size_t outbytesleft;
-        size_t res;
-        inptr = input;
-        inbytesleft = sizeof (input) - 1;
-        outptr = buf;
-        outbytesleft = sizeof (buf);
-        res = iconv (cd,
-                     (ICONV_CONST char **) &inptr, &inbytesleft,
-                     &outptr, &outbytesleft);
-        if (!(res == 0 && inbytesleft == 0))
-          result |= 8;
-        else if (!(outptr == buf + (sizeof (expected) - 1)))
-          result |= 8;
-        else if (!(memcmp (buf, expected, sizeof (expected) - 1) == 0))
-          result |= 8;
-        else if (!(iconv_close (cd) == 0))
-          result |= 8;
-      }
-  }
-  /* Test conversion from UTF-16BE to UTF-8 with no errors.
-     This test fails on NetBSD 3.0.  */
-  {
-    static const char input[] =
-      "\000J\000a\000p\000a\000n\000e\000s\000e\000 
\000(\145\345\147\054\212\236\000)\000 
\000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
-    static const char expected[] =
-      "Japanese (\346\227\245\346\234\254\350\252\236) 
[\360\235\224\215\360\235\224\236\360\235\224\255]";
-    iconv_t cd;
-    cd = iconv_open ("UTF-8", "UTF-16BE");
-    if (cd == (iconv_t)(-1))
-      result |= 16;
-    else
-      {
-        char buf[100];
-        const char *inptr;
-        size_t inbytesleft;
-        char *outptr;
-        size_t outbytesleft;
-        size_t res;
-        inptr = input;
-        inbytesleft = sizeof (input) - 1;
-        outptr = buf;
-        outbytesleft = sizeof (buf);
-        res = iconv (cd,
-                     (ICONV_CONST char **) &inptr, &inbytesleft,
-                     &outptr, &outbytesleft);
-        if (!(res == 0 && inbytesleft == 0))
-          result |= 16;
-        else if (!(outptr == buf + (sizeof (expected) - 1)))
-          result |= 16;
-        else if (!(memcmp (buf, expected, sizeof (expected) - 1) == 0))
-          result |= 16;
-        else if (!(iconv_close (cd) == 0))
-          result |= 16;
-      }
-  }
-  return result;
-}]])],
-          [gl_cv_func_iconv_supports_utf=yes],
-          [gl_cv_func_iconv_supports_utf=no],
-          [
-           dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
-           dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
-           dnl direction.
-           gl_cv_func_iconv_supports_utf=no
-           if test $gl_func_iconv_gnu = yes; then
-             gl_cv_func_iconv_supports_utf=yes
-           else
-changequote(,)dnl
-             case "$host_os" in
-               solaris2.9 | solaris2.1[0-9]) gl_cv_func_iconv_supports_utf=yes 
;;
-             esac
-changequote([,])dnl
-           fi
-          ])
-        LIBS="$save_LIBS"
-      ])
-    if test $gl_cv_func_iconv_supports_utf = no; then
-      REPLACE_ICONV_UTF=1
-      AC_DEFINE([REPLACE_ICONV_UTF], [1],
-        [Define if the iconv() functions are enhanced to handle the 
UTF-{16,32}{BE,LE} encodings.])
-      REPLACE_ICONV=1
-      gl_REPLACE_ICONV_OPEN
-      AC_LIBOBJ([iconv])
-      AC_LIBOBJ([iconv_close])
-    fi
-  fi
 ])
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 57580b8..45be497 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 13
+# inet_ntop.m4 serial 15
 dnl Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,14 +9,18 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
   dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  gl_REPLACE_ARPA_INET_H
-
   dnl Most platforms that provide inet_ntop define it in libc.
   dnl Solaris 8..10 provide inet_ntop in libnsl instead.
+  HAVE_INET_NTOP=1
   gl_save_LIBS=$LIBS
   AC_SEARCH_LIBS([inet_ntop], [nsl], [],
-    [AC_REPLACE_FUNCS([inet_ntop])])
+    [AC_CHECK_FUNCS([inet_ntop])
+     if test $ac_cv_func_inet_ntop = no; then
+       HAVE_INET_NTOP=0
+     fi
+    ])
   LIBS=$gl_save_LIBS
+
   INET_NTOP_LIB=
   if test "$ac_cv_search_inet_ntop" != "no" &&
      test "$ac_cv_search_inet_ntop" != "none required"; then
@@ -24,11 +28,6 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
   fi
   AC_SUBST([INET_NTOP_LIB])
 
-  gl_PREREQ_INET_NTOP
-])
-
-# Prerequisites of lib/inet_ntop.c.
-AC_DEFUN([gl_PREREQ_INET_NTOP], [
   AC_CHECK_HEADERS_ONCE([netdb.h])
   AC_CHECK_DECLS([inet_ntop],,,
     [#include <arpa/inet.h>
@@ -38,7 +37,11 @@ AC_DEFUN([gl_PREREQ_INET_NTOP], [
     ])
   if test $ac_cv_have_decl_inet_ntop = no; then
     HAVE_DECL_INET_NTOP=0
+    AC_REQUIRE([AC_C_RESTRICT])
   fi
+])
+
+# Prerequisites of lib/inet_ntop.c.
+AC_DEFUN([gl_PREREQ_INET_NTOP], [
   AC_REQUIRE([gl_SOCKET_FAMILIES])
-  AC_REQUIRE([AC_C_RESTRICT])
 ])
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index 9a7ad3b..9fc64df 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 11
+# inet_pton.m4 serial 13
 dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,14 +9,18 @@ AC_DEFUN([gl_FUNC_INET_PTON],
   dnl Persuade Solaris <arpa/inet.h> to declare inet_pton.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  gl_REPLACE_ARPA_INET_H
-
   dnl Most platforms that provide inet_pton define it in libc.
   dnl Solaris 8..10 provide inet_pton in libnsl instead.
+  HAVE_INET_PTON=1
   gl_save_LIBS=$LIBS
   AC_SEARCH_LIBS([inet_pton], [nsl], [],
-    [AC_REPLACE_FUNCS([inet_pton])])
+    [AC_CHECK_FUNCS([inet_pton])
+     if test $ac_cv_func_inet_pton = no; then
+       HAVE_INET_PTON=0
+     fi
+    ])
   LIBS=$gl_save_LIBS
+
   INET_PTON_LIB=
   if test "$ac_cv_search_inet_pton" != "no" &&
      test "$ac_cv_search_inet_pton" != "none required"; then
@@ -24,11 +28,6 @@ AC_DEFUN([gl_FUNC_INET_PTON],
   fi
   AC_SUBST([INET_PTON_LIB])
 
-  gl_PREREQ_INET_PTON
-])
-
-# Prerequisites of lib/inet_pton.c.
-AC_DEFUN([gl_PREREQ_INET_PTON], [
   AC_CHECK_HEADERS_ONCE([netdb.h])
   AC_CHECK_DECLS([inet_pton],,,
     [#include <arpa/inet.h>
@@ -38,7 +37,11 @@ AC_DEFUN([gl_PREREQ_INET_PTON], [
     ])
   if test $ac_cv_have_decl_inet_pton = no; then
     HAVE_DECL_INET_PTON=0
+    AC_REQUIRE([AC_C_RESTRICT])
   fi
+])
+
+# Prerequisites of lib/inet_pton.c.
+AC_DEFUN([gl_PREREQ_INET_PTON], [
   AC_REQUIRE([gl_SOCKET_FAMILIES])
-  AC_REQUIRE([AC_C_RESTRICT])
 ])
diff --git a/lib/gl/m4/inttypes-pri.m4 b/gl/m4/inttypes-pri.m4
similarity index 100%
copy from lib/gl/m4/inttypes-pri.m4
copy to gl/m4/inttypes-pri.m4
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
new file mode 100644
index 0000000..cc027a4
--- /dev/null
+++ b/gl/m4/inttypes.m4
@@ -0,0 +1,172 @@
+# inttypes.m4 serial 24
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+  AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
+  gl_INTTYPES_PRI_SCN
+])
+
+AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
+[
+  AC_REQUIRE([gl_STDINT_H])
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
+
+  dnl Override <inttypes.h> always, so that the portability warnings work.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+  AC_REQUIRE([gl_MULTIARCH])
+
+  dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+  dnl <inttypes.h> relies on them.  This macro is only needed when a
+  dnl C++ compiler is in use; it has no effect for a C compiler.
+  dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+  dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+  dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+  AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+    [Define to make the limit macros in <stdint.h> visible.])
+  AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+   <inttypes.h> relies on them.  */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && 
GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+
+  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([[#include <inttypes.h>
+    ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+
+# Ensure that the PRI* and SCN* macros are defined appropriately.
+AC_DEFUN([gl_INTTYPES_PRI_SCN],
+[
+  AC_REQUIRE([gt_INTTYPES_PRI])
+
+  PRIPTR_PREFIX=
+  if test -n "$STDINT_H"; then
+    dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+    PRIPTR_PREFIX='"l"'
+  else
+    dnl Using the system's <stdint.h>.
+    for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;]])],
+        [PRIPTR_PREFIX='"'$glpfx'"'])
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
+  AC_SUBST([PRIPTR_PREFIX])
+
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [INT32_MAX_LT_INTMAX_MAX],
+    [defined INT32_MAX && defined INTMAX_MAX],
+    [INT32_MAX < INTMAX_MAX],
+    [sizeof (int) < sizeof (long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [INT64_MAX_EQ_LONG_MAX],
+      [defined INT64_MAX],
+      [INT64_MAX == LONG_MAX],
+      [sizeof (long long int) == sizeof (long int)])
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
+  fi
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [UINT32_MAX_LT_UINTMAX_MAX],
+    [defined UINT32_MAX && defined UINTMAX_MAX],
+    [UINT32_MAX < UINTMAX_MAX],
+    [sizeof (unsigned int) < sizeof (unsigned long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [UINT64_MAX_EQ_ULONG_MAX],
+      [defined UINT64_MAX],
+      [UINT64_MAX == ULONG_MAX],
+      [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
+  fi
+])
+
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+  AC_CACHE_CHECK([whether $3],
+    [gl_cv_test_$1],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if $2
+             #define CONDITION ($3)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION ($4)
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];]])],
+       [gl_cv_test_$1=yes],
+       [gl_cv_test_$1=no])])
+  if test $gl_cv_test_$1 = yes; then
+    $1=1;
+  else
+    $1=0;
+  fi
+  AC_SUBST([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+  GNULIB_IMAXABS=0;      AC_SUBST([GNULIB_IMAXABS])
+  GNULIB_IMAXDIV=0;      AC_SUBST([GNULIB_IMAXDIV])
+  GNULIB_STRTOIMAX=0;    AC_SUBST([GNULIB_STRTOIMAX])
+  GNULIB_STRTOUMAX=0;    AC_SUBST([GNULIB_STRTOUMAX])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_IMAXABS=1;   AC_SUBST([HAVE_DECL_IMAXABS])
+  HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
+  HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+  HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+  INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
+  INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
+  PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
+  PRIPTR_PREFIX=__PRIPTR_PREFIX;  AC_SUBST([PRIPTR_PREFIX])
+  UINT32_MAX_LT_UINTMAX_MAX=1;  AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
+  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';  AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
+])
diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
index 8cb36d8..e799600 100644
--- a/gl/m4/ioctl.m4
+++ b/gl/m4/ioctl.m4
@@ -1,4 +1,4 @@
-# ioctl.m4 serial 1
+# ioctl.m4 serial 3
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,12 +8,12 @@ AC_DEFUN([gl_FUNC_IOCTL],
 [
   AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  HAVE_IOCTL=1
   if test "$ac_cv_header_winsock2_h" = yes; then
     dnl Even if the 'socket' module is not used here, another part of the
     dnl application may use it and pass file descriptors that refer to
     dnl sockets to the ioctl() function. So enable the support for sockets.
-    AC_LIBOBJ([ioctl])
-    gl_REPLACE_SYS_IOCTL_H
+    HAVE_IOCTL=0
   else
     AC_CHECK_FUNCS([ioctl])
     dnl On glibc systems, the second parameter is 'unsigned long int request',
@@ -31,8 +31,6 @@ AC_DEFUN([gl_FUNC_IOCTL],
       ])
     if test $gl_cv_func_ioctl_posix_signature != yes; then
       REPLACE_IOCTL=1
-      AC_LIBOBJ([ioctl])
-      gl_REPLACE_SYS_IOCTL_H
     fi
   fi
 ])
diff --git a/gl/m4/libunistring-base.m4 b/gl/m4/libunistring-base.m4
new file mode 100644
index 0000000..9831448
--- /dev/null
+++ b/gl/m4/libunistring-base.m4
@@ -0,0 +1,141 @@
+# libunistring-base.m4 serial 5
+dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paolo Bonzini and Bruno Haible.
+
+dnl gl_LIBUNISTRING_MODULE([VERSION], [Module])
+dnl Declares that the source files of Module should be compiled, unless we
+dnl are linking with libunistring and its version is >= the given VERSION.
+dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is
+dnl true if the source files of Module should be compiled.
+dnl This macro is to be used for public libunistring API, not for
+dnl undocumented API.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a change that affects the behaviour of the
+dnl functions defined in Module (even if the sources of Module itself do not
+dnl change).
+
+AC_DEFUN([gl_LIBUNISTRING_MODULE],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]),
+    [gl_LIBUNISTRING_VERSION_CMP([$1])])
+])
+
+dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
+dnl Declares that HeaderFile should be created, unless we are linking
+dnl with libunistring and its version is >= the given VERSION.
+dnl HeaderFile should be relative to the lib directory and end in '.h'.
+dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty).
+dnl
+dnl When we are linking with the already installed libunistring and its version
+dnl is < VERSION, we create HeaderFile here, because we may compile functions
+dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed
+dnl version.
+dnl When we are linking with the already installed libunistring and its version
+dnl is > VERSION, we don't create HeaderFile here: it could cause compilation
+dnl errors in other libunistring header files if some types are missing.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a non-comment change to the HeaderFile.
+
+AC_DEFUN([gl_LIBUNISTRING_LIBHEADER],
+[
+  AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+  dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+  dnl gl_LIBUNISTRING_CORE if that macro has been run.
+  if gl_LIBUNISTRING_VERSION_CMP([$1]); then
+    LIBUNISTRING_[]AS_TR_CPP([$2])='$2'
+  else
+    LIBUNISTRING_[]AS_TR_CPP([$2])=
+  fi
+  AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2]))
+])
+
+dnl Miscellaneous preparations/initializations.
+
+AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE],
+[
+  dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point.
+  m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])])
+
+  AC_REQUIRE([AC_PROG_AWK])
+
+dnl Sed expressions to extract the parts of a version number.
+changequote(,)
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+changequote([,])
+
+  if test "$HAVE_LIBUNISTRING" = yes; then
+    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
"$gl_libunistring_sed_extract_major"`
+    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
"$gl_libunistring_sed_extract_minor"`
+    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
"$gl_libunistring_sed_extract_subminor"`
+  fi
+])
+
+dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
+dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION
+dnl is less than the VERSION argument.
+AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
+[ { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+         dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least.
+         AS_LITERAL_IF([$1],
+           [dnl This is the optimized variant, that assumes the argument is a 
literal:
+            m4_pushdef([requested_version_major],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], 
[\1]), [])])
+            m4_pushdef([requested_version_minor],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], 
[^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+            m4_pushdef([requested_version_subminor],
+              [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], 
[^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+            test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 
requested_version_minor \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 
requested_version_minor \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 
requested_version_subminor
+                         }
+                    }
+               }
+            m4_popdef([requested_version_subminor])
+            m4_popdef([requested_version_minor])
+            m4_popdef([requested_version_major])
+           ],
+           [dnl This is the unoptimized variant:
+            requested_version_major=`echo '$1' | sed -n -e 
"$gl_libunistring_sed_extract_major"`
+            requested_version_minor=`echo '$1' | sed -n -e 
"$gl_libunistring_sed_extract_minor"`
+            requested_version_subminor=`echo '$1' | sed -n -e 
"$gl_libunistring_sed_extract_subminor"`
+            test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \
+            || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major 
\
+                 && { test $LIBUNISTRING_VERSION_MINOR -lt 
$requested_version_minor \
+                      || { test $LIBUNISTRING_VERSION_MINOR -eq 
$requested_version_minor \
+                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 
$requested_version_subminor
+                         }
+                    }
+               }
+           ])
+       }
+  }])
+
+dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
+dnl same as ORIG, otherwise to 0.
+m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])])
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index e03f91f..5e06398 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,4 +1,4 @@
-# locale-zh.m4 serial 8
+# locale-zh.m4 serial 9
 dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -93,6 +93,12 @@ changequote([,])dnl
             gt_cv_locale_zh_CN=none
           fi
           ;;
+        solaris2.8)
+          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps 
core.
+          gt_cv_locale_zh_CN=none
+          ;;
         *)
           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
index 4d0f894..e77a303 100644
--- a/gl/m4/locale_h.m4
+++ b/gl/m4/locale_h.m4
@@ -1,4 +1,4 @@
-# locale_h.m4 serial 13
+# locale_h.m4 serial 14
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,12 +57,6 @@ AC_DEFUN([gl_LOCALE_H],
   dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
   gl_NEXT_HEADERS([locale.h])
 
-  if test -n "$STDDEF_H" \
-     || test $gl_cv_header_locale_h_posix2001 = no \
-     || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
-    gl_REPLACE_LOCALE_H
-  fi
-
   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([[#include <locale.h>
@@ -74,13 +68,6 @@ AC_DEFUN([gl_LOCALE_H],
     [setlocale duplocale])
 ])
 
-dnl Unconditionally enables the replacement of <locale.h>.
-AC_DEFUN([gl_REPLACE_LOCALE_H],
-[
-  dnl This is a no-op, because <locale.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index f6452f6..b454884 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,4 +1,4 @@
-# lseek.m4 serial 6
+# lseek.m4 serial 7
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -35,15 +35,8 @@ AC_DEFUN([gl_FUNC_LSEEK],
          [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
      fi])
   if test $gl_cv_func_lseek_pipe = no; then
-    gl_REPLACE_LSEEK
+    REPLACE_LSEEK=1
+    AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+      [Define to 1 if lseek does not detect pipes.])
   fi
 ])
-
-AC_DEFUN([gl_REPLACE_LSEEK],
-[
-  AC_LIBOBJ([lseek])
-  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  REPLACE_LSEEK=1
-  AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
-            [Define to 1 if lseek does not detect pipes.])
-])
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index b9b22a6..fe161d4 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 21
+# serial 23
 
 # Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
 #
@@ -15,24 +15,28 @@ AC_DEFUN([gl_FUNC_LSTAT],
   dnl "#define lstat stat", and lstat.c is a no-op.
   AC_CHECK_FUNCS_ONCE([lstat])
   if test $ac_cv_func_lstat = yes; then
-    AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-    if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
-      dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+    AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+    if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
       REPLACE_LSTAT=1
     fi
-    # Prerequisites of lib/lstat.c.
-    AC_REQUIRE([AC_C_INLINE])
   else
     HAVE_LSTAT=0
   fi
 ])
 
-# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
-# maintained in Autoconf.
-AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+# Prerequisites of lib/lstat.c.
+AC_DEFUN([gl_PREREQ_LSTAT],
 [
+  AC_REQUIRE([AC_C_INLINE])
+  :
+])
+
+AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+[
+  dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
+  dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
   AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
-    [ac_cv_func_lstat_dereferences_slashed_symlink],
+    [gl_cv_func_lstat_dereferences_slashed_symlink],
     [rm -f conftest.sym conftest.file
      echo >conftest.file
      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
@@ -45,25 +49,22 @@ AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
                  have to compile and use the lstat wrapper.  */
               return lstat ("conftest.sym/", &sbuf) == 0;
             ]])],
-         [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
-         [ac_cv_func_lstat_dereferences_slashed_symlink=no],
+         [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+         [gl_cv_func_lstat_dereferences_slashed_symlink=no],
          [# When cross-compiling, be pessimistic so we will end up using the
           # replacement version of lstat that checks for trailing slashes and
           # calls lstat a second time when necessary.
-          ac_cv_func_lstat_dereferences_slashed_symlink=no
+          gl_cv_func_lstat_dereferences_slashed_symlink=no
          ])
      else
        # If the 'ln -s' command failed, then we probably don't even
        # have an lstat function.
-       ac_cv_func_lstat_dereferences_slashed_symlink=no
+       gl_cv_func_lstat_dereferences_slashed_symlink=no
      fi
      rm -f conftest.sym conftest.file
     ])
-  test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+  test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
     AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
       [Define to 1 if `lstat' dereferences a symlink specified
        with a trailing slash.])
-  if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
-    AC_LIBOBJ([lstat])
-  fi
 ])
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 8094444..87018ec 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,4 +1,4 @@
-# malloc.m4 serial 12
+# malloc.m4 serial 13
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
                [Define to 1 if your system has a GNU libc compatible 'malloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_MALLOC_GNU], [0])
-     gl_REPLACE_MALLOC
+     REPLACE_MALLOC=1
     ])
 ])
 
@@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
     AC_DEFINE([HAVE_MALLOC_POSIX], [1],
       [Define if the 'malloc' function is POSIX compliant.])
   else
-    gl_REPLACE_MALLOC
+    REPLACE_MALLOC=1
   fi
 ])
 
@@ -58,9 +58,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
         [gl_cv_func_malloc_posix=no])
     ])
 ])
-
-AC_DEFUN([gl_REPLACE_MALLOC],
-[
-  AC_LIBOBJ([malloc])
-  REPLACE_MALLOC=1
-])
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index c353862..b9e01e7 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 22
+# mbrtowc.m4 serial 24
 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -53,11 +53,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
       esac
     fi
   fi
-  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([mbrtowc])
-    gl_PREREQ_MBRTOWC
-  fi
 ])
 
 dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
@@ -88,9 +83,6 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN],
   else
     REPLACE_MBSTATE_T=1
   fi
-  if test $REPLACE_MBSTATE_T = 1; then
-    gl_REPLACE_WCHAR_H
-  fi
 ])
 
 dnl Test whether mbrtowc puts the state into non-initial state when parsing an
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index 47e2d14..d364b7e 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,4 +1,4 @@
-# mbsinit.m4 serial 5
+# mbsinit.m4 serial 7
 dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -27,11 +27,6 @@ AC_DEFUN([gl_FUNC_MBSINIT],
       esac
     fi
   fi
-  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([mbsinit])
-    gl_PREREQ_MBSINIT
-  fi
 ])
 
 # Prerequisites of lib/mbsinit.c.
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
index 9215892..7793a00 100644
--- a/gl/m4/mbtowc.m4
+++ b/gl/m4/mbtowc.m4
@@ -1,4 +1,4 @@
-# mbtowc.m4 serial 1
+# mbtowc.m4 serial 2
 dnl Copyright (C) 2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_MBTOWC],
   if false; then
     REPLACE_MBTOWC=1
   fi
-  if test $REPLACE_MBTOWC = 1; then
-    AC_LIBOBJ([mbtowc])
-    gl_PREREQ_MBTOWC
-  fi
 ])
 
 # Prerequisites of lib/mbtowc.c.
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index a544e2b..f6dc3e7 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,4 +1,4 @@
-# memchr.m4 serial 11
+# memchr.m4 serial 12
 dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -80,10 +80,6 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
       REPLACE_MEMCHR=1
     fi
   fi
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
-    AC_LIBOBJ([memchr])
-    gl_PREREQ_MEMCHR
-  fi
 ])
 
 # Prerequisites of lib/memchr.c.
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
deleted file mode 100644
index 17b3d64..0000000
--- a/gl/m4/pathmax.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-# pathmax.m4 serial 8
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_PATHMAX],
-[
-  dnl Prerequisites of lib/pathmax.h.
-  AC_CHECK_FUNCS_ONCE([pathconf])
-  AC_CHECK_HEADERS_ONCE([sys/param.h])
-])
diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4
index 2a03e08..86e2020 100644
--- a/gl/m4/perror.m4
+++ b/gl/m4/perror.m4
@@ -1,4 +1,4 @@
-# perror.m4 serial 1
+# perror.m4 serial 3
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,10 +8,48 @@ AC_DEFUN([gl_FUNC_PERROR],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_ERRNO_H])
-  if test -n "$ERRNO_H"; then
+  AC_REQUIRE([gl_FUNC_STRERROR_R])
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+  dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
+  dnl since on glibc systems, strerror_r is replaced only for signature
+  dnl issues, and perror is just fine.  Rather, we only want to
+  dnl replace perror if strerror_r was replaced for a content fix.
+  if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
     dnl The system's perror() cannot know about the new errno values we add
-    dnl to <errno.h>. Replace it.
+    dnl to <errno.h>, or any fix for strerror(0). Replace it.
     REPLACE_PERROR=1
-    AC_LIBOBJ([perror])
   fi
+  case ${gl_cv_func_strerror_r_works-unset} in
+    unset|*yes)
+      AC_CACHE_CHECK([whether perror matches strerror],
+        [gl_cv_func_perror_works],
+        [AC_RUN_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <errno.h>
+                #include <stdio.h>
+              ]],
+              [[char *str = strerror (-1);
+                if (!getenv("CONFTEST_OUTPUT")) return 0;
+                if (!str) str = "";
+                puts (str);
+                errno = -1;
+                perror ("");
+              ]])],
+           [CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2
+            if cmp conftest.txt1 conftest.txt2 >/dev/null; then
+              gl_cv_func_perror_works=yes
+            else
+              gl_cv_func_perror_works=no
+            fi
+            rm -rf conftest.txt1 conftest.txt2],
+           [gl_cv_func_perror_works=no],
+           [dnl Guess no when cross-compiling.
+            gl_cv_func_perror_works="guessing no"])])
+       if test "$gl_cv_func_perror_works" != yes; then
+         REPLACE_PERROR=1
+       fi ;;
+    *) dnl The system's perror() probably inherits the bugs in the
+       dnl system's strerror_r(). Replace it.
+      REPLACE_PERROR=1 ;;
+  esac
 ])
diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4
index ae00049..9013174 100644
--- a/gl/m4/pipe.m4
+++ b/gl/m4/pipe.m4
@@ -1,4 +1,4 @@
-# pipe.m4 serial 1
+# pipe.m4 serial 2
 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,5 @@ AC_DEFUN([gl_FUNC_PIPE],
   AC_CHECK_FUNCS_ONCE([pipe])
   if test $ac_cv_func_pipe != yes; then
     HAVE_PIPE=0
-    AC_LIBOBJ([pipe])
   fi
 ])
diff --git a/gl/m4/poll.m4 b/gl/m4/poll.m4
index 4f8df1e..e489df7 100644
--- a/gl/m4/poll.m4
+++ b/gl/m4/poll.m4
@@ -1,4 +1,4 @@
-# poll.m4 serial 12
+# poll.m4 serial 14
 dnl Copyright (c) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -63,9 +63,7 @@ This is MacOSX or AIX
     fi
   fi
   if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then
-    gl_REPLACE_POLL_H
-    AC_LIBOBJ([poll])
-    gl_PREREQ_POLL
+    :
   else
     AC_DEFINE([HAVE_POLL], [1],
       [Define to 1 if you have the 'poll' function and it works.])
diff --git a/gl/m4/poll_h.m4 b/gl/m4/poll_h.m4
index 758f29b..3f2abf4 100644
--- a/gl/m4/poll_h.m4
+++ b/gl/m4/poll_h.m4
@@ -1,4 +1,4 @@
-# poll_h.m4 serial 1
+# poll_h.m4 serial 2
 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,6 @@ AC_DEFUN([gl_POLL_H],
     HAVE_POLL_H=1
   else
     HAVE_POLL_H=0
-    gl_REPLACE_POLL_H
   fi
   AC_SUBST([HAVE_POLL_H])
 
@@ -30,13 +29,6 @@ AC_DEFUN([gl_POLL_H],
     [poll])
 ])
 
-dnl Unconditionally enables the replacement of <poll.h>.
-AC_DEFUN([gl_REPLACE_POLL_H],
-[
-  dnl This is a no-op, because <poll.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_POLL_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 9c2ed1e..ead5ece 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 42
+# printf.m4 serial 43
 dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -892,7 +892,8 @@ dnl On mingw, precisions larger than 512 are treated like 
512, in integer,
 dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
 dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC,
 dnl precisions larger than 510 in floating-point output yield wrong results.
-dnl On BeOS, precisions larger than 1044 crash the program.
+dnl On AIX 7.1, precisions larger than 998 in floating-point output yield
+dnl wrong results. On BeOS, precisions larger than 1044 crash the program.
 dnl Result is gl_cv_func_printf_precision.
 
 AC_DEFUN([gl_PRINTF_PRECISION],
@@ -921,6 +922,9 @@ int main ()
   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
       || buf[0] != '1')
     result |= 4;
+  if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+      || buf[0] != '1')
+    result |= 4;
   return result;
 }]])],
         [gl_cv_func_printf_precision=yes],
@@ -1465,7 +1469,8 @@ dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  
#  .  .  .  #  .  .  .
 dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  
.  .  .  .  .  .
 dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  #  .  
.  .  #  .  .  .
 dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  
#  #  #  #  #  #
-dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   AIX 7.1                        .  .  #  #  #  .  .  .  .  .  .  #  #  .  
.  .  .  .  .  .
+dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  
.  .  #  .  .  .
 dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  
.  .  #  #  .  .
 dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  
.  .  #  #  .  #
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
index de3900b..1497b4a 100644
--- a/gl/m4/putenv.m4
+++ b/gl/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 17
+# putenv.m4 serial 18
 dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,6 +36,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
    ])
   if test $gl_cv_func_svid_putenv = no; then
     REPLACE_PUTENV=1
-    AC_LIBOBJ([putenv])
   fi
 ])
diff --git a/gl/m4/quote.m4 b/gl/m4/quote.m4
index 2328684..1996120 100644
--- a/gl/m4/quote.m4
+++ b/gl/m4/quote.m4
@@ -1,4 +1,4 @@
-# quote.m4 serial 5
+# quote.m4 serial 6
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -7,8 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_QUOTE],
 [
-  AC_LIBOBJ([quote])
-
   dnl Prerequisites of lib/quote.c.
   dnl (none)
+  :
 ])
diff --git a/gl/m4/quotearg.m4 b/gl/m4/quotearg.m4
index ff4a2fa..990712b 100644
--- a/gl/m4/quotearg.m4
+++ b/gl/m4/quotearg.m4
@@ -1,4 +1,4 @@
-# quotearg.m4 serial 8
+# quotearg.m4 serial 9
 dnl Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,5 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_QUOTEARG],
 [
-  AC_LIBOBJ([quotearg])
+  :
 ])
diff --git a/gl/m4/readline.m4 b/gl/m4/readline.m4
index 90ce357..a5ab067 100644
--- a/gl/m4/readline.m4
+++ b/gl/m4/readline.m4
@@ -1,4 +1,4 @@
-# readline.m4 serial 8
+# readline.m4 serial 9
 dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -73,11 +73,6 @@ AC_DEFUN([gl_FUNC_READLINE],
   AC_SUBST([LTLIBREADLINE])
 
   AC_CHECK_HEADERS([readline/readline.h])
-
-  if test "$gl_cv_lib_readline" = no; then
-    AC_LIBOBJ([readline])
-    gl_PREREQ_READLINE
-  fi
 ])
 
 # Prerequisites of lib/readline.c.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index a403d9f..5cc1340 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,4 +1,4 @@
-# realloc.m4 serial 11
+# realloc.m4 serial 12
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU],
                [Define to 1 if your system has a GNU libc compatible 'realloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_REALLOC_GNU], [0])
-     gl_REPLACE_REALLOC
+     REPLACE_REALLOC=1
     ])
 ])# gl_FUNC_REALLOC_GNU
 
@@ -33,12 +33,6 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
     AC_DEFINE([HAVE_REALLOC_POSIX], [1],
       [Define if the 'realloc' function is POSIX compliant.])
   else
-    gl_REPLACE_REALLOC
+    REPLACE_REALLOC=1
   fi
 ])
-
-AC_DEFUN([gl_REPLACE_REALLOC],
-[
-  AC_LIBOBJ([realloc])
-  REPLACE_REALLOC=1
-])
diff --git a/gl/m4/select.m4 b/gl/m4/select.m4
index dc771d0..d9c3465 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,4 +1,4 @@
-# select.m4 serial 3
+# select.m4 serial 5
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_SELECT],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_REQUIRE([gl_SOCKETS])
   if test "$ac_cv_header_winsock2_h" = yes; then
-    AC_LIBOBJ([select])
+    REPLACE_SELECT=1
   else
     dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error
     dnl EFAULT.
@@ -44,10 +44,7 @@ changequote([,])dnl
       ])
     case "$gl_cv_func_select_supports0" in
       *yes) ;;
-      *)
-        REPLACE_SELECT=1
-        AC_LIBOBJ([select])
-        ;;
+      *) REPLACE_SELECT=1 ;;
     esac
   fi
 ])
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index ba619b0..8927a6c 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,4 +1,4 @@
-# setenv.m4 serial 21
+# setenv.m4 serial 24
 dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,20 +7,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_SETENV],
 [
   AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
-  if test $HAVE_SETENV$REPLACE_SETENV != 10; then
-    AC_LIBOBJ([setenv])
-  fi
-])
-
-# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
-[
-  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
-  AC_CHECK_DECLS_ONCE([setenv])
-  if test $ac_cv_have_decl_setenv = no; then
-    HAVE_DECL_SETENV=0
-  fi
-  AC_CHECK_FUNCS_ONCE([setenv])
   if test $ac_cv_func_setenv = no; then
     HAVE_SETENV=0
   else
@@ -50,9 +36,20 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
       [gl_cv_func_setenv_works="guessing no"])])
     if test "$gl_cv_func_setenv_works" != yes; then
       REPLACE_SETENV=1
-      AC_LIBOBJ([setenv])
     fi
   fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation
+# (no REPLACE_SETENV, no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([setenv])
+  if test $ac_cv_have_decl_setenv = no; then
+    HAVE_DECL_SETENV=0
+  fi
+  AC_CHECK_FUNCS_ONCE([setenv])
   gl_PREREQ_SETENV
 ])
 
@@ -65,9 +62,9 @@ AC_DEFUN([gl_FUNC_UNSETENV],
   fi
   AC_CHECK_FUNCS([unsetenv])
   if test $ac_cv_func_unsetenv = no; then
-    AC_LIBOBJ([unsetenv])
-    gl_PREREQ_UNSETENV
+    HAVE_UNSETENV=0
   else
+    HAVE_UNSETENV=1
     dnl Some BSDs return void, failing to do error checking.
     AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
       [AC_COMPILE_IFELSE(
@@ -93,7 +90,6 @@ int unsetenv();
       AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
        instead of int.])
       REPLACE_UNSETENV=1
-      AC_LIBOBJ([unsetenv])
     fi
 
     dnl Solaris 10 unsetenv does not remove all copies of a name.
@@ -126,7 +122,6 @@ int unsetenv();
       [gl_cv_func_unsetenv_works="guessing no"])])
     if test "$gl_cv_func_unsetenv_works" != yes; then
       REPLACE_UNSETENV=1
-      AC_LIBOBJ([unsetenv])
     fi
   fi
 ])
diff --git a/gl/m4/setlocale.m4 b/gl/m4/setlocale.m4
index 6672c34..d64780d 100644
--- a/gl/m4/setlocale.m4
+++ b/gl/m4/setlocale.m4
@@ -1,4 +1,4 @@
-# setlocale.m4 serial 1
+# setlocale.m4 serial 4
 dnl Copyright (C) 2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,12 +12,14 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
     dnl On native Windows systems, setlocale(category,NULL) does not look at
     dnl the environment variables LC_ALL, category, and LANG.
     mingw*) REPLACE_SETLOCALE=1 ;;
+    dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
+    dnl is then still "C".
+    cygwin*)
+      case `uname -r` in
+        1.5.*) REPLACE_SETLOCALE=1 ;;
+      esac
+      ;;
   esac
-  if test $REPLACE_SETLOCALE = 1; then
-    gl_REPLACE_LOCALE_H
-    AC_LIBOBJ([setlocale])
-    gl_PREREQ_SETLOCALE
-  fi
 ])
 
 # Prerequisites of lib/setlocale.c.
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index 27f82d5..c63f59f 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 7
+# serial 8
 
 # Copyright (C) 2009-2011 Free Software Foundation, Inc.
 #
@@ -58,9 +58,11 @@ AC_DEFUN([gl_FUNC_STAT],
       AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
         help when passed a file name with a trailing slash]);;
   esac
-  if test $REPLACE_STAT = 1; then
-    AC_LIBOBJ([stat])
-    dnl Prerequisites of lib/stat.c.
-    AC_REQUIRE([AC_C_INLINE])
-  fi
+])
+
+# Prerequisites of lib/stat.c.
+AC_DEFUN([gl_PREREQ_STAT],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  :
 ])
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index dff37fe..c75e957 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 40
+# stdint.m4 serial 41
 dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 dnl From Paul Eggert and Bruno Haible.
 dnl Test whether <stdint.h> is supported or must be substituted.
 
-AC_DEFUN([gl_STDINT_H],
+AC_DEFUN_ONCE([gl_STDINT_H],
 [
   AC_PREREQ([2.59])dnl
 
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index 3fb36dd..d744ad5 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,4 +1,4 @@
-# strdup.m4 serial 12
+# strdup.m4 serial 13
 
 dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
 
@@ -10,10 +10,6 @@ AC_DEFUN([gl_FUNC_STRDUP],
 [
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_CHECK_FUNCS_ONCE([strdup])
-  if test $ac_cv_func_strdup != yes; then
-    AC_LIBOBJ([strdup])
-    gl_PREREQ_STRDUP
-  fi
   AC_CHECK_DECLS_ONCE([strdup])
   if test $ac_cv_have_decl_strdup = no; then
     HAVE_DECL_STRDUP=0
@@ -28,12 +24,7 @@ AC_DEFUN([gl_FUNC_STRDUP_POSIX],
   if test $ac_cv_func_strdup = yes; then
     if test $gl_cv_func_malloc_posix != yes; then
       REPLACE_STRDUP=1
-      AC_LIBOBJ([strdup])
-      gl_PREREQ_STRDUP
     fi
-  else
-    AC_LIBOBJ([strdup])
-    gl_PREREQ_STRDUP
   fi
   AC_CHECK_DECLS_ONCE([strdup])
   if test $ac_cv_have_decl_strdup = no; then
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 73d1d54..ca05be6 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,4 +1,4 @@
-# strerror.m4 serial 9
+# strerror.m4 serial 16
 dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,63 +6,73 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_FUNC_STRERROR],
 [
-  AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
-  if test $REPLACE_STRERROR = 1; then
-    AC_LIBOBJ([strerror])
-    AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
-      [Define this to 1 if strerror is broken.])
-  fi
-])
-
-# Like gl_FUNC_STRERROR, except prepare for separate compilation (no 
AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
-[
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_ERRNO_H])
-  if test -z "$ERRNO_H"; then
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+  m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+    AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+  ])
+  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
     AC_CACHE_CHECK([for working strerror function],
      [gl_cv_func_working_strerror],
      [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM(
            [[#include <string.h>
            ]],
-           [[return !*strerror (-2);]])],
+           [[if (!*strerror (-2)) return 1;]])],
         [gl_cv_func_working_strerror=yes],
         [gl_cv_func_working_strerror=no],
-        [dnl Assume crossbuild works if it compiles.
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM(
-              [[#include <string.h>
-              ]],
-              [[return !*strerror (-2);]])],
-           [gl_cv_func_working_strerror=yes],
-           [gl_cv_func_working_strerror=no])
-      ])
+        [dnl Be pessimistic on cross-compiles for now.
+         gl_cv_func_working_strerror="guessing no"])
     ])
-    if test $gl_cv_func_working_strerror = no; then
+    if test "$gl_cv_func_working_strerror" != yes; then
       dnl The system's strerror() fails to return a string for out-of-range
       dnl integers. Replace it.
       REPLACE_STRERROR=1
     fi
+    m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+      dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
+      dnl buffer, we must replace strerror.
+      case "$gl_cv_func_strerror_r_works" in
+        *no) REPLACE_STRERROR=1 ;;
+      esac
+    ])
   else
     dnl The system's strerror() cannot know about the new errno values we add
-    dnl to <errno.h>. Replace it.
+    dnl to <errno.h>, or any fix for strerror(0). Replace it.
     REPLACE_STRERROR=1
   fi
-  if test $REPLACE_STRERROR = 1; then
-    gl_PREREQ_STRERROR
-  fi
 ])
 
-# Prerequisites of lib/strerror.c.
-AC_DEFUN([gl_PREREQ_STRERROR], [
-  AC_CHECK_DECLS([strerror])
-  AC_CHECK_HEADERS_ONCE([sys/socket.h])
-  if test $ac_cv_header_sys_socket_h != yes; then
-    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
-    dnl the check for those headers unconditional; yet cygwin reports
-    dnl that the headers are present but cannot be compiled (since on
-    dnl cygwin, all socket information should come from sys/socket.h).
-    AC_CHECK_HEADERS([winsock2.h])
+dnl Detect if strerror(0) passes (that is, does not set errno, and does not
+dnl return a string that matches strerror(-1)).
+AC_DEFUN([gl_FUNC_STRERROR_0],
+[
+  REPLACE_STRERROR_0=0
+  AC_CACHE_CHECK([whether strerror(0) succeeds],
+   [gl_cv_func_strerror_0_works],
+   [AC_RUN_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#include <string.h>
+           #include <errno.h>
+         ]],
+         [[int result = 0;
+           char *str;
+           errno = 0;
+           str = strerror (0);
+           if (!*str) result |= 1;
+           if (errno) result |= 2;
+           if (strstr (str, "nknown") || strstr (str, "ndefined"))
+             result |= 4;
+           return result;]])],
+      [gl_cv_func_strerror_0_works=yes],
+      [gl_cv_func_strerror_0_works=no],
+      [dnl Be pessimistic on cross-compiles for now.
+       gl_cv_func_strerror_0_works="guessing no"])
+  ])
+  if test "$gl_cv_func_strerror_0_works" != yes; then
+    REPLACE_STRERROR_0=1
+    AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+      does not return a message implying success.])
   fi
 ])
diff --git a/gl/m4/strerror_r.m4 b/gl/m4/strerror_r.m4
new file mode 100644
index 0000000..f6aceff
--- /dev/null
+++ b/gl/m4/strerror_r.m4
@@ -0,0 +1,168 @@
+# strerror_r.m4 serial 12
+dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRERROR_R],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+
+  dnl Persuade Solaris <string.h> to declare strerror_r().
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT
+  dnl are not defined.
+  AC_CHECK_DECLS_ONCE([strerror_r])
+  if test $ac_cv_have_decl_strerror_r = no; then
+    HAVE_DECL_STRERROR_R=0
+  fi
+
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+        case "$gl_cv_func_strerror_r_works" in
+          dnl The system's strerror_r has bugs.  Replace it.
+          *no) REPLACE_STRERROR_R=1 ;;
+        esac
+      else
+        dnl The system's strerror_r() has a wrong signature. Replace it.
+        REPLACE_STRERROR_R=1
+      fi
+    else
+      dnl The system's strerror_r() cannot know about the new errno values we
+      dnl add to <errno.h>, or any fix for strerror(0). Replace it.
+      REPLACE_STRERROR_R=1
+    fi
+  fi
+])
+
+# Prerequisites of lib/strerror_r.c.
+AC_DEFUN([gl_PREREQ_STRERROR_R], [
+  dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
+  AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
+  AC_CHECK_FUNCS_ONCE([catgets])
+])
+
+# Detect if strerror_r works, but without affecting whether a replacement
+# strerror_r will be used.
+AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
+[
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+
+  AC_CHECK_FUNCS_ONCE([strerror_r])
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+      dnl The POSIX prototype is:  int strerror_r (int, char *, size_t);
+      dnl glibc, Cygwin:           char *strerror_r (int, char *, size_t);
+      dnl AIX 5.1, OSF/1 5.1:      int strerror_r (int, char *, int);
+      AC_CACHE_CHECK([for strerror_r with POSIX signature],
+        [gl_cv_func_strerror_r_posix_signature],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <string.h>
+                int strerror_r (int, char *, size_t);
+              ]],
+              [])],
+           [gl_cv_func_strerror_r_posix_signature=yes],
+           [gl_cv_func_strerror_r_posix_signature=no])
+        ])
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+        dnl AIX 6.1 strerror_r fails by returning -1, not an error number.
+        dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
+        dnl is less than 80.
+        dnl FreeBSD 8.s strerror_r claims failure on 0
+        dnl MacOS X 10.5 strerror_r treats 0 like -1
+        dnl Solaris 10 strerror_r corrupts errno on failure
+        AC_CACHE_CHECK([whether strerror_r works],
+          [gl_cv_func_strerror_r_works],
+          [AC_RUN_IFELSE(
+             [AC_LANG_PROGRAM(
+                [[#include <errno.h>
+                  #include <string.h>
+                ]],
+                [[int result = 0;
+                  char buf[79];
+                  if (strerror_r (EACCES, buf, 0) < 0)
+                    result |= 1;
+                  errno = 0;
+                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
+                    result |= 2;
+                  strcpy (buf, "Unknown");
+                  if (strerror_r (0, buf, sizeof buf) != 0)
+                    result |= 4;
+                  if (errno)
+                    result |= 8;
+                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
+                    result |= 0x10;
+                  errno = 0;
+                  *buf = 0;
+                  if (strerror_r (-3, buf, sizeof buf) < 0)
+                    result |= 0x20;
+                  if (errno)
+                    result |= 0x40;
+                  if (!*buf)
+                    result |= 0x80;
+                  return result;
+                ]])],
+             [gl_cv_func_strerror_r_works=yes],
+             [gl_cv_func_strerror_r_works=no],
+             [
+changequote(,)dnl
+              case "$host_os" in
+                       # Guess no on AIX.
+                aix*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on HP-UX.
+                hpux*) gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on BSD variants.
+                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess yes otherwise.
+                *)     gl_cv_func_strerror_r_works="guessing yes";;
+              esac
+changequote([,])dnl
+             ])
+          ])
+      else
+        dnl The system's strerror() has a wrong signature.
+        dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
+        AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
+        dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure.
+        dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer.
+        if test $ac_cv_func___xpg_strerror_r = yes; then
+          AC_CACHE_CHECK([whether __xpg_strerror_r works],
+            [gl_cv_func_strerror_r_works],
+            [AC_RUN_IFELSE(
+               [AC_LANG_PROGRAM(
+                  [[#include <errno.h>
+                    #include <string.h>
+                    extern int __xpg_strerror_r(int, char *, size_t);
+                  ]],
+                  [[int result = 0;
+                    char buf[256] = "^";
+                    char copy[256];
+                    char *str = strerror (-1);
+                    strcpy (copy, str);
+                    if (__xpg_strerror_r (-2, buf, 1) == 0)
+                      result |= 1;
+                    if (*buf)
+                      result |= 2;
+                    __xpg_strerror_r (-2, buf, 256);
+                    if (strcmp (str, copy))
+                      result |= 4;
+                    return result;
+                  ]])],
+               [gl_cv_func_strerror_r_works=yes],
+               [gl_cv_func_strerror_r_works=no],
+               [dnl Guess no on all platforms that have __xpg_strerror_r,
+                dnl at least until fixed glibc and cygwin are more common.
+                gl_cv_func_strerror_r_works="guessing no"
+               ])
+            ])
+        fi
+      fi
+    fi
+  fi
+])
diff --git a/gl/m4/strtok_r.m4 b/gl/m4/strtok_r.m4
index 3f8a26f..59ea3d7 100644
--- a/gl/m4/strtok_r.m4
+++ b/gl/m4/strtok_r.m4
@@ -1,4 +1,4 @@
-# strtok_r.m4 serial 12
+# strtok_r.m4 serial 13
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_STRTOK_R],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS([strtok_r])
   if test $ac_cv_func_strtok_r = yes; then
+    HAVE_STRTOK_R=1
     dnl glibc 2.7 has a bug in strtok_r that causes a segmentation fault
     dnl when the second argument to strtok_r is a constant string that has
     dnl exactly one byte and compiling with optimization.  This bug is, for
@@ -52,15 +53,14 @@ changequote([,])dnl
       ])
     case "$gl_cv_func_strtok_r_works" in
       *no)
-        dnl We could set REPLACE_STRTOK_R=1 and AC_LIBOBJ([strtok_r]) here,
-        dnl but it's only the macro version in <bits/string2.h> which is wrong.
-        dnl The code compiled into libc is fine.
+        dnl We could set REPLACE_STRTOK_R=1 here, but it's only the macro
+        dnl version in <bits/string2.h> which is wrong. The code compiled
+        dnl into libc is fine.
         UNDEFINE_STRTOK_R=1
         ;;
     esac
   else
-    AC_LIBOBJ([strtok_r])
-    gl_PREREQ_STRTOK_R
+    HAVE_STRTOK_R=0
   fi
   AC_CHECK_DECLS_ONCE([strtok_r])
   if test $ac_cv_have_decl_strtok_r = no; then
diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4
index 917d5f0..680c14f 100644
--- a/gl/m4/symlink.m4
+++ b/gl/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
 # See if we need to provide symlink replacement.
 
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -17,7 +17,6 @@ AC_DEFUN([gl_FUNC_SYMLINK],
   dnl and Solaris 9, we want to fix a bug with trailing slash handling.
   if test $ac_cv_func_symlink = no; then
     HAVE_SYMLINK=0
-    AC_LIBOBJ([symlink])
   else
     AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
       [gl_cv_func_symlink_works],
@@ -39,7 +38,6 @@ AC_DEFUN([gl_FUNC_SYMLINK],
       rm -f conftest.f conftest.link conftest.lnk2])
     if test "$gl_cv_func_symlink_works" != yes; then
       REPLACE_SYMLINK=1
-      AC_LIBOBJ([symlink])
     fi
   fi
 ])
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 97cab84..8c7d112 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,4 +1,4 @@
-# sys_ioctl_h.m4 serial 9
+# sys_ioctl_h.m4 serial 10
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -44,13 +44,6 @@ AC_DEFUN([gl_SYS_IOCTL_H],
     ]], [ioctl])
 ])
 
-dnl Unconditionally enables the replacement of <sys/ioctl.h>.
-AC_DEFUN([gl_REPLACE_SYS_IOCTL_H],
-[
-  dnl This is a no-op, because <sys/ioctl.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index eeb3360..fb6fe07 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 55
+# unistd_h.m4 serial 56
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,8 +36,8 @@ AC_DEFUN([gl_UNISTD_H],
     ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
     fsync ftruncate getcwd getdomainname getdtablesize getgroups
     gethostname getlogin getlogin_r getpagesize getusershell setusershell
-    endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink
-    readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
+    endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite
+    readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
     usleep])
 ])
 
@@ -72,6 +72,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETLOGIN_R=0;           AC_SUBST([GNULIB_GETLOGIN_R])
   GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
+  GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
   GNULIB_LCHOWN=0;               AC_SUBST([GNULIB_LCHOWN])
   GNULIB_LINK=0;                 AC_SUBST([GNULIB_LINK])
   GNULIB_LINKAT=0;               AC_SUBST([GNULIB_LINKAT])
@@ -110,6 +111,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
+  HAVE_GROUP_MEMBER=1;    AC_SUBST([HAVE_GROUP_MEMBER])
   HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_LINKAT=1;          AC_SUBST([HAVE_LINKAT])
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index a8f3466..b2d1a29 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 2
+# warnings.m4 serial 3
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,12 +21,12 @@ m4_ifdef([AS_VAR_APPEND],
 AC_DEFUN([gl_WARN_ADD],
 [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
 AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [
-  save_CPPFLAGS="$CPPFLAGS"
+  gl_save_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="${CPPFLAGS} $1"
   AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
                     [AS_VAR_SET([gl_Warn], [yes])],
                     [AS_VAR_SET([gl_Warn], [no])])
-  CPPFLAGS="$save_CPPFLAGS"
+  CPPFLAGS="$gl_save_CPPFLAGS"
 ])
 AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl
 AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 6255ff3..977491f 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 38
+# wchar_h.m4 serial 39
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -119,13 +119,6 @@ Configuration aborted.])
   fi
 ])
 
-dnl Unconditionally enables the replacement of <wchar.h>.
-AC_DEFUN([gl_REPLACE_WCHAR_H],
-[
-  dnl This is a no-op, because <wchar.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index 2905d9b..d21f1b9 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,4 +1,4 @@
-# wcrtomb.m4 serial 8
+# wcrtomb.m4 serial 10
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -88,11 +88,6 @@ int main ()
       esac
     fi
   fi
-  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([wcrtomb])
-    gl_PREREQ_WCRTOMB
-  fi
 ])
 
 # Prerequisites of lib/wcrtomb.c.
diff --git a/gl/m4/wctob.m4 b/gl/m4/wctob.m4
index 3b4633c..8175d00 100644
--- a/gl/m4/wctob.m4
+++ b/gl/m4/wctob.m4
@@ -1,4 +1,4 @@
-# wctob.m4 serial 7
+# wctob.m4 serial 9
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,11 +10,10 @@ AC_DEFUN([gl_FUNC_WCTOB],
 
   AC_CHECK_FUNCS_ONCE([wctob])
   if test $ac_cv_func_wctob = no; then
+    HAVE_WCTOB=0
     HAVE_DECL_WCTOB=0
-    gl_REPLACE_WCHAR_H
-    AC_LIBOBJ([wctob])
-    gl_PREREQ_WCTOB
   else
+    HAVE_WCTOB=1
 
     dnl Solaris 9 has the wctob() function but it does not work.
     dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned
@@ -102,11 +101,7 @@ int main ()
       *yes) ;;
       *) REPLACE_WCTOB=1 ;;
     esac
-    if test $REPLACE_WCTOB = 1; then
-      gl_REPLACE_WCHAR_H
-      AC_LIBOBJ([wctob])
-      gl_PREREQ_WCTOB
-    else
+    if test $REPLACE_WCTOB = 0; then
 
       dnl IRIX 6.5 has the wctob() function but does not declare it.
       AC_CHECK_DECLS([wctob], [], [], [
@@ -121,7 +116,6 @@ int main ()
 ])
       if test $ac_cv_have_decl_wctob != yes; then
         HAVE_DECL_WCTOB=0
-        gl_REPLACE_WCHAR_H
       fi
     fi
   fi
diff --git a/gl/m4/wctomb.m4 b/gl/m4/wctomb.m4
index bc21b5b..ee16a7e 100644
--- a/gl/m4/wctomb.m4
+++ b/gl/m4/wctomb.m4
@@ -1,4 +1,4 @@
-# wctomb.m4 serial 1
+# wctomb.m4 serial 2
 dnl Copyright (C) 2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_WCTOMB],
   if false; then
     REPLACE_WCTOMB=1
   fi
-  if test $REPLACE_WCTOMB = 1; then
-    AC_LIBOBJ([wctomb])
-    gl_PREREQ_WCTOMB
-  fi
 ])
 
 # Prerequisites of lib/wctomb.c.
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4
index 4900820..2fca850 100644
--- a/gl/m4/xalloc.m4
+++ b/gl/m4/xalloc.m4
@@ -1,4 +1,4 @@
-# xalloc.m4 serial 16
+# xalloc.m4 serial 17
 dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_XALLOC],
 [
-  AC_LIBOBJ([xmalloc])
-
   gl_PREREQ_XALLOC
   gl_PREREQ_XMALLOC
 ])
diff --git a/gl/netdb.in.h b/gl/netdb.in.h
index 25d7a42..69b6d5d 100644
--- a/gl/netdb.in.h
+++ b/gl/netdb.in.h
@@ -20,7 +20,7 @@
    It is intended to provide definitions and prototypes needed by an
    application.  */
 
-#ifndef _GL_NETDB_H
+#ifndef address@hidden@_NETDB_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -34,8 +34,8 @@
 
 #endif
 
-#ifndef _GL_NETDB_H
-#define _GL_NETDB_H
+#ifndef address@hidden@_NETDB_H
+#define address@hidden@_NETDB_H
 
 /* Get <netdb.h> definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and
    'struct hostent' on MinGW.  */
@@ -262,5 +262,5 @@ _GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - "
 
 #endif
 
-#endif /* _GL_NETDB_H */
-#endif /* _GL_NETDB_H */
+#endif /* address@hidden@_NETDB_H */
+#endif /* address@hidden@_NETDB_H */
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h
index f5eea43..966d6a5 100644
--- a/gl/netinet_in.in.h
+++ b/gl/netinet_in.in.h
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_NETINET_IN_H
+#ifndef address@hidden@_NETINET_IN_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -33,8 +33,8 @@
 
 #endif
 
-#ifndef _GL_NETINET_IN_H
-#define _GL_NETINET_IN_H
+#ifndef address@hidden@_NETINET_IN_H
+#define address@hidden@_NETINET_IN_H
 
 #if address@hidden@
 
@@ -44,5 +44,5 @@
 
 #endif
 
-#endif /* _GL_NETINET_IN_H */
-#endif /* _GL_NETINET_IN_H */
+#endif /* address@hidden@_NETINET_IN_H */
+#endif /* address@hidden@_NETINET_IN_H */
diff --git a/gl/poll.in.h b/gl/poll.in.h
index 0fe7fea..694d1df 100644
--- a/gl/poll.in.h
+++ b/gl/poll.in.h
@@ -19,7 +19,7 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_POLL_H
+#ifndef address@hidden@_POLL_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -31,8 +31,8 @@
 # @INCLUDE_NEXT@ @NEXT_POLL_H@
 #endif
 
-#ifndef _GL_POLL_H
-#define _GL_POLL_H
+#ifndef address@hidden@_POLL_H
+#define address@hidden@_POLL_H
 
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
@@ -100,5 +100,5 @@ _GL_WARN_ON_USE (poll, "poll is unportable - "
 #endif
 
 
-#endif /* _GL_POLL_H */
-#endif /* _GL_POLL_H */
+#endif /* address@hidden@_POLL_H */
+#endif /* address@hidden@_POLL_H */
diff --git a/gl/sockets.c b/gl/sockets.c
index 42b8f9e..53cb66e 100644
--- a/gl/sockets.c
+++ b/gl/sockets.c
@@ -37,6 +37,10 @@ close_fd_maybe_socket (const struct fd_hook *remaining_list,
                        gl_close_fn primary,
                        int fd)
 {
+  /* Note about multithread-safety: There is a race condition where, between
+     our calls to closesocket() and the primary close(), some other thread
+     could make system calls that allocate precisely the same HANDLE value
+     as sock; then the primary close() would call CloseHandle() on it.  */
   SOCKET sock;
   WSANETWORKEVENTS ev;
 
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 4469d54..43f9607 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STDARG_H
+#ifndef address@hidden@_STDARG_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -25,12 +25,12 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STDARG_H@
 
-#ifndef _GL_STDARG_H
-#define _GL_STDARG_H
+#ifndef address@hidden@_STDARG_H
+#define address@hidden@_STDARG_H
 
 #ifndef va_copy
 # define va_copy(a,b) ((a) = (b))
 #endif
 
-#endif /* _GL_STDARG_H */
-#endif /* _GL_STDARG_H */
+#endif /* address@hidden@_STDARG_H */
+#endif /* address@hidden@_STDARG_H */
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index 62a91a7..c7b98e7 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -38,9 +38,9 @@
    remember if special invocation has ever been used to obtain wint_t,
    in which case we need to clean up NULL yet again.  */
 
-# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined address@hidden@_STDDEF_H && defined _GL_STDDEF_WINT_T)
 #  ifdef __need_wint_t
-#   undef _GL_STDDEF_H
+#   undef address@hidden@_STDDEF_H
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -49,14 +49,14 @@
 #else
 /* Normal invocation convention.  */
 
-# ifndef _GL_STDDEF_H
+# ifndef address@hidden@_STDDEF_H
 
 /* The include_next requires a split double-inclusion guard.  */
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
 
-#  ifndef _GL_STDDEF_H
-#   define _GL_STDDEF_H
+#  ifndef address@hidden@_STDDEF_H
+#   define address@hidden@_STDDEF_H
 
 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
 #if @REPLACE_NULL@
@@ -82,6 +82,6 @@
 # define wchar_t int
 #endif
 
-#  endif /* _GL_STDDEF_H */
-# endif /* _GL_STDDEF_H */
+#  endif /* address@hidden@_STDDEF_H */
+# endif /* address@hidden@_STDDEF_H */
 #endif /* __need_XXX */
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index b32227b..09ac138 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -21,7 +21,7 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
-#ifndef _GL_STDINT_H
+#ifndef address@hidden@_STDINT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -52,13 +52,13 @@
   /* Other systems may have an incomplete or buggy <stdint.h>.
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
-     _GL_STDINT_H is defined.
+     address@hidden@_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
-#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-#define _GL_STDINT_H
+#if ! defined address@hidden@_STDINT_H && ! defined 
_GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define address@hidden@_STDINT_H
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
@@ -93,7 +93,7 @@
 
 #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
-/* Minimum and maximum values for a integer type under the usual assumption.
+/* Minimum and maximum values for an integer type under the usual assumption.
    Return an unspecified value if BITS == 0, adding a check to pacify
    picky compilers.  */
 
@@ -588,5 +588,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof 
(uintmax_t)
 
 #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
 
-#endif /* _GL_STDINT_H */
-#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+#endif /* address@hidden@_STDINT_H */
+#endif /* !defined address@hidden@_STDINT_H && !defined 
_GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 0b85d0c..473c84c 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -35,7 +35,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_STDIO_H
+#ifndef address@hidden@_STDIO_H
 
 #define _GL_ALREADY_INCLUDING_STDIO_H
 
@@ -44,8 +44,8 @@
 
 #undef _GL_ALREADY_INCLUDING_STDIO_H
 
-#ifndef _GL_STDIO_H
-#define _GL_STDIO_H
+#ifndef address@hidden@_STDIO_H
+#define address@hidden@_STDIO_H
 
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
@@ -461,25 +461,6 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, 
int whence)
 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
 # endif
 _GL_CXXALIASWARN (fseeko);
-# if (@REPLACE_FSEEKO@ || address@hidden@) && address@hidden@
-   /* Provide an fseek function that is consistent with fseeko.  */
-   /* In order to avoid that fseek gets defined as a macro here, the
-      developer can request the 'fseek' module.  */
-#  if !GNULIB_defined_fseek_function
-#   undef fseek
-#   define fseek rpl_fseek
-static inline int _GL_ARG_NONNULL ((1))
-rpl_fseek (FILE *fp, long offset, int whence)
-{
-#   if @REPLACE_FSEEKO@
-  return rpl_fseeko (fp, offset, whence);
-#   else
-  return fseeko (fp, offset, whence);
-#   endif
-}
-#   define GNULIB_defined_fseek_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FSEEK_WARN /* Category 1, above.  */
 # undef fseek
@@ -539,25 +520,6 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) 
_GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
 # endif
 _GL_CXXALIASWARN (ftello);
-# if (@REPLACE_FTELLO@ || address@hidden@) && address@hidden@
-   /* Provide an ftell function that is consistent with ftello.  */
-   /* In order to avoid that ftell gets defined as a macro here, the
-      developer can request the 'ftell' module.  */
-#  if !GNULIB_defined_ftell_function
-#   undef ftell
-#   define ftell rpl_ftell
-static inline long _GL_ARG_NONNULL ((1))
-rpl_ftell (FILE *f)
-{
-#   if @REPLACE_FTELLO@
-  return rpl_ftello (f);
-#   else
-  return ftello (f);
-#   endif
-}
-#   define GNULIB_defined_ftell_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FTELL_WARN /* Category 1, above.  */
 # undef ftell
@@ -1345,6 +1307,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX 
compliant - "
 #endif
 
 
-#endif /* _GL_STDIO_H */
-#endif /* _GL_STDIO_H */
+#endif /* address@hidden@_STDIO_H */
+#endif /* address@hidden@_STDIO_H */
 #endif
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 7513553..62a2ce9 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -28,13 +28,13 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_STDLIB_H
+#ifndef address@hidden@_STDLIB_H
 
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STDLIB_H@
 
-#ifndef _GL_STDLIB_H
-#define _GL_STDLIB_H
+#ifndef address@hidden@_STDLIB_H
+#define address@hidden@_STDLIB_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -761,6 +761,6 @@ _GL_CXXALIASWARN (wctomb);
 #endif
 
 
-#endif /* _GL_STDLIB_H */
-#endif /* _GL_STDLIB_H */
+#endif /* address@hidden@_STDLIB_H */
+#endif /* address@hidden@_STDLIB_H */
 #endif
diff --git a/gl/strerror-override.c b/gl/strerror-override.c
new file mode 100644
index 0000000..e103173
--- /dev/null
+++ b/gl/strerror-override.c
@@ -0,0 +1,269 @@
+/* strerror-override.c --- POSIX compatible system error routine
+
+   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2010.  */
+
+#include <config.h>
+
+#include "strerror-override.h"
+
+#include <errno.h>
+
+#if GNULIB_defined_ESOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+#  include <winsock2.h>
+# endif
+#endif
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+   describing the error.  Otherwise return NULL.  */
+const char *
+strerror_override (int errnum)
+{
+  /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
+  switch (errnum)
+    {
+#if REPLACE_STRERROR_0
+    case 0:
+      return "Success";
+#endif
+
+#if GNULIB_defined_ETXTBSY
+    case ETXTBSY:
+      return "Text file busy";
+#endif
+
+#if GNULIB_defined_ESOCK /* native Windows platforms */
+      /* EWOULDBLOCK is the same as EAGAIN.  */
+    case EINPROGRESS:
+      return "Operation now in progress";
+    case EALREADY:
+      return "Operation already in progress";
+    case ENOTSOCK:
+      return "Socket operation on non-socket";
+    case EDESTADDRREQ:
+      return "Destination address required";
+    case EMSGSIZE:
+      return "Message too long";
+    case EPROTOTYPE:
+      return "Protocol wrong type for socket";
+    case ENOPROTOOPT:
+      return "Protocol not available";
+    case EPROTONOSUPPORT:
+      return "Protocol not supported";
+    case ESOCKTNOSUPPORT:
+      return "Socket type not supported";
+    case EOPNOTSUPP:
+      return "Operation not supported";
+    case EPFNOSUPPORT:
+      return "Protocol family not supported";
+    case EAFNOSUPPORT:
+      return "Address family not supported by protocol";
+    case EADDRINUSE:
+      return "Address already in use";
+    case EADDRNOTAVAIL:
+      return "Cannot assign requested address";
+    case ENETDOWN:
+      return "Network is down";
+    case ENETUNREACH:
+      return "Network is unreachable";
+    case ENETRESET:
+      return "Network dropped connection on reset";
+    case ECONNABORTED:
+      return "Software caused connection abort";
+    case ECONNRESET:
+      return "Connection reset by peer";
+    case ENOBUFS:
+      return "No buffer space available";
+    case EISCONN:
+      return "Transport endpoint is already connected";
+    case ENOTCONN:
+      return "Transport endpoint is not connected";
+    case ESHUTDOWN:
+      return "Cannot send after transport endpoint shutdown";
+    case ETOOMANYREFS:
+      return "Too many references: cannot splice";
+    case ETIMEDOUT:
+      return "Connection timed out";
+    case ECONNREFUSED:
+      return "Connection refused";
+    case ELOOP:
+      return "Too many levels of symbolic links";
+    case EHOSTDOWN:
+      return "Host is down";
+    case EHOSTUNREACH:
+      return "No route to host";
+    case EPROCLIM:
+      return "Too many processes";
+    case EUSERS:
+      return "Too many users";
+    case EDQUOT:
+      return "Disk quota exceeded";
+    case ESTALE:
+      return "Stale NFS file handle";
+    case EREMOTE:
+      return "Object is remote";
+# if HAVE_WINSOCK2_H
+      /* WSA_INVALID_HANDLE maps to EBADF */
+      /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+      /* WSA_INVALID_PARAMETER maps to EINVAL */
+    case WSA_OPERATION_ABORTED:
+      return "Overlapped operation aborted";
+    case WSA_IO_INCOMPLETE:
+      return "Overlapped I/O event object not in signaled state";
+    case WSA_IO_PENDING:
+      return "Overlapped operations will complete later";
+      /* WSAEINTR maps to EINTR */
+      /* WSAEBADF maps to EBADF */
+      /* WSAEACCES maps to EACCES */
+      /* WSAEFAULT maps to EFAULT */
+      /* WSAEINVAL maps to EINVAL */
+      /* WSAEMFILE maps to EMFILE */
+      /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+      /* WSAEINPROGRESS is EINPROGRESS */
+      /* WSAEALREADY is EALREADY */
+      /* WSAENOTSOCK is ENOTSOCK */
+      /* WSAEDESTADDRREQ is EDESTADDRREQ */
+      /* WSAEMSGSIZE is EMSGSIZE */
+      /* WSAEPROTOTYPE is EPROTOTYPE */
+      /* WSAENOPROTOOPT is ENOPROTOOPT */
+      /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+      /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+      /* WSAEOPNOTSUPP is EOPNOTSUPP */
+      /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+      /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+      /* WSAEADDRINUSE is EADDRINUSE */
+      /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+      /* WSAENETDOWN is ENETDOWN */
+      /* WSAENETUNREACH is ENETUNREACH */
+      /* WSAENETRESET is ENETRESET */
+      /* WSAECONNABORTED is ECONNABORTED */
+      /* WSAECONNRESET is ECONNRESET */
+      /* WSAENOBUFS is ENOBUFS */
+      /* WSAEISCONN is EISCONN */
+      /* WSAENOTCONN is ENOTCONN */
+      /* WSAESHUTDOWN is ESHUTDOWN */
+      /* WSAETOOMANYREFS is ETOOMANYREFS */
+      /* WSAETIMEDOUT is ETIMEDOUT */
+      /* WSAECONNREFUSED is ECONNREFUSED */
+      /* WSAELOOP is ELOOP */
+      /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+      /* WSAEHOSTDOWN is EHOSTDOWN */
+      /* WSAEHOSTUNREACH is EHOSTUNREACH */
+      /* WSAENOTEMPTY maps to ENOTEMPTY */
+      /* WSAEPROCLIM is EPROCLIM */
+      /* WSAEUSERS is EUSERS */
+      /* WSAEDQUOT is EDQUOT */
+      /* WSAESTALE is ESTALE */
+      /* WSAEREMOTE is EREMOTE */
+    case WSASYSNOTREADY:
+      return "Network subsystem is unavailable";
+    case WSAVERNOTSUPPORTED:
+      return "Winsock.dll version out of range";
+    case WSANOTINITIALISED:
+      return "Successful WSAStartup not yet performed";
+    case WSAEDISCON:
+      return "Graceful shutdown in progress";
+    case WSAENOMORE: case WSA_E_NO_MORE:
+      return "No more results";
+    case WSAECANCELLED: case WSA_E_CANCELLED:
+      return "Call was canceled";
+    case WSAEINVALIDPROCTABLE:
+      return "Procedure call table is invalid";
+    case WSAEINVALIDPROVIDER:
+      return "Service provider is invalid";
+    case WSAEPROVIDERFAILEDINIT:
+      return "Service provider failed to initialize";
+    case WSASYSCALLFAILURE:
+      return "System call failure";
+    case WSASERVICE_NOT_FOUND:
+      return "Service not found";
+    case WSATYPE_NOT_FOUND:
+      return "Class type not found";
+    case WSAEREFUSED:
+      return "Database query was refused";
+    case WSAHOST_NOT_FOUND:
+      return "Host not found";
+    case WSATRY_AGAIN:
+      return "Nonauthoritative host not found";
+    case WSANO_RECOVERY:
+      return "Nonrecoverable error";
+    case WSANO_DATA:
+      return "Valid name, no data record of requested type";
+      /* WSA_QOS_* omitted */
+# endif
+#endif
+
+#if GNULIB_defined_ENOMSG
+    case ENOMSG:
+      return "No message of desired type";
+#endif
+
+#if GNULIB_defined_EIDRM
+    case EIDRM:
+      return "Identifier removed";
+#endif
+
+#if GNULIB_defined_ENOLINK
+    case ENOLINK:
+      return "Link has been severed";
+#endif
+
+#if GNULIB_defined_EPROTO
+    case EPROTO:
+      return "Protocol error";
+#endif
+
+#if GNULIB_defined_EMULTIHOP
+    case EMULTIHOP:
+      return "Multihop attempted";
+#endif
+
+#if GNULIB_defined_EBADMSG
+    case EBADMSG:
+      return "Bad message";
+#endif
+
+#if GNULIB_defined_EOVERFLOW
+    case EOVERFLOW:
+      return "Value too large for defined data type";
+#endif
+
+#if GNULIB_defined_ENOTSUP
+    case ENOTSUP:
+      return "Not supported";
+#endif
+
+#if GNULIB_defined_ESTALE
+    case ESTALE:
+      return "Stale NFS file handle";
+#endif
+
+#if GNULIB_defined_EDQUOT
+    case EDQUOT:
+      return "Disk quota exceeded";
+#endif
+
+#if GNULIB_defined_ECANCELED
+    case ECANCELED:
+      return "Operation canceled";
+#endif
+
+    default:
+      return NULL;
+    }
+}
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
new file mode 100644
index 0000000..a26e11a
--- /dev/null
+++ b/gl/strerror-override.h
@@ -0,0 +1,50 @@
+/* strerror-override.h --- POSIX compatible system error routine
+
+   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_STRERROR_OVERRIDE_H
+# define _GL_STRERROR_OVERRIDE_H
+
+# include <errno.h>
+# include <stddef.h>
+
+/* Reasonable buffer size that should never trigger ERANGE; if this
+   proves too small, we intentionally abort(), to remind us to fix
+   this value.  */
+# define STACKBUF_LEN 256
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+   describing the error.  Otherwise return NULL.  */
+# if REPLACE_STRERROR_0 \
+     || GNULIB_defined_ETXTBSY \
+     || GNULIB_defined_ESOCK \
+     || GNULIB_defined_ENOMSG \
+     || GNULIB_defined_EIDRM \
+     || GNULIB_defined_ENOLINK \
+     || GNULIB_defined_EPROTO \
+     || GNULIB_defined_EMULTIHOP \
+     || GNULIB_defined_EBADMSG \
+     || GNULIB_defined_EOVERFLOW \
+     || GNULIB_defined_ENOTSUP \
+     || GNULIB_defined_ESTALE \
+     || GNULIB_defined_EDQUOT \
+     || GNULIB_defined_ECANCELED
+extern const char *strerror_override (int errnum);
+# else
+#  define strerror_override(ignored) NULL
+# endif
+
+#endif /* _GL_STRERROR_OVERRIDE_H */
diff --git a/gl/strerror.c b/gl/strerror.c
index 5dae111..63899ca 100644
--- a/gl/strerror.c
+++ b/gl/strerror.c
@@ -17,340 +17,54 @@
 
 #include <config.h>
 
+/* Specification.  */
 #include <string.h>
 
-#if REPLACE_STRERROR
-
-# include <errno.h>
-# include <stdio.h>
-
-# if GNULIB_defined_ESOCK /* native Windows platforms */
-#  if HAVE_WINSOCK2_H
-#   include <winsock2.h>
-#  endif
-# endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
-# include "intprops.h"
+#include "intprops.h"
+#include "strerror-override.h"
+#include "verify.h"
 
 /* Use the system functions, not the gnulib overrides in this file.  */
-# undef sprintf
-
-# undef strerror
-# if ! HAVE_DECL_STRERROR
-#  define strerror(n) NULL
-# endif
+#undef sprintf
 
 char *
-rpl_strerror (int n)
+strerror (int n)
+#undef strerror
 {
-  char const *msg = NULL;
-  /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
-  switch (n)
-    {
-# if GNULIB_defined_ETXTBSY
-    case ETXTBSY:
-      msg = "Text file busy";
-      break;
-# endif
-
-# if GNULIB_defined_ESOCK /* native Windows platforms */
-    /* EWOULDBLOCK is the same as EAGAIN.  */
-    case EINPROGRESS:
-      msg = "Operation now in progress";
-      break;
-    case EALREADY:
-      msg = "Operation already in progress";
-      break;
-    case ENOTSOCK:
-      msg = "Socket operation on non-socket";
-      break;
-    case EDESTADDRREQ:
-      msg = "Destination address required";
-      break;
-    case EMSGSIZE:
-      msg = "Message too long";
-      break;
-    case EPROTOTYPE:
-      msg = "Protocol wrong type for socket";
-      break;
-    case ENOPROTOOPT:
-      msg = "Protocol not available";
-      break;
-    case EPROTONOSUPPORT:
-      msg = "Protocol not supported";
-      break;
-    case ESOCKTNOSUPPORT:
-      msg = "Socket type not supported";
-      break;
-    case EOPNOTSUPP:
-      msg = "Operation not supported";
-      break;
-    case EPFNOSUPPORT:
-      msg = "Protocol family not supported";
-      break;
-    case EAFNOSUPPORT:
-      msg = "Address family not supported by protocol";
-      break;
-    case EADDRINUSE:
-      msg = "Address already in use";
-      break;
-    case EADDRNOTAVAIL:
-      msg = "Cannot assign requested address";
-      break;
-    case ENETDOWN:
-      msg = "Network is down";
-      break;
-    case ENETUNREACH:
-      msg = "Network is unreachable";
-      break;
-    case ENETRESET:
-      msg = "Network dropped connection on reset";
-      break;
-    case ECONNABORTED:
-      msg = "Software caused connection abort";
-      break;
-    case ECONNRESET:
-      msg = "Connection reset by peer";
-      break;
-    case ENOBUFS:
-      msg = "No buffer space available";
-      break;
-    case EISCONN:
-      msg = "Transport endpoint is already connected";
-      break;
-    case ENOTCONN:
-      msg = "Transport endpoint is not connected";
-      break;
-    case ESHUTDOWN:
-      msg = "Cannot send after transport endpoint shutdown";
-      break;
-    case ETOOMANYREFS:
-      msg = "Too many references: cannot splice";
-      break;
-    case ETIMEDOUT:
-      msg = "Connection timed out";
-      break;
-    case ECONNREFUSED:
-      msg = "Connection refused";
-      break;
-    case ELOOP:
-      msg = "Too many levels of symbolic links";
-      break;
-    case EHOSTDOWN:
-      msg = "Host is down";
-      break;
-    case EHOSTUNREACH:
-      msg = "No route to host";
-      break;
-    case EPROCLIM:
-      msg = "Too many processes";
-      break;
-    case EUSERS:
-      msg = "Too many users";
-      break;
-    case EDQUOT:
-      msg = "Disk quota exceeded";
-      break;
-    case ESTALE:
-      msg = "Stale NFS file handle";
-      break;
-    case EREMOTE:
-      msg = "Object is remote";
-      break;
-#  if HAVE_WINSOCK2_H
-    /* WSA_INVALID_HANDLE maps to EBADF */
-    /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
-    /* WSA_INVALID_PARAMETER maps to EINVAL */
-    case WSA_OPERATION_ABORTED:
-      msg = "Overlapped operation aborted";
-      break;
-    case WSA_IO_INCOMPLETE:
-      msg = "Overlapped I/O event object not in signaled state";
-      break;
-    case WSA_IO_PENDING:
-      msg = "Overlapped operations will complete later";
-      break;
-    /* WSAEINTR maps to EINTR */
-    /* WSAEBADF maps to EBADF */
-    /* WSAEACCES maps to EACCES */
-    /* WSAEFAULT maps to EFAULT */
-    /* WSAEINVAL maps to EINVAL */
-    /* WSAEMFILE maps to EMFILE */
-    /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
-    /* WSAEINPROGRESS is EINPROGRESS */
-    /* WSAEALREADY is EALREADY */
-    /* WSAENOTSOCK is ENOTSOCK */
-    /* WSAEDESTADDRREQ is EDESTADDRREQ */
-    /* WSAEMSGSIZE is EMSGSIZE */
-    /* WSAEPROTOTYPE is EPROTOTYPE */
-    /* WSAENOPROTOOPT is ENOPROTOOPT */
-    /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
-    /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
-    /* WSAEOPNOTSUPP is EOPNOTSUPP */
-    /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
-    /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
-    /* WSAEADDRINUSE is EADDRINUSE */
-    /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
-    /* WSAENETDOWN is ENETDOWN */
-    /* WSAENETUNREACH is ENETUNREACH */
-    /* WSAENETRESET is ENETRESET */
-    /* WSAECONNABORTED is ECONNABORTED */
-    /* WSAECONNRESET is ECONNRESET */
-    /* WSAENOBUFS is ENOBUFS */
-    /* WSAEISCONN is EISCONN */
-    /* WSAENOTCONN is ENOTCONN */
-    /* WSAESHUTDOWN is ESHUTDOWN */
-    /* WSAETOOMANYREFS is ETOOMANYREFS */
-    /* WSAETIMEDOUT is ETIMEDOUT */
-    /* WSAECONNREFUSED is ECONNREFUSED */
-    /* WSAELOOP is ELOOP */
-    /* WSAENAMETOOLONG maps to ENAMETOOLONG */
-    /* WSAEHOSTDOWN is EHOSTDOWN */
-    /* WSAEHOSTUNREACH is EHOSTUNREACH */
-    /* WSAENOTEMPTY maps to ENOTEMPTY */
-    /* WSAEPROCLIM is EPROCLIM */
-    /* WSAEUSERS is EUSERS */
-    /* WSAEDQUOT is EDQUOT */
-    /* WSAESTALE is ESTALE */
-    /* WSAEREMOTE is EREMOTE */
-    case WSASYSNOTREADY:
-      msg = "Network subsystem is unavailable";
-      break;
-    case WSAVERNOTSUPPORTED:
-      msg = "Winsock.dll version out of range";
-      break;
-    case WSANOTINITIALISED:
-      msg = "Successful WSAStartup not yet performed";
-      break;
-    case WSAEDISCON:
-      msg = "Graceful shutdown in progress";
-      break;
-    case WSAENOMORE: case WSA_E_NO_MORE:
-      msg = "No more results";
-      break;
-    case WSAECANCELLED: case WSA_E_CANCELLED:
-      msg = "Call was canceled";
-      break;
-    case WSAEINVALIDPROCTABLE:
-      msg = "Procedure call table is invalid";
-      break;
-    case WSAEINVALIDPROVIDER:
-      msg = "Service provider is invalid";
-      break;
-    case WSAEPROVIDERFAILEDINIT:
-      msg = "Service provider failed to initialize";
-      break;
-    case WSASYSCALLFAILURE:
-      msg = "System call failure";
-      break;
-    case WSASERVICE_NOT_FOUND:
-      msg = "Service not found";
-      break;
-    case WSATYPE_NOT_FOUND:
-      msg = "Class type not found";
-      break;
-    case WSAEREFUSED:
-      msg = "Database query was refused";
-      break;
-    case WSAHOST_NOT_FOUND:
-      msg = "Host not found";
-      break;
-    case WSATRY_AGAIN:
-      msg = "Nonauthoritative host not found";
-      break;
-    case WSANO_RECOVERY:
-      msg = "Nonrecoverable error";
-      break;
-    case WSANO_DATA:
-      msg = "Valid name, no data record of requested type";
-      break;
-    /* WSA_QOS_* omitted */
-#  endif
-# endif
-
-# if GNULIB_defined_ENOMSG
-    case ENOMSG:
-      msg = "No message of desired type";
-      break;
-# endif
-
-# if GNULIB_defined_EIDRM
-    case EIDRM:
-      msg = "Identifier removed";
-      break;
-# endif
-
-# if GNULIB_defined_ENOLINK
-    case ENOLINK:
-      msg = "Link has been severed";
-      break;
-# endif
-
-# if GNULIB_defined_EPROTO
-    case EPROTO:
-      msg = "Protocol error";
-      break;
-# endif
-
-# if GNULIB_defined_EMULTIHOP
-    case EMULTIHOP:
-      msg = "Multihop attempted";
-      break;
-# endif
-
-# if GNULIB_defined_EBADMSG
-    case EBADMSG:
-      msg = "Bad message";
-      break;
-# endif
-
-# if GNULIB_defined_EOVERFLOW
-    case EOVERFLOW:
-      msg = "Value too large for defined data type";
-      break;
-# endif
-
-# if GNULIB_defined_ENOTSUP
-    case ENOTSUP:
-      msg = "Not supported";
-      break;
-# endif
-
-# if GNULIB_defined_ESTALE
-    case ESTALE:
-      msg = "Stale NFS file handle";
-      break;
-# endif
-
-# if GNULIB_defined_EDQUOT
-    case EDQUOT:
-      msg = "Disk quota exceeded";
-      break;
-# endif
-
-# if GNULIB_defined_ECANCELED
-    case ECANCELED:
-      msg = "Operation canceled";
-      break;
-# endif
-    }
+  static char buf[STACKBUF_LEN];
+  size_t len;
 
+  /* Cast away const, due to the historical signature of strerror;
+     callers should not be modifying the string.  */
+  const char *msg = strerror_override (n);
   if (msg)
     return (char *) msg;
 
-  {
-    char *result = strerror (n);
+  msg = strerror (n);
 
-    if (result == NULL || result[0] == '\0')
-      {
-        static char const fmt[] = "Unknown error (%d)";
-        static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
-        sprintf (msg_buf, fmt, n);
-        return msg_buf;
-      }
+  /* Our strerror_r implementation might use the system's strerror
+     buffer, so all other clients of strerror have to see the error
+     copied into a buffer that we manage.  This is not thread-safe,
+     even if the system strerror is, but portable programs shouldn't
+     be using strerror if they care about thread-safety.  */
+  if (!msg || !*msg)
+    {
+      static char const fmt[] = "Unknown error %d";
+      verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+      sprintf (buf, fmt, n);
+      errno = EINVAL;
+      return buf;
+    }
 
-    return result;
-  }
-}
+  /* Fix STACKBUF_LEN if this ever aborts.  */
+  len = strlen (msg);
+  if (sizeof buf <= len)
+    abort ();
 
-#endif
+  return memcpy (buf, msg, len + 1);
+}
diff --git a/gl/string.in.h b/gl/string.in.h
index 76d26ed..d9c95a4 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STRING_H
+#ifndef address@hidden@_STRING_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STRING_H@
 
-#ifndef _GL_STRING_H
-#define _GL_STRING_H
+#ifndef address@hidden@_STRING_H
+#define address@hidden@_STRING_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -736,9 +736,9 @@ _GL_CXXALIASWARN (mbschr);
    and return a pointer to it.  Return NULL if C is not found in STRING.
    Unlike strrchr(), this function works correctly in multibyte locales with
    encodings such as GB18030.  */
-# if defined __hpux
+# if defined __hpux || defined __INTERIX
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+#   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
 #  endif
 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
                                    _GL_ARG_NONNULL ((1)));
@@ -977,5 +977,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
 #endif
 
 
-#endif /* _GL_STRING_H */
-#endif /* _GL_STRING_H */
+#endif /* address@hidden@_STRING_H */
+#endif /* address@hidden@_STRING_H */
diff --git a/gl/sys_select.in.h b/gl/sys_select.in.h
index edff386..1522db9 100644
--- a/gl/sys_select.in.h
+++ b/gl/sys_select.in.h
@@ -34,7 +34,7 @@
 
 #else
 
-#ifndef _GL_SYS_SELECT_H
+#ifndef address@hidden@_SYS_SELECT_H
 
 #if @HAVE_SYS_SELECT_H@
 
@@ -51,10 +51,10 @@
 #  include <sys/time.h>
 # endif
 
-/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+/* On AIX 7 and Solaris 10, <sys/select.h> provides an FD_ZERO implementation
    that relies on memset(), but without including <string.h>.
    But in any case avoid namespace pollution on glibc systems.  */
-# if (defined __OpenBSD__ || defined __sun || defined __osf__ || defined 
__BEOS__) \
+# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ 
|| defined __BEOS__) \
      && ! defined __GLIBC__
 #  include <string.h>
 # endif
@@ -64,8 +64,8 @@
 
 #endif
 
-#ifndef _GL_SYS_SELECT_H
-#define _GL_SYS_SELECT_H
+#ifndef address@hidden@_SYS_SELECT_H
+#define address@hidden@_SYS_SELECT_H
 
 #if address@hidden@
 /* A platform that lacks <sys/select.h>.  */
@@ -89,7 +89,7 @@
 
 
 #if @GNULIB_SELECT@
-# if @HAVE_WINSOCK2_H@ || @REPLACE_SELECT@
+# if @REPLACE_SELECT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef select
 #   define select rpl_select
@@ -115,6 +115,6 @@ _GL_WARN_ON_USE (select, "select is not always POSIX 
compliant - "
 #endif
 
 
-#endif /* _GL_SYS_SELECT_H */
-#endif /* _GL_SYS_SELECT_H */
+#endif /* address@hidden@_SYS_SELECT_H */
+#endif /* address@hidden@_SYS_SELECT_H */
 #endif /* OSF/1 */
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 2e6af68..b792171 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -40,7 +40,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_SYS_SOCKET_H
+#ifndef address@hidden@_SYS_SOCKET_H
 
 #if @HAVE_SYS_SOCKET_H@
 
@@ -61,8 +61,8 @@
 
 #endif
 
-#ifndef _GL_SYS_SOCKET_H
-#define _GL_SYS_SOCKET_H
+#ifndef address@hidden@_SYS_SOCKET_H
+#define address@hidden@_SYS_SOCKET_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -224,7 +224,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 
 /* Wrap everything else to use libc file descriptors for sockets.  */
 
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
+#if @HAVE_WINSOCK2_H@ && !defined address@hidden@_UNISTD_H
 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #  undef close
 #  define close close_used_without_including_unistd_h
@@ -234,7 +234,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 # endif
 #endif
 
-#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
+#if @HAVE_WINSOCK2_H@ && !defined address@hidden@_UNISTD_H
 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #  undef gethostname
 #  define gethostname gethostname_used_without_including_unistd_h
@@ -676,6 +676,6 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
 # endif
 #endif
 
-#endif /* _GL_SYS_SOCKET_H */
-#endif /* _GL_SYS_SOCKET_H */
+#endif /* address@hidden@_SYS_SOCKET_H */
+#endif /* address@hidden@_SYS_SOCKET_H */
 #endif
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index d4319d2..e615058 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -23,7 +23,7 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined _GL_SYS_TIME_H
+#if defined address@hidden@_SYS_TIME_H
 
 /* Simply delegate to the system's header, without adding anything.  */
 # if @HAVE_SYS_TIME_H@
@@ -32,7 +32,7 @@
 
 #else
 
-# define _GL_SYS_TIME_H
+# define address@hidden@_SYS_TIME_H
 
 # if @HAVE_SYS_TIME_H@
 #  @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
@@ -98,4 +98,4 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
 #  endif
 # endif
 
-#endif /* _GL_SYS_TIME_H */
+#endif /* address@hidden@_SYS_TIME_H */
diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h
index 5d43c33..de49090 100644
--- a/gl/sys_uio.in.h
+++ b/gl/sys_uio.in.h
@@ -20,7 +20,7 @@
 # endif
 @PRAGMA_COLUMNS@
 
-#ifndef _GL_SYS_UIO_H
+#ifndef address@hidden@_SYS_UIO_H
 
 #if @HAVE_SYS_UIO_H@
 
@@ -32,8 +32,8 @@
 
 #endif
 
-#ifndef _GL_SYS_UIO_H
-#define _GL_SYS_UIO_H
+#ifndef address@hidden@_SYS_UIO_H
+#define address@hidden@_SYS_UIO_H
 
 #if address@hidden@
 /* A platform that lacks <sys/uio.h>.  */
@@ -60,5 +60,5 @@ struct iovec {
 
 #endif
 
-#endif /* _GL_SYS_UIO_H */
-#endif /* _GL_SYS_UIO_H */
+#endif /* address@hidden@_SYS_UIO_H */
+#endif /* address@hidden@_SYS_UIO_H */
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 3b58d0f..fdf0fca 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -36,7 +36,7 @@
 # define _GL_WINSOCK2_H_WITNESS
 
 /* Normal invocation.  */
-#elif !defined _GL_UNISTD_H
+#elif !defined address@hidden@_UNISTD_H
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
@@ -51,8 +51,8 @@
 # undef _GL_INCLUDING_WINSOCK2_H
 #endif
 
-#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-#define _GL_UNISTD_H
+#if !defined address@hidden@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define address@hidden@_UNISTD_H
 
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
 #include <stddef.h>
@@ -120,7 +120,7 @@
 #if @GNULIB_GETHOSTNAME@
 /* Get all possible declarations of gethostname().  */
 # if @UNISTD_H_HAVE_WINSOCK2_H@
-#  if !defined _GL_SYS_SOCKET_H
+#  if !defined address@hidden@_SYS_SOCKET_H
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef socket
 #    define socket              socket_used_without_including_sys_socket_h
@@ -181,7 +181,7 @@
                       "shutdown() used without including <sys/socket.h>");
 #   endif
 #  endif
-#  if !defined _GL_SYS_SELECT_H
+#  if !defined address@hidden@_SYS_SELECT_H
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef select
 #    define select              select_used_without_including_sys_select_h
@@ -871,6 +871,22 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable 
- "
 #endif
 
 
+#if @GNULIB_GROUP_MEMBER@
+/* Determine whether group id is in calling user's group list.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
+# endif
+_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
+_GL_CXXALIASWARN (group_member);
+#elif defined GNULIB_POSIXCHECK
+# undef group_member
+# if HAVE_RAW_DECL_GROUP_MEMBER
+_GL_WARN_ON_USE (group_member, "group_member is unportable - "
+                 "use gnulib module group-member for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHOWN@
 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
    to GID (if GID is not -1).  Do not follow symbolic links.
@@ -1046,6 +1062,7 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
    specification <http://www.opengroup.org/susv3xsh/pread.html>.  */
 # if @REPLACE_PREAD@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pread
 #   define pread rpl_pread
 #  endif
 _GL_FUNCDECL_RPL (pread, ssize_t,
@@ -1080,6 +1097,7 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
    <http://www.opengroup.org/susv3xsh/pwrite.html>.  */
 # if @REPLACE_PWRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pwrite
 #   define pwrite rpl_pwrite
 #  endif
 _GL_FUNCDECL_RPL (pwrite, ssize_t,
@@ -1400,5 +1418,5 @@ _GL_CXXALIASWARN (write);
 #endif
 
 
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */
+#endif /* address@hidden@_UNISTD_H */
+#endif /* address@hidden@_UNISTD_H */
diff --git a/gl/unistr.in.h b/gl/unistr.in.h
new file mode 100644
index 0000000..0330cf8
--- /dev/null
+++ b/gl/unistr.in.h
@@ -0,0 +1,692 @@
+/* Elementary Unicode string functions.
+   Copyright (C) 2001-2002, 2005-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNISTR_H
+#define _UNISTR_H
+
+#include "unitypes.h"
+
+/* Get common macros for C.  */
+#include "unused-parameter.h"
+
+/* Get bool.  */
+#include <stdbool.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Conventions:
+
+   All functions prefixed with u8_ operate on UTF-8 encoded strings.
+   Their unit is an uint8_t (1 byte).
+
+   All functions prefixed with u16_ operate on UTF-16 encoded strings.
+   Their unit is an uint16_t (a 2-byte word).
+
+   All functions prefixed with u32_ operate on UCS-4 encoded strings.
+   Their unit is an uint32_t (a 4-byte word).
+
+   All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly
+   n units.
+
+   All arguments starting with "str" and the arguments of functions starting
+   with u8_str/u16_str/u32_str denote a NUL terminated string, i.e. a string
+   which terminates at the first NUL unit.  This termination unit is
+   considered part of the string for all memory allocation purposes, but
+   is not considered part of the string for all other logical purposes.
+
+   Functions returning a string result take a (resultbuf, lengthp) argument
+   pair.  If resultbuf is not NULL and the result fits into *lengthp units,
+   it is put in resultbuf, and resultbuf is returned.  Otherwise, a freshly
+   allocated string is returned.  In both cases, *lengthp is set to the
+   length (number of units) of the returned string.  In case of error,
+   NULL is returned and errno is set.  */
+
+
+/* Elementary string checks.  */
+
+/* Check whether an UTF-8 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint8_t *
+       u8_check (const uint8_t *s, size_t n);
+
+/* Check whether an UTF-16 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint16_t *
+       u16_check (const uint16_t *s, size_t n);
+
+/* Check whether an UCS-4 string is well-formed.
+   Return NULL if valid, or a pointer to the first invalid unit otherwise.  */
+extern const uint32_t *
+       u32_check (const uint32_t *s, size_t n);
+
+
+/* Elementary string conversions.  */
+
+/* Convert an UTF-8 string to an UTF-16 string.  */
+extern uint16_t *
+       u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-8 string to an UCS-4 string.  */
+extern uint32_t *
+       u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-16 string to an UTF-8 string.  */
+extern uint8_t *
+       u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UTF-16 string to an UCS-4 string.  */
+extern uint32_t *
+       u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf,
+                   size_t *lengthp);
+
+/* Convert an UCS-4 string to an UTF-8 string.  */
+extern uint8_t *
+       u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf,
+                  size_t *lengthp);
+
+/* Convert an UCS-4 string to an UTF-16 string.  */
+extern uint16_t *
+       u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf,
+                   size_t *lengthp);
+
+
+/* Elementary string functions.  */
+
+/* Return the length (number of units) of the first character in S, which is
+   no longer than N.  Return 0 if it is the NUL character.  Return -1 upon
+   failure.  */
+/* Similar to mblen(), except that s must not be NULL.  */
+extern int
+       u8_mblen (const uint8_t *s, size_t n);
+extern int
+       u16_mblen (const uint16_t *s, size_t n);
+extern int
+       u32_mblen (const uint32_t *s, size_t n);
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
+   and an appropriate number of units is returned.
+   The number of available units, N, must be > 0.  */
+/* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0,
+   and the NUL character is not treated specially.  */
+/* The variants with _safe suffix are safe, even if the library is compiled
+   without --enable-safety.  */
+
+#if GNULIB_UNISTR_U8_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n);
+# else
+extern int
+       u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+  uint8_t c = *s;
+
+  if (c < 0x80)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u8_mbtouc_unsafe_aux (puc, s, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U16_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n);
+# else
+extern int
+       u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+  uint16_t c = *s;
+
+  if (c < 0xd800 || c >= 0xe000)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u16_mbtouc_unsafe_aux (puc, s, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U32_MBTOUC_UNSAFE || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
+# else
+static inline int
+u32_mbtouc_unsafe (ucs4_t *puc,
+                   const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+{
+  uint32_t c = *s;
+
+#  if CONFIG_UNICODE_SAFETY
+  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
+#  endif
+    *puc = c;
+#  if CONFIG_UNICODE_SAFETY
+  else
+    /* invalid multibyte character */
+    *puc = 0xfffd;
+#  endif
+  return 1;
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U8_MBTOUC || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n);
+# else
+extern int
+       u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+  uint8_t c = *s;
+
+  if (c < 0x80)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u8_mbtouc_aux (puc, s, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U16_MBTOUC || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n);
+# else
+extern int
+       u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+  uint16_t c = *s;
+
+  if (c < 0xd800 || c >= 0xe000)
+    {
+      *puc = c;
+      return 1;
+    }
+  else
+    return u16_mbtouc_aux (puc, s, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U32_MBTOUC || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
+# else
+static inline int
+u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+{
+  uint32_t c = *s;
+
+  if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
+    *puc = c;
+  else
+    /* invalid multibyte character */
+    *puc = 0xfffd;
+  return 1;
+}
+# endif
+#endif
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Upon failure, *PUC is set to 0xfffd,
+   and -1 is returned for an invalid sequence of units, -2 is returned for an
+   incomplete sequence of units.
+   The number of available units, N, must be > 0.  */
+/* Similar to u*_mbtouc(), except that the return value gives more details
+   about the failure, similar to mbrtowc().  */
+
+#if GNULIB_UNISTR_U8_MBTOUCR || HAVE_LIBUNISTRING
+extern int
+       u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n);
+#endif
+
+#if GNULIB_UNISTR_U16_MBTOUCR || HAVE_LIBUNISTRING
+extern int
+       u16_mbtoucr (ucs4_t *puc, const uint16_t *s, size_t n);
+#endif
+
+#if GNULIB_UNISTR_U32_MBTOUCR || HAVE_LIBUNISTRING
+extern int
+       u32_mbtoucr (ucs4_t *puc, const uint32_t *s, size_t n);
+#endif
+
+/* Put the multibyte character represented by UC in S, returning its
+   length.  Return -1 upon failure, -2 if the number of available units, N,
+   is too small.  The latter case cannot occur if N >= 6/2/1, respectively.  */
+/* Similar to wctomb(), except that s must not be NULL, and the argument n
+   must be specified.  */
+
+#if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING
+/* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr.  */
+extern int
+       u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
+# if !HAVE_INLINE
+extern int
+       u8_uctomb (uint8_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0x80 && n > 0)
+    {
+      s[0] = uc;
+      return 1;
+    }
+  else
+    return u8_uctomb_aux (s, uc, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING
+/* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr.  */
+extern int
+       u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
+# if !HAVE_INLINE
+extern int
+       u16_uctomb (uint16_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u16_uctomb (uint16_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0xd800 && n > 0)
+    {
+      s[0] = uc;
+      return 1;
+    }
+  else
+    return u16_uctomb_aux (s, uc, n);
+}
+# endif
+#endif
+
+#if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING
+# if !HAVE_INLINE
+extern int
+       u32_uctomb (uint32_t *s, ucs4_t uc, int n);
+# else
+static inline int
+u32_uctomb (uint32_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000))
+    {
+      if (n > 0)
+        {
+          *s = uc;
+          return 1;
+        }
+      else
+        return -2;
+    }
+  else
+    return -1;
+}
+# endif
+#endif
+
+/* Copy N units from SRC to DEST.  */
+/* Similar to memcpy().  */
+extern uint8_t *
+       u8_cpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_cpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_cpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Copy N units from SRC to DEST, guaranteeing correct behavior for
+   overlapping memory areas.  */
+/* Similar to memmove().  */
+extern uint8_t *
+       u8_move (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_move (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_move (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Set the first N characters of S to UC.  UC should be a character that
+   occupies only 1 unit.  */
+/* Similar to memset().  */
+extern uint8_t *
+       u8_set (uint8_t *s, ucs4_t uc, size_t n);
+extern uint16_t *
+       u16_set (uint16_t *s, ucs4_t uc, size_t n);
+extern uint32_t *
+       u32_set (uint32_t *s, ucs4_t uc, size_t n);
+
+/* Compare S1 and S2, each of length N.  */
+/* Similar to memcmp().  */
+extern int
+       u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+extern int
+       u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+extern int
+       u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+
+/* Compare S1 and S2.  */
+/* Similar to the gnulib function memcmp2().  */
+extern int
+       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2);
+extern int
+       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2);
+extern int
+       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2);
+
+/* Search the string at S for UC.  */
+/* Similar to memchr().  */
+extern uint8_t *
+       u8_chr (const uint8_t *s, size_t n, ucs4_t uc);
+extern uint16_t *
+       u16_chr (const uint16_t *s, size_t n, ucs4_t uc);
+extern uint32_t *
+       u32_chr (const uint32_t *s, size_t n, ucs4_t uc);
+
+/* Count the number of Unicode characters in the N units from S.  */
+/* Similar to mbsnlen().  */
+extern size_t
+       u8_mbsnlen (const uint8_t *s, size_t n);
+extern size_t
+       u16_mbsnlen (const uint16_t *s, size_t n);
+extern size_t
+       u32_mbsnlen (const uint32_t *s, size_t n);
+
+/* Elementary string functions with memory allocation.  */
+
+/* Make a freshly allocated copy of S, of length N.  */
+extern uint8_t *
+       u8_cpy_alloc (const uint8_t *s, size_t n);
+extern uint16_t *
+       u16_cpy_alloc (const uint16_t *s, size_t n);
+extern uint32_t *
+       u32_cpy_alloc (const uint32_t *s, size_t n);
+
+/* Elementary string functions on NUL terminated strings.  */
+
+/* Return the length (number of units) of the first character in S.
+   Return 0 if it is the NUL character.  Return -1 upon failure.  */
+extern int
+       u8_strmblen (const uint8_t *s);
+extern int
+       u16_strmblen (const uint16_t *s);
+extern int
+       u32_strmblen (const uint32_t *s);
+
+/* Return the length (number of units) of the first character in S, putting
+   its 'ucs4_t' representation in *PUC.  Return 0 if it is the NUL
+   character.  Return -1 upon failure.  */
+extern int
+       u8_strmbtouc (ucs4_t *puc, const uint8_t *s);
+extern int
+       u16_strmbtouc (ucs4_t *puc, const uint16_t *s);
+extern int
+       u32_strmbtouc (ucs4_t *puc, const uint32_t *s);
+
+/* Forward iteration step.  Advances the pointer past the next character,
+   or returns NULL if the end of the string has been reached.  Puts the
+   character's 'ucs4_t' representation in *PUC.  */
+extern const uint8_t *
+       u8_next (ucs4_t *puc, const uint8_t *s);
+extern const uint16_t *
+       u16_next (ucs4_t *puc, const uint16_t *s);
+extern const uint32_t *
+       u32_next (ucs4_t *puc, const uint32_t *s);
+
+/* Backward iteration step.  Advances the pointer to point to the previous
+   character, or returns NULL if the beginning of the string had been reached.
+   Puts the character's 'ucs4_t' representation in *PUC.  */
+extern const uint8_t *
+       u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start);
+extern const uint16_t *
+       u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start);
+extern const uint32_t *
+       u32_prev (ucs4_t *puc, const uint32_t *s, const uint32_t *start);
+
+/* Return the number of units in S.  */
+/* Similar to strlen(), wcslen().  */
+extern size_t
+       u8_strlen (const uint8_t *s);
+extern size_t
+       u16_strlen (const uint16_t *s);
+extern size_t
+       u32_strlen (const uint32_t *s);
+
+/* Return the number of units in S, but at most MAXLEN.  */
+/* Similar to strnlen(), wcsnlen().  */
+extern size_t
+       u8_strnlen (const uint8_t *s, size_t maxlen);
+extern size_t
+       u16_strnlen (const uint16_t *s, size_t maxlen);
+extern size_t
+       u32_strnlen (const uint32_t *s, size_t maxlen);
+
+/* Copy SRC to DEST.  */
+/* Similar to strcpy(), wcscpy().  */
+extern uint8_t *
+       u8_strcpy (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_strcpy (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_strcpy (uint32_t *dest, const uint32_t *src);
+
+/* Copy SRC to DEST, returning the address of the terminating NUL in DEST.  */
+/* Similar to stpcpy().  */
+extern uint8_t *
+       u8_stpcpy (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_stpcpy (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_stpcpy (uint32_t *dest, const uint32_t *src);
+
+/* Copy no more than N units of SRC to DEST.  */
+/* Similar to strncpy(), wcsncpy().  */
+extern uint8_t *
+       u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Copy no more than N units of SRC to DEST.  Return a pointer past the last
+   non-NUL unit written into DEST.  */
+/* Similar to stpncpy().  */
+extern uint8_t *
+       u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Append SRC onto DEST.  */
+/* Similar to strcat(), wcscat().  */
+extern uint8_t *
+       u8_strcat (uint8_t *dest, const uint8_t *src);
+extern uint16_t *
+       u16_strcat (uint16_t *dest, const uint16_t *src);
+extern uint32_t *
+       u32_strcat (uint32_t *dest, const uint32_t *src);
+
+/* Append no more than N units of SRC onto DEST.  */
+/* Similar to strncat(), wcsncat().  */
+extern uint8_t *
+       u8_strncat (uint8_t *dest, const uint8_t *src, size_t n);
+extern uint16_t *
+       u16_strncat (uint16_t *dest, const uint16_t *src, size_t n);
+extern uint32_t *
+       u32_strncat (uint32_t *dest, const uint32_t *src, size_t n);
+
+/* Compare S1 and S2.  */
+/* Similar to strcmp(), wcscmp().  */
+#ifdef __sun
+/* Avoid a collision with the u8_strcmp() function in Solaris 11 libc.  */
+extern int
+       u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2);
+# define u8_strcmp u8_strcmp_gnu
+#else
+extern int
+       u8_strcmp (const uint8_t *s1, const uint8_t *s2);
+#endif
+extern int
+       u16_strcmp (const uint16_t *s1, const uint16_t *s2);
+extern int
+       u32_strcmp (const uint32_t *s1, const uint32_t *s2);
+
+/* Compare S1 and S2 using the collation rules of the current locale.
+   Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2.
+   Upon failure, set errno and return any value.  */
+/* Similar to strcoll(), wcscoll().  */
+extern int
+       u8_strcoll (const uint8_t *s1, const uint8_t *s2);
+extern int
+       u16_strcoll (const uint16_t *s1, const uint16_t *s2);
+extern int
+       u32_strcoll (const uint32_t *s1, const uint32_t *s2);
+
+/* Compare no more than N units of S1 and S2.  */
+/* Similar to strncmp(), wcsncmp().  */
+extern int
+       u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n);
+extern int
+       u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n);
+extern int
+       u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+
+/* Duplicate S, returning an identical malloc'd string.  */
+/* Similar to strdup(), wcsdup().  */
+extern uint8_t *
+       u8_strdup (const uint8_t *s);
+extern uint16_t *
+       u16_strdup (const uint16_t *s);
+extern uint32_t *
+       u32_strdup (const uint32_t *s);
+
+/* Find the first occurrence of UC in STR.  */
+/* Similar to strchr(), wcschr().  */
+extern uint8_t *
+       u8_strchr (const uint8_t *str, ucs4_t uc);
+extern uint16_t *
+       u16_strchr (const uint16_t *str, ucs4_t uc);
+extern uint32_t *
+       u32_strchr (const uint32_t *str, ucs4_t uc);
+
+/* Find the last occurrence of UC in STR.  */
+/* Similar to strrchr(), wcsrchr().  */
+extern uint8_t *
+       u8_strrchr (const uint8_t *str, ucs4_t uc);
+extern uint16_t *
+       u16_strrchr (const uint16_t *str, ucs4_t uc);
+extern uint32_t *
+       u32_strrchr (const uint32_t *str, ucs4_t uc);
+
+/* Return the length of the initial segment of STR which consists entirely
+   of Unicode characters not in REJECT.  */
+/* Similar to strcspn(), wcscspn().  */
+extern size_t
+       u8_strcspn (const uint8_t *str, const uint8_t *reject);
+extern size_t
+       u16_strcspn (const uint16_t *str, const uint16_t *reject);
+extern size_t
+       u32_strcspn (const uint32_t *str, const uint32_t *reject);
+
+/* Return the length of the initial segment of STR which consists entirely
+   of Unicode characters in ACCEPT.  */
+/* Similar to strspn(), wcsspn().  */
+extern size_t
+       u8_strspn (const uint8_t *str, const uint8_t *accept);
+extern size_t
+       u16_strspn (const uint16_t *str, const uint16_t *accept);
+extern size_t
+       u32_strspn (const uint32_t *str, const uint32_t *accept);
+
+/* Find the first occurrence in STR of any character in ACCEPT.  */
+/* Similar to strpbrk(), wcspbrk().  */
+extern uint8_t *
+       u8_strpbrk (const uint8_t *str, const uint8_t *accept);
+extern uint16_t *
+       u16_strpbrk (const uint16_t *str, const uint16_t *accept);
+extern uint32_t *
+       u32_strpbrk (const uint32_t *str, const uint32_t *accept);
+
+/* Find the first occurrence of NEEDLE in HAYSTACK.  */
+/* Similar to strstr(), wcsstr().  */
+extern uint8_t *
+       u8_strstr (const uint8_t *haystack, const uint8_t *needle);
+extern uint16_t *
+       u16_strstr (const uint16_t *haystack, const uint16_t *needle);
+extern uint32_t *
+       u32_strstr (const uint32_t *haystack, const uint32_t *needle);
+
+/* Test whether STR starts with PREFIX.  */
+extern bool
+       u8_startswith (const uint8_t *str, const uint8_t *prefix);
+extern bool
+       u16_startswith (const uint16_t *str, const uint16_t *prefix);
+extern bool
+       u32_startswith (const uint32_t *str, const uint32_t *prefix);
+
+/* Test whether STR ends with SUFFIX.  */
+extern bool
+       u8_endswith (const uint8_t *str, const uint8_t *suffix);
+extern bool
+       u16_endswith (const uint16_t *str, const uint16_t *suffix);
+extern bool
+       u32_endswith (const uint32_t *str, const uint32_t *suffix);
+
+/* Divide STR into tokens separated by characters in DELIM.
+   This interface is actually more similar to wcstok than to strtok.  */
+/* Similar to strtok_r(), wcstok().  */
+extern uint8_t *
+       u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr);
+extern uint16_t *
+       u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr);
+extern uint32_t *
+       u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UNISTR_H */
diff --git a/gl/unistr/u8-mbtoucr.c b/gl/unistr/u8-mbtoucr.c
new file mode 100644
index 0000000..f658d67
--- /dev/null
+++ b/gl/unistr/u8-mbtoucr.c
@@ -0,0 +1,285 @@
+/* Look at first character in UTF-8 string, returning an error code.
+   Copyright (C) 1999-2002, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2001.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unistr.h"
+
+int
+u8_mbtoucr (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+  uint8_t c = *s;
+
+  if (c < 0x80)
+    {
+      *puc = c;
+      return 1;
+    }
+  else if (c >= 0xc2)
+    {
+      if (c < 0xe0)
+        {
+          if (n >= 2)
+            {
+              if ((s[1] ^ 0x80) < 0x40)
+                {
+                  *puc = ((unsigned int) (c & 0x1f) << 6)
+                         | (unsigned int) (s[1] ^ 0x80);
+                  return 2;
+                }
+              /* invalid multibyte character */
+            }
+          else
+            {
+              /* incomplete multibyte character */
+              *puc = 0xfffd;
+              return -2;
+            }
+        }
+      else if (c < 0xf0)
+        {
+          if (n >= 2)
+            {
+              if ((s[1] ^ 0x80) < 0x40
+                  && (c >= 0xe1 || s[1] >= 0xa0)
+                  && (c != 0xed || s[1] < 0xa0))
+                {
+                  if (n >= 3)
+                    {
+                      if ((s[2] ^ 0x80) < 0x40)
+                        {
+                          *puc = ((unsigned int) (c & 0x0f) << 12)
+                                 | ((unsigned int) (s[1] ^ 0x80) << 6)
+                                 | (unsigned int) (s[2] ^ 0x80);
+                          return 3;
+                        }
+                      /* invalid multibyte character */
+                    }
+                  else
+                    {
+                      /* incomplete multibyte character */
+                      *puc = 0xfffd;
+                      return -2;
+                    }
+                }
+              /* invalid multibyte character */
+            }
+          else
+            {
+              /* incomplete multibyte character */
+              *puc = 0xfffd;
+              return -2;
+            }
+        }
+      else if (c < 0xf8)
+        {
+          if (n >= 2)
+            {
+              if ((s[1] ^ 0x80) < 0x40
+                  && (c >= 0xf1 || s[1] >= 0x90)
+#if 1
+                  && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))
+#endif
+                 )
+                {
+                  if (n >= 3)
+                    {
+                      if ((s[2] ^ 0x80) < 0x40)
+                        {
+                          if (n >= 4)
+                            {
+                              if ((s[3] ^ 0x80) < 0x40)
+                                {
+                                  *puc = ((unsigned int) (c & 0x07) << 18)
+                                         | ((unsigned int) (s[1] ^ 0x80) << 12)
+                                         | ((unsigned int) (s[2] ^ 0x80) << 6)
+                                         | (unsigned int) (s[3] ^ 0x80);
+                                  return 4;
+                                }
+                              /* invalid multibyte character */
+                            }
+                          else
+                            {
+                              /* incomplete multibyte character */
+                              *puc = 0xfffd;
+                              return -2;
+                            }
+                        }
+                      /* invalid multibyte character */
+                    }
+                  else
+                    {
+                      /* incomplete multibyte character */
+                      *puc = 0xfffd;
+                      return -2;
+                    }
+                }
+              /* invalid multibyte character */
+            }
+          else
+            {
+              /* incomplete multibyte character */
+              *puc = 0xfffd;
+              return -2;
+            }
+        }
+#if 0
+      else if (c < 0xfc)
+        {
+          if (n >= 2)
+            {
+              if ((s[1] ^ 0x80) < 0x40
+                  && (c >= 0xf9 || s[1] >= 0x88))
+                {
+                  if (n >= 3)
+                    {
+                      if ((s[2] ^ 0x80) < 0x40)
+                        {
+                          if (n >= 4)
+                            {
+                              if ((s[3] ^ 0x80) < 0x40)
+                                {
+                                  if (n >= 5)
+                                    {
+                                      if ((s[4] ^ 0x80) < 0x40)
+                                        {
+                                          *puc = ((unsigned int) (c & 0x03) << 
24)
+                                                 | ((unsigned int) (s[1] ^ 
0x80) << 18)
+                                                 | ((unsigned int) (s[2] ^ 
0x80) << 12)
+                                                 | ((unsigned int) (s[3] ^ 
0x80) << 6)
+                                                 | (unsigned int) (s[4] ^ 
0x80);
+                                          return 5;
+                                        }
+                                      /* invalid multibyte character */
+                                    }
+                                  else
+                                    {
+                                      /* incomplete multibyte character */
+                                      *puc = 0xfffd;
+                                      return -2;
+                                    }
+                                }
+                              /* invalid multibyte character */
+                            }
+                          else
+                            {
+                              /* incomplete multibyte character */
+                              *puc = 0xfffd;
+                              return -2;
+                            }
+                        }
+                      /* invalid multibyte character */
+                    }
+                  else
+                    {
+                      /* incomplete multibyte character */
+                      *puc = 0xfffd;
+                      return -2;
+                    }
+                }
+              /* invalid multibyte character */
+            }
+          else
+            {
+              /* incomplete multibyte character */
+              *puc = 0xfffd;
+              return -2;
+            }
+        }
+      else if (c < 0xfe)
+        {
+          if (n >= 2)
+            {
+              if ((s[1] ^ 0x80) < 0x40
+                  && (c >= 0xfd || s[1] >= 0x84))
+                {
+                  if (n >= 3)
+                    {
+                      if ((s[2] ^ 0x80) < 0x40)
+                        {
+                          if (n >= 4)
+                            {
+                              if ((s[3] ^ 0x80) < 0x40)
+                                {
+                                  if (n >= 5)
+                                    {
+                                      if ((s[4] ^ 0x80) < 0x40)
+                                        {
+                                          if (n >= 6)
+                                            {
+                                              if ((s[5] ^ 0x80) < 0x40)
+                                                {
+                                                  *puc = ((unsigned int) (c & 
0x01) << 30)
+                                                         | ((unsigned int) 
(s[1] ^ 0x80) << 24)
+                                                         | ((unsigned int) 
(s[2] ^ 0x80) << 18)
+                                                         | ((unsigned int) 
(s[3] ^ 0x80) << 12)
+                                                         | ((unsigned int) 
(s[4] ^ 0x80) << 6)
+                                                         | (unsigned int) 
(s[5] ^ 0x80);
+                                                  return 6;
+                                                }
+                                              /* invalid multibyte character */
+                                            }
+                                          else
+                                            {
+                                              /* incomplete multibyte 
character */
+                                              *puc = 0xfffd;
+                                              return -2;
+                                            }
+                                        }
+                                      /* invalid multibyte character */
+                                    }
+                                  else
+                                    {
+                                      /* incomplete multibyte character */
+                                      *puc = 0xfffd;
+                                      return -2;
+                                    }
+                                }
+                              /* invalid multibyte character */
+                            }
+                          else
+                            {
+                              /* incomplete multibyte character */
+                              *puc = 0xfffd;
+                              return -2;
+                            }
+                        }
+                      /* invalid multibyte character */
+                    }
+                  else
+                    {
+                      /* incomplete multibyte character */
+                      *puc = 0xfffd;
+                      return -2;
+                    }
+                }
+              /* invalid multibyte character */
+            }
+          else
+            {
+              /* incomplete multibyte character */
+              *puc = 0xfffd;
+              return -2;
+            }
+        }
+#endif
+    }
+  /* invalid multibyte character */
+  *puc = 0xfffd;
+  return -1;
+}
diff --git a/gl/unistr/u8-uctomb-aux.c b/gl/unistr/u8-uctomb-aux.c
new file mode 100644
index 0000000..cc9ed99
--- /dev/null
+++ b/gl/unistr/u8-uctomb-aux.c
@@ -0,0 +1,69 @@
+/* Conversion UCS-4 to UTF-8.
+   Copyright (C) 2002, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2002.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unistr.h"
+
+int
+u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n)
+{
+  int count;
+
+  if (uc < 0x80)
+    /* The case n >= 1 is already handled by the caller.  */
+    return -2;
+  else if (uc < 0x800)
+    count = 2;
+  else if (uc < 0x10000)
+    {
+      if (uc < 0xd800 || uc >= 0xe000)
+        count = 3;
+      else
+        return -1;
+    }
+#if 0
+  else if (uc < 0x200000)
+    count = 4;
+  else if (uc < 0x4000000)
+    count = 5;
+  else if (uc <= 0x7fffffff)
+    count = 6;
+#else
+  else if (uc < 0x110000)
+    count = 4;
+#endif
+  else
+    return -1;
+
+  if (n < count)
+    return -2;
+
+  switch (count) /* note: code falls through cases! */
+    {
+#if 0
+    case 6: s[5] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x4000000;
+    case 5: s[4] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x200000;
+#endif
+    case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000;
+    case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800;
+    case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0;
+  /*case 1:*/ s[0] = uc;
+    }
+  return count;
+}
diff --git a/gl/unistr/u8-uctomb.c b/gl/unistr/u8-uctomb.c
new file mode 100644
index 0000000..ba11dc8
--- /dev/null
+++ b/gl/unistr/u8-uctomb.c
@@ -0,0 +1,88 @@
+/* Store a character in UTF-8 string.
+   Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2002.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#if defined IN_LIBUNISTRING
+/* Tell unistr.h to declare u8_uctomb as 'extern', not 'static inline'.  */
+# include "unistring-notinline.h"
+#endif
+
+/* Specification.  */
+#include "unistr.h"
+
+#if !HAVE_INLINE
+
+int
+u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+{
+  if (uc < 0x80)
+    {
+      if (n > 0)
+        {
+          s[0] = uc;
+          return 1;
+        }
+      /* else return -2, below.  */
+    }
+  else
+    {
+      int count;
+
+      if (uc < 0x800)
+        count = 2;
+      else if (uc < 0x10000)
+        {
+          if (uc < 0xd800 || uc >= 0xe000)
+            count = 3;
+          else
+            return -1;
+        }
+#if 0
+      else if (uc < 0x200000)
+        count = 4;
+      else if (uc < 0x4000000)
+        count = 5;
+      else if (uc <= 0x7fffffff)
+        count = 6;
+#else
+      else if (uc < 0x110000)
+        count = 4;
+#endif
+      else
+        return -1;
+
+      if (n >= count)
+        {
+          switch (count) /* note: code falls through cases! */
+            {
+#if 0
+            case 6: s[5] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x4000000;
+            case 5: s[4] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x200000;
+#endif
+            case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000;
+            case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800;
+            case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0;
+          /*case 1:*/ s[0] = uc;
+            }
+          return count;
+        }
+    }
+  return -2;
+}
+
+#endif
diff --git a/gl/unitypes.in.h b/gl/unitypes.in.h
new file mode 100644
index 0000000..20cbf45
--- /dev/null
+++ b/gl/unitypes.in.h
@@ -0,0 +1,26 @@
+/* Elementary types for the GNU UniString library.
+   Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _UNITYPES_H
+#define _UNITYPES_H
+
+/* Get uint8_t, uint16_t, uint32_t.  */
+#include <stdint.h>
+
+/* Type representing a Unicode character.  */
+typedef uint32_t ucs4_t;
+
+#endif /* _UNITYPES_H */
diff --git a/gl/verify.h b/gl/verify.h
index 6bca43f..9a8caad 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -17,42 +17,37 @@
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 
-#ifndef VERIFY_H
-# define VERIFY_H 1
+#ifndef _GL_VERIFY_H
+# define _GL_VERIFY_H
 
-/* Define HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
+
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
    C1X draft N1548 section 6.7.10.  This is supported by GCC 4.6.0 and
    later, in C mode, and its use here generates easier-to-read diagnostics
    when verify (R) fails.
 
-   Define HAVE_STATIC_ASSERT to 1 if static_assert works as per the
-   C1X draft N1548 section 7.2 or the C++0X draft N3242 section 7.(4).
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
+   C++0X draft N3242 section 7.(4).
    This will likely be supported by future GCC versions, in C++ mode.
 
-   For now, use this only with GCC.  Eventually whether _Static_assert
-   and static_assert works should be determined by 'configure'.  */
+   Use this only with GCC.  If we were willing to slow 'configure'
+   down we could also use it with other compilers, but since this
+   affects only the quality of diagnostics, why bother?  */
 # if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined 
__cplusplus
-#  define HAVE__STATIC_ASSERT 1
+#  define _GL_HAVE__STATIC_ASSERT 1
 # endif
 /* The condition (99 < __GNUC__) is temporary, until we know about the
    first G++ release that supports static_assert.  */
 # if (99 < __GNUC__) && defined __cplusplus
-#  define HAVE_STATIC_ASSERT 1
+#  define _GL_HAVE_STATIC_ASSERT 1
 # endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
    assert (R), there is no run-time overhead.
 
-   There are two macros, since no single macro can be used in all
-   contexts in C.  verify_true (R) is for scalar contexts, including
-   integer constant expression contexts.  verify (R) is for declaration
-   contexts, e.g., the top level.
-
-   Symbols ending in "__" are private to this header.
-
    If _Static_assert works, verify (R) uses it directly.  Similarly,
-   verify_true (R) works by packaging a _Static_assert inside a struct
+   _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct
    that is an operand of sizeof.
 
    The code below uses several ideas for C++ compilers, and for C
@@ -64,7 +59,9 @@
      constant and nonnegative.
 
    * Next this expression W is wrapped in a type
-     struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+     struct _gl_verify_type {
+       unsigned int _gl_verify_error_if_negative: W;
+     }.
      If W is negative, this yields a compile-time error.  No compiler can
      deal with a bit-field of negative size.
 
@@ -78,7 +75,7 @@
 
        void function (int n) { verify (n < 0); }
 
-   * For the verify macro, the struct verify_type__ will need to
+   * For the verify macro, the struct _gl_verify_type will need to
      somehow be embedded into a declaration.  To be portable, this
      declaration must declare an object, a constant, a function, or a
      typedef name.  If the declared entity uses the type directly,
@@ -116,11 +113,11 @@
      Which of the following alternatives can be used?
 
        extern int dummy [sizeof (struct {...})];
-       extern int dummy [sizeof (struct verify_type__ {...})];
+       extern int dummy [sizeof (struct _gl_verify_type {...})];
        extern void dummy (int [sizeof (struct {...})]);
-       extern void dummy (int [sizeof (struct verify_type__ {...})]);
+       extern void dummy (int [sizeof (struct _gl_verify_type {...})]);
        extern int (*dummy (void)) [sizeof (struct {...})];
-       extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+       extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})];
 
      In the second and sixth case, the struct type is exported to the
      outer scope; two such declarations therefore collide.  GCC warns
@@ -159,44 +156,88 @@
    possible.  */
 # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
 
-/* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  */
+/* Verify requirement R at compile-time, as an integer constant expression
+   that returns 1.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.  */
+
+# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+    (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
 
 # ifdef __cplusplus
+#  if !GNULIB_defined_struct__gl_verify_type
 template <int w>
-  struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-#  define verify_true(R) \
-     (!!sizeof (verify_type__<(R) ? 1 : -1>))
-# elif HAVE__STATIC_ASSERT
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { \
-        _Static_assert (R, "verify_true (" #R ")"); \
-        int verify_dummy__; \
-       }))
-# elif HAVE_STATIC_ASSERT
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { \
-        static_assert (R, "verify_true (" #R ")"); \
-        int verify_dummy__; \
-       }))
+  struct _gl_verify_type {
+    unsigned int _gl_verify_error_if_negative: w;
+  };
+#   define GNULIB_defined_struct__gl_verify_type 1
+#  endif
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    _gl_verify_type<(R) ? 1 : -1>
+# elif defined _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct {                                   \
+       _Static_assert (R, DIAGNOSTIC);          \
+       int _gl_dummy;                          \
+     }
 # else
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
 # endif
 
 /* Verify requirement R at compile-time, as a declaration without a
-   trailing ';'.  */
+   trailing ';'.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.
+
+   Unfortunately, unlike C1X, this implementation must appear as an
+   ordinary declaration, and cannot appear inside struct { ... }.  */
 
-# if HAVE__STATIC_ASSERT
-#  define verify(R) _Static_assert (R, "verify (" #R ")")
-# elif HAVE_STATIC_ASSERT
-#  define verify(R) static_assert (R, "verify (" #R ")")
+# ifdef _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY _Static_assert
 # else
-#  define verify(R) \
-    extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+#  define _GL_VERIFY(R, DIAGNOSTIC)                                   \
+     extern int (*_GL_GENSYM (_gl_verify_function) (void))            \
+       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+# endif
+
+/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
+# ifdef _GL_STATIC_ASSERT_H
+#  if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+#   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+#  endif
+#  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+#   define static_assert _Static_assert /* Draft C1X requires this #define.  */
+#  endif
 # endif
 
+/* @assert.h omit start@  */
+
+/* Each of these macros verifies that its argument R is nonzero.  To
+   be portable, R should be an integer constant expression.  Unlike
+   assert (R), there is no run-time overhead.
+
+   There are two macros, since no single macro can be used in all
+   contexts in C.  verify_true (R) is for scalar contexts, including
+   integer constant expression contexts.  verify (R) is for declaration
+   contexts, e.g., the top level.  */
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+   Return 1.  This is equivalent to verify_expr (R, 1).
+
+   verify_true is obsolescent; please use verify_expr instead.  */
+
+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+
+/* Verify requirement R at compile-time.  Return the value of the
+   expression E.  */
+
+# define verify_expr(R, E) \
+    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+
+/* Verify requirement R at compile-time, as a declaration without a
+   trailing ';'.  */
+
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+/* @assert.h omit end@  */
+
 #endif
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index da55f6e..1401ae2 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -49,7 +49,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_WCHAR_H
+#ifndef address@hidden@_WCHAR_H
 
 #define _GL_ALREADY_INCLUDING_WCHAR_H
 
@@ -81,8 +81,8 @@
 
 #undef _GL_ALREADY_INCLUDING_WCHAR_H
 
-#ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
+#ifndef address@hidden@_WCHAR_H
+#define address@hidden@_WCHAR_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -989,6 +989,6 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
 #endif
 
 
-#endif /* _GL_WCHAR_H */
-#endif /* _GL_WCHAR_H */
+#endif /* address@hidden@_WCHAR_H */
+#endif /* address@hidden@_WCHAR_H */
 #endif
diff --git a/gl/wctype.in.h b/gl/wctype.in.h
index 65879aa..9997696 100644
--- a/gl/wctype.in.h
+++ b/gl/wctype.in.h
@@ -26,7 +26,7 @@
  * wctrans_t, and wctype_t are not yet implemented.
  */
 
-#ifndef _GL_WCTYPE_H
+#ifndef address@hidden@_WCTYPE_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -52,13 +52,26 @@
 # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
 #endif
 
-#ifndef _GL_WCTYPE_H
-#define _GL_WCTYPE_H
+#ifndef address@hidden@_WCTYPE_H
+#define address@hidden@_WCTYPE_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
+   #defines a number of identifiers in the application namespace.  Revert
+   these #defines.  */
+#ifdef __sun
+# undef multibyte
+# undef eucw1
+# undef eucw2
+# undef eucw3
+# undef scrw1
+# undef scrw2
+# undef scrw3
+#endif
+
 /* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
 #if address@hidden@ && !defined wint_t
 # define wint_t int
@@ -466,5 +479,5 @@ _GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
 #endif
 
 
-#endif /* _GL_WCTYPE_H */
-#endif /* _GL_WCTYPE_H */
+#endif /* address@hidden@_WCTYPE_H */
+#endif /* address@hidden@_WCTYPE_H */
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 8874cea..cf22d2a 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -232,6 +232,14 @@ EXTRA_DIST += test-errno.c
 
 ## end   gnulib module errno-tests
 
+## begin gnulib module fclose-tests
+
+TESTS += test-fclose
+check_PROGRAMS += test-fclose
+EXTRA_DIST += test-fclose.c
+
+## end   gnulib module fclose-tests
+
 ## begin gnulib module fcntl-h
 
 BUILT_SOURCES += fcntl.h
@@ -241,14 +249,15 @@ BUILT_SOURCES += fcntl.h
 fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
-             -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
-             -e 's|@''GNULIB_NONBLOCKING''@|$(GNULIB_NONBLOCKING)|g' \
-             -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
-             -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+             -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
+             -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
+             -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
              -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
              -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
              -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
@@ -283,6 +292,21 @@ EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c 
signature.h macros.h
 
 ## end   gnulib module fflush-tests
 
+## begin gnulib module float-tests
+
+TESTS += test-float
+check_PROGRAMS += test-float
+EXTRA_DIST += test-float.c macros.h
+
+## end   gnulib module float-tests
+
+## begin gnulib module fpucw
+
+
+EXTRA_DIST += fpucw.h
+
+## end   gnulib module fpucw
+
 ## begin gnulib module fpurge-tests
 
 TESTS += test-fpurge
@@ -301,6 +325,14 @@ EXTRA_DIST += test-freading.c macros.h
 
 ## end   gnulib module freading-tests
 
+## begin gnulib module fseek-tests
+
+TESTS += test-fseek.sh test-fseek2.sh
+check_PROGRAMS += test-fseek
+EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h
+
+## end   gnulib module fseek-tests
+
 ## begin gnulib module fseeko-tests
 
 TESTS += test-fseeko.sh test-fseeko2.sh
@@ -309,15 +341,6 @@ EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh 
signature.h macros.h
 
 ## end   gnulib module fseeko-tests
 
-## begin gnulib module ftell
-
-
-EXTRA_DIST += ftell.c
-
-EXTRA_libtests_a_SOURCES += ftell.c
-
-## end   gnulib module ftell
-
 ## begin gnulib module ftell-tests
 
 TESTS += test-ftell.sh test-ftell2.sh test-ftell3
@@ -345,6 +368,23 @@ EXTRA_DIST += signature.h test-getaddrinfo.c
 
 ## end   gnulib module getaddrinfo-tests
 
+## begin gnulib module getcwd-lgpl
+
+
+EXTRA_DIST += getcwd-lgpl.c
+
+EXTRA_libtests_a_SOURCES += getcwd-lgpl.c
+
+## end   gnulib module getcwd-lgpl
+
+## begin gnulib module getcwd-lgpl-tests
+
+TESTS += test-getcwd-lgpl
+check_PROGRAMS += test-getcwd-lgpl
+EXTRA_DIST += test-getcwd-lgpl.c signature.h macros.h
+
+## end   gnulib module getcwd-lgpl-tests
+
 ## begin gnulib module getdelim-tests
 
 TESTS += test-getdelim
@@ -419,7 +459,8 @@ EXTRA_DIST += test-iconv.c signature.h macros.h
 
 ## begin gnulib module ignore-value
 
-libtests_a_SOURCES += ignore-value.h
+
+EXTRA_DIST += ignore-value.h
 
 ## end   gnulib module ignore-value
 
@@ -458,6 +499,64 @@ EXTRA_DIST += test-inet_pton.c signature.h macros.h
 
 ## end   gnulib module inet_pton-tests
 
+## begin gnulib module intprops-tests
+
+TESTS += test-intprops
+check_PROGRAMS += test-intprops
+EXTRA_DIST += test-intprops.c macros.h
+
+## end   gnulib module intprops-tests
+
+## begin gnulib module inttypes-incomplete
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -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|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 
's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+             -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+             -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+             -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' 
\
+             -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+             -e 
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+             -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' 
\
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/inttypes.in.h; \
+       } > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+EXTRA_DIST += inttypes.in.h
+
+## end   gnulib module inttypes-incomplete
+
+## begin gnulib module inttypes-tests
+
+TESTS += test-inttypes
+check_PROGRAMS += test-inttypes
+EXTRA_DIST += test-inttypes.c
+
+## end   gnulib module inttypes-tests
+
 ## begin gnulib module ioctl
 
 
@@ -485,12 +584,13 @@ BUILT_SOURCES += locale.h
 locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
-             -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \
-             -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
+             -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+             -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
              -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
              -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
              -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
@@ -527,7 +627,7 @@ EXTRA_DIST += localename.h
 
 TESTS += test-localename
 check_PROGRAMS += test-localename
-test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
 
 EXTRA_DIST += test-localename.c macros.h
 
@@ -667,13 +767,6 @@ EXTRA_DIST += test-open.h test-open.c signature.h macros.h
 
 ## end   gnulib module open-tests
 
-## begin gnulib module pathmax
-
-
-EXTRA_DIST += pathmax.h
-
-## end   gnulib module pathmax
-
 ## begin gnulib module perror
 
 
@@ -685,9 +778,9 @@ EXTRA_libtests_a_SOURCES += perror.c
 
 ## begin gnulib module perror-tests
 
-TESTS += test-perror.sh
-check_PROGRAMS += test-perror
-EXTRA_DIST += signature.h test-perror.c test-perror.sh
+TESTS += test-perror.sh test-perror2
+check_PROGRAMS += test-perror test-perror2
+EXTRA_DIST += init.sh macros.h signature.h test-perror.c test-perror2.c 
test-perror.sh
 
 ## end   gnulib module perror-tests
 
@@ -893,6 +986,23 @@ EXTRA_DIST += test-strerror.c signature.h macros.h
 
 ## end   gnulib module strerror-tests
 
+## begin gnulib module strerror_r-posix
+
+
+EXTRA_DIST += strerror_r.c
+
+EXTRA_libtests_a_SOURCES += strerror_r.c
+
+## end   gnulib module strerror_r-posix
+
+## begin gnulib module strerror_r-posix-tests
+
+TESTS += test-strerror_r
+check_PROGRAMS += test-strerror_r
+EXTRA_DIST += test-strerror_r.c signature.h macros.h
+
+## end   gnulib module strerror_r-posix-tests
+
 ## begin gnulib module striconv-tests
 
 TESTS += test-striconv
@@ -938,12 +1048,13 @@ sys/ioctl.h: sys_ioctl.in.h 
$(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \
              -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|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
-             -e 's|@''GNULIB_IOCTL''@|$(GNULIB_IOCTL)|g' \
+             -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
              -e 
's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
              -e 
's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g'
 \
              -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
@@ -993,22 +1104,23 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNU
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-             -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
-             -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
-             -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
-             -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
-             -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
-             -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
-             -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
-             -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
-             -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
-             -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
-             -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
-             -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+             -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+             -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+             -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+             -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+             -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+             -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+             -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+             -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+             -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+             -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+             -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+             -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
              -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
              -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
              -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@@ -1089,15 +1201,16 @@ BUILT_SOURCES += time.h
 time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-             -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
-             -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
-             -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
-             -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
-             -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
@@ -1137,6 +1250,26 @@ EXTRA_DIST += test-unistd.c
 
 ## end   gnulib module unistd-tests
 
+## begin gnulib module unistr/u8-mbtoucr-tests
+
+TESTS += test-u8-mbtoucr
+check_PROGRAMS += test-u8-mbtoucr
+test_u8_mbtoucr_SOURCES = unistr/test-u8-mbtoucr.c
+test_u8_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
+EXTRA_DIST += unistr/test-u8-mbtoucr.c macros.h
+
+## end   gnulib module unistr/u8-mbtoucr-tests
+
+## begin gnulib module unistr/u8-uctomb-tests
+
+TESTS += test-u8-uctomb
+check_PROGRAMS += test-u8-uctomb
+test_u8_uctomb_SOURCES = unistr/test-u8-uctomb.c
+test_u8_uctomb_LDADD = $(LDADD) $(LIBUNISTRING)
+EXTRA_DIST += unistr/test-u8-uctomb.c macros.h
+
+## end   gnulib module unistr/u8-uctomb-tests
+
 ## begin gnulib module unsetenv
 
 
@@ -1154,6 +1287,31 @@ EXTRA_DIST += test-unsetenv.c signature.h macros.h
 
 ## end   gnulib module unsetenv-tests
 
+## begin gnulib module unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/lib/build-aux/unused-parameter.h
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+         < $(top_srcdir)/lib/build-aux/unused-parameter.h \
+         > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/lib/build-aux/unused-parameter.h
+
+## end   gnulib module unused-parameter
+
 ## begin gnulib module vasnprintf-tests
 
 TESTS += test-vasnprintf
diff --git a/gltests/fcntl.in.h b/gltests/fcntl.in.h
index ce7c8c0..0a07221 100644
--- a/gltests/fcntl.in.h
+++ b/gltests/fcntl.in.h
@@ -40,7 +40,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_FCNTL_H
+#ifndef address@hidden@_FCNTL_H
 
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
@@ -55,8 +55,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_FCNTL_H@
 
-#ifndef _GL_FCNTL_H
-#define _GL_FCNTL_H
+#ifndef address@hidden@_FCNTL_H
+#define address@hidden@_FCNTL_H
 
 #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
 # include <unistd.h>
@@ -320,6 +320,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
 #endif
 
 
-#endif /* _GL_FCNTL_H */
-#endif /* _GL_FCNTL_H */
+#endif /* address@hidden@_FCNTL_H */
+#endif /* address@hidden@_FCNTL_H */
 #endif
diff --git a/gltests/fpucw.h b/gltests/fpucw.h
new file mode 100644
index 0000000..07403bf
--- /dev/null
+++ b/gltests/fpucw.h
@@ -0,0 +1,107 @@
+/* Manipulating the FPU control word.
+   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2007.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _FPUCW_H
+#define _FPUCW_H
+
+/* The i386 floating point hardware (the 387 compatible FPU, not the modern
+   SSE/SSE2 hardware) has a controllable rounding precision.  It is specified
+   through the 'PC' bits in the FPU control word ('fctrl' register).  (See
+   the GNU libc i386 <fpu_control.h> header for details.)
+
+   On some platforms, such as Linux or Solaris, the default precision setting
+   is set to "extended precision".  This means that 'long double' instructions
+   operate correctly, but 'double' computations often produce slightly
+   different results as on strictly IEEE 754 conforming systems.
+
+   On some platforms, such as NetBSD, the default precision is set to
+   "double precision".  This means that 'long double' instructions will operate
+   only as 'double', i.e. lead wrong results.
+
+   The FPU control word is under control of the application, i.e. it is
+   not required to be set either way by the ABI.  (In fact, the i386 ABI
+   http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38
+   is not clear about it.  But in any case, gcc treats the control word
+   like a "preserved" register: it emits code that assumes that the control
+   word is preserved across calls, and it restores the control word at the
+   end of functions that modify it.)
+
+   See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html
+   for a good explanation.
+   See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for
+   some argumentation which setting should be the default.  */
+
+/* This header file provides the following facilities:
+     fpucw_t                        integral type holding the value of 'fctrl'
+     FPU_PC_MASK                    bit mask denoting the precision control
+     FPU_PC_DOUBLE                  precision control for 53 bits mantissa
+     FPU_PC_EXTENDED                precision control for 64 bits mantissa
+     GET_FPUCW ()                   yields the current FPU control word
+     SET_FPUCW (word)               sets the FPU control word
+     DECL_LONG_DOUBLE_ROUNDING      variable declaration for
+                                    BEGIN/END_LONG_DOUBLE_ROUNDING
+     BEGIN_LONG_DOUBLE_ROUNDING ()  starts a sequence of instructions with
+                                    'long double' safe operation precision
+     END_LONG_DOUBLE_ROUNDING ()    ends a sequence of instructions with
+                                    'long double' safe operation precision
+ */
+
+/* Inline assembler like this works only with GNU C.  */
+#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+
+typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
+
+# define FPU_PC_MASK 0x0300
+# define FPU_PC_DOUBLE 0x200    /* glibc calls this _FPU_DOUBLE */
+# define FPU_PC_EXTENDED 0x300  /* glibc calls this _FPU_EXTENDED */
+
+# define GET_FPUCW() \
+  ({ fpucw_t _cw;                                               \
+     __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw));         \
+     _cw;                                                       \
+   })
+# define SET_FPUCW(word) \
+  (void)({ fpucw_t _ncw = (word);                               \
+           __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw));  \
+         })
+
+# define DECL_LONG_DOUBLE_ROUNDING \
+  fpucw_t oldcw;
+# define BEGIN_LONG_DOUBLE_ROUNDING() \
+  (void)(oldcw = GET_FPUCW (),                                  \
+         SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED))
+# define END_LONG_DOUBLE_ROUNDING() \
+  SET_FPUCW (oldcw)
+
+#else
+
+typedef unsigned int fpucw_t;
+
+# define FPU_PC_MASK 0
+# define FPU_PC_DOUBLE 0
+# define FPU_PC_EXTENDED 0
+
+# define GET_FPUCW() 0
+# define SET_FPUCW(word) (void)(word)
+
+# define DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_LONG_DOUBLE_ROUNDING()
+# define END_LONG_DOUBLE_ROUNDING()
+
+#endif
+
+#endif /* _FPUCW_H */
diff --git a/gltests/getcwd-lgpl.c b/gltests/getcwd-lgpl.c
new file mode 100644
index 0000000..2761422
--- /dev/null
+++ b/gltests/getcwd-lgpl.c
@@ -0,0 +1,125 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+   This file is part of gnulib.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+
+#if GNULIB_GETCWD
+/* Favor GPL getcwd.c if both getcwd and getcwd-lgpl modules are in use.  */
+typedef int dummy;
+#else
+
+/* Get the name of the current working directory, and put it in SIZE
+   bytes of BUF.  Returns NULL if the directory couldn't be determined
+   (perhaps because the absolute name was longer than PATH_MAX, or
+   because of missing read/search permissions on parent directories)
+   or SIZE was too small.  If successful, returns BUF.  If BUF is
+   NULL, an array is allocated with `malloc'; the array is SIZE bytes
+   long, unless SIZE == 0, in which case it is as big as
+   necessary.  */
+
+# undef getcwd
+char *
+rpl_getcwd (char *buf, size_t size)
+{
+  char *ptr;
+  char *result;
+
+  /* Handle single size operations.  */
+  if (buf)
+    {
+      if (!size)
+        {
+          errno = EINVAL;
+          return NULL;
+        }
+      return getcwd (buf, size);
+    }
+
+  if (size)
+    {
+      buf = malloc (size);
+      if (!buf)
+        {
+          errno = ENOMEM;
+          return NULL;
+        }
+      result = getcwd (buf, size);
+      if (!result)
+        {
+          int saved_errno = errno;
+          free (buf);
+          errno = saved_errno;
+        }
+      return result;
+    }
+
+  /* Flexible sizing requested.  Avoid over-allocation for the common
+     case of a name that fits within a 4k page, minus some space for
+     local variables, to be sure we don't skip over a guard page.  */
+  {
+    char tmp[4032];
+    size = sizeof tmp;
+    ptr = getcwd (tmp, size);
+    if (ptr)
+      {
+        result = strdup (ptr);
+        if (!result)
+          errno = ENOMEM;
+        return result;
+      }
+    if (errno != ERANGE)
+      return NULL;
+  }
+
+  /* My what a large directory name we have.  */
+  do
+    {
+      size <<= 1;
+      ptr = realloc (buf, size);
+      if (ptr == NULL)
+        {
+          free (buf);
+          errno = ENOMEM;
+          return NULL;
+        }
+      buf = ptr;
+      result = getcwd (buf, size);
+    }
+  while (!result && errno == ERANGE);
+
+  if (!result)
+    {
+      int saved_errno = errno;
+      free (buf);
+      errno = saved_errno;
+    }
+  else
+    {
+      /* Trim to fit, if possible.  */
+      result = realloc (buf, strlen (buf) + 1);
+      if (!result)
+        result = buf;
+    }
+  return result;
+}
+
+#endif
diff --git a/gltests/glthread/thread.c b/gltests/glthread/thread.c
index bb40092..83b8c57 100644
--- a/gltests/glthread/thread.c
+++ b/gltests/glthread/thread.c
@@ -29,6 +29,20 @@
 
 /* ========================================================================= */
 
+#if USE_POSIX_THREADS
+
+#include <pthread.h>
+
+#ifdef PTW32_VERSION
+
+const gl_thread_t gl_null_thread /* = { .p = NULL } */;
+
+#endif
+
+#endif
+
+/* ========================================================================= */
+
 #if USE_WIN32_THREADS
 
 #include <process.h>
diff --git a/gltests/glthread/thread.h b/gltests/glthread/thread.h
index 370f09a..d2bdffc 100644
--- a/gltests/glthread/thread.h
+++ b/gltests/glthread/thread.h
@@ -47,6 +47,10 @@
        current = gl_thread_self ();
        extern gl_thread_t gl_thread_self (void);
 
+   Getting a reference to the current thread as a pointer, for debugging:
+       ptr = gl_thread_self_pointer ();
+       extern void * gl_thread_self_pointer (void);
+
    Terminating the current thread:
        gl_thread_exit (return_value);
        extern void gl_thread_exit (void *return_value) __attribute__ 
((noreturn));
@@ -147,8 +151,20 @@ typedef pthread_t gl_thread_t;
     (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0)
 # define glthread_join(THREAD, RETVALP) \
     (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0)
-# define gl_thread_self() \
-    (pthread_in_use () ? (void *) pthread_self () : NULL)
+# ifdef PTW32_VERSION
+   /* In pthreads-win32, pthread_t is a struct with a pointer field 'p' and
+      other fields.  */
+#  define gl_thread_self() \
+     (pthread_in_use () ? pthread_self () : gl_null_thread)
+#  define gl_thread_self_pointer() \
+     (pthread_in_use () ? pthread_self ().p : NULL)
+extern const gl_thread_t gl_null_thread;
+# else
+#  define gl_thread_self() \
+     (pthread_in_use () ? (void *) pthread_self () : NULL)
+#  define gl_thread_self_pointer() \
+     gl_thread_self ()
+# endif
 # define gl_thread_exit(RETVAL) \
     (pthread_in_use () ? pthread_exit (RETVAL) : 0)
 
@@ -205,7 +221,9 @@ typedef pth_t gl_thread_t;
 # define glthread_join(THREAD, RETVALP) \
     (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0)
 # define gl_thread_self() \
-    (pth_in_use () ? (void *) pth_self () : 0)
+    (pth_in_use () ? (void *) pth_self () : NULL)
+# define gl_thread_self_pointer() \
+    gl_thread_self ()
 # define gl_thread_exit(RETVAL) \
     (pth_in_use () ? pth_exit (RETVAL) : 0)
 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
@@ -257,7 +275,9 @@ typedef thread_t gl_thread_t;
 # define glthread_join(THREAD, RETVALP) \
     (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0)
 # define gl_thread_self() \
-    (thread_in_use () ? (void *) thr_self () : 0)
+    (thread_in_use () ? (void *) thr_self () : NULL)
+# define gl_thread_self_pointer() \
+    gl_thread_self ()
 # define gl_thread_exit(RETVAL) \
     (thread_in_use () ? thr_exit (RETVAL) : 0)
 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
@@ -298,6 +318,8 @@ typedef struct gl_thread_struct *gl_thread_t;
     glthread_join_func (THREAD, RETVALP)
 # define gl_thread_self() \
     gl_thread_self_func ()
+# define gl_thread_self_pointer() \
+    gl_thread_self ()
 # define gl_thread_exit(RETVAL) \
     gl_thread_exit_func (RETVAL)
 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
@@ -322,7 +344,9 @@ typedef int gl_thread_t;
 # define glthread_create(THREADP, FUNC, ARG) ENOSYS
 # define glthread_sigmask(HOW, SET, OSET) 0
 # define glthread_join(THREAD, RETVALP) 0
-# define gl_thread_self() NULL
+# define gl_thread_self() 0
+# define gl_thread_self_pointer() \
+    ((void *) gl_thread_self ())
 # define gl_thread_exit(RETVAL) 0
 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
 
diff --git a/gltests/init.sh b/gltests/init.sh
index 71c6516..0da6c1e 100644
--- a/gltests/init.sh
+++ b/gltests/init.sh
@@ -68,8 +68,8 @@ Exit () { set +e; (exit $1); exit $1; }
 
 # Print warnings (e.g., about skipped and failed tests) to this file number.
 # Override by defining to say, 9, in init.cfg, and putting say,
-# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition
-# of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+#   export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
 # This is useful when using automake's parallel tests mode, to print
 # the reason for skip/failure to console, rather than to the .log files.
 : ${stderr_fileno_=2}
@@ -77,6 +77,7 @@ Exit () { set +e; (exit $1); exit $1; }
 warn_ () { echo "$@" 1>&$stderr_fileno_; }
 fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
 
 # Sanitize this shell to POSIX mode, if possible.
@@ -167,7 +168,10 @@ else
     st_=$?
 
     # $re_shell_ works just fine.  Use it.
-    test $st_ = 10 && break
+    if test $st_ = 10; then
+      gl_set_x_corrupts_stderr_=false
+      break
+    fi
 
     # If this is our first marginally acceptable shell, remember it.
     if test "$st_:$marginal_" = 9: ; then
@@ -400,7 +404,7 @@ mktempd_ ()
 {
   case $# in
   2);;
-  *) fail_ "Usage: $ME DIR TEMPLATE";;
+  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
   esac
 
   destdir_=$1
diff --git a/gltests/inttypes.in.h b/gltests/inttypes.in.h
new file mode 100644
index 0000000..7abf394
--- /dev/null
+++ b/gltests/inttypes.in.h
@@ -0,0 +1,1110 @@
+/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
+   Written by Paul Eggert, Bruno Haible, Derek Price.
+   This file is part of gnulib.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+#if __GNUC__ >= 3
address@hidden@
+#endif
address@hidden@
+
+/* Include the original <inttypes.h> if it exists, and if this file
+   has not been included yet or if this file includes gnulib stdint.h
+   which in turn includes this file.
+   The include_next requires a split double-inclusion guard.  */
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# if @HAVE_INTTYPES_H@
+#  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+# endif
+#endif
+
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define INTTYPES_H
+
+/* Include <stdint.h> or the gnulib replacement.
+   But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT.  */
+#include <limits.h>
+
+#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
+# error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* 7.8.1 Macros for format specifiers */
+
+#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if defined _TNS_R_TARGET
+   /* Tandem NonStop R series and compatible platforms released before
+      July 2005 support %Ld but not %lld.  */
+#  define _LONG_LONG_FORMAT_PREFIX "L"
+# else
+#  define _LONG_LONG_FORMAT_PREFIX "ll"
+# endif
+
+# if !defined PRId8 || @PRI_MACROS_BROKEN@
+#  undef PRId8
+#  ifdef INT8_MAX
+#   define PRId8 "d"
+#  endif
+# endif
+# if !defined PRIi8 || @PRI_MACROS_BROKEN@
+#  undef PRIi8
+#  ifdef INT8_MAX
+#   define PRIi8 "i"
+#  endif
+# endif
+# if !defined PRIo8 || @PRI_MACROS_BROKEN@
+#  undef PRIo8
+#  ifdef UINT8_MAX
+#   define PRIo8 "o"
+#  endif
+# endif
+# if !defined PRIu8 || @PRI_MACROS_BROKEN@
+#  undef PRIu8
+#  ifdef UINT8_MAX
+#   define PRIu8 "u"
+#  endif
+# endif
+# if !defined PRIx8 || @PRI_MACROS_BROKEN@
+#  undef PRIx8
+#  ifdef UINT8_MAX
+#   define PRIx8 "x"
+#  endif
+# endif
+# if !defined PRIX8 || @PRI_MACROS_BROKEN@
+#  undef PRIX8
+#  ifdef UINT8_MAX
+#   define PRIX8 "X"
+#  endif
+# endif
+# if !defined PRId16 || @PRI_MACROS_BROKEN@
+#  undef PRId16
+#  ifdef INT16_MAX
+#   define PRId16 "d"
+#  endif
+# endif
+# if !defined PRIi16 || @PRI_MACROS_BROKEN@
+#  undef PRIi16
+#  ifdef INT16_MAX
+#   define PRIi16 "i"
+#  endif
+# endif
+# if !defined PRIo16 || @PRI_MACROS_BROKEN@
+#  undef PRIo16
+#  ifdef UINT16_MAX
+#   define PRIo16 "o"
+#  endif
+# endif
+# if !defined PRIu16 || @PRI_MACROS_BROKEN@
+#  undef PRIu16
+#  ifdef UINT16_MAX
+#   define PRIu16 "u"
+#  endif
+# endif
+# if !defined PRIx16 || @PRI_MACROS_BROKEN@
+#  undef PRIx16
+#  ifdef UINT16_MAX
+#   define PRIx16 "x"
+#  endif
+# endif
+# if !defined PRIX16 || @PRI_MACROS_BROKEN@
+#  undef PRIX16
+#  ifdef UINT16_MAX
+#   define PRIX16 "X"
+#  endif
+# endif
+# if !defined PRId32 || @PRI_MACROS_BROKEN@
+#  undef PRId32
+#  ifdef INT32_MAX
+#   define PRId32 "d"
+#  endif
+# endif
+# if !defined PRIi32 || @PRI_MACROS_BROKEN@
+#  undef PRIi32
+#  ifdef INT32_MAX
+#   define PRIi32 "i"
+#  endif
+# endif
+# if !defined PRIo32 || @PRI_MACROS_BROKEN@
+#  undef PRIo32
+#  ifdef UINT32_MAX
+#   define PRIo32 "o"
+#  endif
+# endif
+# if !defined PRIu32 || @PRI_MACROS_BROKEN@
+#  undef PRIu32
+#  ifdef UINT32_MAX
+#   define PRIu32 "u"
+#  endif
+# endif
+# if !defined PRIx32 || @PRI_MACROS_BROKEN@
+#  undef PRIx32
+#  ifdef UINT32_MAX
+#   define PRIx32 "x"
+#  endif
+# endif
+# if !defined PRIX32 || @PRI_MACROS_BROKEN@
+#  undef PRIX32
+#  ifdef UINT32_MAX
+#   define PRIX32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _PRI64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRI64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRId64 || @PRI_MACROS_BROKEN@
+#   undef PRId64
+#   define PRId64 _PRI64_PREFIX "d"
+#  endif
+#  if !defined PRIi64 || @PRI_MACROS_BROKEN@
+#   undef PRIi64
+#   define PRIi64 _PRI64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _PRIu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRIu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRIo64 || @PRI_MACROS_BROKEN@
+#   undef PRIo64
+#   define PRIo64 _PRIu64_PREFIX "o"
+#  endif
+#  if !defined PRIu64 || @PRI_MACROS_BROKEN@
+#   undef PRIu64
+#   define PRIu64 _PRIu64_PREFIX "u"
+#  endif
+#  if !defined PRIx64 || @PRI_MACROS_BROKEN@
+#   undef PRIx64
+#   define PRIx64 _PRIu64_PREFIX "x"
+#  endif
+#  if !defined PRIX64 || @PRI_MACROS_BROKEN@
+#   undef PRIX64
+#   define PRIX64 _PRIu64_PREFIX "X"
+#  endif
+# endif
+
+# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST8
+#  define PRIdLEAST8 "d"
+# endif
+# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST8
+#  define PRIiLEAST8 "i"
+# endif
+# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST8
+#  define PRIoLEAST8 "o"
+# endif
+# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST8
+#  define PRIuLEAST8 "u"
+# endif
+# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST8
+#  define PRIxLEAST8 "x"
+# endif
+# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST8
+#  define PRIXLEAST8 "X"
+# endif
+# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST16
+#  define PRIdLEAST16 "d"
+# endif
+# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST16
+#  define PRIiLEAST16 "i"
+# endif
+# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST16
+#  define PRIoLEAST16 "o"
+# endif
+# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST16
+#  define PRIuLEAST16 "u"
+# endif
+# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST16
+#  define PRIxLEAST16 "x"
+# endif
+# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST16
+#  define PRIXLEAST16 "X"
+# endif
+# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST32
+#  define PRIdLEAST32 "d"
+# endif
+# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST32
+#  define PRIiLEAST32 "i"
+# endif
+# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST32
+#  define PRIoLEAST32 "o"
+# endif
+# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST32
+#  define PRIuLEAST32 "u"
+# endif
+# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST32
+#  define PRIxLEAST32 "x"
+# endif
+# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST32
+#  define PRIXLEAST32 "X"
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdLEAST64
+#   define PRIdLEAST64 PRId64
+#  endif
+#  if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiLEAST64
+#   define PRIiLEAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoLEAST64
+#   define PRIoLEAST64 PRIo64
+#  endif
+#  if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuLEAST64
+#   define PRIuLEAST64 PRIu64
+#  endif
+#  if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxLEAST64
+#   define PRIxLEAST64 PRIx64
+#  endif
+#  if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXLEAST64
+#   define PRIXLEAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIdFAST8 PRId64
+#  else
+#   define PRIdFAST8 "d"
+#  endif
+# endif
+# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIiFAST8 PRIi64
+#  else
+#   define PRIiFAST8 "i"
+#  endif
+# endif
+# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIoFAST8 PRIo64
+#  else
+#   define PRIoFAST8 "o"
+#  endif
+# endif
+# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIuFAST8 PRIu64
+#  else
+#   define PRIuFAST8 "u"
+#  endif
+# endif
+# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIxFAST8 PRIx64
+#  else
+#   define PRIxFAST8 "x"
+#  endif
+# endif
+# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIXFAST8 PRIX64
+#  else
+#   define PRIXFAST8 "X"
+#  endif
+# endif
+# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIdFAST16 PRId64
+#  else
+#   define PRIdFAST16 "d"
+#  endif
+# endif
+# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIiFAST16 PRIi64
+#  else
+#   define PRIiFAST16 "i"
+#  endif
+# endif
+# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIoFAST16 PRIo64
+#  else
+#   define PRIoFAST16 "o"
+#  endif
+# endif
+# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIuFAST16 PRIu64
+#  else
+#   define PRIuFAST16 "u"
+#  endif
+# endif
+# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIxFAST16 PRIx64
+#  else
+#   define PRIxFAST16 "x"
+#  endif
+# endif
+# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIXFAST16 PRIX64
+#  else
+#   define PRIXFAST16 "X"
+#  endif
+# endif
+# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIdFAST32 PRId64
+#  else
+#   define PRIdFAST32 "d"
+#  endif
+# endif
+# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIiFAST32 PRIi64
+#  else
+#   define PRIiFAST32 "i"
+#  endif
+# endif
+# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIoFAST32 PRIo64
+#  else
+#   define PRIoFAST32 "o"
+#  endif
+# endif
+# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIuFAST32 PRIu64
+#  else
+#   define PRIuFAST32 "u"
+#  endif
+# endif
+# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIxFAST32 PRIx64
+#  else
+#   define PRIxFAST32 "x"
+#  endif
+# endif
+# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIXFAST32 PRIX64
+#  else
+#   define PRIXFAST32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdFAST64
+#   define PRIdFAST64 PRId64
+#  endif
+#  if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiFAST64
+#   define PRIiFAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoFAST64
+#   define PRIoFAST64 PRIo64
+#  endif
+#  if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuFAST64
+#   define PRIuFAST64 PRIu64
+#  endif
+#  if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxFAST64
+#   define PRIxFAST64 PRIx64
+#  endif
+#  if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXFAST64
+#   define PRIXFAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+#  undef PRIdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIdMAX PRId64
+#  else
+#   define PRIdMAX "ld"
+#  endif
+# endif
+# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+#  undef PRIiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIiMAX PRIi64
+#  else
+#   define PRIiMAX "li"
+#  endif
+# endif
+# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+#  undef PRIoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIoMAX PRIo64
+#  else
+#   define PRIoMAX "lo"
+#  endif
+# endif
+# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+#  undef PRIuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIuMAX PRIu64
+#  else
+#   define PRIuMAX "lu"
+#  endif
+# endif
+# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+#  undef PRIxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIxMAX PRIx64
+#  else
+#   define PRIxMAX "lx"
+#  endif
+# endif
+# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+#  undef PRIXMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIXMAX PRIX64
+#  else
+#   define PRIXMAX "lX"
+#  endif
+# endif
+
+# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+#  undef PRIdPTR
+#  ifdef INTPTR_MAX
+#   define PRIdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+#  undef PRIiPTR
+#  ifdef INTPTR_MAX
+#   define PRIiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+#  undef PRIoPTR
+#  ifdef UINTPTR_MAX
+#   define PRIoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+#  undef PRIuPTR
+#  ifdef UINTPTR_MAX
+#   define PRIuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+#  undef PRIxPTR
+#  ifdef UINTPTR_MAX
+#   define PRIxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+#  undef PRIXPTR
+#  ifdef UINTPTR_MAX
+#   define PRIXPTR @PRIPTR_PREFIX@ "X"
+#  endif
+# endif
+
+# if !defined SCNd8 || @PRI_MACROS_BROKEN@
+#  undef SCNd8
+#  ifdef INT8_MAX
+#   define SCNd8 "hhd"
+#  endif
+# endif
+# if !defined SCNi8 || @PRI_MACROS_BROKEN@
+#  undef SCNi8
+#  ifdef INT8_MAX
+#   define SCNi8 "hhi"
+#  endif
+# endif
+# if !defined SCNo8 || @PRI_MACROS_BROKEN@
+#  undef SCNo8
+#  ifdef UINT8_MAX
+#   define SCNo8 "hho"
+#  endif
+# endif
+# if !defined SCNu8 || @PRI_MACROS_BROKEN@
+#  undef SCNu8
+#  ifdef UINT8_MAX
+#   define SCNu8 "hhu"
+#  endif
+# endif
+# if !defined SCNx8 || @PRI_MACROS_BROKEN@
+#  undef SCNx8
+#  ifdef UINT8_MAX
+#   define SCNx8 "hhx"
+#  endif
+# endif
+# if !defined SCNd16 || @PRI_MACROS_BROKEN@
+#  undef SCNd16
+#  ifdef INT16_MAX
+#   define SCNd16 "hd"
+#  endif
+# endif
+# if !defined SCNi16 || @PRI_MACROS_BROKEN@
+#  undef SCNi16
+#  ifdef INT16_MAX
+#   define SCNi16 "hi"
+#  endif
+# endif
+# if !defined SCNo16 || @PRI_MACROS_BROKEN@
+#  undef SCNo16
+#  ifdef UINT16_MAX
+#   define SCNo16 "ho"
+#  endif
+# endif
+# if !defined SCNu16 || @PRI_MACROS_BROKEN@
+#  undef SCNu16
+#  ifdef UINT16_MAX
+#   define SCNu16 "hu"
+#  endif
+# endif
+# if !defined SCNx16 || @PRI_MACROS_BROKEN@
+#  undef SCNx16
+#  ifdef UINT16_MAX
+#   define SCNx16 "hx"
+#  endif
+# endif
+# if !defined SCNd32 || @PRI_MACROS_BROKEN@
+#  undef SCNd32
+#  ifdef INT32_MAX
+#   define SCNd32 "d"
+#  endif
+# endif
+# if !defined SCNi32 || @PRI_MACROS_BROKEN@
+#  undef SCNi32
+#  ifdef INT32_MAX
+#   define SCNi32 "i"
+#  endif
+# endif
+# if !defined SCNo32 || @PRI_MACROS_BROKEN@
+#  undef SCNo32
+#  ifdef UINT32_MAX
+#   define SCNo32 "o"
+#  endif
+# endif
+# if !defined SCNu32 || @PRI_MACROS_BROKEN@
+#  undef SCNu32
+#  ifdef UINT32_MAX
+#   define SCNu32 "u"
+#  endif
+# endif
+# if !defined SCNx32 || @PRI_MACROS_BROKEN@
+#  undef SCNx32
+#  ifdef UINT32_MAX
+#   define SCNx32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _SCN64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCN64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNd64 || @PRI_MACROS_BROKEN@
+#   undef SCNd64
+#   define SCNd64 _SCN64_PREFIX "d"
+#  endif
+#  if !defined SCNi64 || @PRI_MACROS_BROKEN@
+#   undef SCNi64
+#   define SCNi64 _SCN64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _SCNu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCNu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNo64 || @PRI_MACROS_BROKEN@
+#   undef SCNo64
+#   define SCNo64 _SCNu64_PREFIX "o"
+#  endif
+#  if !defined SCNu64 || @PRI_MACROS_BROKEN@
+#   undef SCNu64
+#   define SCNu64 _SCNu64_PREFIX "u"
+#  endif
+#  if !defined SCNx64 || @PRI_MACROS_BROKEN@
+#   undef SCNx64
+#   define SCNx64 _SCNu64_PREFIX "x"
+#  endif
+# endif
+
+# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST8
+#  define SCNdLEAST8 "hhd"
+# endif
+# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST8
+#  define SCNiLEAST8 "hhi"
+# endif
+# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST8
+#  define SCNoLEAST8 "hho"
+# endif
+# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST8
+#  define SCNuLEAST8 "hhu"
+# endif
+# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST8
+#  define SCNxLEAST8 "hhx"
+# endif
+# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST16
+#  define SCNdLEAST16 "hd"
+# endif
+# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST16
+#  define SCNiLEAST16 "hi"
+# endif
+# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST16
+#  define SCNoLEAST16 "ho"
+# endif
+# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST16
+#  define SCNuLEAST16 "hu"
+# endif
+# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST16
+#  define SCNxLEAST16 "hx"
+# endif
+# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST32
+#  define SCNdLEAST32 "d"
+# endif
+# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST32
+#  define SCNiLEAST32 "i"
+# endif
+# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST32
+#  define SCNoLEAST32 "o"
+# endif
+# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST32
+#  define SCNuLEAST32 "u"
+# endif
+# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST32
+#  define SCNxLEAST32 "x"
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdLEAST64
+#   define SCNdLEAST64 SCNd64
+#  endif
+#  if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiLEAST64
+#   define SCNiLEAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoLEAST64
+#   define SCNoLEAST64 SCNo64
+#  endif
+#  if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuLEAST64
+#   define SCNuLEAST64 SCNu64
+#  endif
+#  if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxLEAST64
+#   define SCNxLEAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNdFAST8 SCNd64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNdFAST8 "hd"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNdFAST8 "hhd"
+#  else
+#   define SCNdFAST8 "d"
+#  endif
+# endif
+# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNiFAST8 SCNi64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNiFAST8 "hi"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNiFAST8 "hhi"
+#  else
+#   define SCNiFAST8 "i"
+#  endif
+# endif
+# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNoFAST8 SCNo64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNoFAST8 "ho"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNoFAST8 "hho"
+#  else
+#   define SCNoFAST8 "o"
+#  endif
+# endif
+# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNuFAST8 SCNu64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNuFAST8 "hu"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNuFAST8 "hhu"
+#  else
+#   define SCNuFAST8 "u"
+#  endif
+# endif
+# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNxFAST8 SCNx64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNxFAST8 "hx"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNxFAST8 "hhx"
+#  else
+#   define SCNxFAST8 "x"
+#  endif
+# endif
+# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNdFAST16 SCNd64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNdFAST16 "hd"
+#  else
+#   define SCNdFAST16 "d"
+#  endif
+# endif
+# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNiFAST16 SCNi64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNiFAST16 "hi"
+#  else
+#   define SCNiFAST16 "i"
+#  endif
+# endif
+# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNoFAST16 SCNo64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNoFAST16 "ho"
+#  else
+#   define SCNoFAST16 "o"
+#  endif
+# endif
+# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNuFAST16 SCNu64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNuFAST16 "hu"
+#  else
+#   define SCNuFAST16 "u"
+#  endif
+# endif
+# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNxFAST16 SCNx64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNxFAST16 "hx"
+#  else
+#   define SCNxFAST16 "x"
+#  endif
+# endif
+# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNdFAST32 SCNd64
+#  else
+#   define SCNdFAST32 "d"
+#  endif
+# endif
+# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNiFAST32 SCNi64
+#  else
+#   define SCNiFAST32 "i"
+#  endif
+# endif
+# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNoFAST32 SCNo64
+#  else
+#   define SCNoFAST32 "o"
+#  endif
+# endif
+# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNuFAST32 SCNu64
+#  else
+#   define SCNuFAST32 "u"
+#  endif
+# endif
+# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNxFAST32 SCNx64
+#  else
+#   define SCNxFAST32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdFAST64
+#   define SCNdFAST64 SCNd64
+#  endif
+#  if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiFAST64
+#   define SCNiFAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoFAST64
+#   define SCNoFAST64 SCNo64
+#  endif
+#  if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuFAST64
+#   define SCNuFAST64 SCNu64
+#  endif
+#  if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxFAST64
+#   define SCNxFAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+#  undef SCNdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNdMAX SCNd64
+#  else
+#   define SCNdMAX "ld"
+#  endif
+# endif
+# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+#  undef SCNiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNiMAX SCNi64
+#  else
+#   define SCNiMAX "li"
+#  endif
+# endif
+# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+#  undef SCNoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNoMAX SCNo64
+#  else
+#   define SCNoMAX "lo"
+#  endif
+# endif
+# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+#  undef SCNuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNuMAX SCNu64
+#  else
+#   define SCNuMAX "lu"
+#  endif
+# endif
+# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+#  undef SCNxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNxMAX SCNx64
+#  else
+#   define SCNxMAX "lx"
+#  endif
+# endif
+
+# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+#  undef SCNdPTR
+#  ifdef INTPTR_MAX
+#   define SCNdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+#  undef SCNiPTR
+#  ifdef INTPTR_MAX
+#   define SCNiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+#  undef SCNoPTR
+#  ifdef UINTPTR_MAX
+#   define SCNoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+#  undef SCNuPTR
+#  ifdef UINTPTR_MAX
+#   define SCNuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+#  undef SCNxPTR
+#  ifdef UINTPTR_MAX
+#   define SCNxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+
+#endif
+
+/* 7.8.2 Functions for greatest-width integer types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_IMAXABS@
+# if address@hidden@
+extern intmax_t imaxabs (intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxabs
+# if HAVE_RAW_DECL_IMAXABS
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
+                 "use gnulib module imaxabs for portability");
+# endif
+#endif
+
+#if @GNULIB_IMAXDIV@
+# if address@hidden@
+#  if !GNULIB_defined_imaxdiv_t
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
+#   define GNULIB_defined_imaxdiv_t 1
+#  endif
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxdiv
+# if HAVE_RAW_DECL_IMAXDIV
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
+                 "use gnulib module imaxdiv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOIMAX@
+# if address@hidden@
+#  undef strtoimax
+extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoimax
+# if HAVE_RAW_DECL_STRTOIMAX
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
+                 "use gnulib module strtoimax for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOUMAX@
+# if address@hidden@
+#  undef strtoumax
+extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoumax
+# if HAVE_RAW_DECL_STRTOUMAX
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
+                 "use gnulib module strtoumax for portability");
+# endif
+#endif
+
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since
+   wide-character functions like this are hardly ever useful.  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/gltests/locale.in.h b/gltests/locale.in.h
index 1f9bafd..79c1490 100644
--- a/gltests/locale.in.h
+++ b/gltests/locale.in.h
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _GL_LOCALE_H
+#ifndef address@hidden@_LOCALE_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -24,8 +24,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_LOCALE_H@
 
-#ifndef _GL_LOCALE_H
-#define _GL_LOCALE_H
+#ifndef address@hidden@_LOCALE_H
+#define address@hidden@_LOCALE_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -92,5 +92,5 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc 
systems - "
 # endif
 #endif
 
-#endif /* _GL_LOCALE_H */
-#endif /* _GL_LOCALE_H */
+#endif /* address@hidden@_LOCALE_H */
+#endif /* address@hidden@_LOCALE_H */
diff --git a/gltests/localename.c b/gltests/localename.c
index a5bfea7..faab700 100644
--- a/gltests/localename.c
+++ b/gltests/localename.c
@@ -1,20 +1,18 @@
 /* Determine name of the currently selected locale.
    Copyright (C) 1995-2011 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, or (at your option)
-   any later version.
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ulrich Drepper <address@hidden>, 1995.  */
 /* Win32 code written by Tor Lillqvist <address@hidden>.  */
diff --git a/gltests/localename.h b/gltests/localename.h
index e754853..ea59f51 100644
--- a/gltests/localename.h
+++ b/gltests/localename.h
@@ -1,20 +1,18 @@
 /* Determine name of the currently selected locale.
    Copyright (C) 2007, 2009-2011 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, or (at your option)
-   any later version.
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_LOCALENAME_H
 #define _GL_LOCALENAME_H
diff --git a/gltests/macros.h b/gltests/macros.h
index 8922675..adb3744 100644
--- a/gltests/macros.h
+++ b/gltests/macros.h
@@ -62,3 +62,7 @@
    *not* work for function parameters of array type, because they are actually
    parameters of pointer type.  */
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
+
+/* STREQ (str1, str2)
+   Return true if two strings compare equal.  */
+#define STREQ(a, b) (strcmp (a, b) == 0)
diff --git a/gltests/pathmax.h b/gltests/pathmax.h
deleted file mode 100644
index d471240..0000000
--- a/gltests/pathmax.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 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, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _PATHMAX_H
-# define _PATHMAX_H
-
-# include <unistd.h>
-
-# include <limits.h>
-
-# ifndef _POSIX_PATH_MAX
-#  define _POSIX_PATH_MAX 256
-# endif
-
-# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
-#  define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
-                    : pathconf ("/", _PC_PATH_MAX))
-# endif
-
-/* Don't include sys/param.h if it already has been.  */
-# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
-#  include <sys/param.h>
-# endif
-
-# if !defined PATH_MAX && defined MAXPATHLEN
-#  define PATH_MAX MAXPATHLEN
-# endif
-
-# ifndef PATH_MAX
-#  define PATH_MAX _POSIX_PATH_MAX
-# endif
-
-#endif /* _PATHMAX_H */
diff --git a/gltests/perror.c b/gltests/perror.c
index 2c13a89..af4b56c 100644
--- a/gltests/perror.c
+++ b/gltests/perror.c
@@ -21,15 +21,29 @@
 #include <stdio.h>
 
 #include <errno.h>
+#include <stdlib.h>
 #include <string.h>
 
+#include "strerror-override.h"
+
+/* Use the system functions, not the gnulib overrides in this file.  */
+#undef fprintf
+
 void
 perror (const char *string)
 {
-  const char *errno_description = strerror (errno);
+  char stackbuf[STACKBUF_LEN];
+  int ret;
+
+  /* Our implementation guarantees that this will be a non-empty
+     string, even if it returns EINVAL; and stackbuf should be sized
+     large enough to avoid ERANGE.  */
+  ret = strerror_r (errno, stackbuf, sizeof stackbuf);
+  if (ret == ERANGE)
+    abort ();
 
   if (string != NULL && *string != '\0')
-    fprintf (stderr, "%s: %s\n", string, errno_description);
+    fprintf (stderr, "%s: %s\n", string, stackbuf);
   else
-    fprintf (stderr, "%s\n", errno_description);
+    fprintf (stderr, "%s\n", stackbuf);
 }
diff --git a/gltests/setenv.c b/gltests/setenv.c
index 173d95f..0a5f67d 100644
--- a/gltests/setenv.c
+++ b/gltests/setenv.c
@@ -350,6 +350,9 @@ weak_alias (__clearenv, clearenv)
 #if HAVE_SETENV
 
 # undef setenv
+# if !HAVE_DECL_SETENV
+extern int setenv (const char *, const char *, int);
+# endif
 # define STREQ(a, b) (strcmp (a, b) == 0)
 
 int
diff --git a/gltests/stat.c b/gltests/stat.c
index cbc9100..f07370d 100644
--- a/gltests/stat.c
+++ b/gltests/stat.c
@@ -38,6 +38,7 @@ orig_stat (const char *filename, struct stat *buf)
 #include <stdbool.h>
 #include <string.h>
 #include "dosname.h"
+#include "verify.h"
 
 /* Store information about NAME into ST.  Work around bugs with
    trailing slashes.  Mingw has other bugs (such as st_ino always
@@ -63,6 +64,12 @@ rpl_stat (char const *name, struct stat *st)
     }
 #endif /* REPLACE_FUNC_STAT_FILE */
 #if REPLACE_FUNC_STAT_DIR
+  /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
+     have a constant PATH_MAX.  */
+# ifndef PATH_MAX
+#  error "Please port this replacement to your platform"
+# endif
+
   if (result == -1 && errno == ENOENT)
     {
       /* Due to mingw's oddities, there are some directories (like
@@ -77,6 +84,7 @@ rpl_stat (char const *name, struct stat *st)
       char fixed_name[PATH_MAX + 1] = {0};
       size_t len = strlen (name);
       bool check_dir = false;
+      verify (PATH_MAX <= 4096);
       if (PATH_MAX <= len)
         errno = ENAMETOOLONG;
       else if (len)
diff --git a/gltests/strerror_r.c b/gltests/strerror_r.c
new file mode 100644
index 0000000..2b3f1f2
--- /dev/null
+++ b/gltests/strerror_r.c
@@ -0,0 +1,306 @@
+/* strerror_r.c --- POSIX compatible system error routine
+
+   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2010.  */
+
+#include <config.h>
+
+/* Enable declaration of sys_nerr and sys_errlist in <errno.h> on NetBSD.  */
+#define _NETBSD_SOURCE 1
+
+/* Specification.  */
+#include <string.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "strerror-override.h"
+
+#if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && 
HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */
+
+# define USE_XPG_STRERROR_R 1
+
+#elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || 
defined __CYGWIN__)
+
+/* The system's strerror_r function is OK, except that its third argument
+   is 'int', not 'size_t', or its return type is wrong.  */
+
+# include <limits.h>
+
+# define USE_SYSTEM_STRERROR_R 1
+
+#else /* (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__ ? 
!HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) */
+
+/* Use the system's strerror().  Exclude glibc and cygwin because the
+   system strerror_r has the wrong return type, and cygwin 1.7.9
+   strerror_r clobbers strerror.  */
+# undef strerror
+
+# define USE_SYSTEM_STRERROR 1
+
+# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined 
__WIN32__) && !defined __CYGWIN__) || defined __sgi || (defined __sun && 
!defined _LP64) || defined __CYGWIN__
+
+/* No locking needed.  */
+
+/* Get catgets internationalization functions.  */
+#  if HAVE_CATGETS
+#   include <nl_types.h>
+#  endif
+
+/* Get sys_nerr, sys_errlist on HP-UX (otherwise only declared in C++ mode).
+   Get sys_nerr, sys_errlist on IRIX (otherwise only declared with _SGIAPI).  
*/
+#  if defined __hpux || defined __sgi
+extern int sys_nerr;
+extern char *sys_errlist[];
+#  endif
+
+/* Get sys_nerr on Solaris.  */
+#  if defined __sun && !defined _LP64
+extern int sys_nerr;
+#  endif
+
+# else
+
+#  include "glthread/lock.h"
+
+/* This lock protects the buffer returned by strerror().  We assume that
+   no other uses of strerror() exist in the program.  */
+gl_lock_define_initialized(static, strerror_lock)
+
+# endif
+
+#endif
+
+/* Copy as much of MSG into BUF as possible, without corrupting errno.
+   Return 0 if MSG fit in BUFLEN, otherwise return ERANGE.  */
+static int
+safe_copy (char *buf, size_t buflen, const char *msg)
+{
+  size_t len = strlen (msg);
+  int ret;
+
+  if (len < buflen)
+    {
+      /* Although POSIX allows memcpy() to corrupt errno, we don't
+         know of any implementation where this is a real problem.  */
+      memcpy (buf, msg, len + 1);
+      ret = 0;
+    }
+  else
+    {
+      memcpy (buf, msg, buflen - 1);
+      buf[buflen - 1] = '\0';
+      ret = ERANGE;
+    }
+  return ret;
+}
+
+
+int
+strerror_r (int errnum, char *buf, size_t buflen)
+#undef strerror_r
+{
+  /* Filter this out now, so that rest of this replacement knows that
+     there is room for a non-empty message and trailing NUL.  */
+  if (buflen <= 1)
+    {
+      if (buflen)
+        *buf = '\0';
+      return ERANGE;
+    }
+  *buf = '\0';
+
+  /* Check for gnulib overrides.  */
+  {
+    char const *msg = strerror_override (errnum);
+
+    if (msg)
+      return safe_copy (buf, buflen, msg);
+  }
+
+  {
+    int ret;
+    int saved_errno = errno;
+
+#if USE_XPG_STRERROR_R
+
+    {
+      extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
+
+      ret = __xpg_strerror_r (errnum, buf, buflen);
+      if (ret < 0)
+        ret = errno;
+      if (!*buf)
+        {
+          /* glibc 2.13 would not touch buf on err, so we have to fall
+             back to GNU strerror_r which always returns a thread-safe
+             untruncated string to (partially) copy into our buf.  */
+          safe_copy (buf, buflen, strerror_r (errnum, buf, buflen));
+        }
+    }
+
+#elif USE_SYSTEM_STRERROR_R
+
+    if (buflen > INT_MAX)
+      buflen = INT_MAX;
+
+# ifdef __hpux
+    /* On HP-UX 11.31, strerror_r always fails when buflen < 80; it
+       also fails to change buf on EINVAL.  */
+    {
+      char stackbuf[80];
+
+      if (buflen < sizeof stackbuf)
+        {
+          ret = strerror_r (errnum, stackbuf, sizeof stackbuf);
+          if (ret == 0)
+            ret = safe_copy (buf, buflen, stackbuf);
+        }
+      else
+        ret = strerror_r (errnum, buf, buflen);
+    }
+# else
+    ret = strerror_r (errnum, buf, buflen);
+
+    /* Some old implementations may return (-1, EINVAL) instead of EINVAL.  */
+    if (ret < 0)
+      ret = errno;
+# endif
+
+# ifdef _AIX
+    /* AIX returns 0 rather than ERANGE when truncating strings; try
+       again until we are sure we got the entire string.  */
+    if (!ret && strlen (buf) == buflen - 1)
+      {
+        char stackbuf[STACKBUF_LEN];
+        size_t len;
+        strerror_r (errnum, stackbuf, sizeof stackbuf);
+        len = strlen (stackbuf);
+        /* STACKBUF_LEN should have been large enough.  */
+        if (len + 1 == sizeof stackbuf)
+          abort ();
+        if (buflen <= len)
+          ret = ERANGE;
+      }
+# else
+    /* Solaris 10 does not populate buf on ERANGE.  OpenBSD 4.7
+       truncates early on ERANGE rather than return a partial integer.
+       We prefer the maximal string.  We set buf[0] earlier, and we
+       know of no implementation that modifies buf to be an
+       unterminated string, so this strlen should be portable in
+       practice (rather than pulling in a safer strnlen).  */
+    if (ret == ERANGE && strlen (buf) < buflen - 1)
+      {
+        char stackbuf[STACKBUF_LEN];
+
+        /* STACKBUF_LEN should have been large enough.  */
+        if (strerror_r (errnum, stackbuf, sizeof stackbuf) == ERANGE)
+          abort ();
+        safe_copy (buf, buflen, stackbuf);
+      }
+# endif
+
+#else /* USE_SYSTEM_STRERROR */
+
+    /* Try to do what strerror (errnum) does, but without clobbering the
+       buffer used by strerror().  */
+
+# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined 
__WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, 
native Win32, Cygwin */
+
+    /* NetBSD:        sys_nerr, sys_errlist are declared through _NETBSD_SOURCE
+                      and <errno.h> above.
+       HP-UX:         sys_nerr, sys_errlist are declared explicitly above.
+       native Win32:  sys_nerr, sys_errlist are declared in <stdlib.h>.
+       Cygwin:        sys_nerr, sys_errlist are declared in <errno.h>.  */
+    if (errnum >= 0 && errnum < sys_nerr)
+      {
+#  if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux)
+#   if defined __NetBSD__
+        nl_catd catd = catopen ("libc", NL_CAT_LOCALE);
+        const char *errmsg =
+          (catd != (nl_catd)-1
+           ? catgets (catd, 1, errnum, sys_errlist[errnum])
+           : sys_errlist[errnum]);
+#   endif
+#   if defined __hpux
+        nl_catd catd = catopen ("perror", NL_CAT_LOCALE);
+        const char *errmsg =
+          (catd != (nl_catd)-1
+           ? catgets (catd, 1, 1 + errnum, sys_errlist[errnum])
+           : sys_errlist[errnum]);
+#   endif
+#  else
+        const char *errmsg = sys_errlist[errnum];
+#  endif
+        if (errmsg == NULL || *errmsg == '\0')
+          ret = EINVAL;
+        else
+          ret = safe_copy (buf, buflen, errmsg);
+#  if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux)
+        if (catd != (nl_catd)-1)
+          catclose (catd);
+#  endif
+      }
+    else
+      ret = EINVAL;
+
+# elif defined __sgi || (defined __sun && !defined _LP64) /* IRIX, Solaris <= 
9 32-bit */
+
+    /* For a valid error number, the system's strerror() function returns
+       a pointer to a not copied string, not to a buffer.  */
+    if (errnum >= 0 && errnum < sys_nerr)
+      {
+        char *errmsg = strerror (errnum);
+
+        if (errmsg == NULL || *errmsg == '\0')
+          ret = EINVAL;
+        else
+          ret = safe_copy (buf, buflen, errmsg);
+      }
+    else
+      ret = EINVAL;
+
+# else
+
+    gl_lock_lock (strerror_lock);
+
+    {
+      char *errmsg = strerror (errnum);
+
+      /* For invalid error numbers, strerror() on
+           - IRIX 6.5 returns NULL,
+           - HP-UX 11 returns an empty string.  */
+      if (errmsg == NULL || *errmsg == '\0')
+        ret = EINVAL;
+      else
+        ret = safe_copy (buf, buflen, errmsg);
+    }
+
+    gl_lock_unlock (strerror_lock);
+
+# endif
+
+#endif
+
+    if (ret == EINVAL && !*buf)
+      snprintf (buf, buflen, "Unknown error %d", errnum);
+
+    errno = saved_errno;
+    return ret;
+  }
+}
diff --git a/gltests/sys_ioctl.in.h b/gltests/sys_ioctl.in.h
index 77ca86d..dc8aeda 100644
--- a/gltests/sys_ioctl.in.h
+++ b/gltests/sys_ioctl.in.h
@@ -15,7 +15,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_SYS_IOCTL_H
+#ifndef address@hidden@_SYS_IOCTL_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -27,8 +27,8 @@
 # @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@
 #endif
 
-#ifndef _GL_SYS_IOCTL_H
-#define _GL_SYS_IOCTL_H
+#ifndef address@hidden@_SYS_IOCTL_H
+#define address@hidden@_SYS_IOCTL_H
 
 /* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
    but not in <sys/ioctl.h>.
@@ -75,5 +75,5 @@ _GL_WARN_ON_USE (ioctl, "ioctl does not portably work on 
sockets - "
 #endif
 
 
-#endif /* _GL_SYS_IOCTL_H */
-#endif /* _GL_SYS_IOCTL_H */
+#endif /* address@hidden@_SYS_IOCTL_H */
+#endif /* address@hidden@_SYS_IOCTL_H */
diff --git a/gltests/sys_stat.in.h b/gltests/sys_stat.in.h
index 13fae7b..5acee70 100644
--- a/gltests/sys_stat.in.h
+++ b/gltests/sys_stat.in.h
@@ -34,7 +34,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_SYS_STAT_H
+#ifndef address@hidden@_SYS_STAT_H
 
 /* Get nlink_t.  */
 #include <sys/types.h>
@@ -45,8 +45,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_SYS_STAT_H@
 
-#ifndef _GL_SYS_STAT_H
-#define _GL_SYS_STAT_H
+#ifndef address@hidden@_SYS_STAT_H
+#define address@hidden@_SYS_STAT_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -653,6 +653,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
 #endif
 
 
-#endif /* _GL_SYS_STAT_H */
-#endif /* _GL_SYS_STAT_H */
+#endif /* address@hidden@_SYS_STAT_H */
+#endif /* address@hidden@_SYS_STAT_H */
 #endif
diff --git a/gltests/test-fclose.c b/gltests/test-fclose.c
new file mode 100644
index 0000000..a11eca9
--- /dev/null
+++ b/gltests/test-fclose.c
@@ -0,0 +1,90 @@
+/* Test of fclose module.
+   Copyright (C) 2011 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, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Eric Blake.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fclose, int, (FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-fclose.t"
+
+int
+main (int argc, char **argv)
+{
+  const char buf[] = "hello world";
+  int fd;
+  int fd2;
+  FILE *f;
+
+  /* Prepare a seekable file.  */
+  fd = open (BASE, O_RDWR | O_CREAT | O_TRUNC, 0600);
+  ASSERT (0 <= fd);
+  ASSERT (write (fd, buf, sizeof buf) == sizeof buf);
+  ASSERT (lseek (fd, 1, SEEK_SET) == 1);
+
+  /* Create an output stream visiting the file; when it is closed, all
+     other file descriptors visiting the file must see the new file
+     position.  */
+  fd2 = dup (fd);
+  ASSERT (0 <= fd2);
+  f = fdopen (fd2, "w");
+  ASSERT (f);
+  ASSERT (fputc (buf[1], f) == buf[1]);
+  ASSERT (fclose (f) == 0);
+  errno = 0;
+  ASSERT (lseek (fd2, 0, SEEK_CUR) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (lseek (fd, 0, SEEK_CUR) == 2);
+
+  /* Likewise for an input stream.  */
+  fd2 = dup (fd);
+  ASSERT (0 <= fd2);
+  f = fdopen (fd2, "r");
+  ASSERT (f);
+  ASSERT (fgetc (f) == buf[2]);
+  ASSERT (fclose (f) == 0);
+  errno = 0;
+  ASSERT (lseek (fd2, 0, SEEK_CUR) == -1);
+  ASSERT (errno == EBADF);
+  ASSERT (lseek (fd, 0, SEEK_CUR) == 3);
+
+  /* Test that fclose() sets errno if someone else closes the stream
+     fd behind the back of stdio.  */
+  f = fdopen (fd, "w+");
+  ASSERT (f);
+  ASSERT (close (fd) == 0);
+  errno = 0;
+  ASSERT (fclose (f) == EOF);
+  ASSERT (errno == EBADF);
+
+  /* Clean up.  */
+  ASSERT (remove (BASE) == 0);
+
+  return 0;
+}
diff --git a/gltests/test-fflush.c b/gltests/test-fflush.c
index 3c36ed9..a6c0e18 100644
--- a/gltests/test-fflush.c
+++ b/gltests/test-fflush.c
@@ -50,7 +50,8 @@ main (void)
   if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5)
     {
       fputs ("Failed initial read of sample file.\n", stderr);
-      fclose (f);
+      if (f)
+        fclose (f);
       unlink ("test-fflush.txt");
       return 1;
     }
diff --git a/gltests/test-float.c b/gltests/test-float.c
new file mode 100644
index 0000000..47de211
--- /dev/null
+++ b/gltests/test-float.c
@@ -0,0 +1,384 @@
+/* Test of <float.h> substitute.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2011.  */
+
+#include <config.h>
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+/* Check that FLT_RADIX is a constant expression.  */
+int a[] = { FLT_RADIX };
+
+#if FLT_RADIX == 2
+
+/* Return 2^n.  */
+static float
+pow2f (int n)
+{
+  int k = n;
+  volatile float x = 1;
+  volatile float y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5f;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* Return 2^n.  */
+static double
+pow2d (int n)
+{
+  int k = n;
+  volatile double x = 1;
+  volatile double y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* Return 2^n.  */
+static long double
+pow2l (int n)
+{
+  int k = n;
+  volatile long double x = 1;
+  volatile long double y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5L;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* ----------------------- Check macros for 'float' ----------------------- */
+
+/* Check that the FLT_* macros expand to constant expressions.  */
+int fb[] =
+  {
+    FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP,
+    FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP
+  };
+float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX };
+
+static void
+test_float (void)
+{
+  /* Check that the value of FLT_MIN_EXP is well parenthesized.  */
+  ASSERT ((FLT_MIN_EXP % 101111) == (FLT_MIN_EXP) % 101111);
+
+  /* Check that the value of DBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((FLT_MIN_10_EXP % 101111) == (FLT_MIN_10_EXP) % 101111);
+
+  /* Check that 'float' is as specified in IEEE 754.  */
+  ASSERT (FLT_MANT_DIG == 24);
+  ASSERT (FLT_MIN_EXP == -125);
+  ASSERT (FLT_MAX_EXP == 128);
+
+  /* Check the value of FLT_MIN_10_EXP.  */
+  ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of FLT_DIG.  */
+  ASSERT (FLT_DIG == (int) ((FLT_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of FLT_MIN_10_EXP.  */
+  ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of FLT_MAX_10_EXP.  */
+  ASSERT (FLT_MAX_10_EXP == (int) (FLT_MAX_EXP * 0.30103));
+
+  /* Check the value of FLT_MAX.  */
+  {
+    volatile float m = FLT_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+      {
+        volatile float pow2_n = pow2f (n); /* 2^n */
+        volatile float x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of FLT_MIN.  */
+  {
+    volatile float m = FLT_MIN;
+    volatile float x = pow2f (FLT_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of FLT_EPSILON.  */
+  {
+    volatile float e = FLT_EPSILON;
+    volatile float me;
+    int n;
+
+    me = 1.0f + e;
+    ASSERT (me > 1.0f);
+    ASSERT (me - 1.0f == e);
+    for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+      {
+        volatile float half_n = pow2f (- n); /* 2^-n */
+        volatile float x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0f);
+      }
+  }
+}
+
+/* ----------------------- Check macros for 'double' ----------------------- */
+
+/* Check that the DBL_* macros expand to constant expressions.  */
+int db[] =
+  {
+    DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP,
+    DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP
+  };
+double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX };
+
+static void
+test_double (void)
+{
+  /* Check that the value of DBL_MIN_EXP is well parenthesized.  */
+  ASSERT ((DBL_MIN_EXP % 101111) == (DBL_MIN_EXP) % 101111);
+
+  /* Check that the value of DBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((DBL_MIN_10_EXP % 101111) == (DBL_MIN_10_EXP) % 101111);
+
+  /* Check that 'double' is as specified in IEEE 754.  */
+  ASSERT (DBL_MANT_DIG == 53);
+  ASSERT (DBL_MIN_EXP == -1021);
+  ASSERT (DBL_MAX_EXP == 1024);
+
+  /* Check the value of DBL_MIN_10_EXP.  */
+  ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of DBL_DIG.  */
+  ASSERT (DBL_DIG == (int) ((DBL_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of DBL_MIN_10_EXP.  */
+  ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of DBL_MAX_10_EXP.  */
+  ASSERT (DBL_MAX_10_EXP == (int) (DBL_MAX_EXP * 0.30103));
+
+  /* Check the value of DBL_MAX.  */
+  {
+    volatile double m = DBL_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+      {
+        volatile double pow2_n = pow2d (n); /* 2^n */
+        volatile double x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of DBL_MIN.  */
+  {
+    volatile double m = DBL_MIN;
+    volatile double x = pow2d (DBL_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of DBL_EPSILON.  */
+  {
+    volatile double e = DBL_EPSILON;
+    volatile double me;
+    int n;
+
+    me = 1.0 + e;
+    ASSERT (me > 1.0);
+    ASSERT (me - 1.0 == e);
+    for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+      {
+        volatile double half_n = pow2d (- n); /* 2^-n */
+        volatile double x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0);
+      }
+  }
+}
+
+/* -------------------- Check macros for 'long double' -------------------- */
+
+/* Check that the LDBL_* macros expand to constant expressions.  */
+int lb[] =
+  {
+    LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP,
+    LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP
+  };
+long double lc1 = LDBL_EPSILON;
+long double lc2 = LDBL_MIN;
+#if 0 /* LDBL_MAX is not a constant expression on some platforms.  */
+long double lc3 = LDBL_MAX;
+#endif
+
+static void
+test_long_double (void)
+{
+  /* Check that the value of LDBL_MIN_EXP is well parenthesized.  */
+  ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111);
+
+  /* Check that the value of LDBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111);
+
+  /* Check that 'long double' is at least as wide as 'double'.  */
+  ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG);
+  ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP);
+  ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP);
+
+  /* Check the value of LDBL_DIG.  */
+  ASSERT (LDBL_DIG == (int)((LDBL_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of LDBL_MIN_10_EXP.  */
+  ASSERT (LDBL_MIN_10_EXP == - (int) (- (LDBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of LDBL_MAX_10_EXP.  */
+  ASSERT (LDBL_MAX_10_EXP == (int) (LDBL_MAX_EXP * 0.30103));
+
+  /* Check the value of LDBL_MAX.  */
+  {
+    volatile long double m = LDBL_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+      {
+        volatile long double pow2_n = pow2l (n); /* 2^n */
+        volatile long double x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of LDBL_MIN.  */
+  {
+    volatile long double m = LDBL_MIN;
+    volatile long double x = pow2l (LDBL_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of LDBL_EPSILON.  */
+  {
+    volatile long double e = LDBL_EPSILON;
+    volatile long double me;
+    int n;
+
+    me = 1.0L + e;
+    ASSERT (me > 1.0L);
+    ASSERT (me - 1.0L == e);
+    for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+      {
+        volatile long double half_n = pow2l (- n); /* 2^-n */
+        volatile long double x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0L);
+      }
+  }
+}
+
+int
+main ()
+{
+  test_float ();
+  test_double ();
+
+  {
+    DECL_LONG_DOUBLE_ROUNDING
+
+    BEGIN_LONG_DOUBLE_ROUNDING ();
+
+    test_long_double ();
+
+    END_LONG_DOUBLE_ROUNDING ();
+  }
+
+  return 0;
+}
+
+#else
+
+int
+main ()
+{
+  fprintf (stderr, "FLT_RADIX is not 2.\n");
+  return 77;
+}
+
+#endif
diff --git a/gltests/test-fseek.c b/gltests/test-fseek.c
new file mode 100644
index 0000000..150b5f0
--- /dev/null
+++ b/gltests/test-fseek.c
@@ -0,0 +1,70 @@
+/* Test of fseek() function.
+   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2007.  */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+   fseek link warning if the user requested GNULIB_POSIXCHECK.  */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseek, int, (FILE *, long, int));
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv)
+{
+  /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+     iff argc > 1.  */
+  int expected = argc > 1 ? 0 : -1;
+  ASSERT (fseek (stdin, 0, SEEK_CUR) == expected);
+  if (argc > 1)
+    {
+      /* Test that fseek discards previously read ungetc data.  */
+      int ch = fgetc (stdin);
+      ASSERT (ch == '#');
+      ASSERT (ungetc (ch, stdin) == ch);
+      ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+      ch = fgetc (stdin);
+      ASSERT (ch == '/');
+      if (2 < argc)
+        {
+          if (FUNC_UNGETC_BROKEN)
+            {
+              fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+                     stderr);
+              return 77;
+            }
+          /* Test that fseek discards random ungetc data.  */
+          ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+        }
+      ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+      ASSERT (fgetc (stdin) == EOF);
+      /* Test that fseek resets end-of-file marker.  */
+      ASSERT (feof (stdin));
+      ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+      ASSERT (!feof (stdin));
+    }
+  return 0;
+}
diff --git a/gltests/test-fseek.sh b/gltests/test-fseek.sh
new file mode 100755
index 0000000..bad6c08
--- /dev/null
+++ b/gltests/test-fseek.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseek${EXEEXT} 1 < "$srcdir/test-fseek.sh" || exit 1
+echo hi | ./test-fseek${EXEEXT} || exit 1
+exit 0
diff --git a/gltests/test-fseek2.sh b/gltests/test-fseek2.sh
new file mode 100755
index 0000000..a4c9cb7
--- /dev/null
+++ b/gltests/test-fseek2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseek${EXEEXT} 1 2 < "$srcdir/test-fseek2.sh"
diff --git a/gltests/test-getaddrinfo.c b/gltests/test-getaddrinfo.c
index 4826989..d2984e2 100644
--- a/gltests/test-getaddrinfo.c
+++ b/gltests/test-getaddrinfo.c
@@ -107,7 +107,7 @@ simple (char const *host, char const *service)
 #endif
       /* Provide details if errno was set.  */
       if (res == EAI_SYSTEM)
-        dbgprintf ("system error: %s\n", strerror (err));
+        fprintf (stderr, "system error: %s\n", strerror (err));
 
       return 1;
     }
diff --git a/gltests/test-getcwd-lgpl.c b/gltests/test-getcwd-lgpl.c
new file mode 100644
index 0000000..69a7b90
--- /dev/null
+++ b/gltests/test-getcwd-lgpl.c
@@ -0,0 +1,102 @@
+/* Test of getcwd() function.
+   Copyright (C) 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  char *pwd1;
+  char *pwd2;
+  /* If the user provides an argument, attempt to chdir there first.  */
+  if (1 < argc)
+    {
+      if (chdir (argv[1]) == 0)
+        printf ("changed to directory %s\n", argv[1]);
+    }
+
+  pwd1 = getcwd (NULL, 0);
+  ASSERT (pwd1 && *pwd1);
+  if (1 < argc)
+    printf ("cwd=%s\n", pwd1);
+
+  /* Make sure the result is usable.  */
+  ASSERT (chdir (pwd1) == 0);
+  ASSERT (chdir (".//./.") == 0);
+
+  /* Make sure that result is normalized.  */
+  pwd2 = getcwd (NULL, 0);
+  ASSERT (pwd2);
+  ASSERT (strcmp (pwd1, pwd2) == 0);
+  free (pwd2);
+  {
+    size_t len = strlen (pwd1);
+    ssize_t i = len - 10;
+    if (i < 1)
+      i = 1;
+    pwd2 = getcwd (NULL, len + 1);
+    ASSERT (pwd2);
+    free (pwd2);
+    pwd2 = malloc (len + 2);
+    for ( ; i <= len; i++)
+      {
+        char *tmp;
+        errno = 0;
+        ASSERT (getcwd (pwd2, i) == NULL);
+        ASSERT (errno == ERANGE);
+        /* Allow either glibc or BSD behavior, since POSIX allows both.  */
+        errno = 0;
+        tmp = getcwd (NULL, i);
+        if (tmp)
+          {
+            ASSERT (strcmp (pwd1, tmp) == 0);
+            free (tmp);
+          }
+        else
+          {
+            ASSERT (errno == ERANGE);
+          }
+      }
+    ASSERT (getcwd (pwd2, len + 1) == pwd2);
+    pwd2[len] = '/';
+    pwd2[len + 1] = '\0';
+  }
+  ASSERT (strstr (pwd2, "/./") == NULL);
+  ASSERT (strstr (pwd2, "/../") == NULL);
+  ASSERT (strstr (pwd2 + 1 + (pwd2[1] == '/'), "//") == NULL);
+
+  /* Validate a POSIX requirement on size.  */
+  errno = 0;
+  ASSERT (getcwd(pwd2, 0) == NULL);
+  ASSERT (errno == EINVAL);
+
+  free (pwd1);
+  free (pwd2);
+
+  return 0;
+}
diff --git a/gltests/test-intprops.c b/gltests/test-intprops.c
new file mode 100644
index 0000000..1a34d77
--- /dev/null
+++ b/gltests/test-intprops.c
@@ -0,0 +1,275 @@
+/* Test intprops.h.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+/* Tell gcc not to warn about the many (X < 0) expressions that
+   the overflow macros expand to.  */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
+#include <config.h>
+
+#include "intprops.h"
+#include "verify.h"
+
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "macros.h"
+
+/* VERIFY (X) uses a static assertion for compilers that are known to work,
+   and falls back on a dynamic assertion for other compilers.
+   These tests should be checkable via 'verify' rather than 'ASSERT', but
+   using 'verify' would run into a bug with HP-UX 11.23 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#if __GNUC__ || __SUNPRO_C
+# define VERIFY(x) do { verify (x); } while (0)
+#else
+# define VERIFY(x) ASSERT (x)
+#endif
+
+int
+main (void)
+{
+  /* Use VERIFY for tests that must be integer constant expressions,
+     ASSERT otherwise.  */
+
+  /* TYPE_IS_INTEGER.  */
+  ASSERT (TYPE_IS_INTEGER (bool));
+  ASSERT (TYPE_IS_INTEGER (char));
+  ASSERT (TYPE_IS_INTEGER (signed char));
+  ASSERT (TYPE_IS_INTEGER (unsigned char));
+  ASSERT (TYPE_IS_INTEGER (short int));
+  ASSERT (TYPE_IS_INTEGER (unsigned short int));
+  ASSERT (TYPE_IS_INTEGER (int));
+  ASSERT (TYPE_IS_INTEGER (unsigned int));
+  ASSERT (TYPE_IS_INTEGER (long int));
+  ASSERT (TYPE_IS_INTEGER (unsigned long int));
+  ASSERT (TYPE_IS_INTEGER (intmax_t));
+  ASSERT (TYPE_IS_INTEGER (uintmax_t));
+  ASSERT (! TYPE_IS_INTEGER (float));
+  ASSERT (! TYPE_IS_INTEGER (double));
+  ASSERT (! TYPE_IS_INTEGER (long double));
+
+  /* TYPE_SIGNED.  */
+  /* VERIFY (! TYPE_SIGNED (bool)); // not guaranteed by gnulib substitute */
+  VERIFY (TYPE_SIGNED (signed char));
+  VERIFY (! TYPE_SIGNED (unsigned char));
+  VERIFY (TYPE_SIGNED (short int));
+  VERIFY (! TYPE_SIGNED (unsigned short int));
+  VERIFY (TYPE_SIGNED (int));
+  VERIFY (! TYPE_SIGNED (unsigned int));
+  VERIFY (TYPE_SIGNED (long int));
+  VERIFY (! TYPE_SIGNED (unsigned long int));
+  VERIFY (TYPE_SIGNED (intmax_t));
+  VERIFY (! TYPE_SIGNED (uintmax_t));
+  ASSERT (TYPE_SIGNED (float));
+  ASSERT (TYPE_SIGNED (double));
+  ASSERT (TYPE_SIGNED (long double));
+
+  /* Integer representation.  */
+  VERIFY (INT_MIN + INT_MAX < 0
+          ? (TYPE_TWOS_COMPLEMENT (int)
+             && ! TYPE_ONES_COMPLEMENT (int) && ! TYPE_SIGNED_MAGNITUDE (int))
+          : (! TYPE_TWOS_COMPLEMENT (int)
+             && (TYPE_ONES_COMPLEMENT (int) || TYPE_SIGNED_MAGNITUDE (int))));
+
+  /* TYPE_MINIMUM, TYPE_MAXIMUM.  */
+  VERIFY (TYPE_MINIMUM (char) == CHAR_MIN);
+  VERIFY (TYPE_MAXIMUM (char) == CHAR_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned char) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+  VERIFY (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+  VERIFY (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+  VERIFY (TYPE_MINIMUM (short int) == SHRT_MIN);
+  VERIFY (TYPE_MAXIMUM (short int) == SHRT_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned short int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+  VERIFY (TYPE_MINIMUM (int) == INT_MIN);
+  VERIFY (TYPE_MAXIMUM (int) == INT_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+  VERIFY (TYPE_MINIMUM (long int) == LONG_MIN);
+  VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+  VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
+  VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
+  VERIFY (TYPE_MINIMUM (uintmax_t) == 0);
+  VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+
+  /* INT_BITS_STRLEN_BOUND.  */
+  VERIFY (INT_BITS_STRLEN_BOUND (1) == 1);
+  VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789);
+
+  /* INT_STRLEN_BOUND, INT_BUFSIZE_BOUND.  */
+  #ifdef INT32_MAX /* POSIX guarantees int32_t; this ports to non-POSIX.  */
+  VERIFY (INT_STRLEN_BOUND (int32_t) == sizeof ("-2147483648") - 1);
+  VERIFY (INT_BUFSIZE_BOUND (int32_t) == sizeof ("-2147483648"));
+  #endif
+  #ifdef INT64_MAX
+  VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1);
+  VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808"));
+  #endif
+
+  /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as
+     INT_<op>_OVERFLOW tests, so define a single macro to do both.  */
+  #define CHECK_BINOP(op, a, b, min, max, overflow)                      \
+    (INT_##op##_RANGE_OVERFLOW (a, b, min, max) == (overflow)            \
+     && INT_##op##_OVERFLOW (a, b) == (overflow))
+  #define CHECK_UNOP(op, a, min, max, overflow)                          \
+    (INT_##op##_RANGE_OVERFLOW (a, min, max) == (overflow)               \
+     && INT_##op##_OVERFLOW (a) == (overflow))
+
+  /* INT_<op>_RANGE_OVERFLOW, INT_<op>_OVERFLOW.  */
+  VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX));
+  VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1));
+  VERIFY (CHECK_BINOP (ADD, INT_MAX, 1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, INT_MAX, -1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (ADD, INT_MIN, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (ADD, INT_MIN, -1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, UINT_MAX, 1u, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, 0u, 1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, -1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, 1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, -1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, UINT_MAX, 1u, 0u, UINT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, 0u, 1u, 0u, UINT_MAX, true));
+
+  VERIFY (CHECK_UNOP (NEGATE, INT_MIN, INT_MIN, INT_MAX,
+                      TYPE_TWOS_COMPLEMENT (int)));
+  VERIFY (CHECK_UNOP (NEGATE, 0, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, INT_MAX, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, 0u, 0u, UINT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, 1u, 0u, UINT_MAX, true));
+  VERIFY (CHECK_UNOP (NEGATE, UINT_MAX, 0u, UINT_MAX, true));
+
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MAX, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MIN, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MAX, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MIN, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, -1, INT_MIN, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
+                       LONG_MIN, LONG_MIN, false));
+
+  VERIFY (CHECK_BINOP (DIVIDE, INT_MIN, -1, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (DIVIDE, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (DIVIDE, (unsigned int) INT_MIN,
+                       -1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (REMAINDER, INT_MIN, -1, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (REMAINDER, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (REMAINDER, (unsigned int) INT_MIN,
+                       -1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX, 1, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2 + 1, 1, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2, 1, 0u, UINT_MAX, false));
+
+  /* INT_<op>_OVERFLOW with mixed types.  */
+  #define CHECK_SUM(a, b, overflow)                       \
+    VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow));       \
+    VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow))
+  CHECK_SUM (-1, LONG_MIN, true);
+  CHECK_SUM (-1, UINT_MAX, false);
+  CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN);
+  CHECK_SUM (0u, -1, true);
+  CHECK_SUM (0u, 0, false);
+  CHECK_SUM (0u, 1, false);
+  CHECK_SUM (1, LONG_MAX, true);
+  CHECK_SUM (1, UINT_MAX, true);
+  CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX);
+  CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX);
+  CHECK_SUM (1u, INT_MIN, true);
+
+  VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u));
+  VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1));
+  VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1));
+  VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1));
+  VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u));
+  VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u));
+
+  #define CHECK_PRODUCT(a, b, overflow)                   \
+    VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow));   \
+    VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow))
+
+  CHECK_PRODUCT (-1, 1u, true);
+  CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN));
+  CHECK_PRODUCT (-1, UINT_MAX, true);
+  CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true);
+  CHECK_PRODUCT (-12345, LONG_MAX / -12345, false);
+  CHECK_PRODUCT (0, -1, false);
+  CHECK_PRODUCT (0, 0, false);
+  CHECK_PRODUCT (0, 0u, false);
+  CHECK_PRODUCT (0, 1, false);
+  CHECK_PRODUCT (0, INT_MAX, false);
+  CHECK_PRODUCT (0, INT_MIN, false);
+  CHECK_PRODUCT (0, UINT_MAX, false);
+  CHECK_PRODUCT (0u, -1, false);
+  CHECK_PRODUCT (0u, 0, false);
+  CHECK_PRODUCT (0u, 0u, false);
+  CHECK_PRODUCT (0u, 1, false);
+  CHECK_PRODUCT (0u, INT_MAX, false);
+  CHECK_PRODUCT (0u, INT_MIN, false);
+  CHECK_PRODUCT (0u, UINT_MAX, false);
+  CHECK_PRODUCT (1, INT_MAX, false);
+  CHECK_PRODUCT (1, INT_MIN, false);
+  CHECK_PRODUCT (1, UINT_MAX, false);
+  CHECK_PRODUCT (1u, INT_MIN, true);
+  CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX);
+  CHECK_PRODUCT (INT_MAX, UINT_MAX, true);
+  CHECK_PRODUCT (INT_MAX, ULONG_MAX, true);
+  CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true);
+  CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false);
+  CHECK_PRODUCT (INT_MIN, UINT_MAX, true);
+  CHECK_PRODUCT (INT_MIN, ULONG_MAX, true);
+
+  VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L)
+          == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX));
+  VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u));
+  VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u));
+  VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u));
+  VERIFY (INT_DIVIDE_OVERFLOW (11u, -10));
+  VERIFY (INT_DIVIDE_OVERFLOW (10u, -10));
+  VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10));
+
+  VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L)
+          == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+  VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX));
+  VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX));
+  VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX)
+          == (INTMAX_MAX < UINT_MAX
+              && - (unsigned int) INTMAX_MIN % UINT_MAX != 0));
+  VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX)
+          == (INT_MIN % ULONG_MAX != 1));
+  VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1));
+  VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39));
+  VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39));
+  VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39));
+  VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX));
+
+  return 0;
+}
diff --git a/gltests/test-inttypes.c b/gltests/test-inttypes.c
new file mode 100644
index 0000000..5bf952c
--- /dev/null
+++ b/gltests/test-inttypes.c
@@ -0,0 +1,121 @@
+/* Test of <inttypes.h> substitute.
+   Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2007.  */
+
+#include <config.h>
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* Tests for macros supposed to be defined in inttypes.h.  */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+  PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+  PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+  PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+  PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+  PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+  PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+  PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+  PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+  PRIdLEAST64 PRIiLEAST64
+  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+  PRIdFAST64 PRIiFAST64
+  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+  PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+  ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+  SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+  SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+  SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+  SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+  SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+  SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+  SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+  SCNo64 SCNu64 SCNx64
+#endif
+  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+  SCNdLEAST64 SCNiLEAST64
+  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+  SCNdFAST64 SCNiFAST64
+  SCNoFAST64 SCNuFAST64 SCNxFAST64
+  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+  SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+  SCNoPTR SCNuPTR SCNxPTR
+#endif
+  ;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/gltests/test-lock.c b/gltests/test-lock.c
index 04ce076..3f8846b 100644
--- a/gltests/test-lock.c
+++ b/gltests/test-lock.c
@@ -143,9 +143,9 @@ lock_mutator_thread (void *arg)
     {
       int i1, i2, value;
 
-      dbgprintf ("Mutator %p before lock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ());
       gl_lock_lock (my_lock);
-      dbgprintf ("Mutator %p after  lock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  lock\n", gl_thread_self_pointer ());
 
       i1 = random_account ();
       i2 = random_account ();
@@ -153,20 +153,20 @@ lock_mutator_thread (void *arg)
       account[i1] += value;
       account[i2] -= value;
 
-      dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ());
       gl_lock_unlock (my_lock);
-      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self_pointer ());
 
-      dbgprintf ("Mutator %p before check lock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ());
       gl_lock_lock (my_lock);
       check_accounts ();
       gl_lock_unlock (my_lock);
-      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self_pointer 
());
 
       yield ();
     }
 
-  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -177,16 +177,16 @@ lock_checker_thread (void *arg)
 {
   while (!lock_checker_done)
     {
-      dbgprintf ("Checker %p before check lock\n", gl_thread_self ());
+      dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ());
       gl_lock_lock (my_lock);
       check_accounts ();
       gl_lock_unlock (my_lock);
-      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self_pointer 
());
 
       yield ();
     }
 
-  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -233,9 +233,9 @@ rwlock_mutator_thread (void *arg)
     {
       int i1, i2, value;
 
-      dbgprintf ("Mutator %p before wrlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before wrlock\n", gl_thread_self_pointer ());
       gl_rwlock_wrlock (my_rwlock);
-      dbgprintf ("Mutator %p after  wrlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  wrlock\n", gl_thread_self_pointer ());
 
       i1 = random_account ();
       i2 = random_account ();
@@ -243,14 +243,14 @@ rwlock_mutator_thread (void *arg)
       account[i1] += value;
       account[i2] -= value;
 
-      dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ());
       gl_rwlock_unlock (my_rwlock);
-      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  unlock\n", gl_thread_self_pointer ());
 
       yield ();
     }
 
-  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -261,16 +261,16 @@ rwlock_checker_thread (void *arg)
 {
   while (!rwlock_checker_done)
     {
-      dbgprintf ("Checker %p before check rdlock\n", gl_thread_self ());
+      dbgprintf ("Checker %p before check rdlock\n", gl_thread_self_pointer 
());
       gl_rwlock_rdlock (my_rwlock);
       check_accounts ();
       gl_rwlock_unlock (my_rwlock);
-      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self_pointer 
());
 
       yield ();
     }
 
-  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -315,9 +315,9 @@ recshuffle (void)
 {
   int i1, i2, value;
 
-  dbgprintf ("Mutator %p before lock\n", gl_thread_self ());
+  dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ());
   gl_recursive_lock_lock (my_reclock);
-  dbgprintf ("Mutator %p after  lock\n", gl_thread_self ());
+  dbgprintf ("Mutator %p after  lock\n", gl_thread_self_pointer ());
 
   i1 = random_account ();
   i2 = random_account ();
@@ -329,9 +329,9 @@ recshuffle (void)
   if (((unsigned int) rand () >> 3) % 2)
     recshuffle ();
 
-  dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
+  dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ());
   gl_recursive_lock_unlock (my_reclock);
-  dbgprintf ("Mutator %p after  unlock\n", gl_thread_self ());
+  dbgprintf ("Mutator %p after  unlock\n", gl_thread_self_pointer ());
 }
 
 static void *
@@ -343,16 +343,16 @@ reclock_mutator_thread (void *arg)
     {
       recshuffle ();
 
-      dbgprintf ("Mutator %p before check lock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ());
       gl_recursive_lock_lock (my_reclock);
       check_accounts ();
       gl_recursive_lock_unlock (my_reclock);
-      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self ());
+      dbgprintf ("Mutator %p after  check unlock\n", gl_thread_self_pointer 
());
 
       yield ();
     }
 
-  dbgprintf ("Mutator %p dying.\n", gl_thread_self ());
+  dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -363,16 +363,16 @@ reclock_checker_thread (void *arg)
 {
   while (!reclock_checker_done)
     {
-      dbgprintf ("Checker %p before check lock\n", gl_thread_self ());
+      dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ());
       gl_recursive_lock_lock (my_reclock);
       check_accounts ();
       gl_recursive_lock_unlock (my_reclock);
-      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self ());
+      dbgprintf ("Checker %p after  check unlock\n", gl_thread_self_pointer 
());
 
       yield ();
     }
 
-  dbgprintf ("Checker %p dying.\n", gl_thread_self ());
+  dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ());
   return NULL;
 }
 
@@ -444,7 +444,7 @@ once_contender_thread (void *arg)
         break;
 
       dbgprintf ("Contender %p waiting for signal for round %d\n",
-                 gl_thread_self (), repeat);
+                 gl_thread_self_pointer (), repeat);
 #if ENABLE_LOCKING
       /* Wait for the signal to go.  */
       gl_rwlock_rdlock (fire_signal[repeat]);
@@ -456,7 +456,7 @@ once_contender_thread (void *arg)
         yield ();
 #endif
       dbgprintf ("Contender %p got the     signal for round %d\n",
-                 gl_thread_self (), repeat);
+                 gl_thread_self_pointer (), repeat);
 
       /* Contend for execution.  */
       gl_once (once_control, once_execute);
diff --git a/gltests/test-perror.sh b/gltests/test-perror.sh
index f2c8fdc..7274d32 100755
--- a/gltests/test-perror.sh
+++ b/gltests/test-perror.sh
@@ -1,27 +1,24 @@
 #!/bin/sh
-
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
 
 # Test NULL prefix. Result should not contain a number.
-tmpfiles="$tmpfiles t-perror.tmp"
-./test-perror${EXEEXT} 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
-if grep '[0-9]' t-perror.tmp > /dev/null; then
-  rm -fr $tmpfiles; exit 1
-fi
+test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
+grep '[0-9]' t-perror.tmp > /dev/null \
+  && fail_ "result should not contain a number"
 
 # Test empty prefix. Result should be the same.
-tmpfiles="$tmpfiles t-perror1.tmp"
-./test-perror${EXEEXT} '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
-diff t-perror.tmp t-perror1.tmp
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
+diff t-perror.tmp t-perror1.tmp \
+  || fail_ "empty prefix should behave like NULL argument"
 
 # Test non-empty prefix.
-tmpfiles="$tmpfiles t-perror2.tmp t-perror3.tmp"
-./test-perror${EXEEXT} 'foo' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > 
t-perror3.tmp
+test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp
 sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp
-diff t-perror2.tmp t-perror3.tmp
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly"
+
+# Test exit status.
+test-perror >out 2>/dev/null || fail_ "unexpected exit status"
+test -s out && fail_ "unexpected output"
 
-rm -fr $tmpfiles
-exit 0
+Exit 0
diff --git a/gltests/test-perror2.c b/gltests/test-perror2.c
new file mode 100644
index 0000000..e230f92
--- /dev/null
+++ b/gltests/test-perror2.c
@@ -0,0 +1,137 @@
+/* Test of perror() function.
+   Copyright (C) 2011 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, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+/* This test intentionally parses stderr.  So, we arrange to have fd 10
+   (outside the range of interesting fd's during the test) set up to
+   duplicate the original stderr.  */
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+#define BASE "test-perror2"
+
+int
+main (void)
+{
+  /* We change fd 2 later, so save it in fd 10.  */
+  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+    return 2;
+
+  ASSERT (freopen (BASE ".tmp", "w+", stderr) == stderr);
+
+  /* Test that perror does not clobber strerror buffer.  */
+  {
+    const char *msg1;
+    const char *msg2;
+    const char *msg3;
+    const char *msg4;
+    char *str1;
+    char *str2;
+    char *str3;
+    char *str4;
+
+    msg1 = strerror (ENOENT);
+    ASSERT (msg1);
+    str1 = strdup (msg1);
+    ASSERT (str1);
+
+    msg2 = strerror (ERANGE);
+    ASSERT (msg2);
+    str2 = strdup (msg2);
+    ASSERT (str2);
+
+    msg3 = strerror (-4);
+    ASSERT (msg3);
+    str3 = strdup (msg3);
+    ASSERT (str3);
+
+    msg4 = strerror (1729576);
+    ASSERT (msg4);
+    str4 = strdup (msg4);
+    ASSERT (str4);
+
+    errno = EACCES;
+    perror ("");
+    errno = -5;
+    perror ("");
+    ASSERT (!ferror (stderr));
+    ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+    ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+    ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+    ASSERT (STREQ (msg4, str4));
+
+    free (str1);
+    free (str2);
+    free (str3);
+    free (str4);
+  }
+
+  /* Test that perror uses the same message as strerror.  */
+  {
+    int errs[] = { EACCES, 0, -3, };
+    int i;
+    for (i = 0; i < SIZEOF (errs); i++)
+      {
+        char buf[256];
+        char *err = strerror (errs[i]);
+
+        ASSERT (err);
+        ASSERT (strlen (err) < sizeof buf);
+        rewind (stderr);
+        ASSERT (ftruncate (fileno (stderr), 0) == 0);
+        errno = errs[i];
+        perror (NULL);
+        ASSERT (!ferror (stderr));
+        rewind (stderr);
+        ASSERT (fgets (buf, sizeof buf, stderr) == buf);
+        ASSERT (strstr (buf, err));
+      }
+  }
+
+  /* Test that perror reports write failure.  */
+  {
+    ASSERT (freopen (BASE ".tmp", "r", stderr) == stderr);
+    ASSERT (setvbuf (stderr, NULL, _IONBF, BUFSIZ) == 0);
+    errno = -1;
+    ASSERT (!ferror (stderr));
+    perror (NULL);
+#if 0
+    /* Commented out until cygwin behaves:
+       http://sourceware.org/ml/newlib/2011/msg00228.html */
+    ASSERT (errno > 0);
+    /* Commented out until glibc behaves:
+       http://sourceware.org/bugzilla/show_bug.cgi?id=12792 */
+    ASSERT (ferror (stderr));
+#endif
+  }
+
+  ASSERT (fclose (stderr) == 0);
+  ASSERT (remove (BASE ".tmp") == 0);
+
+  return 0;
+}
diff --git a/gltests/test-stat.c b/gltests/test-stat.c
index 4cda089..cd74491 100644
--- a/gltests/test-stat.c
+++ b/gltests/test-stat.c
@@ -33,7 +33,6 @@ SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
 #include <stdio.h>
 #include <unistd.h>
 
-#include "pathmax.h"
 #include "same-inode.h"
 #include "macros.h"
 
diff --git a/gltests/test-stat.h b/gltests/test-stat.h
index 22552dc..3c8f7ad 100644
--- a/gltests/test-stat.h
+++ b/gltests/test-stat.h
@@ -27,9 +27,9 @@ test_stat_func (int (*func) (char const *, struct stat *), 
bool print)
 {
   struct stat st1;
   struct stat st2;
-  char cwd[PATH_MAX];
+  char *cwd = getcwd (NULL, 0);
 
-  ASSERT (getcwd (cwd, PATH_MAX) == cwd);
+  ASSERT (cwd);
   ASSERT (func (".", &st1) == 0);
   ASSERT (func ("./", &st2) == 0);
   ASSERT (SAME_INODE (st1, st2));
diff --git a/gltests/test-strerror.c b/gltests/test-strerror.c
index 66dbe82..3ffb12e 100644
--- a/gltests/test-strerror.c
+++ b/gltests/test-strerror.c
@@ -33,25 +33,44 @@ main (void)
 {
   char *str;
 
+  errno = 0;
   str = strerror (EACCES);
   ASSERT (str);
   ASSERT (*str);
+  ASSERT (errno == 0);
 
+  errno = 0;
   str = strerror (ETIMEDOUT);
   ASSERT (str);
   ASSERT (*str);
+  ASSERT (errno == 0);
 
+  errno = 0;
   str = strerror (EOVERFLOW);
   ASSERT (str);
   ASSERT (*str);
+  ASSERT (errno == 0);
 
+  /* POSIX requires strerror (0) to succeed.  Reject use of "Unknown
+     error", but allow "Success", "No error", or even Solaris' "Error
+     0" which are distinct patterns from true out-of-range strings.
+     http://austingroupbugs.net/view.php?id=382  */
+  errno = 0;
   str = strerror (0);
   ASSERT (str);
   ASSERT (*str);
-
+  ASSERT (errno == 0);
+  ASSERT (strstr (str, "nknown") == NULL);
+  ASSERT (strstr (str, "ndefined") == NULL);
+
+  /* POSIX requires strerror to produce a non-NULL result for all
+     inputs; as an extension, we also guarantee a non-empty reseult.
+     Reporting EINVAL is optional.  */
+  errno = 0;
   str = strerror (-3);
   ASSERT (str);
   ASSERT (*str);
+  ASSERT (errno == 0 || errno == EINVAL);
 
   return 0;
 }
diff --git a/gltests/test-strerror_r.c b/gltests/test-strerror_r.c
new file mode 100644
index 0000000..956c458
--- /dev/null
+++ b/gltests/test-strerror_r.c
@@ -0,0 +1,182 @@
+/* Test of strerror_r() function.
+   Copyright (C) 2007-2011 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, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strerror_r, int, (int, char *, size_t));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  char buf[100];
+  int ret;
+
+  /* Test results with valid errnum and enough room.  */
+
+  errno = 0;
+  buf[0] = '\0';
+  ASSERT (strerror_r (EACCES, buf, sizeof buf) == 0);
+  ASSERT (buf[0] != '\0');
+  ASSERT (errno == 0);
+  ASSERT (strlen (buf) < sizeof buf);
+
+  errno = 0;
+  buf[0] = '\0';
+  ASSERT (strerror_r (ETIMEDOUT, buf, sizeof buf) == 0);
+  ASSERT (buf[0] != '\0');
+  ASSERT (errno == 0);
+  ASSERT (strlen (buf) < sizeof buf);
+
+  errno = 0;
+  buf[0] = '\0';
+  ASSERT (strerror_r (EOVERFLOW, buf, sizeof buf) == 0);
+  ASSERT (buf[0] != '\0');
+  ASSERT (errno == 0);
+  ASSERT (strlen (buf) < sizeof buf);
+
+  /* POSIX requires strerror (0) to succeed.  Reject use of "Unknown
+     error", but allow "Success", "No error", or even Solaris' "Error
+     0" which are distinct patterns from true out-of-range strings.
+     http://austingroupbugs.net/view.php?id=382  */
+  errno = 0;
+  buf[0] = '\0';
+  ret = strerror_r (0, buf, sizeof buf);
+  ASSERT (ret == 0);
+  ASSERT (buf[0]);
+  ASSERT (errno == 0);
+  ASSERT (strstr (buf, "nknown") == NULL);
+  ASSERT (strstr (buf, "ndefined") == NULL);
+
+  /* Test results with out-of-range errnum and enough room.  POSIX
+     allows an empty string on success, and allows an unchanged buf on
+     error, but these are not useful, so we guarantee contents.  */
+  errno = 0;
+  buf[0] = '^';
+  ret = strerror_r (-3, buf, sizeof buf);
+  ASSERT (ret == 0 || ret == EINVAL);
+  ASSERT (buf[0] != '^');
+  ASSERT (*buf);
+  ASSERT (errno == 0);
+  ASSERT (strlen (buf) < sizeof buf);
+
+  /* Test results with a too small buffer.  POSIX requires an error;
+     only ERANGE for 0 and valid errors, and a choice of ERANGE or
+     EINVAL for out-of-range values.  On error, POSIX permits buf to
+     be empty, unchanged, or unterminated, but these are not useful,
+     so we guarantee NUL-terminated truncated contents for all but
+     size 0.  http://austingroupbugs.net/view.php?id=398.  Also ensure
+     that no out-of-bounds writes occur.  */
+  {
+    int errs[] = { EACCES, 0, -3, };
+    int j;
+
+    buf[sizeof buf - 1] = '\0';
+    for (j = 0; j < SIZEOF (errs); j++)
+      {
+        int err = errs[j];
+        char buf2[sizeof buf] = "";
+        size_t len;
+        size_t i;
+
+        strerror_r (err, buf2, sizeof buf2);
+        len = strlen (buf2);
+        ASSERT (len < sizeof buf);
+
+        for (i = 0; i <= len; i++)
+          {
+            memset (buf, '^', sizeof buf - 1);
+            errno = 0;
+            ret = strerror_r (err, buf, i);
+            ASSERT (errno == 0);
+            if (err < 0)
+              ASSERT (ret == ERANGE || ret == EINVAL);
+            else
+              ASSERT (ret == ERANGE);
+            if (i)
+              {
+                ASSERT (strncmp (buf, buf2, i - 1) == 0);
+                ASSERT (buf[i - 1] == '\0');
+              }
+            ASSERT (strspn (buf + i, "^") == sizeof buf - 1 - i);
+          }
+
+        strcpy (buf, "BADFACE");
+        errno = 0;
+        ret = strerror_r (err, buf, len + 1);
+        ASSERT (ret != ERANGE);
+        ASSERT (errno == 0);
+        ASSERT (strcmp (buf, buf2) == 0);
+      }
+  }
+
+#if GNULIB_STRERROR
+  /* Test that strerror_r does not clobber strerror buffer.  On some
+     platforms, this test can only succeed if gnulib also replaces
+     strerror.  */
+  {
+    const char *msg1;
+    const char *msg2;
+    const char *msg3;
+    const char *msg4;
+    char *str1;
+    char *str2;
+    char *str3;
+    char *str4;
+
+    msg1 = strerror (ENOENT);
+    ASSERT (msg1);
+    str1 = strdup (msg1);
+    ASSERT (str1);
+
+    msg2 = strerror (ERANGE);
+    ASSERT (msg2);
+    str2 = strdup (msg2);
+    ASSERT (str2);
+
+    msg3 = strerror (-4);
+    ASSERT (msg3);
+    str3 = strdup (msg3);
+    ASSERT (str3);
+
+    msg4 = strerror (1729576);
+    ASSERT (msg4);
+    str4 = strdup (msg4);
+    ASSERT (str4);
+
+    strerror_r (EACCES, buf, sizeof buf);
+    strerror_r (-5, buf, sizeof buf);
+    ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+    ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+    ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+    ASSERT (STREQ (msg4, str4));
+
+    free (str1);
+    free (str2);
+    free (str3);
+    free (str4);
+  }
+#endif
+
+  return 0;
+}
diff --git a/gltests/test-verify.c b/gltests/test-verify.c
index 512c021..454f4f4 100644
--- a/gltests/test-verify.c
+++ b/gltests/test-verify.c
@@ -55,9 +55,9 @@ function (int n)
   verify (1 == 1); verify (1 == 1); /* should be ok */
 
   if (n)
-    return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should 
be ok */
+    return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* 
should be ok */
 #if EXP_FAIL == 5
-  return (verify_true (1 == 2), 5); /* should give ERROR */
+  return verify_expr (1 == 2, 5); /* should give ERROR */
 #endif
   return 0;
 }
diff --git a/gltests/time.in.h b/gltests/time.in.h
index cb533a4..1fbebf4 100644
--- a/gltests/time.in.h
+++ b/gltests/time.in.h
@@ -28,13 +28,13 @@
    without adding our own declarations.  */
 #if (defined __need_time_t || defined __need_clock_t \
      || defined __need_timespec \
-     || defined _GL_TIME_H)
+     || defined address@hidden@_TIME_H)
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
 #else
 
-# define _GL_TIME_H
+# define address@hidden@_TIME_H
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
diff --git a/gltests/unistr/test-u8-mbtoucr.c b/gltests/unistr/test-u8-mbtoucr.c
new file mode 100644
index 0000000..092af56
--- /dev/null
+++ b/gltests/unistr/test-u8-mbtoucr.c
@@ -0,0 +1,187 @@
+/* Test of u8_mbtoucr() function.
+   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2010.  */
+
+#include <config.h>
+
+#include "unistr.h"
+
+#include "macros.h"
+
+int
+main ()
+{
+  ucs4_t uc;
+  int ret;
+
+  /* Test NUL unit input.  */
+  {
+    static const uint8_t input[] = "";
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == 1);
+    ASSERT (uc == 0);
+  }
+
+  /* Test ISO 646 unit input.  */
+  {
+    ucs4_t c;
+    uint8_t buf[1];
+
+    for (c = 0; c < 0x80; c++)
+      {
+        buf[0] = c;
+        uc = 0xBADFACE;
+        ret = u8_mbtoucr (&uc, buf, 1);
+        ASSERT (ret == 1);
+        ASSERT (uc == c);
+      }
+  }
+
+  /* Test 2-byte character input.  */
+  {
+    static const uint8_t input[] = { 0xC3, 0x97 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == 2);
+    ASSERT (uc == 0x00D7);
+  }
+
+  /* Test 3-byte character input.  */
+  {
+    static const uint8_t input[] = { 0xE2, 0x82, 0xAC };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 3);
+    ASSERT (ret == 3);
+    ASSERT (uc == 0x20AC);
+  }
+
+  /* Test 4-byte character input.  */
+  {
+    static const uint8_t input[] = { 0xF4, 0x8F, 0xBF, 0xBD };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 4);
+    ASSERT (ret == 4);
+    ASSERT (uc == 0x10FFFD);
+  }
+
+  /* Test incomplete/invalid 1-byte input.  */
+  {
+    static const uint8_t input[] = { 0xC1 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xC3 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xE2 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF4 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xFE };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 1);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+
+  /* Test incomplete/invalid 2-byte input.  */
+  {
+    static const uint8_t input[] = { 0xE0, 0x9F };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xE2, 0x82 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xE2, 0xD0 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF0, 0x8F };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF3, 0x8F };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF3, 0xD0 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 2);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+
+  /* Test incomplete/invalid 3-byte input.  */
+  {
+    static const uint8_t input[] = { 0xF3, 0x8F, 0xBF };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 3);
+    ASSERT (ret == -2);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF3, 0xD0, 0xBF };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 3);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+  {
+    static const uint8_t input[] = { 0xF3, 0x8F, 0xD0 };
+    uc = 0xBADFACE;
+    ret = u8_mbtoucr (&uc, input, 3);
+    ASSERT (ret == -1);
+    ASSERT (uc == 0xFFFD);
+  }
+
+  return 0;
+}
diff --git a/gltests/unistr/test-u8-uctomb.c b/gltests/unistr/test-u8-uctomb.c
new file mode 100644
index 0000000..01e6b4e
--- /dev/null
+++ b/gltests/unistr/test-u8-uctomb.c
@@ -0,0 +1,157 @@
+/* Test of u8_uctomb() function.
+   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2010.  */
+
+#include <config.h>
+
+#include "unistr.h"
+
+#include "macros.h"
+
+#define MAGIC 0xBA
+
+int
+main ()
+{
+  /* Test ISO 646 character, in particular the NUL character.  */
+  {
+    ucs4_t uc;
+
+    for (uc = 0; uc < 0x80; uc++)
+      {
+        uint8_t buf[5] = { MAGIC, MAGIC, MAGIC, MAGIC, MAGIC };
+        int ret;
+
+        ret = u8_uctomb (buf, uc, 0);
+        ASSERT (ret == -2);
+        ASSERT (buf[0] == MAGIC);
+
+        ret = u8_uctomb (buf, uc, 1);
+        ASSERT (ret == 1);
+        ASSERT (buf[0] == uc);
+        ASSERT (buf[1] == MAGIC);
+      }
+  }
+
+  /* Test 2-byte character.  */
+  {
+    ucs4_t uc = 0x00D7;
+    uint8_t buf[5] = { MAGIC, MAGIC, MAGIC, MAGIC, MAGIC };
+    int ret;
+
+    ret = u8_uctomb (buf, uc, 0);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 1);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 2);
+    ASSERT (ret == 2);
+    ASSERT (buf[0] == 0xC3);
+    ASSERT (buf[1] == 0x97);
+    ASSERT (buf[2] == MAGIC);
+  }
+
+  /* Test 3-byte character.  */
+  {
+    ucs4_t uc = 0x20AC;
+    uint8_t buf[5] = { MAGIC, MAGIC, MAGIC, MAGIC, MAGIC };
+    int ret;
+
+    ret = u8_uctomb (buf, uc, 0);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 1);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 2);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+    ASSERT (buf[1] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 3);
+    ASSERT (ret == 3);
+    ASSERT (buf[0] == 0xE2);
+    ASSERT (buf[1] == 0x82);
+    ASSERT (buf[2] == 0xAC);
+    ASSERT (buf[3] == MAGIC);
+  }
+
+  /* Test 4-byte character.  */
+  {
+    ucs4_t uc = 0x10FFFD;
+    uint8_t buf[5] = { MAGIC, MAGIC, MAGIC, MAGIC, MAGIC };
+    int ret;
+
+    ret = u8_uctomb (buf, uc, 0);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 1);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 2);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+    ASSERT (buf[1] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 3);
+    ASSERT (ret == -2);
+    ASSERT (buf[0] == MAGIC);
+    ASSERT (buf[1] == MAGIC);
+    ASSERT (buf[2] == MAGIC);
+
+    ret = u8_uctomb (buf, uc, 4);
+    ASSERT (ret == 4);
+    ASSERT (buf[0] == 0xF4);
+    ASSERT (buf[1] == 0x8F);
+    ASSERT (buf[2] == 0xBF);
+    ASSERT (buf[3] == 0xBD);
+    ASSERT (buf[4] == MAGIC);
+  }
+
+  /* Test invalid characters.  */
+  {
+    ucs4_t invalid[] = { 0x110000, 0xD800, 0xDBFF, 0xDC00, 0xDFFF };
+    uint8_t buf[5] = { MAGIC, MAGIC, MAGIC, MAGIC, MAGIC };
+    size_t i;
+
+    for (i = 0; i < SIZEOF (invalid); i++)
+      {
+        ucs4_t uc = invalid[i];
+        int n;
+
+        for (n = 0; n <= 4; n++)
+          {
+            int ret = u8_uctomb (buf, uc, n);
+            ASSERT (ret == -1);
+            ASSERT (buf[0] == MAGIC);
+            ASSERT (buf[1] == MAGIC);
+            ASSERT (buf[2] == MAGIC);
+            ASSERT (buf[3] == MAGIC);
+            ASSERT (buf[4] == MAGIC);
+          }
+      }
+  }
+
+  return 0;
+}
diff --git a/gltests/unsetenv.c b/gltests/unsetenv.c
index 215bba0..16b50d1 100644
--- a/gltests/unsetenv.c
+++ b/gltests/unsetenv.c
@@ -97,6 +97,13 @@ weak_alias (__unsetenv, unsetenv)
 #else /* HAVE_UNSETENV */
 
 # undef unsetenv
+# if !HAVE_DECL_UNSETENV
+#  if VOID_UNSETENV
+extern void unsetenv (const char *);
+#  else
+extern int unsetenv (const char *);
+#  endif
+# endif
 
 /* Call the underlying unsetenv, in case there is hidden bookkeeping
    that needs updating beyond just modifying environ.  */
diff --git a/lib/build-aux/unused-parameter.h b/lib/build-aux/unused-parameter.h
new file mode 100644
index 0000000..c8d2071
--- /dev/null
+++ b/lib/build-aux/unused-parameter.h
@@ -0,0 +1,36 @@
+/* A C macro for declaring that specific function parameters are not used.
+   Copyright (C) 2008-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+   declarations for parameters that are not used.  This helps to reduce
+   warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
+       type param _GL_UNUSED_PARAMETER
+   or more generally
+       param_decl _GL_UNUSED_PARAMETER
+   For example:
+       int param _GL_UNUSED_PARAMETER
+       int *(*param)(void) _GL_UNUSED_PARAMETER
+   Other possible, but obscure and discouraged syntaxes:
+       int _GL_UNUSED_PARAMETER *(*param)(void)
+       _GL_UNUSED_PARAMETER int *(*param)(void)
+ */
+#ifndef _GL_UNUSED_PARAMETER
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
+# else
+#  define _GL_UNUSED_PARAMETER
+# endif
+#endif
diff --git a/lib/build-aux/vc-list-files b/lib/build-aux/vc-list-files
index 2fced25..405e458 100755
--- a/lib/build-aux/vc-list-files
+++ b/lib/build-aux/vc-list-files
@@ -2,7 +2,7 @@
 # List version-controlled file names.
 
 # Print a version string.
-scriptversion=2011-04-29.20; # UTC
+scriptversion=2011-05-16.22; # UTC
 
 # Copyright (C) 2006-2011 Free Software Foundation, Inc.
 
@@ -30,7 +30,7 @@ scriptversion=2011-04-29.20; # UTC
 postprocess=
 case $1 in
   --help) cat <<EOF
-Usage: $0 [-C SRCDIR] [DIR]
+Usage: $0 [-C SRCDIR] [DIR...]
 
 Output a list of version-controlled files in DIR (default .), relative to
 SRCDIR (default .).  SRCDIR must be the top directory of a checkout.
@@ -61,53 +61,48 @@ EOF
     shift; shift ;;
 esac
 
-dir=
-case $# in
-  0) ;;
-  1) dir=$1 ;;
-  *) echo "$0: too many arguments" 1>&2
-     echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
-esac
-
-test "x$dir" = x && dir=.
-
-if test -d .git; then
-  test "x$dir" = x. \
-    && dir= sed_esc= \
-    || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
-  # Ignore git symlinks - either they point into the tree, in which case
-  # we don't need to visit the target twice, or they point somewhere
-  # else (often into a submodule), in which case the content does not
-  # belong to this package.
-  eval exec git ls-tree -r 'HEAD:"$dir"' \
-    \| sed -n '"s/^100[^       ]*./$sed_esc/p"' $postprocess
-elif test -d .hg; then
-  eval exec hg locate '"$dir/*"' $postprocess
-elif test -d .bzr; then
-  test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
-  eval exec bzr ls -R --versioned '"$dir"' $postprocess
-elif test -d CVS; then
-  test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
-  if test -x build-aux/cvsu; then
-    eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
-  elif (cvsu --help) >/dev/null 2>&1; then
-    eval cvsu --find --types=AFGM '"$dir"' $postprocess
+test $# = 0 && set .
+
+for dir
+do
+  if test -d .git; then
+    test "x$dir" = x. \
+      && dir= sed_esc= \
+      || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
+    # Ignore git symlinks - either they point into the tree, in which case
+    # we don't need to visit the target twice, or they point somewhere
+    # else (often into a submodule), in which case the content does not
+    # belong to this package.
+    eval exec git ls-tree -r 'HEAD:"$dir"' \
+      \| sed -n '"s/^100[^     ]*./$sed_esc/p"' $postprocess
+  elif test -d .hg; then
+    eval exec hg locate '"$dir/*"' $postprocess
+  elif test -d .bzr; then
+    test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+    eval exec bzr ls -R --versioned '"$dir"' $postprocess
+  elif test -d CVS; then
+    test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+    if test -x build-aux/cvsu; then
+      eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+    elif (cvsu --help) >/dev/null 2>&1; then
+      eval cvsu --find --types=AFGM '"$dir"' $postprocess
+    else
+      eval awk -F/ \''{                        \
+          if (!$1 && $3 !~ /^-/) {     \
+            f=FILENAME;                        \
+            if (f ~ /CVS\/Entries$/)   \
+              f = substr(f, 1, length(f)-11); \
+            print f $2;                        \
+          }}'\''                               \
+        `find "$dir" -name Entries -print` /dev/null' $postprocess
+    fi
+  elif test -d .svn; then
+    eval exec svn list -R '"$dir"' $postprocess
   else
-    eval awk -F/ \''{                  \
-        if (!$1 && $3 !~ /^-/) {       \
-          f=FILENAME;                  \
-          if (f ~ /CVS\/Entries$/)     \
-            f = substr(f, 1, length(f)-11); \
-          print f $2;                  \
-        }}'\''                         \
-      `find "$dir" -name Entries -print` /dev/null' $postprocess
+    echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
+    exit 1
   fi
-elif test -d .svn; then
-  eval exec svn list -R '"$dir"' $postprocess
-else
-  echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
-  exit 1
-fi
+done
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 3877255..3c4a255 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=unistd-c++-tests 
--avoid=vc-list-files-tests --avoid=wchar-c++-tests --lgpl=2 --libtool 
--macro-prefix=gl --no-vc-files base64 c-ctype crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random 
crypto/gc-sha1 getline gettext gss-extra lib-msvc-compat lib-symbol-versions 
lib-symbol-visibility maintainer-makefile memmem memxor minmax strnlen 
strverscmp vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=unistd-c++-tests 
--avoid=vc-list-files-tests --avoid=wchar-c++-tests --lgpl=2 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files base64 
c-ctype crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-sha1 crypto/gc-md5 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 getline gettext gss-extra 
lib-msvc-compat lib-symbol-versions lib-symbol-visibility maintainer-makefile 
memmem memxor minmax strnlen strverscmp vasprintf
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -165,10 +165,7 @@ EXTRA_libgl_la_SOURCES += md5.c
 
 ## begin gnulib module crypto/gc-pbkdf2-sha1
 
-
-EXTRA_DIST += gc-pbkdf2-sha1.c
-
-EXTRA_libgl_la_SOURCES += gc-pbkdf2-sha1.c
+libgl_la_SOURCES += gc-pbkdf2-sha1.c
 
 ## end   gnulib module crypto/gc-pbkdf2-sha1
 
@@ -191,7 +188,8 @@ if GL_GENERATE_ERRNO_H
 errno.h: errno.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
@@ -224,7 +222,8 @@ if GL_GENERATE_FLOAT_H
 float.h: float.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
@@ -237,7 +236,9 @@ float.h: $(top_builddir)/config.status
 endif
 MOSTLYCLEANFILES += float.h float.h-t
 
-EXTRA_DIST += float.in.h
+EXTRA_DIST += float.c float.in.h
+
+EXTRA_libgl_la_SOURCES += float.c
 
 ## end   gnulib module float
 
@@ -343,10 +344,9 @@ EXTRA_libgl_la_SOURCES += memmem.c
 
 ## begin gnulib module memxor
 
+libgl_la_SOURCES += memxor.c
 
-EXTRA_DIST += memxor.c memxor.h
-
-EXTRA_libgl_la_SOURCES += memxor.c
+EXTRA_DIST += memxor.h
 
 ## end   gnulib module memxor
 
@@ -404,7 +404,8 @@ if GL_GENERATE_STDDEF_H
 stddef.h: stddef.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@@ -433,7 +434,8 @@ if GL_GENERATE_STDINT_H
 stdint.h: stdint.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -481,62 +483,63 @@ BUILT_SOURCES += stdio.h
 stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
-             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
-             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-             -e 's|@''GNULIB_FGETC''@|$(GNULIB_FGETC)|g' \
-             -e 's|@''GNULIB_FGETS''@|$(GNULIB_FGETS)|g' \
-             -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
-             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
-             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
-             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
-             -e 's|@''GNULIB_FREAD''@|$(GNULIB_FREAD)|g' \
-             -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
-             -e 's|@''GNULIB_FSCANF''@|$(GNULIB_FSCANF)|g' \
-             -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
-             -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
-             -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-             -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-             -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-             -e 's|@''GNULIB_GETC''@|$(GNULIB_GETC)|g' \
-             -e 's|@''GNULIB_GETCHAR''@|$(GNULIB_GETCHAR)|g' \
-             -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
-             -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-             -e 's|@''GNULIB_GETS''@|$(GNULIB_GETS)|g' \
-             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
-             -e 
's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
-             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
-             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
-             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
-             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
-             -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
-             -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
-             -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
-             -e 's|@''GNULIB_SCANF''@|$(GNULIB_SCANF)|g' \
-             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-             -e 
's|@''GNULIB_STDIO_H_NONBLOCKING''@|$(GNULIB_STDIO_H_NONBLOCKING)|g' \
-             -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
-             -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
-             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VFSCANF''@|$(GNULIB_VFSCANF)|g' \
-             -e 's|@''GNULIB_VSCANF''@|$(GNULIB_VSCANF)|g' \
-             -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
-             -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-             -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+             -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+             -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+             -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+             -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+             -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+             -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+             -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+             -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+             -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+             -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+             -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+             -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+             -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+             -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+             -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+             -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+             -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+             -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+             -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+             -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+             -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+             -e 
's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+             -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+             -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+             -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+             -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+             -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+             -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+             -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+             -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+             -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+             -e 
's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+             -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+             -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+             -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+             -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
              < $(srcdir)/stdio.in.h | \
          sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
@@ -604,38 +607,39 @@ BUILT_SOURCES += stdlib.h
 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-             -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
-             -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
-             -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
-             -e 
's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
-             -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
-             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
-             -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
-             -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-             -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
-             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-             -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
-             -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
-             -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-             -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
-             -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-             -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-             -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
-             -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
-             -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
-             -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
-             -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
-             -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
-             -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
-             -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
-             -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
-             -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
-             -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+             -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+             -e 
's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+             -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+             -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+             -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+             -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+             -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+             -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+             -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+             -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+             -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+             -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+             -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+             -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+             -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+             -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+             -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@@ -693,45 +697,46 @@ BUILT_SOURCES += string.h
 string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-             -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
-             -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
-             -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
-             -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
-             -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
-             -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
-             -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
-             -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
-             -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
-             -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
-             -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
-             -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
-             -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
-             -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
-             -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
-             -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
-             -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
-             -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
-             -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
-             -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
-             -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
-             -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
-             -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
-             -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
-             -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
-             -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
-             -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
-             -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
-             -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
-             -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' \
+             -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+             -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+             -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+             -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+             -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+             -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+             -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+             -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+             -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+             -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+             -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+             -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+             -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+             -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+             -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+             -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+             -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+             -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+             -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+             -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+             -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+             -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+             -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+             -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+             -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+             -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+             -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+             -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+             -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+             -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 | \
          sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
              -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
@@ -806,54 +811,56 @@ BUILT_SOURCES += unistd.h
 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
              -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|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
-             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
-             -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
-             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
-             -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
-             -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
-             -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
-             -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
-             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
-             -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
-             -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
-             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
-             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
-             -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
-             -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
-             -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
-             -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
-             -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
-             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
-             -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
-             -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
-             -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
-             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
-             -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
-             -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-             -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
-             -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-             -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
-             -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-             -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \
-             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-             -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
-             -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
-             -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
-             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
-             -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
-             -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
-             -e 
's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \
-             -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' 
\
-             -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
-             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
-             -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
-             -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+             -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+             -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+             -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+             -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+             -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+             -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+             -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+             -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+             -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+             -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+             -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+             -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+             -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+             -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+             -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+             -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+             -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+             -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+             -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+             -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+             -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+             -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+             -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+             -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+             -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+             -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+             -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+             -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+             -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+             -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+             -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
+             -e 
's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' 
\
+             -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+             -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+             -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+             -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
              -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
@@ -869,6 +876,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+             -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
              -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -966,7 +974,8 @@ EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
 
 ## begin gnulib module verify
 
-libgl_la_SOURCES += verify.h
+
+EXTRA_DIST += verify.h
 
 ## end   gnulib module verify
 
@@ -998,51 +1007,52 @@ BUILT_SOURCES += wchar.h
 wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -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' \
-             -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-             -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-             -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-             -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-             -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-             -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-             -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-             -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-             -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-             -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-             -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
-             -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
-             -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
-             -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
-             -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
-             -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
-             -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
-             -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
-             -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
-             -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
-             -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
-             -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
-             -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
-             -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
-             -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
-             -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
-             -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
-             -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
-             -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
-             -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
-             -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
-             -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
-             -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
-             -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
-             -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
-             -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
-             -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
-             -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+             -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+             -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+             -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+             -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+             -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+             -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+             -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+             -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+             -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+             -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+             -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+             -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+             -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+             -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+             -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+             -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+             -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+             -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+             -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+             -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+             -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+             -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+             -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+             -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+             -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+             -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+             -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+             -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+             -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+             -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+             -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+             -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+             -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+             -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+             -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+             -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+             -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
diff --git a/lib/gl/errno.in.h b/lib/gl/errno.in.h
index 2f9ac45..9952e47 100644
--- a/lib/gl/errno.in.h
+++ b/lib/gl/errno.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ERRNO_H
+#ifndef address@hidden@_ERRNO_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_ERRNO_H@
 
-#ifndef _GL_ERRNO_H
-#define _GL_ERRNO_H
+#ifndef address@hidden@_ERRNO_H
+#define address@hidden@_ERRNO_H
 
 
 /* On native Windows platforms, many macros are not defined.  */
@@ -163,5 +163,5 @@
 # endif
 
 
-#endif /* _GL_ERRNO_H */
-#endif /* _GL_ERRNO_H */
+#endif /* address@hidden@_ERRNO_H */
+#endif /* address@hidden@_ERRNO_H */
diff --git a/lib/gl/float.c b/lib/gl/float.c
new file mode 100644
index 0000000..5fc47d0
--- /dev/null
+++ b/lib/gl/float.c
@@ -0,0 +1,33 @@
+/* Auxiliary definitions for <float.h>.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2011.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 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 Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <float.h>
+
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 
106) && defined __GNUC__
+const union gl_long_double_union gl_LDBL_MAX =
+  { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
+#elif defined __i386__
+const union gl_long_double_union gl_LDBL_MAX =
+  { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
+#else
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+#endif
diff --git a/lib/gl/float.in.h b/lib/gl/float.in.h
index f77a5ef..a296a9e 100644
--- a/lib/gl/float.in.h
+++ b/lib/gl/float.in.h
@@ -15,7 +15,7 @@
    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/>.  */
 
-#ifndef _GL_FLOAT_H
+#ifndef address@hidden@_FLOAT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -25,10 +25,11 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_FLOAT_H@
 
-#ifndef _GL_FLOAT_H
-#define _GL_FLOAT_H
+#ifndef address@hidden@_FLOAT_H
+#define address@hidden@_FLOAT_H
 
 /* 'long double' properties.  */
+
 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
 /* Number of mantissa units, in base FLT_RADIX.  */
 # undef LDBL_MANT_DIG
@@ -59,5 +60,115 @@
 # define LDBL_MAX_10_EXP 4932
 #endif
 
-#endif /* _GL_FLOAT_H */
-#endif /* _GL_FLOAT_H */
+/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+   precision in the compiler but 64 bits of precision at runtime.  See
+   <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>.  */
+#if defined __i386__ && defined __FreeBSD__
+/* Number of mantissa units, in base FLT_RADIX.  */
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG   64
+/* Number of decimal digits that is sufficient for representing a number.  */
+# undef LDBL_DIG
+# define LDBL_DIG        18
+/* x-1 where x is the smallest representable number > 1.  */
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 
*/
+/* Minimum e such that FLT_RADIX^(e-1) is a normalized number.  */
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number.  */
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP    16384
+/* Minimum positive normalized number.  */
+# undef LDBL_MIN
+# define LDBL_MIN        3.3621031431120935E-4932L /* = 0x1p-16382L */
+/* Maximum representable finite number.  */
+# undef LDBL_MAX
+/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }.
+   But the largest literal that GCC allows us to write is
+   0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }.
+   So, define it like this through a reference to an external variable
+
+     const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 };
+     extern const long double LDBL_MAX;
+
+   Unfortunately, this is not a constant expression.  */
+union gl_long_double_union
+  {
+    struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
+    long double ld;
+  };
+extern const union gl_long_double_union gl_LDBL_MAX;
+# define LDBL_MAX (gl_LDBL_MAX.ld)
+/* Minimum e such that 10^e is in the range of normalized numbers.  */
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-4931)
+/* Maximum e such that 10^e is in the range of representable finite numbers.  
*/
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP 4932
+#endif
+
+/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
+   wrong.  */
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 
106) && defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
+# undef LDBL_MIN
+# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 
2^-1022 */
+# undef LDBL_MAX
+/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF 
}.
+   It is not easy to define:
+     #define LDBL_MAX 1.79769313486231580793728971405302307166e308L
+   is too small, whereas
+     #define LDBL_MAX 1.79769313486231580793728971405302307167e308L
+   is too large.  Apparently a bug in GCC decimal-to-binary conversion.
+   Also, I can't get values larger than
+     #define LDBL63 ((long double) (1ULL << 63))
+     #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
+     #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
+     #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * 
LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 
* LDBL63)
+     #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 
9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL)
+   which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }.
+   So, define it like this through a reference to an external variable
+
+     const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / 
(double)134217728UL };
+     extern const long double LDBL_MAX;
+
+   or through a pointer cast
+
+     #define LDBL_MAX \
+       (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / 
(double)134217728UL / (double)134217728UL })
+
+   Unfortunately, this is not a constant expression, and the latter expression
+   does not work well when GCC is optimizing..  */
+union gl_long_double_union
+  {
+    struct { double hi; double lo; } dd;
+    long double ld;
+  };
+extern const union gl_long_double_union gl_LDBL_MAX;
+# define LDBL_MAX (gl_LDBL_MAX.ld)
+#endif
+
+/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
+   On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, 
LDBL_EPSILON
+   are wrong.  */
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG 106
+# if defined __GNUC__
+#  undef LDBL_MIN_EXP
+#  define LDBL_MIN_EXP DBL_MIN_EXP
+#  undef LDBL_MIN_10_EXP
+#  define LDBL_MIN_10_EXP DBL_MIN_10_EXP
+#  undef LDBL_MIN
+#  define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 
2^-1022 */
+#  undef LDBL_EPSILON
+#  define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 
*/
+# endif
+#endif
+
+#endif /* address@hidden@_FLOAT_H */
+#endif /* address@hidden@_FLOAT_H */
diff --git a/lib/gl/gc.h b/lib/gl/gc.h
index a56fef6..e8c4f63 100644
--- a/lib/gl/gc.h
+++ b/lib/gl/gc.h
@@ -168,7 +168,7 @@ extern Gc_rc gc_hmac_sha1 (const void *key, size_t keylen,
    larger value means this function take more time (typical iteration
    counts are 1000-20000).  This function "stretches" the key to be
    exactly dkLen bytes long.  GC_OK is returned on success, otherwise
-   an Gc_rc error code is returned.  */
+   a Gc_rc error code is returned.  */
 extern Gc_rc
 gc_pbkdf2_sha1 (const char *P, size_t Plen,
                 const char *S, size_t Slen,
diff --git a/lib/gl/m4/alloca.m4 b/lib/gl/m4/alloca.m4
index 689da75..891fc8b 100644
--- a/lib/gl/m4/alloca.m4
+++ b/lib/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 11
+# alloca.m4 serial 12
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -42,3 +42,80 @@ AC_DEFUN([gl_FUNC_ALLOCA],
 # Prerequisites of lib/alloca.c.
 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
+
+# This works around a bug in autoconf <= 2.68.
+# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+
+m4_version_prereq([2.69], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+
+# _AC_LIBOBJ_ALLOCA
+# -----------------
+# Set up the LIBOBJ replacement of `alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Nevertheless, for Automake, AC_LIBSOURCES it.
+m4_define([_AC_LIBOBJ_ALLOCA],
+[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+AC_LIBSOURCES(alloca.c)
+AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+
+AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
+[AC_EGREP_CPP(webecray,
+[#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    AC_CHECK_FUNC($ac_func,
+                 [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
+                                     [Define to one of `_getb67', `GETB67',
+                                      `getb67' for Cray-2 and Cray-YMP
+                                      systems. This function is required for
+                                      `alloca.c' support on those systems.])
+    break])
+  done
+fi
+
+AC_CACHE_CHECK([stack direction for C alloca],
+              [ac_cv_c_stack_direction],
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[AC_INCLUDES_DEFAULT
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}])],
+              [ac_cv_c_stack_direction=1],
+              [ac_cv_c_stack_direction=-1],
+              [ac_cv_c_stack_direction=0])])
+AH_VERBATIM([STACK_DIRECTION],
+[/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
address@hidden:@undef STACK_DIRECTION])dnl
+AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
+])# _AC_LIBOBJ_ALLOCA
+])
diff --git a/lib/gl/m4/float_h.m4 b/lib/gl/m4/float_h.m4
index 21a7529..261f1ac 100644
--- a/lib/gl/m4/float_h.m4
+++ b/lib/gl/m4/float_h.m4
@@ -1,4 +1,4 @@
-# float_h.m4 serial 6
+# float_h.m4 serial 7
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,12 +9,41 @@ AC_DEFUN([gl_FLOAT_H],
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
   FLOAT_H=
+  REPLACE_FLOAT_LDBL=0
   case "$host_os" in
-    beos* | openbsd* | mirbsd*)
+    aix* | beos* | openbsd* | mirbsd* | irix*)
       FLOAT_H=float.h
-      gl_NEXT_HEADERS([float.h])
+      ;;
+    freebsd*)
+      case "$host_cpu" in
+changequote(,)dnl
+        i[34567]86 )
+changequote([,])dnl
+          FLOAT_H=float.h
+          ;;
+        x86_64 )
+          # On x86_64 systems, the C compiler may still be generating
+          # 32-bit code.
+          AC_EGREP_CPP([yes],
+            [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
+             yes
+             #endif],
+            [],
+            [FLOAT_H=float.h])
+          ;;
+      esac
+      ;;
+  esac
+  case "$host_os" in
+    aix* | freebsd*)
+      if test -n "$FLOAT_H"; then
+        REPLACE_FLOAT_LDBL=1
+      fi
       ;;
   esac
+  if test -n "$FLOAT_H"; then
+    gl_NEXT_HEADERS([float.h])
+  fi
   AC_SUBST([FLOAT_H])
   AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
 ])
diff --git a/lib/gl/m4/fpieee.m4 b/lib/gl/m4/fpieee.m4
new file mode 100644
index 0000000..7872876
--- /dev/null
+++ b/lib/gl/m4/fpieee.m4
@@ -0,0 +1,52 @@
+# fpieee.m4 serial 1
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl IEEE 754 standardized three items:
+dnl - The formats of single-float and double-float - nowadays commonly
+dnl   available as 'float' and 'double' in C and C++.
+dnl   No autoconf test needed.
+dnl - The overflow and division by zero behaviour: The result are values
+dnl   '±Inf' and 'NaN', rather than exceptions as it was before.
+dnl   This file provides an autoconf macro for ensuring this behaviour of
+dnl   floating-point operations.
+dnl - A set of conditions (overflow, underflow, inexact, etc.) which can
+dnl   be configured to trigger an exception.
+dnl   This cannot be done in a portable way: it depends on the compiler,
+dnl   libc, kernel, and CPU.  No autoconf macro is provided for this.
+
+dnl Ensure non-trapping behaviour of floating-point overflow and
+dnl floating-point division by zero.
+dnl (For integer overflow, see gcc's -ftrapv option; for integer division by
+dnl zero, see the autoconf macro in intdiv0.m4.)
+
+AC_DEFUN([gl_FP_IEEE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  # IEEE behaviour is the default on all CPUs except Alpha and SH
+  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+  # and the GCC 4.1.2 manual).
+  case "$host_cpu" in
+    alpha*)
+      # On Alpha systems, a compiler option provides the behaviour.
+      # See the ieee(3) manual page, also available at
+      # 
<http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+      if test -n "$GCC"; then
+        # GCC has the option -mieee.
+        CPPFLAGS="$CPPFLAGS -mieee"
+      else
+        # Compaq (ex-DEC) C has the option -ieee.
+        CPPFLAGS="$CPPFLAGS -ieee"
+      fi
+      ;;
+    sh*)
+      if test -n "$GCC"; then
+        # GCC has the option -mieee.
+        CPPFLAGS="$CPPFLAGS -mieee"
+      fi
+      ;;
+  esac
+])
diff --git a/lib/gl/m4/gc-hmac-md5.m4 b/lib/gl/m4/gc-hmac-md5.m4
index f4987b0..d2c990b 100644
--- a/lib/gl/m4/gc-hmac-md5.m4
+++ b/lib/gl/m4/gc-hmac-md5.m4
@@ -1,4 +1,4 @@
-# gc-hmac-md5.m4 serial 2
+# gc-hmac-md5.m4 serial 3
 dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@ AC_DEFUN([gl_GC_HMAC_MD5],
   AC_REQUIRE([gl_GC])
   if test "$ac_cv_libgcrypt" != yes; then
     gl_MD5
-    gl_HMAC_MD5
     gl_MEMXOR
   fi
 ])
diff --git a/lib/gl/m4/gc-hmac-sha1.m4 b/lib/gl/m4/gc-hmac-sha1.m4
index f49989f..dd241b1 100644
--- a/lib/gl/m4/gc-hmac-sha1.m4
+++ b/lib/gl/m4/gc-hmac-sha1.m4
@@ -1,4 +1,4 @@
-# gc-hmac-sha1.m4 serial 2
+# gc-hmac-sha1.m4 serial 3
 dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@ AC_DEFUN([gl_GC_HMAC_SHA1],
   AC_REQUIRE([gl_GC])
   if test "$ac_cv_libgcrypt" != yes; then
     gl_SHA1
-    gl_HMAC_SHA1
     gl_MEMXOR
   fi
 ])
diff --git a/lib/gl/m4/gc-pbkdf2-sha1.m4 b/lib/gl/m4/gc-pbkdf2-sha1.m4
deleted file mode 100644
index 9f7e1c5..0000000
--- a/lib/gl/m4/gc-pbkdf2-sha1.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# gc-pbkdf2-sha1.m4 serial 2
-dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_GC_PBKDF2_SHA1],
-[
-  AC_LIBOBJ([gc-pbkdf2-sha1])
-])
diff --git a/lib/gl/m4/gc-sha1.m4 b/lib/gl/m4/gc-sha1.m4
index 2fed66b..bf30321 100644
--- a/lib/gl/m4/gc-sha1.m4
+++ b/lib/gl/m4/gc-sha1.m4
@@ -1,4 +1,4 @@
-# gc-sha1.m4 serial 2
+# gc-sha1.m4 serial 3
 dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,4 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_GC_SHA1],
 [
   AC_REQUIRE([gl_GC])
-  if test "$ac_cv_libgcrypt" != yes; then
-    gl_SHA1
-  fi
 ])
diff --git a/lib/gl/m4/gc.m4 b/lib/gl/m4/gc.m4
index cbc7612..3387897 100644
--- a/lib/gl/m4/gc.m4
+++ b/lib/gl/m4/gc.m4
@@ -1,4 +1,4 @@
-# gc.m4 serial 6
+# gc.m4 serial 8
 dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,16 +12,4 @@ AC_DEFUN([gl_GC],
   if test "$libgcrypt" != no; then
     AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [#include <gcrypt.h>])
   fi
-  if test "$ac_cv_libgcrypt" = yes; then
-    AC_LIBOBJ([gc-libgcrypt])
-  else
-    AC_LIBOBJ([gc-gnulib])
-  fi
-])
-
-# Prerequisites of lib/gc.h
-AC_DEFUN([gl_PREREQ_GC],
-[
-  AC_REQUIRE([AC_C_RESTRICT])
-  :
 ])
diff --git a/lib/gl/m4/getdelim.m4 b/lib/gl/m4/getdelim.m4
index ef12736..6a0f632 100644
--- a/lib/gl/m4/getdelim.m4
+++ b/lib/gl/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 8
+# getdelim.m4 serial 9
 
 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
 dnl
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
 
   AC_CHECK_FUNCS_ONCE([getdelim])
   if test $ac_cv_func_getdelim = yes; then
+    HAVE_GETDELIM=1
     dnl Found it in some library.  Verify that it works.
     AC_CACHE_CHECK([for working getdelim function], 
[gl_cv_func_working_getdelim],
     [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -65,21 +66,16 @@ AC_DEFUN([gl_FUNC_GETDELIM],
          [gl_cv_func_working_getdelim=yes],
          [gl_cv_func_working_getdelim=no])]
     )])
+    if test $gl_cv_func_working_getdelim = no; then
+      REPLACE_GETDELIM=1
+    fi
   else
-    gl_cv_func_working_getdelim=no
+    HAVE_GETDELIM=0
   fi
 
   if test $ac_cv_have_decl_getdelim = no; then
     HAVE_DECL_GETDELIM=0
   fi
-
-  if test $gl_cv_func_working_getdelim = no; then
-    if test $ac_cv_func_getdelim = yes; then
-      REPLACE_GETDELIM=1
-    fi
-    AC_LIBOBJ([getdelim])
-    gl_PREREQ_GETDELIM
-  fi
 ])
 
 # Prerequisites of lib/getdelim.c.
diff --git a/lib/gl/m4/getline.m4 b/lib/gl/m4/getline.m4
index ec001b9..4c57797 100644
--- a/lib/gl/m4/getline.m4
+++ b/lib/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 23
+# getline.m4 serial 25
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
@@ -84,14 +84,11 @@ AC_DEFUN([gl_FUNC_GETLINE],
     dnl getline function among $LIBS, it may exist in libinet and the
     dnl executable may be linked with -linet.
     REPLACE_GETLINE=1
-    AC_LIBOBJ([getline])
-
-    gl_PREREQ_GETLINE
   fi
 ])
 
 # Prerequisites of lib/getline.c.
 AC_DEFUN([gl_PREREQ_GETLINE],
 [
-  gl_FUNC_GETDELIM
+  :
 ])
diff --git a/lib/gl/m4/getpagesize.m4 b/lib/gl/m4/getpagesize.m4
index 79dfbbe..f7ac1ef 100644
--- a/lib/gl/m4/getpagesize.m4
+++ b/lib/gl/m4/getpagesize.m4
@@ -1,4 +1,4 @@
-# getpagesize.m4 serial 8
+# getpagesize.m4 serial 9
 dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -24,7 +24,6 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE],
   case "$host_os" in
     mingw*)
       REPLACE_GETPAGESIZE=1
-      AC_LIBOBJ([getpagesize])
       ;;
   esac
   dnl Also check whether it's declared.
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index 7164433..5563e99 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=unistd-c++-tests 
--avoid=vc-list-files-tests --avoid=wchar-c++-tests --lgpl=2 --libtool 
--macro-prefix=gl --no-vc-files base64 c-ctype crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random 
crypto/gc-sha1 getline gettext gss-extra lib-msvc-compat lib-symbol-versions 
lib-symbol-visibility maintainer-makefile memmem memxor minmax strnlen 
strverscmp vasprintf
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=stdio-c++-tests 
--avoid=stdlib-c++-tests --avoid=string-c++-tests --avoid=unistd-c++-tests 
--avoid=vc-list-files-tests --avoid=wchar-c++-tests --lgpl=2 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files base64 
c-ctype crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-sha1 crypto/gc-md5 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 getline gettext gss-extra 
lib-msvc-compat lib-symbol-versions lib-symbol-visibility maintainer-makefile 
memmem memxor minmax strnlen strverscmp vasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -56,4 +56,5 @@ gl_MAKEFILE_NAME([])
 gl_LIBTOOL
 gl_MACRO_PREFIX([gl])
 gl_PO_DOMAIN([])
+gl_WITNESS_C_DOMAIN([])
 gl_VC_FILES([false])
diff --git a/lib/gl/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4
index c4d7a20..843efe0 100644
--- a/lib/gl/m4/gnulib-common.m4
+++ b/lib/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 24
+# gnulib-common.m4 serial 26
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,20 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
 ])
   dnl Preparation for running test programs:
   dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -47,16 +61,49 @@ AC_DEFUN([gl_COMMON_BODY], [
 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
 # whether a gnulib module that has been requested shall be considered present
 # or not.
-AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
 
 # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
 # sets the shell variable that indicates the presence of the given module to
 # a C preprocessor expression that will evaluate to 1.
 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
 [
-  GNULIB_[]m4_translit([[$1]],
-    [abcdefghijklmnopqrstuvwxyz./-],
-    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+  gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
+    [GNULIB_[]m4_translit([[$1]],
+                          [abcdefghijklmnopqrstuvwxyz./-],
+                          [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+    [gl_MODULE_INDICATOR_CONDITION])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
+# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
+# The shell variable's value is a C preprocessor expression that evaluates
+# to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
+[
+  m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
+    [
+     dnl Simplify the expression VALUE || 1 to 1.
+     $1=1
+    ],
+    [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
+                                             [gl_MODULE_INDICATOR_CONDITION])])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
+# modifies the shell variable to include the given condition.  The shell
+# variable's value is a C preprocessor expression that evaluates to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
+[
+  dnl Simplify the expression 1 || CONDITION to 1.
+  if test "$[]$1" != 1; then
+    dnl Simplify the expression 0 || CONDITION to CONDITION.
+    if test "$[]$1" = 0; then
+      $1=$2
+    else
+      $1="($[]$1 || $2)"
+    fi
+  fi
 ])
 
 # gl_MODULE_INDICATOR([modulename])
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 1a9cc66..bc6ee46 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -52,6 +52,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   # Code from module float:
+  # Code from module float-tests:
+  # Code from module fpieee:
+  AC_REQUIRE([gl_FP_IEEE])
+  # Code from module fpucw:
   # Code from module getdelim:
   # Code from module getdelim-tests:
   # Code from module getline:
@@ -64,6 +68,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module havelib:
   # Code from module include_next:
   # Code from module intprops:
+  # Code from module intprops-tests:
+  # Code from module inttypes:
+  # Code from module inttypes-incomplete:
+  # Code from module inttypes-tests:
   # Code from module lib-msvc-compat:
   # Code from module lib-symbol-versions:
   # Code from module lib-symbol-visibility:
@@ -124,80 +132,132 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='gl'
-  gl_FUNC_ALLOCA
-  gl_FUNC_BASE64
-  gl_GC
-  if test $gl_cond_libtool = false; then
-    gl_ltlibdeps="$gl_ltlibdeps $LTLIBGCRYPT"
-    gl_libdeps="$gl_libdeps $LIBGCRYPT"
-  fi
-  gl_GC_HMAC_MD5
-  gl_MODULE_INDICATOR([gc-hmac-md5])
-  gl_GC_HMAC_SHA1
-  gl_MODULE_INDICATOR([gc-hmac-sha1])
-  gl_GC_MD5
-  gl_MODULE_INDICATOR([gc-md5])
-  gl_GC_PBKDF2_SHA1
-  gl_GC_RANDOM
-  gl_MODULE_INDICATOR([gc-random])
-  gl_GC_SHA1
-  gl_MODULE_INDICATOR([gc-sha1])
-  gl_HEADER_ERRNO_H
-  gl_FLOAT_H
-  gl_FUNC_GETDELIM
-  gl_STDIO_MODULE_INDICATOR([getdelim])
-  gl_FUNC_GETLINE
-  gl_STDIO_MODULE_INDICATOR([getline])
-  dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
-  AM_GNU_GETTEXT_VERSION([0.18.1])
-  AC_SUBST([LIBINTL])
-  AC_SUBST([LTLIBINTL])
-  # Autoconf 2.61a.99 and earlier don't support linking a file only
-  # in VPATH builds.  But since GNUmakefile is for maintainer use
-  # only, it does not matter if we skip the link with older autoconf.
-  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
-  # builds, so use a shell variable to bypass this.
-  GNUmakefile=GNUmakefile
-  m4_if(m4_version_compare([2.61a.100],
-          m4_defn([m4_PACKAGE_VERSION])), [1], [],
-        [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
-          [GNUmakefile=$GNUmakefile])])
-  sj_GSS_EXTRA
-  gl_LD_OUTPUT_DEF
-  gl_LD_VERSION_SCRIPT
-  gl_VISIBILITY
-  AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
-    [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
-  gl_FUNC_MEMCHR
-  gl_STRING_MODULE_INDICATOR([memchr])
-  gl_FUNC_MEMMEM
-  gl_FUNC_MEMMEM_SIMPLE
-  gl_STRING_MODULE_INDICATOR([memmem])
-  gl_MEMXOR
-  gl_MINMAX
-  gl_MULTIARCH
-  gl_FUNC_REALLOC_POSIX
-  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
-  gl_SIZE_MAX
-  AM_STDBOOL_H
-  gl_STDDEF_H
-  gl_STDINT_H
-  gl_STDIO_H
-  gl_STDLIB_H
-  gl_HEADER_STRING_H
-  gl_FUNC_STRNLEN
-  gl_STRING_MODULE_INDICATOR([strnlen])
-  gl_FUNC_STRVERSCMP
-  gl_STRING_MODULE_INDICATOR([strverscmp])
-  gl_UNISTD_H
-  gl_FUNC_VASNPRINTF
-  gl_FUNC_VASPRINTF
-  gl_STDIO_MODULE_INDICATOR([vasprintf])
-  m4_ifdef([AM_XGETTEXT_OPTION],
-    [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
-     AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
-  gl_WCHAR_H
-  gl_XSIZE
+gl_FUNC_ALLOCA
+gl_FUNC_BASE64
+gl_GC
+if test "$ac_cv_libgcrypt" = yes; then
+  AC_LIBOBJ([gc-libgcrypt])
+else
+  AC_LIBOBJ([gc-gnulib])
+fi
+if test $gl_cond_libtool = false; then
+  gl_ltlibdeps="$gl_ltlibdeps $LTLIBGCRYPT"
+  gl_libdeps="$gl_libdeps $LIBGCRYPT"
+fi
+gl_GC_HMAC_MD5
+if test "$ac_cv_libgcrypt" != yes; then
+  AC_LIBOBJ([md5])
+  AC_LIBOBJ([hmac-md5])
+  AC_LIBOBJ([memxor])
+fi
+gl_MODULE_INDICATOR([gc-hmac-md5])
+gl_GC_HMAC_SHA1
+if test "$ac_cv_libgcrypt" != yes; then
+  AC_LIBOBJ([sha1])
+  AC_LIBOBJ([hmac-sha1])
+  AC_LIBOBJ([memxor])
+fi
+gl_MODULE_INDICATOR([gc-hmac-sha1])
+gl_GC_MD5
+if test "$ac_cv_libgcrypt" != yes; then
+  AC_LIBOBJ([md5])
+fi
+gl_MODULE_INDICATOR([gc-md5])
+gl_GC_RANDOM
+gl_MODULE_INDICATOR([gc-random])
+gl_GC_SHA1
+if test "$ac_cv_libgcrypt" != yes; then
+  AC_LIBOBJ([sha1])
+fi
+gl_MODULE_INDICATOR([gc-sha1])
+gl_HEADER_ERRNO_H
+gl_FLOAT_H
+if test $REPLACE_FLOAT_LDBL = 1; then
+  AC_LIBOBJ([float])
+fi
+gl_FUNC_GETDELIM
+if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+  AC_LIBOBJ([getdelim])
+  gl_PREREQ_GETDELIM
+fi
+gl_STDIO_MODULE_INDICATOR([getdelim])
+gl_FUNC_GETLINE
+if test $REPLACE_GETLINE = 1; then
+  AC_LIBOBJ([getline])
+  gl_PREREQ_GETLINE
+fi
+gl_STDIO_MODULE_INDICATOR([getline])
+dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+AM_GNU_GETTEXT_VERSION([0.18.1])
+AC_SUBST([LIBINTL])
+AC_SUBST([LTLIBINTL])
+# Autoconf 2.61a.99 and earlier don't support linking a file only
+# in VPATH builds.  But since GNUmakefile is for maintainer use
+# only, it does not matter if we skip the link with older autoconf.
+# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+# builds, so use a shell variable to bypass this.
+GNUmakefile=GNUmakefile
+m4_if(m4_version_compare([2.61a.100],
+        m4_defn([m4_PACKAGE_VERSION])), [1], [],
+      [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+        [GNUmakefile=$GNUmakefile])])
+sj_GSS_EXTRA
+gl_LD_OUTPUT_DEF
+gl_LD_VERSION_SCRIPT
+gl_VISIBILITY
+AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+  [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+gl_FUNC_MEMCHR
+if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  AC_LIBOBJ([memchr])
+  gl_PREREQ_MEMCHR
+fi
+gl_STRING_MODULE_INDICATOR([memchr])
+gl_FUNC_MEMMEM
+if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+  AC_LIBOBJ([memmem])
+fi
+gl_FUNC_MEMMEM_SIMPLE
+if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+  AC_LIBOBJ([memmem])
+fi
+gl_STRING_MODULE_INDICATOR([memmem])
+gl_MEMXOR
+gl_MINMAX
+gl_MULTIARCH
+gl_FUNC_REALLOC_POSIX
+if test $REPLACE_REALLOC = 1; then
+  AC_LIBOBJ([realloc])
+fi
+gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+gl_SIZE_MAX
+AM_STDBOOL_H
+gl_STDDEF_H
+gl_STDINT_H
+gl_STDIO_H
+gl_STDLIB_H
+gl_HEADER_STRING_H
+gl_FUNC_STRNLEN
+if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+  AC_LIBOBJ([strnlen])
+  gl_PREREQ_STRNLEN
+fi
+gl_STRING_MODULE_INDICATOR([strnlen])
+gl_FUNC_STRVERSCMP
+if test $HAVE_STRVERSCMP = 0; then
+  AC_LIBOBJ([strverscmp])
+  gl_PREREQ_STRVERSCMP
+fi
+gl_STRING_MODULE_INDICATOR([strverscmp])
+gl_UNISTD_H
+gl_FUNC_VASNPRINTF
+gl_FUNC_VASPRINTF
+gl_STDIO_MODULE_INDICATOR([vasprintf])
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+   AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+gl_WCHAR_H
+gl_XSIZE
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -244,22 +304,27 @@ changequote([, ])dnl
   AC_SUBST([gltests_WITNESS])
   gl_module_indicator_condition=$gltests_WITNESS
   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-  gl_FUNC_GETPAGESIZE
-  gl_UNISTD_MODULE_INDICATOR([getpagesize])
-  dnl Check for prerequisites for memory fence checks.
-  gl_FUNC_MMAP_ANON
-  AC_CHECK_HEADERS_ONCE([sys/mman.h])
-  AC_CHECK_FUNCS_ONCE([mprotect])
-  gl_FUNC_MMAP_ANON
-  AC_CHECK_HEADERS_ONCE([sys/mman.h])
-  AC_CHECK_FUNCS_ONCE([mprotect])
-  AC_CHECK_DECLS_ONCE([alarm])
-  gt_TYPE_WCHAR_T
-  gt_TYPE_WINT_T
-  dnl Check for prerequisites for memory fence checks.
-  gl_FUNC_MMAP_ANON
-  AC_CHECK_HEADERS_ONCE([sys/mman.h])
-  AC_CHECK_FUNCS_ONCE([mprotect])
+gl_FUNC_GETPAGESIZE
+if test $REPLACE_GETPAGESIZE = 1; then
+  AC_LIBOBJ([getpagesize])
+fi
+gl_UNISTD_MODULE_INDICATOR([getpagesize])
+gl_INTTYPES_H
+gl_INTTYPES_INCOMPLETE
+dnl Check for prerequisites for memory fence checks.
+gl_FUNC_MMAP_ANON
+AC_CHECK_HEADERS_ONCE([sys/mman.h])
+AC_CHECK_FUNCS_ONCE([mprotect])
+gl_FUNC_MMAP_ANON
+AC_CHECK_HEADERS_ONCE([sys/mman.h])
+AC_CHECK_FUNCS_ONCE([mprotect])
+AC_CHECK_DECLS_ONCE([alarm])
+gt_TYPE_WCHAR_T
+gt_TYPE_WINT_T
+dnl Check for prerequisites for memory fence checks.
+gl_FUNC_MMAP_ANON
+AC_CHECK_HEADERS_ONCE([sys/mman.h])
+AC_CHECK_FUNCS_ONCE([mprotect])
   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(gltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -367,6 +432,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/c-ctype.h
   lib/errno.in.h
   lib/float+.h
+  lib/float.c
   lib/float.in.h
   lib/gc-gnulib.c
   lib/gc-libgcrypt.c
@@ -420,10 +486,10 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/extensions.m4
   m4/fcntl-o.m4
   m4/float_h.m4
+  m4/fpieee.m4
   m4/gc-hmac-md5.m4
   m4/gc-hmac-sha1.m4
   m4/gc-md5.m4
-  m4/gc-pbkdf2-sha1.m4
   m4/gc-random.m4
   m4/gc-sha1.m4
   m4/gc.m4
@@ -435,8 +501,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/glibc21.m4
   m4/gnulib-common.m4
   m4/gss-extra.m4
-  m4/hmac-md5.m4
-  m4/hmac-sha1.m4
   m4/iconv.m4
   m4/include_next.m4
   m4/intdiv0.m4
@@ -446,6 +510,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/intmax.m4
   m4/intmax_t.m4
   m4/inttypes-pri.m4
+  m4/inttypes.m4
   m4/inttypes_h.m4
   m4/lcmessage.m4
   m4/ld-output-def.m4
@@ -498,6 +563,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-base64.c
   tests/test-c-ctype.c
   tests/test-errno.c
+  tests/test-float.c
   tests/test-gc-hmac-md5.c
   tests/test-gc-hmac-sha1.c
   tests/test-gc-md5.c
@@ -506,6 +572,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-gc.c
   tests/test-getdelim.c
   tests/test-getline.c
+  tests/test-intprops.c
+  tests/test-inttypes.c
   tests/test-memchr.c
   tests/test-memmem.c
   tests/test-stdbool.c
@@ -525,8 +593,10 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-wchar.c
   tests/zerosize-ptr.h
   tests=lib/dummy.c
+  tests=lib/fpucw.h
   tests=lib/getpagesize.c
   tests=lib/intprops.h
+  tests=lib/inttypes.in.h
   top/GNUmakefile
   top/maint.mk
 ])
diff --git a/lib/gl/m4/hmac-md5.m4 b/lib/gl/m4/hmac-md5.m4
deleted file mode 100644
index 2945555..0000000
--- a/lib/gl/m4/hmac-md5.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# hmac-md5.m4 serial 2
-dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_HMAC_MD5],
-[
-  AC_LIBOBJ([hmac-md5])
-])
diff --git a/lib/gl/m4/hmac-sha1.m4 b/lib/gl/m4/hmac-sha1.m4
deleted file mode 100644
index d270a1e..0000000
--- a/lib/gl/m4/hmac-sha1.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# hmac-sha1.m4 serial 2
-dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_HMAC_SHA1],
-[
-  AC_LIBOBJ([hmac-sha1])
-])
diff --git a/lib/gl/m4/inttypes.m4 b/lib/gl/m4/inttypes.m4
new file mode 100644
index 0000000..cc027a4
--- /dev/null
+++ b/lib/gl/m4/inttypes.m4
@@ -0,0 +1,172 @@
+# inttypes.m4 serial 24
+dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+  AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
+  gl_INTTYPES_PRI_SCN
+])
+
+AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
+[
+  AC_REQUIRE([gl_STDINT_H])
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
+
+  dnl Override <inttypes.h> always, so that the portability warnings work.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+  AC_REQUIRE([gl_MULTIARCH])
+
+  dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+  dnl <inttypes.h> relies on them.  This macro is only needed when a
+  dnl C++ compiler is in use; it has no effect for a C compiler.
+  dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+  dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+  dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+  AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+    [Define to make the limit macros in <stdint.h> visible.])
+  AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+   <inttypes.h> relies on them.  */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && 
GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+
+  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([[#include <inttypes.h>
+    ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+
+# Ensure that the PRI* and SCN* macros are defined appropriately.
+AC_DEFUN([gl_INTTYPES_PRI_SCN],
+[
+  AC_REQUIRE([gt_INTTYPES_PRI])
+
+  PRIPTR_PREFIX=
+  if test -n "$STDINT_H"; then
+    dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+    PRIPTR_PREFIX='"l"'
+  else
+    dnl Using the system's <stdint.h>.
+    for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;]])],
+        [PRIPTR_PREFIX='"'$glpfx'"'])
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
+  AC_SUBST([PRIPTR_PREFIX])
+
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [INT32_MAX_LT_INTMAX_MAX],
+    [defined INT32_MAX && defined INTMAX_MAX],
+    [INT32_MAX < INTMAX_MAX],
+    [sizeof (int) < sizeof (long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [INT64_MAX_EQ_LONG_MAX],
+      [defined INT64_MAX],
+      [INT64_MAX == LONG_MAX],
+      [sizeof (long long int) == sizeof (long int)])
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
+  fi
+  gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+    [UINT32_MAX_LT_UINTMAX_MAX],
+    [defined UINT32_MAX && defined UINTMAX_MAX],
+    [UINT32_MAX < UINTMAX_MAX],
+    [sizeof (unsigned int) < sizeof (unsigned long long int)])
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+    gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+      [UINT64_MAX_EQ_ULONG_MAX],
+      [defined UINT64_MAX],
+      [UINT64_MAX == ULONG_MAX],
+      [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
+  fi
+])
+
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+  AC_CACHE_CHECK([whether $3],
+    [gl_cv_test_$1],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if $2
+             #define CONDITION ($3)
+            #elif HAVE_LONG_LONG_INT
+             #define CONDITION ($4)
+            #else
+             #define CONDITION 0
+            #endif
+            int test[CONDITION ? 1 : -1];]])],
+       [gl_cv_test_$1=yes],
+       [gl_cv_test_$1=no])])
+  if test $gl_cv_test_$1 = yes; then
+    $1=1;
+  else
+    $1=0;
+  fi
+  AC_SUBST([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+  GNULIB_IMAXABS=0;      AC_SUBST([GNULIB_IMAXABS])
+  GNULIB_IMAXDIV=0;      AC_SUBST([GNULIB_IMAXDIV])
+  GNULIB_STRTOIMAX=0;    AC_SUBST([GNULIB_STRTOIMAX])
+  GNULIB_STRTOUMAX=0;    AC_SUBST([GNULIB_STRTOUMAX])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_IMAXABS=1;   AC_SUBST([HAVE_DECL_IMAXABS])
+  HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
+  HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+  HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+  INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
+  INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
+  PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
+  PRIPTR_PREFIX=__PRIPTR_PREFIX;  AC_SUBST([PRIPTR_PREFIX])
+  UINT32_MAX_LT_UINTMAX_MAX=1;  AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
+  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';  AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
+])
diff --git a/lib/gl/m4/malloc.m4 b/lib/gl/m4/malloc.m4
index 8094444..87018ec 100644
--- a/lib/gl/m4/malloc.m4
+++ b/lib/gl/m4/malloc.m4
@@ -1,4 +1,4 @@
-# malloc.m4 serial 12
+# malloc.m4 serial 13
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
                [Define to 1 if your system has a GNU libc compatible 'malloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_MALLOC_GNU], [0])
-     gl_REPLACE_MALLOC
+     REPLACE_MALLOC=1
     ])
 ])
 
@@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
     AC_DEFINE([HAVE_MALLOC_POSIX], [1],
       [Define if the 'malloc' function is POSIX compliant.])
   else
-    gl_REPLACE_MALLOC
+    REPLACE_MALLOC=1
   fi
 ])
 
@@ -58,9 +58,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
         [gl_cv_func_malloc_posix=no])
     ])
 ])
-
-AC_DEFUN([gl_REPLACE_MALLOC],
-[
-  AC_LIBOBJ([malloc])
-  REPLACE_MALLOC=1
-])
diff --git a/lib/gl/m4/md5.m4 b/lib/gl/m4/md5.m4
index ce7671d..4b41a85 100644
--- a/lib/gl/m4/md5.m4
+++ b/lib/gl/m4/md5.m4
@@ -1,4 +1,4 @@
-# md5.m4 serial 11
+# md5.m4 serial 12
 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_MD5],
 [
-  AC_LIBOBJ([md5])
-
   dnl Prerequisites of lib/md5.c.
   AC_REQUIRE([gl_BIGENDIAN])
   AC_REQUIRE([AC_C_INLINE])
diff --git a/lib/gl/m4/memchr.m4 b/lib/gl/m4/memchr.m4
index a544e2b..f6dc3e7 100644
--- a/lib/gl/m4/memchr.m4
+++ b/lib/gl/m4/memchr.m4
@@ -1,4 +1,4 @@
-# memchr.m4 serial 11
+# memchr.m4 serial 12
 dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -80,10 +80,6 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
       REPLACE_MEMCHR=1
     fi
   fi
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
-    AC_LIBOBJ([memchr])
-    gl_PREREQ_MEMCHR
-  fi
 ])
 
 # Prerequisites of lib/memchr.c.
diff --git a/lib/gl/m4/memmem.m4 b/lib/gl/m4/memmem.m4
index dae71a9..e912205 100644
--- a/lib/gl/m4/memmem.m4
+++ b/lib/gl/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 22
+# memmem.m4 serial 23
 dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,12 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([memmem])
+  AC_CHECK_FUNCS([memmem])
+  if test $ac_cv_func_memmem = yes; then
+    HAVE_MEMMEM=1
+  else
+    HAVE_MEMMEM=0
+  fi
   AC_CHECK_DECLS_ONCE([memmem])
   if test $ac_cv_have_decl_memmem = no; then
     HAVE_DECL_MEMMEM=0
@@ -68,7 +73,6 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
       ])
     if test "$gl_cv_func_memmem_works_always" != yes; then
       REPLACE_MEMMEM=1
-      AC_LIBOBJ([memmem])
     fi
   fi
   gl_PREREQ_MEMMEM
@@ -133,7 +137,6 @@ static void quit (int sig) { exit (sig + 128); }
       ])
     if test "$gl_cv_func_memmem_works_fast" != yes; then
       REPLACE_MEMMEM=1
-      AC_LIBOBJ([memmem])
     fi
   fi
 ]) # gl_FUNC_MEMMEM
diff --git a/lib/gl/m4/memxor.m4 b/lib/gl/m4/memxor.m4
index 42789eb..10c3313 100644
--- a/lib/gl/m4/memxor.m4
+++ b/lib/gl/m4/memxor.m4
@@ -1,4 +1,4 @@
-# memxor.m4 serial 3
+# memxor.m4 serial 4
 dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,5 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_MEMXOR],
 [
-  AC_LIBOBJ([memxor])
   AC_REQUIRE([AC_C_RESTRICT])
 ])
diff --git a/lib/gl/m4/printf.m4 b/lib/gl/m4/printf.m4
index 9c2ed1e..ead5ece 100644
--- a/lib/gl/m4/printf.m4
+++ b/lib/gl/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 42
+# printf.m4 serial 43
 dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -892,7 +892,8 @@ dnl On mingw, precisions larger than 512 are treated like 
512, in integer,
 dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
 dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC,
 dnl precisions larger than 510 in floating-point output yield wrong results.
-dnl On BeOS, precisions larger than 1044 crash the program.
+dnl On AIX 7.1, precisions larger than 998 in floating-point output yield
+dnl wrong results. On BeOS, precisions larger than 1044 crash the program.
 dnl Result is gl_cv_func_printf_precision.
 
 AC_DEFUN([gl_PRINTF_PRECISION],
@@ -921,6 +922,9 @@ int main ()
   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
       || buf[0] != '1')
     result |= 4;
+  if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+      || buf[0] != '1')
+    result |= 4;
   return result;
 }]])],
         [gl_cv_func_printf_precision=yes],
@@ -1465,7 +1469,8 @@ dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  
#  .  .  .  #  .  .  .
 dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  
.  .  .  .  .  .
 dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  #  .  
.  .  #  .  .  .
 dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  
#  #  #  #  #  #
-dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
+dnl   AIX 7.1                        .  .  #  #  #  .  .  .  .  .  .  #  #  .  
.  .  .  .  .  .
+dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  .  #  .  .  
.  .  .  .  .  .
 dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  
.  .  #  .  .  .
 dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  
.  .  #  #  .  .
 dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  
.  .  #  #  .  #
diff --git a/lib/gl/m4/realloc.m4 b/lib/gl/m4/realloc.m4
index a403d9f..5cc1340 100644
--- a/lib/gl/m4/realloc.m4
+++ b/lib/gl/m4/realloc.m4
@@ -1,4 +1,4 @@
-# realloc.m4 serial 11
+# realloc.m4 serial 12
 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU],
                [Define to 1 if your system has a GNU libc compatible 'realloc'
                 function, and to 0 otherwise.])],
     [AC_DEFINE([HAVE_REALLOC_GNU], [0])
-     gl_REPLACE_REALLOC
+     REPLACE_REALLOC=1
     ])
 ])# gl_FUNC_REALLOC_GNU
 
@@ -33,12 +33,6 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
     AC_DEFINE([HAVE_REALLOC_POSIX], [1],
       [Define if the 'realloc' function is POSIX compliant.])
   else
-    gl_REPLACE_REALLOC
+    REPLACE_REALLOC=1
   fi
 ])
-
-AC_DEFUN([gl_REPLACE_REALLOC],
-[
-  AC_LIBOBJ([realloc])
-  REPLACE_REALLOC=1
-])
diff --git a/lib/gl/m4/sha1.m4 b/lib/gl/m4/sha1.m4
index e40505f..b8f5c1d 100644
--- a/lib/gl/m4/sha1.m4
+++ b/lib/gl/m4/sha1.m4
@@ -1,4 +1,4 @@
-# sha1.m4 serial 9
+# sha1.m4 serial 10
 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_SHA1],
 [
-  AC_LIBOBJ([sha1])
-
   dnl Prerequisites of lib/sha1.c.
   AC_REQUIRE([gl_BIGENDIAN])
   AC_REQUIRE([AC_C_INLINE])
diff --git a/lib/gl/m4/stdint.m4 b/lib/gl/m4/stdint.m4
index dff37fe..c75e957 100644
--- a/lib/gl/m4/stdint.m4
+++ b/lib/gl/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 40
+# stdint.m4 serial 41
 dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 dnl From Paul Eggert and Bruno Haible.
 dnl Test whether <stdint.h> is supported or must be substituted.
 
-AC_DEFUN([gl_STDINT_H],
+AC_DEFUN_ONCE([gl_STDINT_H],
 [
   AC_PREREQ([2.59])dnl
 
diff --git a/lib/gl/m4/strnlen.m4 b/lib/gl/m4/strnlen.m4
index a1c59ac..672acfd 100644
--- a/lib/gl/m4/strnlen.m4
+++ b/lib/gl/m4/strnlen.m4
@@ -1,4 +1,4 @@
-# strnlen.m4 serial 12
+# strnlen.m4 serial 13
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -16,16 +16,14 @@ AC_DEFUN([gl_FUNC_STRNLEN],
   if test $ac_cv_have_decl_strnlen = no; then
     HAVE_DECL_STRNLEN=0
   else
-    AC_FUNC_STRNLEN
+    m4_pushdef([AC_LIBOBJ], [:])
     dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
+    AC_FUNC_STRNLEN
+    m4_popdef([AC_LIBOBJ])
     if test $ac_cv_func_strnlen_working = no; then
       REPLACE_STRNLEN=1
     fi
   fi
-  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
-    AC_LIBOBJ([strnlen])
-    gl_PREREQ_STRNLEN
-  fi
 ])
 
 # Prerequisites of lib/strnlen.c.
diff --git a/lib/gl/m4/strverscmp.m4 b/lib/gl/m4/strverscmp.m4
index 5d1a9ba..394b4c3 100644
--- a/lib/gl/m4/strverscmp.m4
+++ b/lib/gl/m4/strverscmp.m4
@@ -1,4 +1,4 @@
-# strverscmp.m4 serial 7
+# strverscmp.m4 serial 8
 dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,9 +10,8 @@ AC_DEFUN([gl_FUNC_STRVERSCMP],
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([strverscmp])
+  AC_CHECK_FUNCS([strverscmp])
   if test $ac_cv_func_strverscmp = no; then
-    gl_PREREQ_STRVERSCMP
     HAVE_STRVERSCMP=0
   fi
 ])
diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index eeb3360..fb6fe07 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 55
+# unistd_h.m4 serial 56
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,8 +36,8 @@ AC_DEFUN([gl_UNISTD_H],
     ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
     fsync ftruncate getcwd getdomainname getdtablesize getgroups
     gethostname getlogin getlogin_r getpagesize getusershell setusershell
-    endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink
-    readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
+    endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite
+    readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
     usleep])
 ])
 
@@ -72,6 +72,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETLOGIN_R=0;           AC_SUBST([GNULIB_GETLOGIN_R])
   GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
+  GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
   GNULIB_LCHOWN=0;               AC_SUBST([GNULIB_LCHOWN])
   GNULIB_LINK=0;                 AC_SUBST([GNULIB_LINK])
   GNULIB_LINKAT=0;               AC_SUBST([GNULIB_LINKAT])
@@ -110,6 +111,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
+  HAVE_GROUP_MEMBER=1;    AC_SUBST([HAVE_GROUP_MEMBER])
   HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_LINKAT=1;          AC_SUBST([HAVE_LINKAT])
diff --git a/lib/gl/m4/wchar_h.m4 b/lib/gl/m4/wchar_h.m4
index 6255ff3..977491f 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 38
+# wchar_h.m4 serial 39
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -119,13 +119,6 @@ Configuration aborted.])
   fi
 ])
 
-dnl Unconditionally enables the replacement of <wchar.h>.
-AC_DEFUN([gl_REPLACE_WCHAR_H],
-[
-  dnl This is a no-op, because <wchar.h> is always overridden.
-  :
-])
-
 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/lib/gl/stddef.in.h b/lib/gl/stddef.in.h
index b3fc2b5..c13b453 100644
--- a/lib/gl/stddef.in.h
+++ b/lib/gl/stddef.in.h
@@ -38,9 +38,9 @@
    remember if special invocation has ever been used to obtain wint_t,
    in which case we need to clean up NULL yet again.  */
 
-# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined address@hidden@_STDDEF_H && defined _GL_STDDEF_WINT_T)
 #  ifdef __need_wint_t
-#   undef _GL_STDDEF_H
+#   undef address@hidden@_STDDEF_H
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -49,14 +49,14 @@
 #else
 /* Normal invocation convention.  */
 
-# ifndef _GL_STDDEF_H
+# ifndef address@hidden@_STDDEF_H
 
 /* The include_next requires a split double-inclusion guard.  */
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
 
-#  ifndef _GL_STDDEF_H
-#   define _GL_STDDEF_H
+#  ifndef address@hidden@_STDDEF_H
+#   define address@hidden@_STDDEF_H
 
 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses.  */
 #if @REPLACE_NULL@
@@ -82,6 +82,6 @@
 # define wchar_t int
 #endif
 
-#  endif /* _GL_STDDEF_H */
-# endif /* _GL_STDDEF_H */
+#  endif /* address@hidden@_STDDEF_H */
+# endif /* address@hidden@_STDDEF_H */
 #endif /* __need_XXX */
diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h
index 1140c12..7a84490 100644
--- a/lib/gl/stdint.in.h
+++ b/lib/gl/stdint.in.h
@@ -21,7 +21,7 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
-#ifndef _GL_STDINT_H
+#ifndef address@hidden@_STDINT_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -52,13 +52,13 @@
   /* Other systems may have an incomplete or buggy <stdint.h>.
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
-     _GL_STDINT_H is defined.
+     address@hidden@_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
-#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-#define _GL_STDINT_H
+#if ! defined address@hidden@_STDINT_H && ! defined 
_GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define address@hidden@_STDINT_H
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
@@ -93,7 +93,7 @@
 
 #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 
-/* Minimum and maximum values for a integer type under the usual assumption.
+/* Minimum and maximum values for an integer type under the usual assumption.
    Return an unspecified value if BITS == 0, adding a check to pacify
    picky compilers.  */
 
@@ -588,5 +588,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof 
(uintmax_t)
 
 #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
 
-#endif /* _GL_STDINT_H */
-#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+#endif /* address@hidden@_STDINT_H */
+#endif /* !defined address@hidden@_STDINT_H && !defined 
_GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 30e935c..e554be6 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -35,7 +35,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_STDIO_H
+#ifndef address@hidden@_STDIO_H
 
 #define _GL_ALREADY_INCLUDING_STDIO_H
 
@@ -44,8 +44,8 @@
 
 #undef _GL_ALREADY_INCLUDING_STDIO_H
 
-#ifndef _GL_STDIO_H
-#define _GL_STDIO_H
+#ifndef address@hidden@_STDIO_H
+#define address@hidden@_STDIO_H
 
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
@@ -461,25 +461,6 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, 
int whence)
 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
 # endif
 _GL_CXXALIASWARN (fseeko);
-# if (@REPLACE_FSEEKO@ || address@hidden@) && address@hidden@
-   /* Provide an fseek function that is consistent with fseeko.  */
-   /* In order to avoid that fseek gets defined as a macro here, the
-      developer can request the 'fseek' module.  */
-#  if !GNULIB_defined_fseek_function
-#   undef fseek
-#   define fseek rpl_fseek
-static inline int _GL_ARG_NONNULL ((1))
-rpl_fseek (FILE *fp, long offset, int whence)
-{
-#   if @REPLACE_FSEEKO@
-  return rpl_fseeko (fp, offset, whence);
-#   else
-  return fseeko (fp, offset, whence);
-#   endif
-}
-#   define GNULIB_defined_fseek_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FSEEK_WARN /* Category 1, above.  */
 # undef fseek
@@ -539,25 +520,6 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) 
_GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
 # endif
 _GL_CXXALIASWARN (ftello);
-# if (@REPLACE_FTELLO@ || address@hidden@) && address@hidden@
-   /* Provide an ftell function that is consistent with ftello.  */
-   /* In order to avoid that ftell gets defined as a macro here, the
-      developer can request the 'ftell' module.  */
-#  if !GNULIB_defined_ftell_function
-#   undef ftell
-#   define ftell rpl_ftell
-static inline long _GL_ARG_NONNULL ((1))
-rpl_ftell (FILE *f)
-{
-#   if @REPLACE_FTELLO@
-  return rpl_ftello (f);
-#   else
-  return ftello (f);
-#   endif
-}
-#   define GNULIB_defined_ftell_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FTELL_WARN /* Category 1, above.  */
 # undef ftell
@@ -1345,6 +1307,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX 
compliant - "
 #endif
 
 
-#endif /* _GL_STDIO_H */
-#endif /* _GL_STDIO_H */
+#endif /* address@hidden@_STDIO_H */
+#endif /* address@hidden@_STDIO_H */
 #endif
diff --git a/lib/gl/stdlib.in.h b/lib/gl/stdlib.in.h
index bb62b70..361f38d 100644
--- a/lib/gl/stdlib.in.h
+++ b/lib/gl/stdlib.in.h
@@ -28,13 +28,13 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_STDLIB_H
+#ifndef address@hidden@_STDLIB_H
 
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STDLIB_H@
 
-#ifndef _GL_STDLIB_H
-#define _GL_STDLIB_H
+#ifndef address@hidden@_STDLIB_H
+#define address@hidden@_STDLIB_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -761,6 +761,6 @@ _GL_CXXALIASWARN (wctomb);
 #endif
 
 
-#endif /* _GL_STDLIB_H */
-#endif /* _GL_STDLIB_H */
+#endif /* address@hidden@_STDLIB_H */
+#endif /* address@hidden@_STDLIB_H */
 #endif
diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h
index 7f3f0b4..5a66634 100644
--- a/lib/gl/string.in.h
+++ b/lib/gl/string.in.h
@@ -16,7 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STRING_H
+#ifndef address@hidden@_STRING_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,8 @@
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STRING_H@
 
-#ifndef _GL_STRING_H
-#define _GL_STRING_H
+#ifndef address@hidden@_STRING_H
+#define address@hidden@_STRING_H
 
 /* NetBSD 5.0 mis-defines NULL.  */
 #include <stddef.h>
@@ -736,9 +736,9 @@ _GL_CXXALIASWARN (mbschr);
    and return a pointer to it.  Return NULL if C is not found in STRING.
    Unlike strrchr(), this function works correctly in multibyte locales with
    encodings such as GB18030.  */
-# if defined __hpux
+# if defined __hpux || defined __INTERIX
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+#   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
 #  endif
 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
                                    _GL_ARG_NONNULL ((1)));
@@ -977,5 +977,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
 #endif
 
 
-#endif /* _GL_STRING_H */
-#endif /* _GL_STRING_H */
+#endif /* address@hidden@_STRING_H */
+#endif /* address@hidden@_STRING_H */
diff --git a/lib/gl/unistd.in.h b/lib/gl/unistd.in.h
index 71ab857..92c0af7 100644
--- a/lib/gl/unistd.in.h
+++ b/lib/gl/unistd.in.h
@@ -36,7 +36,7 @@
 # define _GL_WINSOCK2_H_WITNESS
 
 /* Normal invocation.  */
-#elif !defined _GL_UNISTD_H
+#elif !defined address@hidden@_UNISTD_H
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
@@ -51,8 +51,8 @@
 # undef _GL_INCLUDING_WINSOCK2_H
 #endif
 
-#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-#define _GL_UNISTD_H
+#if !defined address@hidden@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define address@hidden@_UNISTD_H
 
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
 #include <stddef.h>
@@ -120,7 +120,7 @@
 #if @GNULIB_GETHOSTNAME@
 /* Get all possible declarations of gethostname().  */
 # if @UNISTD_H_HAVE_WINSOCK2_H@
-#  if !defined _GL_SYS_SOCKET_H
+#  if !defined address@hidden@_SYS_SOCKET_H
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef socket
 #    define socket              socket_used_without_including_sys_socket_h
@@ -181,7 +181,7 @@
                       "shutdown() used without including <sys/socket.h>");
 #   endif
 #  endif
-#  if !defined _GL_SYS_SELECT_H
+#  if !defined address@hidden@_SYS_SELECT_H
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef select
 #    define select              select_used_without_including_sys_select_h
@@ -871,6 +871,22 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable 
- "
 #endif
 
 
+#if @GNULIB_GROUP_MEMBER@
+/* Determine whether group id is in calling user's group list.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
+# endif
+_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
+_GL_CXXALIASWARN (group_member);
+#elif defined GNULIB_POSIXCHECK
+# undef group_member
+# if HAVE_RAW_DECL_GROUP_MEMBER
+_GL_WARN_ON_USE (group_member, "group_member is unportable - "
+                 "use gnulib module group-member for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHOWN@
 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
    to GID (if GID is not -1).  Do not follow symbolic links.
@@ -1046,6 +1062,7 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
    specification <http://www.opengroup.org/susv3xsh/pread.html>.  */
 # if @REPLACE_PREAD@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pread
 #   define pread rpl_pread
 #  endif
 _GL_FUNCDECL_RPL (pread, ssize_t,
@@ -1080,6 +1097,7 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
    <http://www.opengroup.org/susv3xsh/pwrite.html>.  */
 # if @REPLACE_PWRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pwrite
 #   define pwrite rpl_pwrite
 #  endif
 _GL_FUNCDECL_RPL (pwrite, ssize_t,
@@ -1400,5 +1418,5 @@ _GL_CXXALIASWARN (write);
 #endif
 
 
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */
+#endif /* address@hidden@_UNISTD_H */
+#endif /* address@hidden@_UNISTD_H */
diff --git a/lib/gl/verify.h b/lib/gl/verify.h
index 5c08b7e..a172f29 100644
--- a/lib/gl/verify.h
+++ b/lib/gl/verify.h
@@ -17,42 +17,37 @@
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 
-#ifndef VERIFY_H
-# define VERIFY_H 1
+#ifndef _GL_VERIFY_H
+# define _GL_VERIFY_H
 
-/* Define HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
+
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
    C1X draft N1548 section 6.7.10.  This is supported by GCC 4.6.0 and
    later, in C mode, and its use here generates easier-to-read diagnostics
    when verify (R) fails.
 
-   Define HAVE_STATIC_ASSERT to 1 if static_assert works as per the
-   C1X draft N1548 section 7.2 or the C++0X draft N3242 section 7.(4).
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
+   C++0X draft N3242 section 7.(4).
    This will likely be supported by future GCC versions, in C++ mode.
 
-   For now, use this only with GCC.  Eventually whether _Static_assert
-   and static_assert works should be determined by 'configure'.  */
+   Use this only with GCC.  If we were willing to slow 'configure'
+   down we could also use it with other compilers, but since this
+   affects only the quality of diagnostics, why bother?  */
 # if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined 
__cplusplus
-#  define HAVE__STATIC_ASSERT 1
+#  define _GL_HAVE__STATIC_ASSERT 1
 # endif
 /* The condition (99 < __GNUC__) is temporary, until we know about the
    first G++ release that supports static_assert.  */
 # if (99 < __GNUC__) && defined __cplusplus
-#  define HAVE_STATIC_ASSERT 1
+#  define _GL_HAVE_STATIC_ASSERT 1
 # endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
    assert (R), there is no run-time overhead.
 
-   There are two macros, since no single macro can be used in all
-   contexts in C.  verify_true (R) is for scalar contexts, including
-   integer constant expression contexts.  verify (R) is for declaration
-   contexts, e.g., the top level.
-
-   Symbols ending in "__" are private to this header.
-
    If _Static_assert works, verify (R) uses it directly.  Similarly,
-   verify_true (R) works by packaging a _Static_assert inside a struct
+   _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct
    that is an operand of sizeof.
 
    The code below uses several ideas for C++ compilers, and for C
@@ -64,7 +59,9 @@
      constant and nonnegative.
 
    * Next this expression W is wrapped in a type
-     struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+     struct _gl_verify_type {
+       unsigned int _gl_verify_error_if_negative: W;
+     }.
      If W is negative, this yields a compile-time error.  No compiler can
      deal with a bit-field of negative size.
 
@@ -78,7 +75,7 @@
 
        void function (int n) { verify (n < 0); }
 
-   * For the verify macro, the struct verify_type__ will need to
+   * For the verify macro, the struct _gl_verify_type will need to
      somehow be embedded into a declaration.  To be portable, this
      declaration must declare an object, a constant, a function, or a
      typedef name.  If the declared entity uses the type directly,
@@ -116,11 +113,11 @@
      Which of the following alternatives can be used?
 
        extern int dummy [sizeof (struct {...})];
-       extern int dummy [sizeof (struct verify_type__ {...})];
+       extern int dummy [sizeof (struct _gl_verify_type {...})];
        extern void dummy (int [sizeof (struct {...})]);
-       extern void dummy (int [sizeof (struct verify_type__ {...})]);
+       extern void dummy (int [sizeof (struct _gl_verify_type {...})]);
        extern int (*dummy (void)) [sizeof (struct {...})];
-       extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+       extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})];
 
      In the second and sixth case, the struct type is exported to the
      outer scope; two such declarations therefore collide.  GCC warns
@@ -159,44 +156,88 @@
    possible.  */
 # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
 
-/* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  */
+/* Verify requirement R at compile-time, as an integer constant expression
+   that returns 1.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.  */
+
+# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+    (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
 
 # ifdef __cplusplus
+#  if !GNULIB_defined_struct__gl_verify_type
 template <int w>
-  struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-#  define verify_true(R) \
-     (!!sizeof (verify_type__<(R) ? 1 : -1>))
-# elif HAVE__STATIC_ASSERT
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { \
-        _Static_assert (R, "verify_true (" #R ")"); \
-        int verify_dummy__; \
-       }))
-# elif HAVE_STATIC_ASSERT
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { \
-        static_assert (R, "verify_true (" #R ")"); \
-        int verify_dummy__; \
-       }))
+  struct _gl_verify_type {
+    unsigned int _gl_verify_error_if_negative: w;
+  };
+#   define GNULIB_defined_struct__gl_verify_type 1
+#  endif
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+    _gl_verify_type<(R) ? 1 : -1>
+# elif defined _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct {                                   \
+       _Static_assert (R, DIAGNOSTIC);          \
+       int _gl_dummy;                          \
+     }
 # else
-#  define verify_true(R) \
-     (!!sizeof \
-      (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+#  define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+     struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
 # endif
 
 /* Verify requirement R at compile-time, as a declaration without a
-   trailing ';'.  */
+   trailing ';'.  If R is false, fail at compile-time, preferably
+   with a diagnostic that includes the string-literal DIAGNOSTIC.
+
+   Unfortunately, unlike C1X, this implementation must appear as an
+   ordinary declaration, and cannot appear inside struct { ... }.  */
 
-# if HAVE__STATIC_ASSERT
-#  define verify(R) _Static_assert (R, "verify (" #R ")")
-# elif HAVE_STATIC_ASSERT
-#  define verify(R) static_assert (R, "verify (" #R ")")
+# ifdef _GL_HAVE__STATIC_ASSERT
+#  define _GL_VERIFY _Static_assert
 # else
-#  define verify(R) \
-    extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+#  define _GL_VERIFY(R, DIAGNOSTIC)                                   \
+     extern int (*_GL_GENSYM (_gl_verify_function) (void))            \
+       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+# endif
+
+/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
+# ifdef _GL_STATIC_ASSERT_H
+#  if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+#   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+#  endif
+#  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+#   define static_assert _Static_assert /* Draft C1X requires this #define.  */
+#  endif
 # endif
 
+/* @assert.h omit start@  */
+
+/* Each of these macros verifies that its argument R is nonzero.  To
+   be portable, R should be an integer constant expression.  Unlike
+   assert (R), there is no run-time overhead.
+
+   There are two macros, since no single macro can be used in all
+   contexts in C.  verify_true (R) is for scalar contexts, including
+   integer constant expression contexts.  verify (R) is for declaration
+   contexts, e.g., the top level.  */
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+   Return 1.  This is equivalent to verify_expr (R, 1).
+
+   verify_true is obsolescent; please use verify_expr instead.  */
+
+# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+
+/* Verify requirement R at compile-time.  Return the value of the
+   expression E.  */
+
+# define verify_expr(R, E) \
+    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+
+/* Verify requirement R at compile-time, as a declaration without a
+   trailing ';'.  */
+
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+/* @assert.h omit end@  */
+
 #endif
diff --git a/lib/gl/wchar.in.h b/lib/gl/wchar.in.h
index fd4e082..08fe586 100644
--- a/lib/gl/wchar.in.h
+++ b/lib/gl/wchar.in.h
@@ -49,7 +49,7 @@
 #else
 /* Normal invocation convention.  */
 
-#ifndef _GL_WCHAR_H
+#ifndef address@hidden@_WCHAR_H
 
 #define _GL_ALREADY_INCLUDING_WCHAR_H
 
@@ -81,8 +81,8 @@
 
 #undef _GL_ALREADY_INCLUDING_WCHAR_H
 
-#ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
+#ifndef address@hidden@_WCHAR_H
+#define address@hidden@_WCHAR_H
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -989,6 +989,6 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
 #endif
 
 
-#endif /* _GL_WCHAR_H */
-#endif /* _GL_WCHAR_H */
+#endif /* address@hidden@_WCHAR_H */
+#endif /* address@hidden@_WCHAR_H */
 #endif
diff --git a/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index 7764d14..d3b1a34 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -177,6 +177,21 @@ EXTRA_DIST += test-errno.c
 
 ## end   gnulib module errno-tests
 
+## begin gnulib module float-tests
+
+TESTS += test-float
+check_PROGRAMS += test-float
+EXTRA_DIST += test-float.c macros.h
+
+## end   gnulib module float-tests
+
+## begin gnulib module fpucw
+
+
+EXTRA_DIST += fpucw.h
+
+## end   gnulib module fpucw
+
 ## begin gnulib module getdelim-tests
 
 TESTS += test-getdelim
@@ -211,6 +226,64 @@ EXTRA_DIST += intprops.h
 
 ## end   gnulib module intprops
 
+## begin gnulib module intprops-tests
+
+TESTS += test-intprops
+check_PROGRAMS += test-intprops
+EXTRA_DIST += test-intprops.c macros.h
+
+## end   gnulib module intprops-tests
+
+## begin gnulib module inttypes-incomplete
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+             -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|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+             -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+             -e 
's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+             -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+             -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+             -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+             -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' 
\
+             -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+             -e 
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+             -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' 
\
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/inttypes.in.h; \
+       } > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+EXTRA_DIST += inttypes.in.h
+
+## end   gnulib module inttypes-incomplete
+
+## begin gnulib module inttypes-tests
+
+TESTS += test-inttypes
+check_PROGRAMS += test-inttypes
+EXTRA_DIST += test-inttypes.c
+
+## end   gnulib module inttypes-tests
+
 ## begin gnulib module memchr-tests
 
 TESTS += test-memchr
diff --git a/lib/gltests/fpucw.h b/lib/gltests/fpucw.h
new file mode 100644
index 0000000..07403bf
--- /dev/null
+++ b/lib/gltests/fpucw.h
@@ -0,0 +1,107 @@
+/* Manipulating the FPU control word.
+   Copyright (C) 2007-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <address@hidden>, 2007.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _FPUCW_H
+#define _FPUCW_H
+
+/* The i386 floating point hardware (the 387 compatible FPU, not the modern
+   SSE/SSE2 hardware) has a controllable rounding precision.  It is specified
+   through the 'PC' bits in the FPU control word ('fctrl' register).  (See
+   the GNU libc i386 <fpu_control.h> header for details.)
+
+   On some platforms, such as Linux or Solaris, the default precision setting
+   is set to "extended precision".  This means that 'long double' instructions
+   operate correctly, but 'double' computations often produce slightly
+   different results as on strictly IEEE 754 conforming systems.
+
+   On some platforms, such as NetBSD, the default precision is set to
+   "double precision".  This means that 'long double' instructions will operate
+   only as 'double', i.e. lead wrong results.
+
+   The FPU control word is under control of the application, i.e. it is
+   not required to be set either way by the ABI.  (In fact, the i386 ABI
+   http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38
+   is not clear about it.  But in any case, gcc treats the control word
+   like a "preserved" register: it emits code that assumes that the control
+   word is preserved across calls, and it restores the control word at the
+   end of functions that modify it.)
+
+   See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html
+   for a good explanation.
+   See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for
+   some argumentation which setting should be the default.  */
+
+/* This header file provides the following facilities:
+     fpucw_t                        integral type holding the value of 'fctrl'
+     FPU_PC_MASK                    bit mask denoting the precision control
+     FPU_PC_DOUBLE                  precision control for 53 bits mantissa
+     FPU_PC_EXTENDED                precision control for 64 bits mantissa
+     GET_FPUCW ()                   yields the current FPU control word
+     SET_FPUCW (word)               sets the FPU control word
+     DECL_LONG_DOUBLE_ROUNDING      variable declaration for
+                                    BEGIN/END_LONG_DOUBLE_ROUNDING
+     BEGIN_LONG_DOUBLE_ROUNDING ()  starts a sequence of instructions with
+                                    'long double' safe operation precision
+     END_LONG_DOUBLE_ROUNDING ()    ends a sequence of instructions with
+                                    'long double' safe operation precision
+ */
+
+/* Inline assembler like this works only with GNU C.  */
+#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+
+typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
+
+# define FPU_PC_MASK 0x0300
+# define FPU_PC_DOUBLE 0x200    /* glibc calls this _FPU_DOUBLE */
+# define FPU_PC_EXTENDED 0x300  /* glibc calls this _FPU_EXTENDED */
+
+# define GET_FPUCW() \
+  ({ fpucw_t _cw;                                               \
+     __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw));         \
+     _cw;                                                       \
+   })
+# define SET_FPUCW(word) \
+  (void)({ fpucw_t _ncw = (word);                               \
+           __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw));  \
+         })
+
+# define DECL_LONG_DOUBLE_ROUNDING \
+  fpucw_t oldcw;
+# define BEGIN_LONG_DOUBLE_ROUNDING() \
+  (void)(oldcw = GET_FPUCW (),                                  \
+         SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED))
+# define END_LONG_DOUBLE_ROUNDING() \
+  SET_FPUCW (oldcw)
+
+#else
+
+typedef unsigned int fpucw_t;
+
+# define FPU_PC_MASK 0
+# define FPU_PC_DOUBLE 0
+# define FPU_PC_EXTENDED 0
+
+# define GET_FPUCW() 0
+# define SET_FPUCW(word) (void)(word)
+
+# define DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_LONG_DOUBLE_ROUNDING()
+# define END_LONG_DOUBLE_ROUNDING()
+
+#endif
+
+#endif /* _FPUCW_H */
diff --git a/lib/gltests/init.sh b/lib/gltests/init.sh
index 71c6516..0da6c1e 100644
--- a/lib/gltests/init.sh
+++ b/lib/gltests/init.sh
@@ -68,8 +68,8 @@ Exit () { set +e; (exit $1); exit $1; }
 
 # Print warnings (e.g., about skipped and failed tests) to this file number.
 # Override by defining to say, 9, in init.cfg, and putting say,
-# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition
-# of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+#   export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
 # This is useful when using automake's parallel tests mode, to print
 # the reason for skip/failure to console, rather than to the .log files.
 : ${stderr_fileno_=2}
@@ -77,6 +77,7 @@ Exit () { set +e; (exit $1); exit $1; }
 warn_ () { echo "$@" 1>&$stderr_fileno_; }
 fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
 skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
 
 # Sanitize this shell to POSIX mode, if possible.
@@ -167,7 +168,10 @@ else
     st_=$?
 
     # $re_shell_ works just fine.  Use it.
-    test $st_ = 10 && break
+    if test $st_ = 10; then
+      gl_set_x_corrupts_stderr_=false
+      break
+    fi
 
     # If this is our first marginally acceptable shell, remember it.
     if test "$st_:$marginal_" = 9: ; then
@@ -400,7 +404,7 @@ mktempd_ ()
 {
   case $# in
   2);;
-  *) fail_ "Usage: $ME DIR TEMPLATE";;
+  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
   esac
 
   destdir_=$1
diff --git a/lib/gltests/intprops.h b/lib/gltests/intprops.h
index 58b1b3f..1f6a539 100644
--- a/lib/gltests/intprops.h
+++ b/lib/gltests/intprops.h
@@ -17,70 +17,303 @@
 
 /* Written by Paul Eggert.  */
 
-#ifndef GL_INTPROPS_H
-# define GL_INTPROPS_H
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
 
-# include <limits.h>
+#include <limits.h>
+
+/* Return an integer value, converted to the same type as the integer
+   expression E after integer type promotion.  V is the unconverted value.  */
+#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
 
 /* The extra casts in the following macros work around compiler bugs,
    e.g., in Cray C 5.0.3.0.  */
 
 /* True if the arithmetic type T is an integer type.  bool counts as
    an integer.  */
-# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
 
 /* True if negative values of the signed integer type T use two's
    complement, ones' complement, or signed magnitude representation,
    respectively.  Much GNU code assumes two's complement, but some
    people like to be portable to all possible C hosts.  */
-# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement.  */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
 
 /* True if the arithmetic type T is signed.  */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+   a signed type.  */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
 
-/* The maximum and minimum values for the integer type T.  These
+/* Minimum and maximum values for integer types and expressions.  These
    macros have undefined behavior if T is signed and has padding bits.
    If this is a problem for you, please let us know how to fix it for
    your host.  */
-# define TYPE_MINIMUM(t) \
-  ((t) (! TYPE_SIGNED (t) \
-        ? (t) 0 \
-        : TYPE_SIGNED_MAGNITUDE (t) \
-        ? ~ (t) 0 \
+
+/* The maximum and minimum values for the integer type T.  */
+#define TYPE_MINIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) 0                                                         \
+        : TYPE_SIGNED_MAGNITUDE (t)                                     \
+        ? ~ (t) 0                                                       \
         : ~ TYPE_MAXIMUM (t)))
-# define TYPE_MAXIMUM(t) \
-  ((t) (! TYPE_SIGNED (t) \
-        ? (t) -1 \
+#define TYPE_MAXIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) -1                                                        \
         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
 
-/* Return zero if T can be determined to be an unsigned type.
-   Otherwise, return 1.
-   When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
-   tighter bound.  Otherwise, it overestimates the true bound by one byte
-   when applied to unsigned types of size 2, 4, 16, ... bytes.
-   The symbol signed_type_or_expr__ is private to this header file.  */
-# if __GNUC__ >= 2
-#  define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
-# else
-#  define signed_type_or_expr__(t) 1
-# endif
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E should not have side effects.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works.  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  This macro does not evaluate its argument,
+   and expands to an integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_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)
+#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, and then add 1 more for
-   a minus sign if needed.  */
-# define INT_STRLEN_BOUND(t) \
-  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
-   + signed_type_or_expr__ (t))
+   a minus sign if needed.
+
+   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+   signed, this macro may overestimate the true bound by one byte when
+   applied to unsigned types of size 2, 4, 16, ... bytes.  */
+#define INT_STRLEN_BOUND(t)                                     \
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT                 \
+                          - _GL_SIGNED_TYPE_OR_EXPR (t))        \
+   + _GL_SIGNED_TYPE_OR_EXPR (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
    including the terminating null.  */
-# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+   The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
+   operators might not yield numerically correct answers due to
+   arithmetic overflow.  They do not rely on undefined or
+   implementation-defined behavior.  Their implementations are simple
+   and straightforward, but they are a bit harder to use than the
+   INT_<op>_OVERFLOW macros described below.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   Restrictions on *_RANGE_OVERFLOW macros:
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times,
+   so the arguments should not have side effects.  The arithmetic
+   arguments (including the MIN and MAX arguments) must be of the same
+   integer type after the usual arithmetic conversions, and the type
+   must have minimum value MIN and maximum MAX.  Unsigned types should
+   use a zero MIN of the proper type.
+
+   These macros are tuned for constant MIN and MAX.  For commutative
+   operations such as A + B, they are also tuned for constant B.  */
+
+/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_ADD_RANGE_OVERFLOW(a, b, min, max)          \
+  ((b) < 0                                              \
+   ? (a) < (min) - (b)                                  \
+   : (max) - (b) < (a))
+
+/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? (max) + (b) < (a)                                  \
+   : (a) < (min) + (b))
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
+  ((min) < 0                                            \
+   ? (a) < - (max)                                      \
+   : 0 < (a))
+
+/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Avoid && and || as they tickle
+   bugs in Sun C 5.11 2010/08/13 and other compilers; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? ((a) < 0                                           \
+      ? (a) < (max) / (b)                               \
+      : (b) == -1                                       \
+      ? 0                                               \
+      : (min) / (b) < (a))                              \
+   : (b) == 0                                           \
+   ? 0                                                  \
+   : ((a) < 0                                           \
+      ? (a) < (min) / (b)                               \
+      : (max) / (b) < (a)))
+
+/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.  */
+#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max)       \
+  ((min) < 0 && (b) == -1 && (a) < - (max))
+
+/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.
+   Mathematically, % should never overflow, but on x86-like hosts
+   INT_MIN % -1 traps, and the C standard permits this, so treat this
+   as an overflow too.  */
+#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max)    \
+  INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
+
+/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Here, MIN and MAX are for A only, and B need
+   not be of the same type as the other arguments.  The C standard says that
+   behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
+   A is negative then A << B has undefined behavior and A >> B has
+   implementation-defined behavior, but do not check these other
+   restrictions.  */
+#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max)   \
+  ((a) < 0                                              \
+   ? (a) < (min) >> (b)                                 \
+   : (max) >> (b) < (a))
+
+
+/* The _GL*_OVERFLOW macros have the same restrictions as the
+   *_RANGE_OVERFLOW macros, except that they do not assume that operands
+   (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
+   that the result (e.g., A + B) has that type.  */
+#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+   : (a) < 0 ? (b) <= (a) + (b)                                         \
+   : (b) < 0 ? (a) <= (a) + (b)                                         \
+   : (a) + (b) < (b))
+#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+   : (a) < 0 ? 1                                                        \
+   : (b) < 0 ? (a) - (b) <= (a)                                         \
+   : (a) < (b))
+#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
+   : (b) < 0 && (a) + (b) <= (a))
+#define _GL_REMAINDER_OVERFLOW(a, b, min, max)                          \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b)                     \
+   : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
+
+/* Return a nonzero value if A is a mathematical multiple of B, where
+   A is unsigned, B is negative, and MAX is the maximum value of A's
+   type.  A's type must be the same as (A % B)'s type.  Normally (A %
+   -B == 0) suffices, but things get tricky if -B would overflow.  */
+#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max)                            \
+  (((b) < -_GL_SIGNED_INT_MAXIMUM (b)                                   \
+    ? (_GL_SIGNED_INT_MAXIMUM (b) == (max)                              \
+       ? (a)                                                            \
+       : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1))   \
+    : (a) % - (b))                                                      \
+   == 0)
+
+
+/* Integer overflow checks.
+
+   The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
+   might not yield numerically correct answers due to arithmetic overflow.
+   They work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_OVERFLOW (i, j))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for their last argument being a constant.
+
+   Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
+   A % B, and A << B would overflow, respectively.  */
+
+#define INT_ADD_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+#define INT_SUBTRACT_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+#define INT_NEGATE_OVERFLOW(a) \
+  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#define INT_MULTIPLY_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
+#define INT_DIVIDE_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
+#define INT_REMAINDER_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
+#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
+                                 _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+
+/* Return 1 if the expression A <op> B would overflow,
+   where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+   assuming MIN and MAX are the minimum and maximum for the result type.
+   Arguments should be free of side effects.  */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow)        \
+  op_result_overflow (a, b,                                     \
+                      _GL_INT_MINIMUM (0 * (b) + (a)),          \
+                      _GL_INT_MAXIMUM (0 * (b) + (a)))
 
-#endif /* GL_INTPROPS_H */
+#endif /* _GL_INTPROPS_H */
diff --git a/lib/gltests/inttypes.in.h b/lib/gltests/inttypes.in.h
new file mode 100644
index 0000000..7abf394
--- /dev/null
+++ b/lib/gltests/inttypes.in.h
@@ -0,0 +1,1110 @@
+/* Copyright (C) 2006-2011 Free Software Foundation, Inc.
+   Written by Paul Eggert, Bruno Haible, Derek Price.
+   This file is part of gnulib.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+#if __GNUC__ >= 3
address@hidden@
+#endif
address@hidden@
+
+/* Include the original <inttypes.h> if it exists, and if this file
+   has not been included yet or if this file includes gnulib stdint.h
+   which in turn includes this file.
+   The include_next requires a split double-inclusion guard.  */
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# if @HAVE_INTTYPES_H@
+#  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+# endif
+#endif
+
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define INTTYPES_H
+
+/* Include <stdint.h> or the gnulib replacement.
+   But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT.  */
+#include <limits.h>
+
+#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
+# error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* 7.8.1 Macros for format specifiers */
+
+#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if defined _TNS_R_TARGET
+   /* Tandem NonStop R series and compatible platforms released before
+      July 2005 support %Ld but not %lld.  */
+#  define _LONG_LONG_FORMAT_PREFIX "L"
+# else
+#  define _LONG_LONG_FORMAT_PREFIX "ll"
+# endif
+
+# if !defined PRId8 || @PRI_MACROS_BROKEN@
+#  undef PRId8
+#  ifdef INT8_MAX
+#   define PRId8 "d"
+#  endif
+# endif
+# if !defined PRIi8 || @PRI_MACROS_BROKEN@
+#  undef PRIi8
+#  ifdef INT8_MAX
+#   define PRIi8 "i"
+#  endif
+# endif
+# if !defined PRIo8 || @PRI_MACROS_BROKEN@
+#  undef PRIo8
+#  ifdef UINT8_MAX
+#   define PRIo8 "o"
+#  endif
+# endif
+# if !defined PRIu8 || @PRI_MACROS_BROKEN@
+#  undef PRIu8
+#  ifdef UINT8_MAX
+#   define PRIu8 "u"
+#  endif
+# endif
+# if !defined PRIx8 || @PRI_MACROS_BROKEN@
+#  undef PRIx8
+#  ifdef UINT8_MAX
+#   define PRIx8 "x"
+#  endif
+# endif
+# if !defined PRIX8 || @PRI_MACROS_BROKEN@
+#  undef PRIX8
+#  ifdef UINT8_MAX
+#   define PRIX8 "X"
+#  endif
+# endif
+# if !defined PRId16 || @PRI_MACROS_BROKEN@
+#  undef PRId16
+#  ifdef INT16_MAX
+#   define PRId16 "d"
+#  endif
+# endif
+# if !defined PRIi16 || @PRI_MACROS_BROKEN@
+#  undef PRIi16
+#  ifdef INT16_MAX
+#   define PRIi16 "i"
+#  endif
+# endif
+# if !defined PRIo16 || @PRI_MACROS_BROKEN@
+#  undef PRIo16
+#  ifdef UINT16_MAX
+#   define PRIo16 "o"
+#  endif
+# endif
+# if !defined PRIu16 || @PRI_MACROS_BROKEN@
+#  undef PRIu16
+#  ifdef UINT16_MAX
+#   define PRIu16 "u"
+#  endif
+# endif
+# if !defined PRIx16 || @PRI_MACROS_BROKEN@
+#  undef PRIx16
+#  ifdef UINT16_MAX
+#   define PRIx16 "x"
+#  endif
+# endif
+# if !defined PRIX16 || @PRI_MACROS_BROKEN@
+#  undef PRIX16
+#  ifdef UINT16_MAX
+#   define PRIX16 "X"
+#  endif
+# endif
+# if !defined PRId32 || @PRI_MACROS_BROKEN@
+#  undef PRId32
+#  ifdef INT32_MAX
+#   define PRId32 "d"
+#  endif
+# endif
+# if !defined PRIi32 || @PRI_MACROS_BROKEN@
+#  undef PRIi32
+#  ifdef INT32_MAX
+#   define PRIi32 "i"
+#  endif
+# endif
+# if !defined PRIo32 || @PRI_MACROS_BROKEN@
+#  undef PRIo32
+#  ifdef UINT32_MAX
+#   define PRIo32 "o"
+#  endif
+# endif
+# if !defined PRIu32 || @PRI_MACROS_BROKEN@
+#  undef PRIu32
+#  ifdef UINT32_MAX
+#   define PRIu32 "u"
+#  endif
+# endif
+# if !defined PRIx32 || @PRI_MACROS_BROKEN@
+#  undef PRIx32
+#  ifdef UINT32_MAX
+#   define PRIx32 "x"
+#  endif
+# endif
+# if !defined PRIX32 || @PRI_MACROS_BROKEN@
+#  undef PRIX32
+#  ifdef UINT32_MAX
+#   define PRIX32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _PRI64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRI64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRId64 || @PRI_MACROS_BROKEN@
+#   undef PRId64
+#   define PRId64 _PRI64_PREFIX "d"
+#  endif
+#  if !defined PRIi64 || @PRI_MACROS_BROKEN@
+#   undef PRIi64
+#   define PRIi64 _PRI64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _PRIu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _PRIu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined PRIo64 || @PRI_MACROS_BROKEN@
+#   undef PRIo64
+#   define PRIo64 _PRIu64_PREFIX "o"
+#  endif
+#  if !defined PRIu64 || @PRI_MACROS_BROKEN@
+#   undef PRIu64
+#   define PRIu64 _PRIu64_PREFIX "u"
+#  endif
+#  if !defined PRIx64 || @PRI_MACROS_BROKEN@
+#   undef PRIx64
+#   define PRIx64 _PRIu64_PREFIX "x"
+#  endif
+#  if !defined PRIX64 || @PRI_MACROS_BROKEN@
+#   undef PRIX64
+#   define PRIX64 _PRIu64_PREFIX "X"
+#  endif
+# endif
+
+# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST8
+#  define PRIdLEAST8 "d"
+# endif
+# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST8
+#  define PRIiLEAST8 "i"
+# endif
+# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST8
+#  define PRIoLEAST8 "o"
+# endif
+# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST8
+#  define PRIuLEAST8 "u"
+# endif
+# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST8
+#  define PRIxLEAST8 "x"
+# endif
+# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST8
+#  define PRIXLEAST8 "X"
+# endif
+# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST16
+#  define PRIdLEAST16 "d"
+# endif
+# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST16
+#  define PRIiLEAST16 "i"
+# endif
+# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST16
+#  define PRIoLEAST16 "o"
+# endif
+# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST16
+#  define PRIuLEAST16 "u"
+# endif
+# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST16
+#  define PRIxLEAST16 "x"
+# endif
+# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST16
+#  define PRIXLEAST16 "X"
+# endif
+# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdLEAST32
+#  define PRIdLEAST32 "d"
+# endif
+# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiLEAST32
+#  define PRIiLEAST32 "i"
+# endif
+# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoLEAST32
+#  define PRIoLEAST32 "o"
+# endif
+# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuLEAST32
+#  define PRIuLEAST32 "u"
+# endif
+# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxLEAST32
+#  define PRIxLEAST32 "x"
+# endif
+# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXLEAST32
+#  define PRIXLEAST32 "X"
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdLEAST64
+#   define PRIdLEAST64 PRId64
+#  endif
+#  if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiLEAST64
+#   define PRIiLEAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoLEAST64
+#   define PRIoLEAST64 PRIo64
+#  endif
+#  if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuLEAST64
+#   define PRIuLEAST64 PRIu64
+#  endif
+#  if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxLEAST64
+#   define PRIxLEAST64 PRIx64
+#  endif
+#  if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXLEAST64
+#   define PRIXLEAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIdFAST8 PRId64
+#  else
+#   define PRIdFAST8 "d"
+#  endif
+# endif
+# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define PRIiFAST8 PRIi64
+#  else
+#   define PRIiFAST8 "i"
+#  endif
+# endif
+# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIoFAST8 PRIo64
+#  else
+#   define PRIoFAST8 "o"
+#  endif
+# endif
+# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIuFAST8 PRIu64
+#  else
+#   define PRIuFAST8 "u"
+#  endif
+# endif
+# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIxFAST8 PRIx64
+#  else
+#   define PRIxFAST8 "x"
+#  endif
+# endif
+# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define PRIXFAST8 PRIX64
+#  else
+#   define PRIXFAST8 "X"
+#  endif
+# endif
+# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIdFAST16 PRId64
+#  else
+#   define PRIdFAST16 "d"
+#  endif
+# endif
+# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define PRIiFAST16 PRIi64
+#  else
+#   define PRIiFAST16 "i"
+#  endif
+# endif
+# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIoFAST16 PRIo64
+#  else
+#   define PRIoFAST16 "o"
+#  endif
+# endif
+# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIuFAST16 PRIu64
+#  else
+#   define PRIuFAST16 "u"
+#  endif
+# endif
+# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIxFAST16 PRIx64
+#  else
+#   define PRIxFAST16 "x"
+#  endif
+# endif
+# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define PRIXFAST16 PRIX64
+#  else
+#   define PRIXFAST16 "X"
+#  endif
+# endif
+# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIdFAST32 PRId64
+#  else
+#   define PRIdFAST32 "d"
+#  endif
+# endif
+# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define PRIiFAST32 PRIi64
+#  else
+#   define PRIiFAST32 "i"
+#  endif
+# endif
+# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIoFAST32 PRIo64
+#  else
+#   define PRIoFAST32 "o"
+#  endif
+# endif
+# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIuFAST32 PRIu64
+#  else
+#   define PRIuFAST32 "u"
+#  endif
+# endif
+# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIxFAST32 PRIx64
+#  else
+#   define PRIxFAST32 "x"
+#  endif
+# endif
+# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+#  undef PRIXFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define PRIXFAST32 PRIX64
+#  else
+#   define PRIXFAST32 "X"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIdFAST64
+#   define PRIdFAST64 PRId64
+#  endif
+#  if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIiFAST64
+#   define PRIiFAST64 PRIi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIoFAST64
+#   define PRIoFAST64 PRIo64
+#  endif
+#  if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIuFAST64
+#   define PRIuFAST64 PRIu64
+#  endif
+#  if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIxFAST64
+#   define PRIxFAST64 PRIx64
+#  endif
+#  if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+#   undef PRIXFAST64
+#   define PRIXFAST64 PRIX64
+#  endif
+# endif
+
+# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+#  undef PRIdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIdMAX PRId64
+#  else
+#   define PRIdMAX "ld"
+#  endif
+# endif
+# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+#  undef PRIiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define PRIiMAX PRIi64
+#  else
+#   define PRIiMAX "li"
+#  endif
+# endif
+# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+#  undef PRIoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIoMAX PRIo64
+#  else
+#   define PRIoMAX "lo"
+#  endif
+# endif
+# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+#  undef PRIuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIuMAX PRIu64
+#  else
+#   define PRIuMAX "lu"
+#  endif
+# endif
+# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+#  undef PRIxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIxMAX PRIx64
+#  else
+#   define PRIxMAX "lx"
+#  endif
+# endif
+# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+#  undef PRIXMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define PRIXMAX PRIX64
+#  else
+#   define PRIXMAX "lX"
+#  endif
+# endif
+
+# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+#  undef PRIdPTR
+#  ifdef INTPTR_MAX
+#   define PRIdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+#  undef PRIiPTR
+#  ifdef INTPTR_MAX
+#   define PRIiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+#  undef PRIoPTR
+#  ifdef UINTPTR_MAX
+#   define PRIoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+#  undef PRIuPTR
+#  ifdef UINTPTR_MAX
+#   define PRIuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+#  undef PRIxPTR
+#  ifdef UINTPTR_MAX
+#   define PRIxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+#  undef PRIXPTR
+#  ifdef UINTPTR_MAX
+#   define PRIXPTR @PRIPTR_PREFIX@ "X"
+#  endif
+# endif
+
+# if !defined SCNd8 || @PRI_MACROS_BROKEN@
+#  undef SCNd8
+#  ifdef INT8_MAX
+#   define SCNd8 "hhd"
+#  endif
+# endif
+# if !defined SCNi8 || @PRI_MACROS_BROKEN@
+#  undef SCNi8
+#  ifdef INT8_MAX
+#   define SCNi8 "hhi"
+#  endif
+# endif
+# if !defined SCNo8 || @PRI_MACROS_BROKEN@
+#  undef SCNo8
+#  ifdef UINT8_MAX
+#   define SCNo8 "hho"
+#  endif
+# endif
+# if !defined SCNu8 || @PRI_MACROS_BROKEN@
+#  undef SCNu8
+#  ifdef UINT8_MAX
+#   define SCNu8 "hhu"
+#  endif
+# endif
+# if !defined SCNx8 || @PRI_MACROS_BROKEN@
+#  undef SCNx8
+#  ifdef UINT8_MAX
+#   define SCNx8 "hhx"
+#  endif
+# endif
+# if !defined SCNd16 || @PRI_MACROS_BROKEN@
+#  undef SCNd16
+#  ifdef INT16_MAX
+#   define SCNd16 "hd"
+#  endif
+# endif
+# if !defined SCNi16 || @PRI_MACROS_BROKEN@
+#  undef SCNi16
+#  ifdef INT16_MAX
+#   define SCNi16 "hi"
+#  endif
+# endif
+# if !defined SCNo16 || @PRI_MACROS_BROKEN@
+#  undef SCNo16
+#  ifdef UINT16_MAX
+#   define SCNo16 "ho"
+#  endif
+# endif
+# if !defined SCNu16 || @PRI_MACROS_BROKEN@
+#  undef SCNu16
+#  ifdef UINT16_MAX
+#   define SCNu16 "hu"
+#  endif
+# endif
+# if !defined SCNx16 || @PRI_MACROS_BROKEN@
+#  undef SCNx16
+#  ifdef UINT16_MAX
+#   define SCNx16 "hx"
+#  endif
+# endif
+# if !defined SCNd32 || @PRI_MACROS_BROKEN@
+#  undef SCNd32
+#  ifdef INT32_MAX
+#   define SCNd32 "d"
+#  endif
+# endif
+# if !defined SCNi32 || @PRI_MACROS_BROKEN@
+#  undef SCNi32
+#  ifdef INT32_MAX
+#   define SCNi32 "i"
+#  endif
+# endif
+# if !defined SCNo32 || @PRI_MACROS_BROKEN@
+#  undef SCNo32
+#  ifdef UINT32_MAX
+#   define SCNo32 "o"
+#  endif
+# endif
+# if !defined SCNu32 || @PRI_MACROS_BROKEN@
+#  undef SCNu32
+#  ifdef UINT32_MAX
+#   define SCNu32 "u"
+#  endif
+# endif
+# if !defined SCNx32 || @PRI_MACROS_BROKEN@
+#  undef SCNx32
+#  ifdef UINT32_MAX
+#   define SCNx32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#   define _SCN64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCN64_PREFIX "I64"
+#  elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#   define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNd64 || @PRI_MACROS_BROKEN@
+#   undef SCNd64
+#   define SCNd64 _SCN64_PREFIX "d"
+#  endif
+#  if !defined SCNi64 || @PRI_MACROS_BROKEN@
+#   undef SCNi64
+#   define SCNi64 _SCN64_PREFIX "i"
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#   define _SCNu64_PREFIX "l"
+#  elif defined _MSC_VER || defined __MINGW32__
+#   define _SCNu64_PREFIX "I64"
+#  elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#   define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+#  endif
+#  if !defined SCNo64 || @PRI_MACROS_BROKEN@
+#   undef SCNo64
+#   define SCNo64 _SCNu64_PREFIX "o"
+#  endif
+#  if !defined SCNu64 || @PRI_MACROS_BROKEN@
+#   undef SCNu64
+#   define SCNu64 _SCNu64_PREFIX "u"
+#  endif
+#  if !defined SCNx64 || @PRI_MACROS_BROKEN@
+#   undef SCNx64
+#   define SCNx64 _SCNu64_PREFIX "x"
+#  endif
+# endif
+
+# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST8
+#  define SCNdLEAST8 "hhd"
+# endif
+# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST8
+#  define SCNiLEAST8 "hhi"
+# endif
+# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST8
+#  define SCNoLEAST8 "hho"
+# endif
+# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST8
+#  define SCNuLEAST8 "hhu"
+# endif
+# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST8
+#  define SCNxLEAST8 "hhx"
+# endif
+# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST16
+#  define SCNdLEAST16 "hd"
+# endif
+# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST16
+#  define SCNiLEAST16 "hi"
+# endif
+# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST16
+#  define SCNoLEAST16 "ho"
+# endif
+# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST16
+#  define SCNuLEAST16 "hu"
+# endif
+# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST16
+#  define SCNxLEAST16 "hx"
+# endif
+# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdLEAST32
+#  define SCNdLEAST32 "d"
+# endif
+# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiLEAST32
+#  define SCNiLEAST32 "i"
+# endif
+# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoLEAST32
+#  define SCNoLEAST32 "o"
+# endif
+# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuLEAST32
+#  define SCNuLEAST32 "u"
+# endif
+# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxLEAST32
+#  define SCNxLEAST32 "x"
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdLEAST64
+#   define SCNdLEAST64 SCNd64
+#  endif
+#  if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiLEAST64
+#   define SCNiLEAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoLEAST64
+#   define SCNoLEAST64 SCNo64
+#  endif
+#  if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuLEAST64
+#   define SCNuLEAST64 SCNu64
+#  endif
+#  if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxLEAST64
+#   define SCNxLEAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNdFAST8 SCNd64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNdFAST8 "hd"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNdFAST8 "hhd"
+#  else
+#   define SCNdFAST8 "d"
+#  endif
+# endif
+# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST8
+#  if INT_FAST8_MAX > INT32_MAX
+#   define SCNiFAST8 SCNi64
+#  elif INT_FAST8_MAX == 0x7fff
+#   define SCNiFAST8 "hi"
+#  elif INT_FAST8_MAX == 0x7f
+#   define SCNiFAST8 "hhi"
+#  else
+#   define SCNiFAST8 "i"
+#  endif
+# endif
+# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNoFAST8 SCNo64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNoFAST8 "ho"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNoFAST8 "hho"
+#  else
+#   define SCNoFAST8 "o"
+#  endif
+# endif
+# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNuFAST8 SCNu64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNuFAST8 "hu"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNuFAST8 "hhu"
+#  else
+#   define SCNuFAST8 "u"
+#  endif
+# endif
+# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST8
+#  if UINT_FAST8_MAX > UINT32_MAX
+#   define SCNxFAST8 SCNx64
+#  elif UINT_FAST8_MAX == 0xffff
+#   define SCNxFAST8 "hx"
+#  elif UINT_FAST8_MAX == 0xff
+#   define SCNxFAST8 "hhx"
+#  else
+#   define SCNxFAST8 "x"
+#  endif
+# endif
+# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNdFAST16 SCNd64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNdFAST16 "hd"
+#  else
+#   define SCNdFAST16 "d"
+#  endif
+# endif
+# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST16
+#  if INT_FAST16_MAX > INT32_MAX
+#   define SCNiFAST16 SCNi64
+#  elif INT_FAST16_MAX == 0x7fff
+#   define SCNiFAST16 "hi"
+#  else
+#   define SCNiFAST16 "i"
+#  endif
+# endif
+# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNoFAST16 SCNo64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNoFAST16 "ho"
+#  else
+#   define SCNoFAST16 "o"
+#  endif
+# endif
+# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNuFAST16 SCNu64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNuFAST16 "hu"
+#  else
+#   define SCNuFAST16 "u"
+#  endif
+# endif
+# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST16
+#  if UINT_FAST16_MAX > UINT32_MAX
+#   define SCNxFAST16 SCNx64
+#  elif UINT_FAST16_MAX == 0xffff
+#   define SCNxFAST16 "hx"
+#  else
+#   define SCNxFAST16 "x"
+#  endif
+# endif
+# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNdFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNdFAST32 SCNd64
+#  else
+#   define SCNdFAST32 "d"
+#  endif
+# endif
+# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNiFAST32
+#  if INT_FAST32_MAX > INT32_MAX
+#   define SCNiFAST32 SCNi64
+#  else
+#   define SCNiFAST32 "i"
+#  endif
+# endif
+# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNoFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNoFAST32 SCNo64
+#  else
+#   define SCNoFAST32 "o"
+#  endif
+# endif
+# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNuFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNuFAST32 SCNu64
+#  else
+#   define SCNuFAST32 "u"
+#  endif
+# endif
+# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+#  undef SCNxFAST32
+#  if UINT_FAST32_MAX > UINT32_MAX
+#   define SCNxFAST32 SCNx64
+#  else
+#   define SCNxFAST32 "x"
+#  endif
+# endif
+# ifdef INT64_MAX
+#  if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNdFAST64
+#   define SCNdFAST64 SCNd64
+#  endif
+#  if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNiFAST64
+#   define SCNiFAST64 SCNi64
+#  endif
+# endif
+# ifdef UINT64_MAX
+#  if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNoFAST64
+#   define SCNoFAST64 SCNo64
+#  endif
+#  if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNuFAST64
+#   define SCNuFAST64 SCNu64
+#  endif
+#  if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+#   undef SCNxFAST64
+#   define SCNxFAST64 SCNx64
+#  endif
+# endif
+
+# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+#  undef SCNdMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNdMAX SCNd64
+#  else
+#   define SCNdMAX "ld"
+#  endif
+# endif
+# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+#  undef SCNiMAX
+#  if @INT32_MAX_LT_INTMAX_MAX@
+#   define SCNiMAX SCNi64
+#  else
+#   define SCNiMAX "li"
+#  endif
+# endif
+# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+#  undef SCNoMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNoMAX SCNo64
+#  else
+#   define SCNoMAX "lo"
+#  endif
+# endif
+# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+#  undef SCNuMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNuMAX SCNu64
+#  else
+#   define SCNuMAX "lu"
+#  endif
+# endif
+# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+#  undef SCNxMAX
+#  if @UINT32_MAX_LT_UINTMAX_MAX@
+#   define SCNxMAX SCNx64
+#  else
+#   define SCNxMAX "lx"
+#  endif
+# endif
+
+# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+#  undef SCNdPTR
+#  ifdef INTPTR_MAX
+#   define SCNdPTR @PRIPTR_PREFIX@ "d"
+#  endif
+# endif
+# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+#  undef SCNiPTR
+#  ifdef INTPTR_MAX
+#   define SCNiPTR @PRIPTR_PREFIX@ "i"
+#  endif
+# endif
+# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+#  undef SCNoPTR
+#  ifdef UINTPTR_MAX
+#   define SCNoPTR @PRIPTR_PREFIX@ "o"
+#  endif
+# endif
+# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+#  undef SCNuPTR
+#  ifdef UINTPTR_MAX
+#   define SCNuPTR @PRIPTR_PREFIX@ "u"
+#  endif
+# endif
+# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+#  undef SCNxPTR
+#  ifdef UINTPTR_MAX
+#   define SCNxPTR @PRIPTR_PREFIX@ "x"
+#  endif
+# endif
+
+#endif
+
+/* 7.8.2 Functions for greatest-width integer types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_IMAXABS@
+# if address@hidden@
+extern intmax_t imaxabs (intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxabs
+# if HAVE_RAW_DECL_IMAXABS
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
+                 "use gnulib module imaxabs for portability");
+# endif
+#endif
+
+#if @GNULIB_IMAXDIV@
+# if address@hidden@
+#  if !GNULIB_defined_imaxdiv_t
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
+#   define GNULIB_defined_imaxdiv_t 1
+#  endif
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxdiv
+# if HAVE_RAW_DECL_IMAXDIV
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
+                 "use gnulib module imaxdiv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOIMAX@
+# if address@hidden@
+#  undef strtoimax
+extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoimax
+# if HAVE_RAW_DECL_STRTOIMAX
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
+                 "use gnulib module strtoimax for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOUMAX@
+# if address@hidden@
+#  undef strtoumax
+extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoumax
+# if HAVE_RAW_DECL_STRTOUMAX
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
+                 "use gnulib module strtoumax for portability");
+# endif
+#endif
+
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since
+   wide-character functions like this are hardly ever useful.  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/lib/gltests/macros.h b/lib/gltests/macros.h
index 8922675..adb3744 100644
--- a/lib/gltests/macros.h
+++ b/lib/gltests/macros.h
@@ -62,3 +62,7 @@
    *not* work for function parameters of array type, because they are actually
    parameters of pointer type.  */
 #define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
+
+/* STREQ (str1, str2)
+   Return true if two strings compare equal.  */
+#define STREQ(a, b) (strcmp (a, b) == 0)
diff --git a/lib/gltests/test-float.c b/lib/gltests/test-float.c
new file mode 100644
index 0000000..47de211
--- /dev/null
+++ b/lib/gltests/test-float.c
@@ -0,0 +1,384 @@
+/* Test of <float.h> substitute.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2011.  */
+
+#include <config.h>
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+/* Check that FLT_RADIX is a constant expression.  */
+int a[] = { FLT_RADIX };
+
+#if FLT_RADIX == 2
+
+/* Return 2^n.  */
+static float
+pow2f (int n)
+{
+  int k = n;
+  volatile float x = 1;
+  volatile float y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5f;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* Return 2^n.  */
+static double
+pow2d (int n)
+{
+  int k = n;
+  volatile double x = 1;
+  volatile double y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* Return 2^n.  */
+static long double
+pow2l (int n)
+{
+  int k = n;
+  volatile long double x = 1;
+  volatile long double y = 2;
+  /* Invariant: 2^n == x * y^k.  */
+  if (k < 0)
+    {
+      y = 0.5L;
+      k = - k;
+    }
+  while (k > 0)
+    {
+      if (k != 2 * (k / 2))
+        {
+          x = x * y;
+          k = k - 1;
+        }
+      if (k == 0)
+        break;
+      y = y * y;
+      k = k / 2;
+    }
+  /* Now k == 0, hence x == 2^n.  */
+  return x;
+}
+
+/* ----------------------- Check macros for 'float' ----------------------- */
+
+/* Check that the FLT_* macros expand to constant expressions.  */
+int fb[] =
+  {
+    FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP,
+    FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP
+  };
+float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX };
+
+static void
+test_float (void)
+{
+  /* Check that the value of FLT_MIN_EXP is well parenthesized.  */
+  ASSERT ((FLT_MIN_EXP % 101111) == (FLT_MIN_EXP) % 101111);
+
+  /* Check that the value of DBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((FLT_MIN_10_EXP % 101111) == (FLT_MIN_10_EXP) % 101111);
+
+  /* Check that 'float' is as specified in IEEE 754.  */
+  ASSERT (FLT_MANT_DIG == 24);
+  ASSERT (FLT_MIN_EXP == -125);
+  ASSERT (FLT_MAX_EXP == 128);
+
+  /* Check the value of FLT_MIN_10_EXP.  */
+  ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of FLT_DIG.  */
+  ASSERT (FLT_DIG == (int) ((FLT_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of FLT_MIN_10_EXP.  */
+  ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of FLT_MAX_10_EXP.  */
+  ASSERT (FLT_MAX_10_EXP == (int) (FLT_MAX_EXP * 0.30103));
+
+  /* Check the value of FLT_MAX.  */
+  {
+    volatile float m = FLT_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+      {
+        volatile float pow2_n = pow2f (n); /* 2^n */
+        volatile float x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of FLT_MIN.  */
+  {
+    volatile float m = FLT_MIN;
+    volatile float x = pow2f (FLT_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of FLT_EPSILON.  */
+  {
+    volatile float e = FLT_EPSILON;
+    volatile float me;
+    int n;
+
+    me = 1.0f + e;
+    ASSERT (me > 1.0f);
+    ASSERT (me - 1.0f == e);
+    for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+      {
+        volatile float half_n = pow2f (- n); /* 2^-n */
+        volatile float x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0f);
+      }
+  }
+}
+
+/* ----------------------- Check macros for 'double' ----------------------- */
+
+/* Check that the DBL_* macros expand to constant expressions.  */
+int db[] =
+  {
+    DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP,
+    DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP
+  };
+double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX };
+
+static void
+test_double (void)
+{
+  /* Check that the value of DBL_MIN_EXP is well parenthesized.  */
+  ASSERT ((DBL_MIN_EXP % 101111) == (DBL_MIN_EXP) % 101111);
+
+  /* Check that the value of DBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((DBL_MIN_10_EXP % 101111) == (DBL_MIN_10_EXP) % 101111);
+
+  /* Check that 'double' is as specified in IEEE 754.  */
+  ASSERT (DBL_MANT_DIG == 53);
+  ASSERT (DBL_MIN_EXP == -1021);
+  ASSERT (DBL_MAX_EXP == 1024);
+
+  /* Check the value of DBL_MIN_10_EXP.  */
+  ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of DBL_DIG.  */
+  ASSERT (DBL_DIG == (int) ((DBL_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of DBL_MIN_10_EXP.  */
+  ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of DBL_MAX_10_EXP.  */
+  ASSERT (DBL_MAX_10_EXP == (int) (DBL_MAX_EXP * 0.30103));
+
+  /* Check the value of DBL_MAX.  */
+  {
+    volatile double m = DBL_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+      {
+        volatile double pow2_n = pow2d (n); /* 2^n */
+        volatile double x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of DBL_MIN.  */
+  {
+    volatile double m = DBL_MIN;
+    volatile double x = pow2d (DBL_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of DBL_EPSILON.  */
+  {
+    volatile double e = DBL_EPSILON;
+    volatile double me;
+    int n;
+
+    me = 1.0 + e;
+    ASSERT (me > 1.0);
+    ASSERT (me - 1.0 == e);
+    for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+      {
+        volatile double half_n = pow2d (- n); /* 2^-n */
+        volatile double x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0);
+      }
+  }
+}
+
+/* -------------------- Check macros for 'long double' -------------------- */
+
+/* Check that the LDBL_* macros expand to constant expressions.  */
+int lb[] =
+  {
+    LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP,
+    LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP
+  };
+long double lc1 = LDBL_EPSILON;
+long double lc2 = LDBL_MIN;
+#if 0 /* LDBL_MAX is not a constant expression on some platforms.  */
+long double lc3 = LDBL_MAX;
+#endif
+
+static void
+test_long_double (void)
+{
+  /* Check that the value of LDBL_MIN_EXP is well parenthesized.  */
+  ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111);
+
+  /* Check that the value of LDBL_MIN_10_EXP is well parenthesized.  */
+  ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111);
+
+  /* Check that 'long double' is at least as wide as 'double'.  */
+  ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG);
+  ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP);
+  ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP);
+
+  /* Check the value of LDBL_DIG.  */
+  ASSERT (LDBL_DIG == (int)((LDBL_MANT_DIG - 1) * 0.30103));
+
+  /* Check the value of LDBL_MIN_10_EXP.  */
+  ASSERT (LDBL_MIN_10_EXP == - (int) (- (LDBL_MIN_EXP - 1) * 0.30103));
+
+  /* Check the value of LDBL_MAX_10_EXP.  */
+  ASSERT (LDBL_MAX_10_EXP == (int) (LDBL_MAX_EXP * 0.30103));
+
+  /* Check the value of LDBL_MAX.  */
+  {
+    volatile long double m = LDBL_MAX;
+    int n;
+
+    ASSERT (m + m > m);
+    for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+      {
+        volatile long double pow2_n = pow2l (n); /* 2^n */
+        volatile long double x = m + (m / pow2_n);
+        if (x > m)
+          ASSERT (x + x == x);
+        else
+          ASSERT (!(x + x == x));
+      }
+  }
+
+  /* Check the value of LDBL_MIN.  */
+  {
+    volatile long double m = LDBL_MIN;
+    volatile long double x = pow2l (LDBL_MIN_EXP - 1);
+    ASSERT (m == x);
+  }
+
+  /* Check the value of LDBL_EPSILON.  */
+  {
+    volatile long double e = LDBL_EPSILON;
+    volatile long double me;
+    int n;
+
+    me = 1.0L + e;
+    ASSERT (me > 1.0L);
+    ASSERT (me - 1.0L == e);
+    for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+      {
+        volatile long double half_n = pow2l (- n); /* 2^-n */
+        volatile long double x = me - half_n;
+        if (x < me)
+          ASSERT (x <= 1.0L);
+      }
+  }
+}
+
+int
+main ()
+{
+  test_float ();
+  test_double ();
+
+  {
+    DECL_LONG_DOUBLE_ROUNDING
+
+    BEGIN_LONG_DOUBLE_ROUNDING ();
+
+    test_long_double ();
+
+    END_LONG_DOUBLE_ROUNDING ();
+  }
+
+  return 0;
+}
+
+#else
+
+int
+main ()
+{
+  fprintf (stderr, "FLT_RADIX is not 2.\n");
+  return 77;
+}
+
+#endif
diff --git a/lib/gltests/test-intprops.c b/lib/gltests/test-intprops.c
new file mode 100644
index 0000000..1a34d77
--- /dev/null
+++ b/lib/gltests/test-intprops.c
@@ -0,0 +1,275 @@
+/* Test intprops.h.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+/* Tell gcc not to warn about the many (X < 0) expressions that
+   the overflow macros expand to.  */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
+#include <config.h>
+
+#include "intprops.h"
+#include "verify.h"
+
+#include <stdbool.h>
+#include <inttypes.h>
+
+#include "macros.h"
+
+/* VERIFY (X) uses a static assertion for compilers that are known to work,
+   and falls back on a dynamic assertion for other compilers.
+   These tests should be checkable via 'verify' rather than 'ASSERT', but
+   using 'verify' would run into a bug with HP-UX 11.23 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#if __GNUC__ || __SUNPRO_C
+# define VERIFY(x) do { verify (x); } while (0)
+#else
+# define VERIFY(x) ASSERT (x)
+#endif
+
+int
+main (void)
+{
+  /* Use VERIFY for tests that must be integer constant expressions,
+     ASSERT otherwise.  */
+
+  /* TYPE_IS_INTEGER.  */
+  ASSERT (TYPE_IS_INTEGER (bool));
+  ASSERT (TYPE_IS_INTEGER (char));
+  ASSERT (TYPE_IS_INTEGER (signed char));
+  ASSERT (TYPE_IS_INTEGER (unsigned char));
+  ASSERT (TYPE_IS_INTEGER (short int));
+  ASSERT (TYPE_IS_INTEGER (unsigned short int));
+  ASSERT (TYPE_IS_INTEGER (int));
+  ASSERT (TYPE_IS_INTEGER (unsigned int));
+  ASSERT (TYPE_IS_INTEGER (long int));
+  ASSERT (TYPE_IS_INTEGER (unsigned long int));
+  ASSERT (TYPE_IS_INTEGER (intmax_t));
+  ASSERT (TYPE_IS_INTEGER (uintmax_t));
+  ASSERT (! TYPE_IS_INTEGER (float));
+  ASSERT (! TYPE_IS_INTEGER (double));
+  ASSERT (! TYPE_IS_INTEGER (long double));
+
+  /* TYPE_SIGNED.  */
+  /* VERIFY (! TYPE_SIGNED (bool)); // not guaranteed by gnulib substitute */
+  VERIFY (TYPE_SIGNED (signed char));
+  VERIFY (! TYPE_SIGNED (unsigned char));
+  VERIFY (TYPE_SIGNED (short int));
+  VERIFY (! TYPE_SIGNED (unsigned short int));
+  VERIFY (TYPE_SIGNED (int));
+  VERIFY (! TYPE_SIGNED (unsigned int));
+  VERIFY (TYPE_SIGNED (long int));
+  VERIFY (! TYPE_SIGNED (unsigned long int));
+  VERIFY (TYPE_SIGNED (intmax_t));
+  VERIFY (! TYPE_SIGNED (uintmax_t));
+  ASSERT (TYPE_SIGNED (float));
+  ASSERT (TYPE_SIGNED (double));
+  ASSERT (TYPE_SIGNED (long double));
+
+  /* Integer representation.  */
+  VERIFY (INT_MIN + INT_MAX < 0
+          ? (TYPE_TWOS_COMPLEMENT (int)
+             && ! TYPE_ONES_COMPLEMENT (int) && ! TYPE_SIGNED_MAGNITUDE (int))
+          : (! TYPE_TWOS_COMPLEMENT (int)
+             && (TYPE_ONES_COMPLEMENT (int) || TYPE_SIGNED_MAGNITUDE (int))));
+
+  /* TYPE_MINIMUM, TYPE_MAXIMUM.  */
+  VERIFY (TYPE_MINIMUM (char) == CHAR_MIN);
+  VERIFY (TYPE_MAXIMUM (char) == CHAR_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned char) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+  VERIFY (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+  VERIFY (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+  VERIFY (TYPE_MINIMUM (short int) == SHRT_MIN);
+  VERIFY (TYPE_MAXIMUM (short int) == SHRT_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned short int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+  VERIFY (TYPE_MINIMUM (int) == INT_MIN);
+  VERIFY (TYPE_MAXIMUM (int) == INT_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+  VERIFY (TYPE_MINIMUM (long int) == LONG_MIN);
+  VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX);
+  VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
+  VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+  VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
+  VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
+  VERIFY (TYPE_MINIMUM (uintmax_t) == 0);
+  VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+
+  /* INT_BITS_STRLEN_BOUND.  */
+  VERIFY (INT_BITS_STRLEN_BOUND (1) == 1);
+  VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789);
+
+  /* INT_STRLEN_BOUND, INT_BUFSIZE_BOUND.  */
+  #ifdef INT32_MAX /* POSIX guarantees int32_t; this ports to non-POSIX.  */
+  VERIFY (INT_STRLEN_BOUND (int32_t) == sizeof ("-2147483648") - 1);
+  VERIFY (INT_BUFSIZE_BOUND (int32_t) == sizeof ("-2147483648"));
+  #endif
+  #ifdef INT64_MAX
+  VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1);
+  VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808"));
+  #endif
+
+  /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as
+     INT_<op>_OVERFLOW tests, so define a single macro to do both.  */
+  #define CHECK_BINOP(op, a, b, min, max, overflow)                      \
+    (INT_##op##_RANGE_OVERFLOW (a, b, min, max) == (overflow)            \
+     && INT_##op##_OVERFLOW (a, b) == (overflow))
+  #define CHECK_UNOP(op, a, min, max, overflow)                          \
+    (INT_##op##_RANGE_OVERFLOW (a, min, max) == (overflow)               \
+     && INT_##op##_OVERFLOW (a) == (overflow))
+
+  /* INT_<op>_RANGE_OVERFLOW, INT_<op>_OVERFLOW.  */
+  VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX));
+  VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1));
+  VERIFY (CHECK_BINOP (ADD, INT_MAX, 1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, INT_MAX, -1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (ADD, INT_MIN, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (ADD, INT_MIN, -1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, UINT_MAX, 1u, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (ADD, 0u, 1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, -1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, 1, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, -1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, UINT_MAX, 1u, 0u, UINT_MAX, false));
+  VERIFY (CHECK_BINOP (SUBTRACT, 0u, 1u, 0u, UINT_MAX, true));
+
+  VERIFY (CHECK_UNOP (NEGATE, INT_MIN, INT_MIN, INT_MAX,
+                      TYPE_TWOS_COMPLEMENT (int)));
+  VERIFY (CHECK_UNOP (NEGATE, 0, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, INT_MAX, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, 0u, 0u, UINT_MAX, false));
+  VERIFY (CHECK_UNOP (NEGATE, 1u, 0u, UINT_MAX, true));
+  VERIFY (CHECK_UNOP (NEGATE, UINT_MAX, 0u, UINT_MAX, true));
+
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MAX, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MIN, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MAX, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MIN, INT_MIN, INT_MAX, true));
+  VERIFY (CHECK_BINOP (MULTIPLY, -1, INT_MIN, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
+                       LONG_MIN, LONG_MIN, false));
+
+  VERIFY (CHECK_BINOP (DIVIDE, INT_MIN, -1, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (DIVIDE, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (DIVIDE, (unsigned int) INT_MIN,
+                       -1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (REMAINDER, INT_MIN, -1, INT_MIN, INT_MAX,
+                       INT_NEGATE_OVERFLOW (INT_MIN)));
+  VERIFY (CHECK_BINOP (REMAINDER, INT_MAX, 1, INT_MIN, INT_MAX, false));
+  VERIFY (CHECK_BINOP (REMAINDER, (unsigned int) INT_MIN,
+                       -1u, 0u, UINT_MAX, false));
+
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX, 1, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2 + 1, 1, 0u, UINT_MAX, true));
+  VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2, 1, 0u, UINT_MAX, false));
+
+  /* INT_<op>_OVERFLOW with mixed types.  */
+  #define CHECK_SUM(a, b, overflow)                       \
+    VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow));       \
+    VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow))
+  CHECK_SUM (-1, LONG_MIN, true);
+  CHECK_SUM (-1, UINT_MAX, false);
+  CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN);
+  CHECK_SUM (0u, -1, true);
+  CHECK_SUM (0u, 0, false);
+  CHECK_SUM (0u, 1, false);
+  CHECK_SUM (1, LONG_MAX, true);
+  CHECK_SUM (1, UINT_MAX, true);
+  CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX);
+  CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX);
+  CHECK_SUM (1u, INT_MIN, true);
+
+  VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u));
+  VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1));
+  VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1));
+  VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1));
+  VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u));
+  VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u));
+
+  #define CHECK_PRODUCT(a, b, overflow)                   \
+    VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow));   \
+    VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow))
+
+  CHECK_PRODUCT (-1, 1u, true);
+  CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN));
+  CHECK_PRODUCT (-1, UINT_MAX, true);
+  CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true);
+  CHECK_PRODUCT (-12345, LONG_MAX / -12345, false);
+  CHECK_PRODUCT (0, -1, false);
+  CHECK_PRODUCT (0, 0, false);
+  CHECK_PRODUCT (0, 0u, false);
+  CHECK_PRODUCT (0, 1, false);
+  CHECK_PRODUCT (0, INT_MAX, false);
+  CHECK_PRODUCT (0, INT_MIN, false);
+  CHECK_PRODUCT (0, UINT_MAX, false);
+  CHECK_PRODUCT (0u, -1, false);
+  CHECK_PRODUCT (0u, 0, false);
+  CHECK_PRODUCT (0u, 0u, false);
+  CHECK_PRODUCT (0u, 1, false);
+  CHECK_PRODUCT (0u, INT_MAX, false);
+  CHECK_PRODUCT (0u, INT_MIN, false);
+  CHECK_PRODUCT (0u, UINT_MAX, false);
+  CHECK_PRODUCT (1, INT_MAX, false);
+  CHECK_PRODUCT (1, INT_MIN, false);
+  CHECK_PRODUCT (1, UINT_MAX, false);
+  CHECK_PRODUCT (1u, INT_MIN, true);
+  CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX);
+  CHECK_PRODUCT (INT_MAX, UINT_MAX, true);
+  CHECK_PRODUCT (INT_MAX, ULONG_MAX, true);
+  CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true);
+  CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false);
+  CHECK_PRODUCT (INT_MIN, UINT_MAX, true);
+  CHECK_PRODUCT (INT_MIN, ULONG_MAX, true);
+
+  VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L)
+          == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX));
+  VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX));
+  VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u));
+  VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u));
+  VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u));
+  VERIFY (INT_DIVIDE_OVERFLOW (11u, -10));
+  VERIFY (INT_DIVIDE_OVERFLOW (10u, -10));
+  VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10));
+
+  VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L)
+          == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+  VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX));
+  VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX));
+  VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX)
+          == (INTMAX_MAX < UINT_MAX
+              && - (unsigned int) INTMAX_MIN % UINT_MAX != 0));
+  VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX)
+          == (INT_MIN % ULONG_MAX != 1));
+  VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1));
+  VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39));
+  VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39));
+  VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39));
+  VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX));
+
+  return 0;
+}
diff --git a/lib/gltests/test-inttypes.c b/lib/gltests/test-inttypes.c
new file mode 100644
index 0000000..5bf952c
--- /dev/null
+++ b/lib/gltests/test-inttypes.c
@@ -0,0 +1,121 @@
+/* Test of <inttypes.h> substitute.
+   Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <address@hidden>, 2007.  */
+
+#include <config.h>
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* Tests for macros supposed to be defined in inttypes.h.  */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+  PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+  PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+  PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+  PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+  PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+  PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+  PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+  PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+  PRIdLEAST64 PRIiLEAST64
+  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+  PRIdFAST64 PRIiFAST64
+  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+  PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+  ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+  SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+  SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+  SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+  SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+  SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+  SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+  SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+  SCNo64 SCNu64 SCNx64
+#endif
+  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+  SCNdLEAST64 SCNiLEAST64
+  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+  SCNdFAST64 SCNiFAST64
+  SCNoFAST64 SCNuFAST64 SCNxFAST64
+  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+  SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+  SCNoPTR SCNuPTR SCNxPTR
+#endif
+  ;
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/lib/gltests/test-verify.c b/lib/gltests/test-verify.c
index 512c021..454f4f4 100644
--- a/lib/gltests/test-verify.c
+++ b/lib/gltests/test-verify.c
@@ -55,9 +55,9 @@ function (int n)
   verify (1 == 1); verify (1 == 1); /* should be ok */
 
   if (n)
-    return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should 
be ok */
+    return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* 
should be ok */
 #if EXP_FAIL == 5
-  return (verify_true (1 == 2), 5); /* should give ERROR */
+  return verify_expr (1 == 2, 5); /* should give ERROR */
 #endif
   return 0;
 }
diff --git a/lib/maint.mk b/lib/maint.mk
index 8727b3f..e6e03a8 100644
--- a/lib/maint.mk
+++ b/lib/maint.mk
@@ -405,11 +405,11 @@ sc_prohibit_HAVE_MBRTOWC:
          $(_sc_search_regexp)
 
 # To use this "command" macro, you must first define two shell variables:
-# h: the header, enclosed in <> or ""
+# h: the header name, with no enclosing <> or ""
 # re: a regular expression that matches IFF something provided by $h is used.
 define _sc_header_without_use
   dummy=; : so we do not need a semicolon before each use;             \
-  h_esc=`echo "$$h"|sed 's/\./\\\\./g'`;                               \
+  h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`;                   \
   if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then             \
     files=$$(grep -l '^# *include '"$$h_esc"                           \
             $$($(VC_LIST_EXCEPT) | grep '\.c$$')) &&                   \
@@ -422,42 +422,42 @@ endef
 
 # Prohibit the inclusion of assert.h without an actual use of assert.
 sc_prohibit_assert_without_use:
-       @h='<assert.h>' re='\<assert *\(' $(_sc_header_without_use)
+       @h='assert.h' re='\<assert *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of close-stream.h without an actual use.
 sc_prohibit_close_stream_without_use:
-       @h='"close-stream.h"' re='\<close_stream *\(' $(_sc_header_without_use)
+       @h='close-stream.h' re='\<close_stream *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of getopt.h without an actual use.
 sc_prohibit_getopt_without_use:
-       @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
+       @h='getopt.h' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
 
 # Don't include quotearg.h unless you use one of its functions.
 sc_prohibit_quotearg_without_use:
-       @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
+       @h='quotearg.h' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
 
 # Don't include quote.h unless you use one of its functions.
 sc_prohibit_quote_without_use:
-       @h='"quote.h"' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+       @h='quote.h' re='\<quote(_n)? *\(' $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_long_options_without_use:
-       @h='"long-options.h"' re='\<parse_long_options *\(' \
+       @h='long-options.h' re='\<parse_long_options *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_inttostr_without_use:
-       @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
+       @h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_ignore_value_without_use:
-       @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
+       @h='ignore-value.h' re='\<ignore_(value|ptr) *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_error_without_use:
-       @h='"error.h"' \
+       @h='error.h' \
        re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? 
*\('\
          $(_sc_header_without_use)
 
@@ -480,7 +480,7 @@ sc_prohibit_error_without_use:
 _xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
 _xa2 = X([CZ]|N?M)ALLOC
 sc_prohibit_xalloc_without_use:
-       @h='"xalloc.h"' \
+       @h='xalloc.h' \
        re='\<($(_xa1)|$(_xa2)) *\('\
          $(_sc_header_without_use)
 
@@ -491,36 +491,46 @@ 
clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
 _hash_fn = \<($(_hash_re)) *\(
 _hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
 sc_prohibit_hash_without_use:
-       @h='"hash.h"' \
+       @h='hash.h' \
        re='$(_hash_fn)|$(_hash_struct)'\
          $(_sc_header_without_use)
 
+sc_prohibit_cloexec_without_use:
+       @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \
+         $(_sc_header_without_use)
+
+sc_prohibit_posixver_without_use:
+       @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use)
+
+sc_prohibit_same_without_use:
+       @h='same.h' re='\<same_name *\(' $(_sc_header_without_use)
+
 sc_prohibit_hash_pjw_without_use:
-       @h='"hash-pjw.h"' \
+       @h='hash-pjw.h' \
        re='\<hash_pjw *\(' \
          $(_sc_header_without_use)
 
 sc_prohibit_safe_read_without_use:
-       @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+       @h='safe-read.h' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_argmatch_without_use:
-       @h='"argmatch.h"' \
+       @h='argmatch.h' \
        
re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid)
 *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_canonicalize_without_use:
-       @h='"canonicalize.h"' \
+       @h='canonicalize.h' \
        
re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
          $(_sc_header_without_use)
 
 sc_prohibit_root_dev_ino_without_use:
-       @h='"root-dev-ino.h"' \
+       @h='root-dev-ino.h' \
        re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_openat_without_use:
-       @h='"openat.h"' \
+       @h='openat.h' \
        
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>'
 \
          $(_sc_header_without_use)
 
@@ -528,7 +538,7 @@ sc_prohibit_openat_without_use:
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
 |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
 sc_prohibit_c_ctype_without_use:
-       @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' \
+       @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
          $(_sc_header_without_use)
 
 _empty =
@@ -564,37 +574,57 @@ _sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) 
$(_sig_types_and_consts)))
 
 # Prohibit the inclusion of signal.h without an actual use.
 sc_prohibit_signal_without_use:
-       @h='<signal.h>'                                                 \
+       @h='signal.h'                                                   \
        re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>'          \
          $(_sc_header_without_use)
 
+# Don't include stdio--.h unless you use one of its functions.
+sc_prohibit_stdio--_without_use:
+       @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\('              \
+         $(_sc_header_without_use)
+
+# Don't include stdio-safer.h unless you use one of its functions.
+sc_prohibit_stdio-safer_without_use:
+       @h='stdio-safer.h' re='\<((f(re)?|p)open|tmpfile)_safer *\('    \
+         $(_sc_header_without_use)
+
 # Prohibit the inclusion of strings.h without a sensible use.
 # Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
 sc_prohibit_strings_without_use:
-       @h='<strings.h>'                                                \
+       @h='strings.h'                                                  \
        re='\<(strn?casecmp|ffs(ll)?)\>'                                \
          $(_sc_header_without_use)
 
 # Get the list of symbol names with this:
-# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
+# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt
 _intprops_names =                                                      \
   TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT            \
   TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM          \
-  INT_STRLEN_BOUND INT_BUFSIZE_BOUND
+  INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND             \
+  INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW                   \
+  INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW                        
\
+  INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW               \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \
+  INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW                
\
+  INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW
 _intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
 # Prohibit the inclusion of intprops.h without an actual use.
 sc_prohibit_intprops_without_use:
-       @h='"intprops.h"'                                               \
+       @h='intprops.h'                                                 \
        re='\<($(_intprops_syms_re)) *\('                               \
          $(_sc_header_without_use)
 
 _stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
 # Prohibit the inclusion of stddef.h without an actual use.
 sc_prohibit_stddef_without_use:
-       @h='<stddef.h>'                                                 \
+       @h='stddef.h'                                                   \
        re='\<($(_stddef_syms_re)) *\('                                 \
          $(_sc_header_without_use)
 
+# Don't include xfreopen.h unless you use one of its functions.
+sc_prohibit_xfreopen_without_use:
+       @h='xfreopen.h' re='\<xfreopen *\(' $(_sc_header_without_use)
+
 sc_obsolete_symbols:
        @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>'                     \
        halt='do not use HAVE''_FCNTL_H or O'_NDELAY                    \
@@ -646,12 +676,6 @@ sc_require_test_exit_idiom:
              exit 1; } || :;                                           \
        fi
 
-sc_the_the:
-       @prohibit='\<the ''the\>'                                       \
-       ignore_case=1                                                   \
-       halt='found use of "the ''the";'                                \
-         $(_sc_search_regexp)
-
 sc_trailing_blank:
        @prohibit='[     ]$$'                                           \
        halt='found trailing blank(s)'                                  \
@@ -666,11 +690,16 @@ sc_two_space_separator_in_usage:
        halt='help2man requires at least two spaces between an option and its 
description'\
          $(_sc_search_regexp)
 
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
 # Look for diagnostics that aren't marked for translation.
 # This won't find any for which error's format string is on a separate line.
 sc_unmarked_diagnostics:
        @grep -nE                                                       \
-           '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT))      \
+           '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+               $$($(VC_LIST_EXCEPT))                                   \
          | grep -Ev '(_|ngettext ?)\(' &&                              \
          { echo '$(ME): found unmarked diagnostic(s)' 1>&2;            \
            exit 1; } || :
@@ -840,16 +869,21 @@ sc_prohibit_S_IS_definition:
        halt='do not define S_IS* macros; include <sys/stat.h>'         \
          $(_sc_search_regexp)
 
-prohibit_doubled_word_RE_ ?= \
-  /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
-prohibit_doubled_word_ =                                               \
-    -e 'while ($(prohibit_doubled_word_RE_))'                          \
+# Perl block to convert a match to FILE_NAME:LINENO:TEST,
+# that is shared by two definitions below.
+perl_filename_lineno_text_ =                                           \
     -e '  {'                                                           \
     -e '    $$n = ($$` =~ tr/\n/\n/ + 1);'                             \
     -e '    ($$v = $$&) =~ s/\n/\\n/g;'                                        
\
     -e '    print "$$ARGV:$$n:$$v\n";'                                 \
     -e '  }'
 
+prohibit_doubled_word_RE_ ?= \
+  /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
+prohibit_doubled_word_ =                                               \
+    -e 'while ($(prohibit_doubled_word_RE_))'                          \
+    $(perl_filename_lineno_text_)
+
 # Define this to a regular expression that matches
 # any filename:dd:match lines you want to ignore.
 # The default is to ignore no matches.
@@ -860,10 +894,24 @@ sc_prohibit_doubled_word:
          | grep -vE '$(ignore_doubled_word_match_RE_)'                 \
          | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
 
-sc_prohibit_can_not:
-       @prohibit='\<can[ ]not\>'                                       \
-       halt='use "cannot", not "can'' not"'                            \
-         $(_sc_search_regexp)
+# A regular expression matching undesirable combinations of words like
+# "can not"; this matches them even when the two words appear on different
+# lines, but not when there is an intervening delimiter like "#" or "*".
+prohibit_undesirable_word_seq_RE_ ?=                                   \
+  /\bcan\s+not\b/gims
+prohibit_undesirable_word_seq_ =                                       \
+    -e 'while ($(prohibit_undesirable_word_seq_RE_))'                  \
+    $(perl_filename_lineno_text_)
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_undesirable_word_sequence_RE_ ?= ^$$
+
+sc_prohibit_undesirable_word_seq:
+       @perl -n -0777 $(prohibit_undesirable_word_seq_)                \
+            $$($(VC_LIST_EXCEPT))                                      \
+         | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
+         && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
 
 _ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
 _ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
@@ -987,12 +1035,13 @@ apply the above patch\n'
 
 # Verify that all source files using _() are listed in po/POTFILES.in.
 po_file ?= $(srcdir)/po/POTFILES.in
+generated_files ?= $(srcdir)/lib/*.[ch]
 sc_po_check:
        @if test -f $(po_file); then                                    \
          grep -E -v '^(#|$$)' $(po_file)                               \
            | grep -v '^src/false\.c$$' | sort > address@hidden;                
        \
          files=;                                                       \
-         for file in $$($(VC_LIST_EXCEPT)) $(srcdir)/lib/*.[ch]; do    \
+         for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do      \
            test -r $$file || continue;                                 \
            case $$file in                                              \
              *.m4|*.mk) continue ;;                                    \
@@ -1063,6 +1112,7 @@ sc_copyright_check:
 # the other init.sh-using tests also get it right.
 _hv_file ?= $(srcdir)/tests/help-version
 _hv_regex_weak ?= ^ *\. .*/init\.sh"
+# Fix syntax-highlighters "
 _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
 sc_cross_check_PATH_usage_in_tests:
        @if test -f $(_hv_file); then                                   \
@@ -1090,6 +1140,14 @@ sc_Wundef_boolean:
        halt='Use 0 or 1 for macro values'                              \
          $(_sc_search_regexp)
 
+# Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might
+# not be constant, or might overflow a stack.  In general, use PATH_MAX as
+# a limit, not an array or alloca size.
+sc_prohibit_path_max_allocation:
+       @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX'                 \
+       halt='Avoid stack allocations of size PATH_MAX'                 \
+         $(_sc_search_regexp)
+
 sc_vulnerable_makefile_CVE-2009-4029:
        @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
        in_files=$$(find $(srcdir) -name Makefile.in)                   \
@@ -1123,11 +1181,20 @@ gpg_key_ID ?= \
          | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
 
 translation_project_ ?= address@hidden
-announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-announcement_mail_headers_ ?=                                          \
-To: address@hidden                                                     \
-Cc: $(announcement_Cc_)                                                        
\
-Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+# Make info-gnu the default only for a stable release.
+ifeq ($(RELEASE_TYPE),stable)
+  announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
+  announcement_mail_headers_ ?=                                                
\
+    To: address@hidden                                         \
+    Cc: $(announcement_Cc_)                                            \
+    Mail-Followup-To: $(PACKAGE_BUGREPORT)
+else
+  announcement_Cc_ ?= $(translation_project_)
+  announcement_mail_headers_ ?=                                                
\
+    To: $(PACKAGE_BUGREPORT)                                           \
+    Cc: $(announcement_Cc_)
+endif
 
 announcement: NEWS ChangeLog $(rel-files)
        @$(build_aux)/announce-gen                                      \
@@ -1228,7 +1295,7 @@ gl_noteworthy_news_ = * Noteworthy changes in release ?.? 
(????-??-??) [?]
 release-prep:
        case $$RELEASE_TYPE in alpha|beta|stable) ;; \
          *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
-       $(MAKE) -s announcement > ~/announce-$(my_distdir)
+       $(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir)
        if test -d $(release_archive_dir); then                 \
          ln $(rel-files) $(release_archive_dir);               \
          chmod a-w $(rel-files);                               \
@@ -1315,3 +1382,101 @@ update-copyright:
        grep -l -w Copyright                                             \
          $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
          | $(update-copyright-env) xargs $(build_aux)/$@
+
+# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not
+# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS.
+
+# NOTE: to override any _gl_TS_* default value, you must
+# define the variable(s) using "export" in cfg.mk.
+_gl_TS_dir ?= src
+
+ALL_RECURSIVE_TARGETS += sc_tight_scope
+sc_tight_scope: tight-scope.mk
+       @if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk       \
+               > /dev/null                                             \
+          && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
+               > /dev/null 2>&1; then                                  \
+           echo '$(ME): skipping $@';                                  \
+       else                                                            \
+           $(MAKE) -s -C $(_gl_TS_dir)                                 \
+               -f Makefile                                             \
+               -f $(abs_top_srcdir)/cfg.mk                             \
+               -f $(abs_top_builddir)/$<                               \
+             _gl_tight_scope                                           \
+               || fail=1;                                              \
+       fi
+       @rm -f $<
+
+tight-scope.mk: $(ME)
+       @rm -f $@ address@hidden
+       @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(ME) > address@hidden
+       @chmod a=r address@hidden && mv address@hidden $@
+
+ifeq (a,b)
+# TS-start
+
+# Most functions should have static scope.
+# Any that don't must be marked with `extern', but `main'
+# and `usage' are exceptions: they're always extern, but
+# do not need to be marked.  Symbols matching `__.*' are
+# reserved by the compiler, so are automatically excluded below.
+_gl_TS_unmarked_extern_functions ?= main usage
+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) +\(/
+
+# If your project uses a macro like "XTERN", then put
+# the following in cfg.mk to override this default:
+# export _gl_TS_extern = extern|XTERN
+_gl_TS_extern ?= extern
+
+# The second nm|grep checks for file-scope variables with `extern' scope.
+# Without gnulib's progname module, you might put program_name here.
+# Symbols matching `__.*' are reserved by the compiler,
+# so are automatically excluded below.
+_gl_TS_unmarked_extern_vars ?=
+
+# NOTE: the _match variables are perl expressions -- not mere regular
+# expressions -- so that you can extend them to match other patterns
+# and easily extract matched variable names.
+# For example, if your project declares some global variables via
+# a macro like this: GLOBAL(type, var_name, initializer), then you
+# can override this definition to automatically extract those names:
+# export _gl_TS_var_match = \
+#   /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/
+_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/
+
+# The names of object files in (or relative to) $(_gl_TS_dir).
+_gl_TS_obj_files ?= *.$(OBJEXT)
+
+# Files in which to search for the one-line style extern declarations.
+# $(_gl_TS_dir)-relative.
+_gl_TS_headers ?= $(noinst_HEADERS)
+
+.PHONY: _gl_tight_scope
+_gl_tight_scope: $(bin_PROGRAMS)
+       t=exceptions-$$$$;                                              \
+       trap 's=$$?; rm -f $$t; exit $$s' 0;                            \
+       for sig in 1 2 3 13 15; do                                      \
+         eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
+       done;                                                           \
+       src=`for f in $(SOURCES); do                                    \
+              test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
+       hdr=`for f in $(_gl_TS_headers); do                             \
+              test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
+       ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions);  \
+         grep -h -A1 '^extern .*[^;]$$' $$src                          \
+           | grep -vE '^(extern |--)' | sed 's/ .*//';                 \
+         perl -lne                                                     \
+            '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr;      \
+       ) | sort -u > $$t;                                              \
+       nm -e $(_gl_TS_obj_files) | sed -n 's/.* T //p'|grep -Ev -f $$t \
+         && { echo the above functions should have static scope >&2;   \
+              exit 1; } || : ;                                         \
+       ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);       \
+         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+       ) | sort -u > $$t;                                              \
+       nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'          \
+            | sort -u | grep -Ev -f $$t                                        
\
+         && { echo the above variables should have static scope >&2;   \
+              exit 1; } || :
+# TS-end
+endif
diff --git a/lib/po/LINGUAS b/lib/po/LINGUAS
index 310db23..17fff4f 100644
--- a/lib/po/LINGUAS
+++ b/lib/po/LINGUAS
@@ -12,5 +12,6 @@ ro
 sk
 sr
 sv
+uk
 vi
 zh_CN
diff --git a/lib/po/eo.po.in b/lib/po/eo.po.in
index d9f2b4c..74005ac 100644
--- a/lib/po/eo.po.in
+++ b/lib/po/eo.po.in
@@ -5,10 +5,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl 1.4.1\n"
+"Project-Id-Version: libgsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2011-03-18 19:27-0300\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-09 20:25-0300\n"
 "Last-Translator: Felipe Castro <address@hidden>\n"
 "Language-Team: Esperanto <address@hidden>\n"
 "Language: eo\n"
@@ -16,242 +16,266 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
-msgstr "Libgsasl sukceso"
+msgstr "Libgsasl sukcesas"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "Mekanismo SASL bezonas pli da datumaro"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Nekonata mekanismo SASL"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "Mekanismo SASL vokita tro multaj fojoj"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "Funkcio SASL bezonas pli larĝan bufron (interna eraro)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Ni ne povis malfermi dosieron en biblioteko SASL"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Ni ne povis fermi dosieron en biblioteko SASL"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "Eraro pri rezervado de memoro en biblioteko SASL"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "Eraro pri kodigado base64 en biblioteko SASL"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "Malalt-nivela ĉifra eraro en biblioteko SASL"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_client_callback_anonymous() 
(aplikaĵa eraro)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_client_callback_password() 
(aplikaĵa eraro)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_client_callback_passcode() 
(aplikaĵa eraro)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_client_callback_pin() 
(aplikaĵa eraro)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon 
gsasl_client_callback_authorization_id() (aplikaĵa eraro)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon 
gsasl_client_callback_authentication_id() (aplikaĵa eraro)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_client_callback_service() 
(aplikaĵa eraro)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_validate() 
(aplikaĵa eraro)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_cram_md5() 
(aplikaĵa eraro)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_digest_md5() 
(aplikaĵa eraro)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_external() 
(aplikaĵa eraro)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_anonymous() 
(aplikaĵa eraro)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_realm() 
(aplikaĵa eraro)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_securid() 
(aplikaĵa eraro)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_service() 
(aplikaĵa eraro)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_gssapi() 
(aplikaĵa eraro)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "Mekanismo SASL bezonas eventvokon gsasl_server_callback_retrieve() 
(aplikaĵa eraro)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Malsukceso dum provo fari Unikoda Normigo en ĉeno."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Ni ne povis prepari internaciigitan (ne-ASCII) ĉenon."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "Mekanismo SASL ne povis analizi la enigon"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "Eraro dum aÅ­tentigo de uzanto"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Ni ne povis preni internan bibliotekan traktilon (biblioteka eraro)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "Eraro pri integreco en aplikaĵa datumaro"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Neniu pli 'realm' disponeblaj (ne-ĉesiga)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Klient-flanka funkciado ne disponeblas en biblioteko (aplikaĵa eraro)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Servil-flanka funkciado ne disponeblas en biblioteko (aplikaĵa eraro)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "Biblioteko GSSAPI ne povis liberigi memoron en gss_release_buffer() en 
biblioteko SASL. Tio ĉi estas serioza interna eraro."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "Biblioteko GSSAPI ne povis kompreni  samtavolanan nomon en 
gss_import_name() en biblioteko SASL. Tio ĉi okazas ordinare pro malĝusta 
servo kaj/aÅ­ gastig-nomoj."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "Eraro GSSAPI en kliento dum negocado de sekureca kunteksto en 
gss_init_sec_context() en biblioteko SASL. Tio ĉi okazas ordinare pro 
nesufiĉe da legitimaĵoj aŭ pro malicaj interagoj."
+msgstr "Eraro de GSSAPI en kliento dum negocado de sekureca kunteksto en 
gss_init_sec_context() en biblioteko SASL. Tio ĉi okazas ordinare pro 
nesufiĉe da legitimaĵoj aŭ pro malicaj interagoj."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "Eraro GSSAPI en servilo dum negocado de sekureca kunteksto en 
gss_init_sec_context() en biblioteko SASL. Tio ĉi okazas ordinare pro 
nesufiĉe da legitimaĵoj aŭ pro malicaj interagoj."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "Eraro de GSSAPI en servilo dum negocado de sekureca kunteksto en 
gss_accept_sec_context() en biblioteko SASL. Tio ĉi okazas ordinare pro 
nesufiĉe da legitimaĵoj aŭ pro malicaj interagoj."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
-msgstr "Eraro GSSAPI dum deĉifrado aŭ dekodado de datumaro en gss_unwrap() 
en biblioteko SASL. Tio ĉi okazas ordinare pro datumara rompiĝo."
+msgstr "Eraro de GSSAPI dum deĉifrado aŭ dekodado de datumaro en 
gss_unwrap() en biblioteko SASL. Tio ĉi okazas ordinare pro datumara rompiĝo."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
-msgstr "Eraro GSSAPI dum enĉifrado aŭ enkodado de datumaro en gss_wrap() en 
biblioteko SASL."
+msgstr "Eraro de GSSAPI dum enĉifrado aŭ enkodado de datumaro en gss_wrap() 
en biblioteko SASL."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
-msgstr "Eraro GSSAPI dum akirado de legitimaĵoj en gss_acquire_cred() en 
biblioteko SASL. Tio ĉi okazas ordinare pro malhavo de taŭga ŝlosilo 
Kerberos disponebla en /etc/krb5.keytab en la servilo."
+msgstr "Eraro de GSSAPI dum akirado de legitimaĵoj en gss_acquire_cred() en 
biblioteko SASL. Tio ĉi okazas ordinare pro malhavo de taŭga ŝlosilo 
Kerberos disponebla en /etc/krb5.keytab en la servilo."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
-msgstr "Eraro GSSAPI dum kreado de montrig-nomo reprezentanta la kliento en 
gss_display_name() en biblioteko SASL. Tio ĉi probable okazas ĉar la kliento 
liveris malĝustan datumaron."
+msgstr "Eraro de GSSAPI dum kreado de montrig-nomo reprezentanta la kliento en 
gss_display_name() en biblioteko SASL. Tio ĉi probable okazas ĉar la kliento 
liveris malĝustan datumaron."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Alia estaĵo petis protekton de integreco aŭ sekreteco en mekanismo 
GSSAPI sed tio ĉi ne estas aktuale realigita."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Malsukceso dum ekigo de Kerberos V5."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "Interna eraro de Kerberos V5."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID bezonas aldonan paskodon."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID bezonas novan PIN."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "La indikita biblioteka traktilo estis malvalida (aplikaĵa eraro)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Neniu cel-funkcio indikita de vokanto (aplikaĵa eraro)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la sennoma ĵetono ne estis provizata."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Aŭtentigo malsukcesis ĉar la aŭtentiga identaĵo ne estis 
provizata."
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Aŭtentigo malsukcesis ĉar la permesiga identaĵo ne estis provizata."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la pasvorto ne estis provizata."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la paskodo ne estis provizata."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la PIN-kodo ne estis provizata."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la servo-nomo ne estis provizata."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Aŭtentigo malsukcesis ĉar la gastigo-nomo ne estis provizata."
 
-#: src/error.c:209
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "Eraro de GSSAPI dum enpakado de ĵetono."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "Eraro de GSSAPI dum elpakado de ĵetono."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "Eraro de GSSAPI dum prenado de OID por nomo de mekanismo SASL."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "Eraro de GSSAPI dum testado de OID en OID-aro."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "Eraro de GSSAPI dum ellasado de OID-aro."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Aŭtentigo malsukcesis ĉar tls-unika CB ne estis provizata."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Nekonata eraro de Libgsasl"
diff --git a/lib/po/fi.po.in b/lib/po/fi.po.in
index 04b69bf..58f8705 100644
--- a/lib/po/fi.po.in
+++ b/lib/po/fi.po.in
@@ -1,257 +1,282 @@
 # Finnish messages for libgsasl.
-# Copyright © 2009 Free Software Foundation, Inc.
+# Copyright © 2009, 2011 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
-# Jorma Karvonen <address@hidden>, 2009.
+# Jorma Karvonen <address@hidden>, 2009-2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl 1.1\n"
+"Project-Id-Version: libgsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2009-03-25 16:06+0100\n"
-"PO-Revision-Date: 2009-10-06 20:28+0200\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-05 10:50+0200\n"
 "Last-Translator: Jorma Karvonen <address@hidden>\n"
 "Language-Team: Finnish <address@hidden>\n"
+"Language: fi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Libgsasl onnistui"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "SASL-mekanismi tarvitsee lisää dataa"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Tuntematon SASL-mekanismi"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "SASL-mekanismia kutsutaan liian monta kertaa"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "SASL-funktio tarvitsee laajemman puskurin (sisäinen virhe)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Ei voitu avata tiedostoa SASL-kirjastossa"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Ei voitu sulkea tiedostoa SASL-kirjastossa"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "Muistinvarausvirhe SASL-kirjastossa"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "Base 64-koodausvirhe SASL-kirjastossa"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "Matalan tason salausvirhe SASL-kirjastossa"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_client_callback_anonymous()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_client_callback_password()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_client_callback_passcode()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_client_callback_pin()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee 
gsasl_client_callback_authorization_id()-vastakutsun (sovellusvirhe)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee 
gsasl_client_callback_authentication_id()-vastakutsun (sovellusvirhe)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_client_callback_service()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_validate()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_cram_md5()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee 
gsasl_server_callback_digest_md5()-vastakutsun (sovellusvirhe)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_external()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitse gsasl_server_callback_anonymous()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_realm()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_securid()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_service()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_gssapi()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "SASL-mekanismi tarvitsee gsasl_server_callback_retrieve()-vastakutsun 
(sovellusvirhe)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Unicode-normeerauksen suorittaminen merkkijonolle epäonnistui."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Ei voitu esikäsitellä kansainvälistettyä (ei-ASCII) merkkijonoa."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "SASL-mekanismi ei voinut jäsentää syötettä"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "Virhe todennettaessa käyttäjää"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Ei saada sisäistä kirjasto-osoitinta (kirjastovirhe)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "Eheysvirhe sovelluslatauksessa"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Ei enää alueita käytettävissä (ei-vakava)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Asiakaspuolitoiminnallisuus ei ole käytetttävissä kirjastossa 
(sovellusvirhe)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Palvelinpuolitoiminnallisuus ei ole käytettävissä kirjastossa 
(sovellusvirhe)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "GSSAPI-kirjasto ei voinut vapauttaa muistia funktiossa 
gss_release_buffer() SASL-kirjastossa. Tämä on vakava sisäinen virhe."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "GSSAPI-kirjasto ei ymmärrä vertaisnimeä funktiossa 
gss_import_name() SASL-kirjastossa.  Tämä johtuu luultavasti virheellisestä 
palvelusta tai tietokonenimistä."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "GSSAPI-virhe asiakkaalla kun neuvotellaan turvallisuusyhteydestä 
funktiossa gss_init_sec_context() SASL-kirjastossa.  Tämä johtuu luultavasti 
riittämättömistä valtuustiedoista tai tahallisista vuorovaikutuksista."
+msgstr "GSSAPI-virhe asiakkaalla kun neuvotellaan turvallisuusyhteydestä 
funktiossa gss_init_sec_context() SASL-kirjastossa.  Tämä johtuu luultavasti 
riittämättömistä valtuustiedoista tai haitallisista vuorovaikutuksista."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "GSSAPI-virhe palvelimella neuvoteltaessa turvallisuusyhteydestä 
funktiossa gss_init_sec_context() SASL-kirjastossa.  Tämä johtuu luultavasti 
riittämättömistä valtuustiedoista tai tahallisista vuorovaikutuksista."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "GSSAPI-virhe palvelimella neuvoteltaessa turvallisuusyhteydestä 
funktiossa gss_accept_sec_context() SASL-kirjastossa.  Tämä johtuu 
luultavasti riittämättömistä valtuustiedoista tai haitallisista 
vuorovaikutuksista."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "GSSAPI-virhe purettaessa salausta tai koodausta funktiossa 
gss_unwrap() SASL-kirjastossa.  Tämä johtuu luultavasti datan 
vääristymisestä."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "GSSAPI-virhe salattaessa tai koodattaessa dataa funktiossa gss_wrap() 
SASL-kirjastossa."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "GSSAPI-virhe hankittaessa valtuustietoja funktiossa gss_acquire_cred() 
SASL-kirjastossa.  Tämä johtuu luultavasti siitä, että ei ole 
käytettävissä oikeaa Kerberos-avainta palvelimen 
/etc/krb5.keytab-tiedostossa."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "GSSAPI-virhe luotaessa näyttönimeä osoittamaan asiakasta funktiossa 
gss_display_name() SASL-kirjastossa.  Tämä johtuu luultavasti siitä, että 
asiakas toimitti virheellistä dataa."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Toinen olio vaatinut eheyttä tai luottamuksellista suojelua 
GSSAPI-mekanismissa, mutta sitä ei ole nykyisin toteutettu."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Kerberos V5-alustusvirhe."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "Kerberos V5-sisäinen virhe."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID tarvitsee lisäsalakoodin."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID tarvitsee uuden pin-koodin."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "Tarjottu kirjasto-osoitin on virheellinen (sovellusvirhe)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Kutsuja ei määritellyt vastakutsua (sovellusvirhe)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Todennus epäonnistui koska anonyymipolettia ei tarjottu."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Todennus epäonnistui koska todennushenkilöllisyyttä ei tarjottu."
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Todennus epäonnistui koska käyttövaltuutushenkilöllisyyttä ei 
tarjottu."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Todennus epäonnistui koska salasanaa ei tarjottu."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Todennus epäonnistui koska salakoodia ei tarjottu."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Todennus epäonnistui koska pin-koodia ei tarjottu."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Todennus epäonnistui koska koska palvelunimeä ei tarjottu."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Todennus epäonnistui koska tietokoneen nimeä ei tarjottu."
 
-#: src/error.c:206
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "GSSAPI-virhekapselointimerkkijono."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "GSSAPI-virhekapseloinnin poistomerkkijono."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "GSSAPI-virhe haettaessa OID-tunnistetta SASL-mekanisminimelle."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "GSSAPI-virhe testattaessa OID-tunnistetta OID-joukossa."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "GSSAPI-virhe julkaistaessa OID-joukko."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Todennus epäonnistui koska tls-unique CB ei tarjottu."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Tuntematon Libgsasl-virhe"
diff --git a/lib/po/it.po.in b/lib/po/it.po.in
index 9a33229..85f85be 100644
--- a/lib/po/it.po.in
+++ b/lib/po/it.po.in
@@ -1,256 +1,282 @@
 # Italian translation for libgsasl.
 # Copyright (C) 2010 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
-# Sergio Zanchetta <address@hidden>, 2010.
+# Sergio Zanchetta <address@hidden>, 2010, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl-1.4.1\n"
+"Project-Id-Version: libgsasl-1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-03-11 17:55+0100\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-31 01:00+0200\n"
 "Last-Translator: Sergio Zanchetta <address@hidden>\n"
 "Language-Team: Italian <address@hidden>\n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural= (n != 1)\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Successo in libgsasl"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "Il meccanismo SASL ha bisogno di più dati"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Meccanismo SASL sconosciuto"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "Meccanismo SASL chiamato troppe volte"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "La funzione SASL ha bisogno di un buffer più grande (errore interno)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Impossibile aprire il file nella libreria SASL"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Impossibile chiudere il file nella libreria SASL"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "Errore di allocazione memoria nella libreria SASL"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "Errore di codifica base 64 nella libreria SASL"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "Errore di cifratura a basso livello nella libreria SASL"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_anonymous() (errore dell'applicazione)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_password() (errore dell'applicazione)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_passcode() (errore dell'applicazione)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_pin() (errore dell'applicazione)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_authorization_id() (errore dell'applicazione)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_authentication_id() (errore dell'applicazione)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_client_callback_service() (errore dell'applicazione)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_validate() (errore dell'applicazione)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_cram_md5() (errore dell'applicazione)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_digest_md5() (errore dell'applicazione)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_external() (errore dell'applicazione)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_anonymous() (errore dell'applicazione)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_realm() (errore dell'applicazione)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_securid() (errore dell'applicazione)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_service() (errore dell'applicazione)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_gssapi() (errore dell'applicazione)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "Il meccanismo SASL necessita di un callback 
gsasl_server_callback_retrieve() (errore dell'applicazione)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Normalizzazione Unicode sulla stringa non riuscita."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Impossibile preparare una stringa (non-ASCII) internazionalizzata."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "Il meccanismo SASL non può analizzare l'input"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "Errore nell'autenticazione dell'utente"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Impossibile ottenere l'handle della libreria interna (errore della 
libreria)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "Errore di integrità nel payload dell'applicazione"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Non ci sono più reami disponibili (non fatale)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Funzionalità lato client non disponibile nella libreria (errore 
nell'applicazione)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Funzionalità lato server non disponibile nella libreria (errore 
nell'applicazione)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "La libreria GSSAPI non ha potuto deallocare memoria in 
gss_release_buffer() nella libreria SASL. Questo è un grave errore interno."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "La libreria GSSAPI non è riuscita ad interpretare un nome peer in 
gss_import_name() nella libreria SASL. Ciò è verosimilmente dovuto a un 
servizio e/o nomi host non corretti."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
 msgstr "Errore GSSAPI nel client durante la negoziazione del contesto di 
sicurezza in gss_init_sec_context() nella libreria SASL. Ciò è verosimilmente 
dovuto a credenziali insufficienti o interazioni malevole."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "Errore GSSAPI nel server durante la negoziazione del contesto di 
sicurezza in gss_init_sec_context() nella libreria SASL. Ciò è verosimilmente 
dovuto a credenziali insufficienti o interazioni malevole."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "Errore GSSAPI nel server durante la negoziazione del contesto di 
sicurezza in gss_accept_sec_context() nella libreria SASL. Ciò è 
verosimilmente dovuto a credenziali insufficienti o interazioni malevole."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "Errore GSSAPI nel decifrare o decodificare i dati in gss_unwrap() 
nella libreria SASL. Ciò è verosimilmente dovuto a dati corrotti."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "Errore GSSAPI nel cifrare o codificare i dati in gss_wrap() nella 
libreria SASL."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "Errore GSSAPI nell'acquisizione di credenziali in gss_acquire_cred() 
nella libreria SASL. Ciò è verosimilmente dovuto all'assenza di una 
appropriata chiave Kerberos disponibile in /etc/krb5.keytab nel server."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "Errore GSSAPI nella creazione di un nome visualizzato indicante il 
client in gss_display_name() nella libreria SASL. Ciò è probabilmente causato 
da dati errati forniti dal client."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Un'altra entità ha richiesto protezione di integrità o riservatezza 
nel meccanismo GSSAPI ma questa non è attualmente implementata."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Inizializzazione di Kerberos V5 non riuscita."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "Errore interno di Kerberos V5."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID necessita di un codice di sicurezza aggiuntivo."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID ha bisogno di un nuovo pin."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "L'handle della libreria fornito non era valido (errore 
dell'applicazione)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Nessun callback specificato dal chiamante (errore dell'applicazione)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Autenticazione non riuscita poiché non è stato fornito il token 
anonimo."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Autenticazione non riuscita poiché non ne è stata fornita l'identità
."
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Autenticazione non riuscita poiché non è stata fornita l'identità 
di autorizzazione."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Autenticazione non riuscita poiché non è stata fornita la password."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Autenticazione non riuscita perché non è stato fornito il codice di 
sicurezza."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Autenticazione non riuscita poiché non è stato fornito il codice 
pin."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Autenticazione non riuscita poiché non è stato fornito il nome del 
servizio."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Autenticazione non riuscita poiché non è stato fornito il nome 
dell'host."
 
-#: src/error.c:209
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "Errore GSSAPI nell'incapsulazione del token."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "Errore GSSAPI nella decapsulazione del token."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "Errore GSSAPI nel recupero dell'OID per il nome del meccanismo SASL."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "Errore GSSAPI nel test per l'OID all'interno del set."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "Errore GSSAPI nel rilascio del set di OID."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Autenticazione non riuscita poiché non è stata fornita 
un'associazione di canale tls-unique."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Errore sconosciuto di libgsasl"
diff --git a/lib/po/nl.po.in b/lib/po/nl.po.in
index 6fb72cf..d5d9656 100644
--- a/lib/po/nl.po.in
+++ b/lib/po/nl.po.in
@@ -1,259 +1,284 @@
-# Dutch translations for libgsasl.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Dutch translations for GNU libgsasl.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
 #
 # Taco Witte <address@hidden>, 2004, 2005, 2006.
-# Benno Schulenberg <address@hidden>, 2008, 2010.
+# Benno Schulenberg <address@hidden>, 2008, 2010, 2011.
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl-1.4.1\n"
+"Project-Id-Version: libgsasl-1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-05-02 15:14+0200\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-04 21:11+0200\n"
 "Last-Translator: Benno Schulenberg <address@hidden>\n"
 "Language-Team: Dutch <address@hidden>\n"
+"Language: nl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Lokalize 1.0\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Libgsasl: gelukt"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "SASL-methode vereist meer gegevens"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Onbekende SASL-methode"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "SASL-methode is te vaak aangeroepen"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "SASL-functie vereist grotere buffer (**interne fout**)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Kan bestand niet openen in SASL-bibliotheek "
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Kan bestand niet sluiten in SASL-bibliotheek"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "Geheugenreserveringsfout in SASL-bibliotheek"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "Base64-coderingsfout in SASL-bibliotheek"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "Cryptografiefout op laag niveau in SASL-bibliotheek"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van 
gsasl_client_callback_anonymous() (toepassingsfout)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_client_callback_password() 
(toepassingsfout)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_client_callback_passcode() 
(toepassingsfout)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_client_callback_pin() 
(toepassingsfout)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van 
gsasl_client_callback_authorization_id() (toepassingsfout)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van 
gsasl_client_callback_authentication_id()(toepassingsfout)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_client_callback_service() 
(toepassingsfout)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_validate() 
(toepassingsfout)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_cram_md5() 
(toepassingsfout)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van 
gsasl_server_callback_digest_md5() (toepassingsfout)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_external() 
(toepassingsfout)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van 
gsasl_server_callback_anonymous() (toepassingsfout)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_realm() 
(toepassingsfout)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_securid() 
(toepassingsfout)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_service() 
(toepassingsfout)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_gssapi() 
(toepassingsfout)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "SASL-methode vereist terugaanroep van gsasl_server_callback_retrieve() 
(toepassingsfout)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Unicode-normalisatie van tekenreeks is mislukt."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Kan geïnternationaliseerde (niet-ASCII) tekenreeks niet voorbewerken."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "SASL-methode kan invoer niet ontleden"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "Fout bij authenticatie van gebruiker"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Kan geen handvat voor interne bibliotheek verkrijgen (bibliotheekfout)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "Integriteitsfout in pakketlading van toepassing"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Geen realms meer beschikbaar (niet fataal)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Functionaliteit voor cliënt is niet beschikbaar in bibliotheek 
(toepassingsfout)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Functionaliteit voor server is niet beschikbaar in bibliotheek 
(toepassingsfout)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "GSSAPI-bibliotheek kan geheugen niet vrijgeven in gss_release_buffer() 
in SASL-bibliotheek.  **Dit is een ernstige interne fout**."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "GSSAPI-bibliotheek begrijpt naam van andere computer niet in 
gss_import_name() in SASL-bibliotheek.  Dit komt waarschijnlijk door een 
onjuiste servicenaam of hostnaam."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
 msgstr "GSSAPI-fout in cliënt bij onderhandelen over veiligheidscontext in 
gss_init_sec_context() in SASL-bibliotheek.  Dit komt waarschijnlijk door 
onvoldoende identificatiegegevens of door kwaadwillige interventies."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "GSSAPI-fout in server bij onderhandelen over veiligheidscontext in 
gss_init_sec_context() in SASL-bibliotheek.  Dit komt waarschijnlijk door 
onvoldoende identificatiegegevens of door kwaadwillige interventies."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "GSSAPI-fout in server bij onderhandelen over veiligheidscontext in 
gss_accept_sec_context() in SASL-bibliotheek.  Dit komt waarschijnlijk door 
onvoldoende identificatiegegevens of door kwaadwillige interventies."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "GSSAPI-fout bij decoderen van gegevens in gss_unwrap() in 
SASL-bibliotheek.  Dit komt waarschijnlijk door beschadigde gegevens."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "GSSAPI-fout bij versleutelen van gegevens in gss_wrap() in 
SASL-bibliotheek."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "GSSAPI-fout bij het verkrijgen van identificatiegegevens in 
gss_acquire_cred() in SASL-bibliotheek.  Dit komt waarschijnlijk door het 
ontbreken van een juiste Kerberos-sleutel in /etc/krb5.keytab op de server."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "GSSAPI-fout bij aanmaken van weergavenaam voor cliënt in 
gss_display_name() in SASL-bibliotheek.  Waarschijnlijk heeft de cliënt 
onjuiste gegevens opgegeven."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Andere entiteit verzocht om bescherming van integriteit of 
vertrouwelijkheid in GSSAPI-methode, maar dat is nog niet geïmplementeerd."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Kerberos V5-initialisatie is mislukt."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "**Interne fout** in Kerberos V5."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID vereist extra wachtwoord."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID vereist nieuwe pin."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "Het gegeven bibliotheekhandvat is ongeldig (toepassingsfout)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Aanroeper heeft geen terugaanroep opgegeven (toepassingsfout)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Authenticatie is mislukt omdat geen anoniem token opgegeven is."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Authenticatie is mislukt omdat geen authenticatie-identiteit opgegeven 
is."
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Authenticatie is mislukt omdat geen authorisatie-identiteit opgegeven 
is."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Authenticatie is mislukt omdat geen wachtwoord gegeven is."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Authenticatie is mislukt omdat geen wachtwoord gegeven is."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Authenticatie is mislukt omdat geen pincode gegeven is."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Authenticatie is mislukt omdat geen servicenaam opgegeven is."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Authenticatie is mislukt omdat geen hostnaam opgegeven is."
 
-#: src/error.c:209
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "GSSAPI-fout bij inkapselen van token."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "GSSAPI-fout bij ontkapselen van token."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "GSSAPI-fout bij verkrijgen van OID voor naam van SASL-mechanisme."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "GSSAPI-fout bij testen op OID in OID-set."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "GSSAPI-fout bij vrijgeven van OID-set."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Authenticatie is mislukt omdat geen TLS-unieke CB opgegeven is."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Libgsasl: onbekende fout"
diff --git a/lib/po/pl.po.in b/lib/po/pl.po.in
index 04a669c..da22471 100644
--- a/lib/po/pl.po.in
+++ b/lib/po/pl.po.in
@@ -1,256 +1,281 @@
 # Polish translation for libgsasl.
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2009, 2011 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
-# Jakub Bogusz <address@hidden>, 2004-2009.
+# Jakub Bogusz <address@hidden>, 2004-2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl 1.1\n"
+"Project-Id-Version: libgsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2009-03-25 16:06+0100\n"
-"PO-Revision-Date: 2009-03-25 22:15+0100\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-03 22:01+0200\n"
 "Last-Translator: Jakub Bogusz <address@hidden>\n"
 "Language-Team: Polish <address@hidden>\n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Sukces libgsasl"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "Mechanizm SASL wymagaja wiêcej danych"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Nieznany mechanizm SASL"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "Mechanizm SASL wywo³any zbyt du¿o razy"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "Funkcja SASL wymaga wiêkszego bufora (b³±d wewnêtrzny)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Nie mo¿na otworzyæ pliku w bibliotece SASL"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Nie mo¿na zamkn±æ pliku w bibliotece SASL"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "B³±d przydzielania pamiêci w bibliotece SASL"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "B³±d kodowania base64 w bibliotece SASL"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "B³±d kryptografii niskiego poziomu w bibliotece SASL"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_anonymous() (b³±d aplikacji)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_password() (b³±d aplikacji)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_passcode() (b³±d aplikacji)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego gsasl_client_callback_pin() 
(b³±d aplikacji)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_authorization_id() (b³±d aplikacji)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_authentication_id() (b³±d aplikacji)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_client_callback_service() (b³±d aplikacji)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_validate() (b³±d aplikacji)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_cram_md5() (b³±d aplikacji)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_digest_md5() (b³±d aplikacji)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_external() (b³±d aplikacji)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_anonymous() (b³±d aplikacji)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_realm() (b³±d aplikacji)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_securid() (b³±d aplikacji)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_service() (b³±d aplikacji)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_gssapi() (b³±d aplikacji)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "Mechanizm SASL wymaga wywo³ania zwrotnego 
gsasl_server_callback_retrieve() (b³±d aplikacji)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Nie uda³o siê przeprowadziæ normalizacji unikodowej ³añcucha."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Nie mo¿na przygotowaæ umiêdzynarodowionego ³añcucha (nie-ASCII)."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "Mechanizm SASL nie by³ w stanie przeanalizowaæ wej¶cia"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "B³±d uwierzytelniania u¿ytkownika"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Nie mo¿na uzyskaæ wewnêtrznego uchwytu biblioteki (b³±d biblioteki)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "B³±d spójno¶ci w danych aplikacji"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Nie ma wiêcej dostêpnych dziedzin (niekrytyczne)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Funkcjonalno¶æ strony klienta niedostêpna w bibliotece (b³±d 
aplikacji)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Funkcjonalno¶æ strony serwera niedostêpna w bibliotece (b³±d 
aplikacji)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "Biblioteka GSSAPI nie mog³a zwolniæ pamiêci w gss_release_buffer() w 
bibliotece SASL. To jest powa¿ny b³±d wewnêtrzny."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "Biblioteka GSSAPI nie zrozumia³a nazwy partnera w gss_import_name() w 
bibliotece SASL. Najprawdopodobniej jest to spowodowane b³êdnymi nazwami us³ug 
i/lub hostów."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
 msgstr "B³±d GSSAPI w kliencie podczas negocjacji kontekstu bezpieczeñstwa w 
gss_init_sec_context() w bibliotece SASL - najprawdopodobniej spowodowany 
niewystarczaj±cym uwierzytelnieniem lub z³ymi wp³ywami."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "B³±d GSSAPI w serwerze podczas negocjacji kontekstu bezpieczeñstwa w 
gss_init_sec_context() w bibliotece SASL - najprawdopodobniej spowodowany 
niewystarczaj±cym uwierzytelnieniem lub z³ymi wp³ywami."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "B³±d GSSAPI w serwerze podczas negocjacji kontekstu bezpieczeñstwa w 
gss_accept_sec_context() w bibliotece SASL - najprawdopodobniej spowodowany 
niewystarczaj±cym uwierzytelnieniem lub z³ymi wp³ywami."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "B³±d GSSAPI podczas odszyfrowywania lub odkodowywania danych w 
gss_unwrap() w bibliotece SASL - najprawdopodobniej spowodowany uszkodzeniem 
danych."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "B³±d GSSAPI podczas szyfrowania lub kodowania danych w gss_wrap() w 
bibliotece SASL."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "B³±d GSSAPI podczas otrzymywania uwierzytelnienia w gss_acquire_cred() 
w bibliotece SASL - najprawdopodobniej spowodowany brakiem odpowiedniego klucza 
Kerberosa w /etc/krb5.keytab na serwerze."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "B³±d GSSAPI podczas tworzenia nazwy oznaczaj±cej klienta w 
gss_display_name() w bibliotece SASL - prawdopodobnie z powodu b³êdnych danych 
otrzymanych od klienta."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Inna jednostka za¿±da³a zabezpieczenia spójno¶ci lub poufno¶ci w 
mechanizmie GSSAPI, ale nie jest on aktualnie zaimplementowany."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "B³±d inicjalizacji Kerberosa V5."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "B³±d wewnêtrzny Kerberosa V5."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID wymaga dodatkowego has³a."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID wymaga nowego PIN-u."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "B³êdny dostarczony uchwyt biblioteki (b³±d aplikacji)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Wywo³uj±cy nie przekaza³ wywo³ania zwrotnego (b³±d aplikacji)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano anonimowego 
tokena."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano to¿samo¶ci 
uwierzytelnienia."
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano to¿samo¶ci 
autoryzacji."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano has³a."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano tajnego 
kodu."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano kodu PIN."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano nazwy 
us³ugi."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie przekazano nazwy 
hosta."
 
-#: src/error.c:206
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "B³±d GSSAPI podczas opakowywania tokenu."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "B³±d GSSAPI podczas rozpakowywania tokenu."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "B³±d GSSAPI przy pobieraniu OID-a dla nazwy mechanizmu SASL."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "B³êd GSSAPI przy sprawdzaniu obecno¶ci OID-a w zbiorze."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "B³±d GSSAPI przy zwalnianiu zbioru OID-ów."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Uwierzytelnienie nie powiod³o siê, poniewa¿ nie zapewniono CB 
unikalnego dla TLS."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Nieznany b³±d libgsasl"
diff --git a/lib/po/uk.po.in b/lib/po/uk.po.in
new file mode 100644
index 0000000..417e044
--- /dev/null
+++ b/lib/po/uk.po.in
@@ -0,0 +1,284 @@
+# Translation of libgsasl to Ukrainian
+#
+# Copyright (C) 2011 Free Software Foundation, Inc.
+# This file is distributed under the same license as the libgsasl package.
+#
+# Yuri Chornoivan <address@hidden>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgsasl 1.6.1\n"
+"Report-Msgid-Bugs-To: address@hidden"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-04 17:01+0300\n"
+"Last-Translator: Yuri Chornoivan <address@hidden>\n"
+"Language-Team: Ukrainian <address@hidden>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: src/error.c:46
+msgid "Libgsasl success"
+msgstr "Libgsasl виконала завдання"
+
+#: src/error.c:47
+msgid "SASL mechanism needs more data"
+msgstr "Механізмові SASL потрібні додаткові 
дані"
+
+#: src/error.c:48
+msgid "Unknown SASL mechanism"
+msgstr "Невідомий механізм SASL"
+
+#: src/error.c:50
+msgid "SASL mechanism called too many times"
+msgstr "Механізм SASL викликано занадто багато 
разів"
+
+#: src/error.c:52
+msgid "SASL function needs larger buffer (internal error)"
+msgstr "Функція SASL потребує більшого буфера 
(внутрішня помилка)"
+
+#: src/error.c:53
+msgid "Could not open file in SASL library"
+msgstr "Не вдалося відкрити файл у бібліотеці 
SASL"
+
+#: src/error.c:54
+msgid "Could not close file in SASL library"
+msgstr "Не вдалося закрити файл у бібліотеці 
SASL"
+
+#: src/error.c:55
+msgid "Memory allocation error in SASL library"
+msgstr "Помилка під час спроби розміщення 
бібліотекою SASL даних у пам’яті"
+
+#: src/error.c:56
+msgid "Base 64 coding error in SASL library"
+msgstr "Помилка під час кодування у форматі 
Base64 у бібліотеці SASL"
+
+#: src/error.c:57
+msgid "Low-level crypto error in SASL library"
+msgstr "Помилка низькорівневого шифрування у 
бібліотеці SASL"
+
+#: src/error.c:60
+msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_anonymous() (помилка 
програми)"
+
+#: src/error.c:63
+msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_password() (помилка програми)"
+
+#: src/error.c:66
+msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_passcode() (помилка програми)"
+
+#: src/error.c:69
+msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_pin() (помилка програми)"
+
+#: src/error.c:72
+msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_authorization_id() (помилка 
програми)"
+
+#: src/error.c:75
+msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_authentication_id() (помилка 
програми)"
+
+#: src/error.c:78
+msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_client_callback_service() (помилка програми)"
+
+#: src/error.c:81
+msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_validate() (помилка програми)"
+
+#: src/error.c:84
+msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_cram_md5() (помилка програми)"
+
+#: src/error.c:87
+msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_digest_md5() (помилка 
програми)"
+
+#: src/error.c:90
+msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_external() (помилка програми)"
+
+#: src/error.c:93
+msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_anonymous() (помилка 
програми)"
+
+#: src/error.c:96
+msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_realm() (помилка програми)"
+
+#: src/error.c:99
+msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_securid() (помилка програми)"
+
+#: src/error.c:102
+msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_service() (помилка програми)"
+
+#: src/error.c:105
+msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_gssapi() (помилка програми)"
+
+#: src/error.c:108
+msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
+msgstr "Механізмові SASL потрібен зворотний 
виклик gsasl_server_callback_retrieve() (помилка програми)"
+
+#: src/error.c:111
+msgid "Failed to perform Unicode Normalization on string."
+msgstr "Не вдалося виконати нормалізацію Unicode 
рядка."
+
+#: src/error.c:113
+msgid "Could not prepare internationalized (non-ASCII) string."
+msgstr "Не вдалося підготувати 
інтернаціоналізований (не-ASCII) рядок."
+
+#: src/error.c:115
+msgid "SASL mechanism could not parse input"
+msgstr "Механізмові SASL не вдалося розібрати вх
ідні дані"
+
+#: src/error.c:116
+msgid "Error authenticating user"
+msgstr "Помилка під час розпізнавання 
користувача"
+
+#: src/error.c:118
+msgid "Cannot get internal library handle (library error)"
+msgstr "Не вдалося отримати внутрішній 
дескриптор бібліотеки (помилка бібліотеки)"
+
+#: src/error.c:119
+msgid "Integrity error in application payload"
+msgstr "Помилка цілісності у даних програми"
+
+#: src/error.c:120
+msgid "No more realms available (non-fatal)"
+msgstr "Вичерпано перелік доступних областей 
(некритична помилка)"
+
+#: src/error.c:122
+msgid "Client-side functionality not available in library (application error)"
+msgstr "Функціональні можливості клієнта 
бібліотекою не надаються (помилка 
програми)"
+
+#: src/error.c:125
+msgid "Server-side functionality not available in library (application error)"
+msgstr "Функціональні можливості сервера 
бібліотекою не надаються (помилка 
програми)"
+
+#: src/error.c:128
+msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
+msgstr "Бібліотеці GSSAPI не вдалося звільнити 
пам’ять у gss_release_buffer() у бібліотеці SASL. Це 
серйозна внутрішня помилка."
+
+#: src/error.c:132
+msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
+msgstr "Бібліотеці GSSAPI не вдалося розібрати 
назву вузла у функції gss_import_name() бібліотеки 
SASL. Найімовірнішою причиною є помилкова 
назва служби або вузла."
+
+#: src/error.c:136
+msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "Помилка GSSAPI у клієнтській програмі 
під час узгодження контексту захисту у 
функції gss_init_sec_context() бібліотеки SASL. 
Найімовірнішою причиною є недостатні 
реєстраційні дані або зловмисне втручання 
у роботу."
+
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "Помилка GSSAPI у серверній програмі під 
час узгодження контексту захисту у функції 
gss_accept_sec_context() бібліотеки SASL. 
Найімовірнішою причиною є недостатні 
реєстраційні дані або зловмисне втручання 
у роботу."
+
+#: src/error.c:144
+msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
+msgstr "Помилка GSSAPI під час розшифрування або 
декодування даних у функції gss_unwrap() 
бібліотеки SASL. Найімовірнішою причиною є 
пошкодження даних."
+
+#: src/error.c:147
+msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
+msgstr "Помилка GSSAPI під час спроби шифрування 
або кодування даних у функції gss_wrap() 
бібліотеки SASL."
+
+#: src/error.c:150
+msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
+msgstr "Помилка GSSAPI під час спроби отримання 
реєстраційних даних у функції gss_acquire_cred() 
бібліотеки SASL. Найімовірнішою причиною є 
нестача належного ключа Kerberos у /etc/krb5.keytab на 
сервері."
+
+#: src/error.c:154
+msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
+msgstr "Помилка GSSAPI під час спроби створення 
назви клієнта для показу у функції 
gss_display_name() бібліотеки SASL. Ймовірною 
причиною є надання клієнтською частиною 
помилкових даних."
+
+#: src/error.c:158
+msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
+msgstr "Надійшов запит від іншого екземпляра 
програми щодо перевірки цілісності або зах
исту конфіденційності за допомогою мех
анізмів GSSAPI. Можливість виконання 
декількох запитів одночасно ще не 
реалізовано."
+
+#: src/error.c:161
+msgid "Kerberos V5 initialization failure."
+msgstr "Помилка під час спроби ініціалізації 
Kerberos V5."
+
+#: src/error.c:163
+msgid "Kerberos V5 internal error."
+msgstr "Внутрішня помилка Kerberos V5."
+
+#: src/error.c:165
+msgid "SecurID needs additional passcode."
+msgstr "SecurID потрібен додатковий код пароля."
+
+#: src/error.c:167
+msgid "SecurID needs new pin."
+msgstr "SecurID потрібен новий ідентифікаційний 
код (PIN)."
+
+#: src/error.c:169
+msgid "The provided library handle was invalid (application error)"
+msgstr "Наданий дескриптор бібліотеки 
виявився некоректним (помилка програми)"
+
+#: src/error.c:171
+msgid "No callback specified by caller (application error)."
+msgstr "Функцією виклику не вказано зворотної 
адреси (помилка програми)."
+
+#: src/error.c:173
+msgid "Authentication failed because the anonymous token was not provided."
+msgstr "Помилка розпізнавання через 
ненадання анонімної лексеми."
+
+#: src/error.c:176
+msgid "Authentication failed because the authentication identity was not 
provided."
+msgstr "Помилка розпізнавання через 
ненадання назви профілю розпізнавання."
+
+#: src/error.c:179
+msgid "Authentication failed because the authorization identity was not 
provided."
+msgstr "Помилка розпізнавання через 
ненадання назви профілю уповноваження."
+
+#: src/error.c:182
+msgid "Authentication failed because the password was not provided."
+msgstr "Помилка розпізнавання через 
ненадання пароля."
+
+#: src/error.c:184
+msgid "Authentication failed because the passcode was not provided."
+msgstr "Помилка розпізнавання через 
ненадання коду пароля."
+
+#: src/error.c:186
+msgid "Authentication failed because the pin code was not provided."
+msgstr "Помилка розпізнавання через 
ненадання особистого ідентифікаційного 
коду (PIN)."
+
+#: src/error.c:188
+msgid "Authentication failed because the service name was not provided."
+msgstr "Помилка розпізнавання через 
ненадання назви сервера."
+
+#: src/error.c:190
+msgid "Authentication failed because the host name was not provided."
+msgstr "Помилка розпізнавання через 
ненадання назви вузла."
+
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "Помилка GSSAPI під час капсуляції 
лексеми."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "Помилка GSSAPI під час декапсуляції 
лексеми."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "Помилка GSSAPI під час отримання OID для 
назви механізму SASL."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "Помилка тестування GSSAPI під час роботи 
з OID у наборі OID."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "Помилка GSSAPI під час звільнення набору 
OID."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Помилка розпізнавання через 
ненадання унікальної для TLS прив’язки до 
каналу."
+
+#: src/error.c:224
+msgid "Libgsasl unknown error"
+msgstr "Невідома помилка libgsasl"
diff --git a/lib/po/zh_CN.po.in b/lib/po/zh_CN.po.in
index 5f4ce51..5392f06 100644
--- a/lib/po/zh_CN.po.in
+++ b/lib/po/zh_CN.po.in
@@ -1,256 +1,287 @@
 # Chinese Simplified translation about libgsasl.
 # Copyright (C) 2010 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
-# Ji ZhengYu <address@hidden>, 2008, 2009, 2010.
+# Ji ZhengYu <address@hidden>, 2008, 2009, 2010, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl 1.4.1\n"
+"Project-Id-Version: libgsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-02-26 09:02+0800\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2011-05-12 15:24+0800\n"
 "Last-Translator: Ji ZhengYu <address@hidden>\n"
 "Language-Team: Chinese (simplified) <address@hidden>\n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Libgsasl 成功"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
 msgstr "SASL 机制需要更多数据"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "未知的 SASL 机制"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "调用 SASL 机制次数太多"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "SASL 功能需要更大的缓冲区(内部错误)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "SASL 库无法打开文件"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "SASL 库无法关闭文件"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "SASL 库中出现内存分配错误"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "SASL 库中出现 Base 64 编码错误"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "SASL 库中出现低级加密错误"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_anonymous() 
函数回调(程序错误)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_password() 
函数回调(程序错误)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_passcode() 
函数回调(程序错误)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "SASL 机制需要 gsasl_client_callback_pin() 
函数回调(程序错误)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_authorization_id() 
函数回调(程序错误)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_authentication_id() 
函数回调(程序错误)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_client_callback_service() 
函数回调(程序错误)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_validate() 
函数回调(程序错误)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_cram_md5() 
函数回调(程序错误)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_digest_md5() 
函数回调(程序错误)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_external() 
函数回调(程序错误)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_anonymous() 
函数回调(程序错误)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_realm() 
函数回调(程序错误)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_securid() 
函数回调(程序错误)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_service() 
函数回调(程序错误)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_gssapi() 
函数回调(程序错误)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "SASL 机制需要 gsasl_server_callback_retrieve() 
函数回调(程序错误)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "无法对字符串进行 Unicode 标准化操作。"
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "无法生成国际化的(非 ACSII 码的)字符串。"
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "SASL 机制无法解析输入"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "验证用户时发生错误"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "无法获取内存库处理函数(库错误)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "程序中出现完整性错误"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "不可获得更多的领域(非严重错误)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "客户端功能在库中不可用(程序错误)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "服务器端功能在库中不可用(程序错误)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "GSSAPI 库无法回收 SASL 库中 gss_release_buffer() 函数所占
的内存。这是个严重的内部错误。"
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "GSSAPI 库无法解析 SASL 库中 gss_import_name() 
函数中的端点名称。这极有可能是由不正确的服务或主机名é€
 æˆçš„。"
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
 msgstr "当与 SASL 库中 gss_init_sec_context() 函数中的文本进行安å…
¨åå•†æ—¶å®¢æˆ·ç«¯å‘生了GSSAPI 
错误。这极有可能是由不受信任的证书或恶意会话造成的。"
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "当与 SASL 库中 gss_init_sec_context() 函数中的文本进行安å…
¨åå•†æ—¶æœåŠ¡å™¨ç«¯å‘生了GSSAPI 
错误。这极有可能是由不受信任的证书或恶意会话造成的。"
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "当与 SASL 库中 gss_accept_sec_context() 
函数中的文本进行安全协商时服务器端发生了GSSAPI 
错误。这极有可能是由不受信任的证书或恶意会话造成的。"
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "当解密或解码 SASL 库中 gss_unwrap() 
函数中的数据时发生了 GSSAPI 
错误。这极有可能是由数据损坏造成的。"
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "当加密或编码 SASL 库中 gss_wrap() 
函数中的数据时发生了 GSSAPI 错误。"
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "进行 SASL 库中 gss_acquire_cred() 
函数中的请求证书操作时发生了 GSSAPI 
错误。这极有可能是由于在服务器的 /etc/krb5.keytab 
中没有合适的 Kerberos 密钥可用造成的。"
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "进行 SASL 库中 gss_display_name() 
函数中的创建表示客户端的显示名时发生了GSSAPI 
错误。这可能是因为客户端提供了错误的数据。"
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "其它信息要求在 GSSAP 
中提供完整性或私密性保护机制,但目前未实现。"
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Kerberos V5 初始化失败。"
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "Kerberos V5 内部错误。"
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID 需要附加密码。"
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID 需要新的 pin 值。"
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "提供的库操作函数无效(程序错误)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "调用函数未指定回调机制(程序错误)。"
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "验证失败,因为未提供匿名标记。"
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "验证失败,因为未提供身份验证。"
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "验证失败,因为未提供身份授权。"
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "验证失败,因为未提供密码。"
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "验证失败,因为未提供 passcode。"
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "验证失败,因为未提供 pin code。"
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "验证失败,因为未提供服务名称。"
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "验证失败,因为未提供主机名。"
 
-#: src/error.c:209
+#: src/error.c:192
+#, fuzzy
+msgid "GSSAPI error encapsulating token."
+msgstr "GSSAPI 错误,封包标识。"
+
+#: src/error.c:194
+#, fuzzy
+msgid "GSSAPI error decapsulating token."
+msgstr "GSSAPI 错误,解包标识。"
+
+#: src/error.c:196
+#, fuzzy
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "GSSAPI 错误,获取 SASL 机制的 OID(对象标识)。"
+
+#: src/error.c:198
+#, fuzzy
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "GSSAPI 错误,测试 OID位的 OID(对象标识)。"
+
+#: src/error.c:200
+#, fuzzy
+msgid "GSSAPI error releasing OID set."
+msgstr "GSSAPI 错误,清除 OID位。"
+
+#: src/error.c:202
+#, fuzzy
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "验证失败,因为未提供民用唯一 tls。"
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Libgsasl 未知错误"
diff --git a/maint.mk b/maint.mk
index 8727b3f..e6e03a8 100644
--- a/maint.mk
+++ b/maint.mk
@@ -405,11 +405,11 @@ sc_prohibit_HAVE_MBRTOWC:
          $(_sc_search_regexp)
 
 # To use this "command" macro, you must first define two shell variables:
-# h: the header, enclosed in <> or ""
+# h: the header name, with no enclosing <> or ""
 # re: a regular expression that matches IFF something provided by $h is used.
 define _sc_header_without_use
   dummy=; : so we do not need a semicolon before each use;             \
-  h_esc=`echo "$$h"|sed 's/\./\\\\./g'`;                               \
+  h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`;                   \
   if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then             \
     files=$$(grep -l '^# *include '"$$h_esc"                           \
             $$($(VC_LIST_EXCEPT) | grep '\.c$$')) &&                   \
@@ -422,42 +422,42 @@ endef
 
 # Prohibit the inclusion of assert.h without an actual use of assert.
 sc_prohibit_assert_without_use:
-       @h='<assert.h>' re='\<assert *\(' $(_sc_header_without_use)
+       @h='assert.h' re='\<assert *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of close-stream.h without an actual use.
 sc_prohibit_close_stream_without_use:
-       @h='"close-stream.h"' re='\<close_stream *\(' $(_sc_header_without_use)
+       @h='close-stream.h' re='\<close_stream *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of getopt.h without an actual use.
 sc_prohibit_getopt_without_use:
-       @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
+       @h='getopt.h' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
 
 # Don't include quotearg.h unless you use one of its functions.
 sc_prohibit_quotearg_without_use:
-       @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
+       @h='quotearg.h' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
 
 # Don't include quote.h unless you use one of its functions.
 sc_prohibit_quote_without_use:
-       @h='"quote.h"' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+       @h='quote.h' re='\<quote(_n)? *\(' $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_long_options_without_use:
-       @h='"long-options.h"' re='\<parse_long_options *\(' \
+       @h='long-options.h' re='\<parse_long_options *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_inttostr_without_use:
-       @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
+       @h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_ignore_value_without_use:
-       @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
+       @h='ignore-value.h' re='\<ignore_(value|ptr) *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_error_without_use:
-       @h='"error.h"' \
+       @h='error.h' \
        re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? 
*\('\
          $(_sc_header_without_use)
 
@@ -480,7 +480,7 @@ sc_prohibit_error_without_use:
 _xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
 _xa2 = X([CZ]|N?M)ALLOC
 sc_prohibit_xalloc_without_use:
-       @h='"xalloc.h"' \
+       @h='xalloc.h' \
        re='\<($(_xa1)|$(_xa2)) *\('\
          $(_sc_header_without_use)
 
@@ -491,36 +491,46 @@ 
clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
 _hash_fn = \<($(_hash_re)) *\(
 _hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
 sc_prohibit_hash_without_use:
-       @h='"hash.h"' \
+       @h='hash.h' \
        re='$(_hash_fn)|$(_hash_struct)'\
          $(_sc_header_without_use)
 
+sc_prohibit_cloexec_without_use:
+       @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \
+         $(_sc_header_without_use)
+
+sc_prohibit_posixver_without_use:
+       @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use)
+
+sc_prohibit_same_without_use:
+       @h='same.h' re='\<same_name *\(' $(_sc_header_without_use)
+
 sc_prohibit_hash_pjw_without_use:
-       @h='"hash-pjw.h"' \
+       @h='hash-pjw.h' \
        re='\<hash_pjw *\(' \
          $(_sc_header_without_use)
 
 sc_prohibit_safe_read_without_use:
-       @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+       @h='safe-read.h' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_argmatch_without_use:
-       @h='"argmatch.h"' \
+       @h='argmatch.h' \
        
re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid)
 *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_canonicalize_without_use:
-       @h='"canonicalize.h"' \
+       @h='canonicalize.h' \
        
re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
          $(_sc_header_without_use)
 
 sc_prohibit_root_dev_ino_without_use:
-       @h='"root-dev-ino.h"' \
+       @h='root-dev-ino.h' \
        re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_openat_without_use:
-       @h='"openat.h"' \
+       @h='openat.h' \
        
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>'
 \
          $(_sc_header_without_use)
 
@@ -528,7 +538,7 @@ sc_prohibit_openat_without_use:
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
 |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
 sc_prohibit_c_ctype_without_use:
-       @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' \
+       @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
          $(_sc_header_without_use)
 
 _empty =
@@ -564,37 +574,57 @@ _sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) 
$(_sig_types_and_consts)))
 
 # Prohibit the inclusion of signal.h without an actual use.
 sc_prohibit_signal_without_use:
-       @h='<signal.h>'                                                 \
+       @h='signal.h'                                                   \
        re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>'          \
          $(_sc_header_without_use)
 
+# Don't include stdio--.h unless you use one of its functions.
+sc_prohibit_stdio--_without_use:
+       @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\('              \
+         $(_sc_header_without_use)
+
+# Don't include stdio-safer.h unless you use one of its functions.
+sc_prohibit_stdio-safer_without_use:
+       @h='stdio-safer.h' re='\<((f(re)?|p)open|tmpfile)_safer *\('    \
+         $(_sc_header_without_use)
+
 # Prohibit the inclusion of strings.h without a sensible use.
 # Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
 sc_prohibit_strings_without_use:
-       @h='<strings.h>'                                                \
+       @h='strings.h'                                                  \
        re='\<(strn?casecmp|ffs(ll)?)\>'                                \
          $(_sc_header_without_use)
 
 # Get the list of symbol names with this:
-# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
+# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt
 _intprops_names =                                                      \
   TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT            \
   TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM          \
-  INT_STRLEN_BOUND INT_BUFSIZE_BOUND
+  INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND             \
+  INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW                   \
+  INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW                        
\
+  INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW               \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \
+  INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW                
\
+  INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW
 _intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
 # Prohibit the inclusion of intprops.h without an actual use.
 sc_prohibit_intprops_without_use:
-       @h='"intprops.h"'                                               \
+       @h='intprops.h'                                                 \
        re='\<($(_intprops_syms_re)) *\('                               \
          $(_sc_header_without_use)
 
 _stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
 # Prohibit the inclusion of stddef.h without an actual use.
 sc_prohibit_stddef_without_use:
-       @h='<stddef.h>'                                                 \
+       @h='stddef.h'                                                   \
        re='\<($(_stddef_syms_re)) *\('                                 \
          $(_sc_header_without_use)
 
+# Don't include xfreopen.h unless you use one of its functions.
+sc_prohibit_xfreopen_without_use:
+       @h='xfreopen.h' re='\<xfreopen *\(' $(_sc_header_without_use)
+
 sc_obsolete_symbols:
        @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>'                     \
        halt='do not use HAVE''_FCNTL_H or O'_NDELAY                    \
@@ -646,12 +676,6 @@ sc_require_test_exit_idiom:
              exit 1; } || :;                                           \
        fi
 
-sc_the_the:
-       @prohibit='\<the ''the\>'                                       \
-       ignore_case=1                                                   \
-       halt='found use of "the ''the";'                                \
-         $(_sc_search_regexp)
-
 sc_trailing_blank:
        @prohibit='[     ]$$'                                           \
        halt='found trailing blank(s)'                                  \
@@ -666,11 +690,16 @@ sc_two_space_separator_in_usage:
        halt='help2man requires at least two spaces between an option and its 
description'\
          $(_sc_search_regexp)
 
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
 # Look for diagnostics that aren't marked for translation.
 # This won't find any for which error's format string is on a separate line.
 sc_unmarked_diagnostics:
        @grep -nE                                                       \
-           '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT))      \
+           '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+               $$($(VC_LIST_EXCEPT))                                   \
          | grep -Ev '(_|ngettext ?)\(' &&                              \
          { echo '$(ME): found unmarked diagnostic(s)' 1>&2;            \
            exit 1; } || :
@@ -840,16 +869,21 @@ sc_prohibit_S_IS_definition:
        halt='do not define S_IS* macros; include <sys/stat.h>'         \
          $(_sc_search_regexp)
 
-prohibit_doubled_word_RE_ ?= \
-  /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
-prohibit_doubled_word_ =                                               \
-    -e 'while ($(prohibit_doubled_word_RE_))'                          \
+# Perl block to convert a match to FILE_NAME:LINENO:TEST,
+# that is shared by two definitions below.
+perl_filename_lineno_text_ =                                           \
     -e '  {'                                                           \
     -e '    $$n = ($$` =~ tr/\n/\n/ + 1);'                             \
     -e '    ($$v = $$&) =~ s/\n/\\n/g;'                                        
\
     -e '    print "$$ARGV:$$n:$$v\n";'                                 \
     -e '  }'
 
+prohibit_doubled_word_RE_ ?= \
+  /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
+prohibit_doubled_word_ =                                               \
+    -e 'while ($(prohibit_doubled_word_RE_))'                          \
+    $(perl_filename_lineno_text_)
+
 # Define this to a regular expression that matches
 # any filename:dd:match lines you want to ignore.
 # The default is to ignore no matches.
@@ -860,10 +894,24 @@ sc_prohibit_doubled_word:
          | grep -vE '$(ignore_doubled_word_match_RE_)'                 \
          | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
 
-sc_prohibit_can_not:
-       @prohibit='\<can[ ]not\>'                                       \
-       halt='use "cannot", not "can'' not"'                            \
-         $(_sc_search_regexp)
+# A regular expression matching undesirable combinations of words like
+# "can not"; this matches them even when the two words appear on different
+# lines, but not when there is an intervening delimiter like "#" or "*".
+prohibit_undesirable_word_seq_RE_ ?=                                   \
+  /\bcan\s+not\b/gims
+prohibit_undesirable_word_seq_ =                                       \
+    -e 'while ($(prohibit_undesirable_word_seq_RE_))'                  \
+    $(perl_filename_lineno_text_)
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_undesirable_word_sequence_RE_ ?= ^$$
+
+sc_prohibit_undesirable_word_seq:
+       @perl -n -0777 $(prohibit_undesirable_word_seq_)                \
+            $$($(VC_LIST_EXCEPT))                                      \
+         | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
+         && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
 
 _ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
 _ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
@@ -987,12 +1035,13 @@ apply the above patch\n'
 
 # Verify that all source files using _() are listed in po/POTFILES.in.
 po_file ?= $(srcdir)/po/POTFILES.in
+generated_files ?= $(srcdir)/lib/*.[ch]
 sc_po_check:
        @if test -f $(po_file); then                                    \
          grep -E -v '^(#|$$)' $(po_file)                               \
            | grep -v '^src/false\.c$$' | sort > address@hidden;                
        \
          files=;                                                       \
-         for file in $$($(VC_LIST_EXCEPT)) $(srcdir)/lib/*.[ch]; do    \
+         for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do      \
            test -r $$file || continue;                                 \
            case $$file in                                              \
              *.m4|*.mk) continue ;;                                    \
@@ -1063,6 +1112,7 @@ sc_copyright_check:
 # the other init.sh-using tests also get it right.
 _hv_file ?= $(srcdir)/tests/help-version
 _hv_regex_weak ?= ^ *\. .*/init\.sh"
+# Fix syntax-highlighters "
 _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
 sc_cross_check_PATH_usage_in_tests:
        @if test -f $(_hv_file); then                                   \
@@ -1090,6 +1140,14 @@ sc_Wundef_boolean:
        halt='Use 0 or 1 for macro values'                              \
          $(_sc_search_regexp)
 
+# Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might
+# not be constant, or might overflow a stack.  In general, use PATH_MAX as
+# a limit, not an array or alloca size.
+sc_prohibit_path_max_allocation:
+       @prohibit='(\balloca *\([^)]*|\[[^]]*)PATH_MAX'                 \
+       halt='Avoid stack allocations of size PATH_MAX'                 \
+         $(_sc_search_regexp)
+
 sc_vulnerable_makefile_CVE-2009-4029:
        @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
        in_files=$$(find $(srcdir) -name Makefile.in)                   \
@@ -1123,11 +1181,20 @@ gpg_key_ID ?= \
          | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
 
 translation_project_ ?= address@hidden
-announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-announcement_mail_headers_ ?=                                          \
-To: address@hidden                                                     \
-Cc: $(announcement_Cc_)                                                        
\
-Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+# Make info-gnu the default only for a stable release.
+ifeq ($(RELEASE_TYPE),stable)
+  announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
+  announcement_mail_headers_ ?=                                                
\
+    To: address@hidden                                         \
+    Cc: $(announcement_Cc_)                                            \
+    Mail-Followup-To: $(PACKAGE_BUGREPORT)
+else
+  announcement_Cc_ ?= $(translation_project_)
+  announcement_mail_headers_ ?=                                                
\
+    To: $(PACKAGE_BUGREPORT)                                           \
+    Cc: $(announcement_Cc_)
+endif
 
 announcement: NEWS ChangeLog $(rel-files)
        @$(build_aux)/announce-gen                                      \
@@ -1228,7 +1295,7 @@ gl_noteworthy_news_ = * Noteworthy changes in release ?.? 
(????-??-??) [?]
 release-prep:
        case $$RELEASE_TYPE in alpha|beta|stable) ;; \
          *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
-       $(MAKE) -s announcement > ~/announce-$(my_distdir)
+       $(MAKE) --no-print-directory -s announcement > ~/announce-$(my_distdir)
        if test -d $(release_archive_dir); then                 \
          ln $(rel-files) $(release_archive_dir);               \
          chmod a-w $(rel-files);                               \
@@ -1315,3 +1382,101 @@ update-copyright:
        grep -l -w Copyright                                             \
          $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
          | $(update-copyright-env) xargs $(build_aux)/$@
+
+# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not
+# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS.
+
+# NOTE: to override any _gl_TS_* default value, you must
+# define the variable(s) using "export" in cfg.mk.
+_gl_TS_dir ?= src
+
+ALL_RECURSIVE_TARGETS += sc_tight_scope
+sc_tight_scope: tight-scope.mk
+       @if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk       \
+               > /dev/null                                             \
+          && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
+               > /dev/null 2>&1; then                                  \
+           echo '$(ME): skipping $@';                                  \
+       else                                                            \
+           $(MAKE) -s -C $(_gl_TS_dir)                                 \
+               -f Makefile                                             \
+               -f $(abs_top_srcdir)/cfg.mk                             \
+               -f $(abs_top_builddir)/$<                               \
+             _gl_tight_scope                                           \
+               || fail=1;                                              \
+       fi
+       @rm -f $<
+
+tight-scope.mk: $(ME)
+       @rm -f $@ address@hidden
+       @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(ME) > address@hidden
+       @chmod a=r address@hidden && mv address@hidden $@
+
+ifeq (a,b)
+# TS-start
+
+# Most functions should have static scope.
+# Any that don't must be marked with `extern', but `main'
+# and `usage' are exceptions: they're always extern, but
+# do not need to be marked.  Symbols matching `__.*' are
+# reserved by the compiler, so are automatically excluded below.
+_gl_TS_unmarked_extern_functions ?= main usage
+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) +\(/
+
+# If your project uses a macro like "XTERN", then put
+# the following in cfg.mk to override this default:
+# export _gl_TS_extern = extern|XTERN
+_gl_TS_extern ?= extern
+
+# The second nm|grep checks for file-scope variables with `extern' scope.
+# Without gnulib's progname module, you might put program_name here.
+# Symbols matching `__.*' are reserved by the compiler,
+# so are automatically excluded below.
+_gl_TS_unmarked_extern_vars ?=
+
+# NOTE: the _match variables are perl expressions -- not mere regular
+# expressions -- so that you can extend them to match other patterns
+# and easily extract matched variable names.
+# For example, if your project declares some global variables via
+# a macro like this: GLOBAL(type, var_name, initializer), then you
+# can override this definition to automatically extract those names:
+# export _gl_TS_var_match = \
+#   /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/
+_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/
+
+# The names of object files in (or relative to) $(_gl_TS_dir).
+_gl_TS_obj_files ?= *.$(OBJEXT)
+
+# Files in which to search for the one-line style extern declarations.
+# $(_gl_TS_dir)-relative.
+_gl_TS_headers ?= $(noinst_HEADERS)
+
+.PHONY: _gl_tight_scope
+_gl_tight_scope: $(bin_PROGRAMS)
+       t=exceptions-$$$$;                                              \
+       trap 's=$$?; rm -f $$t; exit $$s' 0;                            \
+       for sig in 1 2 3 13 15; do                                      \
+         eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
+       done;                                                           \
+       src=`for f in $(SOURCES); do                                    \
+              test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
+       hdr=`for f in $(_gl_TS_headers); do                             \
+              test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
+       ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions);  \
+         grep -h -A1 '^extern .*[^;]$$' $$src                          \
+           | grep -vE '^(extern |--)' | sed 's/ .*//';                 \
+         perl -lne                                                     \
+            '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr;      \
+       ) | sort -u > $$t;                                              \
+       nm -e $(_gl_TS_obj_files) | sed -n 's/.* T //p'|grep -Ev -f $$t \
+         && { echo the above functions should have static scope >&2;   \
+              exit 1; } || : ;                                         \
+       ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);       \
+         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+       ) | sort -u > $$t;                                              \
+       nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'          \
+            | sort -u | grep -Ev -f $$t                                        
\
+         && { echo the above variables should have static scope >&2;   \
+              exit 1; } || :
+# TS-end
+endif
diff --git a/po/LINGUAS b/po/LINGUAS
index dc90a08..ac61613 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -15,6 +15,7 @@ sk
 sq
 sr
 sv
+uk
 vi
 zh_CN
 zh_TW
diff --git a/po/de.po.in b/po/de.po.in
index 2973458..896f219 100644
--- a/po/de.po.in
+++ b/po/de.po.in
@@ -2,242 +2,274 @@
 # Copyright (C) 2004 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
 # Roland Illig <address@hidden>, 2004.
+# Roland Illig <address@hidden>, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl 1.1\n"
+"Project-Id-Version: gsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2009-03-25 16:06+0100\n"
-"PO-Revision-Date: 2010-01-07 22:53+0100\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-03 21:47+0100\n"
 "Last-Translator: Roland Illig <address@hidden>\n"
 "Language-Team: German <address@hidden>\n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/gsasl.c:170
+#: src/imap.c:76 src/smtp.c:79
+#, c-format
+msgid "Chose SASL mechanisms:\n"
+msgstr "SASL-Mechanismen auswählen:\n"
+
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
+#, c-format
+msgid "Using mechanism:\n"
+msgstr "Benutze Mechanismus:\n"
+
+#: src/imap.c:156
+#, c-format
+msgid "error: server did not return a token\n"
+msgstr "Fehler: Server hat kein Token zurückgegeben\n"
+
+#: src/smtp.c:158
+#, c-format
+msgid ""
+"error: Server did not return expected SASL data (it must begin with '334 
'):\n"
+"%s\n"
+msgstr ""
+"Fehler: Server hat nicht die erwarteten SASL-Daten zurückgegeben (sie 
müssen mit »334 « anfangen):\n"
+"%s\n"
+
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "SASL-Mechanismus auswählen:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "SASL-Eingabemechanismen eingeben, die vom Server unterstützt 
werden:\n"
 
-#: src/gsasl.c:198
-#, c-format
-msgid "Using mechanism:\n"
-msgstr "Benutze Mechanismus:\n"
-
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Ausgabe vom Server:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Ausgabe vom Client:\n"
 
-#: src/gsasl.c:270
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
 
-#: src/gsasl.c:307
+#: src/gsasl.c:336
 #, c-format
-msgid "Cannot initialize Windows sockets."
-msgstr "Kann Windows-Sockets nicht initialisieren."
+msgid "missing argument"
+msgstr "Fehlendes Argument"
 
-#: src/gsasl.c:331
-#, c-format
-msgid ""
-"missing argument\n"
-"Try `%s --help' for more information."
-msgstr ""
-"Fehlendes Argument.\n"
-"Versuchen Sie »%s --help« für weitere Informationen."
-
-#: src/gsasl.c:337
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "Benötigt sowohl --x509-cert-file als auch --x509-key-file."
 
-#: src/gsasl.c:341
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "Kann nicht --starttls und --no-starttls gleichzeitig nutzen."
 
-#: src/gsasl.c:344
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "Kann nicht --smtp und --imap gleichzeitig nutzen."
 
-#: src/gsasl.c:409
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "Initialisierung fehlgeschlagen: %s"
 
-#: src/gsasl.c:424
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "Fehler beim Auflisten der Mechanismen: %s"
 
-#: src/gsasl.c:431
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Dieser Client unterstützt folgende Mechanismen:\n"
 
-#: src/gsasl.c:434
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Dieser Server unterstützt folgende Mechanismen:\n"
 
-#: src/gsasl.c:500
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "Globale Initialisierung von GnuTLS fehlgeschlagen: %s"
 
-#: src/gsasl.c:505
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "Initialisierung von GnuTLS fehlgeschlagen: %s"
 
-#: src/gsasl.c:510
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "Einstellen der Vorgabewerte für GnuTLS fehlgeschlagen: %s"
 
-#: src/gsasl.c:516
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "Reservieren des anonymen GnuTLS-Berechtigungsnachweises: %s"
 
-#: src/gsasl.c:521
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "Festlegen des anonymen GnuTLS-Berechtigungsnachweises: %s"
 
-#: src/gsasl.c:526
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "Reservieren des X.509-GnuTLS-Berechtigungsnachweises: %s"
 
-#: src/gsasl.c:534
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "Laden des X.509-GnuTLS-Berechtigungsnachweises: %s"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "Keine X.509-CAs gefunden: %s"
 
-#: src/gsasl.c:545
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "Keine X.509-CAs gefunden."
 
-#: src/gsasl.c:551
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "Festlegen des X.509-GnuTLS-Berechtigungsnachweises: %s"
 
-#: src/gsasl.c:562
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "Festlegen der GnuTLS-Verschlüsselungs-Priorität (%s): %s\n"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "GnuTLS-Handschlag fehlgeschlagen: %s"
 
-#: src/gsasl.c:582
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "Verifizieren des Partnerzertifikats: %s"
 
-#: src/gsasl.c:586
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "Das Serverzertifikat ist nicht vertrauenswürdig."
 
-#: src/gsasl.c:590
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "Serverzertifikat hat keinen bekannten Herausgeber."
 
-#: src/gsasl.c:593
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "Serverzertifikat wurde zurückgezogen."
 
-#: src/gsasl.c:597
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "Konnte Serverzertifikat nicht verifizieren (rc=%d)."
 
-#: src/gsasl.c:620
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "Ermitteln der Kanalbindungen fehlgeschlagen: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Kann Mechanismus nicht finden...\n"
 
-#: src/gsasl.c:637
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "Mechanismus nicht verfügbar: %s"
 
-#: src/gsasl.c:666
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Geben Sie Base64-Authentifizierungsdaten vom Client ein (ENTER für 
keine):\n"
 
-#: src/gsasl.c:669
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Geben Sie Base64-Authentifizierungsdaten vom Server ein (ENTER für 
keine):\n"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "Mechanismus-Fehler: %s"
 
-#: src/gsasl.c:688
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Server-Authentifizierung abgeschlossen (der Client vertraut)...\n"
 
-#: src/gsasl.c:691
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Client-Authentifizierung abgeschlossen (der Server vertraut)...\n"
 
-#: src/gsasl.c:714
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Geben Sie Anwendungsdaten ein (EOF zum Beenden):\n"
 
-#: src/gsasl.c:787
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Base64-codierte Anwendungsdaten zum Verschicken:\n"
 
-#: src/gsasl.c:843
+#: src/gsasl.c:859
+#, c-format
+msgid "SASL record too large: %zu\n"
+msgstr "SASL-Datensatz zu groß: %zu\n"
+
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "Codierungsfehler: %s"
 
-#: src/gsasl.c:848
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Sitzung beendet...\n"
 
-#: src/gsasl.c:864
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "Beenden der GnuTLS-Sitzung fehlgeschlagen: %s"
 
+#~ msgid "Cannot initialize Windows sockets."
+#~ msgstr "Kann Windows-Sockets nicht initialisieren."
+
+#~ msgid ""
+#~ "missing argument\n"
+#~ "Try `%s --help' for more information."
+#~ msgstr ""
+#~ "Fehlendes Argument.\n"
+#~ "Versuchen Sie »%s --help« für weitere Informationen."
+
 #~ msgid "Libgsasl error (%d): %s\n"
 #~ msgstr "Libgsasl-Fehler (%d): %s\n"
diff --git a/po/eo.po.in b/po/eo.po.in
index 76f4490..756a62c 100644
--- a/po/eo.po.in
+++ b/po/eo.po.in
@@ -5,10 +5,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl 1.4.1\n"
+"Project-Id-Version: gsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2011-03-13 11:51-0300\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-09 20:27-0300\n"
 "Last-Translator: Felipe Castro <address@hidden>\n"
 "Language-Team: Esperanto <address@hidden>\n"
 "Language: eo\n"
@@ -16,26 +16,22 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "Elektitaj mekanismoj SASL:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "Uzata mekanismo:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"eraro: Servilo ne redonis atenditan datumaron SASL (ĝi devas komenciĝi per 
'+ '):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "eraro: servilo ne liveris ĵetonon\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -44,217 +40,229 @@ msgstr ""
 "eraro: Servilo ne redonis atenditan datumaron SASL (ĝi devas komenciĝi per 
'334 '):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "Elektu mekanismon SASL:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "Enig-listo de mekanismoj SASL subtenataj de la servilo:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Eligo el servilo:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Eligo el kliento:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Provu '%s --help' por pli da informoj.\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "mankas argumento"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "necesas kaj --x509-cert-file kaj --x509-key-file"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "ne povas uzi kaj --starttls kaj --no-starttls"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "ne povas uzi kaj --smtp kaj --imap"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "ekiga malsukceso: %s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "eraro dum listigo de mekanismoj: %s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Tiu ĉi kliento subtenas la jenajn mekanismojn:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Tiu ĉi servilo subtenas la jenajn mekanismojn:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "Ĝenerala ekigo de GnuTLS malsukcesis: %s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "Ekigo de GnuTLS malsukcesis: %s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "difino de GnuTLS-defaÅ­ltoj malsukcesis: %s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "rezervo de sennoma legitimilo GnuTLS: %s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "difino de sennoma legitimilo GnuTLS: %s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "rezervo de X.509-legitimilo GnuTLS: %s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "ŝargo je X.509-legitimilo GnuTLS: %s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "neniu X.509 CA trovite: %s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "neniu X.509 CA trovite"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "difino de X.509-legitimilo GnuTLS: %s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "difino de ĉifra prioritato GnuTLS (%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "Kvitanco GnuTLS malsukcesis: %s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "kontrolado de samtavolana atestilo: %s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "servila atestilo ne estas fidinda"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "servila atestilo ne havis konatan eldonanto"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "servila atestilo estas revokata"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "ni ne povis kontroli servilan atestilon (rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "akiro de kanalo-ligado malsukcesis: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Ni ne povis trovi mekanismon...\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "mekanismo nedisponebla: %s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Enmetu aÅ­tentigan datumaron base64 el kliento (premu RET se nenio):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Enmetu aÅ­tentigan datumaron base64 el servilo (premu RET se nenio):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "mekanisma eraro: %s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Servila aÅ­tentigo finis (kliento estas fidinda)...\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Klienta aÅ­tentigo finis (servilo estas fidinda)...\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Enmetu aplikaĵan datumaron (EOF por fini):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Base64-enkodita aplikaĵ-datumaro por sendi:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "Rikordo SASL tro granda: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "enkoda eraro: %s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Seanco finiĝis...\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "ĉesigo de seanco GnuTLS malsukcesis: %s"
+
+#~ msgid ""
+#~ "error: Server did not return expected SASL data (it must begin with '+ 
'):\n"
+#~ "%s\n"
+#~ msgstr ""
+#~ "eraro: Servilo ne redonis atenditan datumaron SASL (ĝi devas komenciĝi 
per '+ '):\n"
+#~ "%s\n"
diff --git a/po/fi.po.in b/po/fi.po.in
index df21b06..faefd09 100644
--- a/po/fi.po.in
+++ b/po/fi.po.in
@@ -1,41 +1,38 @@
 # Finnish messages for gsasl.
-# Copyright © 2009, 2010 Free Software Foundation, Inc.
+# Copyright © 2009, 2010, 2011 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
-# Jorma Karvonen <address@hidden>, 2009, 2010.
+# Jorma Karvonen <address@hidden>, 2009-2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl 1.4.1\n"
+"Project-Id-Version: gsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-02-23 19:31+0200\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-04 21:28+0200\n"
 "Last-Translator: Jorma Karvonen <address@hidden>\n"
 "Language-Team: Finnish <address@hidden>\n"
+"Language: fi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "Valitse SASL-mekanismit:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "Käytetään mekanismia:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"virhe: Palvelin ei palauttanut odotettua SASL-dataa (sen on alettava 
merkillä ’+ ’):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "virhe: palvelin ei palauttanut merkkijonoa\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -44,221 +41,233 @@ msgstr ""
 "virhe: Palvelin ei palauttanut odotettua SASL-dataa (sen on alettava 
merkeillä ’334 ’):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "Valitse SASL-mekanismi:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "Palvelin tukee SASL-mekanismien syöteluetteloa:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Tuloste palvelimelta:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Tuloste asiakkaalta:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Lisätietoja käskyllä ”%s --help”.\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "puuttuva argumentti"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "tarvitsee sekä valitsimen --x509-cert-file että valitsimen 
--x509-key-file"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "ei voi käyttää sekä valitsinta --starttls että valitsinta 
--no-starttls"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "ei voi käyttää sekä valitsinta --smtp että valitsinta --imap"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "alustusvirhe: %s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "virheluettelomekanismit: %s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Tämä asiakas tukee seuraavia mekanismeja:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Tämä palvelin tukee seuraavia mekanismeja:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "GnuTLS-yleisalustus epäonnistui: %s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "GnuTLS-alustus epäonnistui: %s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "GnuTLS-oletusten asetus epäonnistui: %s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "varataan anonyymi GnuTLS-valtuutus: %s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "asetetaan anonyymi GnuTLS-valtuutus: %s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "varataan X.509 GnuTLS-valtuutus: %s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "ladataan X.509 GnuTLS-valtuutus: %s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "ei löytynyt X.509-varmennusviranomaisia: %s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "ei löytynyt X.509-varmennusviranomaisia"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "asetetaan X.509 GnuTLS-valtuutus: %s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "asetetaan GnuTLS-salausprioriteetti (%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "GnuTLS-kättely epäonnistui: %s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "todenna vertaisvarmenne: %s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "palvelinvarmenne ei ole luotettava"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "palvelinvarmenteen julkaisija ei ole tunnettu"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "palvelinvarmenne on peruttu"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "ei voitu todentaa palvelinvarmennetta (rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "kanavasitomisen hakeminen epäonnistui: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Mekanismia ei löydy...\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "mekanismi on tavoittamattomissa: %s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Kirjoita base64-varmennedataa asiakkaalta (paina RET, jos ei 
mitään):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Kirjoita base64-varmennedataa palvelimelta (paina RET, jos ei 
mitään):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "mekanismivirhe: %s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Palvelinvarmennus päättynyt (asiakas luotettu)...\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Asiakasvarmennus päättynyt (palvelin luotettu)...\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Kirjoita sovellusdataa (Päätä EOF-merkillä):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Base64-koodattua sovellusdataa lähetettävänä:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "SASL-tietue on liian suuri: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "koodausvirhe: %s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Istunto päättyi...\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "GnuTLS-istunnon päättäminen epäonnistui: %s"
 
+#~ msgid ""
+#~ "error: Server did not return expected SASL data (it must begin with '+ 
'):\n"
+#~ "%s\n"
+#~ msgstr ""
+#~ "virhe: Palvelin ei palauttanut odotettua SASL-dataa (sen on alettava 
merkillä ’+ ’):\n"
+#~ "%s\n"
+
 #~ msgid "Cannot initialize Windows sockets."
 #~ msgstr "Ei voi alustaa Windows-pistokkeita."
 
diff --git a/po/it.po.in b/po/it.po.in
index 71c9454..0dea5b2 100644
--- a/po/it.po.in
+++ b/po/it.po.in
@@ -1,40 +1,38 @@
 # Italian translation for gsasl.
 # Copyright (C) 2010 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
-# Sergio Zanchetta <address@hidden>, 2010.
+# Sergio Zanchetta <address@hidden>, 2010, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl-1.4.1\n"
+"Project-Id-Version: gsasl-1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-03-11 17:55+0100\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-04 16:49+0200\n"
 "Last-Translator: Sergio Zanchetta <address@hidden>\n"
 "Language-Team: Italian <address@hidden>\n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural= (n != 1)\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "Meccanismo SASL scelto:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "Meccanismo in uso:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"errore: il server non ha restituito i dati SASL attesi (devono iniziare con 
\"+ \"):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "errore: il server non ha restituito un token\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -43,217 +41,229 @@ msgstr ""
 "errore: il server non ha restituito i dati SASL attesi (devono iniziare con 
\"334 \"):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "Selezionare meccanismo SASL:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "Inserire l'elenco dei meccanismi SASL supportati dal server:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Output dal server:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Output dal client:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Usare \"%s --help\" per maggiori informazioni.\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "argomento mancante"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "necessari sia --x509-cert-file che --x509-key-file"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "impossibile usare sia --starttls che --no-starttls"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "impossibile usare sia --smtp che --imap"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "inizializzazione non riuscita: %s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "errore nell'elencare i meccanismi: %s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Questo client supporta i seguenti meccanismi:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Questo server supporta i seguenti meccanismi:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "inizializzazione globale di GnuTLS non riuscita: %s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "inizializzazione di GnuTLS non riuscita: %s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "impostazione dei predefiniti GnuTLS non riuscita: %s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "allocazione delle credenziali anonime di GnuTLS: %s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "impostazione delle credenziali anonime di GnuTLS: %s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "allocazione della credenziale X.509 di GnuTLS: %s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "caricamento della credenziale X.509 di GnuTLS: %s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "nessun CA X.509 trovato: %s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "nessun CA X.509 trovato"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "impostazione della credenziale X.509 di GnuTLS: %s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "impostazione priorità del cifrario di GnuTLS (%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "handshake di GnuTLS non riuscito: %s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "verifica certificato del peer: %s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "il certificato del server non è fidato"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "il certificato del server non ha un emittente conosciuto"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "il certificato del server è stato revocato"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "impossibile verificare il certificato del server (rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "recupero dell'associazione di canale non riuscito: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Impossibile trovare il meccanismo...\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "meccanismo non disponibile: %s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Inserire i dati di autenticazione in base64 dal client (premere INVIO 
se non presenti):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Inserire dati di autenticazione in base64 dal server (premere INVIO se 
non presenti):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "errore del meccanismo: %s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Autenticazione del server terminata (client fidato)...\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Autenticazione del client terminata (server fidato)...\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Inserire dati applicazione (EOF per terminare):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Dati applicazione codificati in base64 da inviare:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "Record SASL troppo grande: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "errore di codifica: %s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Sessione terminata...\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "arresto della sessione GnuTLS non riuscito: %s"
+
+#~ msgid ""
+#~ "error: Server did not return expected SASL data (it must begin with '+ 
'):\n"
+#~ "%s\n"
+#~ msgstr ""
+#~ "errore: il server non ha restituito i dati SASL attesi (devono iniziare 
con \"+ \"):\n"
+#~ "%s\n"
diff --git a/po/nl.po.in b/po/nl.po.in
index 4ffbbcb..918c4d3 100644
--- a/po/nl.po.in
+++ b/po/nl.po.in
@@ -1,44 +1,41 @@
-# Dutch translations for gsasl.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Dutch translations for GNU gsasl.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
 #
 # Taco Witte <address@hidden>, 2004, 2005, 2006.
 # Erwin Poeze <address@hidden>, 2009, 2010.
-# Benno Schulenberg <address@hidden>, 2008, 2010.
+# Benno Schulenberg <address@hidden>, 2008, 2010, 2011.
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl-1.4.1\n"
+"Project-Id-Version: gsasl-1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-05-02 15:01+0200\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-04 21:02+0200\n"
 "Last-Translator: Benno Schulenberg <address@hidden>\n"
 "Language-Team: Dutch <address@hidden>\n"
+"Language: nl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Lokalize 1.0\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "Gekozen SASL-methoden:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "Gebruikte methode:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"fout: server levert niet de verwachte SASL-gegevens (moet beginnen met '+ 
'):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "fout: server heeft geen token teruggegeven\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -47,222 +44,234 @@ msgstr ""
 "fout: server levert niet de verwachte SASL-gegevens (moet beginnen met '334 
'):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "Kies de SASL-methode:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "Invoerlijst van SASL-methoden ondersteund door server:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Serveruitvoer:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Cliëntuitvoer:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Typ '%s --help' voor meer informatie.\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "ontbrekend argument"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "opties '--x509-cert-file' en '--x509-key-file' zijn beide nodig"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "opties '--starttls' en '--no-starttls' gaan niet samen"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "opties '--smtp' en '--imap' gaan niet samen"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "initialisatiefout: %s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "fout bij opsommen van methoden: %s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Deze cliënt ondersteunt de volgende methoden:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Deze server ondersteunt de volgende methoden:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "algemene GnuTLS-initialisatie is mislukt: %s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "GnuTLS-initialisatie is mislukt: %s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "instellen van GnuTLS-standaardwaarden is mislukt: %s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "reserveren van anonieme GnuTLS-vertrouwensgegevens: %s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "instellen van anonieme GnuTLS-vertrouwensgegevens: %s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "reserveren van X.509 GnuTLS-vertrouwensgegevens: %s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "laden van X.509 GnuTLS-vertrouwensgegevens: %s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "geen X.509 certificaatautoriteiten gevonden: %s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "geen X.509 certificaatautoriteiten gevonden"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "instellen van X.509 GnuTLS-vertrouwensgegevens: %s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "instellen van GnuTLS-sleuteluitwisselingsprioriteit (%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "GnuTLS-handshake is mislukt: %s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "verifiëren van certificaat van andere computer: %s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "servercertificaat wordt niet vertrouwd"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "servercertificaat heeft geen bekende uitgever"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "servercertificaat is ingetrokken"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "kan servercertificaat niet verifiëren (rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "verkrijgen van kanaalbinding is mislukt: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Kan methode niet vinden...\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "methode is onbeschikbaar: %s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Geef base64-authenticatiegegevens van de cliënt (druk op Enter als 
geen):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Geef base64-authenticatiegegevens van de server (druk op Enter als 
geen):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "methodefout: %s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Serverauthenticatie is voltooid (cliënt wordt vertrouwd).\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Cliëntauthenticatie is voltooid (server wordt vertrouwd).\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Voer toepassingsgegevens in (geef EOF om af te sluiten):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Te verzenden base64-gecodeerde toepassingsgegevens:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "SASL-record is te lang: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "coderingsfout: %s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Sessie is voltooid.\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "beëindigen van GnuTLS-sessie is mislukt: %s"
 
 #~ msgid ""
+#~ "error: Server did not return expected SASL data (it must begin with '+ 
'):\n"
+#~ "%s\n"
+#~ msgstr ""
+#~ "fout: server levert niet de verwachte SASL-gegevens (moet beginnen met '+ 
'):\n"
+#~ "%s\n"
+
+#~ msgid ""
 #~ "\n"
 #~ "Report bugs to <%s>.\n"
 #~ msgstr ""
diff --git a/po/pl.po.in b/po/pl.po.in
index 2c75026..e6fc31f 100644
--- a/po/pl.po.in
+++ b/po/pl.po.in
@@ -1,40 +1,37 @@
 # Polish translation for gsasl.
-# Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Free Software Foundation, 
Inc.
+# Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Free Software 
Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
-# Jakub Bogusz <address@hidden>, 2004-2010.
+# Jakub Bogusz <address@hidden>, 2004-2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl 1.4.1\n"
+"Project-Id-Version: gsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-02-26 18:26+0100\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-03 22:01+0200\n"
 "Last-Translator: Jakub Bogusz <address@hidden>\n"
 "Language-Team: Polish <address@hidden>\n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "Wybór mechanizmów SASL:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "U¿ycie mechanizmu:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"B³±d: serwer nie zwróci³ oczekiwanych danych SASL (musz± zaczynaæ siê od '+ 
'):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "b³±d: serwer nie zwróci³ tokenu\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -43,217 +40,222 @@ msgstr ""
 "B³±d: serwer nie zwróci³ oczekiwanych danych SASL (musz± zaczynaæ siê od '334 
'):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "Wybór mechanizmów SASL:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "Wej¶ciowa lista mechanizmów SASL obs³ugiwanych przez serwer:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "Wyj¶cie serwera:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "Wyj¶cie klienta:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "Polecenie `%s --help' pozwoli uzyskaæ wiêcej informacji.\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "brak argumentu"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "wymagane jest zarówno --x509-cert-file jak i --x509-key-file"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "nie mo¿na u¿yæ --starttls i --nostarttls jednocze¶nie"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "nie mo¿na u¿yæ --smtp i --imap jednocze¶nie"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "b³±d inicjalizacji: %s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "b³±d wypisywania mechanizmów: %s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "Mechanizmy obs³ugiwane przez tego klienta:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "Mechanizmy obs³ugiwane przez ten serwer:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "Globalna inicjalizacja GnuTLS nie powiod³a siê: %s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "Inicjalizacja GnuTLS nie powiod³a siê: %s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "ustawienie warto¶ci domy¶lnych GnuTLS nie powiod³o siê: %s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "przydzielanie anonimowych danych uwierzytelniaj±cych GnuTLS: %s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "ustawianie anonimowych danych uwierzytelniaj±cych GnuTLS: %s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "przydzielanie danych uwierzytelniaj±cych X.509 GnuTLS: %s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "wczytywanie danych uwierzytelniaj±cych X.509 GnuTLS: %s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "nie znaleziono CA X.509: %s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "nie znaleziono CA X.509"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "ustawianie danych uwierzytelniaj±cych X.509 GnuTLS: %s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "ustawianie priorytetu szyfrów GnuTLS (%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "powitanie GnuTLS nie powiod³o siê: %s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "sprawdzanie certyfikatu drugiej strony: %s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "certyfikat serwera nie jest zaufany"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "certyfikat serwera nie ma znanego wystawcy"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "certyfikat serwera zosta³ anulowany"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "nie mo¿na zweryfikowaæ certyfikatu serwera (rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "pobranie przypisania kana³u nie powiod³o siê: %s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "Nie znaleziono mechanizmu...\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "mechanizm niedostêpny: %s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "Dana uwierzytelniaj±ce base64 od klienta (RET je¶li ¿adne):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "Dane uwierzytelniaj±ce base64 od serwera (RET je¶li ¿adne):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "b³±d mechanizmu: %s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "Uwierzytelnienie serwera zakoñczone (klient zaufa³)...\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "Uwierzytelnienie klienta zakoñczone (serwer zaufa³)...\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "Dane aplikacji (EOF aby zakoñczyæ):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "Zakodowane base64 dane aplikacji do wys³ania:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "Rekord SASL zbyt du¿y: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "b³±d kodowania: %s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "Sesja zakoñczona...\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "zakoñczenie sesji GnuTLS nie powiod³o siê: %s"
diff --git a/po/uk.po.in b/po/uk.po.in
new file mode 100644
index 0000000..92d92ce
--- /dev/null
+++ b/po/uk.po.in
@@ -0,0 +1,264 @@
+# Translation of gsasl to Ukrainian
+#
+# Copyright (C) 2011 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gsasl package.
+#
+# Yuri Chornoivan <address@hidden>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: gsasl 1.6.1\n"
+"Report-Msgid-Bugs-To: address@hidden"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-04 16:06+0300\n"
+"Last-Translator: Yuri Chornoivan <address@hidden>\n"
+"Language-Team: Ukrainian <address@hidden>\n"
+"Language: uk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: src/imap.c:76 src/smtp.c:79
+#, c-format
+msgid "Chose SASL mechanisms:\n"
+msgstr "Виберіть механізми SASL:\n"
+
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
+#, c-format
+msgid "Using mechanism:\n"
+msgstr "Використаний механізм:\n"
+
+#: src/imap.c:156
+#, c-format
+msgid "error: server did not return a token\n"
+msgstr "помилка: сервером не повернуто 
лексему\n"
+
+#: src/smtp.c:158
+#, c-format
+msgid ""
+"error: Server did not return expected SASL data (it must begin with '334 
'):\n"
+"%s\n"
+msgstr ""
+"помилка: сервером не повернуто очікувані 
дані SASL (відповідь мала починатися з «334 »):\n"
+"%s\n"
+
+#: src/gsasl.c:178
+#, c-format
+msgid "Choose SASL mechanism:\n"
+msgstr "Виберіть механізм SASL:\n"
+
+#: src/gsasl.c:187
+#, c-format
+msgid "Input list of SASL mechanisms supported by server:\n"
+msgstr "Вкажіть список механізмів SASL, які 
підтримуються сервером:\n"
+
+#: src/gsasl.c:223
+#, c-format
+msgid "Output from server:\n"
+msgstr "Дані, виведені сервером:\n"
+
+#: src/gsasl.c:225
+#, c-format
+msgid "Output from client:\n"
+msgstr "Дані, виведені клієнтом:\n"
+
+#: src/gsasl.c:281
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Щоб дізнатися більше, віддайте 
команду «%s --help».\n"
+
+#: src/gsasl.c:336
+#, c-format
+msgid "missing argument"
+msgstr "не вистачає аргументу"
+
+#: src/gsasl.c:343
+#, c-format
+msgid "need both --x509-cert-file and --x509-key-file"
+msgstr "слід вказати два параметри: --x509-cert-file і 
--x509-key-file"
+
+#: src/gsasl.c:347
+#, c-format
+msgid "cannot use both --starttls and --no-starttls"
+msgstr "не можна використовувати одночасно 
--starttls і --no-starttls"
+
+#: src/gsasl.c:350
+#, c-format
+msgid "cannot use both --smtp and --imap"
+msgstr "не можна використовувати одночасно 
--smtp і --imap"
+
+#: src/gsasl.c:415
+#, c-format
+msgid "initialization failure: %s"
+msgstr "помилка ініціалізації: %s"
+
+#: src/gsasl.c:430
+#, c-format
+msgid "error listing mechanisms: %s"
+msgstr "помилка під час спроби побудови 
списку механізмів: %s"
+
+#: src/gsasl.c:437
+#, c-format
+msgid "This client supports the following mechanisms:\n"
+msgstr "Цим клієнтом підтримуються такі мех
анізми:\n"
+
+#: src/gsasl.c:440
+#, c-format
+msgid "This server supports the following mechanisms:\n"
+msgstr "Цим сервером підтримуються такі мех
анізми:\n"
+
+#: src/gsasl.c:508
+#, c-format
+msgid "GnuTLS global initialization failed: %s"
+msgstr "Помилка ініціалізації GnuTLS на 
загальному рівні: %s"
+
+#: src/gsasl.c:513
+#, c-format
+msgid "GnuTLS initialization failed: %s"
+msgstr "Помилка ініціалізації GnuTLS: %s"
+
+#: src/gsasl.c:518
+#, c-format
+msgid "setting GnuTLS defaults failed: %s"
+msgstr "помилка встановлення типових 
параметрів GnuTLS: %s"
+
+#: src/gsasl.c:524
+#, c-format
+msgid "allocating anonymous GnuTLS credential: %s"
+msgstr "розміщення анонімних реєстраційних 
даних GnuTLS: %s"
+
+#: src/gsasl.c:529
+#, c-format
+msgid "setting anonymous GnuTLS credential: %s"
+msgstr "встановлення анонімних реєстраційних 
даних GnuTLS: %s"
+
+#: src/gsasl.c:534
+#, c-format
+msgid "allocating X.509 GnuTLS credential: %s"
+msgstr "розміщення реєстраційних даних GnuTLS 
для X.509: %s"
+
+#: src/gsasl.c:542
+#, c-format
+msgid "loading X.509 GnuTLS credential: %s"
+msgstr "завантаження реєстраційних даних GnuTLS 
для X.509: %s"
+
+#: src/gsasl.c:550
+#, c-format
+msgid "no X.509 CAs found: %s"
+msgstr "не знайдено CA X.509: %s"
+
+#: src/gsasl.c:553
+#, c-format
+msgid "no X.509 CAs found"
+msgstr "не знайдено CA X.509"
+
+#: src/gsasl.c:559
+#, c-format
+msgid "setting X.509 GnuTLS credential: %s"
+msgstr "встановлення анонімних реєстраційних 
даних GnuTLS для X.509: %s"
+
+#: src/gsasl.c:570
+#, c-format
+msgid "setting GnuTLS cipher priority (%s): %s\n"
+msgstr "встановлення пріоритету шифрування 
GnuTLS (%s): %s\n"
+
+#: src/gsasl.c:582
+#, c-format
+msgid "GnuTLS handshake failed: %s"
+msgstr "Помилка під час спроби встановлення 
зв’язку з GnuTLS: %s"
+
+#: src/gsasl.c:591
+#, c-format
+msgid "verifying peer certificate: %s"
+msgstr "перевірка сертифіката вузла: %s"
+
+#: src/gsasl.c:595
+#, c-format
+msgid "server certificate is not trusted"
+msgstr "сертифікат сервера не є надійним"
+
+#: src/gsasl.c:599
+#, c-format
+msgid "server certificate hasn't got a known issuer"
+msgstr "сертифікат сервера не було створено 
відомим видавцем"
+
+#: src/gsasl.c:602
+#, c-format
+msgid "server certificate has been revoked"
+msgstr "сертифікат сервера було відкликано"
+
+#: src/gsasl.c:606
+#, c-format
+msgid "could not verify server certificate (rc=%d)"
+msgstr "не вдалося перевірити сертифікат 
сервера (rc=%d)"
+
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "помилка під час спроби прив’язатися 
до каналу: %s"
+
+#: src/gsasl.c:647
+#, c-format
+msgid "Cannot find mechanism...\n"
+msgstr "Не вдалося знайти механізм...\n"
+
+#: src/gsasl.c:664
+#, c-format
+msgid "mechanism unavailable: %s"
+msgstr "механізм недоступний: %s"
+
+#: src/gsasl.c:693
+#, c-format
+msgid "Enter base64 authentication data from client (press RET if none):\n"
+msgstr "Вкажіть дані розпізнавання у форматі 
base64 від клієнта (натисніть Enter, якщо таких 
даних немає):\n"
+
+#: src/gsasl.c:696
+#, c-format
+msgid "Enter base64 authentication data from server (press RET if none):\n"
+msgstr "Вкажіть дані розпізнавання у форматі 
base64 від сервера (натисніть Enter, якщо таких 
даних немає):\n"
+
+#: src/gsasl.c:706
+#, c-format
+msgid "mechanism error: %s"
+msgstr "помилка механізму: %s"
+
+#: src/gsasl.c:715
+#, c-format
+msgid "Server authentication finished (client trusted)...\n"
+msgstr "Розпізнавання на сервері завершено 
(клієнт визнано надійним)...\n"
+
+#: src/gsasl.c:718
+#, c-format
+msgid "Client authentication finished (server trusted)...\n"
+msgstr "Розпізнавання на клієнті завершено 
(сервер визнано надійним)...\n"
+
+#: src/gsasl.c:742
+#, c-format
+msgid "Enter application data (EOF to finish):\n"
+msgstr "Вкажіть дані заяви (дані мають 
завершуватися символом EOF):\n"
+
+#: src/gsasl.c:814
+#, c-format
+msgid "Base64 encoded application data to send:\n"
+msgstr "Закодовані у форматі Base64 дані, які 
буде надіслано:\n"
+
+#: src/gsasl.c:859
+#, c-format
+msgid "SASL record too large: %zu\n"
+msgstr "Запис SASL є занадто великим: %zu\n"
+
+#: src/gsasl.c:883
+#, c-format
+msgid "encoding error: %s"
+msgstr "помилка кодування: %s"
+
+#: src/gsasl.c:888
+#, c-format
+msgid "Session finished...\n"
+msgstr "Сеанс завершено...\n"
+
+#: src/gsasl.c:904
+#, c-format
+msgid "terminating GnuTLS session failed: %s"
+msgstr "спроба переривання сеансу GnuTLS зазнала 
невдачі: %s"
diff --git a/po/zh_CN.po.in b/po/zh_CN.po.in
index 3c60ca4..bd2400f 100644
--- a/po/zh_CN.po.in
+++ b/po/zh_CN.po.in
@@ -2,39 +2,36 @@
 # Copyright (C) 2010 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gsasl package.
 # Meng Jie <address@hidden>, 2004.
-# Ji ZhengYu <address@hidden>, 2008, 2009, 2010.
+# Ji ZhengYu <address@hidden>, 2008, 2009, 2010, 2011.
 msgid ""
 msgstr ""
-"Project-Id-Version: gsasl 1.4.1\n"
+"Project-Id-Version: gsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-02-26 09:09+0800\n"
+"POT-Creation-Date: 2011-05-01 17:35+0200\n"
+"PO-Revision-Date: 2011-05-12 15:28+0800\n"
 "Last-Translator: Ji ZhengYu <address@hidden>\n"
 "Language-Team: Chinese (simplified) <address@hidden>\n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/imap.c:78 src/smtp.c:81
+#: src/imap.c:76 src/smtp.c:79
 #, c-format
 msgid "Chose SASL mechanisms:\n"
 msgstr "选择 SASL 方式:\n"
 
-#: src/imap.c:108 src/smtp.c:112 src/gsasl.c:198
+#: src/imap.c:106 src/smtp.c:110 src/gsasl.c:206
 #, c-format
 msgid "Using mechanism:\n"
 msgstr "使用方式:\n"
 
-#: src/imap.c:152
+#: src/imap.c:156
 #, c-format
-msgid ""
-"error: Server did not return expected SASL data (it must begin with '+ '):\n"
-"%s\n"
-msgstr ""
-"错误: 服务器未返回正确的SASL 数据(其必
须以\"+\"开头):\n"
-"%s\n"
+msgid "error: server did not return a token\n"
+msgstr "错误:服务器未返回标识\n"
 
-#: src/smtp.c:154
+#: src/smtp.c:158
 #, c-format
 msgid ""
 "error: Server did not return expected SASL data (it must begin with '334 
'):\n"
@@ -43,221 +40,233 @@ msgstr ""
 "错误: 服务器未返回正确的SASL 数据(其必须以\"334\"开头):\n"
 "%s\n"
 
-#: src/gsasl.c:170
+#: src/gsasl.c:178
 #, c-format
 msgid "Choose SASL mechanism:\n"
 msgstr "选择SASL 方式:\n"
 
-#: src/gsasl.c:179
+#: src/gsasl.c:187
 #, c-format
 msgid "Input list of SASL mechanisms supported by server:\n"
 msgstr "服务器所支持的 SASL 方式入列表:\n"
 
-#: src/gsasl.c:215
+#: src/gsasl.c:223
 #, c-format
 msgid "Output from server:\n"
 msgstr "服务器的输出:\n"
 
-#: src/gsasl.c:217
+#: src/gsasl.c:225
 #, c-format
 msgid "Output from client:\n"
 msgstr "客户端的输出:\n"
 
-#: src/gsasl.c:273
+#: src/gsasl.c:281
 #, c-format
 msgid "Try `%s --help' for more information.\n"
 msgstr "尝试‘%s --help’以获得更多信息。\n"
 
-#: src/gsasl.c:321
+#: src/gsasl.c:336
 #, c-format
 msgid "missing argument"
 msgstr "缺少参数"
 
-#: src/gsasl.c:328
+#: src/gsasl.c:343
 #, c-format
 msgid "need both --x509-cert-file and --x509-key-file"
 msgstr "既需要 --x509-cert-file 也需要 --x509-key-file"
 
-#: src/gsasl.c:332
+#: src/gsasl.c:347
 #, c-format
 msgid "cannot use both --starttls and --no-starttls"
 msgstr "不能同时使用 --starttls 和 --no-starttls"
 
-#: src/gsasl.c:335
+#: src/gsasl.c:350
 #, c-format
 msgid "cannot use both --smtp and --imap"
 msgstr "不能同时使用 --smtp 和 --imap"
 
-#: src/gsasl.c:400
+#: src/gsasl.c:415
 #, c-format
 msgid "initialization failure: %s"
 msgstr "初始化失败:%s"
 
-#: src/gsasl.c:415
+#: src/gsasl.c:430
 #, c-format
 msgid "error listing mechanisms: %s"
 msgstr "列出机制时出错:%s"
 
-#: src/gsasl.c:422
+#: src/gsasl.c:437
 #, c-format
 msgid "This client supports the following mechanisms:\n"
 msgstr "这个客户端支持以下机制:\n"
 
-#: src/gsasl.c:425
+#: src/gsasl.c:440
 #, c-format
 msgid "This server supports the following mechanisms:\n"
 msgstr "这个服务器支持以下机制:\n"
 
-#: src/gsasl.c:491
+#: src/gsasl.c:508
 #, c-format
 msgid "GnuTLS global initialization failed: %s"
 msgstr "GnuTLS 全局初始化失败:%s"
 
-#: src/gsasl.c:496
+#: src/gsasl.c:513
 #, c-format
 msgid "GnuTLS initialization failed: %s"
 msgstr "GnuTLS 初始化失败:%s"
 
-#: src/gsasl.c:501
+#: src/gsasl.c:518
 #, c-format
 msgid "setting GnuTLS defaults failed: %s"
 msgstr "设定 GnuTLS 默认值失败:%s"
 
-#: src/gsasl.c:507
+#: src/gsasl.c:524
 #, c-format
 msgid "allocating anonymous GnuTLS credential: %s"
 msgstr "分配匿名 GnuTLS 证书:%s"
 
-#: src/gsasl.c:512
+#: src/gsasl.c:529
 #, c-format
 msgid "setting anonymous GnuTLS credential: %s"
 msgstr "设定匿名 GnuTLS 证书:%s"
 
-#: src/gsasl.c:517
+#: src/gsasl.c:534
 #, c-format
 msgid "allocating X.509 GnuTLS credential: %s"
 msgstr "分配 X.509 GnuTLS 证书:%s"
 
-#: src/gsasl.c:525
+#: src/gsasl.c:542
 #, c-format
 msgid "loading X.509 GnuTLS credential: %s"
 msgstr "载入 X.509 GnuTLS 证书:%s"
 
-#: src/gsasl.c:533
+#: src/gsasl.c:550
 #, c-format
 msgid "no X.509 CAs found: %s"
 msgstr "找不到 X.509 CA 证书:%s"
 
-#: src/gsasl.c:536
+#: src/gsasl.c:553
 #, c-format
 msgid "no X.509 CAs found"
 msgstr "找不到 X.509 CA 证书"
 
-#: src/gsasl.c:542
+#: src/gsasl.c:559
 #, c-format
 msgid "setting X.509 GnuTLS credential: %s"
 msgstr "设定 X.509 GnuTLS 证书:%s"
 
-#: src/gsasl.c:553
+#: src/gsasl.c:570
 #, c-format
 msgid "setting GnuTLS cipher priority (%s): %s\n"
 msgstr "设定 GnuTLS 密钥优先级(%s): %s\n"
 
-#: src/gsasl.c:564
+#: src/gsasl.c:582
 #, c-format
 msgid "GnuTLS handshake failed: %s"
 msgstr "GnuTLS 握手失败:%s"
 
-#: src/gsasl.c:573
+#: src/gsasl.c:591
 #, c-format
 msgid "verifying peer certificate: %s"
 msgstr "验证节点证书:%s"
 
-#: src/gsasl.c:577
+#: src/gsasl.c:595
 #, c-format
 msgid "server certificate is not trusted"
 msgstr "服务器证书不可信"
 
-#: src/gsasl.c:581
+#: src/gsasl.c:599
 #, c-format
 msgid "server certificate hasn't got a known issuer"
 msgstr "服务器证书发行者未知"
 
-#: src/gsasl.c:584
+#: src/gsasl.c:602
 #, c-format
 msgid "server certificate has been revoked"
 msgstr "服务器证书已被吊销"
 
-#: src/gsasl.c:588
+#: src/gsasl.c:606
 #, c-format
 msgid "could not verify server certificate (rc=%d)"
 msgstr "无法验证服务器证书(rc=%d)"
 
-#: src/gsasl.c:611
+#: src/gsasl.c:617
+#, c-format
+msgid "getting channel binding failed: %s"
+msgstr "绑定通道失败:%s"
+
+#: src/gsasl.c:647
 #, c-format
 msgid "Cannot find mechanism...\n"
 msgstr "找不到机制……\n"
 
-#: src/gsasl.c:628
+#: src/gsasl.c:664
 #, c-format
 msgid "mechanism unavailable: %s"
 msgstr "机制不可用:%s"
 
-#: src/gsasl.c:657
+#: src/gsasl.c:693
 #, c-format
 msgid "Enter base64 authentication data from client (press RET if none):\n"
 msgstr "输入客户端发送的 base64 编ç 
çš„应用程序数据(如果没有,请按回车):\n"
 
-#: src/gsasl.c:660
+#: src/gsasl.c:696
 #, c-format
 msgid "Enter base64 authentication data from server (press RET if none):\n"
 msgstr "输入服务器发送的 base64 编ç 
çš„应用程序数据(如果没有,请按回车):\n"
 
-#: src/gsasl.c:670
+#: src/gsasl.c:706
 #, c-format
 msgid "mechanism error: %s"
 msgstr "机制错误:%s"
 
-#: src/gsasl.c:679
+#: src/gsasl.c:715
 #, c-format
 msgid "Server authentication finished (client trusted)...\n"
 msgstr "服务器认证完成(客户端可信)……\n"
 
-#: src/gsasl.c:682
+#: src/gsasl.c:718
 #, c-format
 msgid "Client authentication finished (server trusted)...\n"
 msgstr "客户端认证完成(服务器可信)……\n"
 
-#: src/gsasl.c:705
+#: src/gsasl.c:742
 #, c-format
 msgid "Enter application data (EOF to finish):\n"
 msgstr "输入应用程序数据(用 EOF 结束输入):\n"
 
-#: src/gsasl.c:780
+#: src/gsasl.c:814
 #, c-format
 msgid "Base64 encoded application data to send:\n"
 msgstr "要发送的 Base64 编码的应用程序数据:\n"
 
-#: src/gsasl.c:822
+#: src/gsasl.c:859
 #, c-format
 msgid "SASL record too large: %zu\n"
 msgstr "SASL 记录太大: %zu\n"
 
-#: src/gsasl.c:841
+#: src/gsasl.c:883
 #, c-format
 msgid "encoding error: %s"
 msgstr "编码错误:%s"
 
-#: src/gsasl.c:846
+#: src/gsasl.c:888
 #, c-format
 msgid "Session finished...\n"
 msgstr "会话结束...\n"
 
-#: src/gsasl.c:862
+#: src/gsasl.c:904
 #, c-format
 msgid "terminating GnuTLS session failed: %s"
 msgstr "终止 GnuTLS 会话失败:%s"
 
+#~ msgid ""
+#~ "error: Server did not return expected SASL data (it must begin with '+ 
'):\n"
+#~ "%s\n"
+#~ msgstr ""
+#~ "错误: 服务器未返回正确的SASL 数据(其必
须以\"+\"开头):\n"
+#~ "%s\n"
+
 #~ msgid "Cannot initialize Windows sockets."
 #~ msgstr "无法初始化 Windows 端口。"
 


hooks/post-receive
-- 
GNU gsasl



reply via email to

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