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-2-33-g164b99f


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-2-33-g164b99f
Date: Tue, 08 Sep 2009 15:59:33 +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=164b99fa79feaab0275b67703783a8d2587eed6e

The branch, master has been updated
       via  164b99fa79feaab0275b67703783a8d2587eed6e (commit)
       via  e363493333d65f6f628f262c4bbf233f7a40dc7b (commit)
      from  f88a8cd829299b398fbfea4a92da119bd2434408 (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 164b99fa79feaab0275b67703783a8d2587eed6e
Author: Simon Josefsson <address@hidden>
Date:   Tue Sep 8 17:59:24 2009 +0200

    Update gnulib files.

commit e363493333d65f6f628f262c4bbf233f7a40dc7b
Author: Simon Josefsson <address@hidden>
Date:   Fri Aug 28 11:31:57 2009 +0200

    Add.

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

Summary of changes:
 NEWS                                               |    4 +
 gl/Makefile.am                                     |  136 +++--
 gl/close.c                                         |    2 +-
 ...nv_open-irix.gperf => iconv_open-solaris.gperf} |   19 +-
 gl/iconv_open.c                                    |    3 +-
 gl/inet_ntop.c                                     |    6 +-
 gl/m4/gnulib-comp.m4                               |    1 +
 gl/m4/iconv_open.m4                                |   11 +-
 gl/m4/stdio_h.m4                                   |  106 ++--
 gl/m4/string_h.m4                                  |    4 +-
 gl/m4/unistd_h.m4                                  |   13 +-
 gl/stdio.in.h                                      |  645 ++++++++++----------
 gl/string.in.h                                     |    8 +-
 gl/unistd.in.h                                     |   91 +++-
 gl/wctype.in.h                                     |   18 +-
 gltests/Makefile.am                                |    2 +-
 gltests/inet_pton.c                                |    6 +-
 gltests/test-wctype.c                              |   43 ++-
 lib/gl/Makefile.am                                 |  113 ++--
 lib/gl/m4/stdio_h.m4                               |  106 ++--
 lib/gl/m4/string_h.m4                              |    4 +-
 lib/gl/m4/unistd_h.m4                              |   13 +-
 lib/gl/stdio.in.h                                  |  645 ++++++++++----------
 lib/gl/string.in.h                                 |    8 +-
 lib/gl/unistd.in.h                                 |   91 +++-
 lib/maint.mk                                       |   28 +-
 maint.mk                                           |   28 +-
 27 files changed, 1216 insertions(+), 938 deletions(-)
 copy gl/{iconv_open-irix.gperf => iconv_open-solaris.gperf} (61%)

diff --git a/NEWS b/NEWS
index 43592eb..2d2d42b 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,10 @@ SASL.  That include the manual, the command line tool, and 
self tests.
 ** gsasl: Fix libintl-related build errors on MinGW.
 Tiny patch from "carlo.bramix" <address@hidden>.
 
+** doc: Typo fixes to manual.
+Based on report by Marco Maggi <address@hidden> in
+<http://thread.gmane.org/gmane.comp.gnu.gsasl.general/222>.
+
 ** tests: Rewrite basic self test using modern API.
 
 ** tests: New self-test 'crypto' to increase code coverage.
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e3c27e4..d73b6a1 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -81,7 +81,7 @@ BUILT_SOURCES += $(ARPA_INET_H)
 # We need the following in order to create <arpa/inet.h> when the system
 # doesn't have one.
 arpa/inet.h: arpa_inet.in.h
-       $(AM_V_at)@MKDIR_P@ arpa
+       $(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' \
@@ -420,12 +420,15 @@ iconv_open-irix.h: iconv_open-irix.gperf
 iconv_open-osf.h: iconv_open-osf.gperf
        $(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > 
$(srcdir)/iconv_open-osf.h-t
        mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h
-BUILT_SOURCES        += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h
-MOSTLYCLEANFILES     += iconv_open-aix.h-t iconv_open-hpux.h-t 
iconv_open-irix.h-t iconv_open-osf.h-t
-MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h
-EXTRA_DIST           += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h
+iconv_open-solaris.h: iconv_open-solaris.gperf
+       $(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > 
$(srcdir)/iconv_open-solaris.h-t
+       mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
+BUILT_SOURCES        += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h
+MOSTLYCLEANFILES     += iconv_open-aix.h-t iconv_open-hpux.h-t 
iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t
+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.in.h iconv_open-aix.gperf iconv_open-hpux.gperf 
iconv_open-irix.gperf iconv_open-osf.gperf iconv_open.c
+EXTRA_DIST += iconv.in.h 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
 
@@ -615,7 +618,7 @@ BUILT_SOURCES += $(NETINET_IN_H)
 # We need the following in order to create <netinet/in.h> when the system
 # doesn't have one.
 netinet/in.h: netinet_in.in.h
-       $(AM_V_at)@MKDIR_P@ netinet
+       $(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' \
@@ -876,77 +879,79 @@ stdio.h: stdio.in.h
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|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_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
-             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
-             -e 
's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|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_FREOPEN''@|$(GNULIB_FREOPEN)|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_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
-             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
-             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
-             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
-             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
-             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
-             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
              -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
              -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
              -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|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_RENAME''@|$(GNULIB_RENAME)|g' \
+             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
              -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
-             -e 
's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
-             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
-             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
-             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|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_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|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 
's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
              -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
              -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
-             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
              -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
-             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
-             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
              -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
-             -e 
's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
-             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
              -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
              -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
-             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
              -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
-             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
              -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
-             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
-             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
-             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
-             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
-             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
              -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
              -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+             -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+             -e 
's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
              < $(srcdir)/stdio.in.h; \
        } > address@hidden && \
@@ -1124,6 +1129,8 @@ string.h: string.in.h
              -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+             -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+             -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
              < $(srcdir)/string.in.h; \
        } > address@hidden && \
@@ -1141,7 +1148,7 @@ BUILT_SOURCES += $(SYS_SELECT_H)
 # We need the following in order to create <sys/select.h> when the system
 # doesn't have one that works with the given compiler.
 sys/select.h: sys_select.in.h
-       $(AM_V_at)@MKDIR_P@ sys
+       $(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' \
@@ -1169,7 +1176,7 @@ BUILT_SOURCES += $(SYS_SOCKET_H)
 # We need the following in order to create <sys/socket.h> when the system
 # doesn't have one that works with the given compiler.
 sys/socket.h: sys_socket.in.h
-       $(AM_V_at)@MKDIR_P@ sys
+       $(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' \
@@ -1215,7 +1222,7 @@ BUILT_SOURCES += $(SYS_TIME_H)
 # We need the following in order to create <sys/time.h> when the system
 # doesn't have one that works with the given compiler.
 sys/time.h: sys_time.in.h
-       $(AM_V_at)@MKDIR_P@ sys
+       $(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' \
@@ -1252,7 +1259,9 @@ unistd.h: unistd.in.h
              -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' \
@@ -1267,13 +1276,18 @@ unistd.h: unistd.in.h
              -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
              -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
              -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
              -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
              -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
              -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' 
\
+             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
              -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
              -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+             -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
              -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
@@ -1284,7 +1298,10 @@ unistd.h: unistd.in.h
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+             -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+             -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
@@ -1293,6 +1310,7 @@ unistd.h: unistd.in.h
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+             -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
              -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
              -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
diff --git a/gl/close.c b/gl/close.c
index 0e56dcb..5278f24 100644
--- a/gl/close.c
+++ b/gl/close.c
@@ -33,7 +33,7 @@ rpl_close (int fd)
   int retval = close (fd);
 #endif
 
-#ifdef FCHDIR_REPLACEMENT
+#if REPLACE_FCHDIR
   if (retval >= 0)
     _gl_unregister_fd (fd);
 #endif
diff --git a/gl/iconv_open-irix.gperf b/gl/iconv_open-solaris.gperf
similarity index 61%
copy from gl/iconv_open-irix.gperf
copy to gl/iconv_open-solaris.gperf
index 3672a80..7d7da38 100644
--- a/gl/iconv_open-irix.gperf
+++ b/gl/iconv_open-solaris.gperf
@@ -9,7 +9,14 @@ struct mapping { int standard_name; const char vendor_name[10 
+ 1]; };
 %define word-array-name mappings
 %pic
 %%
-# On IRIX 6.5, look in /usr/lib/iconv and /usr/lib/international/encodings.
+# On Solaris 10, look in the "iconv -l" output. Some aliases are advertised but
+# not actually supported by the iconv() function and by the 'iconv' program.
+# For example:
+#   $ echo abc | iconv -f 646 -t ISO-8859-1
+#   Not supported 646 to ISO-8859-1
+#   $ echo abc | iconv -f 646 -t ISO8859-1
+$   abc
+ASCII, "646"
 ISO-8859-1, "ISO8859-1"
 ISO-8859-2, "ISO8859-2"
 ISO-8859-3, "ISO8859-3"
@@ -20,12 +27,4 @@ ISO-8859-7, "ISO8859-7"
 ISO-8859-8, "ISO8859-8"
 ISO-8859-9, "ISO8859-9"
 ISO-8859-15, "ISO8859-15"
-KOI8-R, "KOI8"
-CP855, "DOS855"
-CP1251, "WIN1251"
-GB2312, "eucCN"
-EUC-JP, "eucJP"
-EUC-KR, "eucKR"
-EUC-TW, "eucTW"
-SHIFT_JIS, "sjis"
-TIS-620, "TIS620"
+CP1251, "ansi-1251"
diff --git a/gl/iconv_open.c b/gl/iconv_open.c
index f6f0ed4..5291c49 100644
--- a/gl/iconv_open.c
+++ b/gl/iconv_open.c
@@ -1,5 +1,5 @@
 /* Character set conversion.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 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
@@ -36,6 +36,7 @@
 #define ICONV_FLAVOR_HPUX "iconv_open-hpux.h"
 #define ICONV_FLAVOR_IRIX "iconv_open-irix.h"
 #define ICONV_FLAVOR_OSF "iconv_open-osf.h"
+#define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h"
 
 #ifdef ICONV_FLAVOR
 # include ICONV_FLAVOR
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index be091ff..c32c273 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -1,6 +1,6 @@
 /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
 
-   Copyright (C) 2005, 2006, 2008  Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2008, 2009  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
@@ -42,10 +42,6 @@
 #include <string.h>
 #include <errno.h>
 
-#ifndef EAFNOSUPPORT
-# define EAFNOSUPPORT EINVAL
-#endif
-
 #define NS_IN6ADDRSZ 16
 #define NS_INT16SZ 2
 
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 37f7a26..8aa8c81 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -437,6 +437,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/iconv_open-hpux.gperf
   lib/iconv_open-irix.gperf
   lib/iconv_open-osf.gperf
+  lib/iconv_open-solaris.gperf
   lib/iconv_open.c
   lib/inet_ntop.c
   lib/intprops.h
diff --git a/gl/m4/iconv_open.m4 b/gl/m4/iconv_open.m4
index c7b948e..8eeef9f 100644
--- a/gl/m4/iconv_open.m4
+++ b/gl/m4/iconv_open.m4
@@ -1,4 +1,4 @@
-# iconv_open.m4 serial 5
+# iconv_open.m4 serial 6
 dnl Copyright (C) 2007-2009 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,10 +21,11 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
     if test $gl_func_iconv_gnu = no; then
       iconv_flavor=
       case "$host_os" in
-        aix*)  iconv_flavor=ICONV_FLAVOR_AIX ;;
-        irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
-        hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
-        osf*)  iconv_flavor=ICONV_FLAVOR_OSF ;;
+        aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
+        irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
+        hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
+        osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
+        solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
       esac
       if test -n "$iconv_flavor"; then
         AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 8c9aa8f..ac5e20a 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 17
+# stdio_h.m4 serial 18
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -41,80 +41,82 @@ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
 
 AC_DEFUN([gl_STDIO_H_DEFAULTS],
 [
-  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
-  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
-  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
-  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
-  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
-  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
-  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
-  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
-  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
-  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
-  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
-  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
-  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
-  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
-  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
-  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
+  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
   GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])
+  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
+  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
+  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
+  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
+  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
   GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])
   GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])
   GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])
   GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])
   GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])
-  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
-  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
-  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
-  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
-  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
-  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
-  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
-  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
   GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])
-  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
+  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
+  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
   GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
+  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
+  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
+  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
+  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
+  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
+  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
+  GNULIB_RENAME=0;               AC_SUBST([GNULIB_RENAME])
+  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
+  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
   GNULIB_STDIO_H_SIGPIPE=0;      AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
+  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
+  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
+  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
+  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
+  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
+  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
-  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
-  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
-  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
-  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
-  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
+  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
+  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
+  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
   HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
-  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
-  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
-  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
   HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
-  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
-  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
-  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
+  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
+  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
-  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
-  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
-  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
+  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
   REPLACE_FOPEN=0;               AC_SUBST([REPLACE_FOPEN])
+  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
+  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
   REPLACE_FREOPEN=0;             AC_SUBST([REPLACE_FREOPEN])
-  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
-  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
   REPLACE_FSEEK=0;               AC_SUBST([REPLACE_FSEEK])
-  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
-  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
+  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
   REPLACE_FTELL=0;               AC_SUBST([REPLACE_FTELL])
-  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
-  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
-  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
-  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
-  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
-  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
-  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
   REPLACE_GETLINE=0;             AC_SUBST([REPLACE_GETLINE])
+  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
   REPLACE_PERROR=0;              AC_SUBST([REPLACE_PERROR])
+  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
+  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
+  REPLACE_RENAME=0;              AC_SUBST([REPLACE_RENAME])
+  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
+  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
+  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
+  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
+  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
+  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
+  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
 ])
 
 dnl Code shared by fseeko and ftello.  Determine if large files are supported,
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 11f09c8..3dbbfe1 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 8
 
 # Written by Paul Eggert.
 
@@ -91,4 +91,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRCASESTR=0;                AC_SUBST([REPLACE_STRCASESTR])
   REPLACE_STRERROR=0;          AC_SUBST([REPLACE_STRERROR])
   REPLACE_STRSIGNAL=0;         AC_SUBST([REPLACE_STRSIGNAL])
+  REPLACE_STRTOK_R=0;          AC_SUBST([REPLACE_STRTOK_R])
+  UNDEFINE_STRTOK_R=0;         AC_SUBST([UNDEFINE_STRTOK_R])
 ])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 53fc330..84f0755 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 21
+# unistd_h.m4 serial 24
 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,9 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_DUP3=0;             AC_SUBST([GNULIB_DUP3])
   GNULIB_ENVIRON=0;          AC_SUBST([GNULIB_ENVIRON])
   GNULIB_EUIDACCESS=0;       AC_SUBST([GNULIB_EUIDACCESS])
+  GNULIB_FACCESSAT=0;        AC_SUBST([GNULIB_FACCESSAT])
   GNULIB_FCHDIR=0;           AC_SUBST([GNULIB_FCHDIR])
+  GNULIB_FCHOWNAT=0;         AC_SUBST([GNULIB_FCHOWNAT])
   GNULIB_FSYNC=0;            AC_SUBST([GNULIB_FSYNC])
   GNULIB_FTRUNCATE=0;        AC_SUBST([GNULIB_FTRUNCATE])
   GNULIB_GETCWD=0;           AC_SUBST([GNULIB_GETCWD])
@@ -53,14 +55,19 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
   GNULIB_PIPE2=0;            AC_SUBST([GNULIB_PIPE2])
   GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
+  GNULIB_READLINKAT=0;       AC_SUBST([GNULIB_READLINKAT])
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
+  GNULIB_SYMLINKAT=0;        AC_SUBST([GNULIB_SYMLINKAT])
   GNULIB_UNISTD_H_GETOPT=0;  AC_SUBST([GNULIB_UNISTD_H_GETOPT])
   GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+  GNULIB_UNLINKAT=0;         AC_SUBST([GNULIB_UNLINKAT])
   GNULIB_WRITE=0;            AC_SUBST([GNULIB_WRITE])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
   HAVE_DUP3=1;            AC_SUBST([HAVE_DUP3])
   HAVE_EUIDACCESS=1;      AC_SUBST([HAVE_EUIDACCESS])
+  HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
+  HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
   HAVE_GETDOMAINNAME=1;   AC_SUBST([HAVE_GETDOMAINNAME])
@@ -71,15 +78,19 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_PIPE2=1;           AC_SUBST([HAVE_PIPE2])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
+  HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
+  HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
+  HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
   REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHDIR=0;       AC_SUBST([REPLACE_FCHDIR])
+  REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 4cd3ce1..6e402dc 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -68,154 +68,6 @@
 extern "C" {
 #endif
 
-
-#if @GNULIB_FPRINTF_POSIX@
-# if @REPLACE_FPRINTF@
-#  define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-#elif defined GNULIB_POSIXCHECK
-# undef fprintf
-# define fprintf \
-    (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
-                      "use gnulib module fprintf-posix for portable " \
-                      "POSIX compliance"), \
-     fprintf)
-#endif
-
-#if @GNULIB_VFPRINTF_POSIX@
-# if @REPLACE_VFPRINTF@
-#  define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-#elif defined GNULIB_POSIXCHECK
-# undef vfprintf
-# define vfprintf(s,f,a) \
-    (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
-                      "use gnulib module vfprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vfprintf (s, f, a))
-#endif
-
-#if @GNULIB_PRINTF_POSIX@
-# if @REPLACE_PRINTF@
-/* Don't break __attribute__((format(printf,M,N))).  */
-#  define printf __printf__
-extern int printf (const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 1, 2)));
-# endif
-#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-/* Don't break __attribute__((format(printf,M,N))).  */
-# define printf __printf__
-extern int printf (const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 1, 2)));
-#elif defined GNULIB_POSIXCHECK
-# undef printf
-# define printf \
-    (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
-                      "use gnulib module printf-posix for portable " \
-                      "POSIX compliance"), \
-     printf)
-/* Don't break __attribute__((format(printf,M,N))).  */
-# define format(kind,m,n) format (__##kind##__, m, n)
-# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
-# define ____printf____ __printf__
-# define ____scanf____ __scanf__
-# define ____strftime____ __strftime__
-# define ____strfmon____ __strfmon__
-#endif
-
-#if @GNULIB_VPRINTF_POSIX@
-# if @REPLACE_VPRINTF@
-#  define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 1, 0)));
-# endif
-#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 1, 0)));
-#elif defined GNULIB_POSIXCHECK
-# undef vprintf
-# define vprintf(f,a) \
-    (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
-                      "use gnulib module vprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vprintf (f, a))
-#endif
-
-#if @GNULIB_SNPRINTF@
-# if @REPLACE_SNPRINTF@
-#  define snprintf rpl_snprintf
-# endif
-# if @REPLACE_SNPRINTF@ || address@hidden@
-extern int snprintf (char *str, size_t size, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 3, 4)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef snprintf
-# define snprintf \
-    (GL_LINK_WARNING ("snprintf is unportable - " \
-                      "use gnulib module snprintf for portability"), \
-     snprintf)
-#endif
-
-#if @GNULIB_VSNPRINTF@
-# if @REPLACE_VSNPRINTF@
-#  define vsnprintf rpl_vsnprintf
-# endif
-# if @REPLACE_VSNPRINTF@ || address@hidden@
-extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 3, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsnprintf
-# define vsnprintf(b,s,f,a) \
-    (GL_LINK_WARNING ("vsnprintf is unportable - " \
-                      "use gnulib module vsnprintf for portability"), \
-     vsnprintf (b, s, f, a))
-#endif
-
-#if @GNULIB_SPRINTF_POSIX@
-# if @REPLACE_SPRINTF@
-#  define sprintf rpl_sprintf
-extern int sprintf (char *str, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sprintf
-# define sprintf \
-    (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
-                      "use gnulib module sprintf-posix for portable " \
-                      "POSIX compliance"), \
-     sprintf)
-#endif
-
-#if @GNULIB_VSPRINTF_POSIX@
-# if @REPLACE_VSPRINTF@
-#  define vsprintf rpl_vsprintf
-extern int vsprintf (char *str, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsprintf
-# define vsprintf(b,f,a) \
-    (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
-                      "use gnulib module vsprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vsprintf (b, f, a))
-#endif
-
 #if @GNULIB_DPRINTF@
 # if @REPLACE_DPRINTF@
 #  define dprintf rpl_dprintf
@@ -232,57 +84,39 @@ extern int dprintf (int fd, const char *format, ...)
      dprintf (d, f, a))
 #endif
 
-#if @GNULIB_VDPRINTF@
-# if @REPLACE_VDPRINTF@
-#  define vdprintf rpl_vdprintf
-# endif
-# if @REPLACE_VDPRINTF@ || address@hidden@
-extern int vdprintf (int fd, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
+#if @GNULIB_FCLOSE@
+# if @REPLACE_FCLOSE@
+#  define fclose rpl_fclose
+  /* Close STREAM and its underlying file descriptor.  */
+extern int fclose (FILE *stream);
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef vdprintf
-# define vdprintf(d,f,a) \
-    (GL_LINK_WARNING ("vdprintf is unportable - " \
-                      "use gnulib module vdprintf for portability"), \
-     vdprintf (d, f, a))
-#endif
-
-#if @GNULIB_VASPRINTF@
-# if @REPLACE_VASPRINTF@
-#  define asprintf rpl_asprintf
-#  define vasprintf rpl_vasprintf
-# endif
-# if @REPLACE_VASPRINTF@ || address@hidden@
-  /* Write formatted output to a string dynamically allocated with malloc().
-     If the memory allocation succeeds, store the address of the string in
-     *RESULT and return the number of resulting bytes, excluding the trailing
-     NUL.  Upon memory allocation error, or some other error, return -1.  */
-  extern int asprintf (char **result, const char *format, ...)
-    __attribute__ ((__format__ (__printf__, 2, 3)));
-  extern int vasprintf (char **result, const char *format, va_list args)
-    __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
+# undef fclose
+# define fclose(f) \
+   (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
+                     "use gnulib module fclose for portable " \
+                     "POSIX compliance"), \
+    fclose (f))
 #endif
 
-#if @GNULIB_OBSTACK_PRINTF@
-# if @REPLACE_OBSTACK_PRINTF@
-#  define obstack_printf rpl_osbtack_printf
-#  define obstack_vprintf rpl_obstack_vprintf
-# endif
-# if @REPLACE_OBSTACK_PRINTF@ || address@hidden@
-  struct obstack;
-  /* Grow an obstack with formatted output.  Return the number of
-     bytes added to OBS.  No trailing nul byte is added, and the
-     object should be closed with obstack_finish before use.  Upon
-     memory allocation error, call obstack_alloc_failed_handler.  Upon
-     other error, return -1.  */
-  extern int obstack_printf (struct obstack *obs, const char *format, ...)
-    __attribute__ ((__format__ (__printf__, 2, 3)));
-  extern int obstack_vprintf (struct obstack *obs, const char *format,
-                             va_list args)
-    __attribute__ ((__format__ (__printf__, 2, 0)));
+#if @GNULIB_FFLUSH@
+# if @REPLACE_FFLUSH@
+#  define fflush rpl_fflush
+  /* Flush all pending data on STREAM according to POSIX rules.  Both
+     output and seekable input streams are supported.
+     Note! LOSS OF DATA can occur if fflush is applied on an input stream
+     that is _not_seekable_ or on an update stream that is _not_seekable_
+     and in which the most recent operation was input.  Seekability can
+     be tested with lseek(fileno(fp),0,SEEK_CUR).  */
+  extern int fflush (FILE *gl_stream);
 # endif
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+# define fflush(f) \
+   (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
+                     "use gnulib module fflush for portable " \
+                     "POSIX compliance"), \
+    fflush (f))
 #endif
 
 #if @GNULIB_FOPEN@
@@ -299,6 +133,58 @@ extern FILE * fopen (const char *filename, const char 
*mode);
     fopen (f, m))
 #endif
 
+#if @GNULIB_FPRINTF_POSIX@
+# if @REPLACE_FPRINTF@
+#  define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+#elif defined GNULIB_POSIXCHECK
+# undef fprintf
+# define fprintf \
+    (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
+                      "use gnulib module fprintf-posix for portable " \
+                      "POSIX compliance"), \
+     fprintf)
+#endif
+
+#if @GNULIB_FPURGE@
+# if @REPLACE_FPURGE@
+#  define fpurge rpl_fpurge
+# endif
+# if @REPLACE_FPURGE@ || address@hidden@
+  /* Discard all pending buffered I/O data on STREAM.
+     STREAM must not be wide-character oriented.
+     When discarding pending output, the file position is set back to where it
+     was before the write calls.  When discarding pending input, the file
+     position is advanced to match the end of the previously read input.
+     Return 0 if successful.  Upon error, return -1 and set errno.  */
+  extern int fpurge (FILE *gl_stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fpurge
+# define fpurge(f) \
+   (GL_LINK_WARNING ("fpurge is not always present - " \
+                     "use gnulib module fpurge for portability"), \
+    fpurge (f))
+#endif
+
+#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputc
+# define fputc rpl_fputc
+extern int fputc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputs
+# define fputs rpl_fputs
+extern int fputs (const char *string, FILE *stream);
+#endif
+
 #if @GNULIB_FREOPEN@
 # if @REPLACE_FREOPEN@
 #  undef freopen
@@ -313,22 +199,6 @@ extern FILE * freopen (const char *filename, const char 
*mode, FILE *stream);
     freopen (f, m, s))
 #endif
 
-#if @GNULIB_FSEEKO@
-# if @REPLACE_FSEEKO@
-/* Provide fseek, fseeko functions that are aware of a preceding
-   fflush(), and which detect pipes.  */
-#  define fseeko rpl_fseeko
-extern int fseeko (FILE *fp, off_t offset, int whence);
-#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fseeko
-# define fseeko(f,o,w) \
-   (GL_LINK_WARNING ("fseeko is unportable - " \
-                     "use gnulib module fseeko for portability"), \
-    fseeko (f, o, w))
-#endif
-
 #if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
 extern int rpl_fseek (FILE *fp, long offset, int whence);
 # undef fseek
@@ -351,18 +221,20 @@ extern int rpl_fseek (FILE *fp, long offset, int whence);
 # endif
 #endif
 
-#if @GNULIB_FTELLO@
-# if @REPLACE_FTELLO@
-#  define ftello rpl_ftello
-extern off_t ftello (FILE *fp);
-#  define ftell(fp) ftello (fp)
+#if @GNULIB_FSEEKO@
+# if @REPLACE_FSEEKO@
+/* Provide fseek, fseeko functions that are aware of a preceding
+   fflush(), and which detect pipes.  */
+#  define fseeko rpl_fseeko
+extern int fseeko (FILE *fp, off_t offset, int whence);
+#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef ftello
-# define ftello(f) \
-   (GL_LINK_WARNING ("ftello is unportable - " \
-                     "use gnulib module ftello for portability"), \
-    ftello (f))
+# undef fseeko
+# define fseeko(f,o,w) \
+   (GL_LINK_WARNING ("fseeko is unportable - " \
+                     "use gnulib module fseeko for portability"), \
+    fseeko (f, o, w))
 #endif
 
 #if @GNULIB_FTELL@ && @REPLACE_FTELL@
@@ -387,90 +259,18 @@ extern long rpl_ftell (FILE *fp);
 # endif
 #endif
 
-#if @GNULIB_FFLUSH@
-# if @REPLACE_FFLUSH@
-#  define fflush rpl_fflush
-  /* Flush all pending data on STREAM according to POSIX rules.  Both
-     output and seekable input streams are supported.
-     Note! LOSS OF DATA can occur if fflush is applied on an input stream
-     that is _not_seekable_ or on an update stream that is _not_seekable_
-     and in which the most recent operation was input.  Seekability can
-     be tested with lseek(fileno(fp),0,SEEK_CUR).  */
-  extern int fflush (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fflush
-# define fflush(f) \
-   (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
-                     "use gnulib module fflush for portable " \
-                     "POSIX compliance"), \
-    fflush (f))
-#endif
-
-#if @GNULIB_FPURGE@
-# if @REPLACE_FPURGE@
-#  define fpurge rpl_fpurge
-# endif
-# if @REPLACE_FPURGE@ || address@hidden@
-  /* Discard all pending buffered I/O data on STREAM.
-     STREAM must not be wide-character oriented.
-     When discarding pending output, the file position is set back to where it
-     was before the write calls.  When discarding pending input, the file
-     position is advanced to match the end of the previously read input.
-     Return 0 if successful.  Upon error, return -1 and set errno.  */
-  extern int fpurge (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fpurge
-# define fpurge(f) \
-   (GL_LINK_WARNING ("fpurge is not always present - " \
-                     "use gnulib module fpurge for portability"), \
-    fpurge (f))
-#endif
-
-#if @GNULIB_FCLOSE@
-# if @REPLACE_FCLOSE@
-#  define fclose rpl_fclose
-  /* Close STREAM and its underlying file descriptor.  */
-extern int fclose (FILE *stream);
+#if @GNULIB_FTELLO@
+# if @REPLACE_FTELLO@
+#  define ftello rpl_ftello
+extern off_t ftello (FILE *fp);
+#  define ftell(fp) ftello (fp)
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef fclose
-# define fclose(f) \
-   (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
-                     "use gnulib module fclose for portable " \
-                     "POSIX compliance"), \
-    fclose (f))
-#endif
-
-#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef fputc
-# define fputc rpl_fputc
-extern int fputc (int c, FILE *stream);
-#endif
-
-#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef putc
-# define putc rpl_fputc
-extern int putc (int c, FILE *stream);
-#endif
-
-#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef putchar
-# define putchar rpl_putchar
-extern int putchar (int c);
-#endif
-
-#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef fputs
-# define fputs rpl_fputs
-extern int fputs (const char *string, FILE *stream);
-#endif
-
-#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef puts
-# define puts rpl_puts
-extern int puts (const char *string);
+# undef ftello
+# define ftello(f) \
+   (GL_LINK_WARNING ("ftello is unportable - " \
+                     "use gnulib module ftello for portability"), \
+    ftello (f))
 #endif
 
 #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
@@ -479,20 +279,6 @@ extern int puts (const char *string);
 extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
 #endif
 
-#if @GNULIB_POPEN@
-# if @REPLACE_POPEN@
-#  undef popen
-#  define popen rpl_popen
-extern FILE *popen (const char *cmd, const char *mode);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef popen
-# define popen(c,m) \
-   (GL_LINK_WARNING ("popen is buggy on some platforms - " \
-                     "use gnulib module popen or pipe for more portability"), \
-    popen (c, m))
-#endif
-
 #if @GNULIB_GETDELIM@
 # if address@hidden@
 /* Read input, up to (and including) the next occurrence of DELIMITER, from
@@ -534,6 +320,26 @@ extern ssize_t getline (char **lineptr, size_t *linesize, 
FILE *stream);
    getline (l, s, f))
 #endif
 
+#if @GNULIB_OBSTACK_PRINTF@
+# if @REPLACE_OBSTACK_PRINTF@
+#  define obstack_printf rpl_osbtack_printf
+#  define obstack_vprintf rpl_obstack_vprintf
+# endif
+# if @REPLACE_OBSTACK_PRINTF@ || address@hidden@
+  struct obstack;
+  /* Grow an obstack with formatted output.  Return the number of
+     bytes added to OBS.  No trailing nul byte is added, and the
+     object should be closed with obstack_finish before use.  Upon
+     memory allocation error, call obstack_alloc_failed_handler.  Upon
+     other error, return -1.  */
+  extern int obstack_printf (struct obstack *obs, const char *format, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
+  extern int obstack_vprintf (struct obstack *obs, const char *format,
+                             va_list args)
+    __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
 #if @GNULIB_PERROR@
 # if @REPLACE_PERROR@
 #  define perror rpl_perror
@@ -550,6 +356,213 @@ extern void perror (const char *string);
      perror (s))
 #endif
 
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+#  undef popen
+#  define popen rpl_popen
+extern FILE *popen (const char *cmd, const char *mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# define popen(c,m) \
+   (GL_LINK_WARNING ("popen is buggy on some platforms - " \
+                     "use gnulib module popen or pipe for more portability"), \
+    popen (c, m))
+#endif
+
+#if @GNULIB_PRINTF_POSIX@
+# if @REPLACE_PRINTF@
+/* Don't break __attribute__((format(printf,M,N))).  */
+#  define printf __printf__
+extern int printf (const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 1, 2)));
+# endif
+#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+/* Don't break __attribute__((format(printf,M,N))).  */
+# define printf __printf__
+extern int printf (const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 1, 2)));
+#elif defined GNULIB_POSIXCHECK
+# undef printf
+# define printf \
+    (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
+                      "use gnulib module printf-posix for portable " \
+                      "POSIX compliance"), \
+     printf)
+/* Don't break __attribute__((format(printf,M,N))).  */
+# define format(kind,m,n) format (__##kind##__, m, n)
+# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
+# define ____printf____ __printf__
+# define ____scanf____ __scanf__
+# define ____strftime____ __strftime__
+# define ____strfmon____ __strfmon__
+#endif
+
+#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putc
+# define putc rpl_fputc
+extern int putc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putchar
+# define putchar rpl_putchar
+extern int putchar (int c);
+#endif
+
+#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef puts
+# define puts rpl_puts
+extern int puts (const char *string);
+#endif
+
+#if @GNULIB_RENAME@
+# if @REPLACE_RENAME@
+#  undef rename
+#  define rename rpl_rename
+extern int rename (const char *old, const char *new);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rename
+# define rename(o,n)                                      \
+   (GL_LINK_WARNING ("rename is buggy on some platforms - " \
+                     "use gnulib module rename for more portability"), \
+    rename (o, n))
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+#  define snprintf rpl_snprintf
+# endif
+# if @REPLACE_SNPRINTF@ || address@hidden@
+extern int snprintf (char *str, size_t size, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 3, 4)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# define snprintf \
+    (GL_LINK_WARNING ("snprintf is unportable - " \
+                      "use gnulib module snprintf for portability"), \
+     snprintf)
+#endif
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+#  define sprintf rpl_sprintf
+extern int sprintf (char *str, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+# define sprintf \
+    (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
+                      "use gnulib module sprintf-posix for portable " \
+                      "POSIX compliance"), \
+     sprintf)
+#endif
+
+#if @GNULIB_VASPRINTF@
+# if @REPLACE_VASPRINTF@
+#  define asprintf rpl_asprintf
+#  define vasprintf rpl_vasprintf
+# endif
+# if @REPLACE_VASPRINTF@ || address@hidden@
+  /* Write formatted output to a string dynamically allocated with malloc().
+     If the memory allocation succeeds, store the address of the string in
+     *RESULT and return the number of resulting bytes, excluding the trailing
+     NUL.  Upon memory allocation error, or some other error, return -1.  */
+  extern int asprintf (char **result, const char *format, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
+  extern int vasprintf (char **result, const char *format, va_list args)
+    __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+#  define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || address@hidden@
+extern int vdprintf (int fd, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# define vdprintf(d,f,a) \
+    (GL_LINK_WARNING ("vdprintf is unportable - " \
+                      "use gnulib module vdprintf for portability"), \
+     vdprintf (d, f, a))
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@
+# if @REPLACE_VFPRINTF@
+#  define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vfprintf
+# define vfprintf(s,f,a) \
+    (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
+                      "use gnulib module vfprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vfprintf (s, f, a))
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@
+# if @REPLACE_VPRINTF@
+#  define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 1, 0)));
+# endif
+#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 1, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vprintf
+# define vprintf(f,a) \
+    (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
+                      "use gnulib module vprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vprintf (f, a))
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+#  define vsnprintf rpl_vsnprintf
+# endif
+# if @REPLACE_VSNPRINTF@ || address@hidden@
+extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 3, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# define vsnprintf(b,s,f,a) \
+    (GL_LINK_WARNING ("vsnprintf is unportable - " \
+                      "use gnulib module vsnprintf for portability"), \
+     vsnprintf (b, s, f, a))
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+#  define vsprintf rpl_vsprintf
+extern int vsprintf (char *str, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+# define vsprintf(b,f,a) \
+    (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
+                      "use gnulib module vsprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vsprintf (b, f, a))
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/gl/string.in.h b/gl/string.in.h
index 079f2df..8d48e4d 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -399,7 +399,13 @@ extern char *strcasestr (const char *haystack, const char 
*needle)
 
    See also strsep().  */
 #if @GNULIB_STRTOK_R@
-# if ! @HAVE_DECL_STRTOK_R@
+# if @REPLACE_STRTOK_R@
+#  undef strtok_r
+#  define strtok_r rpl_strtok_r
+# elif @UNDEFINE_STRTOK_R@
+#  undef strtok_r
+# endif
+# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
 extern char *strtok_r (char *restrict s, char const *restrict delim,
                       char **restrict save_ptr);
 # endif
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index f61dc65..d509aaa 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -106,6 +106,15 @@
 # define STDERR_FILENO 2
 #endif
 
+/* Ensure *_OK functions exist.  */
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
 /* Declare overridden functions.  */
 
 #ifdef __cplusplus
@@ -138,6 +147,72 @@ extern int chown (const char *file, uid_t uid, gid_t gid);
 #endif
 
 
+#if @GNULIB_FCHOWNAT@
+# if @REPLACE_FCHOWNAT@
+#  undef fchownat
+#  define fchownat rpl_fchownat
+# endif
+# if address@hidden@ || @REPLACE_FCHOWNAT@
+extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int 
flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchownat
+# define fchownat(d,n,o,g,f)                       \
+    (GL_LINK_WARNING ("fchownat is not portable - " \
+                      "use gnulib module openat for portability"), \
+     fchownat (d, n, o, g, f))
+#endif
+
+
+#if @GNULIB_UNLINKAT@
+# if address@hidden@
+extern int unlinkat (int fd, char const *file, int flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unlinkat
+# define unlinkat(d,n,f)                         \
+    (GL_LINK_WARNING ("unlinkat is not portable - " \
+                      "use gnulib module openat for portability"), \
+     unlinkat (d, n, f))
+#endif
+
+
+#if @GNULIB_FACCESSAT@
+# if address@hidden@
+int faccessat (int fd, char const *file, int mode, int flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef faccessat
+# define faccessat(d,n,m,f)                        \
+    (GL_LINK_WARNING ("faccessat is not portable - " \
+                      "use gnulib module faccessat for portability"), \
+     faccessat (d, n, m, f))
+#endif
+
+#if @GNULIB_SYMLINKAT@
+# if address@hidden@
+int symlinkat (char const *contents, int fd, char const *file);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef symlinkat
+# define symlinkat(c,d,n)                           \
+    (GL_LINK_WARNING ("symlinkat is not portable - " \
+                      "use gnulib module symlinkat for portability"), \
+     symlinkat (c, d, n))
+#endif
+
+#if @GNULIB_READLINKAT@
+# if address@hidden@
+ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlinkat
+# define readlinkat(d,n,b,l)                        \
+    (GL_LINK_WARNING ("readlinkat is not portable - " \
+                      "use gnulib module symlinkat for portability"), \
+     readlinkat (d, n, b, l))
+#endif
+
 #if @GNULIB_CLOSE@
 # if @REPLACE_CLOSE@
 /* Automatically included by modules that need a replacement for close.  */
@@ -248,11 +323,11 @@ extern int fchdir (int /*fd*/);
 #  define dup rpl_dup
 extern int dup (int);
 
-#  if @REPLACE_DUP2@
-#   undef dup2
-#  endif
-#  define dup2 rpl_dup2_fchdir
-extern int dup2 (int, int);
+/* Gnulib internal hooks needed to maintain the fchdir metadata.  */
+extern int _gl_register_fd (int fd, const char *filename);
+extern void _gl_unregister_fd (int fd);
+extern int _gl_register_dup (int oldfd, int newfd);
+extern const char *_gl_directory_name (int fd);
 
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -621,12 +696,6 @@ extern ssize_t write (int fd, const void *buf, size_t 
count);
 #endif
 
 
-#ifdef FCHDIR_REPLACEMENT
-/* gnulib internal function.  */
-extern void _gl_unregister_fd (int fd);
-#endif
-
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/gl/wctype.in.h b/gl/wctype.in.h
index f008d8f..1106b3f 100644
--- a/gl/wctype.in.h
+++ b/gl/wctype.in.h
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 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
@@ -84,6 +84,8 @@
 #  undef iswspace
 #  undef iswupper
 #  undef iswxdigit
+#  undef towlower
+#  undef towupper
 
 /* Linux libc5 has <wctype.h> and the functions but they are broken.  */
 #  if @REPLACE_ISWCNTRL@
@@ -99,6 +101,8 @@
 #   define iswspace rpl_iswspace
 #   define iswupper rpl_iswupper
 #   define iswxdigit rpl_iswxdigit
+#   define towlower rpl_towlower
+#   define towupper rpl_towupper
 #  endif
 
 static inline int
@@ -178,6 +182,18 @@ iswxdigit (wint_t wc)
          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
 }
 
+static inline wint_t
+towlower (wint_t wc)
+{
+  return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
+}
+
+static inline wint_t
+towupper (wint_t wc)
+{
+  return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
+}
+
 # endif /* ! HAVE_ISWCNTRL */
 
 #endif /* _GL_WCTYPE_H */
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 261cec5..f8bd008 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -483,7 +483,7 @@ BUILT_SOURCES += $(SYS_IOCTL_H)
 # We need the following in order to create <sys/ioctl.h> when the system
 # does not have a complete one.
 sys/ioctl.h: sys_ioctl.in.h
-       $(AM_V_at)@MKDIR_P@ sys
+       $(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' \
diff --git a/gltests/inet_pton.c b/gltests/inet_pton.c
index 62ef145..a9c9baf 100644
--- a/gltests/inet_pton.c
+++ b/gltests/inet_pton.c
@@ -1,6 +1,6 @@
 /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
 
-   Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008, 2009 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
@@ -41,10 +41,6 @@
 #include <string.h>
 #include <errno.h>
 
-#ifndef EAFNOSUPPORT
-# define EAFNOSUPPORT EINVAL
-#endif
-
 #define NS_INADDRSZ 4
 #define NS_IN6ADDRSZ 16
 #define NS_INT16SZ 2
diff --git a/gltests/test-wctype.c b/gltests/test-wctype.c
index c2d8601..5deae45 100644
--- a/gltests/test-wctype.c
+++ b/gltests/test-wctype.c
@@ -1,5 +1,5 @@
 /* Test of <wctype.h> substitute.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 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
@@ -20,8 +20,25 @@
 
 #include <wctype.h>
 
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ASSERT(expr) \
+  do                                                                        \
+    {                                                                       \
+      if (!(expr))                                                          \
+        {                                                                   \
+          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
+          abort ();                                                         \
+        }                                                                   \
+    }                                                                       \
+  while (0)
+
 /* Check that the type wint_t is defined.  */
 wint_t a = 'x';
+/* Check that WEOF is defined.  */
+wint_t e = WEOF;
 
 int
 main ()
@@ -42,5 +59,29 @@ main ()
   (void) iswupper (0);
   (void) iswxdigit (0);
 
+  /* Check that the isw* functions map WEOF to 0.  */
+  ASSERT (!iswalnum (e));
+  ASSERT (!iswalpha (e));
+#if 0 /* not portable: missing on mingw */
+  ASSERT (!iswblank (e));
+#endif
+  ASSERT (!iswcntrl (e));
+  ASSERT (!iswdigit (e));
+  ASSERT (!iswgraph (e));
+  ASSERT (!iswlower (e));
+  ASSERT (!iswprint (e));
+  ASSERT (!iswpunct (e));
+  ASSERT (!iswspace (e));
+  ASSERT (!iswupper (e));
+  ASSERT (!iswxdigit (e));
+
+  /* Check that the tow* functions exist as functions or as macros.  */
+  (void) towlower (0);
+  (void) towupper (0);
+
+  /* Check that the tow* functions map WEOF to WEOF.  */
+  ASSERT (towlower (e) == e);
+  ASSERT (towupper (e) == e);
+
   return 0;
 }
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index e1217e6..84f1cdb 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -356,77 +356,79 @@ stdio.h: stdio.in.h
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-             -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-             -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
-             -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-             -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|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_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
-             -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
-             -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
-             -e 
's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+             -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|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_FREOPEN''@|$(GNULIB_FREOPEN)|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_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
-             -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
-             -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
-             -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
-             -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
-             -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
-             -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
-             -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
              -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-             -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
              -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
              -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|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_RENAME''@|$(GNULIB_RENAME)|g' \
+             -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+             -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
              -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
-             -e 
's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
-             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
-             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
-             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|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_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|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 
's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
              -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
              -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
-             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
              -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
-             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
-             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
              -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
-             -e 
's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
-             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
              -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+             -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
              -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
-             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
              -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
-             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+             -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
              -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
-             -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
-             -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
-             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-             -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
-             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
-             -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-             -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
              -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+             -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
              -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+             -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+             -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+             -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+             -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+             -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+             -e 
's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+             -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+             -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+             -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+             -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
              < $(srcdir)/stdio.in.h; \
        } > address@hidden && \
@@ -570,6 +572,8 @@ string.h: string.in.h
              -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+             -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+             -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
              < $(srcdir)/string.in.h; \
        } > address@hidden && \
@@ -608,7 +612,9 @@ unistd.h: unistd.in.h
              -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' \
@@ -623,13 +629,18 @@ unistd.h: unistd.in.h
              -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
              -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
              -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
              -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+             -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
              -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
              -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' 
\
+             -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
              -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
              -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+             -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
              -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
@@ -640,7 +651,10 @@ unistd.h: unistd.in.h
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+             -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+             -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
@@ -649,6 +663,7 @@ unistd.h: unistd.in.h
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+             -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
              -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
              -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
diff --git a/lib/gl/m4/stdio_h.m4 b/lib/gl/m4/stdio_h.m4
index 8c9aa8f..ac5e20a 100644
--- a/lib/gl/m4/stdio_h.m4
+++ b/lib/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 17
+# stdio_h.m4 serial 18
 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -41,80 +41,82 @@ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
 
 AC_DEFUN([gl_STDIO_H_DEFAULTS],
 [
-  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
-  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
-  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
-  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
-  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
-  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
-  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
-  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
-  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
-  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
-  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
-  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
-  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
-  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
-  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
-  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
+  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
   GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])
+  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
+  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
+  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
+  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
+  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
   GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])
   GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])
   GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])
   GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])
   GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])
-  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
-  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
-  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
-  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
-  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
-  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
-  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
-  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
   GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])
-  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
+  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
+  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
   GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
+  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
+  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
+  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
+  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
+  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
+  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
+  GNULIB_RENAME=0;               AC_SUBST([GNULIB_RENAME])
+  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
+  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
   GNULIB_STDIO_H_SIGPIPE=0;      AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
+  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
+  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
+  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
+  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
+  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
+  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   dnl Assume proper GNU behavior unless another module says otherwise.
-  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
-  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
-  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
-  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
-  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
-  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
+  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
+  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
+  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
   HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
-  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
-  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
-  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
   HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
-  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
-  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
-  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
+  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
+  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
-  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
-  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
-  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
+  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
   REPLACE_FOPEN=0;               AC_SUBST([REPLACE_FOPEN])
+  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
+  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
   REPLACE_FREOPEN=0;             AC_SUBST([REPLACE_FREOPEN])
-  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
-  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
   REPLACE_FSEEK=0;               AC_SUBST([REPLACE_FSEEK])
-  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
-  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
+  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
   REPLACE_FTELL=0;               AC_SUBST([REPLACE_FTELL])
-  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
-  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
-  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
-  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
-  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
-  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
-  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
   REPLACE_GETLINE=0;             AC_SUBST([REPLACE_GETLINE])
+  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
   REPLACE_PERROR=0;              AC_SUBST([REPLACE_PERROR])
+  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
+  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
+  REPLACE_RENAME=0;              AC_SUBST([REPLACE_RENAME])
+  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
+  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
+  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
+  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
+  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
+  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
+  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
 ])
 
 dnl Code shared by fseeko and ftello.  Determine if large files are supported,
diff --git a/lib/gl/m4/string_h.m4 b/lib/gl/m4/string_h.m4
index 11f09c8..3dbbfe1 100644
--- a/lib/gl/m4/string_h.m4
+++ b/lib/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 8
 
 # Written by Paul Eggert.
 
@@ -91,4 +91,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRCASESTR=0;                AC_SUBST([REPLACE_STRCASESTR])
   REPLACE_STRERROR=0;          AC_SUBST([REPLACE_STRERROR])
   REPLACE_STRSIGNAL=0;         AC_SUBST([REPLACE_STRSIGNAL])
+  REPLACE_STRTOK_R=0;          AC_SUBST([REPLACE_STRTOK_R])
+  UNDEFINE_STRTOK_R=0;         AC_SUBST([UNDEFINE_STRTOK_R])
 ])
diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index 53fc330..84f0755 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 21
+# unistd_h.m4 serial 24
 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,7 +38,9 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_DUP3=0;             AC_SUBST([GNULIB_DUP3])
   GNULIB_ENVIRON=0;          AC_SUBST([GNULIB_ENVIRON])
   GNULIB_EUIDACCESS=0;       AC_SUBST([GNULIB_EUIDACCESS])
+  GNULIB_FACCESSAT=0;        AC_SUBST([GNULIB_FACCESSAT])
   GNULIB_FCHDIR=0;           AC_SUBST([GNULIB_FCHDIR])
+  GNULIB_FCHOWNAT=0;         AC_SUBST([GNULIB_FCHOWNAT])
   GNULIB_FSYNC=0;            AC_SUBST([GNULIB_FSYNC])
   GNULIB_FTRUNCATE=0;        AC_SUBST([GNULIB_FTRUNCATE])
   GNULIB_GETCWD=0;           AC_SUBST([GNULIB_GETCWD])
@@ -53,14 +55,19 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
   GNULIB_PIPE2=0;            AC_SUBST([GNULIB_PIPE2])
   GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
+  GNULIB_READLINKAT=0;       AC_SUBST([GNULIB_READLINKAT])
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
+  GNULIB_SYMLINKAT=0;        AC_SUBST([GNULIB_SYMLINKAT])
   GNULIB_UNISTD_H_GETOPT=0;  AC_SUBST([GNULIB_UNISTD_H_GETOPT])
   GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+  GNULIB_UNLINKAT=0;         AC_SUBST([GNULIB_UNLINKAT])
   GNULIB_WRITE=0;            AC_SUBST([GNULIB_WRITE])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
   HAVE_DUP3=1;            AC_SUBST([HAVE_DUP3])
   HAVE_EUIDACCESS=1;      AC_SUBST([HAVE_EUIDACCESS])
+  HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
+  HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
   HAVE_GETDOMAINNAME=1;   AC_SUBST([HAVE_GETDOMAINNAME])
@@ -71,15 +78,19 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_PIPE2=1;           AC_SUBST([HAVE_PIPE2])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
+  HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
+  HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
+  HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
   REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHDIR=0;       AC_SUBST([REPLACE_FCHDIR])
+  REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETPAGESIZE=0;  AC_SUBST([REPLACE_GETPAGESIZE])
   REPLACE_LCHOWN=0;       AC_SUBST([REPLACE_LCHOWN])
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 887b0ae..e4608aa 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -68,154 +68,6 @@
 extern "C" {
 #endif
 
-
-#if @GNULIB_FPRINTF_POSIX@
-# if @REPLACE_FPRINTF@
-#  define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define fprintf rpl_fprintf
-extern int fprintf (FILE *fp, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-#elif defined GNULIB_POSIXCHECK
-# undef fprintf
-# define fprintf \
-    (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
-                      "use gnulib module fprintf-posix for portable " \
-                      "POSIX compliance"), \
-     fprintf)
-#endif
-
-#if @GNULIB_VFPRINTF_POSIX@
-# if @REPLACE_VFPRINTF@
-#  define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define vfprintf rpl_vfprintf
-extern int vfprintf (FILE *fp, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-#elif defined GNULIB_POSIXCHECK
-# undef vfprintf
-# define vfprintf(s,f,a) \
-    (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
-                      "use gnulib module vfprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vfprintf (s, f, a))
-#endif
-
-#if @GNULIB_PRINTF_POSIX@
-# if @REPLACE_PRINTF@
-/* Don't break __attribute__((format(printf,M,N))).  */
-#  define printf __printf__
-extern int printf (const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 1, 2)));
-# endif
-#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-/* Don't break __attribute__((format(printf,M,N))).  */
-# define printf __printf__
-extern int printf (const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 1, 2)));
-#elif defined GNULIB_POSIXCHECK
-# undef printf
-# define printf \
-    (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
-                      "use gnulib module printf-posix for portable " \
-                      "POSIX compliance"), \
-     printf)
-/* Don't break __attribute__((format(printf,M,N))).  */
-# define format(kind,m,n) format (__##kind##__, m, n)
-# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
-# define ____printf____ __printf__
-# define ____scanf____ __scanf__
-# define ____strftime____ __strftime__
-# define ____strfmon____ __strfmon__
-#endif
-
-#if @GNULIB_VPRINTF_POSIX@
-# if @REPLACE_VPRINTF@
-#  define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 1, 0)));
-# endif
-#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
-# define vprintf rpl_vprintf
-extern int vprintf (const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 1, 0)));
-#elif defined GNULIB_POSIXCHECK
-# undef vprintf
-# define vprintf(f,a) \
-    (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
-                      "use gnulib module vprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vprintf (f, a))
-#endif
-
-#if @GNULIB_SNPRINTF@
-# if @REPLACE_SNPRINTF@
-#  define snprintf rpl_snprintf
-# endif
-# if @REPLACE_SNPRINTF@ || address@hidden@
-extern int snprintf (char *str, size_t size, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 3, 4)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef snprintf
-# define snprintf \
-    (GL_LINK_WARNING ("snprintf is unportable - " \
-                      "use gnulib module snprintf for portability"), \
-     snprintf)
-#endif
-
-#if @GNULIB_VSNPRINTF@
-# if @REPLACE_VSNPRINTF@
-#  define vsnprintf rpl_vsnprintf
-# endif
-# if @REPLACE_VSNPRINTF@ || address@hidden@
-extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 3, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsnprintf
-# define vsnprintf(b,s,f,a) \
-    (GL_LINK_WARNING ("vsnprintf is unportable - " \
-                      "use gnulib module vsnprintf for portability"), \
-     vsnprintf (b, s, f, a))
-#endif
-
-#if @GNULIB_SPRINTF_POSIX@
-# if @REPLACE_SPRINTF@
-#  define sprintf rpl_sprintf
-extern int sprintf (char *str, const char *format, ...)
-       __attribute__ ((__format__ (__printf__, 2, 3)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef sprintf
-# define sprintf \
-    (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
-                      "use gnulib module sprintf-posix for portable " \
-                      "POSIX compliance"), \
-     sprintf)
-#endif
-
-#if @GNULIB_VSPRINTF_POSIX@
-# if @REPLACE_VSPRINTF@
-#  define vsprintf rpl_vsprintf
-extern int vsprintf (char *str, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef vsprintf
-# define vsprintf(b,f,a) \
-    (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
-                      "use gnulib module vsprintf-posix for portable " \
-                      "POSIX compliance"), \
-     vsprintf (b, f, a))
-#endif
-
 #if @GNULIB_DPRINTF@
 # if @REPLACE_DPRINTF@
 #  define dprintf rpl_dprintf
@@ -232,57 +84,39 @@ extern int dprintf (int fd, const char *format, ...)
      dprintf (d, f, a))
 #endif
 
-#if @GNULIB_VDPRINTF@
-# if @REPLACE_VDPRINTF@
-#  define vdprintf rpl_vdprintf
-# endif
-# if @REPLACE_VDPRINTF@ || address@hidden@
-extern int vdprintf (int fd, const char *format, va_list args)
-       __attribute__ ((__format__ (__printf__, 2, 0)));
+#if @GNULIB_FCLOSE@
+# if @REPLACE_FCLOSE@
+#  define fclose rpl_fclose
+  /* Close STREAM and its underlying file descriptor.  */
+extern int fclose (FILE *stream);
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef vdprintf
-# define vdprintf(d,f,a) \
-    (GL_LINK_WARNING ("vdprintf is unportable - " \
-                      "use gnulib module vdprintf for portability"), \
-     vdprintf (d, f, a))
-#endif
-
-#if @GNULIB_VASPRINTF@
-# if @REPLACE_VASPRINTF@
-#  define asprintf rpl_asprintf
-#  define vasprintf rpl_vasprintf
-# endif
-# if @REPLACE_VASPRINTF@ || address@hidden@
-  /* Write formatted output to a string dynamically allocated with malloc().
-     If the memory allocation succeeds, store the address of the string in
-     *RESULT and return the number of resulting bytes, excluding the trailing
-     NUL.  Upon memory allocation error, or some other error, return -1.  */
-  extern int asprintf (char **result, const char *format, ...)
-    __attribute__ ((__format__ (__printf__, 2, 3)));
-  extern int vasprintf (char **result, const char *format, va_list args)
-    __attribute__ ((__format__ (__printf__, 2, 0)));
-# endif
+# undef fclose
+# define fclose(f) \
+   (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
+                     "use gnulib module fclose for portable " \
+                     "POSIX compliance"), \
+    fclose (f))
 #endif
 
-#if @GNULIB_OBSTACK_PRINTF@
-# if @REPLACE_OBSTACK_PRINTF@
-#  define obstack_printf rpl_osbtack_printf
-#  define obstack_vprintf rpl_obstack_vprintf
-# endif
-# if @REPLACE_OBSTACK_PRINTF@ || address@hidden@
-  struct obstack;
-  /* Grow an obstack with formatted output.  Return the number of
-     bytes added to OBS.  No trailing nul byte is added, and the
-     object should be closed with obstack_finish before use.  Upon
-     memory allocation error, call obstack_alloc_failed_handler.  Upon
-     other error, return -1.  */
-  extern int obstack_printf (struct obstack *obs, const char *format, ...)
-    __attribute__ ((__format__ (__printf__, 2, 3)));
-  extern int obstack_vprintf (struct obstack *obs, const char *format,
-                             va_list args)
-    __attribute__ ((__format__ (__printf__, 2, 0)));
+#if @GNULIB_FFLUSH@
+# if @REPLACE_FFLUSH@
+#  define fflush rpl_fflush
+  /* Flush all pending data on STREAM according to POSIX rules.  Both
+     output and seekable input streams are supported.
+     Note! LOSS OF DATA can occur if fflush is applied on an input stream
+     that is _not_seekable_ or on an update stream that is _not_seekable_
+     and in which the most recent operation was input.  Seekability can
+     be tested with lseek(fileno(fp),0,SEEK_CUR).  */
+  extern int fflush (FILE *gl_stream);
 # endif
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+# define fflush(f) \
+   (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
+                     "use gnulib module fflush for portable " \
+                     "POSIX compliance"), \
+    fflush (f))
 #endif
 
 #if @GNULIB_FOPEN@
@@ -299,6 +133,58 @@ extern FILE * fopen (const char *filename, const char 
*mode);
     fopen (f, m))
 #endif
 
+#if @GNULIB_FPRINTF_POSIX@
+# if @REPLACE_FPRINTF@
+#  define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+#elif defined GNULIB_POSIXCHECK
+# undef fprintf
+# define fprintf \
+    (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
+                      "use gnulib module fprintf-posix for portable " \
+                      "POSIX compliance"), \
+     fprintf)
+#endif
+
+#if @GNULIB_FPURGE@
+# if @REPLACE_FPURGE@
+#  define fpurge rpl_fpurge
+# endif
+# if @REPLACE_FPURGE@ || address@hidden@
+  /* Discard all pending buffered I/O data on STREAM.
+     STREAM must not be wide-character oriented.
+     When discarding pending output, the file position is set back to where it
+     was before the write calls.  When discarding pending input, the file
+     position is advanced to match the end of the previously read input.
+     Return 0 if successful.  Upon error, return -1 and set errno.  */
+  extern int fpurge (FILE *gl_stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fpurge
+# define fpurge(f) \
+   (GL_LINK_WARNING ("fpurge is not always present - " \
+                     "use gnulib module fpurge for portability"), \
+    fpurge (f))
+#endif
+
+#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputc
+# define fputc rpl_fputc
+extern int fputc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputs
+# define fputs rpl_fputs
+extern int fputs (const char *string, FILE *stream);
+#endif
+
 #if @GNULIB_FREOPEN@
 # if @REPLACE_FREOPEN@
 #  undef freopen
@@ -313,22 +199,6 @@ extern FILE * freopen (const char *filename, const char 
*mode, FILE *stream);
     freopen (f, m, s))
 #endif
 
-#if @GNULIB_FSEEKO@
-# if @REPLACE_FSEEKO@
-/* Provide fseek, fseeko functions that are aware of a preceding
-   fflush(), and which detect pipes.  */
-#  define fseeko rpl_fseeko
-extern int fseeko (FILE *fp, off_t offset, int whence);
-#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fseeko
-# define fseeko(f,o,w) \
-   (GL_LINK_WARNING ("fseeko is unportable - " \
-                     "use gnulib module fseeko for portability"), \
-    fseeko (f, o, w))
-#endif
-
 #if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
 extern int rpl_fseek (FILE *fp, long offset, int whence);
 # undef fseek
@@ -351,18 +221,20 @@ extern int rpl_fseek (FILE *fp, long offset, int whence);
 # endif
 #endif
 
-#if @GNULIB_FTELLO@
-# if @REPLACE_FTELLO@
-#  define ftello rpl_ftello
-extern off_t ftello (FILE *fp);
-#  define ftell(fp) ftello (fp)
+#if @GNULIB_FSEEKO@
+# if @REPLACE_FSEEKO@
+/* Provide fseek, fseeko functions that are aware of a preceding
+   fflush(), and which detect pipes.  */
+#  define fseeko rpl_fseeko
+extern int fseeko (FILE *fp, off_t offset, int whence);
+#  define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef ftello
-# define ftello(f) \
-   (GL_LINK_WARNING ("ftello is unportable - " \
-                     "use gnulib module ftello for portability"), \
-    ftello (f))
+# undef fseeko
+# define fseeko(f,o,w) \
+   (GL_LINK_WARNING ("fseeko is unportable - " \
+                     "use gnulib module fseeko for portability"), \
+    fseeko (f, o, w))
 #endif
 
 #if @GNULIB_FTELL@ && @REPLACE_FTELL@
@@ -387,90 +259,18 @@ extern long rpl_ftell (FILE *fp);
 # endif
 #endif
 
-#if @GNULIB_FFLUSH@
-# if @REPLACE_FFLUSH@
-#  define fflush rpl_fflush
-  /* Flush all pending data on STREAM according to POSIX rules.  Both
-     output and seekable input streams are supported.
-     Note! LOSS OF DATA can occur if fflush is applied on an input stream
-     that is _not_seekable_ or on an update stream that is _not_seekable_
-     and in which the most recent operation was input.  Seekability can
-     be tested with lseek(fileno(fp),0,SEEK_CUR).  */
-  extern int fflush (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fflush
-# define fflush(f) \
-   (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
-                     "use gnulib module fflush for portable " \
-                     "POSIX compliance"), \
-    fflush (f))
-#endif
-
-#if @GNULIB_FPURGE@
-# if @REPLACE_FPURGE@
-#  define fpurge rpl_fpurge
-# endif
-# if @REPLACE_FPURGE@ || address@hidden@
-  /* Discard all pending buffered I/O data on STREAM.
-     STREAM must not be wide-character oriented.
-     When discarding pending output, the file position is set back to where it
-     was before the write calls.  When discarding pending input, the file
-     position is advanced to match the end of the previously read input.
-     Return 0 if successful.  Upon error, return -1 and set errno.  */
-  extern int fpurge (FILE *gl_stream);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef fpurge
-# define fpurge(f) \
-   (GL_LINK_WARNING ("fpurge is not always present - " \
-                     "use gnulib module fpurge for portability"), \
-    fpurge (f))
-#endif
-
-#if @GNULIB_FCLOSE@
-# if @REPLACE_FCLOSE@
-#  define fclose rpl_fclose
-  /* Close STREAM and its underlying file descriptor.  */
-extern int fclose (FILE *stream);
+#if @GNULIB_FTELLO@
+# if @REPLACE_FTELLO@
+#  define ftello rpl_ftello
+extern off_t ftello (FILE *fp);
+#  define ftell(fp) ftello (fp)
 # endif
 #elif defined GNULIB_POSIXCHECK
-# undef fclose
-# define fclose(f) \
-   (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
-                     "use gnulib module fclose for portable " \
-                     "POSIX compliance"), \
-    fclose (f))
-#endif
-
-#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef fputc
-# define fputc rpl_fputc
-extern int fputc (int c, FILE *stream);
-#endif
-
-#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef putc
-# define putc rpl_fputc
-extern int putc (int c, FILE *stream);
-#endif
-
-#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef putchar
-# define putchar rpl_putchar
-extern int putchar (int c);
-#endif
-
-#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef fputs
-# define fputs rpl_fputs
-extern int fputs (const char *string, FILE *stream);
-#endif
-
-#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
-# undef puts
-# define puts rpl_puts
-extern int puts (const char *string);
+# undef ftello
+# define ftello(f) \
+   (GL_LINK_WARNING ("ftello is unportable - " \
+                     "use gnulib module ftello for portability"), \
+    ftello (f))
 #endif
 
 #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
@@ -479,20 +279,6 @@ extern int puts (const char *string);
 extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
 #endif
 
-#if @GNULIB_POPEN@
-# if @REPLACE_POPEN@
-#  undef popen
-#  define popen rpl_popen
-extern FILE *popen (const char *cmd, const char *mode);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef popen
-# define popen(c,m) \
-   (GL_LINK_WARNING ("popen is buggy on some platforms - " \
-                     "use gnulib module popen or pipe for more portability"), \
-    popen (c, m))
-#endif
-
 #if @GNULIB_GETDELIM@
 # if address@hidden@
 /* Read input, up to (and including) the next occurrence of DELIMITER, from
@@ -534,6 +320,26 @@ extern ssize_t getline (char **lineptr, size_t *linesize, 
FILE *stream);
    getline (l, s, f))
 #endif
 
+#if @GNULIB_OBSTACK_PRINTF@
+# if @REPLACE_OBSTACK_PRINTF@
+#  define obstack_printf rpl_osbtack_printf
+#  define obstack_vprintf rpl_obstack_vprintf
+# endif
+# if @REPLACE_OBSTACK_PRINTF@ || address@hidden@
+  struct obstack;
+  /* Grow an obstack with formatted output.  Return the number of
+     bytes added to OBS.  No trailing nul byte is added, and the
+     object should be closed with obstack_finish before use.  Upon
+     memory allocation error, call obstack_alloc_failed_handler.  Upon
+     other error, return -1.  */
+  extern int obstack_printf (struct obstack *obs, const char *format, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
+  extern int obstack_vprintf (struct obstack *obs, const char *format,
+                             va_list args)
+    __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
 #if @GNULIB_PERROR@
 # if @REPLACE_PERROR@
 #  define perror rpl_perror
@@ -550,6 +356,213 @@ extern void perror (const char *string);
      perror (s))
 #endif
 
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+#  undef popen
+#  define popen rpl_popen
+extern FILE *popen (const char *cmd, const char *mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# define popen(c,m) \
+   (GL_LINK_WARNING ("popen is buggy on some platforms - " \
+                     "use gnulib module popen or pipe for more portability"), \
+    popen (c, m))
+#endif
+
+#if @GNULIB_PRINTF_POSIX@
+# if @REPLACE_PRINTF@
+/* Don't break __attribute__((format(printf,M,N))).  */
+#  define printf __printf__
+extern int printf (const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 1, 2)));
+# endif
+#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+/* Don't break __attribute__((format(printf,M,N))).  */
+# define printf __printf__
+extern int printf (const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 1, 2)));
+#elif defined GNULIB_POSIXCHECK
+# undef printf
+# define printf \
+    (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
+                      "use gnulib module printf-posix for portable " \
+                      "POSIX compliance"), \
+     printf)
+/* Don't break __attribute__((format(printf,M,N))).  */
+# define format(kind,m,n) format (__##kind##__, m, n)
+# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
+# define ____printf____ __printf__
+# define ____scanf____ __scanf__
+# define ____strftime____ __strftime__
+# define ____strfmon____ __strfmon__
+#endif
+
+#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putc
+# define putc rpl_fputc
+extern int putc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putchar
+# define putchar rpl_putchar
+extern int putchar (int c);
+#endif
+
+#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef puts
+# define puts rpl_puts
+extern int puts (const char *string);
+#endif
+
+#if @GNULIB_RENAME@
+# if @REPLACE_RENAME@
+#  undef rename
+#  define rename rpl_rename
+extern int rename (const char *old, const char *new);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rename
+# define rename(o,n)                                      \
+   (GL_LINK_WARNING ("rename is buggy on some platforms - " \
+                     "use gnulib module rename for more portability"), \
+    rename (o, n))
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+#  define snprintf rpl_snprintf
+# endif
+# if @REPLACE_SNPRINTF@ || address@hidden@
+extern int snprintf (char *str, size_t size, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 3, 4)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# define snprintf \
+    (GL_LINK_WARNING ("snprintf is unportable - " \
+                      "use gnulib module snprintf for portability"), \
+     snprintf)
+#endif
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+#  define sprintf rpl_sprintf
+extern int sprintf (char *str, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+# define sprintf \
+    (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
+                      "use gnulib module sprintf-posix for portable " \
+                      "POSIX compliance"), \
+     sprintf)
+#endif
+
+#if @GNULIB_VASPRINTF@
+# if @REPLACE_VASPRINTF@
+#  define asprintf rpl_asprintf
+#  define vasprintf rpl_vasprintf
+# endif
+# if @REPLACE_VASPRINTF@ || address@hidden@
+  /* Write formatted output to a string dynamically allocated with malloc().
+     If the memory allocation succeeds, store the address of the string in
+     *RESULT and return the number of resulting bytes, excluding the trailing
+     NUL.  Upon memory allocation error, or some other error, return -1.  */
+  extern int asprintf (char **result, const char *format, ...)
+    __attribute__ ((__format__ (__printf__, 2, 3)));
+  extern int vasprintf (char **result, const char *format, va_list args)
+    __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+#  define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || address@hidden@
+extern int vdprintf (int fd, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# define vdprintf(d,f,a) \
+    (GL_LINK_WARNING ("vdprintf is unportable - " \
+                      "use gnulib module vdprintf for portability"), \
+     vdprintf (d, f, a))
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@
+# if @REPLACE_VFPRINTF@
+#  define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vfprintf
+# define vfprintf(s,f,a) \
+    (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
+                      "use gnulib module vfprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vfprintf (s, f, a))
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@
+# if @REPLACE_VPRINTF@
+#  define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 1, 0)));
+# endif
+#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && 
@GNULIB_STDIO_H_SIGPIPE@
+# define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 1, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vprintf
+# define vprintf(f,a) \
+    (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
+                      "use gnulib module vprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vprintf (f, a))
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+#  define vsnprintf rpl_vsnprintf
+# endif
+# if @REPLACE_VSNPRINTF@ || address@hidden@
+extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 3, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# define vsnprintf(b,s,f,a) \
+    (GL_LINK_WARNING ("vsnprintf is unportable - " \
+                      "use gnulib module vsnprintf for portability"), \
+     vsnprintf (b, s, f, a))
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+#  define vsprintf rpl_vsprintf
+extern int vsprintf (char *str, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+# define vsprintf(b,f,a) \
+    (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
+                      "use gnulib module vsprintf-posix for portable " \
+                      "POSIX compliance"), \
+     vsprintf (b, f, a))
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h
index 45e0efb..1815566 100644
--- a/lib/gl/string.in.h
+++ b/lib/gl/string.in.h
@@ -399,7 +399,13 @@ extern char *strcasestr (const char *haystack, const char 
*needle)
 
    See also strsep().  */
 #if @GNULIB_STRTOK_R@
-# if ! @HAVE_DECL_STRTOK_R@
+# if @REPLACE_STRTOK_R@
+#  undef strtok_r
+#  define strtok_r rpl_strtok_r
+# elif @UNDEFINE_STRTOK_R@
+#  undef strtok_r
+# endif
+# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
 extern char *strtok_r (char *restrict s, char const *restrict delim,
                       char **restrict save_ptr);
 # endif
diff --git a/lib/gl/unistd.in.h b/lib/gl/unistd.in.h
index a259483..3b40310 100644
--- a/lib/gl/unistd.in.h
+++ b/lib/gl/unistd.in.h
@@ -106,6 +106,15 @@
 # define STDERR_FILENO 2
 #endif
 
+/* Ensure *_OK functions exist.  */
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
 /* Declare overridden functions.  */
 
 #ifdef __cplusplus
@@ -138,6 +147,72 @@ extern int chown (const char *file, uid_t uid, gid_t gid);
 #endif
 
 
+#if @GNULIB_FCHOWNAT@
+# if @REPLACE_FCHOWNAT@
+#  undef fchownat
+#  define fchownat rpl_fchownat
+# endif
+# if address@hidden@ || @REPLACE_FCHOWNAT@
+extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int 
flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchownat
+# define fchownat(d,n,o,g,f)                       \
+    (GL_LINK_WARNING ("fchownat is not portable - " \
+                      "use gnulib module openat for portability"), \
+     fchownat (d, n, o, g, f))
+#endif
+
+
+#if @GNULIB_UNLINKAT@
+# if address@hidden@
+extern int unlinkat (int fd, char const *file, int flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unlinkat
+# define unlinkat(d,n,f)                         \
+    (GL_LINK_WARNING ("unlinkat is not portable - " \
+                      "use gnulib module openat for portability"), \
+     unlinkat (d, n, f))
+#endif
+
+
+#if @GNULIB_FACCESSAT@
+# if address@hidden@
+int faccessat (int fd, char const *file, int mode, int flag);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef faccessat
+# define faccessat(d,n,m,f)                        \
+    (GL_LINK_WARNING ("faccessat is not portable - " \
+                      "use gnulib module faccessat for portability"), \
+     faccessat (d, n, m, f))
+#endif
+
+#if @GNULIB_SYMLINKAT@
+# if address@hidden@
+int symlinkat (char const *contents, int fd, char const *file);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef symlinkat
+# define symlinkat(c,d,n)                           \
+    (GL_LINK_WARNING ("symlinkat is not portable - " \
+                      "use gnulib module symlinkat for portability"), \
+     symlinkat (c, d, n))
+#endif
+
+#if @GNULIB_READLINKAT@
+# if address@hidden@
+ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlinkat
+# define readlinkat(d,n,b,l)                        \
+    (GL_LINK_WARNING ("readlinkat is not portable - " \
+                      "use gnulib module symlinkat for portability"), \
+     readlinkat (d, n, b, l))
+#endif
+
 #if @GNULIB_CLOSE@
 # if @REPLACE_CLOSE@
 /* Automatically included by modules that need a replacement for close.  */
@@ -248,11 +323,11 @@ extern int fchdir (int /*fd*/);
 #  define dup rpl_dup
 extern int dup (int);
 
-#  if @REPLACE_DUP2@
-#   undef dup2
-#  endif
-#  define dup2 rpl_dup2_fchdir
-extern int dup2 (int, int);
+/* Gnulib internal hooks needed to maintain the fchdir metadata.  */
+extern int _gl_register_fd (int fd, const char *filename);
+extern void _gl_unregister_fd (int fd);
+extern int _gl_register_dup (int oldfd, int newfd);
+extern const char *_gl_directory_name (int fd);
 
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -621,12 +696,6 @@ extern ssize_t write (int fd, const void *buf, size_t 
count);
 #endif
 
 
-#ifdef FCHDIR_REPLACEMENT
-/* gnulib internal function.  */
-extern void _gl_unregister_fd (int fd);
-#endif
-
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/maint.mk b/lib/maint.mk
index 21782e5..c0c3f27 100644
--- a/lib/maint.mk
+++ b/lib/maint.mk
@@ -74,8 +74,8 @@ export LC_ALL = C
 _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
 
 # Collect the names of rules starting with `sc_'.
-syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
-                       $(srcdir)/$(ME) $(_cfg_mk))
+syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' 
\
+                       $(srcdir)/$(ME) $(_cfg_mk)))
 .PHONY: $(syntax-check-rules)
 
 local-checks-available = \
@@ -293,6 +293,11 @@ sc_prohibit_root_dev_ino_without_use:
        re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
          $(_header_without_use)
 
+sc_prohibit_openat_without_use:
+       @h='"openat.h"' \
+       
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>'
 \
+         $(_header_without_use)
+
 # Prohibit the inclusion of c-ctype.h without an actual use.
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
 |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
@@ -618,21 +623,6 @@ vc-diff-check:
          rm vc-diffs;                                          \
        fi
 
-cvs-check: vc-diff-check
-
-ALL_RECURSIVE_TARGETS += maintainer-distcheck
-maintainer-distcheck:
-       $(MAKE) distcheck
-       $(MAKE) taint-distcheck
-       $(MAKE) my-distcheck
-
-
-# Don't make a distribution if checks fail.
-# Also, make sure the NEWS file is up-to-date.
-ALL_RECURSIVE_TARGETS += vc-dist
-vc-dist: $(local-check) cvs-check maintainer-distcheck
-       XZ_OPT=9ev $(MAKE) dist
-
 # Use this to make sure we don't run these programs when building
 # from a virgin tgz file, below.
 null_AM_MAKEFLAGS = \
@@ -708,8 +698,10 @@ alpha beta major: $(local-check) writable-files 
no-submodule-changes
          && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
               || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
          || :
-       $(MAKE) vc-dist
+       $(MAKE) vc-diff-check
        $(MAKE) news-date-check
+       $(MAKE) distcheck
+       $(MAKE) dist XZ_OPT=-9ev
        $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
        if test -d $(release_archive_dir); then                 \
          ln $(rel-files) $(release_archive_dir);               \
diff --git a/maint.mk b/maint.mk
index 21782e5..c0c3f27 100644
--- a/maint.mk
+++ b/maint.mk
@@ -74,8 +74,8 @@ export LC_ALL = C
 _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
 
 # Collect the names of rules starting with `sc_'.
-syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
-                       $(srcdir)/$(ME) $(_cfg_mk))
+syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' 
\
+                       $(srcdir)/$(ME) $(_cfg_mk)))
 .PHONY: $(syntax-check-rules)
 
 local-checks-available = \
@@ -293,6 +293,11 @@ sc_prohibit_root_dev_ino_without_use:
        re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
          $(_header_without_use)
 
+sc_prohibit_openat_without_use:
+       @h='"openat.h"' \
+       
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>'
 \
+         $(_header_without_use)
+
 # Prohibit the inclusion of c-ctype.h without an actual use.
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
 |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
@@ -618,21 +623,6 @@ vc-diff-check:
          rm vc-diffs;                                          \
        fi
 
-cvs-check: vc-diff-check
-
-ALL_RECURSIVE_TARGETS += maintainer-distcheck
-maintainer-distcheck:
-       $(MAKE) distcheck
-       $(MAKE) taint-distcheck
-       $(MAKE) my-distcheck
-
-
-# Don't make a distribution if checks fail.
-# Also, make sure the NEWS file is up-to-date.
-ALL_RECURSIVE_TARGETS += vc-dist
-vc-dist: $(local-check) cvs-check maintainer-distcheck
-       XZ_OPT=9ev $(MAKE) dist
-
 # Use this to make sure we don't run these programs when building
 # from a virgin tgz file, below.
 null_AM_MAKEFLAGS = \
@@ -708,8 +698,10 @@ alpha beta major: $(local-check) writable-files 
no-submodule-changes
          && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
               || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
          || :
-       $(MAKE) vc-dist
+       $(MAKE) vc-diff-check
        $(MAKE) news-date-check
+       $(MAKE) distcheck
+       $(MAKE) dist XZ_OPT=-9ev
        $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
        if test -d $(release_archive_dir); then                 \
          ln $(rel-files) $(release_archive_dir);               \


hooks/post-receive
-- 
GNU gsasl




reply via email to

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