libidn-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libidn branch, master, updated. libidn-1-18-22-gcfe8791


From: Simon Josefsson
Subject: [SCM] GNU libidn branch, master, updated. libidn-1-18-22-gcfe8791
Date: Fri, 26 Mar 2010 08:16:25 +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 libidn".

http://git.savannah.gnu.org/cgit/libidn.git/commit/?id=cfe879128713db23fee410bed93479ecf234c997

The branch, master has been updated
       via  cfe879128713db23fee410bed93479ecf234c997 (commit)
       via  65dda6a4b114b5d5a1d79abedaef7fbf5c7c66b6 (commit)
       via  b8230665955a2a0fd2497a9f54a839ecd872a3a4 (commit)
       via  1ada6a5aa9ffef1c860ab87955098232e87eefed (commit)
       via  9e55f2e6d9013e3e8512805f90928c27255b5b14 (commit)
      from  b88ee904cb3cff956ad64a1080ad84ecc05149f9 (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 cfe879128713db23fee410bed93479ecf234c997
Author: Simon Josefsson <address@hidden>
Date:   Fri Mar 26 09:16:19 2010 +0100

    Update gnulib files.

commit 65dda6a4b114b5d5a1d79abedaef7fbf5c7c66b6
Author: Simon Josefsson <address@hidden>
Date:   Wed Mar 24 13:53:44 2010 +0100

    Update gnulib files.

commit b8230665955a2a0fd2497a9f54a839ecd872a3a4
Author: Simon Josefsson <address@hidden>
Date:   Wed Mar 24 08:52:27 2010 +0100

    Fix typos.  Drop @acronym use.

commit 1ada6a5aa9ffef1c860ab87955098232e87eefed
Author: Simon Josefsson <address@hidden>
Date:   Wed Mar 24 08:43:48 2010 +0100

    Add.

commit 9e55f2e6d9013e3e8512805f90928c27255b5b14
Author: Simon Josefsson <address@hidden>
Date:   Wed Mar 24 08:42:15 2010 +0100

    Update gnulib files.

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

Summary of changes:
 .x-sc_texinfo_acronym             |    1 +
 build-aux/warn-on-use.h           |   14 ++++-
 doc/libidn.texi                   |  122 +++++++++++++++++++------------------
 gl/Makefile.am                    |    4 +-
 gl/errno.in.h                     |    4 +-
 gl/getopt.c                       |    4 -
 gl/getopt.in.h                    |    4 +-
 gl/gettext.h                      |    2 +-
 gl/m4/setenv.m4                   |    3 +-
 gl/m4/stdlib_h.m4                 |   15 +++-
 gl/m4/unistd_h.m4                 |   12 ++--
 gl/stdarg.in.h                    |    4 +-
 gl/string.in.h                    |    4 +-
 gl/unistd.in.h                    |   56 +++++++++++++++--
 gltests/Makefile.am               |    6 ++
 gltests/stdint.in.h               |    7 +-
 gltests/stdlib.in.h               |   48 ++++++++++++++
 gltests/test-vc-list-files-git.sh |    6 +-
 gltests/time.in.h                 |   16 +++--
 lib/gl/gettext.h                  |    2 +-
 lib/gl/iconv.in.h                 |    4 +-
 lib/gl/stdint.in.h                |    7 +-
 lib/gl/string.in.h                |    4 +-
 maint.mk                          |   28 ++++++++-
 24 files changed, 262 insertions(+), 115 deletions(-)
 create mode 100644 .x-sc_texinfo_acronym

diff --git a/.x-sc_texinfo_acronym b/.x-sc_texinfo_acronym
new file mode 100644
index 0000000..4ce290c
--- /dev/null
+++ b/.x-sc_texinfo_acronym
@@ -0,0 +1 @@
+^doc/fdl-1.3.texi
diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h
index 03ae871..1cd5062 100644
--- a/build-aux/warn-on-use.h
+++ b/build-aux/warn-on-use.h
@@ -70,7 +70,7 @@ extern __typeof__ (function) function __attribute__ 
((__warning__ (message)))
 
 # else /* Unsupported.  */
 #  define _GL_WARN_ON_USE(function, message) \
-extern int _gl_warn_on_use
+_GL_WARN_EXTERN_C int _gl_warn_on_use
 # endif
 #endif
 
@@ -87,6 +87,16 @@ extern rettype function parameters_and_attributes \
      __attribute__ ((__warning__ (msg)))
 # else /* Unsupported.  */
 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern int _gl_warn_on_use
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_EXTERN_C declaration;
+   performs the declaration with C linkage.  */
+#ifndef _GL_WARN_EXTERN_C
+# if defined __cplusplus
+#  define _GL_WARN_EXTERN_C extern "C"
+# else
+#  define _GL_WARN_EXTERN_C extern
 # endif
 #endif
diff --git a/doc/libidn.texi b/doc/libidn.texi
index 6ba126c..41a2566 100644
--- a/doc/libidn.texi
+++ b/doc/libidn.texi
@@ -181,7 +181,7 @@ GNU Lesser General Public License version 2.1 or later 
(@pxref{GNU
 LGPL}).
 
 @item It's thread-safe
-No global state is kept in the library.  All functions are reentrant.
+No global state is kept in the library.  All functions are re-entrant.
 
 @item It's portable
 The code is intended to be written in pure ANSI C89.  It has been
@@ -225,8 +225,8 @@ component within the library is hidden from the application.
 @section Supported Platforms
 
 Libidn has at some point in time been tested on the following
-platforms.  Online build reports for each platforms and Libidn version
-is available at @url{http://autobuild.josefsson.org/libidn/}.
+platforms.  Build reports for each platforms and Libidn version is
+available at @url{http://autobuild.josefsson.org/libidn/}.
 
 @enumerate
 
@@ -433,7 +433,7 @@ need memory or size optimization.
 If you are interested, please write to:
 
 @verbatim
-Simon Josefsson Datakonsult
+Simon Josefsson Datakonsult AB
 Hagagatan 24
 113 47 Stockholm
 Sweden
@@ -804,7 +804,7 @@ the path to the library files has to be added to the 
library search
 path (via the @option{-L} option).  For this, the option
 @option{--libs} to @command{pkg-config libidn} can be used.  For
 convenience, this option also outputs all other options that are
-required to link the program with the `libidn' libarary.  The example
+required to link the program with the `libidn' library.  The example
 shows how to link @file{foo.o} with the `libidn' library to a program
 @command{foo}.
 
@@ -829,13 +829,13 @@ to check for installed libraries, you might find the 
following snippet
 illustrative.  It add a new @file{configure} parameter
 @code{--with-libidn}, and check for @file{idna.h} and @samp{-lidn}
 (possibly below the directory specified as the optional argument to
address@hidden), and define the @acronym{CPP} symbol
address@hidden if the library is found.  The default behaviour is to
-search for the library and enable the functionality (that is, define
-the symbol) when the library is found, but if you wish to make the
-default behaviour of your package be that Libidn is not used (even if
-it is installed on the system), change @samp{libidn=yes} to
address@hidden on the third line.
address@hidden), and define the CPP symbol @code{LIBIDN} if the
+library is found.  The default behaviour is to search for the library
+and enable the functionality (that is, define the symbol) when the
+library is found, but if you wish to make the default behaviour of
+your package be that Libidn is not used (even if it is installed on
+the system), change @samp{libidn=yes} to @samp{libidn=no} on the third
+line.
 
 @example
 AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
@@ -1174,12 +1174,12 @@ the core IDNA primitives.  The @code{4} indicate that 
the function
 takes UCS-4 strings (i.e., Unicode code points encoded in a 32-bit
 unsigned integer type) of the specified length.  The @code{i} indicate
 that the data is written ``inline'' into the buffer.  This means the
-caller is responsible for allocating (and deallocating) the string,
+caller is responsible for allocating (and de-allocating) the string,
 and providing the library with the allocated length of the string.
 The output length is written in the output length variable.  The
 remaining functions all contain the @code{z} indicator, which means
 the strings are zero terminated.  All output strings are allocated by
-the library, and must be deallocated by the caller.  The @code{4}
+the library, and must be de-allocated by the caller.  The @code{4}
 indicator again means that the string is UCS-4, the @code{8} means the
 strings are UTF-8 and the @code{l} indicator means the strings are
 encoded in the encoding used by the current locale.
@@ -1214,23 +1214,23 @@ The functions provided are the following entry points:
 @chapter TLD Functions
 @cindex TLD Functions
 
-Organizations that manage some Top Level Domains (@acronym{TLD}s) have
-published tables with characters they accept within the domain.  The
-reason may be to reduce complexity that come from using the full
-Unicode range, and to protect themselves from future (backwards
-incompatible) changes in the IDN or Unicode specifications.  Libidn
-implement an infrastructure for defining and checking strings against
-such tables.  Libidn also ship some tables from @acronym{TLD}s that we
-have managed to get permission to use them from.  Because these tables
-are even less static than Unicode or StringPrep tables, it is likely
-that they will be updated from time to time (even in backwards
-incompatibe ways).  The Libidn interface provide a ``version'' field
-for each @acronym{TLD} table, which can be compared for equality to
-guarantee the same operation over time.
-
-From a design point of view, you can regard the @acronym{TLD} tables
-for IDN as the ``localization'' step that come after the
-``internationalization'' step provided by the IETF standards.
+Organizations that manage some Top Level Domains (TLDs) have published
+tables with characters they accept within the domain.  The reason may
+be to reduce complexity that come from using the full Unicode range,
+and to protect themselves from future (backwards incompatible) changes
+in the IDN or Unicode specifications.  Libidn implement an
+infrastructure for defining and checking strings against such tables.
+Libidn also ship some tables from TLDs that we have managed to get
+permission to use them from.  Because these tables are even less
+static than Unicode or StringPrep tables, it is likely that they will
+be updated from time to time (even in backwards incompatible ways).
+The Libidn interface provide a ``version'' field for each TLD table,
+which can be compared for equality to guarantee the same operation
+over time.
+
+From a design point of view, you can regard the TLD tables for IDN as
+the ``localization'' step that come after the ``internationalization''
+step provided by the IETF standards.
 
 The TLD functionality rely on up-to-date tables.  The latest version
 of Libidn aim to provide these, but tables with unclear copying
@@ -1495,7 +1495,7 @@ To process a string that starts with @code{-}, for example
 
   -p, --profile=STRING     Use specified stringprep profile instead
                              Valid stringprep profiles: `Nameprep',
-                             `iSCSI', `Nodeprep', `Resourceprep', 
+                             `iSCSI', `Nodeprep', `Resourceprep',
                              `trace', `SASLprep'
 
       --debug              Print debugging information
@@ -1592,23 +1592,23 @@ jas@@latte:~$
 
 The simplest explanation is that you haven't installed the
 @samp{iconv} conversion tools.  You can find it as a standalone
-library in @acronym{GNU} Libiconv
-(@uref{http://www.gnu.org/software/libiconv/}).  On many
address@hidden/Linux systems, this library is part of the system, but
-you may have to install additional packages (e.g., @samp{glibc-locale}
-for Debian) to be able to use it.
+library in GNU Libiconv
+(@uref{http://www.gnu.org/software/libiconv/}).  On many GNU/Linux
+systems, this library is part of the system, but you may have to
+install additional packages (e.g., @samp{glibc-locale} for Debian) to
+be able to use it.
 
 Another explanation is that the error is correct and you are feeding
 @samp{idn} invalid data.  This can happen inadvertently if you are not
-careful with the character set encodings you use.  For example, if
-your shell run in a @code{ISO-8859-1} environment, and you invoke
+careful with the character set encoding you use.  For example, if your
+shell run in a @code{ISO-8859-1} environment, and you invoke
 @samp{idn} with the @samp{CHARSET} environment variable as follows,
 you will feed it @code{ISO-8859-1} characters but force it to believe
 they are @code{UTF-8}.  Naturally this will lead to an error, unless
-the byte sequences happen to be parsable as @code{UTF-8}.  Note that
-even if you don't get an error, the output may be incorrect in this
-situation, because @code{ISO-8859-1} and @code{UTF-8} does not in
-general encode the same characters as the same byte sequences.
+the byte sequences happen to be valid @code{UTF-8}.  Note that even if
+you don't get an error, the output may be incorrect in this situation,
+because @code{ISO-8859-1} and @code{UTF-8} does not in general encode
+the same characters as the same byte sequences.
 
 @example
 jas@@latte:~$ idn --quiet --debug ""
@@ -1807,7 +1807,7 @@ or against Simon Josefsson's test vectors.
 The test vectors can be found at the Libidn homepage,
 @url{http://www.gnu.org/software/libidn/}.
 
-To test the tranformation manually, use:
+To test the transformation manually, use:
 
 @example
 $ java -cp .:../libidn.jar TestIDNA -a <string to test>
@@ -1865,7 +1865,7 @@ require changes to this library.  See also the next 
section.
 
 @section A Note on Java and Unicode
 
-This library uses Java's builtin 'char' datatype. Up to Java 1.4, this
+This library uses Java's built-in 'char' datatype. Up to Java 1.4, this
 datatype only supports 16-bit Unicode code points, also called the
 Basic Multilingual Plane. For this reason, this library doesn't work
 for Supplementary Characters (i.e. characters from U+10000 to
@@ -1986,15 +1986,15 @@ Subject: Possible bug and status of PR 29 change(s)
 To: address@hidden
 Date: Wed, 27 Oct 2004 14:49:17 -0700
 
-Hello. On behalf of the Unicode Consortium editorial committee, I would  
-like to find out more information about the PR 29 fixes, if any, and  
-functions in Libidn. Your implementation was listed in the text of PR29 as  
+Hello. On behalf of the Unicode Consortium editorial committee, I would
+like to find out more information about the PR 29 fixes, if any, and
+functions in Libidn. Your implementation was listed in the text of PR29 as
 needing investigation, so I am following up on several implementations.
 
-The UTC has accepted the proposed fix to D2 as outlined in PR29, and a new  
+The UTC has accepted the proposed fix to D2 as outlined in PR29, and a new
 draft of UAX #15 has been issued.
 
-I have looked at Libidn 0.5.8 (today), and there may still be a possible  
+I have looked at Libidn 0.5.8 (today), and there may still be a possible
 bug in NFKC.java and nfkc.c.
 
 ------------------------------------------------------
@@ -2019,9 +2019,9 @@ but I'm not sure of the sense of this comparison.
                       &wc_buffer[last_start]))
            {
 
-This appears to have the same bug as the current Python implementation (in  
-Python 2.3.4). The code should be checking, as per new rule D2 UAX #15  
-update, that the next combining character is the same or HIGHER than the  
+This appears to have the same bug as the current Python implementation (in
+Python 2.3.4). The code should be checking, as per new rule D2 UAX #15
+update, that the next combining character is the same or HIGHER than the
 current one. It now checks to see if it's non-zero and not equal.
 
 The above line(s) should perhaps be changed to:
@@ -2034,8 +2034,8 @@ The above line(s) should perhaps be changed to:
 
 but I'm not sure of the sense of the comparison (< or > or <=?) here.
 
-In the text of PR29, I will be marking Libidn as "needs change" and adding  
-the version number that I checked. If any further change is made, please  
+In the text of PR29, I will be marking Libidn as "needs change" and adding
+the version number that I checked. If any further change is made, please
 let me know the release version, and I'll update again.
 
 Regards,
@@ -2051,15 +2051,15 @@ Date: Thu, 28 Oct 2004 09:47:47 +0200
 
 Rick McGowan <address@hidden> writes:
 
-> Hello. On behalf of the Unicode Consortium editorial committee, I would  
-> like to find out more information about the PR 29 fixes, if any, and  
-> functions in Libidn. Your implementation was listed in the text of PR29 as  
+> Hello. On behalf of the Unicode Consortium editorial committee, I would
+> like to find out more information about the PR 29 fixes, if any, and
+> functions in Libidn. Your implementation was listed in the text of PR29 as
 > needing investigation, so I am following up on several implementations.
 >
-> The UTC has accepted the proposed fix to D2 as outlined in PR29, and a new  
+> The UTC has accepted the proposed fix to D2 as outlined in PR29, and a new
 > draft of UAX #15 has been issued.
 >
-> I have looked at Libidn 0.5.8 (today), and there may still be a possible  
+> I have looked at Libidn 0.5.8 (today), and there may still be a possible
 > bug in NFKC.java and nfkc.c.
 
 Hello Rick.
@@ -2180,3 +2180,5 @@ recommended way to work around this problem.
 @printindex cp
 
 @bye
+
address@hidden  LocalWords:  Kerberos Shishi getaddrinfo Slackware Cygwin 
WorkShop
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 6e48de7..665a793 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -394,6 +394,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
              -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
              -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+             -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
              -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
              -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' 
\
              -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
@@ -415,7 +416,6 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-             -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
              -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
              -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -426,10 +426,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
              -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+             -e 's|@''HAVE_TTYNAME_R''@|$(HAVE_TTYNAME_R)|g' \
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
              -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+             -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
              -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
              -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
diff --git a/gl/errno.in.h b/gl/errno.in.h
index 140e5d1..70aebe5 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -16,12 +16,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ERRNO_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_ERRNO_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_ERRNO_H@
 
diff --git a/gl/getopt.c b/gl/getopt.c
index 406d5b7..aaabc8d 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -41,10 +41,6 @@
 # include <wchar.h>
 #endif
 
-#ifndef attribute_hidden
-# define attribute_hidden
-#endif
-
 /* This version of `getopt' appears to the caller like standard Unix `getopt'
    but it behaves differently for the user, since it allows the user
    to intersperse the options with the other arguments.
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 57a8e89..c90baa5 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -16,12 +16,12 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _GL_GETOPT_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_GETOPT_H
+
 /* The include_next requires a split double-inclusion guard.  We must
    also inform the replacement unistd.h to not recursively use
    <getopt.h>; our definitions will be present soon enough.  */
diff --git a/gl/gettext.h b/gl/gettext.h
index 8f2288f..1266aaf 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -81,7 +81,7 @@
     ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
 # undef dcngettext
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+    ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
 # undef textdomain
 # define textdomain(Domainname) ((const char *) (Domainname))
 # undef bindtextdomain
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index ae4dd86..58f6d13 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,4 +1,4 @@
-# setenv.m4 serial 15
+# setenv.m4 serial 16
 dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
        #include <stdlib.h>
        #include <errno.h>
+       #include <string.h>
       ]], [[
        if (setenv ("", "", 0) != -1) return 1;
        if (errno != EINVAL) return 2;
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 77344bd..25c9eb4 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 23
+# stdlib_h.m4 serial 26
 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,9 +33,10 @@ AC_DEFUN([gl_STDLIB_H],
 #if HAVE_RANDOM_H
 # include <random.h>
 #endif
-    ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp
-    mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r
-    setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv])
+    ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
+    mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
+    setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
+    unsetenv])
 ])
 
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -54,12 +55,14 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_CANONICALIZE_FILE_NAME=0;  AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
   GNULIB_GETLOADAVG=0;    AC_SUBST([GNULIB_GETLOADAVG])
   GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
+  GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
   GNULIB_MALLOC_POSIX=0;  AC_SUBST([GNULIB_MALLOC_POSIX])
   GNULIB_MKDTEMP=0;       AC_SUBST([GNULIB_MKDTEMP])
   GNULIB_MKOSTEMP=0;      AC_SUBST([GNULIB_MKOSTEMP])
   GNULIB_MKOSTEMPS=0;     AC_SUBST([GNULIB_MKOSTEMPS])
   GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
   GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
+  GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
   GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
   GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -69,6 +72,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_STRTOD=0;        AC_SUBST([GNULIB_STRTOD])
   GNULIB_STRTOLL=0;       AC_SUBST([GNULIB_STRTOLL])
   GNULIB_STRTOULL=0;      AC_SUBST([GNULIB_STRTOULL])
+  GNULIB_UNLOCKPT=0;      AC_SUBST([GNULIB_UNLOCKPT])
   GNULIB_UNSETENV=0;      AC_SUBST([GNULIB_UNSETENV])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_ATOLL=1;              AC_SUBST([HAVE_ATOLL])
@@ -76,11 +80,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_CANONICALIZE_FILE_NAME=1;  AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
   HAVE_DECL_GETLOADAVG=1;    AC_SUBST([HAVE_DECL_GETLOADAVG])
   HAVE_GETSUBOPT=1;          AC_SUBST([HAVE_GETSUBOPT])
+  HAVE_GRANTPT=1;            AC_SUBST([HAVE_GRANTPT])
   HAVE_MALLOC_POSIX=1;       AC_SUBST([HAVE_MALLOC_POSIX])
   HAVE_MKDTEMP=1;            AC_SUBST([HAVE_MKDTEMP])
   HAVE_MKOSTEMP=1;           AC_SUBST([HAVE_MKOSTEMP])
   HAVE_MKOSTEMPS=1;          AC_SUBST([HAVE_MKOSTEMPS])
   HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
+  HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
   HAVE_REALLOC_POSIX=1;      AC_SUBST([HAVE_REALLOC_POSIX])
   HAVE_REALPATH=1;           AC_SUBST([HAVE_REALPATH])
@@ -91,6 +97,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_STRTOULL=1;           AC_SUBST([HAVE_STRTOULL])
   HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
   HAVE_SYS_LOADAVG_H=0;      AC_SUBST([HAVE_SYS_LOADAVG_H])
+  HAVE_UNLOCKPT=1;           AC_SUBST([HAVE_UNLOCKPT])
   HAVE_UNSETENV=1;           AC_SUBST([HAVE_UNSETENV])
   REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index f6c35d2..61c5f33 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 40
+# unistd_h.m4 serial 42
 dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,7 @@ AC_DEFUN([gl_UNISTD_H],
     fsync ftruncate getcwd getdomainname getdtablesize getgroups
     gethostname getlogin getlogin_r getpagesize getusershell setusershell
     endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
-    rmdir sleep symlink symlinkat unlink unlinkat usleep])
+    rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep])
 ])
 
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -85,6 +85,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
   GNULIB_SYMLINK=0;          AC_SUBST([GNULIB_SYMLINK])
   GNULIB_SYMLINKAT=0;        AC_SUBST([GNULIB_SYMLINKAT])
+  GNULIB_TTYNAME_R=0;        AC_SUBST([GNULIB_TTYNAME_R])
   GNULIB_UNISTD_H_GETOPT=0;  AC_SUBST([GNULIB_UNISTD_H_GETOPT])
   GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
   GNULIB_UNLINK=0;           AC_SUBST([GNULIB_UNLINK])
@@ -106,7 +107,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
-  HAVE_GETUSERSHELL=1;    AC_SUBST([HAVE_GETUSERSHELL])
   HAVE_LCHOWN=1;          AC_SUBST([HAVE_LCHOWN])
   HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_LINKAT=1;          AC_SUBST([HAVE_LINKAT])
@@ -117,12 +117,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_SYMLINK=1;         AC_SUBST([HAVE_SYMLINK])
   HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
+  HAVE_TTYNAME_R=1;       AC_SUBST([HAVE_TTYNAME_R])
+  HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
+  HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
   HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+  HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
-  HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
-  HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
   REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 3e0c49d..c3ad85c 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -15,12 +15,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STDARG_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_STDARG_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STDARG_H@
 
diff --git a/gl/string.in.h b/gl/string.in.h
index de4e6d3..cd12fb5 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -16,12 +16,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STRING_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_STRING_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STRING_H@
 
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 7a208f3..34e500a 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -15,18 +15,42 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_UNISTD_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+/* Special invocation convention:
+   - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
+     but we need to ensure that both the system <unistd.h> and <winsock2.h>
+     are completely included before we replace gethostname.  */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+  && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
+/* <unistd.h> is being indirectly included for the first time from
+   <winsock2.h>; avoid declaring any overrides.  */
+# if @HAVE_UNISTD_H@
+#  @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# else
+#  error unexpected; report this to address@hidden
+# endif
+# define _GL_WINSOCK2_H_WITNESS
+
+/* Normal invocation.  */
+#elif !defined _GL_UNISTD_H
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
 #endif
 
-#ifndef _GL_UNISTD_H
+/* Get all possible declarations of gethostname().  */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+  && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
+
+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
 #define _GL_UNISTD_H
 
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
@@ -76,7 +100,6 @@
 #if @GNULIB_GETHOSTNAME@
 /* Get all possible declarations of gethostname().  */
 # if @UNISTD_H_HAVE_WINSOCK2_H@
-#  include <winsock2.h>
 #  if !defined _GL_SYS_SOCKET_H
 #   undef socket
 #   define socket               socket_used_without_including_sys_socket_h
@@ -726,7 +749,7 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
 #if @GNULIB_GETUSERSHELL@
 /* Return the next valid login shell on the system, or NULL when the end of
    the list has been reached.  */
-# if address@hidden@
+# if address@hidden@
 _GL_FUNCDECL_SYS (getusershell, char *, (void));
 # endif
 _GL_CXXALIAS_SYS (getusershell, char *, (void));
@@ -741,7 +764,7 @@ _GL_WARN_ON_USE (getusershell, "getusershell is unportable 
- "
 
 #if @GNULIB_GETUSERSHELL@
 /* Rewind to pointer that is advanced at each getusershell() call.  */
-# if address@hidden@
+# if address@hidden@
 _GL_FUNCDECL_SYS (setusershell, void, (void));
 # endif
 _GL_CXXALIAS_SYS (setusershell, void, (void));
@@ -757,7 +780,7 @@ _GL_WARN_ON_USE (setusershell, "setusershell is unportable 
- "
 #if @GNULIB_GETUSERSHELL@
 /* Free the pointer that is advanced at each getusershell() call and
    associated resources.  */
-# if address@hidden@
+# if address@hidden@
 _GL_FUNCDECL_SYS (endusershell, void, (void));
 # endif
 _GL_CXXALIAS_SYS (endusershell, void, (void));
@@ -1099,6 +1122,25 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - 
"
 #endif
 
 
+#if @GNULIB_TTYNAME_R@
+/* Store at most BUFLEN characters of the pathname of the terminal FD is
+   open on in BUF.  Return 0 on success, otherwise an error number.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (ttyname_r, int,
+                  (int fd, char *buf, size_t buflen));
+_GL_CXXALIASWARN (ttyname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ttyname_r
+# if HAVE_RAW_DECL_TTYNAME_R
+_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
+                 "use gnulib module ttyname_r for portability");
+# endif
+#endif
+
+
 #if @GNULIB_UNLINK@
 # if @REPLACE_UNLINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 0d1e0ae..91f4295 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -435,12 +435,14 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 
's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
              -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
              -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+             -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
              -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
              -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
              -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
              -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
              -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
              -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+             -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
              -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
              -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
              -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
@@ -450,17 +452,20 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
              -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
              -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+             -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
              -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
              -e 
's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
              -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
              -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
              -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
              -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
              -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
@@ -472,6 +477,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
              -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
              -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' 
\
              -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+             -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
              -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
              -e 
's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
diff --git a/gltests/stdint.in.h b/gltests/stdint.in.h
index 3fb87d5..bf5d96a 100644
--- a/gltests/stdint.in.h
+++ b/gltests/stdint.in.h
@@ -21,6 +21,10 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
+# if __GNUC__ >= 3
address@hidden@
+# endif
+
 #ifndef _GL_STDINT_H
 
 /* When including a system file that in turn includes <inttypes.h>,
@@ -49,9 +53,6 @@
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
-# if __GNUC__ >= 3
address@hidden@
-# endif
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
diff --git a/gltests/stdlib.in.h b/gltests/stdlib.in.h
index cb55a52..3a87245 100644
--- a/gltests/stdlib.in.h
+++ b/gltests/stdlib.in.h
@@ -201,6 +201,22 @@ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
 # endif
 #endif
 
+#if @GNULIB_GRANTPT@
+/* Change the ownership and access permission of the slave side of the
+   pseudo-terminal whose master side is specified by FD.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (grantpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (grantpt, int, (int fd));
+_GL_CXXALIASWARN (grantpt);
+#elif defined GNULIB_POSIXCHECK
+# undef grantpt
+# if HAVE_RAW_DECL_GRANTPT
+_GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
+                 "use gnulib module grantpt for portability");
+# endif
+#endif
+
 #if @GNULIB_MALLOC_POSIX@
 # if address@hidden@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -349,6 +365,22 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
 # endif
 #endif
 
+#if @GNULIB_PTSNAME@
+/* Return the pathname of the pseudo-terminal slave associated with
+   the master FD is open on, or NULL on errors.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
+# endif
+_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+_GL_CXXALIASWARN (ptsname);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname
+# if HAVE_RAW_DECL_PTSNAME
+_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
+                 "use gnulib module ptsname for portability");
+# endif
+#endif
+
 #if @GNULIB_PUTENV@
 # if @REPLACE_PUTENV@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -606,6 +638,22 @@ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
 # endif
 #endif
 
+#if @GNULIB_UNLOCKPT@
+/* Unlock the slave side of the pseudo-terminal whose master side is specified
+   by FD, so that it can be opened.  */
+# if address@hidden@
+_GL_FUNCDECL_SYS (unlockpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
+_GL_CXXALIASWARN (unlockpt);
+#elif defined GNULIB_POSIXCHECK
+# undef unlockpt
+# if HAVE_RAW_DECL_UNLOCKPT
+_GL_WARN_ON_USE (ptsname, "unlockpt is not portable - "
+                 "use gnulib module unlockpt for portability");
+# endif
+#endif
+
 #if @GNULIB_UNSETENV@
 /* Remove the variable NAME from the environment.  */
 # if @REPLACE_UNSETENV@
diff --git a/gltests/test-vc-list-files-git.sh 
b/gltests/test-vc-list-files-git.sh
index 7b7ff1a..56a9a5b 100755
--- a/gltests/test-vc-list-files-git.sh
+++ b/gltests/test-vc-list-files-git.sh
@@ -28,6 +28,8 @@ tmpdir=vc-git-$$
 trap 'st=$?; cd '"`pwd`"' && rm -rf $tmpdir; exit $st' 0
 trap '(exit $?); exit $?' 1 2 13 15
 
+GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
+
 fail=1
 mkdir $tmpdir && cd $tmpdir &&
   # without git, skip the test
@@ -36,8 +38,8 @@ mkdir $tmpdir && cd $tmpdir &&
     || { echo "Skipping test: git not found in PATH"; (exit 77); exit 77; }; } 
&&
   mkdir d &&
   touch d/a b c &&
-  git config user.email "address@hidden"
-  git config user.name "Your Name"
+  git config user.email "address@hidden" &&
+  git config user.name "Your Name" &&
   git add . > /dev/null &&
   git commit -q -a -m log &&
   printf '%s\n' b c d/a > expected &&
diff --git a/gltests/time.in.h b/gltests/time.in.h
index 2bd6338..bb4c106 100644
--- a/gltests/time.in.h
+++ b/gltests/time.in.h
@@ -46,10 +46,6 @@
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
-# ifdef __cplusplus
-extern "C" {
-# endif
-
 /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
    Or they define it with the wrong member names or define it in <sys/time.h>
    (e.g., FreeBSD circa 1997).  */
@@ -57,6 +53,11 @@ extern "C" {
 #  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 #   include <sys/time.h>
 #  else
+
+#   ifdef __cplusplus
+extern "C" {
+#   endif
+
 #   undef timespec
 #   define timespec rpl_timespec
 struct timespec
@@ -64,11 +65,12 @@ struct timespec
   time_t tv_sec;
   long int tv_nsec;
 };
-#  endif
-# endif
 
-# ifdef __cplusplus
+#   ifdef __cplusplus
 }
+#   endif
+
+#  endif
 # endif
 
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
diff --git a/lib/gl/gettext.h b/lib/gl/gettext.h
index 7042bb8..2390fb5 100644
--- a/lib/gl/gettext.h
+++ b/lib/gl/gettext.h
@@ -81,7 +81,7 @@
     ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
 # undef dcngettext
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+    ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
 # undef textdomain
 # define textdomain(Domainname) ((const char *) (Domainname))
 # undef bindtextdomain
diff --git a/lib/gl/iconv.in.h b/lib/gl/iconv.in.h
index 5f8408c..769c709 100644
--- a/lib/gl/iconv.in.h
+++ b/lib/gl/iconv.in.h
@@ -16,12 +16,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_ICONV_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_ICONV_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_ICONV_H@
 
diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h
index 97b6637..4094f75 100644
--- a/lib/gl/stdint.in.h
+++ b/lib/gl/stdint.in.h
@@ -21,6 +21,10 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
+# if __GNUC__ >= 3
address@hidden@
+# endif
+
 #ifndef _GL_STDINT_H
 
 /* When including a system file that in turn includes <inttypes.h>,
@@ -49,9 +53,6 @@
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
-# if __GNUC__ >= 3
address@hidden@
-# endif
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h
index 46d609d..6ff8fb0 100644
--- a/lib/gl/string.in.h
+++ b/lib/gl/string.in.h
@@ -16,12 +16,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _GL_STRING_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
+#ifndef _GL_STRING_H
+
 /* The include_next requires a split double-inclusion guard.  */
 address@hidden@ @NEXT_STRING_H@
 
diff --git a/maint.mk b/maint.mk
index 7d84b6c..6127c57 100644
--- a/maint.mk
+++ b/maint.mk
@@ -452,6 +452,19 @@ sc_prohibit_signal_without_use:
        re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>'          \
          $(_header_without_use)
 
+# Get the list of symbol names with this:
+# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
+_intprops_names =                                                      \
+  TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT            \
+  TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM          \
+  INT_STRLEN_BOUND INT_BUFSIZE_BOUND
+_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
+# Prohibit the inclusion of intprops.h without an actual use.
+sc_prohibit_intprops_without_use:
+       @h='"intprops.h"'                                               \
+       re='\<($(_intprops_syms_re)) *\('                               \
+         $(_header_without_use)
+
 sc_obsolete_symbols:
        @re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>'                           \
        msg='do not use HAVE''_FCNTL_H or O'_NDELAY                     \
@@ -548,6 +561,16 @@ sc_GFDL_version:
        @re='$(_GFDL_regexp)' msg='GFDL vN, N!=3'                       \
          $(_prohibit_regexp)
 
+# Don't use Texinfo @acronym{} as it is not a good idea.
+sc_texinfo_acronym:
+       @if $(VC_LIST_EXCEPT) | grep -lE '\.texi$$' >/dev/null; then    \
+               grep -nE '@acronym{'                                    \
+                       $$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') &&   \
+         { echo '$(ME): found use of Texinfo @acronym{}' 1>&2;         \
+           exit 1; } || :;                                             \
+       else :;                                                         \
+       fi
+
 cvs_keywords = \
   Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
 
@@ -746,8 +769,9 @@ sc_copyright_check:
 # tests many undefined macros, and so we can't enable that option.
 # So at least preclude common boolean strings as macro values.
 sc_Wundef_boolean:
-       @grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
-         { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
+       @test -e '$(CONFIG_INCLUDE)' &&                                 \
+          grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
+            { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
 
 sc_vulnerable_makefile_CVE-2009-4029:
        @files=$$(find $(srcdir) -name Makefile.in);                    \


hooks/post-receive
-- 
GNU libidn




reply via email to

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