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-24-g5d9793b


From: Simon Josefsson
Subject: [SCM] GNU libidn branch, master, updated. libidn-1-18-24-g5d9793b
Date: Tue, 30 Mar 2010 21:09:26 +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=5d9793baca21a49954475d630af67886cb2cab88

The branch, master has been updated
       via  5d9793baca21a49954475d630af67886cb2cab88 (commit)
       via  c9e438da29b3186e9389defc4d4303cc58b2e724 (commit)
      from  cfe879128713db23fee410bed93479ecf234c997 (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 5d9793baca21a49954475d630af67886cb2cab88
Author: Simon Josefsson <address@hidden>
Date:   Tue Mar 30 23:09:17 2010 +0200

    Drop code (could never have worked anyway).

commit c9e438da29b3186e9389defc4d4303cc58b2e724
Author: Simon Josefsson <address@hidden>
Date:   Tue Mar 30 23:07:52 2010 +0200

    Update gnulib files.

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

Summary of changes:
 gl/errno.in.h              |    4 +-
 gl/getopt.in.h             |    4 +-
 gl/m4/fcntl-o.m4           |    2 +-
 gl/m4/fcntl_h.m4           |    6 +-
 gl/m4/gnulib-common.m4     |   59 ++++++++++++++++++++++--
 gl/m4/gnulib-comp.m4       |   10 +++-
 gl/m4/stddef_h.m4          |    4 +-
 gl/m4/stdlib_h.m4          |    6 +-
 gl/m4/string_h.m4          |    6 +-
 gl/m4/sys_stat_h.m4        |    6 +-
 gl/m4/time_h.m4            |    4 +-
 gl/m4/unistd_h.m4          |    6 +-
 gl/m4/wchar_h.m4           |    6 +-
 gl/stdarg.in.h             |    4 +-
 gl/string.in.h             |    4 +-
 gl/unistd.in.h             |  109 +++++++++++++++++++++++++++++--------------
 gltests/Makefile.am        |    1 +
 gltests/stdint.in.h        |    8 ++--
 gltests/sys_stat.in.h      |    4 ++
 gltests/test-dup2.c        |    8 ++--
 gltests/test-getopt.c      |    8 ++--
 gltests/test-getopt.h      |    4 +-
 gltests/time.in.h          |   22 ++++++--
 lib/gl/iconv.in.h          |    4 +-
 lib/gl/m4/gnulib-common.m4 |   59 ++++++++++++++++++++++--
 lib/gl/m4/gnulib-comp.m4   |    7 +++
 lib/gl/m4/iconv_h.m4       |    4 +-
 lib/gl/m4/stddef_h.m4      |    4 +-
 lib/gl/m4/string_h.m4      |    6 +-
 lib/gl/m4/visibility.m4    |    2 +-
 lib/gl/m4/wchar_h.m4       |    6 +-
 lib/gl/stdint.in.h         |    8 ++--
 lib/gl/string.in.h         |    4 +-
 lib/gltests/Makefile.am    |    1 +
 maint.mk                   |   51 ++++++++++++--------
 src/Makefile.am            |    4 +-
 36 files changed, 315 insertions(+), 140 deletions(-)

diff --git a/gl/errno.in.h b/gl/errno.in.h
index 70aebe5..140e5d1 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.in.h b/gl/getopt.in.h
index c90baa5..57a8e89 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/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 67167cb..d416a61 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 1
-dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index 67122e5..e41915c 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,4 +1,4 @@
-# serial 11
+# serial 12
 # Configure fcntl.h.
 dnl Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -24,9 +24,9 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_FCNTL_H_DEFAULTS],
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 80ba263..9cc519e 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 13
+# gnulib-common.m4 serial 18
 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,
@@ -37,12 +37,63 @@ AC_DEFUN([gl_COMMON_BODY], [
 ])
 ])
 
+# gl_MODULE_INDICATOR_CONDITION
+# expands to a C preprocessor expression that evaluates to 1 or 0, depending
+# whether a gnulib module that has been requested shall be considered present
+# or not.
+AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
+# sets the shell variable that indicates the presence of the given module to
+# a C preprocessor expression that will evaluate to 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
+[
+  GNULIB_[]m4_translit([[$1]],
+    [abcdefghijklmnopqrstuvwxyz./-],
+    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+])
+
 # gl_MODULE_INDICATOR([modulename])
-# defines a C macro indicating the presence of the given module.
+# defines a C macro indicating the presence of the given module
+# in a location where it can be used.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    0    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
 AC_DEFUN([gl_MODULE_INDICATOR],
 [
-  
AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
 [1],
-    [Define to 1 when using the gnulib module ]$1[.])
+  AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
+    [gl_MODULE_INDICATOR_CONDITION],
+    [Define to a C preprocessor expression that evaluates to 1 or 0,
+     depending whether the gnulib module $1 shall be considered present.])
+])
+
+# gl_MODULE_INDICATOR_FOR_TESTS([modulename])
+# defines a C macro indicating the presence of the given module
+# in lib or tests. This is useful to determine whether the module
+# should be tested.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
+AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
+[
+  AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+    [Define to 1 when the gnulib module $1 should be tested.])
 ])
 
 # m4_foreach_w
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 6d3d71d..263dd32 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -144,7 +144,7 @@ AC_DEFUN([gl_INIT],
   # Code from module gendocs:
   # Code from module getopt-gnu:
   gl_FUNC_GETOPT_GNU
-  gl_MODULE_INDICATOR([getopt-gnu])
+  gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
   # Code from module getopt-posix:
   gl_FUNC_GETOPT_POSIX
   # Code from module gettext-h:
@@ -234,6 +234,12 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gltests_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='gltests'
+changequote(,)dnl
+  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr 
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 
's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+changequote([, ])dnl
+  AC_SUBST([gltests_WITNESS])
+  gl_module_indicator_condition=$gltests_WITNESS
+  m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
   gl_FUNC_ALLOCA
   gl_FUNC_DUP2
   gl_UNISTD_MODULE_INDICATOR([dup2])
@@ -248,7 +254,6 @@ AC_DEFUN([gl_INIT],
   gl_MALLOCA
   gl_MULTIARCH
   gl_FUNC_OPEN
-  gl_MODULE_INDICATOR([open])
   gl_FCNTL_MODULE_INDICATOR([open])
   gl_PATHMAX
   gl_FUNC_PUTENV
@@ -274,6 +279,7 @@ AC_DEFUN([gl_INIT],
   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
   AC_SUBST([abs_aux_dir])
   gl_WCHAR_H
+  m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(gltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index c8572de..c3ae569 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
 dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 1
+# stddef_h.m4 serial 2
 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@ AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
 AC_DEFUN([gl_STDDEF_H_DEFAULTS],
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 25c9eb4..4c5cca8 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 26
+# stdlib_h.m4 serial 27
 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,
@@ -43,9 +43,9 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index a8a366c..9ceeea9 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 13
 
 # Written by Paul Eggert.
 
@@ -34,9 +34,9 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 54d74ca..7181c25 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 23   -*- Autoconf -*-
+# sys_stat_h.m4 serial 24   -*- Autoconf -*-
 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,
@@ -38,9 +38,9 @@ AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index f572b85..f2e54f2 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -65,9 +65,9 @@ AC_DEFUN([gl_TIME_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 61c5f33..789739d 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 42
+# unistd_h.m4 serial 43
 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,
@@ -46,9 +46,9 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 0bce51c..8cae82d 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 32
+# wchar_h.m4 serial 33
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -107,9 +107,9 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index c3ad85c..3e0c49d 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 cd12fb5..de4e6d3 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 34e500a..0c5c616 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -97,52 +97,89 @@
 # include <getopt.h>
 #endif
 
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
 #if @GNULIB_GETHOSTNAME@
 /* Get all possible declarations of gethostname().  */
 # if @UNISTD_H_HAVE_WINSOCK2_H@
 #  if !defined _GL_SYS_SOCKET_H
-#   undef socket
-#   define socket               socket_used_without_including_sys_socket_h
-#   undef connect
-#   define connect              connect_used_without_including_sys_socket_h
-#   undef accept
-#   define accept               accept_used_without_including_sys_socket_h
-#   undef bind
-#   define bind                 bind_used_without_including_sys_socket_h
-#   undef getpeername
-#   define getpeername          getpeername_used_without_including_sys_socket_h
-#   undef getsockname
-#   define getsockname          getsockname_used_without_including_sys_socket_h
-#   undef getsockopt
-#   define getsockopt           getsockopt_used_without_including_sys_socket_h
-#   undef listen
-#   define listen               listen_used_without_including_sys_socket_h
-#   undef recv
-#   define recv                 recv_used_without_including_sys_socket_h
-#   undef send
-#   define send                 send_used_without_including_sys_socket_h
-#   undef recvfrom
-#   define recvfrom             recvfrom_used_without_including_sys_socket_h
-#   undef sendto
-#   define sendto               sendto_used_without_including_sys_socket_h
-#   undef setsockopt
-#   define setsockopt           setsockopt_used_without_including_sys_socket_h
-#   undef shutdown
-#   define shutdown             shutdown_used_without_including_sys_socket_h
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef socket
+#    define socket              socket_used_without_including_sys_socket_h
+#    undef connect
+#    define connect             connect_used_without_including_sys_socket_h
+#    undef accept
+#    define accept              accept_used_without_including_sys_socket_h
+#    undef bind
+#    define bind                bind_used_without_including_sys_socket_h
+#    undef getpeername
+#    define getpeername         getpeername_used_without_including_sys_socket_h
+#    undef getsockname
+#    define getsockname         getsockname_used_without_including_sys_socket_h
+#    undef getsockopt
+#    define getsockopt          getsockopt_used_without_including_sys_socket_h
+#    undef listen
+#    define listen              listen_used_without_including_sys_socket_h
+#    undef recv
+#    define recv                recv_used_without_including_sys_socket_h
+#    undef send
+#    define send                send_used_without_including_sys_socket_h
+#    undef recvfrom
+#    define recvfrom            recvfrom_used_without_including_sys_socket_h
+#    undef sendto
+#    define sendto              sendto_used_without_including_sys_socket_h
+#    undef setsockopt
+#    define setsockopt          setsockopt_used_without_including_sys_socket_h
+#    undef shutdown
+#    define shutdown            shutdown_used_without_including_sys_socket_h
+#   else
+     _GL_WARN_ON_USE (socket,
+                      "socket() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (connect,
+                      "connect() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (accept,
+                      "accept() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (bind,
+                      "bind() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getpeername,
+                      "getpeername() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockname,
+                      "getsockname() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (getsockopt,
+                      "getsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (listen,
+                      "listen() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recv,
+                      "recv() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (send,
+                      "send() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (recvfrom,
+                      "recvfrom() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (sendto,
+                      "sendto() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (setsockopt,
+                      "setsockopt() used without including <sys/socket.h>");
+     _GL_WARN_ON_USE (shutdown,
+                      "shutdown() used without including <sys/socket.h>");
+#   endif
 #  endif
 #  if !defined _GL_SYS_SELECT_H
-#   undef select
-#   define select               select_used_without_including_sys_select_h
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef select
+#    define select              select_used_without_including_sys_select_h
+#   else
+     _GL_WARN_ON_USE (select,
+                      "select() used without including <sys/select.h>");
+#   endif
 #  endif
 # endif
 #endif
 
-/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
-
-/* The definition of _GL_ARG_NONNULL is copied here.  */
-
-/* The definition of _GL_WARN_ON_USE is copied here.  */
-
 
 /* OS/2 EMX lacks these macros.  */
 #ifndef STDIN_FILENO
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 91f4295..a398bf9 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -31,6 +31,7 @@ DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
 AM_CPPFLAGS = \
+  address@hidden@=1 \
   -I. -I$(srcdir) \
   -I.. -I$(srcdir)/.. \
   -I../gl -I$(srcdir)/../gl
diff --git a/gltests/stdint.in.h b/gltests/stdint.in.h
index bf5d96a..5da5f17 100644
--- a/gltests/stdint.in.h
+++ b/gltests/stdint.in.h
@@ -21,12 +21,12 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
-# if __GNUC__ >= 3
address@hidden@
-# endif
-
 #ifndef _GL_STDINT_H
 
+#if __GNUC__ >= 3
address@hidden@
+#endif
+
 /* When including a system file that in turn includes <inttypes.h>,
    use the system <inttypes.h>, not our substitute.  This avoids
    problems with (for example) VMS, whose <sys/bitypes.h> includes
diff --git a/gltests/sys_stat.in.h b/gltests/sys_stat.in.h
index 8bd3f29..568358a 100644
--- a/gltests/sys_stat.in.h
+++ b/gltests/sys_stat.in.h
@@ -398,7 +398,9 @@ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, 
mode_t mode)
 #  endif
 _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 # endif
+# if @HAVE_LCHMOD@
 _GL_CXXALIASWARN (lchmod);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef lchmod
 # if HAVE_RAW_DECL_LCHMOD
@@ -427,7 +429,9 @@ _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct 
stat *buf));
 # else
 _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
 # endif
+# if @HAVE_LSTAT@
 _GL_CXXALIASWARN (lstat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef lstat
 # if HAVE_RAW_DECL_LSTAT
diff --git a/gltests/test-dup2.c b/gltests/test-dup2.c
index 3bad63a..cef9a30 100644
--- a/gltests/test-dup2.c
+++ b/gltests/test-dup2.c
@@ -28,7 +28,7 @@ SIGNATURE_CHECK (dup2, int, (int, int));
 
 #include "binary-io.h"
 
-#if GNULIB_CLOEXEC
+#if GNULIB_TEST_CLOEXEC
 # include "cloexec.h"
 #endif
 
@@ -57,7 +57,7 @@ is_open (int fd)
 #endif
 }
 
-#if GNULIB_CLOEXEC
+#if GNULIB_TEST_CLOEXEC
 /* Return non-zero if FD is open and inheritable across exec/spawn.  */
 static int
 is_inheritable (int fd)
@@ -79,7 +79,7 @@ is_inheritable (int fd)
   return 0 <= i && (i & FD_CLOEXEC) == 0;
 # endif
 }
-#endif /* GNULIB_CLOEXEC */
+#endif /* GNULIB_TEST_CLOEXEC */
 
 #if !O_BINARY
 # define setmode(f,m) zero ()
@@ -161,7 +161,7 @@ main (void)
   ASSERT (read (fd, buffer, 1) == 1);
   ASSERT (*buffer == '2');
 
-#if GNULIB_CLOEXEC
+#if GNULIB_TEST_CLOEXEC
   /* Any new fd created by dup2 must not be cloexec.  */
   ASSERT (close (fd + 2) == 0);
   ASSERT (dup_cloexec (fd) == fd + 1);
diff --git a/gltests/test-getopt.c b/gltests/test-getopt.c
index 6bcb8e6..86fe566 100644
--- a/gltests/test-getopt.c
+++ b/gltests/test-getopt.c
@@ -22,7 +22,7 @@
    ftell link warning if we are not using the gnulib ftell module.  */
 #define _GL_NO_LARGE_FILES
 
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
 # include <getopt.h>
 
 # ifndef __getopt_argv_const
@@ -58,7 +58,7 @@ SIGNATURE_CHECK (getopt, int, (int, char * const[], char 
const *));
 static FILE *myerr;
 
 #include "test-getopt.h"
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
 # include "test-getopt_long.h"
 #endif
 
@@ -80,14 +80,14 @@ main (void)
   setenv ("POSIXLY_CORRECT", "1", 1);
   test_getopt ();
 
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
   test_getopt_long_posix ();
 #endif
 
   unsetenv ("POSIXLY_CORRECT");
   test_getopt ();
 
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
   test_getopt_long ();
   test_getopt_long_only ();
 #endif
diff --git a/gltests/test-getopt.h b/gltests/test-getopt.h
index 0db8f1c..96db7a5 100644
--- a/gltests/test-getopt.h
+++ b/gltests/test-getopt.h
@@ -323,7 +323,7 @@ test_getopt (void)
       ASSERT (!output);
     }
 
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
   /* Test processing of options with optional arguments.  */
   for (start = OPTIND_MIN; start <= 1; start++)
     {
@@ -870,7 +870,7 @@ test_getopt (void)
         }
     }
 
-#if GNULIB_GETOPT_GNU
+#if GNULIB_TEST_GETOPT_GNU
   /* Check that the '-' flag causes non-options to be returned in order.  */
   for (start = OPTIND_MIN; start <= 1; start++)
     {
diff --git a/gltests/time.in.h b/gltests/time.in.h
index bb4c106..bdae149 100644
--- a/gltests/time.in.h
+++ b/gltests/time.in.h
@@ -38,7 +38,7 @@
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
 /* NetBSD 5.0 mis-defines NULL.  */
-#include <stddef.h>
+# include <stddef.h>
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
@@ -185,15 +185,25 @@ _GL_CXXALIASWARN (timegm);
 /* Encourage applications to avoid unsafe functions that can overrun
    buffers when given outlandish struct tm values.  Portable
    applications should use strftime (or even sprintf) instead.  */
-# if GNULIB_PORTCHECK
+# if defined GNULIB_POSIXCHECK
 #  undef asctime
-#  define asctime eschew_asctime
+_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
 #  undef asctime_r
-#  define asctime_r eschew_asctime_r
+_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
 #  undef ctime
-#  define ctime eschew_ctime
+_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
 #  undef ctime_r
-#  define ctime_r eschew_ctime_r
+_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
 # endif
 
 #endif
diff --git a/lib/gl/iconv.in.h b/lib/gl/iconv.in.h
index 769c709..5f8408c 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/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4
index 80ba263..9cc519e 100644
--- a/lib/gl/m4/gnulib-common.m4
+++ b/lib/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 13
+# gnulib-common.m4 serial 18
 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,
@@ -37,12 +37,63 @@ AC_DEFUN([gl_COMMON_BODY], [
 ])
 ])
 
+# gl_MODULE_INDICATOR_CONDITION
+# expands to a C preprocessor expression that evaluates to 1 or 0, depending
+# whether a gnulib module that has been requested shall be considered present
+# or not.
+AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
+# sets the shell variable that indicates the presence of the given module to
+# a C preprocessor expression that will evaluate to 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
+[
+  GNULIB_[]m4_translit([[$1]],
+    [abcdefghijklmnopqrstuvwxyz./-],
+    [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+])
+
 # gl_MODULE_INDICATOR([modulename])
-# defines a C macro indicating the presence of the given module.
+# defines a C macro indicating the presence of the given module
+# in a location where it can be used.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    0    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
 AC_DEFUN([gl_MODULE_INDICATOR],
 [
-  
AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
 [1],
-    [Define to 1 when using the gnulib module ]$1[.])
+  AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
+    [gl_MODULE_INDICATOR_CONDITION],
+    [Define to a C preprocessor expression that evaluates to 1 or 0,
+     depending whether the gnulib module $1 shall be considered present.])
+])
+
+# gl_MODULE_INDICATOR_FOR_TESTS([modulename])
+# defines a C macro indicating the presence of the given module
+# in lib or tests. This is useful to determine whether the module
+# should be tested.
+#                                             |  Value  |   Value   |
+#                                             | in lib/ | in tests/ |
+# --------------------------------------------+---------+-----------+
+# Module present among main modules:          |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module present among tests-related modules: |    1    |     1     |
+# --------------------------------------------+---------+-----------+
+# Module not present at all:                  |    0    |     0     |
+# --------------------------------------------+---------+-----------+
+AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
+[
+  AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]],
+      [abcdefghijklmnopqrstuvwxyz./-],
+      [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+    [Define to 1 when the gnulib module $1 should be tested.])
 ])
 
 # m4_foreach_w
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 0e07e87..cb9611d 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -159,10 +159,17 @@ AC_DEFUN([lgl_INIT],
   m4_pushdef([lgltests_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='lib/gltests'
+changequote(,)dnl
+  lgltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr 
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 
's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+changequote([, ])dnl
+  AC_SUBST([lgltests_WITNESS])
+  gl_module_indicator_condition=$lgltests_WITNESS
+  m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
   gt_LOCALE_FR
   gt_LOCALE_TR_UTF8
   gt_TYPE_WCHAR_T
   gt_TYPE_WINT_T
+  m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(lgltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([lgltests_LIBSOURCES_DIR])[ ||
       for gl_file in ]lgltests_LIBSOURCES_LIST[ ; do
diff --git a/lib/gl/m4/iconv_h.m4 b/lib/gl/m4/iconv_h.m4
index 8881473..7366cb9 100644
--- a/lib/gl/m4/iconv_h.m4
+++ b/lib/gl/m4/iconv_h.m4
@@ -1,4 +1,4 @@
-# iconv_h.m4 serial 5
+# iconv_h.m4 serial 6
 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,
@@ -24,7 +24,7 @@ AC_DEFUN([gl_ICONV_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_ICONV_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
 AC_DEFUN([gl_ICONV_H_DEFAULTS],
diff --git a/lib/gl/m4/stddef_h.m4 b/lib/gl/m4/stddef_h.m4
index c8572de..c3ae569 100644
--- a/lib/gl/m4/stddef_h.m4
+++ b/lib/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
 dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 1
+# stddef_h.m4 serial 2
 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@ AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
 AC_DEFUN([gl_STDDEF_H_DEFAULTS],
diff --git a/lib/gl/m4/string_h.m4 b/lib/gl/m4/string_h.m4
index a8a366c..9ceeea9 100644
--- a/lib/gl/m4/string_h.m4
+++ b/lib/gl/m4/string_h.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 13
 
 # Written by Paul Eggert.
 
@@ -34,9 +34,9 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
diff --git a/lib/gl/m4/visibility.m4 b/lib/gl/m4/visibility.m4
index 35a6dc0..6d3f9c9 100644
--- a/lib/gl/m4/visibility.m4
+++ b/lib/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
 # visibility.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/gl/m4/wchar_h.m4 b/lib/gl/m4/wchar_h.m4
index 0bce51c..8cae82d 100644
--- a/lib/gl/m4/wchar_h.m4
+++ b/lib/gl/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 32
+# wchar_h.m4 serial 33
 
 AC_DEFUN([gl_WCHAR_H],
 [
@@ -107,9 +107,9 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
-  
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
-  gl_MODULE_INDICATOR([$1])
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
diff --git a/lib/gl/stdint.in.h b/lib/gl/stdint.in.h
index 4094f75..af2f853 100644
--- a/lib/gl/stdint.in.h
+++ b/lib/gl/stdint.in.h
@@ -21,12 +21,12 @@
  * <http://www.opengroup.org/susv3xbd/stdint.h.html>
  */
 
-# if __GNUC__ >= 3
address@hidden@
-# endif
-
 #ifndef _GL_STDINT_H
 
+#if __GNUC__ >= 3
address@hidden@
+#endif
+
 /* When including a system file that in turn includes <inttypes.h>,
    use the system <inttypes.h>, not our substitute.  This avoids
    problems with (for example) VMS, whose <sys/bitypes.h> includes
diff --git a/lib/gl/string.in.h b/lib/gl/string.in.h
index 6ff8fb0..46d609d 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/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index b6fabf4..8645343 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -31,6 +31,7 @@ DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
 AM_CPPFLAGS = \
+  address@hidden@=1 \
   -I. -I$(srcdir) \
   -I../.. -I$(srcdir)/../.. \
   -I../../lib/gl -I$(srcdir)/../../lib/gl
diff --git a/maint.mk b/maint.mk
index 6127c57..e121eb8 100644
--- a/maint.mk
+++ b/maint.mk
@@ -292,7 +292,7 @@ sc_prohibit_HAVE_MBRTOWC:
 # To use this "command" macro, you must first define two shell variables:
 # h: the header, enclosed in <> or ""
 # re: a regular expression that matches IFF something provided by $h is used.
-define _header_without_use
+define _sc_header_without_use
   dummy=; : so we do not need a semicolon before each use;             \
   h_esc=`echo "$$h"|sed 's/\./\\\\./g'`;                               \
   if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then             \
@@ -307,44 +307,44 @@ endef
 
 # Prohibit the inclusion of assert.h without an actual use of assert.
 sc_prohibit_assert_without_use:
-       @h='<assert.h>' re='\<assert *\(' $(_header_without_use)
+       @h='<assert.h>' re='\<assert *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of close-stream.h without an actual use.
 sc_prohibit_close_stream_without_use:
-       @h='"close-stream.h"' re='\<close_stream *\(' $(_header_without_use)
+       @h='"close-stream.h"' re='\<close_stream *\(' $(_sc_header_without_use)
 
 # Prohibit the inclusion of getopt.h without an actual use.
 sc_prohibit_getopt_without_use:
-       @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_header_without_use)
+       @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
 
 # Don't include quotearg.h unless you use one of its functions.
 sc_prohibit_quotearg_without_use:
-       @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_header_without_use)
+       @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
 
 # Don't include quote.h unless you use one of its functions.
 sc_prohibit_quote_without_use:
-       @h='"quote.h"' re='\<quote(_n)? *\(' $(_header_without_use)
+       @h='"quote.h"' re='\<quote(_n)? *\(' $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_long_options_without_use:
        @h='"long-options.h"' re='\<parse_long_options *\(' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_inttostr_without_use:
        @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_ignore_value_without_use:
        @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_error_without_use:
        @h='"error.h"' \
        re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? 
*\('\
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Don't include xalloc.h unless you use one of its functions.
 # Consider these symbols:
@@ -367,7 +367,7 @@ _xa2 = X([CZ]|N?M)ALLOC
 sc_prohibit_xalloc_without_use:
        @h='"xalloc.h"' \
        re='\<($(_xa1)|$(_xa2)) *\('\
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Extract function names:
 # perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) \(/ and print $1' lib/hash.h
@@ -378,42 +378,43 @@ _hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
 sc_prohibit_hash_without_use:
        @h='"hash.h"' \
        re='$(_hash_fn)|$(_hash_struct)'\
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_hash_pjw_without_use:
        @h='"hash-pjw.h"' \
        re='\<hash_pjw *\(' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_safe_read_without_use:
        @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_argmatch_without_use:
        @h='"argmatch.h"' \
        
re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid)
 *\()' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_canonicalize_without_use:
        @h='"canonicalize.h"' \
        
re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_root_dev_ino_without_use:
        @h='"root-dev-ino.h"' \
        re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_prohibit_openat_without_use:
        @h='"openat.h"' \
        
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>'
 \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Prohibit the inclusion of c-ctype.h without an actual use.
 ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
 |isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
 sc_prohibit_c_ctype_without_use:
-       @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' $(_header_without_use)
+       @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' \
+         $(_sc_header_without_use)
 
 _empty =
 _sp = $(_empty) $(_empty)
@@ -450,7 +451,7 @@ _sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) 
$(_sig_types_and_consts)))
 sc_prohibit_signal_without_use:
        @h='<signal.h>'                                                 \
        re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>'          \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 # Get the list of symbol names with this:
 # perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
@@ -463,7 +464,7 @@ _intprops_syms_re = $(subst $(_sp),|,$(strip 
$(_intprops_names)))
 sc_prohibit_intprops_without_use:
        @h='"intprops.h"'                                               \
        re='\<($(_intprops_syms_re)) *\('                               \
-         $(_header_without_use)
+         $(_sc_header_without_use)
 
 sc_obsolete_symbols:
        @re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>'                           \
@@ -593,6 +594,14 @@ sc_prohibit_S_IS_definition:
        msg='do not define S_IS* macros; include <sys/stat.h>'          \
          $(_prohibit_regexp)
 
+_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
+_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
+# Using test's -a and -o operators is not portable.
+sc_prohibit_test_minus_ao:
+       @re='\<test .+ -[ao] '                                          \
+       msg='$(_ptm1); $(_ptm2)'                                                
\
+         $(_prohibit_regexp)
+
 # Each program that uses proper_name_utf8 must link with one of the
 # ICONV libraries.  Otherwise, some ICONV library must appear in LDADD.
 # The perl -0777 invocation below extracts the possibly-multi-line
diff --git a/src/Makefile.am b/src/Makefile.am
index 6d5f571..ac76e99 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,9 +39,7 @@ libidn_cmd_la_CFLAGS =
 idn_cmd.c idn_cmd.h: idn.ggo Makefile.am
        gengetopt --unamed-opts --no-handle-version --no-handle-help \
                --set-package="idn" \
-               --input $^ --file-name idn_cmd || \
-               test -f idn_cmd.h -a -f idn_cmd.c || \
-               cp $(srcdir)/idn_cmd.h $(srcdir)/idn_cmd.h .
+               --input $^ --file-name idn_cmd
        perl -pi -e 's/\[OPTIONS\]/\[OPTION\]/g' idn_cmd.c
        perl -pi -e 's/\[FILES\]/\[STRING\]/g' idn_cmd.c
 


hooks/post-receive
-- 
GNU libidn




reply via email to

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