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-7-3-28-g75de253


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-7-3-28-g75de253
Date: Tue, 15 May 2012 23:40:09 +0000

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

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=75de253f48e230d8a84ec2f6b8eeb9e9fd8fc818

The branch, master has been updated
       via  75de253f48e230d8a84ec2f6b8eeb9e9fd8fc818 (commit)
       via  7003e40e459320285d77478e107d7fb6290e1801 (commit)
       via  69889293970bb2fe45e58366debefc76220db090 (commit)
       via  4610a35fbd0c6c01430bba3f25d18a1cd612166e (commit)
       via  91abe4d2f76f969050d226d298b025328878077a (commit)
       via  54f724f1825e854aa74cd15486f57663f2910f30 (commit)
       via  89b497474840a7e30b99ed779e017a607dc46a60 (commit)
       via  f6a716ce2a6981f1086e61c70de5812c391c39c4 (commit)
       via  3032d4f1394b943eff9f626c78550d208e86f7f5 (commit)
       via  e9a324ebe45d52d64a7e2fad4dca5bc7ca36baad (commit)
       via  8f746820aad4563fa5042f4bf7cabe09c3603f13 (commit)
       via  1dd81daf3dbc696c23cff769c92b91657edd67b4 (commit)
       via  da76c085451786b38127520c34f67e18156241e1 (commit)
       via  08b084d7871fda443d165cf431ea6088bcc630c9 (commit)
       via  9503950bb19a8d0ec0aa80b50793a221c918cd35 (commit)
       via  c2a169a1e74ef884efb86e04eafc84b6e74635c2 (commit)
       via  ef43098d74c1e550d694c0a8a5179bd31273c07a (commit)
       via  f073beb0d17d3ea19e881beb494b98d89f26ae89 (commit)
       via  c650d4134527490e1d7ea613c3e46eef416977e2 (commit)
       via  c42ad2694a5387281b7972b1990fa08b39d018eb (commit)
       via  ccde3c9206e804a85dee274826d15f2cf4cd2e16 (commit)
       via  147561bd1a011e53596f8e9b3af2f81aee79e37d (commit)
       via  710a4c0150216280a846b0e360acfd38eaa6bba9 (commit)
       via  90c1ea7e3d27e0233592e788bba5059e402c332a (commit)
       via  0ced600d1f050d44226b759461d0f5767d0af945 (commit)
      from  2e4fa1f74d50d12fb391d8823255d3397e6f4600 (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 75de253f48e230d8a84ec2f6b8eeb9e9fd8fc818
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:53:22 2012 +0200

    Version 1.7.4.

commit 7003e40e459320285d77478e107d7fb6290e1801
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:53:15 2012 +0200

    Mention valgrind suppressions file.

commit 69889293970bb2fe45e58366debefc76220db090
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:37:42 2012 +0200

    Doc fix.

commit 4610a35fbd0c6c01430bba3f25d18a1cd612166e
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:34:12 2012 +0200

    Update gnulib files.

commit 91abe4d2f76f969050d226d298b025328878077a
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:25:23 2012 +0200

    Ignore more.

commit 54f724f1825e854aa74cd15486f57663f2910f30
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:24:04 2012 +0200

    Don't use pdflatex as it causes multiple hard errors.
    
    See <http://archives.postgresql.org/pgsql-docs/2011-01/msg00039.php>
    for discussion around the problem.  The problem occurs on too many
    functions in GNU SASL for it to be possible to reword them all to
    work around the problem.

commit 89b497474840a7e30b99ed779e017a607dc46a60
Author: Simon Josefsson <address@hidden>
Date:   Wed May 16 00:04:33 2012 +0200

    Mention doxygen.

commit f6a716ce2a6981f1086e61c70de5812c391c39c4
Author: Simon Josefsson <address@hidden>
Date:   Tue May 15 23:36:02 2012 +0200

    Use devhelp version 2 format.

commit 3032d4f1394b943eff9f626c78550d208e86f7f5
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 17:21:13 2012 +0200

    Don't mess with ~/.wine.  Drop KFW 3.2.3alpha1 support.

commit e9a324ebe45d52d64a7e2fad4dca5bc7ca36baad
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 17:11:49 2012 +0200

    Run self-checks for 64-bit builds too (seems to work on Ubuntu 12.04).

commit 8f746820aad4563fa5042f4bf7cabe09c3603f13
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 17:04:06 2012 +0200

    Doc fix.

commit 1dd81daf3dbc696c23cff769c92b91657edd67b4
Author: Simon Josefsson <address@hidden>
Date:   Mon Nov 21 12:37:23 2011 +0100

    gssapi: Don't output zero-length tokens on success.
    
    Reported by Andreas Oberritter <address@hidden>.

commit da76c085451786b38127520c34f67e18156241e1
Author: Simon Josefsson <address@hidden>
Date:   Wed Oct 26 21:43:52 2011 +0200

    Only proceed to the next step when the context is established.
    
    Before the code would always go to the next step, even if the GSS-API
    library returned CONTINUE_NEEDED and the context not yet established.
    The reason this problem does not appear to be exploitable is because a
    Kerberos V5 GSS-API mechanism implementation would not return
    CONTINUE_NEEDED and at the same time be able to successfully perform
    gss_wrap and gss_unwrap.  Reported by Andreas Oberritter
    <address@hidden>.

commit 08b084d7871fda443d165cf431ea6088bcc630c9
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 16:56:47 2012 +0200

    Move strndup to lib/.

commit 9503950bb19a8d0ec0aa80b50793a221c918cd35
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 16:31:23 2012 +0200

    Add strndup.

commit c2a169a1e74ef884efb86e04eafc84b6e74635c2
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 16:22:17 2012 +0200

    Ignore more.

commit ef43098d74c1e550d694c0a8a5179bd31273c07a
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 16:18:59 2012 +0200

    Rewrite to use strdup instead of malloc.  Silences valgrind warnings.

commit f073beb0d17d3ea19e881beb494b98d89f26ae89
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 16:12:18 2012 +0200

    Fix build errors with gcc 4.6.

commit c650d4134527490e1d7ea613c3e46eef416977e2
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:55:47 2012 +0200

    Fix syntax-check nits.

commit c42ad2694a5387281b7972b1990fa08b39d018eb
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:53:28 2012 +0200

    Sync with TP.

commit ccde3c9206e804a85dee274826d15f2cf4cd2e16
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:53:11 2012 +0200

    Update gnulib files.

commit 147561bd1a011e53596f8e9b3af2f81aee79e37d
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:51:19 2012 +0200

    Doc fixes.  Bump version.

commit 710a4c0150216280a846b0e360acfd38eaa6bba9
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:48:12 2012 +0200

    Doc fixes for SAML/OpenID.

commit 90c1ea7e3d27e0233592e788bba5059e402c332a
Author: Simon Josefsson <address@hidden>
Date:   Mon May 14 15:32:50 2012 +0200

    Revert "Unify some SAML/OpenID properties & callbacks."
    
    This reverts commit 3095b8531899818f1838c8f658024fafb8fbd92a.

commit 0ced600d1f050d44226b759461d0f5767d0af945
Author: Simon Josefsson <address@hidden>
Date:   Sun Apr 29 22:03:33 2012 +0200

    Mention lasso build dependency.

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

Summary of changes:
 .gitignore                                |    3 +
 NEWS                                      |    7 +
 README                                    |    4 +-
 README-alpha                              |   18 ++-
 cfg.mk                                    |    4 +-
 configure.ac                              |    2 +-
 doc/doxygen/Doxyfile.in                   |    2 +-
 doc/gendocs_template                      |    2 +-
 doc/gsasl.texi                            |  235 +++++++++++++++--------------
 examples/client-xmpp-saml20.c             |    4 +-
 examples/openid20/smtp-server-openid20.c  |    2 +-
 examples/saml20/README                    |    4 +-
 examples/saml20/smtp-server-saml20.c      |    2 +-
 examples/server-xmpp-saml20.c             |    2 +-
 gl/Makefile.am                            |    6 +-
 gl/fseeko.c                               |    8 +
 gl/fstat.c                                |    4 +
 gl/lseek.c                                |    4 +
 gl/m4/dup2.m4                             |   23 ++--
 gl/m4/fseeko.m4                           |   14 ++-
 gl/m4/fstat.m4                            |   19 ++-
 gl/m4/ftruncate.m4                        |   21 +++-
 gl/m4/getcwd.m4                           |   19 +--
 gl/m4/getdelim.m4                         |   14 +-
 gl/m4/getline.m4                          |   20 ++-
 gl/m4/gettimeofday.m4                     |   45 ++++--
 gl/m4/gnulib-common.m4                    |    3 +-
 gl/m4/gnulib-comp.m4                      |    7 +-
 gl/m4/largefile.m4                        |   45 ++++++
 gl/m4/lseek.m4                            |   59 +++++---
 gl/m4/lstat.m4                            |   33 +++--
 gl/m4/malloc.m4                           |   40 +++++-
 gl/m4/math_h.m4                           |   25 +++-
 gl/m4/off_t.m4                            |   18 +++
 gl/m4/putenv.m4                           |   20 ++-
 gl/m4/realloc.m4                          |   40 +++++-
 gl/m4/setenv.m4                           |   38 ++++-
 gl/m4/stat.m4                             |   15 ++-
 gl/m4/strerror.m4                         |   48 ++++--
 gl/m4/symlink.m4                          |   20 ++-
 gl/m4/sys_stat_h.m4                       |   15 ++-
 gl/m4/sys_types_h.m4                      |    5 +-
 gl/m4/ungetc.m4                           |   22 ++-
 gl/m4/unistd_h.m4                         |    6 +-
 gl/m4/warnings.m4                         |   47 ++++--
 gl/m4/wctype_h.m4                         |   14 +-
 gl/override/doc/gendocs_template.diff     |    2 +-
 gl/stdint.in.h                            |   49 ++++--
 gl/stdio.in.h                             |    3 +-
 gl/sys_stat.in.h                          |   33 ++++-
 gl/sys_types.in.h                         |   12 ++
 gl/unistd.in.h                            |   18 ++-
 gltests/binary-io.h                       |   41 ++++--
 gltests/fcntl.in.h                        |    4 +
 gltests/ftruncate.c                       |  157 ++++++++++++++++++-
 gltests/ignore-value.h                    |   10 --
 gltests/init.sh                           |    8 +
 gltests/ioctl.c                           |    4 +
 gltests/stat.c                            |   14 ++
 gltests/test-binary-io.c                  |   26 +++-
 gltests/test-binary-io.sh                 |    8 +-
 lib/NEWS                                  |   27 ++++
 lib/README                                |    8 +-
 lib/build-aux/snippet/_Noreturn.h         |    2 +-
 lib/configure.ac                          |    4 +-
 lib/digest-md5/parser.c                   |   18 +--
 lib/gl/Makefile.am                        |   38 +++++-
 lib/gl/m4/getdelim.m4                     |   14 +-
 lib/gl/m4/getline.m4                      |   20 ++-
 lib/gl/m4/gnulib-cache.m4                 |    3 +-
 lib/gl/m4/gnulib-common.m4                |    3 +-
 lib/gl/m4/gnulib-comp.m4                  |   16 ++
 lib/gl/m4/malloc.m4                       |   40 +++++-
 lib/gl/m4/math_h.m4                       |   25 +++-
 lib/gl/m4/memmem.m4                       |   24 ++-
 lib/gl/m4/off_t.m4                        |   18 +++
 lib/gl/m4/realloc.m4                      |   40 +++++-
 lib/gl/m4/strndup.m4                      |   55 +++++++
 {gl => lib/gl}/m4/sys_types_h.m4          |    5 +-
 lib/gl/m4/unistd_h.m4                     |    6 +-
 lib/gl/stdint.in.h                        |   49 ++++--
 lib/gl/stdio.in.h                         |    3 +-
 lib/gl/strndup.c                          |   36 +++++
 {gl => lib/gl}/sys_types.in.h             |   20 ++-
 lib/gl/unistd.in.h                        |   18 ++-
 lib/gltests/Makefile.am                   |    8 +
 lib/gltests/init.sh                       |    8 +
 {gltests => lib/gltests}/test-sys_types.c |    0
 lib/gssapi/server.c                       |   27 ++--
 lib/maint.mk                              |    9 +-
 lib/openid20/client.c                     |    6 +-
 lib/openid20/server.c                     |    4 +-
 lib/po/vi.po.in                           |  165 ++++++++++++---------
 lib/saml20/client.c                       |    6 +-
 lib/saml20/server.c                       |    4 +-
 lib/src/error.c                           |    6 +-
 lib/src/gsasl.h                           |   28 +++-
 lib/src/internal.h                        |    3 +-
 lib/src/property.c                        |    8 +-
 lib/src/xfinish.c                         |    3 +-
 maint.mk                                  |    9 +-
 src/callbacks.c                           |   19 ++-
 tests/libgsasl.supp                       |   21 +++-
 tests/openid20.c                          |    4 +-
 tests/saml20.c                            |    8 +-
 tests/scram.c                             |   36 ++++-
 tests/symbols.c                           |   15 +-
 windows/gsasl4win.mk                      |   64 ++------
 108 files changed, 1739 insertions(+), 611 deletions(-)
 create mode 100644 gl/m4/off_t.m4
 create mode 100644 lib/gl/m4/off_t.m4
 create mode 100644 lib/gl/m4/strndup.m4
 copy {gl => lib/gl}/m4/sys_types_h.m4 (84%)
 create mode 100644 lib/gl/strndup.c
 copy {gl => lib/gl}/sys_types.in.h (63%)
 copy {gltests => lib/gltests}/test-sys_types.c (100%)

diff --git a/.gitignore b/.gitignore
index 1a00ffc..d41560b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -705,6 +705,8 @@ lib/gltests/test-strnlen
 lib/gltests/test-strnlen.o
 lib/gltests/test-strverscmp
 lib/gltests/test-strverscmp.o
+lib/gltests/test-sys_types
+lib/gltests/test-sys_types.o
 lib/gltests/test-sys_wait
 lib/gltests/test-sys_wait.o
 lib/gltests/test-unistd
@@ -1077,5 +1079,6 @@ windows/inst-x64/
 windows/inst-x86-kfw322/
 windows/inst-x86/
 windows/kfw322x86/
+windows/kfw322sdkx86/
 windows/src/
 windows/tmp/
diff --git a/NEWS b/NEWS
index b0c365a..7c1084d 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,13 @@ Note that changes to the GNU SASL Library is documented in 
lib/NEWS.
 This file track changes to the remaining, non-library, parts of GNU
 SASL.  That include the manual, the command line tool, and self tests.
 
+* Version 1.7.4 (released 2012-05-16) [alpha]
+
+** Doc fixes and updates for the callback/property change in the library.
+See lib/NEWS for details.  This affects SAML and OpenID.
+
+** Slight fixes to Windows build script.
+
 * Version 1.7.3 (released 2012-04-03) [alpha]
 
 ** The SAML20 mechanism has been updated and is now enabled by default.
diff --git a/README b/README
index a5b4620..aeb0457 100644
--- a/README
+++ b/README
@@ -37,11 +37,11 @@ Currently there is some support for the following 
mechanisms:
   - DIGEST-MD5 (RFC 2831)
   - SCRAM-SHA-1 and SCRAM-SHA-1-PLUS (RFC 5802)
   - GS2-KRB5 (RFC 5801, no CB, requires GSS, Heimdal, or MIT Kerberos)
+  - SAML20 (RFC 6595)
+  - OPENID20 (RFC 6616)
   - LOGIN (non-standard)
   - NTLM (non-standard, client only, requires Libntlm)
   - KERBEROS_V5 (experimental, requires Shishi)
-  - OPENID20 (experimental)
-  - SAML20 (experimental)
 
 The library should be portable to all C89 platforms.  The command-line
 application currently requires POSIX for network communication.
diff --git a/README-alpha b/README-alpha
index d828cbd..cb32120 100644
--- a/README-alpha
+++ b/README-alpha
@@ -20,11 +20,13 @@ We require several tools to build the software, including:
 - Texlive & epsf <http://www.tug.org/texlive/> (for PDF manual)
 - CVS <http://www.gnu.org/software/cvs/> (for gettext autopoint)
 - GTK-DOC <http://www.gtk.org/gtk-doc/> (for API manual)
+- Doxygen <http://www.stack.nl/~dimitri/doxygen/> (for API manual)
 - Git <http://git.or.cz/>
 - Perl <http://www.cpan.org/>
 - Valgrind <http://valgrind.org/> (optional)
 - dia <http://live.gnome.org/Dia/> (for images in manual)
 - GnuTLS <http://www.gnu.org/software/gnutls/> (for TLS support)
+- Lasso <http://lasso.entrouvert.org/> (for examples/saml20/)
 
 The required software is typically distributed with your operating
 system, and the instructions for installing them differ.  Here are
@@ -34,7 +36,7 @@ gNewSense/Debian/Ubuntu:
 sudo apt-get install git-core autoconf automake libtool gettext cvs make
 sudo apt-get install texinfo texlive texlive-generic-recommended 
texlive-extra-utils
 sudo apt-get install help2man gtk-doc-tools valgrind
-sudo apt-get install dia libgnutls-dev gengetopt gperf
+sudo apt-get install dia libgnutls-dev gengetopt gperf liblasso3-dev
 
 To download the version controlled sources:
 
@@ -50,6 +52,20 @@ Then build the project normally:
 $ make
 $ make check
 
+When building from version controlled sources, some developer specific
+flags are automatically enabled.  For example, the self-checks are run
+under valgrind if available.  For various reasons, you may run into
+valgrind false positives that will cause self-checks to fail.  We ship
+a Valgrind suppression file to address common issues.  You can use it
+by putting the following in your ~/.valgrindrc:
+
+--suppressions=/path/to/gsasl/tests/libgsasl.supp
+
+To prepare releases (see rules in cfg.mk) you need some additional
+tools:
+
+sudo apt-get install pmccabe mingw-w64 wine clang lcov doxygen
+
 Happy hacking!
 
 ----------------------------------------------------------------------
diff --git a/cfg.mk b/cfg.mk
index 74fc6ce..47a9305 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -151,7 +151,7 @@ gtkdoc-copy:
        cp -v doc/reference/$(PACKAGE).pdf \
                doc/reference/html/*.html \
                doc/reference/html/*.png \
-               doc/reference/html/*.devhelp \
+               doc/reference/html/*.devhelp2 \
                doc/reference/html/*.css \
                $(htmldir)/reference/
 
@@ -160,7 +160,7 @@ gtkdoc-upload:
                cvs add reference || true && \
                cvs add -kb reference/*.png reference/*.pdf || true && \
                cvs add reference/*.html reference/*.css \
-                       reference/*.devhelp || true && \
+                       reference/*.devhelp2 || true && \
                cvs commit -m "Update." reference/
 
 doxygen-copy:
diff --git a/configure.ac b/configure.ac
index cc7a639..6788cb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.61)
-AC_INIT([GNU SASL], [1.7.3], address@hidden, [gsasl])
+AC_INIT([GNU SASL], [1.7.4], address@hidden, [gsasl])
 AC_CONFIG_AUX_DIR([lib/build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in
index 878e0db..6803905 100644
--- a/doc/doxygen/Doxyfile.in
+++ b/doc/doxygen/Doxyfile.in
@@ -944,7 +944,7 @@ PDF_HYPERLINKS         = YES
 # plain latex in the generated Makefile. Set this option to YES to get a 
 # higher quality PDF documentation.
 
-USE_PDFLATEX           = YES
+USE_PDFLATEX           = NO
 
 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
 # command to the generated LaTeX files. This will instruct LaTeX to keep 
diff --git a/doc/gendocs_template b/doc/gendocs_template
index b69a098..bdc8b54 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -63,7 +63,7 @@
 <ul>
   <li><a href="../reference/">HTML API Reference Manual (GTK-DOC)</a>.</li>
   <li><a href="../reference/%%PACKAGE%%.pdf">PDF Reference API Manual 
(GTK-DOC)</a>.
-  <li><a href="../reference/gsasl.devhelp">DevHelp API Reference Manual 
(GTK-DOC)</a>.</li>
+  <li><a href="../reference/gsasl.devhelp2">DevHelp API Reference Manual 
(GTK-DOC)</a>.</li>
 </ul>
 
 <p>You can <a href="http://shop.fsf.org/";>buy printed copies of
diff --git a/doc/gsasl.texi b/doc/gsasl.texi
index d255a90..68157e4 100644
--- a/doc/gsasl.texi
+++ b/doc/gsasl.texi
@@ -1391,14 +1391,14 @@ int callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
 
 Again, it is bad style to use a fixed size buffer.  Mmm'kay.
 
-Which properties you should handle is up to you.  If you don't know
-how to respond to a certain property, simply return
+Which properties you should handle is up to you.  If you don't know how
+to respond to a certain property, simply return
 @code{GSASL_NO_CALLBACK}.  The basic properties to support are
 authentication identity (@code{GSASL_AUTHID}), authorization identity
-(@code{GSASL_AUTHZID}), and password (@code{GSASL_PASSWORD}).  See
address@hidden, for the list of all properties, and what your
-callback should (ideally) do for them, and which properties each
-mechanism require in order to work.
+(@code{GSASL_AUTHZID}), and password (@code{GSASL_PASSWORD}).
address@hidden for the list of all properties, and what your callback
+should (ideally) do for them, and which properties each mechanism
+require in order to work.
 
 @c **********************************************************
 @c *******************  Properties  *************************
@@ -1414,7 +1414,7 @@ value the application has not yet provided, this is 
handled through a
 callback.  The application provides a callback, using
 @code{gsasl_callback_set}, which will be invoked with a property
 parameter.  The callback should set the property before returning, or
-fail.  For more information, see @xref{Callback Functions}.
+fail.  @xref{Callback Functions} for more information.
 
 There are two kind of properties.  The first, a ``data property'' is
 the simplest to understand because it normally refers to short
@@ -1570,12 +1570,17 @@ bindings for a session.
 This property holds the SAML identifier of the user.  The SAML20
 mechanism in client mode will send it to the other end for
 identification purposes, and in server mode it will be accessible in
-the @code{GSASL_REDIRECT_URL} callback.
+the @code{GSASL_SAML20_REDIRECT_URL} callback.
 
address@hidden @code{GSASL_REDIRECT_URL}
-This property holds the OpenID or SAML redirect URL that the server
-wants the client to access.  It will be available in the
address@hidden callback for the client.
address@hidden @code{GSASL_SAML20_REDIRECT_URL}
+This property holds the SAML redirect URL that the server wants the
+client to access.  It will be available in the
address@hidden callback for the client.
+
address@hidden @code{GSASL_OPENID20_REDIRECT_URL}
+This property holds the SAML redirect URL that the server wants the
+client to access.  It will be available in the
address@hidden callback for the client.
 
 @item @code{GSASL_OPENID20_OUTCOME_DATA}
 OpenID 2.0 authentication outcome data.  This is either the OpenID
@@ -1637,11 +1642,17 @@ application perform authentication.  The callback 
should return
 @code{GSASL_OK} if the user should be permitted access, and
 @code{GSASL_AUTHENTICATION_ERROR} (or another error code) otherwise.
 
address@hidden @code{GSASL_AUTHENTICATE_IN_BROWSER}
-Used by the OPENID20 and SAML20 mechanisms in the client side to
-request that the client should launch the redirect URL (the
address@hidden property) in a browser to continue with
-authentication.
address@hidden @code{GSASL_SAML20_AUTHENTICATE_IN_BROWSER}
+Used by the SAML20 mechanism in the client side to request that the
+client should launch the SAML redirect URL (the
address@hidden property) in a browser to continue
+with authentication.
+
address@hidden @code{GSASL_OPENID20_AUTHENTICATE_IN_BROWSER}
+Used by the OPENID20 mechanism in the client side to request that the
+client should launch the OpenID redirect URL (the
address@hidden property) in a browser to continue
+with authentication.
 
 @end itemize
 
@@ -1690,9 +1701,9 @@ entirely dependent on callbacks.
 * SECURID::                 Authentication using tokens.
 * GSSAPI::                  GSSAPI (Kerberos 5) authentication.
 * GS2-KRB5::                Improved GSSAPI (Kerberos 5) authentication.
+* SAML20::                  Authenticate using SAML 2.0 via a browser.
+* OPENID20::                Authenticate using OpenID 2.0 via a browser.
 * KERBEROS_V5::             Experimental KERBEROS_V5 authentication.
-* SAML20::                  Experimental SAML20 authentication.
-* OPENID20::                Experimental OPENID20 authentication.
 @end menu
 
 @node EXTERNAL
@@ -2013,95 +2024,62 @@ PLUS variant, which can also bind the authentication to 
a secure
 channel through channel bindings.  Currently this is not supported by
 GNU SASL.
 
address@hidden KERBEROS_V5
address@hidden The KERBEROS_V5 mechanism
address@hidden KERBEROS_V5
-
-The KERBEROS_V5 is an experimental mechanism, the protocol
-specification is available on the GNU SASL homepage.  It can operate
-in three modes, non-infrastructure mode, infrastructure mode and
-proxied infrastructure mode.  Currently only non-infrastructure mode
-is supported.
-
-In the non-infrastructure mode, it works as a superset of most
-features provided by PLAIN, CRAM-MD5, DIGEST-MD5 and GSSAPI while at
-the same time building on what is believed to be proven technology
-(the RFC 1510 network security system).  In the non-infrastructure
-mode, the client must specify (via callbacks) the name of the user,
-and optionally the server name and realm.  The server must be able to
-retrieve passwords given the name of the user.
-
-In the infrastructure mode (proxied or otherwise), it allows clients
-and servers to authenticate via SASL in an RFC 1510 environment, using
-a trusted third party, a ``Key Distribution Central''.  In the normal
-mode, clients acquire tickets out of band and then invokes a one
-roundtrip AP-REQ and AP-REP exchange.  In the proxied mode, which can
-be used by clients without IP addresses or without connectivity to the
-KDC (e.g., when the KDC is IPv4 and the client is IPV6-only), the
-client uses the server to proxy ticket requests and finishes with the
-AP-REQ/AP-REP exchange.  In infrastructure mode (proxied or
-otherwise), neither the client nor server need to implement any
-callbacks (this will likely change later, to allow a server to
-authorize users, similar to the GSSAPI callback).
-
-XXX: update when implementation has matured
-
 @node SAML20
 @section The SAML20 mechanism
 @cindex SAML
 
 The SAML20 mechanism makes it possible to use SAML in SASL, in a way
 that offloads the authentication exchange to an external browser.  The
-protocol implemented is as specified in
address@hidden
+protocol implemented is as specified in RFC 6595.
 
-The mechanism makes use of the following properties:
address@hidden, @code{GSASL_SAML20_IDP_IDENTIFIER},
address@hidden, @code{GSASL_AUTHENTICATE_IN_BROWSER} and
+The mechanism makes use of the following properties: GSASL_AUTHZID,
address@hidden, @code{GSASL_SAML20_REDIRECT_URL},
address@hidden and
 @code{GSASL_VALIDATE_SAML20}.
 
 In client mode, the mechanism will retrieve the @code{GSASL_AUTHZID} and
 @code{GSASL_SAML20_IDP_IDENTIFIER} properties and form a request to the
 server.  The server will respond with a redirect URL stored in the
address@hidden property, which the client can retrieve from the
address@hidden callback.  The intention is that the
-client launches a browser to the given URL, and then proceeds with
-authentication.  The server responds whether authentication was
-successful or not.
address@hidden property, which the client can retrieve
+from the @code{GSASL_SAML20_AUTHENTICATE_IN_BROWSER} callback.  The
+intention is that the client launches a browser to the given URL, and
+then proceeds with authentication.  The server responds whether
+authentication was successful or not.
 
 In server mode, the mechanism will invoke the
address@hidden callback and the application can inspect the
address@hidden and @code{GSASL_SAML20_IDP_IDENTIFIER} properties
-when forming the redirect URL.  The URL is passed to the client which
-will hopefully complete authentication in the browser.  The server
-callback @code{GSASL_VALIDATE_SAML20} should check whether the
address@hidden callback and the application can
+inspect the @code{GSASL_AUTHZID} and @code{GSASL_SAML20_IDP_IDENTIFIER}
+properties when forming the redirect URL.  The URL is passed to the
+client which will hopefully complete authentication in the browser.  The
+server callback @code{GSASL_VALIDATE_SAML20} should check whether the
 authentication attempt was successful.
 
 Note that SAML itself is not implemented by the GNU SASL library.  On
-the client side, no SAML knowledge is needed, it is only required on
-the server side.  Your server application is expected to call a SAML
+the client side, no SAML knowledge is needed, it is only required on the
+server side.  The client only needs to be able to start a browser
+accessing the redirect URL.  The server side is expected to call a SAML
 library of your choice to generate the AuthRequest and to implement an
-AssertionConsumerService to validate the AuthResponse.  There is an
-example of a SMTP server with SAML 2.0 support distributed with GNU
-SASL in the examples/saml20/ sub-directory that uses the Lasso SAML
-implementation (@url{http://lasso.entrouvert.org/}).  That may be used
-as inspiration for your own implementation.  The @code{gsasl} command
-line client supports SAML20 as a client.
+AssertionConsumerService to validate the AuthResponse.  There is a
+complete proof-of-concept example of a SMTP server with SAML 2.0 support
+distributed with GNU SASL in the examples/saml20/ sub-directory.  It
+uses the Lasso SAML implementation (@url{http://lasso.entrouvert.org/}).
+The example may be used as inspiration for your own server
+implementation.  The @code{gsasl} command line client supports SAML20 as
+a client.
 
 @node OPENID20
 @section The OPENID20 mechanism
 @cindex OpenID
 
-The OPENID20 mechanism makes it possible to use OpenID in SASL, in a
-way that offloads the authentication exchange to an external browser.
-The protocol implemented is as specified in
address@hidden
+The OPENID20 mechanism makes it possible to use OpenID in SASL, in a way
+that offloads the authentication exchange to an external browser.  The
+protocol implemented is as specified in RFC 6616.
 
 The mechanism makes use of the following properties:
 @code{GSASL_AUTHID} (for the OpenID User-Supplied Identifier),
address@hidden, @code{GSASL_REDIRECT_URL},
address@hidden, @code{GSASL_OPENID20_REDIRECT_URL},
 @code{GSASL_OPENID20_OUTCOME_DATA},
address@hidden, and
address@hidden, and
 @code{GSASL_VALIDATE_OPENID20}.
 
 In the client, the mechanism is enabled by default.  The
@@ -2109,40 +2087,75 @@ In the client, the mechanism is enabled by default.  The
 User-Supplied OpenID Identifier (for example
 @code{http://josefsson.org}).  If set, @code{GSASL_AUTHZID} will be
 used by the client.  The client will be invoked with the
address@hidden callback to perform the OpenID
-authentication in a web browser.  The callback can retrieve the
address@hidden property to find out the URL to redirect the
-user to.  After authentication, the client can retrieve the
address@hidden property with the OpenID Simple
address@hidden callback to perform the
+OpenID authentication in a web browser.  The callback can retrieve the
address@hidden property to find out the URL to
+redirect the user to.  After authentication, the client can retrieve
+the @code{GSASL_OPENID20_OUTCOME_DATA} property with the OpenID Simple
 Registry (SREG) attributes sent by the server (they are not always
 sent).
 
 In the server, the mechanism is enabled by default.  The server will
-request the @code{GSASL_REDIRECT_URL} property, and your callback may
-inspect the @code{GSASL_AUTHID} to find the OpenID User-Supplied
-Identifier.  The server callback should perform OpenID discovery and
-return the URL to redirect the user to.  After this, the user would
-access the URL and proceed with authentication in the browser.  The
-server is invoked with the @code{GSASL_VALIDATE_OPENID20} callback to
-perform the actual validation of the authentication.  Usually the
-callback will perform some IPC communication with an OpenID consumer
-running in a web server.  The callback should return @code{GSASL_OK}
-on successful authentication and @code{GSASL_AUTHENTICATION_ERROR} on
-authentication errors, or any other error code.  If the server
-received some OpenID Simple Registry (SREG) attributes from the OpenID
-Identity Provider, it may use the @code{GSASL_OPENID20_OUTCOME_DATA}
-property to send these to the client.
-
-Note that OpenID itself is not implemented by the GNU SASL library.
-On the client side, no OpenID knowledge is required, it is only
-required on the server side.  Your server application is expected to
-use a OpenID library of your choice to generate the redirect URL and
-to implement the Service Provider to validate the response from the
-IdP.  There is a complete example of a SMTP server with OpenID 2.0
-support distributed with GNU SASL in the examples/openid20/
-sub-directory that uses the JanRain PHP5 OpenID implementation.  That
-may be used as inspiration for your own implementation.  The
address@hidden command line client supports OPENID20 as a client.
+request the @code{GSASL_OPENID20_REDIRECT_URL} property, and your
+callback may inspect the @code{GSASL_AUTHID} to find the OpenID
+User-Supplied Identifier.  The server callback should perform OpenID
+discovery and return the URL to redirect the user to.  After this, the
+user would access the URL and proceed with authentication in the
+browser.  The server is invoked with the
address@hidden callback to perform the actual
+validation of the authentication.  Usually the callback will perform
+some IPC communication with an OpenID consumer running in a web
+server.  The callback should return @code{GSASL_OK} on successful
+authentication and @code{GSASL_AUTHENTICATION_ERROR} on authentication
+errors, or any other error code.  If the server received some OpenID
+Simple Registry (SREG) attributes from the OpenID Identity Provider,
+it may use the @code{GSASL_OPENID20_OUTCOME_DATA} property to send
+these to the client.
+
+Note that OpenID itself is not implemented by the GNU SASL library.  On
+the client side, no OpenID knowledge is required, it is only required on
+the server side.  The client only needs to be able to start a browser
+accessing the redirect URL.  The server side is expected to use an
+OpenID library of your choice to generate the redirect URL and to
+implement the Service Provider to validate the response from the IdP.
+There is a complete proof-of-concept example with a SMTP server with
+OpenID 2.0 support distributed with GNU SASL in the examples/openid20/
+sub-directory.  It uses the JanRain PHP5 OpenID implementation.  The
+example may be used as inspiration for your own server implementation.
+The @code{gsasl} command line client supports OPENID20 as a client.
+
address@hidden KERBEROS_V5
address@hidden The KERBEROS_V5 mechanism
address@hidden KERBEROS_V5
+
+The KERBEROS_V5 is an experimental mechanism, the protocol
+specification is available on the GNU SASL homepage.  It can operate
+in three modes, non-infrastructure mode, infrastructure mode and
+proxied infrastructure mode.  Currently only non-infrastructure mode
+is supported.
+
+In the non-infrastructure mode, it works as a superset of most
+features provided by PLAIN, CRAM-MD5, DIGEST-MD5 and GSSAPI while at
+the same time building on what is believed to be proven technology
+(the RFC 1510 network security system).  In the non-infrastructure
+mode, the client must specify (via callbacks) the name of the user,
+and optionally the server name and realm.  The server must be able to
+retrieve passwords given the name of the user.
+
+In the infrastructure mode (proxied or otherwise), it allows clients
+and servers to authenticate via SASL in an RFC 1510 environment, using
+a trusted third party, a ``Key Distribution Central''.  In the normal
+mode, clients acquire tickets out of band and then invokes a one
+roundtrip AP-REQ and AP-REP exchange.  In the proxied mode, which can
+be used by clients without IP addresses or without connectivity to the
+KDC (e.g., when the KDC is IPv4 and the client is IPV6-only), the
+client uses the server to proxy ticket requests and finishes with the
+AP-REQ/AP-REP exchange.  In infrastructure mode (proxied or
+otherwise), neither the client nor server need to implement any
+callbacks (this will likely change later, to allow a server to
+authorize users, similar to the GSSAPI callback).
+
+XXX: update when implementation has matured
 
 @c **********************************************************
 @c *****************  Global Functions  *********************
diff --git a/examples/client-xmpp-saml20.c b/examples/client-xmpp-saml20.c
index a51a117..c4ce66f 100644
--- a/examples/client-xmpp-saml20.c
+++ b/examples/client-xmpp-saml20.c
@@ -141,9 +141,9 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
       rc = GSASL_OK;
       break;
 
-    case GSASL_AUTHENTICATE_IN_BROWSER:
+    case GSASL_SAML20_AUTHENTICATE_IN_BROWSER:
       printf ("client got redirect URL: %s\n",
-             gsasl_property_get (sctx, GSASL_REDIRECT_URL));
+             gsasl_property_get (sctx, GSASL_SAML20_REDIRECT_URL));
       rc = GSASL_OK;
       break;
 
diff --git a/examples/openid20/smtp-server-openid20.c 
b/examples/openid20/smtp-server-openid20.c
index 22aeccc..f83f9a8 100644
--- a/examples/openid20/smtp-server-openid20.c
+++ b/examples/openid20/smtp-server-openid20.c
@@ -209,7 +209,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
 
   switch (prop)
     {
-    case GSASL_REDIRECT_URL:
+    case GSASL_OPENID20_REDIRECT_URL:
       {
        line = get_redirect_url (sctx);
        if (line == NULL)
diff --git a/examples/saml20/README b/examples/saml20/README
index 604bc9a..0eed5bc 100644
--- a/examples/saml20/README
+++ b/examples/saml20/README
@@ -150,8 +150,8 @@ EHLO [127.0.0.1]
 250-localhost
 250 AUTH ANONYMOUS EXTERNAL LOGIN PLAIN SECURID DIGEST-MD5 CRAM-MD5 
SCRAM-SHA-1 SAML20 OPENID20
 AUTH SAML20
-334 
-Enter SAML authentication identifier (e.g. "http://example.org/";): 
+334
+Enter SAML authentication identifier (e.g. "http://example.org/";):
 
    At the prompt, you could type for example "openidp.feide.no".
 
diff --git a/examples/saml20/smtp-server-saml20.c 
b/examples/saml20/smtp-server-saml20.c
index 35dbb98..27c4591 100644
--- a/examples/saml20/smtp-server-saml20.c
+++ b/examples/saml20/smtp-server-saml20.c
@@ -56,7 +56,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
 
   switch (prop)
     {
-    case GSASL_REDIRECT_URL:
+    case GSASL_SAML20_REDIRECT_URL:
       {
        FILE *fh;
        char *reqid, *redirect_url, *tmp;
diff --git a/examples/server-xmpp-saml20.c b/examples/server-xmpp-saml20.c
index b6b8d5f..ce0889f 100644
--- a/examples/server-xmpp-saml20.c
+++ b/examples/server-xmpp-saml20.c
@@ -139,7 +139,7 @@ callback (Gsasl * ctx, Gsasl_session * sctx, Gsasl_property 
prop)
 
   switch (prop)
     {
-    case GSASL_REDIRECT_URL:
+    case GSASL_SAML20_REDIRECT_URL:
       printf ("server got identity: %s\n",
              gsasl_property_get (sctx, GSASL_SAML20_IDP_IDENTIFIER));
       gsasl_property_set (sctx, prop, samlchallenge);
diff --git a/gl/Makefile.am b/gl/Makefile.am
index ab26e5f..ac6a72e 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -195,7 +195,7 @@ configmake.h: Makefile
          echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
          echo '#define PKGLIBDIR "$(pkglibdir)"'; \
          echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
-       } | sed '/""/d' > address@hidden
+       } | sed '/""/d' > address@hidden && \
        mv -f address@hidden $@
 
 BUILT_SOURCES += configmake.h
@@ -1630,6 +1630,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+             -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
              -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
              -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
              -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
@@ -1725,6 +1726,7 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+             -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
              < $(srcdir)/sys_types.in.h; \
        } > address@hidden && \
        mv address@hidden $@
@@ -1817,6 +1819,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+             -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
              -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
              -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
              -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
@@ -1915,6 +1918,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+             -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
              -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
              -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
diff --git a/gl/fseeko.c b/gl/fseeko.c
index 64c0640..c372a5c 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -31,6 +31,14 @@ fseeko (FILE *fp, off_t offset, int whence)
 # undef fseek
 # define fseeko fseek
 #endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef fseeko
+# if HAVE__FSEEKI64 /* msvc, mingw64 */
+#  define fseeko _fseeki64
+# else /* mingw */
+#  define fseeko fseeko64
+# endif
+#endif
 {
 #if LSEEK_PIPE_BROKEN
   /* mingw gives bogus answers rather than failure on non-seekable files.  */
diff --git a/gl/fstat.c b/gl/fstat.c
index 4918495..ac2b1ef 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -23,6 +23,10 @@
 /* Get the original definition of fstat.  It might be defined as a macro.  */
 #include <sys/types.h>
 #include <sys/stat.h>
+#if _GL_WINDOWS_64_BIT_ST_SIZE
+# define stat _stati64
+# define fstat _fstati64
+#endif
 #undef __need_system_sys_stat_h
 
 static inline int
diff --git a/gl/lseek.c b/gl/lseek.c
index cd7e2d6..794c230 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -59,5 +59,9 @@ rpl_lseek (int fd, off_t offset, int whence)
       return -1;
     }
 #endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+  return _lseeki64 (fd, offset, whence);
+#else
   return lseek (fd, offset, whence);
+#endif
 }
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index dec27fa..fc86e80 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,4 +1,4 @@
-#serial 17
+#serial 18
 dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -45,22 +45,25 @@ AC_DEFUN([gl_FUNC_DUP2],
         [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
         [case "$host_os" in
            mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
-             gl_cv_func_dup2_works=no;;
+             gl_cv_func_dup2_works="guessing no" ;;
            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works=no;;
-           *) gl_cv_func_dup2_works=yes;;
+             gl_cv_func_dup2_works="guessing no" ;;
+           *) gl_cv_func_dup2_works="guessing yes" ;;
          esac])
       ])
-    if test "$gl_cv_func_dup2_works" = no; then
-      REPLACE_DUP2=1
-    fi
+    case "$gl_cv_func_dup2_works" in
+      *yes) ;;
+      *)
+        REPLACE_DUP2=1
+        ;;
+    esac
   fi
   dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index be5bb35..1bb88c7 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 15
+# fseeko.m4 serial 16
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ AC_DEFUN([gl_FUNC_FSEEKO],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+  AC_REQUIRE([gl_SYS_TYPES_H])
   AC_REQUIRE([AC_PROG_CC])
 
   dnl Persuade glibc <stdio.h> to declare fseeko().
@@ -28,6 +29,9 @@ AC_DEFUN([gl_FUNC_FSEEKO],
   if test $gl_cv_func_fseeko = no; then
     HAVE_FSEEKO=0
   else
+    if test $WINDOWS_64_BIT_OFF_T = 1; then
+      REPLACE_FSEEKO=1
+    fi
     if test $gl_cv_var_stdin_large_offset = no; then
       REPLACE_FSEEKO=1
     fi
@@ -59,3 +63,11 @@ AC_DEFUN([gl_STDIN_LARGE_OFFSET],
         [gl_cv_var_stdin_large_offset=yes],
         [gl_cv_var_stdin_large_offset=no])])
 ])
+
+# Prerequisites of lib/fseeko.c.
+AC_DEFUN([gl_PREREQ_FSEEKO],
+[
+  dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64
+  dnl makes it usable again.
+  AC_CHECK_FUNCS([_fseeki64])
+])
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index e3f8f3e..3ab3297 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,4 +1,4 @@
-# fstat.m4 serial 1
+# fstat.m4 serial 3
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,16 +7,27 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_FSTAT],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
   AC_REQUIRE([gl_MSVC_INVAL])
   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
     REPLACE_FSTAT=1
   fi
+
+  AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+    REPLACE_FSTAT=1
+  fi
+
   dnl Replace fstat() for supporting the gnulib-defined open() on directories.
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
-    if test $HAVE_FCHDIR = 0 \
-       && test "$gl_cv_func_open_directory_works" != yes; then
-      REPLACE_FSTAT=1
+    if test $HAVE_FCHDIR = 0; then
+      case "$gl_cv_func_open_directory_works" in
+        *yes) ;;
+        *)
+          REPLACE_FSTAT=1
+          ;;
+      esac
     fi
   ])
 ])
diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4
index 1007f34..969eb04 100644
--- a/gl/m4/ftruncate.m4
+++ b/gl/m4/ftruncate.m4
@@ -1,4 +1,4 @@
-# serial 18
+# serial 19
 
 # See if we need to emulate a missing ftruncate function using chsize.
 
@@ -11,7 +11,24 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_CHECK_FUNCS_ONCE([ftruncate])
-  if test $ac_cv_func_ftruncate = no; then
+  if test $ac_cv_func_ftruncate = yes; then
+    m4_ifdef([gl_LARGEFILE], [
+      AC_REQUIRE([AC_CANONICAL_HOST])
+      case "$host_os" in
+        mingw*)
+          dnl Native Windows, and Large File Support is requested.
+          dnl The MSVCRT _chsize() function only accepts a 32-bit file size,
+          dnl and the mingw64 ftruncate64() function is unreliable (it may
+          dnl delete the file, see
+          dnl 
<http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html>).
+          dnl Use gnulib's ftruncate() implementation instead.
+          REPLACE_FTRUNCATE=1
+          ;;
+      esac
+    ], [
+      :
+    ])
+  else
     HAVE_FTRUNCATE=0
   fi
 ])
diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
index ccb1f47..50b96c6 100644
--- a/gl/m4/getcwd.m4
+++ b/gl/m4/getcwd.m4
@@ -6,7 +6,7 @@
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 11
+# serial 12
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -45,15 +45,14 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
          ]])],
         [gl_cv_func_getcwd_null=yes],
         [gl_cv_func_getcwd_null=no],
-        [[
-       case "$host_os" in
-                               # Guess yes on glibc systems.
-         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
-                               # Guess yes on Cygwin.
-         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
-                               # If we don't know, assume the worst.
-         *)                    gl_cv_func_getcwd_null="guessing no";;
-       esac
+        [[case "$host_os" in
+                     # Guess yes on glibc systems.
+            *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
+                     # Guess yes on Cygwin.
+            cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+                     # If we don't know, assume the worst.
+            *)       gl_cv_func_getcwd_null="guessing no";;
+          esac
         ]])])
 ])
 
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 8bd3d3f..a6f4872 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 9
+# getdelim.m4 serial 10
 
 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl
@@ -63,12 +63,14 @@ AC_DEFUN([gl_FUNC_GETDELIM],
  #endif
 #endif
          ],
-         [gl_cv_func_working_getdelim=yes],
-         [gl_cv_func_working_getdelim=no])]
+         [gl_cv_func_working_getdelim="guessing yes"],
+         [gl_cv_func_working_getdelim="guessing no"])]
     )])
-    if test $gl_cv_func_working_getdelim = no; then
-      REPLACE_GETDELIM=1
-    fi
+    case "$gl_cv_func_working_getdelim" in
+      *no)
+        REPLACE_GETDELIM=1
+        ;;
+    esac
   else
     HAVE_GETDELIM=0
   fi
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 01f38cf..72fbc9d 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 25
+# getline.m4 serial 26
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
@@ -70,8 +70,8 @@ AC_DEFUN([gl_FUNC_GETLINE],
  #endif
 #endif
          ],
-         [am_cv_func_working_getline=yes],
-         [am_cv_func_working_getline=no])]
+         [am_cv_func_working_getline="guessing yes"],
+         [am_cv_func_working_getline="guessing no"])]
     )])
   fi
 
@@ -79,12 +79,14 @@ AC_DEFUN([gl_FUNC_GETLINE],
     HAVE_DECL_GETLINE=0
   fi
 
-  if test $am_cv_func_working_getline = no; then
-    dnl Set REPLACE_GETLINE always: Even if we have not found the broken
-    dnl getline function among $LIBS, it may exist in libinet and the
-    dnl executable may be linked with -linet.
-    REPLACE_GETLINE=1
-  fi
+  case "$am_cv_func_working_getline" in
+    *no)
+      dnl Set REPLACE_GETLINE always: Even if we have not found the broken
+      dnl getline function among $LIBS, it may exist in libinet and the
+      dnl executable may be linked with -linet.
+      REPLACE_GETLINE=1
+      ;;
+  esac
 ])
 
 # Prerequisites of lib/getline.c.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index dc68c43..eda9702 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 18
+# serial 20
 
 # Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -56,14 +56,16 @@ int gettimeofday (struct timeval *restrict, struct timezone 
*restrict);
     fi
     m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
       gl_FUNC_TZSET_CLOBBER
-      if test $gl_cv_func_tzset_clobber = yes; then
-        REPLACE_GETTIMEOFDAY=1
-        gl_GETTIMEOFDAY_REPLACE_LOCALTIME
-        AC_DEFINE([tzset], [rpl_tzset],
-          [Define to rpl_tzset if the wrapper function should be used.])
-        AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
-          [Define if tzset clobbers localtime's static buffer.])
-      fi
+      case "$gl_cv_func_tzset_clobber" in
+        *yes)
+          REPLACE_GETTIMEOFDAY=1
+          gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+          AC_DEFINE([tzset], [rpl_tzset],
+            [Define to rpl_tzset if the wrapper function should be used.])
+          AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
+            [Define if tzset clobbers localtime's static buffer.])
+          ;;
+      esac
     ])
   fi
   AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
@@ -82,6 +84,7 @@ dnl the wrapper functions that work around the problem.
 AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
 [
  AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
  AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
   [gl_cv_func_gettimeofday_clobber],
@@ -104,15 +107,23 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
         ]])],
      [gl_cv_func_gettimeofday_clobber=no],
      [gl_cv_func_gettimeofday_clobber=yes],
-     dnl When crosscompiling, assume it is broken.
-     [gl_cv_func_gettimeofday_clobber=yes])])
+     [# When cross-compiling:
+      case "$host_os" in
+                # Guess all is fine on glibc systems.
+        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+                # If we don't know, assume the worst.
+        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
+      esac
+     ])])
 
- if test $gl_cv_func_gettimeofday_clobber = yes; then
-   REPLACE_GETTIMEOFDAY=1
-   gl_GETTIMEOFDAY_REPLACE_LOCALTIME
-   AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
-     [Define if gettimeofday clobbers the localtime buffer.])
- fi
+ case "$gl_cv_func_gettimeofday_clobber" in
+   *yes)
+     REPLACE_GETTIMEOFDAY=1
+     gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+     AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+       [Define if gettimeofday clobbers the localtime buffer.])
+     ;;
+ esac
 ])
 
 AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index ae4d254..d62b767 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -14,7 +14,8 @@ AC_DEFUN([gl_COMMON], [
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
 [/* The _Noreturn keyword of C11.  */
-#ifndef _Noreturn
+#if ! (defined _Noreturn \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 3329ea8..eacb377 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -379,6 +379,7 @@ gl_STDIO_MODULE_INDICATOR([fseek])
 gl_FUNC_FSEEKO
 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
   AC_LIBOBJ([fseeko])
+  gl_PREREQ_FSEEKO
 fi
 gl_STDIO_MODULE_INDICATOR([fseeko])
 gl_FUNC_FSTAT
@@ -463,6 +464,7 @@ if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; 
then
 fi
 gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
 gl_INLINE
+AC_REQUIRE([gl_LARGEFILE])
 gl_LOCALCHARSET
 
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
@@ -622,7 +624,6 @@ m4_ifdef([AM_XGETTEXT_OPTION],
   [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
    AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
 gl_VERSION_ETC
-AC_SUBST([WARN_CFLAGS])
 gl_WCHAR_H
 gl_WCTYPE_H
 gl_XALLOC
@@ -678,6 +679,7 @@ if test "$ac_cv_header_winsock2_h" = yes; then
   AC_LIBOBJ([accept])
 fi
 gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+AC_REQUIRE([AC_C_INLINE])
 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
 if test "$ac_cv_header_winsock2_h" = yes; then
   AC_LIBOBJ([bind])
@@ -711,7 +713,7 @@ gl_STDIO_MODULE_INDICATOR([fdopen])
 gl_FUNC_UNGETC_WORKS
 gl_FUNC_UNGETC_WORKS
 gl_FUNC_FTRUNCATE
-if test $HAVE_FTRUNCATE = 0; then
+if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
   AC_LIBOBJ([ftruncate])
   gl_PREREQ_FTRUNCATE
 fi
@@ -1205,6 +1207,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/netdb_h.m4
   m4/netinet_in_h.m4
   m4/nocrash.m4
+  m4/off_t.m4
   m4/open.m4
   m4/pathmax.m4
   m4/perror.m4
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index 1369bbe..a159f4a 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -102,3 +102,48 @@ fi
 ])# AC_SYS_LARGEFILE
 
 ])# m4_version_prereq 2.69
+
+# Enable large files on systems where this is implemented by Gnulib, not by the
+# system headers.
+# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
+# overrides ensure that off_t or 'struct size.st_size' are 64-bit, 
respectively.
+AC_DEFUN([gl_LARGEFILE],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      dnl Native Windows.
+      dnl mingw64 defines off_t to a 64-bit type already, if
+      dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
+      AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <sys/types.h>
+                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
+              ]],
+              [[]])],
+           [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no])
+        ])
+      if test $gl_cv_type_off_t_64 = no; then
+        WINDOWS_64_BIT_OFF_T=1
+      else
+        WINDOWS_64_BIT_OFF_T=0
+      fi
+      dnl But all native Windows platforms (including mingw64) have a 32-bit
+      dnl st_size member in 'struct stat'.
+      WINDOWS_64_BIT_ST_SIZE=1
+      ;;
+    *)
+      dnl Nothing to do on gnulib's side.
+      dnl A 64-bit off_t is
+      dnl   - already the default on MacOS X, FreeBSD, NetBSD, OpenBSD, IRIX,
+      dnl     OSF/1, Cygwin,
+      dnl   - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
+      dnl     glibc, HP-UX, Solaris,
+      dnl   - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
+      dnl   - impossible to achieve on Minix 3.1.8.
+      WINDOWS_64_BIT_OFF_T=0
+      WINDOWS_64_BIT_ST_SIZE=0
+      ;;
+  esac
+])
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index 86db59e..bdda7f6 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,4 +1,4 @@
-# lseek.m4 serial 8
+# lseek.m4 serial 10
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,11 +7,24 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_LSEEK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AC_PROG_CC])
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
-    [if test $cross_compiling = no; then
-       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+    [case "$host_os" in
+       mingw*)
+         dnl Native Windows.
+         dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or
+         dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT)
+         dnl for a pipe depends on the environment: In a Cygwin 1.5
+         dnl environment it succeeds (wrong); in a Cygwin 1.7 environment
+         dnl it fails with a wrong errno value.
+         gl_cv_func_lseek_pipe=no
+         ;;
+       *)
+         if test $cross_compiling = no; then
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h> /* for off_t */
 #include <stdio.h> /* for SEEK_CUR */
 #if HAVE_UNISTD_H
@@ -23,26 +36,36 @@ AC_DEFUN([gl_FUNC_LSEEK],
   /* Exit with success only if stdin is seekable.  */
   return lseek (0, (off_t)0, SEEK_CUR) < 0;
 ]])],
-         [if test -s conftest$ac_exeext \
-             && ./conftest$ac_exeext < conftest.$ac_ext \
-             && test 1 = "`echo hi \
-               | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
-            gl_cv_func_lseek_pipe=yes
-          else
-            gl_cv_func_lseek_pipe=no
-          fi],
-         [gl_cv_func_lseek_pipe=no])
-     else
-       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined 
__BEOS__
-/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
+             [if test -s conftest$ac_exeext \
+                 && ./conftest$ac_exeext < conftest.$ac_ext \
+                 && test 1 = "`echo hi \
+                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+                gl_cv_func_lseek_pipe=yes
+              else
+                gl_cv_func_lseek_pipe=no
+              fi
+             ],
+             [gl_cv_func_lseek_pipe=no])
+         else
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE([[
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes.  */
   Choke me.
 #endif]])],
-         [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
-     fi])
+             [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+         fi
+         ;;
+     esac
+    ])
   if test $gl_cv_func_lseek_pipe = no; then
     REPLACE_LSEEK=1
     AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
       [Define to 1 if lseek does not detect pipes.])
   fi
+
+  AC_REQUIRE([gl_SYS_TYPES_H])
+  if test $WINDOWS_64_BIT_OFF_T = 1; then
+    REPLACE_LSEEK=1
+  fi
 ])
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index b83858b..b7335bd 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 24
+# serial 25
 
 # Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
 #
@@ -16,9 +16,11 @@ AC_DEFUN([gl_FUNC_LSTAT],
   AC_CHECK_FUNCS_ONCE([lstat])
   if test $ac_cv_func_lstat = yes; then
     AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-    if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
-      REPLACE_LSTAT=1
-    fi
+    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+      *no)
+        REPLACE_LSTAT=1
+        ;;
+    esac
   else
     HAVE_LSTAT=0
   fi
@@ -51,20 +53,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
             ]])],
          [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
          [gl_cv_func_lstat_dereferences_slashed_symlink=no],
-         [# When cross-compiling, be pessimistic so we will end up using the
-          # replacement version of lstat that checks for trailing slashes and
-          # calls lstat a second time when necessary.
-          gl_cv_func_lstat_dereferences_slashed_symlink=no
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing 
yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing 
no" ;;
+          esac
          ])
      else
        # If the 'ln -s' command failed, then we probably don't even
        # have an lstat function.
-       gl_cv_func_lstat_dereferences_slashed_symlink=no
+       gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
      fi
      rm -f conftest.sym conftest.file
     ])
-  test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
-    AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
-      [Define to 1 if 'lstat' dereferences a symlink specified
-       with a trailing slash.])
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
+      AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
+        [Define to 1 if 'lstat' dereferences a symlink specified
+         with a trailing slash.])
+      ;;
+  esac
 ])
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index d3c39f5..8fa48e9 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,9 +1,47 @@
-# malloc.m4 serial 13
+# malloc.m4 serial 14
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_MALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible malloc],
+    [ac_cv_func_malloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *malloc ();
+            #endif
+          ]],
+          [[return ! malloc (0);]])
+       ],
+       [ac_cv_func_malloc_0_nonnull=yes],
+       [ac_cv_func_malloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_malloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_malloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+])# _AC_FUNC_MALLOC_IF
+
+])
+
 # gl_FUNC_MALLOC_GNU
 # ------------------
 # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index a24d352..90d248a 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 107
+# math_h.m4 serial 113
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -44,8 +44,10 @@ AC_DEFUN([gl_MATH_H],
      expf expl exp2 exp2f exp2l expm1 expm1f expm1l
      fabsf fabsl floorf floorl fma fmaf fmal
      fmod fmodf fmodl frexpf frexpl hypotf hypotl
+     ilogb ilogbf ilogbl
      ldexpf ldexpl
-     logb log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f 
log2l
+     log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
+     logb logbf logbl
      modf modff modfl powf
      remainder remainderf remainderl
      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -107,6 +109,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_HYPOT=0;      AC_SUBST([GNULIB_HYPOT])
   GNULIB_HYPOTF=0;     AC_SUBST([GNULIB_HYPOTF])
   GNULIB_HYPOTL=0;     AC_SUBST([GNULIB_HYPOTL])
+  GNULIB_ILOGB=0;      AC_SUBST([GNULIB_ILOGB])
+  GNULIB_ILOGBF=0;     AC_SUBST([GNULIB_ILOGBF])
+  GNULIB_ILOGBL=0;     AC_SUBST([GNULIB_ILOGBL])
   GNULIB_ISFINITE=0;   AC_SUBST([GNULIB_ISFINITE])
   GNULIB_ISINF=0;      AC_SUBST([GNULIB_ISINF])
   GNULIB_ISNAN=0;      AC_SUBST([GNULIB_ISNAN])
@@ -115,7 +120,6 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_ISNANL=0;     AC_SUBST([GNULIB_ISNANL])
   GNULIB_LDEXPF=0;     AC_SUBST([GNULIB_LDEXPF])
   GNULIB_LDEXPL=0;     AC_SUBST([GNULIB_LDEXPL])
-  GNULIB_LOGB=0;       AC_SUBST([GNULIB_LOGB])
   GNULIB_LOG=0;        AC_SUBST([GNULIB_LOG])
   GNULIB_LOGF=0;       AC_SUBST([GNULIB_LOGF])
   GNULIB_LOGL=0;       AC_SUBST([GNULIB_LOGL])
@@ -128,6 +132,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_LOG2=0;       AC_SUBST([GNULIB_LOG2])
   GNULIB_LOG2F=0;      AC_SUBST([GNULIB_LOG2F])
   GNULIB_LOG2L=0;      AC_SUBST([GNULIB_LOG2L])
+  GNULIB_LOGB=0;       AC_SUBST([GNULIB_LOGB])
+  GNULIB_LOGBF=0;      AC_SUBST([GNULIB_LOGBF])
+  GNULIB_LOGBL=0;      AC_SUBST([GNULIB_LOGBL])
   GNULIB_MODF=0;       AC_SUBST([GNULIB_MODF])
   GNULIB_MODFF=0;      AC_SUBST([GNULIB_MODFF])
   GNULIB_MODFL=0;      AC_SUBST([GNULIB_MODFL])
@@ -183,6 +190,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_FREXPF=1;               AC_SUBST([HAVE_FREXPF])
   HAVE_HYPOTF=1;               AC_SUBST([HAVE_HYPOTF])
   HAVE_HYPOTL=1;               AC_SUBST([HAVE_HYPOTL])
+  HAVE_ILOGB=1;                AC_SUBST([HAVE_ILOGB])
+  HAVE_ILOGBF=1;               AC_SUBST([HAVE_ILOGBF])
+  HAVE_ILOGBL=1;               AC_SUBST([HAVE_ILOGBL])
   HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
   HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
   HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
@@ -194,6 +204,8 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_LOG1P=1;                AC_SUBST([HAVE_LOG1P])
   HAVE_LOG1PF=1;               AC_SUBST([HAVE_LOG1PF])
   HAVE_LOG1PL=1;               AC_SUBST([HAVE_LOG1PL])
+  HAVE_LOGBF=1;                AC_SUBST([HAVE_LOGBF])
+  HAVE_LOGBL=1;                AC_SUBST([HAVE_LOGBL])
   HAVE_MODFF=1;                AC_SUBST([HAVE_MODFF])
   HAVE_MODFL=1;                AC_SUBST([HAVE_MODFL])
   HAVE_POWF=1;                 AC_SUBST([HAVE_POWF])
@@ -227,12 +239,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_DECL_FLOORL=1;          AC_SUBST([HAVE_DECL_FLOORL])
   HAVE_DECL_FREXPL=1;          AC_SUBST([HAVE_DECL_FREXPL])
   HAVE_DECL_LDEXPL=1;          AC_SUBST([HAVE_DECL_LDEXPL])
-  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
   HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
   HAVE_DECL_LOG10L=1;          AC_SUBST([HAVE_DECL_LOG10L])
   HAVE_DECL_LOG2=1;            AC_SUBST([HAVE_DECL_LOG2])
   HAVE_DECL_LOG2F=1;           AC_SUBST([HAVE_DECL_LOG2F])
   HAVE_DECL_LOG2L=1;           AC_SUBST([HAVE_DECL_LOG2L])
+  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
   HAVE_DECL_REMAINDER=1;       AC_SUBST([HAVE_DECL_REMAINDER])
   HAVE_DECL_REMAINDERL=1;      AC_SUBST([HAVE_DECL_REMAINDERL])
   HAVE_DECL_RINTF=1;           AC_SUBST([HAVE_DECL_RINTF])
@@ -271,6 +283,8 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_HYPOT=0;             AC_SUBST([REPLACE_HYPOT])
   REPLACE_HYPOTF=0;            AC_SUBST([REPLACE_HYPOTF])
   REPLACE_HYPOTL=0;            AC_SUBST([REPLACE_HYPOTL])
+  REPLACE_ILOGB=0;             AC_SUBST([REPLACE_ILOGB])
+  REPLACE_ILOGBF=0;            AC_SUBST([REPLACE_ILOGBF])
   REPLACE_ISFINITE=0;          AC_SUBST([REPLACE_ISFINITE])
   REPLACE_ISINF=0;             AC_SUBST([REPLACE_ISINF])
   REPLACE_ISNAN=0;             AC_SUBST([REPLACE_ISNAN])
@@ -287,6 +301,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_LOG2=0;              AC_SUBST([REPLACE_LOG2])
   REPLACE_LOG2F=0;             AC_SUBST([REPLACE_LOG2F])
   REPLACE_LOG2L=0;             AC_SUBST([REPLACE_LOG2L])
+  REPLACE_LOGB=0;              AC_SUBST([REPLACE_LOGB])
+  REPLACE_LOGBF=0;             AC_SUBST([REPLACE_LOGBF])
+  REPLACE_LOGBL=0;             AC_SUBST([REPLACE_LOGBL])
   REPLACE_MODF=0;              AC_SUBST([REPLACE_MODF])
   REPLACE_MODFF=0;             AC_SUBST([REPLACE_MODFF])
   REPLACE_MODFL=0;             AC_SUBST([REPLACE_MODFL])
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
new file mode 100644
index 0000000..dfca2df
--- /dev/null
+++ b/gl/m4/off_t.m4
@@ -0,0 +1,18 @@
+# off_t.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check whether to override the 'off_t' type.
+dnl Set WINDOWS_64_BIT_OFF_T.
+
+AC_DEFUN([gl_TYPE_OFF_T],
+[
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_OFF_T=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_OFF_T])
+])
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
index 1cb23a5..b971b12 100644
--- a/gl/m4/putenv.m4
+++ b/gl/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 18
+# putenv.m4 serial 19
 dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@ dnl The putenv in libc on at least SunOS 4.1.4 does *not* do 
that.
 AC_DEFUN([gl_FUNC_PUTENV],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
    [gl_cv_func_svid_putenv],
    [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@@ -32,9 +33,18 @@ AC_DEFUN([gl_FUNC_PUTENV],
              gl_cv_func_svid_putenv=yes,
              gl_cv_func_svid_putenv=no,
              dnl When crosscompiling, assume putenv is broken.
-             gl_cv_func_svid_putenv=no)
+             [case "$host_os" in
+                        # Guess yes on glibc systems.
+                *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+                        # If we don't know, assume the worst.
+                *)      gl_cv_func_svid_putenv="guessing no" ;;
+              esac
+             ])
    ])
-  if test $gl_cv_func_svid_putenv = no; then
-    REPLACE_PUTENV=1
-  fi
+  case "$gl_cv_func_svid_putenv" in
+    *yes) ;;
+    *)
+      REPLACE_PUTENV=1
+      ;;
+  esac
 ])
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 039ed19..954c2f0 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,9 +1,47 @@
-# realloc.m4 serial 12
+# realloc.m4 serial 13
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_REALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible realloc],
+    [ac_cv_func_realloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *realloc ();
+            #endif
+          ]],
+          [[return ! realloc (0, 0);]])
+       ],
+       [ac_cv_func_realloc_0_nonnull=yes],
+       [ac_cv_func_realloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_realloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_realloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
+])# AC_FUNC_REALLOC
+
+])
+
 # gl_FUNC_REALLOC_GNU
 # -------------------
 # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index a1f30bc..e1931e7 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,4 +1,4 @@
-# setenv.m4 serial 25
+# setenv.m4 serial 26
 dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_SETENV],
 [
   AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   if test $ac_cv_func_setenv = no; then
     HAVE_SETENV=0
   else
@@ -33,10 +34,19 @@ AC_DEFUN([gl_FUNC_SETENV],
        return result;
       ]])],
       [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
-      [gl_cv_func_setenv_works="guessing no"])])
-    if test "$gl_cv_func_setenv_works" != yes; then
-      REPLACE_SETENV=1
-    fi
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_setenv_works="guessing no" ;;
+       esac
+      ])])
+    case "$gl_cv_func_setenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_SETENV=1
+        ;;
+    esac
   fi
 ])
 
@@ -56,6 +66,7 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
 AC_DEFUN([gl_FUNC_UNSETENV],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_DECLS_ONCE([unsetenv])
   if test $ac_cv_have_decl_unsetenv = no; then
     HAVE_DECL_UNSETENV=0
@@ -115,10 +126,19 @@ int unsetenv (const char *name);
        if (getenv ("a")) return 6;
       ]])],
       [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
-      [gl_cv_func_unsetenv_works="guessing no"])])
-    if test "$gl_cv_func_unsetenv_works" != yes; then
-      REPLACE_UNSETENV=1
-    fi
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_unsetenv_works="guessing no" ;;
+       esac
+      ])])
+    case "$gl_cv_func_unsetenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_UNSETENV=1
+        ;;
+    esac
   fi
 ])
 
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index d67dbcd..a8b79f5 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 10
 
 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
@@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT],
             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
             *) gl_cv_func_stat_dir_slash="guessing yes";;
           esac])])
-  dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
-  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+  dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+  dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+  dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
   AC_CACHE_CHECK([whether stat handles trailing slashes on files],
       [gl_cv_func_stat_file_slash],
       [touch conftest.tmp
@@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
       return result;
            ]])],
          [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
-         [gl_cv_func_stat_file_slash="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_stat_file_slash="guessing no" ;;
+          esac
+         ])
        rm -f conftest.tmp conftest.lnk])
   case $gl_cv_func_stat_dir_slash in
     *no) REPLACE_STAT=1
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 6bf14ef..1c96e52 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,4 +1,4 @@
-# strerror.m4 serial 16
+# strerror.m4 serial 17
 dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STRERROR],
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_ERRNO_H])
   AC_REQUIRE([gl_FUNC_STRERROR_0])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
     AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
   ])
@@ -22,14 +23,22 @@ AC_DEFUN([gl_FUNC_STRERROR],
            [[if (!*strerror (-2)) return 1;]])],
         [gl_cv_func_working_strerror=yes],
         [gl_cv_func_working_strerror=no],
-        [dnl Be pessimistic on cross-compiles for now.
-         gl_cv_func_working_strerror="guessing no"])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_working_strerror="guessing no" ;;
+         esac
+        ])
     ])
-    if test "$gl_cv_func_working_strerror" != yes; then
-      dnl The system's strerror() fails to return a string for out-of-range
-      dnl integers. Replace it.
-      REPLACE_STRERROR=1
-    fi
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+        dnl The system's strerror() fails to return a string for out-of-range
+        dnl integers. Replace it.
+        REPLACE_STRERROR=1
+        ;;
+    esac
     m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
       dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
       dnl buffer, we must replace strerror.
@@ -48,6 +57,7 @@ dnl Detect if strerror(0) passes (that is, does not set 
errno, and does not
 dnl return a string that matches strerror(-1)).
 AC_DEFUN([gl_FUNC_STRERROR_0],
 [
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   REPLACE_STRERROR_0=0
   AC_CACHE_CHECK([whether strerror(0) succeeds],
    [gl_cv_func_strerror_0_works],
@@ -67,12 +77,20 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
            return result;]])],
       [gl_cv_func_strerror_0_works=yes],
       [gl_cv_func_strerror_0_works=no],
-      [dnl Be pessimistic on cross-compiles for now.
-       gl_cv_func_strerror_0_works="guessing no"])
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_strerror_0_works="guessing no" ;;
+       esac
+      ])
   ])
-  if test "$gl_cv_func_strerror_0_works" != yes; then
-    REPLACE_STRERROR_0=1
-    AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
-      does not return a message implying success.])
-  fi
+  case "$gl_cv_func_strerror_0_works" in
+    *yes) ;;
+    *)
+      REPLACE_STRERROR_0=1
+      AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+        does not return a message implying success.])
+      ;;
+  esac
 ])
diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4
index f84b21e..cfd90ec 100644
--- a/gl/m4/symlink.m4
+++ b/gl/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 5
+# serial 6
 # See if we need to provide symlink replacement.
 
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN([gl_FUNC_SYMLINK],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_FUNCS_ONCE([symlink])
   dnl The best we can do on mingw is provide a dummy that always fails, so
   dnl that compilation can proceed with fewer ifdefs.  On FreeBSD 7.2, AIX 7.1,
@@ -34,10 +35,19 @@ AC_DEFUN([gl_FUNC_SYMLINK],
              return result;
            ]])],
          [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
-         [gl_cv_func_symlink_works="guessing no"])
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+                    # If we don't know, assume the worst.
+            *)      gl_cv_func_symlink_works="guessing no" ;;
+          esac
+         ])
       rm -f conftest.f conftest.link conftest.lnk2])
-    if test "$gl_cv_func_symlink_works" != yes; then
-      REPLACE_SYMLINK=1
-    fi
+    case "$gl_cv_func_symlink_works" in
+      *yes) ;;
+      *)
+        REPLACE_SYMLINK=1
+        ;;
+    esac
   fi
 ])
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index a0b96bc..f45dee1 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 26   -*- Autoconf -*-
+# sys_stat_h.m4 serial 27   -*- Autoconf -*-
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,19 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
   dnl Ensure the type mode_t gets defined.
   AC_REQUIRE([AC_TYPE_MODE_T])
 
+  dnl Whether to override 'struct stat'.
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_ST_SIZE=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+    AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
+      [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
+       struct stat.st_size becomes 64-bit.])
+  fi
+
   dnl Define types that are supposed to be defined in <sys/types.h> or
   dnl <sys/stat.h>.
   AC_CHECK_TYPE([nlink_t], [],
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index 8d18ddb..f11eef2 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,4 +1,4 @@
-# sys_types_h.m4 serial 2
+# sys_types_h.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,9 @@ AC_DEFUN([gl_SYS_TYPES_H],
 
   dnl Ensure the type mode_t gets defined.
   AC_REQUIRE([AC_TYPE_MODE_T])
+
+  dnl Whether to override the 'off_t' type.
+  AC_REQUIRE([gl_TYPE_OFF_T])
 ])
 
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index 95bb3eb..9bc1ce7 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 2
+# ungetc.m4 serial 3
 dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
   AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
     [gl_cv_func_ungetc_works],
@@ -27,10 +28,19 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
            if (fgetc (f) != 'c') return 11;
            fclose (f); remove ("conftest.tmp");])],
         [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
-        [gl_cv_func_ungetc_works='guessing no'])
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_ungetc_works="guessing no" ;;
+         esac
+        ])
     ])
-  if test "$gl_cv_func_ungetc_works" != yes; then
-    AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
-      [Define to 1 if ungetc is broken when used on arbitrary bytes.])
-  fi
+  case "$gl_cv_func_ungetc_works" in
+    *yes) ;;
+    *)
+      AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+        [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+      ;;
+  esac
 ])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 7595534..7e7651b 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 63
+# unistd_h.m4 serial 65
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -24,6 +24,9 @@ AC_DEFUN([gl_UNISTD_H],
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
 
+  dnl Determine WINDOWS_64_BIT_OFF_T.
+  AC_REQUIRE([gl_TYPE_OFF_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
@@ -155,6 +158,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index c14c480..28b8294 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,4 +1,4 @@
-# warnings.m4 serial 6
+# warnings.m4 serial 7
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,28 +15,47 @@ m4_ifdef([AS_VAR_APPEND],
 [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
 
 
-# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
-# ------------------------------------------------
-# Adds parameter to WARN_CFLAGS if the compiler supports it.  For example,
-# gl_WARN_ADD([-Wparentheses]).
+# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
+#                       [PROGRAM = AC_LANG_PROGRAM()])
+# -----------------------------------------------------------------
+# Check if the compiler supports OPTION when compiling PROGRAM.
 #
-# If VARIABLE is a variable name, AC_SUBST it.
-AC_DEFUN([gl_WARN_ADD],
-dnl FIXME: gl_Warn must be used unquoted until we can assume
-dnl autoconf 2.64 or newer.
+# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
+# 2.64 or newer.
+AC_DEFUN([gl_COMPILER_OPTION_IF],
 [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
 AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
 AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
   gl_save_compiler_FLAGS="$gl_Flags"
-  gl_Flags="$gl_Flags $1"
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+  gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $1"])
+  AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
                     [AS_VAR_SET(gl_Warn, [yes])],
                     [AS_VAR_SET(gl_Warn, [no])])
   gl_Flags="$gl_save_compiler_FLAGS"
 ])
-AS_VAR_IF(gl_Warn, [yes],
-  [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
+AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
 AS_VAR_POPDEF([gl_Flags])dnl
 AS_VAR_POPDEF([gl_Warn])dnl
-m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
 ])
+
+
+# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
+#             [PROGRAM = AC_LANG_PROGRAM()])
+# ---------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it when
+# compiling PROGRAM.  For example, gl_WARN_ADD([-Wparentheses]).
+#
+# If VARIABLE is a variable name, AC_SUBST it.
+AC_DEFUN([gl_WARN_ADD],
+[gl_COMPILER_OPTION_IF([$1],
+  [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
+  [],
+  [$3])
+m4_ifval([$2],
+         [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
+         [AC_SUBST([WARN_CFLAGS])])dnl
+])
+
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index a109383..4b19f64 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -1,4 +1,4 @@
-# wctype_h.m4 serial 16
+# wctype_h.m4 serial 17
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
@@ -57,7 +57,8 @@ AC_DEFUN([gl_WCTYPE_H],
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
                           #endif]], [])],
-              [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+              [gl_cv_func_iswcntrl_works="guessing yes"],
+              [gl_cv_func_iswcntrl_works="guessing no"])
             ])
         ])
     fi
@@ -67,11 +68,10 @@ AC_DEFUN([gl_WCTYPE_H],
   fi
   AC_SUBST([HAVE_WCTYPE_H])
 
-  if test "$gl_cv_func_iswcntrl_works" = no; then
-    REPLACE_ISWCNTRL=1
-  else
-    REPLACE_ISWCNTRL=0
-  fi
+  case "$gl_cv_func_iswcntrl_works" in
+    *yes) REPLACE_ISWCNTRL=0 ;;
+    *)    REPLACE_ISWCNTRL=1 ;;
+  esac
   AC_SUBST([REPLACE_ISWCNTRL])
 
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
diff --git a/gl/override/doc/gendocs_template.diff 
b/gl/override/doc/gendocs_template.diff
index 24d6641..4dbbce8 100644
--- a/gl/override/doc/gendocs_template.diff
+++ b/gl/override/doc/gendocs_template.diff
@@ -14,7 +14,7 @@
 +<ul>
 +  <li><a href="../reference/">HTML API Reference Manual (GTK-DOC)</a>.</li>
 +  <li><a href="../reference/%%PACKAGE%%.pdf">PDF Reference API Manual 
(GTK-DOC)</a>.
-+  <li><a href="../reference/gsasl.devhelp">DevHelp API Reference Manual 
(GTK-DOC)</a>.</li>
++  <li><a href="../reference/gsasl.devhelp2">DevHelp API Reference Manual 
(GTK-DOC)</a>.</li>
 +</ul>
 +
  <p>You can <a href="http://shop.fsf.org/";>buy printed copies of
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 8e4c822..59c00d5 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -90,7 +90,8 @@
 # include <sys/types.h>
 #endif
 
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX.  */
 #include <limits.h>
 
 #if @HAVE_INTTYPES_H@
@@ -246,8 +247,9 @@ typedef unsigned long long int gl_uint64_t;
 
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
-   are taken from the same list of types.  Assume that 'long int'
-   is fast enough for all narrower integers.  */
+   are taken from the same list of types.  The following code normally
+   uses types consistent with glibc, as that lessens the chance of
+   incompatibility with older GNU hosts.  */
 
 #undef int_fast8_t
 #undef uint_fast8_t
@@ -257,12 +259,21 @@ typedef unsigned long long int gl_uint64_t;
 #undef uint_fast32_t
 #undef int_fast64_t
 #undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
+typedef signed char gl_int_fast8_t;
+typedef unsigned char gl_uint_fast8_t;
+
+#ifdef __sun
+/* Define types compatible with SunOS 5.10, so that code compiled under
+   earlier SunOS versions works with code compiled under SunOS 5.10.  */
+typedef int gl_int_fast32_t;
+typedef unsigned int gl_uint_fast32_t;
+#else
 typedef long int gl_int_fast32_t;
 typedef unsigned long int gl_uint_fast32_t;
+#endif
+typedef gl_int_fast32_t gl_int_fast16_t;
+typedef gl_uint_fast32_t gl_uint_fast16_t;
+
 #define int_fast8_t gl_int_fast8_t
 #define uint_fast8_t gl_uint_fast8_t
 #define int_fast16_t gl_int_fast16_t
@@ -418,23 +429,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == 
sizeof (uintmax_t)
 #undef INT_FAST8_MIN
 #undef INT_FAST8_MAX
 #undef UINT_FAST8_MAX
-#define INT_FAST8_MIN  LONG_MIN
-#define INT_FAST8_MAX  LONG_MAX
-#define UINT_FAST8_MAX  ULONG_MAX
+#define INT_FAST8_MIN  SCHAR_MIN
+#define INT_FAST8_MAX  SCHAR_MAX
+#define UINT_FAST8_MAX  UCHAR_MAX
 
 #undef INT_FAST16_MIN
 #undef INT_FAST16_MAX
 #undef UINT_FAST16_MAX
-#define INT_FAST16_MIN  LONG_MIN
-#define INT_FAST16_MAX  LONG_MAX
-#define UINT_FAST16_MAX  ULONG_MAX
+#define INT_FAST16_MIN  INT_FAST32_MIN
+#define INT_FAST16_MAX  INT_FAST32_MAX
+#define UINT_FAST16_MAX  UINT_FAST32_MAX
 
 #undef INT_FAST32_MIN
 #undef INT_FAST32_MAX
 #undef UINT_FAST32_MAX
-#define INT_FAST32_MIN  LONG_MIN
-#define INT_FAST32_MAX  LONG_MAX
-#define UINT_FAST32_MAX  ULONG_MAX
+#ifdef __sun
+# define INT_FAST32_MIN  INT_MIN
+# define INT_FAST32_MAX  INT_MAX
+# define UINT_FAST32_MAX  UINT_MAX
+#else
+# define INT_FAST32_MIN  LONG_MIN
+# define INT_FAST32_MAX  LONG_MAX
+# define UINT_FAST32_MAX  ULONG_MAX
+#endif
 
 #undef INT_FAST64_MIN
 #undef INT_FAST64_MAX
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 4d3f0bb..b1b543d 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -52,7 +52,8 @@
 #include <stddef.h>
 
 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
-   and eglibc 2.11.2.  */
+   and eglibc 2.11.2.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index e4331c7..2efc1e9 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -35,7 +35,8 @@
 
 #ifndef address@hidden@_SYS_STAT_H
 
-/* Get nlink_t.  */
+/* Get nlink_t.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 
 /* Get struct timespec.  */
@@ -66,6 +67,11 @@
 # include <io.h>
 #endif
 
+/* Large File Support on native Windows.  */
+#if @WINDOWS_64_BIT_ST_SIZE@
+# define stat _stati64
+#endif
+
 #ifndef S_IFIFO
 # ifdef _S_IFIFO
 #  define S_IFIFO _S_IFIFO
@@ -335,6 +341,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
 # endif
 _GL_CXXALIASWARN (fstat);
+#elif @WINDOWS_64_BIT_ST_SIZE@
+/* Above, we define stat to _stati64.  */
+# define fstat _fstati64
 #elif defined GNULIB_POSIXCHECK
 # undef fstat
 # if HAVE_RAW_DECL_FSTAT
@@ -620,6 +629,28 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
        so we have to replace stat64() instead of stat(). */
 #   undef stat64
 #   define stat64(name, st) rpl_stat (name, st)
+#  elif @WINDOWS_64_BIT_ST_SIZE@
+    /* Above, we define stat to _stati64.  */
+#   if defined __MINGW32__ && defined _stati64
+#    ifndef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   elif defined _MSC_VER && defined _stati64
+#    ifdef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat32i64.  */
+#     undef _stat32i64
+#     define _stat32i64(name, st) rpl_stat (name, st)
+#    else
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   else
+#    undef _stati64
+#    define _stati64(name, st) rpl_stat (name, st)
+#   endif
 #  elif defined __MINGW32__ && defined stat
 #   ifdef _USE_32BIT_TIME_T
      /* The system headers define stat to _stat32i64.  */
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index 574fe51..8139d98 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -28,6 +28,18 @@
 #ifndef address@hidden@_SYS_TYPES_H
 #define address@hidden@_SYS_TYPES_H
 
+/* Override off_t if Large File Support is requested on native Windows.  */
+#if @WINDOWS_64_BIT_OFF_T@
+/* Same as int64_t in <stdint.h>.  */
+# if defined _MSC_VER
+#  define off_t __int64
+# else
+#  define off_t long long int
+# endif
+/* Indicator, for gnulib internal purposes.  */
+# define _GL_WINDOWS_64_BIT_OFF_T 1
+#endif
+
 /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 1b26c09..9115486 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -107,8 +107,9 @@
 # include <netdb.h>
 #endif
 
-/* MSVC defines off_t in <sys/types.h>.  */
-#if address@hidden@
+/* MSVC defines off_t in <sys/types.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
+#if address@hidden@ || @WINDOWS_64_BIT_OFF_T@
 /* Get off_t.  */
 # include <sys/types.h>
 #endif
@@ -562,10 +563,19 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
    <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. 
 */
-# if address@hidden@
+# if @REPLACE_FTRUNCATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftruncate
+#   define ftruncate rpl_ftruncate
+#  endif
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
+# else
+#  if address@hidden@
 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+# endif
 _GL_CXXALIASWARN (ftruncate);
 #elif defined GNULIB_POSIXCHECK
 # undef ftruncate
diff --git a/gltests/binary-io.h b/gltests/binary-io.h
index 824ad5b..a33e32a 100644
--- a/gltests/binary-io.h
+++ b/gltests/binary-io.h
@@ -25,28 +25,41 @@
    so we include it here first.  */
 #include <stdio.h>
 
-/* SET_BINARY (fd);
-   changes the file descriptor fd to perform binary I/O.  */
+/* set_binary_mode (fd, mode)
+   sets the binary/text I/O mode of file descriptor fd to the given mode
+   (must be O_BINARY or O_TEXT) and returns the previous mode.  */
 #if O_BINARY
 # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
 #  include <io.h> /* declares setmode() */
+#  define set_binary_mode setmode
 # else
-#  define setmode _setmode
+#  define set_binary_mode _setmode
 #  undef fileno
 #  define fileno _fileno
 # endif
-# ifdef __DJGPP__
-#  include <unistd.h> /* declares isatty() */
-   /* Avoid putting stdin/stdout in binary mode if it is connected to
-      the console, because that would make it impossible for the user
-      to interrupt the program through Ctrl-C or Ctrl-Break.  */
-#  define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 
0))
-# else
-#  define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
-# endif
 #else
-  /* On reasonable systems, binary I/O is the default.  */
-# define SET_BINARY(fd) /* do nothing */ ((void) 0)
+  /* On reasonable systems, binary I/O is the only choice.  */
+  /* Use an inline function rather than a macro, to avoid gcc warnings
+     "warning: statement with no effect".  */
+static inline int
+set_binary_mode (int fd, int mode)
+{
+  (void) fd;
+  (void) mode;
+  return O_BINARY;
+}
+#endif
+
+/* SET_BINARY (fd);
+   changes the file descriptor fd to perform binary I/O.  */
+#ifdef __DJGPP__
+# include <unistd.h> /* declares isatty() */
+  /* Avoid putting stdin/stdout in binary mode if it is connected to
+     the console, because that would make it impossible for the user
+     to interrupt the program through Ctrl-C or Ctrl-Break.  */
+# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, 
O_BINARY), 0) : 0))
+#else
+# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
 #endif
 
 #endif /* _BINARY_H */
diff --git a/gltests/fcntl.in.h b/gltests/fcntl.in.h
index 344bbe4..76e12f7 100644
--- a/gltests/fcntl.in.h
+++ b/gltests/fcntl.in.h
@@ -25,6 +25,8 @@
 #if defined __need_system_fcntl_h
 /* Special invocation convention.  */
 
+/* Needed before <sys/stat.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
    <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
@@ -42,6 +44,8 @@
 
 #ifndef address@hidden@_FCNTL_H
 
+/* Needed before <sys/stat.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
    <fcntl.h>.  On glibc systems, we would like to avoid namespace pollution.
diff --git a/gltests/ftruncate.c b/gltests/ftruncate.c
index ae1e858..e243add 100644
--- a/gltests/ftruncate.c
+++ b/gltests/ftruncate.c
@@ -1,5 +1,18 @@
 /* ftruncate emulations for native Windows.
-   This file is in the public domain.  */
+   Copyright (C) 1992-2012 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -7,12 +20,143 @@
 #include <unistd.h>
 
 #if HAVE_CHSIZE
+/* A native Windows platform.  */
 
 # include <errno.h>
-# include <io.h>
 
-# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-#  include "msvc-inval.h"
+# if _GL_WINDOWS_64_BIT_OFF_T
+
+/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit
+   argument.  So, define a 64-bit safe SetFileSize function ourselves.  */
+
+/* Ensure that <windows.h> declares GetFileSizeEx.  */
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT 0x500
+
+/* Get declarations of the native Windows API functions.  */
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+
+/* Get _get_osfhandle.  */
+#  include "msvc-nothrow.h"
+
+static BOOL
+SetFileSize (HANDLE h, LONGLONG size)
+{
+  LARGE_INTEGER old_size;
+
+  if (!GetFileSizeEx (h, &old_size))
+    return FALSE;
+
+  if (size != old_size.QuadPart)
+    {
+      /* Duplicate the handle, so we are free to modify its file position.  */
+      HANDLE curr_process = GetCurrentProcess ();
+      HANDLE tmph;
+
+      if (!DuplicateHandle (curr_process,           /* SourceProcessHandle */
+                            h,                      /* SourceHandle */
+                            curr_process,           /* TargetProcessHandle */
+                            (PHANDLE) &tmph,        /* TargetHandle */
+                            (DWORD) 0,              /* DesiredAccess */
+                            FALSE,                  /* InheritHandle */
+                            DUPLICATE_SAME_ACCESS)) /* Options */
+        return FALSE;
+
+      if (size < old_size.QuadPart)
+        {
+          /* Reduce the size.  */
+          LONG size_hi = (LONG) (size >> 32);
+          if (SetFilePointer (tmph, (LONG) size, &size_hi, FILE_BEGIN)
+              == INVALID_SET_FILE_POINTER
+              && GetLastError() != NO_ERROR)
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+          if (!SetEndOfFile (tmph))
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+        }
+      else
+        {
+          /* Increase the size by adding zero bytes at the end.  */
+          static char zero_bytes[1024];
+          LONG pos_hi = 0;
+          LONG pos_lo = SetFilePointer (tmph, (LONG) 0, &pos_hi, FILE_END);
+          LONGLONG pos;
+          if (pos_lo == INVALID_SET_FILE_POINTER
+              && GetLastError() != NO_ERROR)
+            {
+              CloseHandle (tmph);
+              return FALSE;
+            }
+          pos = ((LONGLONG) pos_hi << 32) | (ULONGLONG) (ULONG) pos_lo;
+          while (pos < size)
+            {
+              DWORD written;
+              LONGLONG count = size - pos;
+              if (count > sizeof (zero_bytes))
+                count = sizeof (zero_bytes);
+              if (!WriteFile (tmph, zero_bytes, (DWORD) count, &written, NULL)
+                  || written == 0)
+                {
+                  CloseHandle (tmph);
+                  return FALSE;
+                }
+              pos += (ULONGLONG) (ULONG) written;
+            }
+        }
+      /* Close the handle.  */
+      CloseHandle (tmph);
+    }
+  return TRUE;
+}
+
+int
+ftruncate (int fd, off_t length)
+{
+  HANDLE handle = (HANDLE) _get_osfhandle (fd);
+
+  if (handle == INVALID_HANDLE_VALUE)
+    {
+      errno = EBADF;
+      return -1;
+    }
+  if (length < 0)
+    {
+      errno = EINVAL;
+      return -1;
+    }
+  if (!SetFileSize (handle, length))
+    {
+      switch (GetLastError ())
+        {
+        case ERROR_ACCESS_DENIED:
+          errno = EACCES;
+          break;
+        case ERROR_HANDLE_DISK_FULL:
+        case ERROR_DISK_FULL:
+        case ERROR_DISK_TOO_FRAGMENTED:
+          errno = ENOSPC;
+          break;
+        default:
+          errno = EIO;
+          break;
+        }
+      return -1;
+    }
+  return 0;
+}
+
+# else
+
+#  include <io.h>
+
+#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#   include "msvc-inval.h"
 static inline int
 chsize_nothrow (int fd, long length)
 {
@@ -31,8 +175,8 @@ chsize_nothrow (int fd, long length)
 
   return result;
 }
-#  define chsize chsize_nothrow
-# endif
+#   define chsize chsize_nothrow
+#  endif
 
 int
 ftruncate (int fd, off_t length)
@@ -40,4 +184,5 @@ ftruncate (int fd, off_t length)
   return chsize (fd, length);
 }
 
+# endif
 #endif
diff --git a/gltests/ignore-value.h b/gltests/ignore-value.h
index 52919de..2e34435 100644
--- a/gltests/ignore-value.h
+++ b/gltests/ignore-value.h
@@ -35,16 +35,6 @@
 #ifndef _GL_IGNORE_VALUE_H
 # define _GL_IGNORE_VALUE_H
 
-# ifndef _GL_ATTRIBUTE_DEPRECATED
-/* The __attribute__((__deprecated__)) feature
-   is available in gcc versions 3.1 and newer.  */
-#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
-#   define _GL_ATTRIBUTE_DEPRECATED /* empty */
-#  else
-#   define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#  endif
-# endif
-
 /* The __attribute__((__warn_unused_result__)) feature
    is available in gcc versions 3.4 and newer,
    while the typeof feature has been available since 2.7 at least.  */
diff --git a/gltests/init.sh b/gltests/init.sh
index ae86714..f525a7c 100644
--- a/gltests/init.sh
+++ b/gltests/init.sh
@@ -207,6 +207,14 @@ else
   fi
 fi
 
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above.  Why use aliases rather
+# than functions?  Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && shopt -s expand_aliases
 
 # Enable glibc's malloc-perturbing option.
diff --git a/gltests/ioctl.c b/gltests/ioctl.c
index 2e51c92..4a2fd39 100644
--- a/gltests/ioctl.c
+++ b/gltests/ioctl.c
@@ -46,6 +46,10 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg 
*/)
 
 # include <errno.h>
 
+/* Get HANDLE.  */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
 # include "fd-hook.h"
 /* Get _get_osfhandle.  */
 # include "msvc-nothrow.h"
diff --git a/gltests/stat.c b/gltests/stat.c
index 9ea53c1..1fc633e 100644
--- a/gltests/stat.c
+++ b/gltests/stat.c
@@ -27,6 +27,20 @@
 #include <sys/stat.h>
 #undef __need_system_sys_stat_h
 
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if _GL_WINDOWS_64_BIT_ST_SIZE
+#  define stat _stati64
+#  define REPLACE_FUNC_STAT_DIR 1
+#  undef REPLACE_FUNC_STAT_FILE
+# elif REPLACE_FUNC_STAT_FILE
+/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a.
+   Bypass it.  */
+#  define stat _stat
+#  define REPLACE_FUNC_STAT_DIR 1
+#  undef REPLACE_FUNC_STAT_FILE
+# endif
+#endif
+
 static inline int
 orig_stat (const char *filename, struct stat *buf)
 {
diff --git a/gltests/test-binary-io.c b/gltests/test-binary-io.c
index c695454..4f284e7 100644
--- a/gltests/test-binary-io.c
+++ b/gltests/test-binary-io.c
@@ -30,26 +30,40 @@
 #include "macros.h"
 
 int
-main ()
+main (int argc, char *argv[])
 {
   /* Test the O_BINARY macro.  */
   {
     int fd =
-      open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+      open ("t-bin-out0.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
     if (write (fd, "Hello\n", 6) < 0)
       exit (1);
     close (fd);
   }
   {
     struct stat statbuf;
-    if (stat ("t-bin-out2.tmp", &statbuf) < 0)
+    if (stat ("t-bin-out0.tmp", &statbuf) < 0)
       exit (1);
     ASSERT (statbuf.st_size == 6);
   }
 
-  /* Test the SET_BINARY macro.  */
-  SET_BINARY (1);
-  fputs ("Hello\n", stdout);
+  switch (argv[1][0])
+    {
+    case '1':
+      /* Test the set_binary_mode() function.  */
+      set_binary_mode (1, O_BINARY);
+      fputs ("Hello\n", stdout);
+      break;
+
+    case '2':
+      /* Test the SET_BINARY macro.  */
+      SET_BINARY (1);
+      fputs ("Hello\n", stdout);
+      break;
+
+    default:
+      break;
+    }
 
   return 0;
 }
diff --git a/gltests/test-binary-io.sh b/gltests/test-binary-io.sh
index 272edef..c4dd6e9 100755
--- a/gltests/test-binary-io.sh
+++ b/gltests/test-binary-io.sh
@@ -3,9 +3,11 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
-tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
-./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
-cmp t-bin-out1.tmp t-bin-out2.tmp > /dev/null || exit 1
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
+./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1
 
 rm -fr $tmpfiles
 
diff --git a/lib/NEWS b/lib/NEWS
index 27e5046..b27d950 100644
--- a/lib/NEWS
+++ b/lib/NEWS
@@ -2,6 +2,33 @@ GNU SASL LIBRARY NEWS -- History of user-visible changes.
 Copyright (C) 2002-2012 Simon Josefsson
 See the end for copying conditions.
 
+* Version 1.7.4 (released 2012-05-16) [alpha]
+
+** libgsasl: Reverted unification of OpenID and SAML properties/callbacks.
+The reason was that client and servers needs to know whether it is
+SAML or OpenID that is used, and using the same property and callback
+symbol for both makes this more difficult.
+
+** i18n: Updated translations.
+
+** GSS-API server: Don't output zero-length tokens on context init success.
+Reported by Andreas Oberritter <address@hidden>.
+
+** GSS-API server: Only proceed to next step when context is established.
+Reported by Andreas Oberritter <address@hidden>.
+
+** Rewrote DIGEST-MD5 code to avoid false positive complaint from valgrind.
+
+** Update gnulib files.
+
+** API and ABI modifications.
+GSASL_REDIRECT_URL: Removed.
+GSASL_OPENID20_REDIRECT_URL: Added.
+GSASL_SAML20_REDIRECT_URL: Added.
+GSASL_AUTHENTICATE_IN_BROWSER: Removed.
+GSASL_SAML20_AUTHENTICATE_IN_BROWSER: Added.
+GSASL_OPENID20_AUTHENTICATE_IN_BROWSER: Added.
+
 * Version 1.7.3 (released 2012-04-03) [alpha]
 
 ** libgsasl: The SAML20 mechanism is now enabled by default.
diff --git a/lib/README b/lib/README
index f3d560f..7359451 100644
--- a/lib/README
+++ b/lib/README
@@ -20,6 +20,10 @@ See the file COPYING.
 The manual is not included in this directory, see the full GNU SASL
 archive.
 
+If you need help to use GNU SASL, or wish to help others, you are
+invited to join our mailing list address@hidden, see
+<https://lists.gnu.org/mailman/listinfo/help-gsasl>.
+
 Currently there is some support for the following mechanisms:
 
   - CRAM-MD5 (RFC 2195)
@@ -31,11 +35,11 @@ Currently there is some support for the following 
mechanisms:
   - DIGEST-MD5 (RFC 2831)
   - SCRAM-SHA-1 and SCRAM-SHA-1-PLUS (RFC 5802)
   - GS2-KRB5 (RFC 5801, no CB, requires GSS, Heimdal, or MIT Kerberos)
+  - SAML20 (RFC 6595)
+  - OPENID20 (RFC 6616)
   - LOGIN (non-standard)
   - NTLM (non-standard, client only, requires Libntlm)
   - KERBEROS_V5 (experimental, requires Shishi)
-  - SAML20 (draft-ietf-kitten-sasl-saml-01)
-  - OPENID20 (draft-ietf-kitten-sasl-openid-03)
 
 The library should be portable to all C89 platforms.
 
diff --git a/lib/build-aux/snippet/_Noreturn.h 
b/lib/build-aux/snippet/_Noreturn.h
index 1a7b4da..c44ad89 100644
--- a/lib/build-aux/snippet/_Noreturn.h
+++ b/lib/build-aux/snippet/_Noreturn.h
@@ -1,4 +1,4 @@
-#ifndef _Noreturn
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
diff --git a/lib/configure.ac b/lib/configure.ac
index 470a70c..70f4243 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -20,7 +20,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # MA 02110-1301, USA.
 
 AC_PREREQ(2.61)
-AC_INIT([libgsasl], [1.7.3], address@hidden)
+AC_INIT([libgsasl], [1.7.4], address@hidden)
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -29,7 +29,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # Interfaces added:                             AGE++
 # Interfaces removed:                           AGE=0
 AC_SUBST(LT_CURRENT, 16)
-AC_SUBST(LT_REVISION, 2)
+AC_SUBST(LT_REVISION, 3)
 AC_SUBST(LT_AGE, 9)
 
 # Used when creating libgsasl-XX.def.
diff --git a/lib/digest-md5/parser.c b/lib/digest-md5/parser.c
index a83178a..11a01c9 100644
--- a/lib/digest-md5/parser.c
+++ b/lib/digest-md5/parser.c
@@ -569,16 +569,12 @@ int
 digest_md5_parse_challenge (const char *challenge, size_t len,
                            digest_md5_challenge * out)
 {
-  size_t inlen = len ? len : strlen (challenge);
-  char *subopts = malloc (inlen + 1);
+  char *subopts = len ? strndup (challenge, len) : strdup (challenge);
   int rc;
 
   if (!subopts)
     return -1;
 
-  memcpy (subopts, challenge, inlen);
-  subopts[inlen] = '\0';
-
   rc = parse_challenge (subopts, out);
 
   free (subopts);
@@ -590,16 +586,12 @@ int
 digest_md5_parse_response (const char *response, size_t len,
                           digest_md5_response * out)
 {
-  size_t inlen = len ? len : strlen (response);
-  char *subopts = malloc (inlen + 1);
+  char *subopts = len ? strndup (response, len) : strdup (response);
   int rc;
 
   if (!subopts)
     return -1;
 
-  memcpy (subopts, response, inlen);
-  subopts[inlen] = '\0';
-
   rc = parse_response (subopts, out);
 
   free (subopts);
@@ -611,16 +603,12 @@ int
 digest_md5_parse_finish (const char *finish, size_t len,
                         digest_md5_finish * out)
 {
-  size_t inlen = len ? len : strlen (finish);
-  char *subopts = malloc (inlen + 1);
+  char *subopts = len ? strndup (finish, len) : strdup (finish);
   int rc;
 
   if (!subopts)
     return -1;
 
-  memcpy (subopts, finish, inlen);
-  subopts[inlen] = '\0';
-
   rc = parse_finish (subopts, out);
 
   free (subopts);
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 48a0796..089f609 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests 
--avoid=vc-list-files-tests --lgpl=2 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files base64 c-ctype crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random 
crypto/gc-sha1 getline gettext gss-extra lib-msvc-compat lib-symbol-versions 
lib-symbol-visibility maintainer-makefile memmem memxor minmax strnlen 
strverscmp vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests 
--avoid=vc-list-files-tests --lgpl=2 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files base64 c-ctype crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random 
crypto/gc-sha1 getline gettext gss-extra lib-msvc-compat lib-symbol-versions 
lib-symbol-visibility maintainer-makefile memmem memxor minmax strndup strnlen 
strverscmp vasprintf
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -872,6 +872,15 @@ EXTRA_DIST += string.in.h
 
 ## end   gnulib module string
 
+## begin gnulib module strndup
+
+
+EXTRA_DIST += strndup.c
+
+EXTRA_libgl_la_SOURCES += strndup.c
+
+## end   gnulib module strndup
+
 ## begin gnulib module strnlen
 
 
@@ -890,6 +899,31 @@ EXTRA_libgl_la_SOURCES += strverscmp.c
 
 ## end   gnulib module strverscmp
 
+## begin gnulib module sys_types
+
+BUILT_SOURCES += sys/types.h
+
+# We need the following in order to create <sys/types.h> when the system
+# doesn't have one that works with the given compiler.
+sys/types.h: sys_types.in.h $(top_builddir)/config.status
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+             -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+             < $(srcdir)/sys_types.in.h; \
+       } > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += sys/types.h sys/types.h-t
+
+EXTRA_DIST += sys_types.in.h
+
+## end   gnulib module sys_types
+
 ## begin gnulib module unistd
 
 BUILT_SOURCES += unistd.h
@@ -905,6 +939,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+             -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
              -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
              -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
              -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
@@ -1003,6 +1038,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+             -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
              -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
              -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
              -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
diff --git a/lib/gl/m4/getdelim.m4 b/lib/gl/m4/getdelim.m4
index 8bd3d3f..a6f4872 100644
--- a/lib/gl/m4/getdelim.m4
+++ b/lib/gl/m4/getdelim.m4
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 9
+# getdelim.m4 serial 10
 
 dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
 dnl
@@ -63,12 +63,14 @@ AC_DEFUN([gl_FUNC_GETDELIM],
  #endif
 #endif
          ],
-         [gl_cv_func_working_getdelim=yes],
-         [gl_cv_func_working_getdelim=no])]
+         [gl_cv_func_working_getdelim="guessing yes"],
+         [gl_cv_func_working_getdelim="guessing no"])]
     )])
-    if test $gl_cv_func_working_getdelim = no; then
-      REPLACE_GETDELIM=1
-    fi
+    case "$gl_cv_func_working_getdelim" in
+      *no)
+        REPLACE_GETDELIM=1
+        ;;
+    esac
   else
     HAVE_GETDELIM=0
   fi
diff --git a/lib/gl/m4/getline.m4 b/lib/gl/m4/getline.m4
index 01f38cf..72fbc9d 100644
--- a/lib/gl/m4/getline.m4
+++ b/lib/gl/m4/getline.m4
@@ -1,4 +1,4 @@
-# getline.m4 serial 25
+# getline.m4 serial 26
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
@@ -70,8 +70,8 @@ AC_DEFUN([gl_FUNC_GETLINE],
  #endif
 #endif
          ],
-         [am_cv_func_working_getline=yes],
-         [am_cv_func_working_getline=no])]
+         [am_cv_func_working_getline="guessing yes"],
+         [am_cv_func_working_getline="guessing no"])]
     )])
   fi
 
@@ -79,12 +79,14 @@ AC_DEFUN([gl_FUNC_GETLINE],
     HAVE_DECL_GETLINE=0
   fi
 
-  if test $am_cv_func_working_getline = no; then
-    dnl Set REPLACE_GETLINE always: Even if we have not found the broken
-    dnl getline function among $LIBS, it may exist in libinet and the
-    dnl executable may be linked with -linet.
-    REPLACE_GETLINE=1
-  fi
+  case "$am_cv_func_working_getline" in
+    *no)
+      dnl Set REPLACE_GETLINE always: Even if we have not found the broken
+      dnl getline function among $LIBS, it may exist in libinet and the
+      dnl executable may be linked with -linet.
+      REPLACE_GETLINE=1
+      ;;
+  esac
 ])
 
 # Prerequisites of lib/getline.c.
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index 89e8dad..73042e1 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/gl/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=vc-list-files-tests --lgpl=2 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files base64 
c-ctype crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-sha1 crypto/gc-md5 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 getline gettext gss-extra 
lib-msvc-compat lib-symbol-versions lib-symbol-visibility maintainer-makefile 
memmem memxor minmax strnlen strverscmp vasprintf
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=vc-list-files-tests --lgpl=2 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files base64 
c-ctype crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-sha1 crypto/gc-md5 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 getline gettext gss-extra 
lib-msvc-compat lib-symbol-versions lib-symbol-visibility maintainer-makefile 
memmem memxor minmax strndup strnlen strverscmp vasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -51,6 +51,7 @@ gl_MODULES([
   memmem
   memxor
   minmax
+  strndup
   strnlen
   strverscmp
   vasprintf
diff --git a/lib/gl/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4
index ae4d254..d62b767 100644
--- a/lib/gl/m4/gnulib-common.m4
+++ b/lib/gl/m4/gnulib-common.m4
@@ -14,7 +14,8 @@ AC_DEFUN([gl_COMMON], [
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
 [/* The _Noreturn keyword of C11.  */
-#ifndef _Noreturn
+#if ! (defined _Noreturn \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 6d7d3b0..c6fdb89 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -130,10 +130,13 @@ AC_DEFUN([gl_EARLY],
   # Code from module stdlib-tests:
   # Code from module string:
   # Code from module string-tests:
+  # Code from module strndup:
   # Code from module strnlen:
   # Code from module strnlen-tests:
   # Code from module strverscmp:
   # Code from module strverscmp-tests:
+  # Code from module sys_types:
+  # Code from module sys_types-tests:
   # Code from module test-framework-sh:
   # Code from module test-framework-sh-tests:
   # Code from module unistd:
@@ -261,6 +264,11 @@ gl_STDINT_H
 gl_STDIO_H
 gl_STDLIB_H
 gl_HEADER_STRING_H
+gl_FUNC_STRNDUP
+if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
+  AC_LIBOBJ([strndup])
+fi
+gl_STRING_MODULE_INDICATOR([strndup])
 gl_FUNC_STRNLEN
 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
   AC_LIBOBJ([strnlen])
@@ -273,6 +281,8 @@ if test $HAVE_STRVERSCMP = 0; then
   gl_PREREQ_STRVERSCMP
 fi
 gl_STRING_MODULE_INDICATOR([strverscmp])
+gl_SYS_TYPES_H
+AC_PROG_MKDIR_P
 gl_UNISTD_H
 gl_FUNC_VASNPRINTF
 gl_FUNC_VASPRINTF
@@ -506,8 +516,10 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stdlib.in.h
   lib/str-two-way.h
   lib/string.in.h
+  lib/strndup.c
   lib/strnlen.c
   lib/strverscmp.c
+  lib/sys_types.in.h
   lib/unistd.in.h
   lib/vasnprintf.c
   lib/vasnprintf.h
@@ -570,6 +582,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/msvc-inval.m4
   m4/multiarch.m4
   m4/nls.m4
+  m4/off_t.m4
   m4/po.m4
   m4/printf-posix.m4
   m4/printf.m4
@@ -586,8 +599,10 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stdio_h.m4
   m4/stdlib_h.m4
   m4/string_h.m4
+  m4/strndup.m4
   m4/strnlen.m4
   m4/strverscmp.m4
+  m4/sys_types_h.m4
   m4/threadlib.m4
   m4/uintmax_t.m4
   m4/unistd_h.m4
@@ -638,6 +653,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-string.c
   tests/test-strnlen.c
   tests/test-strverscmp.c
+  tests/test-sys_types.c
   tests/test-sys_wait.h
   tests/test-unistd.c
   tests/test-vasnprintf.c
diff --git a/lib/gl/m4/malloc.m4 b/lib/gl/m4/malloc.m4
index d3c39f5..8fa48e9 100644
--- a/lib/gl/m4/malloc.m4
+++ b/lib/gl/m4/malloc.m4
@@ -1,9 +1,47 @@
-# malloc.m4 serial 13
+# malloc.m4 serial 14
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_MALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible malloc],
+    [ac_cv_func_malloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *malloc ();
+            #endif
+          ]],
+          [[return ! malloc (0);]])
+       ],
+       [ac_cv_func_malloc_0_nonnull=yes],
+       [ac_cv_func_malloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_malloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_malloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+])# _AC_FUNC_MALLOC_IF
+
+])
+
 # gl_FUNC_MALLOC_GNU
 # ------------------
 # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
diff --git a/lib/gl/m4/math_h.m4 b/lib/gl/m4/math_h.m4
index a24d352..90d248a 100644
--- a/lib/gl/m4/math_h.m4
+++ b/lib/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 107
+# math_h.m4 serial 113
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -44,8 +44,10 @@ AC_DEFUN([gl_MATH_H],
      expf expl exp2 exp2f exp2l expm1 expm1f expm1l
      fabsf fabsl floorf floorl fma fmaf fmal
      fmod fmodf fmodl frexpf frexpl hypotf hypotl
+     ilogb ilogbf ilogbl
      ldexpf ldexpl
-     logb log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f 
log2l
+     log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
+     logb logbf logbl
      modf modff modfl powf
      remainder remainderf remainderl
      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
@@ -107,6 +109,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_HYPOT=0;      AC_SUBST([GNULIB_HYPOT])
   GNULIB_HYPOTF=0;     AC_SUBST([GNULIB_HYPOTF])
   GNULIB_HYPOTL=0;     AC_SUBST([GNULIB_HYPOTL])
+  GNULIB_ILOGB=0;      AC_SUBST([GNULIB_ILOGB])
+  GNULIB_ILOGBF=0;     AC_SUBST([GNULIB_ILOGBF])
+  GNULIB_ILOGBL=0;     AC_SUBST([GNULIB_ILOGBL])
   GNULIB_ISFINITE=0;   AC_SUBST([GNULIB_ISFINITE])
   GNULIB_ISINF=0;      AC_SUBST([GNULIB_ISINF])
   GNULIB_ISNAN=0;      AC_SUBST([GNULIB_ISNAN])
@@ -115,7 +120,6 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_ISNANL=0;     AC_SUBST([GNULIB_ISNANL])
   GNULIB_LDEXPF=0;     AC_SUBST([GNULIB_LDEXPF])
   GNULIB_LDEXPL=0;     AC_SUBST([GNULIB_LDEXPL])
-  GNULIB_LOGB=0;       AC_SUBST([GNULIB_LOGB])
   GNULIB_LOG=0;        AC_SUBST([GNULIB_LOG])
   GNULIB_LOGF=0;       AC_SUBST([GNULIB_LOGF])
   GNULIB_LOGL=0;       AC_SUBST([GNULIB_LOGL])
@@ -128,6 +132,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   GNULIB_LOG2=0;       AC_SUBST([GNULIB_LOG2])
   GNULIB_LOG2F=0;      AC_SUBST([GNULIB_LOG2F])
   GNULIB_LOG2L=0;      AC_SUBST([GNULIB_LOG2L])
+  GNULIB_LOGB=0;       AC_SUBST([GNULIB_LOGB])
+  GNULIB_LOGBF=0;      AC_SUBST([GNULIB_LOGBF])
+  GNULIB_LOGBL=0;      AC_SUBST([GNULIB_LOGBL])
   GNULIB_MODF=0;       AC_SUBST([GNULIB_MODF])
   GNULIB_MODFF=0;      AC_SUBST([GNULIB_MODFF])
   GNULIB_MODFL=0;      AC_SUBST([GNULIB_MODFL])
@@ -183,6 +190,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_FREXPF=1;               AC_SUBST([HAVE_FREXPF])
   HAVE_HYPOTF=1;               AC_SUBST([HAVE_HYPOTF])
   HAVE_HYPOTL=1;               AC_SUBST([HAVE_HYPOTL])
+  HAVE_ILOGB=1;                AC_SUBST([HAVE_ILOGB])
+  HAVE_ILOGBF=1;               AC_SUBST([HAVE_ILOGBF])
+  HAVE_ILOGBL=1;               AC_SUBST([HAVE_ILOGBL])
   HAVE_ISNANF=1;               AC_SUBST([HAVE_ISNANF])
   HAVE_ISNAND=1;               AC_SUBST([HAVE_ISNAND])
   HAVE_ISNANL=1;               AC_SUBST([HAVE_ISNANL])
@@ -194,6 +204,8 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_LOG1P=1;                AC_SUBST([HAVE_LOG1P])
   HAVE_LOG1PF=1;               AC_SUBST([HAVE_LOG1PF])
   HAVE_LOG1PL=1;               AC_SUBST([HAVE_LOG1PL])
+  HAVE_LOGBF=1;                AC_SUBST([HAVE_LOGBF])
+  HAVE_LOGBL=1;                AC_SUBST([HAVE_LOGBL])
   HAVE_MODFF=1;                AC_SUBST([HAVE_MODFF])
   HAVE_MODFL=1;                AC_SUBST([HAVE_MODFL])
   HAVE_POWF=1;                 AC_SUBST([HAVE_POWF])
@@ -227,12 +239,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   HAVE_DECL_FLOORL=1;          AC_SUBST([HAVE_DECL_FLOORL])
   HAVE_DECL_FREXPL=1;          AC_SUBST([HAVE_DECL_FREXPL])
   HAVE_DECL_LDEXPL=1;          AC_SUBST([HAVE_DECL_LDEXPL])
-  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
   HAVE_DECL_LOGL=1;            AC_SUBST([HAVE_DECL_LOGL])
   HAVE_DECL_LOG10L=1;          AC_SUBST([HAVE_DECL_LOG10L])
   HAVE_DECL_LOG2=1;            AC_SUBST([HAVE_DECL_LOG2])
   HAVE_DECL_LOG2F=1;           AC_SUBST([HAVE_DECL_LOG2F])
   HAVE_DECL_LOG2L=1;           AC_SUBST([HAVE_DECL_LOG2L])
+  HAVE_DECL_LOGB=1;            AC_SUBST([HAVE_DECL_LOGB])
   HAVE_DECL_REMAINDER=1;       AC_SUBST([HAVE_DECL_REMAINDER])
   HAVE_DECL_REMAINDERL=1;      AC_SUBST([HAVE_DECL_REMAINDERL])
   HAVE_DECL_RINTF=1;           AC_SUBST([HAVE_DECL_RINTF])
@@ -271,6 +283,8 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_HYPOT=0;             AC_SUBST([REPLACE_HYPOT])
   REPLACE_HYPOTF=0;            AC_SUBST([REPLACE_HYPOTF])
   REPLACE_HYPOTL=0;            AC_SUBST([REPLACE_HYPOTL])
+  REPLACE_ILOGB=0;             AC_SUBST([REPLACE_ILOGB])
+  REPLACE_ILOGBF=0;            AC_SUBST([REPLACE_ILOGBF])
   REPLACE_ISFINITE=0;          AC_SUBST([REPLACE_ISFINITE])
   REPLACE_ISINF=0;             AC_SUBST([REPLACE_ISINF])
   REPLACE_ISNAN=0;             AC_SUBST([REPLACE_ISNAN])
@@ -287,6 +301,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
   REPLACE_LOG2=0;              AC_SUBST([REPLACE_LOG2])
   REPLACE_LOG2F=0;             AC_SUBST([REPLACE_LOG2F])
   REPLACE_LOG2L=0;             AC_SUBST([REPLACE_LOG2L])
+  REPLACE_LOGB=0;              AC_SUBST([REPLACE_LOGB])
+  REPLACE_LOGBF=0;             AC_SUBST([REPLACE_LOGBF])
+  REPLACE_LOGBL=0;             AC_SUBST([REPLACE_LOGBL])
   REPLACE_MODF=0;              AC_SUBST([REPLACE_MODF])
   REPLACE_MODFF=0;             AC_SUBST([REPLACE_MODFF])
   REPLACE_MODFL=0;             AC_SUBST([REPLACE_MODFL])
diff --git a/lib/gl/m4/memmem.m4 b/lib/gl/m4/memmem.m4
index eebe94c..88f9e20 100644
--- a/lib/gl/m4/memmem.m4
+++ b/lib/gl/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 23
+# memmem.m4 serial 24
 dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -67,13 +67,16 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
   Lucky user
 #endif
            ],
-           [gl_cv_func_memmem_works_always=yes],
+           [gl_cv_func_memmem_works_always="guessing yes"],
            [gl_cv_func_memmem_works_always="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_memmem_works_always" != yes; then
-      REPLACE_MEMMEM=1
-    fi
+    case "$gl_cv_func_memmem_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
   fi
   gl_PREREQ_MEMMEM
 ]) # gl_FUNC_MEMMEM_SIMPLE
@@ -131,13 +134,16 @@ static void quit (int sig) { exit (sig + 128); }
  #endif
 #endif
            ],
-           [gl_cv_func_memmem_works_fast=yes],
+           [gl_cv_func_memmem_works_fast="guessing yes"],
            [gl_cv_func_memmem_works_fast="guessing no"])
         ])
       ])
-    if test "$gl_cv_func_memmem_works_fast" != yes; then
-      REPLACE_MEMMEM=1
-    fi
+    case "$gl_cv_func_memmem_works_fast" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
   fi
 ]) # gl_FUNC_MEMMEM
 
diff --git a/lib/gl/m4/off_t.m4 b/lib/gl/m4/off_t.m4
new file mode 100644
index 0000000..dfca2df
--- /dev/null
+++ b/lib/gl/m4/off_t.m4
@@ -0,0 +1,18 @@
+# off_t.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check whether to override the 'off_t' type.
+dnl Set WINDOWS_64_BIT_OFF_T.
+
+AC_DEFUN([gl_TYPE_OFF_T],
+[
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_OFF_T=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_OFF_T])
+])
diff --git a/lib/gl/m4/realloc.m4 b/lib/gl/m4/realloc.m4
index 039ed19..954c2f0 100644
--- a/lib/gl/m4/realloc.m4
+++ b/lib/gl/m4/realloc.m4
@@ -1,9 +1,47 @@
-# realloc.m4 serial 12
+# realloc.m4 serial 13
 dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+m4_version_prereq([2.70], [] ,[
+
+# This is taken from the following Autoconf patch:
+# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+AC_DEFUN([_AC_FUNC_REALLOC_IF],
+[
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CHECK_HEADERS([stdlib.h])
+  AC_CACHE_CHECK([for GNU libc compatible realloc],
+    [ac_cv_func_realloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+            # include <stdlib.h>
+            #else
+            char *realloc ();
+            #endif
+          ]],
+          [[return ! realloc (0, 0);]])
+       ],
+       [ac_cv_func_realloc_0_nonnull=yes],
+       [ac_cv_func_realloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* \
+          | hpux* | solaris* | cygwin* | mingw*)
+            ac_cv_func_realloc_0_nonnull=yes ;;
+          # If we don't know, assume the worst.
+          *) ac_cv_func_realloc_0_nonnull=no ;;
+        esac
+       ])
+    ])
+  AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
+])# AC_FUNC_REALLOC
+
+])
+
 # gl_FUNC_REALLOC_GNU
 # -------------------
 # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
diff --git a/lib/gl/m4/strndup.m4 b/lib/gl/m4/strndup.m4
new file mode 100644
index 0000000..bdde5fe
--- /dev/null
+++ b/lib/gl/m4/strndup.m4
@@ -0,0 +1,55 @@
+# strndup.m4 serial 20
+dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRNDUP],
+[
+  dnl Persuade glibc <string.h> to declare strndup().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_CHECK_DECLS_ONCE([strndup])
+  AC_CHECK_FUNCS_ONCE([strndup])
+  if test $ac_cv_have_decl_strndup = no; then
+    HAVE_DECL_STRNDUP=0
+  fi
+
+  if test $ac_cv_func_strndup = yes; then
+    HAVE_STRNDUP=1
+    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating 
'\0'.
+    AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
+      [AC_RUN_IFELSE([
+         AC_LANG_PROGRAM([[#include <string.h>
+                           #include <stdlib.h>]], [[
+#ifndef HAVE_DECL_STRNDUP
+  extern
+  #ifdef __cplusplus
+  "C"
+  #endif
+  char *strndup (const char *, size_t);
+#endif
+  char *s;
+  s = strndup ("some longer string", 15);
+  free (s);
+  s = strndup ("shorter string", 13);
+  return s[13] != '\0';]])],
+         [gl_cv_func_strndup_works=yes],
+         [gl_cv_func_strndup_works=no],
+         [
+changequote(,)dnl
+          case $host_os in
+            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
+            *)               gl_cv_func_strndup_works="guessing yes";;
+          esac
+changequote([,])dnl
+         ])])
+    case $gl_cv_func_strndup_works in
+      *no) REPLACE_STRNDUP=1 ;;
+    esac
+  else
+    HAVE_STRNDUP=0
+  fi
+])
diff --git a/gl/m4/sys_types_h.m4 b/lib/gl/m4/sys_types_h.m4
similarity index 84%
copy from gl/m4/sys_types_h.m4
copy to lib/gl/m4/sys_types_h.m4
index 8d18ddb..f11eef2 100644
--- a/gl/m4/sys_types_h.m4
+++ b/lib/gl/m4/sys_types_h.m4
@@ -1,4 +1,4 @@
-# sys_types_h.m4 serial 2
+# sys_types_h.m4 serial 4
 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,9 @@ AC_DEFUN([gl_SYS_TYPES_H],
 
   dnl Ensure the type mode_t gets defined.
   AC_REQUIRE([AC_TYPE_MODE_T])
+
+  dnl Whether to override the 'off_t' type.
+  AC_REQUIRE([gl_TYPE_OFF_T])
 ])
 
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
diff --git a/lib/gl/m4/unistd_h.m4 b/lib/gl/m4/unistd_h.m4
index 7595534..7e7651b 100644
--- a/lib/gl/m4/unistd_h.m4
+++ b/lib/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 63
+# unistd_h.m4 serial 65
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -24,6 +24,9 @@ AC_DEFUN([gl_UNISTD_H],
   dnl Ensure the type pid_t gets defined.
   AC_REQUIRE([AC_TYPE_PID_T])
 
+  dnl Determine WINDOWS_64_BIT_OFF_T.
+  AC_REQUIRE([gl_TYPE_OFF_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
@@ -155,6 +158,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
+  REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
   REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
   REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
   REPLACE_GETLOGIN_R=0;   AC_SUBST([REPLACE_GETLOGIN_R])
diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h
index de38072..3475dbe 100644
--- a/lib/gl/stdint.in.h
+++ b/lib/gl/stdint.in.h
@@ -90,7 +90,8 @@
 # include <sys/types.h>
 #endif
 
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX.  */
 #include <limits.h>
 
 #if @HAVE_INTTYPES_H@
@@ -246,8 +247,9 @@ typedef unsigned long long int gl_uint64_t;
 
 /* Here we assume a standard architecture where the hardware integer
    types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
-   are taken from the same list of types.  Assume that 'long int'
-   is fast enough for all narrower integers.  */
+   are taken from the same list of types.  The following code normally
+   uses types consistent with glibc, as that lessens the chance of
+   incompatibility with older GNU hosts.  */
 
 #undef int_fast8_t
 #undef uint_fast8_t
@@ -257,12 +259,21 @@ typedef unsigned long long int gl_uint64_t;
 #undef uint_fast32_t
 #undef int_fast64_t
 #undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
+typedef signed char gl_int_fast8_t;
+typedef unsigned char gl_uint_fast8_t;
+
+#ifdef __sun
+/* Define types compatible with SunOS 5.10, so that code compiled under
+   earlier SunOS versions works with code compiled under SunOS 5.10.  */
+typedef int gl_int_fast32_t;
+typedef unsigned int gl_uint_fast32_t;
+#else
 typedef long int gl_int_fast32_t;
 typedef unsigned long int gl_uint_fast32_t;
+#endif
+typedef gl_int_fast32_t gl_int_fast16_t;
+typedef gl_uint_fast32_t gl_uint_fast16_t;
+
 #define int_fast8_t gl_int_fast8_t
 #define uint_fast8_t gl_uint_fast8_t
 #define int_fast16_t gl_int_fast16_t
@@ -418,23 +429,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == 
sizeof (uintmax_t)
 #undef INT_FAST8_MIN
 #undef INT_FAST8_MAX
 #undef UINT_FAST8_MAX
-#define INT_FAST8_MIN  LONG_MIN
-#define INT_FAST8_MAX  LONG_MAX
-#define UINT_FAST8_MAX  ULONG_MAX
+#define INT_FAST8_MIN  SCHAR_MIN
+#define INT_FAST8_MAX  SCHAR_MAX
+#define UINT_FAST8_MAX  UCHAR_MAX
 
 #undef INT_FAST16_MIN
 #undef INT_FAST16_MAX
 #undef UINT_FAST16_MAX
-#define INT_FAST16_MIN  LONG_MIN
-#define INT_FAST16_MAX  LONG_MAX
-#define UINT_FAST16_MAX  ULONG_MAX
+#define INT_FAST16_MIN  INT_FAST32_MIN
+#define INT_FAST16_MAX  INT_FAST32_MAX
+#define UINT_FAST16_MAX  UINT_FAST32_MAX
 
 #undef INT_FAST32_MIN
 #undef INT_FAST32_MAX
 #undef UINT_FAST32_MAX
-#define INT_FAST32_MIN  LONG_MIN
-#define INT_FAST32_MAX  LONG_MAX
-#define UINT_FAST32_MAX  ULONG_MAX
+#ifdef __sun
+# define INT_FAST32_MIN  INT_MIN
+# define INT_FAST32_MAX  INT_MAX
+# define UINT_FAST32_MAX  UINT_MAX
+#else
+# define INT_FAST32_MIN  LONG_MIN
+# define INT_FAST32_MAX  LONG_MAX
+# define UINT_FAST32_MAX  ULONG_MAX
+#endif
 
 #undef INT_FAST64_MIN
 #undef INT_FAST64_MAX
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 9cde0b9..44b5d87 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -52,7 +52,8 @@
 #include <stddef.h>
 
 /* Get off_t and ssize_t.  Needed on many systems, including glibc 2.8
-   and eglibc 2.11.2.  */
+   and eglibc 2.11.2.
+   May also define off_t to a 64-bit type on native Windows.  */
 #include <sys/types.h>
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
diff --git a/lib/gl/strndup.c b/lib/gl/strndup.c
new file mode 100644
index 0000000..b6313b2
--- /dev/null
+++ b/lib/gl/strndup.c
@@ -0,0 +1,36 @@
+/* A replacement function, for systems that lack strndup.
+
+   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software
+   Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published by the
+   Free Software Foundation; either version 2.1, or (at your option) any
+   later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+char *
+strndup (char const *s, size_t n)
+{
+  size_t len = strnlen (s, n);
+  char *new = malloc (len + 1);
+
+  if (new == NULL)
+    return NULL;
+
+  new[len] = '\0';
+  return memcpy (new, s, len);
+}
diff --git a/gl/sys_types.in.h b/lib/gl/sys_types.in.h
similarity index 63%
copy from gl/sys_types.in.h
copy to lib/gl/sys_types.in.h
index 574fe51..b503870 100644
--- a/gl/sys_types.in.h
+++ b/lib/gl/sys_types.in.h
@@ -3,16 +3,16 @@
    Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1, or (at your option)
    any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
@@ -28,6 +28,18 @@
 #ifndef address@hidden@_SYS_TYPES_H
 #define address@hidden@_SYS_TYPES_H
 
+/* Override off_t if Large File Support is requested on native Windows.  */
+#if @WINDOWS_64_BIT_OFF_T@
+/* Same as int64_t in <stdint.h>.  */
+# if defined _MSC_VER
+#  define off_t __int64
+# else
+#  define off_t long long int
+# endif
+/* Indicator, for gnulib internal purposes.  */
+# define _GL_WINDOWS_64_BIT_OFF_T 1
+#endif
+
 /* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
diff --git a/lib/gl/unistd.in.h b/lib/gl/unistd.in.h
index 4e5ed58..5c6134a 100644
--- a/lib/gl/unistd.in.h
+++ b/lib/gl/unistd.in.h
@@ -107,8 +107,9 @@
 # include <netdb.h>
 #endif
 
-/* MSVC defines off_t in <sys/types.h>.  */
-#if address@hidden@
+/* MSVC defines off_t in <sys/types.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
+#if address@hidden@ || @WINDOWS_64_BIT_OFF_T@
 /* Get off_t.  */
 # include <sys/types.h>
 #endif
@@ -562,10 +563,19 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
    <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. 
 */
-# if address@hidden@
+# if @REPLACE_FTRUNCATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ftruncate
+#   define ftruncate rpl_ftruncate
+#  endif
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
+# else
+#  if address@hidden@
 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+# endif
 _GL_CXXALIASWARN (ftruncate);
 #elif defined GNULIB_POSIXCHECK
 # undef ftruncate
diff --git a/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index 06b463f..8a953bf 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -510,6 +510,14 @@ EXTRA_DIST += test-strverscmp.c signature.h macros.h
 
 ## end   gnulib module strverscmp-tests
 
+## begin gnulib module sys_types-tests
+
+TESTS += test-sys_types
+check_PROGRAMS += test-sys_types
+EXTRA_DIST += test-sys_types.c
+
+## end   gnulib module sys_types-tests
+
 ## begin gnulib module test-framework-sh-tests
 
 TESTS += test-init.sh
diff --git a/lib/gltests/init.sh b/lib/gltests/init.sh
index ae86714..f525a7c 100644
--- a/lib/gltests/init.sh
+++ b/lib/gltests/init.sh
@@ -207,6 +207,14 @@ else
   fi
 fi
 
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above.  Why use aliases rather
+# than functions?  Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && shopt -s expand_aliases
 
 # Enable glibc's malloc-perturbing option.
diff --git a/gltests/test-sys_types.c b/lib/gltests/test-sys_types.c
similarity index 100%
copy from gltests/test-sys_types.c
copy to lib/gltests/test-sys_types.c
diff --git a/lib/gssapi/server.c b/lib/gssapi/server.c
index d1d1aa8..5dca5dc 100644
--- a/lib/gssapi/server.c
+++ b/lib/gssapi/server.c
@@ -162,21 +162,28 @@ _gsasl_gssapi_server_step (Gsasl_session * sctx,
       if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
        return GSASL_GSSAPI_ACCEPT_SEC_CONTEXT_ERROR;
 
-      *output = malloc (bufdesc2.length);
-      if (!*output)
-       return GSASL_MALLOC_ERROR;
-      memcpy (*output, bufdesc2.value, bufdesc2.length);
-      *output_len = bufdesc2.length;
+      if (maj_stat == GSS_S_COMPLETE)
+       state->step++;
+
+      if (maj_stat == GSS_S_CONTINUE_NEEDED || bufdesc2.length > 0)
+       {
+         *output = malloc (bufdesc2.length);
+         if (!*output)
+           return GSASL_MALLOC_ERROR;
+         memcpy (*output, bufdesc2.value, bufdesc2.length);
+         *output_len = bufdesc2.length;
+       }
 
       maj_stat = gss_release_buffer (&min_stat, &bufdesc2);
       if (GSS_ERROR (maj_stat))
        return GSASL_GSSAPI_RELEASE_BUFFER_ERROR;
 
-      if (maj_stat == GSS_S_COMPLETE)
-       state->step++;
-
-      res = GSASL_NEEDS_MORE;
-      break;
+      if (maj_stat == GSS_S_CONTINUE_NEEDED || *output_len > 0)
+       {
+         res = GSASL_NEEDS_MORE;
+         break;
+       }
+      /* fall through */
 
     case 2:
       memset (tmp, 0xFF, 4);
diff --git a/lib/maint.mk b/lib/maint.mk
index 2228a37..1c7af03 100644
--- a/lib/maint.mk
+++ b/lib/maint.mk
@@ -932,8 +932,15 @@ sc_prohibit_doubled_word:
 # A regular expression matching undesirable combinations of words like
 # "can not"; this matches them even when the two words appear on different
 # lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence.  Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)address@hidden
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))address@hidden
 prohibit_undesirable_word_seq_RE_ ?=                                   \
-  /\bcan\s+not\b/gims
+  /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
 prohibit_undesirable_word_seq_ =                                       \
     -e 'while ($(prohibit_undesirable_word_seq_RE_))'                  \
     $(perl_filename_lineno_text_)
diff --git a/lib/openid20/client.c b/lib/openid20/client.c
index 5a10c02..f62feaf 100644
--- a/lib/openid20/client.c
+++ b/lib/openid20/client.c
@@ -90,9 +90,11 @@ _gsasl_openid20_client_step (Gsasl_session * sctx,
 
     case 1:
       {
-       gsasl_property_set_raw (sctx, GSASL_REDIRECT_URL, input, input_len);
+       gsasl_property_set_raw (sctx, GSASL_OPENID20_REDIRECT_URL,
+                               input, input_len);
 
-       res = gsasl_callback (NULL, sctx, GSASL_AUTHENTICATE_IN_BROWSER);
+       res = gsasl_callback (NULL, sctx,
+                             GSASL_OPENID20_AUTHENTICATE_IN_BROWSER);
        if (res != GSASL_OK)
          return res;
 
diff --git a/lib/openid20/server.c b/lib/openid20/server.c
index 17d80d4..ac1b955 100644
--- a/lib/openid20/server.c
+++ b/lib/openid20/server.c
@@ -95,9 +95,9 @@ _gsasl_openid20_server_step (Gsasl_session * sctx,
 
        gsasl_property_set_raw (sctx, GSASL_AUTHID, input, input_len);
 
-       p = gsasl_property_get (sctx, GSASL_REDIRECT_URL);
+       p = gsasl_property_get (sctx, GSASL_OPENID20_REDIRECT_URL);
        if (!p || !*p)
-         return GSASL_NO_REDIRECT_URL;
+         return GSASL_NO_OPENID20_REDIRECT_URL;
 
        *output_len = strlen (p);
        *output = malloc (*output_len);
diff --git a/lib/po/vi.po.in b/lib/po/vi.po.in
index 2a40197..606a24f 100644
--- a/lib/po/vi.po.in
+++ b/lib/po/vi.po.in
@@ -1,258 +1,287 @@
 # Vietnamese Translation for LibGSASL.
-# Copyright © 2010 Free Software Foundation, Inc.
+# Copyright © 2012 Free Software Foundation, Inc.
 # This file is distributed under the same license as the libgsasl package.
 # Clytie Siddall <address@hidden>, 2005-2010.
+# Trần Ngọc Quân <address@hidden>, 2012.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: libgsasl 1.4.1\n"
+"Project-Id-Version: libgsasl 1.6.1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2010-02-16 14:57+0100\n"
-"PO-Revision-Date: 2010-03-06 19:49+1030\n"
-"Last-Translator: Clytie Siddall <address@hidden>\n"
+"POT-Creation-Date: 2011-05-01 17:34+0200\n"
+"PO-Revision-Date: 2012-04-04 08:34+0700\n"
+"Last-Translator: Trần Ngọc Quân <address@hidden>\n"
 "Language-Team: Vietnamese <address@hidden>\n"
+"Language: vi\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "X-Generator: LocFactoryEditor 1.8\n"
+"X-Poedit-Language: Vietnamese\n"
+"X-Poedit-Country: VIET NAM\n"
+"X-Poedit-SourceCharset: utf-8\n"
 
-#: src/error.c:44
+#: src/error.c:46
 msgid "Libgsasl success"
 msgstr "Libgsasl thành công"
 
-#: src/error.c:45
+#: src/error.c:47
 msgid "SASL mechanism needs more data"
-msgstr "Cơ cấu SASL cần thiết dữ liệu thêm"
+msgstr "Cơ cấu SASL cần thêm dữ liệu"
 
-#: src/error.c:46
+#: src/error.c:48
 msgid "Unknown SASL mechanism"
 msgstr "Gặp cơ cấu SASL không rõ"
 
-#: src/error.c:48
+#: src/error.c:50
 msgid "SASL mechanism called too many times"
 msgstr "Cơ cấu SASL được gọi quá nhiều lần"
 
-#: src/error.c:50
+#: src/error.c:52
 msgid "SASL function needs larger buffer (internal error)"
 msgstr "Hàm SASL cần thiết bộ đệm lớn hơn (lỗi nội bộ)"
 
-#: src/error.c:51
+#: src/error.c:53
 msgid "Could not open file in SASL library"
 msgstr "Không thể mở tập tin trong thư viện SASL"
 
-#: src/error.c:52
+#: src/error.c:54
 msgid "Could not close file in SASL library"
 msgstr "Không thể đóng tập tin trong thư viện SASL"
 
-#: src/error.c:53
+#: src/error.c:55
 msgid "Memory allocation error in SASL library"
 msgstr "Lỗi cấp phát bộ nhớ trong thư viện SASL"
 
-#: src/error.c:54
+#: src/error.c:56
 msgid "Base 64 coding error in SASL library"
 msgstr "Lỗi mã cơ số 64 trong thư viện SASL"
 
-#: src/error.c:55
+#: src/error.c:57
 msgid "Low-level crypto error in SASL library"
 msgstr "Lỗi mật mã cấp thấp trong thư viện SASL"
 
-#: src/error.c:58
+#: src/error.c:60
 msgid "SASL mechanism needs gsasl_client_callback_anonymous() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược vô danh 
« gsasl_client_callback_anonymous() » (lỗi ứng dụng)"
 
-#: src/error.c:61
+#: src/error.c:63
 msgid "SASL mechanism needs gsasl_client_callback_password() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược mật 
khẩu « gsasl_client_callback_password() » (lỗi ứng dụng)"
 
-#: src/error.c:64
+#: src/error.c:66
 msgid "SASL mechanism needs gsasl_client_callback_passcode() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược mã mật 
khẩu « gsasl_client_callback_passcode() » (lỗi ứng dụng)"
 
-#: src/error.c:67
+#: src/error.c:69
 msgid "SASL mechanism needs gsasl_client_callback_pin() callback (application 
error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược số 
nhận diện « gsasl_client_callback_pin() » (lỗi ứng dụng)"
 
-#: src/error.c:70
+#: src/error.c:72
 msgid "SASL mechanism needs gsasl_client_callback_authorization_id() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược cấp 
quyền « gsasl_client_callback_authorization_id() » (lỗi ứng dụng)"
 
-#: src/error.c:73
+#: src/error.c:75
 msgid "SASL mechanism needs gsasl_client_callback_authentication_id() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược xác 
thực « gsasl_client_callback_authentication_id() » (lỗi ứng dụng)"
 
-#: src/error.c:76
+#: src/error.c:78
 msgid "SASL mechanism needs gsasl_client_callback_service() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược dịch 
vụ « gsasl_client_callback_service() » (lỗi ứng dụng)"
 
-#: src/error.c:79
+#: src/error.c:81
 msgid "SASL mechanism needs gsasl_server_callback_validate() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược thẩm 
tra « gsasl_server_callback_validate() » (lỗi ứng dụng)"
 
-#: src/error.c:82
+#: src/error.c:84
 msgid "SASL mechanism needs gsasl_server_callback_cram_md5() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược kiểm 
tổng « gsasl_server_callback_cram_md5() » (lỗi ứng dụng)"
 
-#: src/error.c:85
+#: src/error.c:87
 msgid "SASL mechanism needs gsasl_server_callback_digest_md5() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm ứng dụng khách gọi ngược tóm 
tắt kiểm tổng « gsasl_server_callback_digest_md5() » (lỗi ứng 
dụng)"
 
-#: src/error.c:88
+#: src/error.c:90
 msgid "SASL mechanism needs gsasl_server_callback_external() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược bên ngoài 
« gsasl_server_callback_external() » (lỗi ứng dụng)"
 
-#: src/error.c:91
+#: src/error.c:93
 msgid "SASL mechanism needs gsasl_server_callback_anonymous() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược vô danh « 
gsasl_server_callback_anonymous() » (lỗi ứng dụng)"
 
-#: src/error.c:94
+#: src/error.c:96
 msgid "SASL mechanism needs gsasl_server_callback_realm() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược địa hạt 
« gsasl_server_callback_realm() » (lỗi ứng dụng)"
 
-#: src/error.c:97
+#: src/error.c:99
 msgid "SASL mechanism needs gsasl_server_callback_securid() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược mã nhận 
diện bảo mật « gsasl_server_callback_securid() » (lỗi ứng dụng)"
 
-#: src/error.c:100
+#: src/error.c:102
 msgid "SASL mechanism needs gsasl_server_callback_service() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược dịch vụ 
« gsasl_server_callback_service() » (lỗi ứng dụng)"
 
-#: src/error.c:103
+#: src/error.c:105
 msgid "SASL mechanism needs gsasl_server_callback_gssapi() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược « 
gsasl_server_callback_gssapi() » (lỗi ứng dụng)"
 
-#: src/error.c:106
+#: src/error.c:108
 msgid "SASL mechanism needs gsasl_server_callback_retrieve() callback 
(application error)"
 msgstr "Cơ cấu SASL cần hàm máy phục vụ gọi ngược lấy « 
gsasl_server_callback_retrieve() » (lỗi ứng dụng)"
 
-#: src/error.c:109
+#: src/error.c:111
 msgid "Failed to perform Unicode Normalization on string."
 msgstr "Lỗi tiêu chuẩn hoá Unicode trên chuỗi."
 
-#: src/error.c:111
+#: src/error.c:113
 msgid "Could not prepare internationalized (non-ASCII) string."
 msgstr "Không thể chuẩn bị chuỗi đã quốc tế hóa (khác ASCII)."
 
-#: src/error.c:113
+#: src/error.c:115
 msgid "SASL mechanism could not parse input"
 msgstr "Cơ cấu SASL không thể phân tách kết nhập"
 
-#: src/error.c:114
+#: src/error.c:116
 msgid "Error authenticating user"
 msgstr "Gặp lỗi khi xác thực người dùng"
 
-#: src/error.c:116
+#: src/error.c:118
 msgid "Cannot get internal library handle (library error)"
 msgstr "Không thể lấy bộ quản lý thư viện nội bộ (lỗi thư 
viện)"
 
-#: src/error.c:117
+#: src/error.c:119
 msgid "Integrity error in application payload"
 msgstr "Gặp lỗi sự tích hợp trong trọng tải ứng dụng"
 
-#: src/error.c:118
+#: src/error.c:120
 msgid "No more realms available (non-fatal)"
 msgstr "Không còn có địa hạt sẵn sàng lại (khác nghiêm trọng)"
 
-#: src/error.c:120
+#: src/error.c:122
 msgid "Client-side functionality not available in library (application error)"
 msgstr "Chức năng bên ứng dụng khách không sẵn sàng trong thư 
viện (lỗi ứng dụng)"
 
-#: src/error.c:123
+#: src/error.c:125
 msgid "Server-side functionality not available in library (application error)"
 msgstr "Chức năng bên máy phục vụ không sẵn sàng trong thư 
viện (lỗi ứng dụng)"
 
-#: src/error.c:126
+#: src/error.c:128
 msgid "GSSAPI library could not deallocate memory in gss_release_buffer() in 
SASL library.  This is a serious internal error."
 msgstr "Thư viện GSSAPI không thể hủy cấp phát bộ nhớ trong hà
m bộ đệm nhả « gss_release_buffer() » trong thư viện SASL. Đây là
 lỗi nội bộ nghiêm trọng."
 
-#: src/error.c:130
+#: src/error.c:132
 msgid "GSSAPI library could not understand a peer name in gss_import_name() in 
SASL library.  This is most likely due to incorrect service and/or hostnames."
 msgstr "Thư viện GSSAPI không thể hiểu một tên ngang hàng trong hà
m nhập khẩu tên « gss_import_name() » trong thư viện SASL. Rất có 
thể do dịch vụ và/hay tên máy sai."
 
-#: src/error.c:134
+#: src/error.c:136
 msgid "GSSAPI error in client while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
 msgstr "Gặp lỗi GSSAPI trong ứng dụng khách trong khi dàn xếp 
ngữ cảnh bảo mật trong « gss_init_sec_context() » trong thư viện 
SASL. Chắc vì chưa có đủ thông tin xác thực hay có sự tương 
tác hiểm độc."
 
-#: src/error.c:138
-msgid "GSSAPI error in server while negotiating security context in 
gss_init_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
-msgstr "Gặp lỗi GSSAPI trong máy phục vụ trong khi dàn xếp ngữ 
cảnh bảo mật trong « gss_init_sec_context() » trong thư viện SASL. 
Chắc vì chưa có đủ thông tin xác thực hay có sự tương tác 
hiểm độc."
+#: src/error.c:140
+msgid "GSSAPI error in server while negotiating security context in 
gss_accept_sec_context() in SASL library.  This is most likely due insufficient 
credentials or malicious interactions."
+msgstr "Lỗi GSSAPI trong ứng dụng máy chủ trong khi dàn xếp ngữ 
cảnh bảo mật trong gss_accept_sec_context() trong thư viện SASL. 
Điều này giống như là chưa có đủ thông tin xác thực hay có 
sự tương tác hiểm độc."
 
-#: src/error.c:142
+#: src/error.c:144
 msgid "GSSAPI error while decrypting or decoding data in gss_unwrap() in SASL 
library.  This is most likely due to data corruption."
 msgstr "Gặp lỗi GSSAPI trong khi giải mã hoặc giải mật mã dữ 
liệu trong « gss_unwrap() » trong thư viện SASL. Chắc do dữ liệu 
bị hỏng."
 
-#: src/error.c:145
+#: src/error.c:147
 msgid "GSSAPI error while encrypting or encoding data in gss_wrap() in SASL 
library."
 msgstr "Gặp lỗi GSSAPI trong khi mã hóa hoặc mật mã hóa dữ 
liệu trong « gss_wrap() » trong thư viện SASL."
 
-#: src/error.c:148
+#: src/error.c:150
 msgid "GSSAPI error acquiring credentials in gss_acquire_cred() in SASL 
library.  This is most likely due to not having the proper Kerberos key 
available in /etc/krb5.keytab on the server."
 msgstr "Gặp lỗi GSSAPI khi giành thông tin xác thực trong « 
gss_acquire_cred() » trong thư viện SASL. Chắc vì không có khóa 
Kerberos đúng sẵn sàng trong tập tin « /etc/krb5.keytab » trên máy 
phục vụ."
 
-#: src/error.c:152
+#: src/error.c:154
 msgid "GSSAPI error creating a display name denoting the client in 
gss_display_name() in SASL library.  This is probably because the client 
supplied bad data."
 msgstr "Gặp lỗi GSSAPI khi tạo tên hiển thị đại diện ứng 
dụng khách trong « gss_display_name() » trong thư viện SASL. Rất có 
thể vì ứng dụng khách đã cung cấp dữ liệu sai."
 
-#: src/error.c:156
+#: src/error.c:158
 msgid "Other entity requested integrity or confidentiality protection in 
GSSAPI mechanism but this is currently not implemented."
 msgstr "Đối thể khác yêu cầu khả năng bảo vệ sự tích hợp 
hay bí mật trong cơ cấu GSSAPI nhưng khả năng này chưa được thi 
hành."
 
-#: src/error.c:159
+#: src/error.c:161
 msgid "Kerberos V5 initialization failure."
 msgstr "Lỗi sơ khởi Kerberos V5."
 
-#: src/error.c:161
+#: src/error.c:163
 msgid "Kerberos V5 internal error."
 msgstr "Lỗi nội bộ Kerberos V5."
 
-#: src/error.c:163
+#: src/error.c:165
 msgid "SecurID needs additional passcode."
 msgstr "SecurID yêu cầu mật khẩu bổ sung."
 
-#: src/error.c:165
+#: src/error.c:167
 msgid "SecurID needs new pin."
 msgstr "SecurID yêu cầu PIN mới."
 
-#: src/error.c:167
+#: src/error.c:169
 msgid "The provided library handle was invalid (application error)"
 msgstr "Bộ quản lý thư viện đã cung cấp là không hợp lệ 
(lỗi ứng dụng)"
 
-#: src/error.c:169
+#: src/error.c:171
 msgid "No callback specified by caller (application error)."
 msgstr "Bộ gọi chưa ghi rõ cách gọi lại (lỗi ứng dụng)."
 
-#: src/error.c:171
+#: src/error.c:173
 msgid "Authentication failed because the anonymous token was not provided."
 msgstr "Lỗi xác thực vì chưa có hiệu bài vô danh được cung 
cấp."
 
-#: src/error.c:174
+#: src/error.c:176
 msgid "Authentication failed because the authentication identity was not 
provided."
 msgstr "Lỗi xác thực vì không có thông tin nhận diện để xác 
thực được cung cấp"
 
-#: src/error.c:177
+#: src/error.c:179
 msgid "Authentication failed because the authorization identity was not 
provided."
 msgstr "Lỗi xác thực vì không có thông tin nhận diện để cấp 
quyền được cung cấp."
 
-#: src/error.c:180
+#: src/error.c:182
 msgid "Authentication failed because the password was not provided."
 msgstr "Lỗi xác thực vì không có mật khẩu được cung cấp."
 
-#: src/error.c:182
+#: src/error.c:184
 msgid "Authentication failed because the passcode was not provided."
 msgstr "Lỗi xác thực vì không có mã mật khẩu được cung cấp."
 
-#: src/error.c:184
+#: src/error.c:186
 msgid "Authentication failed because the pin code was not provided."
 msgstr "Lỗi xác thực vì không có mã PIN (số nhận diện cá 
nhân) được cung cấp."
 
-#: src/error.c:186
+#: src/error.c:188
 msgid "Authentication failed because the service name was not provided."
 msgstr "Lỗi xác thực vì không có tên dịch vụ được cung cấp."
 
-#: src/error.c:188
+#: src/error.c:190
 msgid "Authentication failed because the host name was not provided."
 msgstr "Lỗi xác thực vì không có tên máy được cung cấp."
 
-#: src/error.c:209
+#: src/error.c:192
+msgid "GSSAPI error encapsulating token."
+msgstr "Lỗi GSSAPI thẻ bài tóm lược."
+
+#: src/error.c:194
+msgid "GSSAPI error decapsulating token."
+msgstr "Lỗi GSSAPI thẻ bài decapsulating."
+
+#: src/error.c:196
+msgid "GSSAPI error getting OID for SASL mechanism name."
+msgstr "Lỗi GSSAPI lấy OID cho tên cơ cấu SASL."
+
+#: src/error.c:198
+msgid "GSSAPI error testing for OID in OID set."
+msgstr "Lỗi GSSAPI kiểm tra cho OID trong tập hợp OID."
+
+#: src/error.c:200
+msgid "GSSAPI error releasing OID set."
+msgstr "Lỗi GSSAPI phóng thích tập hợp OID."
+
+#: src/error.c:202
+msgid "Authentication failed because a tls-unique CB was not provided."
+msgstr "Lỗi xác thực vì tls-unique CB không được cung cấp."
+
+#: src/error.c:224
 msgid "Libgsasl unknown error"
 msgstr "Gặp lỗi Libgsasl không rõ"
diff --git a/lib/saml20/client.c b/lib/saml20/client.c
index 9c9c1fa..02d0fcf 100644
--- a/lib/saml20/client.c
+++ b/lib/saml20/client.c
@@ -91,9 +91,11 @@ _gsasl_saml20_client_step (Gsasl_session * sctx,
 
     case 1:
       {
-       gsasl_property_set_raw (sctx, GSASL_REDIRECT_URL, input, input_len);
+       gsasl_property_set_raw (sctx, GSASL_SAML20_REDIRECT_URL,
+                               input, input_len);
 
-       res = gsasl_callback (NULL, sctx, GSASL_AUTHENTICATE_IN_BROWSER);
+       res = gsasl_callback (NULL, sctx,
+                             GSASL_SAML20_AUTHENTICATE_IN_BROWSER);
        if (res != GSASL_OK)
          return res;
 
diff --git a/lib/saml20/server.c b/lib/saml20/server.c
index 80d4f20..787cd4a 100644
--- a/lib/saml20/server.c
+++ b/lib/saml20/server.c
@@ -95,9 +95,9 @@ _gsasl_saml20_server_step (Gsasl_session * sctx,
        gsasl_property_set_raw (sctx, GSASL_SAML20_IDP_IDENTIFIER,
                                input, input_len);
 
-       p = gsasl_property_get (sctx, GSASL_REDIRECT_URL);
+       p = gsasl_property_get (sctx, GSASL_SAML20_REDIRECT_URL);
        if (!p || !*p)
-         return GSASL_NO_REDIRECT_URL;
+         return GSASL_NO_SAML20_REDIRECT_URL;
 
        *output_len = strlen (p);
        *output = malloc (*output_len);
diff --git a/lib/src/error.c b/lib/src/error.c
index bad1844..fc34dce 100644
--- a/lib/src/error.c
+++ b/lib/src/error.c
@@ -202,8 +202,10 @@ static struct
        N_("Authentication failed because a tls-unique CB was not provided.")),
   ERR (GSASL_NO_SAML20_IDP_IDENTIFIER,
        N_("Callback failed to provide SAML20 IdP identifier.")),
-  ERR (GSASL_NO_REDIRECT_URL,
-       N_("Callback failed to provide redirect URL."))
+  ERR (GSASL_NO_SAML20_REDIRECT_URL,
+       N_("Callback failed to provide SAML20 redirect URL.")),
+  ERR (GSASL_NO_OPENID20_REDIRECT_URL,
+       N_("Callback failed to provide OPENID20 redirect URL."))
 };
 /* *INDENT-ON* */
 
diff --git a/lib/src/gsasl.h b/lib/src/gsasl.h
index f0b6e28..c7ccdf4 100644
--- a/lib/src/gsasl.h
+++ b/lib/src/gsasl.h
@@ -51,7 +51,7 @@ extern "C"
    * version number.  Used together with gsasl_check_version() to
    * verify header file and run-time library consistency.
    */
-#define GSASL_VERSION "1.7.3"
+#define GSASL_VERSION "1.7.4"
 
   /**
    * GSASL_VERSION_MAJOR
@@ -84,7 +84,7 @@ extern "C"
    *
    * Since: 1.1
    */
-#define GSASL_VERSION_PATCH 3
+#define GSASL_VERSION_PATCH 4
 
   /**
    * GSASL_VERSION_NUMBER
@@ -95,7 +95,7 @@ extern "C"
    *
    * Since: 1.1
    */
-#define GSASL_VERSION_NUMBER 0x010703
+#define GSASL_VERSION_NUMBER 0x010704
 
   /* RFC 2222: SASL mechanisms are named by strings, from 1 to 20
    * characters in length, consisting of upper-case letters, digits,
@@ -137,7 +137,10 @@ extern "C"
    * @GSASL_NO_HOSTNAME: Could not get required hostname.
    * @GSASL_NO_CB_TLS_UNIQUE: Could not get required tls-unique CB.
    * @GSASL_NO_SAML20_IDP_IDENTIFIER: Could not get required SAML IdP.
-   * @GSASL_NO_REDIRECT_URL: Could not get required redirect URL.
+   * @GSASL_NO_SAML20_REDIRECT_URL: Could not get required SAML
+   *   redirect URL.
+   * @GSASL_NO_OPENID20_REDIRECT_URL: Could not get required OpenID
+   *   redirect URL.
    * @GSASL_GSSAPI_RELEASE_BUFFER_ERROR: GSS-API library call error.
    * @GSASL_GSSAPI_IMPORT_NAME_ERROR: GSS-API library call error.
    * @GSASL_GSSAPI_INIT_SEC_CONTEXT_ERROR: GSS-API library call error.
@@ -189,7 +192,8 @@ extern "C"
     GSASL_NO_HOSTNAME = 59,
     GSASL_NO_CB_TLS_UNIQUE = 65,
     GSASL_NO_SAML20_IDP_IDENTIFIER = 66,
-    GSASL_NO_REDIRECT_URL = 67,
+    GSASL_NO_SAML20_REDIRECT_URL = 67,
+    GSASL_NO_OPENID20_REDIRECT_URL = 68,
     /* Mechanism specific errors. */
     GSASL_GSSAPI_RELEASE_BUFFER_ERROR = 37,
     GSASL_GSSAPI_IMPORT_NAME_ERROR = 38,
@@ -305,9 +309,13 @@ extern "C"
    *   to avoid re-computation and storing passwords in the clear.
    * @GSASL_CB_TLS_UNIQUE: Base64 encoded tls-unique channel binding.
    * @GSASL_SAML20_IDP_IDENTIFIER: SAML20 user IdP URL.
-   * @GSASL_REDIRECT_URL: URL to access in GSASL_AUTHENTICATE_IN_BROWSER.
+   * @GSASL_SAML20_REDIRECT_URL: SAML 2.0 URL to access in browser.
+   * @GSASL_OPENID20_REDIRECT_URL: OpenID 2.0 URL to access in browser.
    * @GSASL_OPENID20_OUTCOME_DATA: OpenID 2.0 authentication outcome data.
-   * @GSASL_AUTHENTICATE_IN_BROWSER: Request to authenticate in browser.
+   * @GSASL_SAML20_AUTHENTICATE_IN_BROWSER: Request to perform SAML 2.0
+   *   authentication in browser.
+   * @GSASL_OPENID20_AUTHENTICATE_IN_BROWSER: Request to perform OpenID 2.0
+   *   authentication in browser.
    * @GSASL_VALIDATE_SIMPLE: Request for simple validation.
    * @GSASL_VALIDATE_EXTERNAL: Request for validation of EXTERNAL.
    * @GSASL_VALIDATE_ANONYMOUS: Request for validation of ANONYMOUS.
@@ -340,10 +348,12 @@ extern "C"
     GSASL_SCRAM_SALTED_PASSWORD = 17,
     GSASL_CB_TLS_UNIQUE = 18,
     GSASL_SAML20_IDP_IDENTIFIER = 19,
-    GSASL_REDIRECT_URL = 20,
+    GSASL_SAML20_REDIRECT_URL = 20,
+    GSASL_OPENID20_REDIRECT_URL = 21,
     GSASL_OPENID20_OUTCOME_DATA = 22,
     /* Client callbacks. */
-    GSASL_AUTHENTICATE_IN_BROWSER = 250,
+    GSASL_SAML20_AUTHENTICATE_IN_BROWSER = 250,
+    GSASL_OPENID20_AUTHENTICATE_IN_BROWSER = 251,
     /* Server validation callback properties. */
     GSASL_VALIDATE_SIMPLE = 500,
     GSASL_VALIDATE_EXTERNAL = 501,
diff --git a/lib/src/internal.h b/lib/src/internal.h
index 90e055c..46449e3 100644
--- a/lib/src/internal.h
+++ b/lib/src/internal.h
@@ -103,7 +103,8 @@ struct Gsasl_session
   char *scram_salted_password;
   char *cb_tls_unique;
   char *saml20_idp_identifier;
-  char *redirect_url;
+  char *saml20_redirect_url;
+  char *openid20_redirect_url;
   char *openid20_outcome_data;
   /* If you add anything here, remember to change change
      gsasl_finish() in xfinish.c and map() in property.c.  */
diff --git a/lib/src/property.c b/lib/src/property.c
index b0e654d..45a4efb 100644
--- a/lib/src/property.c
+++ b/lib/src/property.c
@@ -108,8 +108,12 @@ map (Gsasl_session * sctx, Gsasl_property prop)
       p = &sctx->saml20_idp_identifier;
       break;
 
-    case GSASL_REDIRECT_URL:
-      p = &sctx->redirect_url;
+    case GSASL_SAML20_REDIRECT_URL:
+      p = &sctx->saml20_redirect_url;
+      break;
+
+    case GSASL_OPENID20_REDIRECT_URL:
+      p = &sctx->openid20_redirect_url;
       break;
 
     case GSASL_OPENID20_OUTCOME_DATA:
diff --git a/lib/src/xfinish.c b/lib/src/xfinish.c
index d5f283f..cfddd82 100644
--- a/lib/src/xfinish.c
+++ b/lib/src/xfinish.c
@@ -65,7 +65,8 @@ gsasl_finish (Gsasl_session * sctx)
   free (sctx->scram_salted_password);
   free (sctx->cb_tls_unique);
   free (sctx->saml20_idp_identifier);
-  free (sctx->redirect_url);
+  free (sctx->saml20_redirect_url);
+  free (sctx->openid20_redirect_url);
   free (sctx->openid20_outcome_data);
   /* If you add anything here, remember to change change
      gsasl_finish() in xfinish.c and Gsasl_session in internal.h.  */
diff --git a/maint.mk b/maint.mk
index 2228a37..1c7af03 100644
--- a/maint.mk
+++ b/maint.mk
@@ -932,8 +932,15 @@ sc_prohibit_doubled_word:
 # A regular expression matching undesirable combinations of words like
 # "can not"; this matches them even when the two words appear on different
 # lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence.  Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)address@hidden
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))address@hidden
 prohibit_undesirable_word_seq_RE_ ?=                                   \
-  /\bcan\s+not\b/gims
+  /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
 prohibit_undesirable_word_seq_ =                                       \
     -e 'while ($(prohibit_undesirable_word_seq_RE_))'                  \
     $(perl_filename_lineno_text_)
diff --git a/src/callbacks.c b/src/callbacks.c
index dff810b..f3526b4 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -216,11 +216,24 @@ callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
       }
       break;
 
-    case GSASL_AUTHENTICATE_IN_BROWSER:
+    case GSASL_SAML20_AUTHENTICATE_IN_BROWSER:
       {
-       const char *url = gsasl_property_get (sctx, GSASL_REDIRECT_URL);
+       const char *url = gsasl_property_get (sctx, GSASL_SAML20_REDIRECT_URL);
 
-       printf ("Visit this URL to proceed with authentication:\n%s\n", url);
+       printf ("Proceed to this URL to authenticate using SAML 2.0:\n%s\n",
+               url);
+
+       rc = GSASL_OK;
+      }
+      break;
+
+    case GSASL_OPENID20_AUTHENTICATE_IN_BROWSER:
+      {
+       const char *url = gsasl_property_get (sctx,
+                                             GSASL_OPENID20_REDIRECT_URL);
+
+       printf ("Proceed to this URL to authenticate using OpenID 2.0:\n%s\n",
+               url);
 
        rc = GSASL_OK;
       }
diff --git a/tests/libgsasl.supp b/tests/libgsasl.supp
index 16117a6..8dce75b 100644
--- a/tests/libgsasl.supp
+++ b/tests/libgsasl.supp
@@ -20,8 +20,8 @@
 # The simplest way to use this file is to put the following in ~/.valgrindrc:
 # --suppressions=/path/to/gsasl/tests/libgsasl.supp
 #
-# The memory leaks that are hidden here are those from libgcrypt,
-# nothing we can do about.
+# The memory leaks that are hidden here are those from external
+# libraries that we we can do nothing about.
 
 {
    libgsasl-gcrypt1
@@ -189,3 +189,20 @@
    fun:gc_nonce
    fun:gsasl_nonce
 }
+
+{
+   gsasl-mit-krb5-gss
+   Memcheck:Addr1
+   fun:__libc_res_nquerydomain
+   fun:__libc_res_nsearch
+   fun:__GI__nss_dns_gethostbyname3_r.constprop.3
+   fun:gethostbyname2_r@@GLIBC_2.2.5
+   fun:gaih_inet
+   fun:getaddrinfo
+   fun:krb5_sname_to_principal
+   fun:krb5_gss_import_name
+   fun:gssint_import_internal_name
+   fun:gss_add_cred
+   fun:gss_acquire_cred
+   fun:_gsasl_gssapi_server_start
+}
diff --git a/tests/openid20.c b/tests/openid20.c
index 35653ac..3f9ba68 100644
--- a/tests/openid20.c
+++ b/tests/openid20.c
@@ -52,7 +52,7 @@ client_callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
       rc = GSASL_OK;
       break;
 
-    case GSASL_AUTHENTICATE_IN_BROWSER:
+    case GSASL_OPENID20_AUTHENTICATE_IN_BROWSER:
       rc = GSASL_OK;
       break;
 
@@ -71,7 +71,7 @@ server_callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
 
   switch (prop)
     {
-    case GSASL_REDIRECT_URL:
+    case GSASL_OPENID20_REDIRECT_URL:
       gsasl_property_set (sctx, prop,
                          "http://idp.example/NONCE/?openid.foo=bar";);
       rc = GSASL_OK;
diff --git a/tests/saml20.c b/tests/saml20.c
index 936af78..25b25d9 100644
--- a/tests/saml20.c
+++ b/tests/saml20.c
@@ -64,7 +64,7 @@ client_callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
   /* The first round, the mechanism will need an authorization name
      and a SAML IDP.  The next round it will request that the client
      redirects the user (in the browser) using the data stored in the
-     GSASL_REDIRECT_URL property.  */
+     GSASL_SAML20_REDIRECT_URL property.  */
 
   switch (prop)
     {
@@ -77,9 +77,9 @@ client_callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
       rc = GSASL_OK;
       break;
 
-    case GSASL_AUTHENTICATE_IN_BROWSER:
+    case GSASL_SAML20_AUTHENTICATE_IN_BROWSER:
       printf ("client got redirect URL: %s\n",
-             gsasl_property_get (sctx, GSASL_REDIRECT_URL));
+             gsasl_property_get (sctx, GSASL_SAML20_REDIRECT_URL));
       rc = GSASL_OK;
       break;
 
@@ -102,7 +102,7 @@ server_callback (Gsasl * ctx, Gsasl_session * sctx, 
Gsasl_property prop)
 
   switch (prop)
     {
-    case GSASL_REDIRECT_URL:
+    case GSASL_SAML20_REDIRECT_URL:
       printf ("server got identity: %s\n",
              gsasl_property_get (sctx, GSASL_SAML20_IDP_IDENTIFIER));
       gsasl_property_set (sctx, prop, samlchallenge);
diff --git a/tests/scram.c b/tests/scram.c
index 3988b77..627a15b 100644
--- a/tests/scram.c
+++ b/tests/scram.c
@@ -205,8 +205,14 @@ doit (void)
       if (i == 18)
        {
          char *s;
+         int l;
 
-         asprintf (&s, "%s,a=b", s1);
+         l = asprintf (&s, "%s,a=b", s1);
+         if (l < 0)
+           {
+             fail ("malloc");
+             return;
+           }
          gsasl_free (s1);
          s1 = s;
          s1len = strlen (s);
@@ -215,8 +221,14 @@ doit (void)
       if (i == 20)
        {
          char *s;
+         int l;
 
-         asprintf (&s, "%s,a=b,b=c,c=d", s1);
+         l = asprintf (&s, "%s,a=b,b=c,c=d", s1);
+         if (l < 0)
+           {
+             fail ("malloc");
+             return;
+           }
          gsasl_free (s1);
          s1 = s;
          s1len = strlen (s);
@@ -258,9 +270,15 @@ doit (void)
       if (i == 19 && s1len > 31)
        {
          char *s;
+         int l;
 
-         asprintf (&s, "%.*s,a=b,%s", (int) (s1len - 31),
-                   s1, s1 + s1len - 31 + 1);
+         l = asprintf (&s, "%.*s,a=b,%s", (int) (s1len - 31),
+                       s1, s1 + s1len - 31 + 1);
+         if (l < 0)
+           {
+             fail ("malloc");
+             return;
+           }
          gsasl_free (s1);
          s1 = s;
          s1len = strlen (s);
@@ -269,9 +287,15 @@ doit (void)
       if (i == 21 && s1len > 31)
        {
          char *s;
+         int l;
 
-         asprintf (&s, "%.*s,a=b,b=c,c=d,%s", (int) (s1len - 31),
-                   s1, s1 + s1len - 31 + 1);
+         l = asprintf (&s, "%.*s,a=b,b=c,c=d,%s", (int) (s1len - 31),
+                       s1, s1 + s1len - 31 + 1);
+         if (l < 0)
+           {
+             fail ("malloc");
+             return;
+           }
          gsasl_free (s1);
          s1 = s;
          s1len = strlen (s);
diff --git a/tests/symbols.c b/tests/symbols.c
index d8071ef..c5e3622 100644
--- a/tests/symbols.c
+++ b/tests/symbols.c
@@ -19,21 +19,22 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
 #endif
 
-#include <assert.h>
-
 #include <gsasl.h>
 
+#include "utils.h"
+
 static void
 assert_symbol_exists (const void *p)
 {
-  assert (p);
+  if (!p)
+    fail ("null symbol?!\n");
 }
 
-int
-main (void)
+void
+doit (void)
 {
   /* LIBGSASL_1.1 */
   assert_symbol_exists ((const void *) GSASL_VALID_MECHANISM_CHARACTERS);
@@ -163,5 +164,5 @@ main (void)
   assert_symbol_exists ((const void *) gsasl_sha1);
   assert_symbol_exists ((const void *) gsasl_hmac_sha1);
 
-  return 0;
+  success ("all symbols exists\n");
 }
diff --git a/windows/gsasl4win.mk b/windows/gsasl4win.mk
index 94fe811..e52f1ea 100644
--- a/windows/gsasl4win.mk
+++ b/windows/gsasl4win.mk
@@ -24,7 +24,7 @@ all:
        @echo '  make -f gsasl4win.mk gsasl4win32kfw322 VERSION=1.6.1'
 
 clean:
-       rm -rf src build-x86 build-x64 inst-x86 inst-x64 kfw322x86 kfw323x86
+       rm -rf src build-x86 build-x64 inst-x86 inst-x64 kfw322x86
 
 gsasl4win: gsasl4win32 gsasl4win64 gsasl4win32kfw322
 gsasl4win32: gsasl-$(VERSION)-x86.zip
@@ -72,6 +72,7 @@ build-x64/gsasl-$(VERSION)/Makefile: 
src/gsasl-$(VERSION)/configure
 
 inst-x64/bin/libgsasl-$(GSASL_DLL_VERSION).dll: 
build-x64/gsasl-$(VERSION)/Makefile
        make -C build-x64/gsasl-$(VERSION) install
+       make -C build-x64/gsasl-$(VERSION)/tests check
 
 gsasl-$(VERSION)-x64.zip: inst-x64/bin/libgsasl-$(GSASL_DLL_VERSION).dll
        rm -f gsasl-$(VERSION)-x64.zip
@@ -79,13 +80,13 @@ gsasl-$(VERSION)-x64.zip: 
inst-x64/bin/libgsasl-$(GSASL_DLL_VERSION).dll
 
 # x86 KfW 3.2.2 flavor
 
-build-x86-kfw322/gsasl-$(VERSION)/Makefile: src/gsasl-$(VERSION)/configure 
kfw322x86/kfw-3-2-2-final/inc/krb5/win-mac.h install-kfw322
+build-x86-kfw322/gsasl-$(VERSION)/Makefile: src/gsasl-$(VERSION)/configure 
kfw322sdkx86/kfw-3-2-2-final/inc/krb5/win-mac.h
        rm -rf build-x86-kfw322/gsasl-$(VERSION)
        mkdir -p build-x86-kfw322/gsasl-$(VERSION) && \
        cd build-x86-kfw322/gsasl-$(VERSION) && \
-       lt_cv_deplibs_check_method=pass_all 
../../src/gsasl-$(VERSION)/configure --host=i686-w64-mingw32 
--build=i686-pc-linux-gnu --prefix=$(PWD)/inst-x86-kfw322 --without-libgcrypt 
--disable-obsolete --with-gssapi-impl=kfw 
LDFLAGS="-L$(PWD)/kfw322x86/kfw-3-2-2-final/lib/i386" 
CPPFLAGS="-I$(PWD)/kfw322x86/kfw-3-2-2-final/inc/krb5 -DSSIZE_T_DEFINED"
+       lt_cv_deplibs_check_method=pass_all 
../../src/gsasl-$(VERSION)/configure --host=i686-w64-mingw32 
--build=i686-pc-linux-gnu --prefix=$(PWD)/inst-x86-kfw322 --without-libgcrypt 
--disable-obsolete --with-gssapi-impl=kfw 
LDFLAGS="-L$(PWD)/kfw322sdkx86/kfw-3-2-2-final/lib/i386" 
CPPFLAGS="-I$(PWD)/kfw322sdkx86/kfw-3-2-2-final/inc/krb5 -DSSIZE_T_DEFINED"
 
-inst-x86-kfw322/bin/libgsasl-$(GSASL_DLL_VERSION).dll: 
build-x86-kfw322/gsasl-$(VERSION)/Makefile
+inst-x86-kfw322/bin/libgsasl-$(GSASL_DLL_VERSION).dll: 
build-x86-kfw322/gsasl-$(VERSION)/Makefile install-kfw322
        make -C build-x86-kfw322/gsasl-$(VERSION) install
        make -C build-x86-kfw322/gsasl-$(VERSION)/tests check
 
@@ -93,56 +94,23 @@ gsasl-$(VERSION)-x86-kfw322.zip: 
inst-x86-kfw322/bin/libgsasl-$(GSASL_DLL_VERSIO
        rm -f gsasl-$(VERSION)-x86-kfw322.zip
        cd inst-x86-kfw322 && zip -r ../gsasl-$(VERSION)-x86-kfw322.zip *
 
-# x86 KfW 3.2.3 flavor (not built right now due to crashes)
-
-build-x86-kfw323/gsasl-$(VERSION)/Makefile: src/gsasl-$(VERSION)/configure 
kfw323x86/kfw-3-2-3-final/inc/krb5/win-mac.h install-x86-kfw323
-       rm -rf build-x86-kfw323/gsasl-$(VERSION)
-       mkdir -p build-x86-kfw323/gsasl-$(VERSION) && \
-       cd build-x86-kfw323/gsasl-$(VERSION) && \
-       lt_cv_deplibs_check_method=pass_all 
../../src/gsasl-$(VERSION)/configure --host=i686-w64-mingw32 
--build=i686-pc-linux-gnu --prefix=$(PWD)/inst-x86-kfw323 --without-libgcrypt 
--disable-obsolete --with-gssapi-impl=kfw 
LDFLAGS="-L$(PWD)/kfw323x86/kfw-3-2-3-final/lib/i386" 
CPPFLAGS="-I$(PWD)/kfw323x86/kfw-3-2-3-final/inc/krb5 -DSSIZE_T_DEFINED"
-
-inst-x86-kfw323/bin/libgsasl-$(GSASL_DLL_VERSION).dll: 
build-x86-kfw323/gsasl-$(VERSION)/Makefile
-       make -C build-x86-kfw323/gsasl-$(VERSION) install
-       make -C build-x86-kfw323/gsasl-$(VERSION)/tests check
-
-gsasl-$(VERSION)-x86-kfw323.zip: 
inst-x86-kfw323/bin/libgsasl-$(GSASL_DLL_VERSION).dll
-       rm -f gsasl-$(VERSION)-x86-kfw323.zip
-       cd inst-x86-kfw323 && zip -r ../gsasl-$(VERSION)-x86-kfw323.zip *
-
 # KfW 3.2.2
 
-install-kfw322:
-       rm -rf tmp && \
-       mkdir tmp && \
-       cd tmp && \
-       wget http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.2/kfw-3-2-2.zip 
&& \
-       unzip kfw-3-2-2.zip && \
-       cp -v kfw-3-2-2-final/bin/i386/*.dll 
$(HOME)/.wine/drive_c/windows/system32/
-
 dist/kfw-3-2-2-sdk.zip:
        -mkdir dist
        cd dist && wget 
http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.2/kfw-3-2-2-sdk.zip
 
-kfw322x86/kfw-3-2-2-final/inc/krb5/win-mac.h: dist/kfw-3-2-2-sdk.zip
-       -mkdir kfw322x86
-       cd kfw322x86 && unzip ../dist/kfw-3-2-2-sdk.zip
-       perl -pi -e 's,sys\\,sys/,' kfw322x86/kfw-3-2-2-final/inc/krb5/win-mac.h
-
-# KfW 3.2.3 x86
+kfw322sdkx86/kfw-3-2-2-final/inc/krb5/win-mac.h: dist/kfw-3-2-2-sdk.zip
+       -mkdir kfw322sdkx86
+       cd kfw322sdkx86 && unzip -u ../dist/kfw-3-2-2-sdk.zip
+       perl -pi -e 's,sys\\,sys/,' 
kfw322sdkx86/kfw-3-2-2-final/inc/krb5/win-mac.h
 
-install-x86-kfw323:
-       rm -rf tmp && \
-       mkdir tmp && \
-       cd tmp && \
-       wget 
http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.3-alpha1/kfw-3-2-3-i386.zip && 
\
-       unzip kfw-3-2-3-i386.zip && \
-       cp -v kfw-3-2-3-final/bin/i386/*.dll 
$(HOME)/.wine/drive_c/windows/system32/
-
-dist/kfw-3-2-3-i386-sdk.zip:
+dist/kfw-3-2-2.zip:
        -mkdir dist
-       cd dist && wget 
http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.3-alpha1/kfw-3-2-3-i386-sdk.zip
+       cd dist && wget 
http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.2/kfw-3-2-2.zip
 
-kfw323x86/kfw-3-2-3-final/inc/krb5/win-mac.h: dist/kfw-3-2-3-i386-sdk.zip
-       -mkdir kfw323x86
-       cd kfw323x86 && unzip ../dist/kfw-3-2-3-i386-sdk.zip
-       perl -pi -e 's,sys\\,sys/,' kfw323x86/kfw-3-2-3-final/inc/krb5/win-mac.h
+install-kfw322: dist/kfw-3-2-2.zip
+       -mkdir kfw322x86
+       cd kfw322x86 && unzip -u ../dist/kfw-3-2-2.zip
+       mkdir -p build-x86-kfw322/gsasl-$(VERSION)/lib/src/.libs
+       cp -v kfw322x86/kfw-3-2-2-final/bin/i386/*.dll 
build-x86-kfw322/gsasl-$(VERSION)/lib/src/.libs/


hooks/post-receive
-- 
GNU gsasl



reply via email to

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