summaryrefslogtreecommitdiff
path: root/gl/m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/alloca.m43
-rw-r--r--gl/m4/arpa_inet_h.m423
-rw-r--r--gl/m4/autobuild.m43
-rw-r--r--gl/m4/close.m42
-rw-r--r--gl/m4/errno_h.m42
-rw-r--r--gl/m4/error.m46
-rw-r--r--gl/m4/extensions.m422
-rw-r--r--gl/m4/fclose.m42
-rw-r--r--gl/m4/float_h.m42
-rw-r--r--gl/m4/fseeko.m412
-rw-r--r--gl/m4/getaddrinfo.m44
-rw-r--r--gl/m4/getdelim.m42
-rw-r--r--gl/m4/getline.m411
-rw-r--r--gl/m4/getpass.m43
-rw-r--r--gl/m4/gettimeofday.m452
-rw-r--r--gl/m4/gnulib-cache.m42
-rw-r--r--gl/m4/gnulib-common.m435
-rw-r--r--gl/m4/gnulib-comp.m417
-rw-r--r--gl/m4/gnulib-tool.m42
-rw-r--r--gl/m4/hostent.m42
-rw-r--r--gl/m4/include_next.m480
-rw-r--r--gl/m4/inet_ntop.m42
-rw-r--r--gl/m4/inet_pton.m42
-rw-r--r--gl/m4/intmax_t.m43
-rw-r--r--gl/m4/inttypes_h.m42
-rw-r--r--gl/m4/lib-ld.m48
-rw-r--r--gl/m4/lib-link.m42
-rw-r--r--gl/m4/lib-prefix.m42
-rw-r--r--gl/m4/longlong.m466
-rw-r--r--gl/m4/lseek.m422
-rw-r--r--gl/m4/malloc.m42
-rw-r--r--gl/m4/manywarnings.m42
-rw-r--r--gl/m4/memchr.m410
-rw-r--r--gl/m4/minmax.m42
-rw-r--r--gl/m4/mmap-anon.m42
-rw-r--r--gl/m4/multiarch.m42
-rw-r--r--gl/m4/netdb_h.m45
-rw-r--r--gl/m4/netinet_in_h.m42
-rw-r--r--gl/m4/perror.m42
-rw-r--r--gl/m4/printf.m42
-rw-r--r--gl/m4/read-file.m43
-rw-r--r--gl/m4/readline.m44
-rw-r--r--gl/m4/realloc.m42
-rw-r--r--gl/m4/select.m45
-rw-r--r--gl/m4/servent.m42
-rw-r--r--gl/m4/size_max.m42
-rw-r--r--gl/m4/snprintf.m42
-rw-r--r--gl/m4/sockets.m42
-rw-r--r--gl/m4/socklen.m428
-rw-r--r--gl/m4/sockpfaf.m42
-rw-r--r--gl/m4/stdarg.m42
-rw-r--r--gl/m4/stdbool.m4140
-rw-r--r--gl/m4/stddef_h.m42
-rw-r--r--gl/m4/stdint.m414
-rw-r--r--gl/m4/stdint_h.m42
-rw-r--r--gl/m4/stdio_h.m418
-rw-r--r--gl/m4/stdlib_h.m421
-rw-r--r--gl/m4/strerror.m42
-rw-r--r--gl/m4/string_h.m468
-rw-r--r--gl/m4/sys_ioctl_h.m425
-rw-r--r--gl/m4/sys_select_h.m436
-rw-r--r--gl/m4/sys_socket_h.m416
-rw-r--r--gl/m4/sys_stat_h.m49
-rw-r--r--gl/m4/sys_time_h.m416
-rw-r--r--gl/m4/time_h.m420
-rw-r--r--gl/m4/ungetc.m432
-rw-r--r--gl/m4/unistd_h.m432
-rw-r--r--gl/m4/vasnprintf.m42
-rw-r--r--gl/m4/version-etc.m412
-rw-r--r--gl/m4/warnings.m414
-rw-r--r--gl/m4/wchar.m4103
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wint_t.m42
-rw-r--r--gl/m4/xsize.m42
75 files changed, 622 insertions, 451 deletions
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index d4d04d1530..301469b31c 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index 4b978e137c..f3ee34380c 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,6 @@
# alloca.m4 serial 9
-dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index a6e63df01c..4360dd8104 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
-# arpa_inet_h.m4 serial 5
-dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 7
+dnl Copyright (C) 2006, 2008, 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.
@@ -16,20 +16,28 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
if test $ac_cv_header_arpa_inet_h = yes; then
HAVE_ARPA_INET_H=1
else
- ARPA_INET_H='arpa/inet.h'
HAVE_ARPA_INET_H=0
fi
AC_SUBST([HAVE_ARPA_INET_H])
- dnl Execute this unconditionally, because ARPA_INET_H may be set by other
- dnl modules, after this code is executed.
+ dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([arpa/inet.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* On some systems, this header is not self-consistent. */
+#ifndef __GLIBC__
+# include <sys/socket.h>
+#endif
+#include <arpa/inet.h>
+ ]], [inet_ntop inet_pton])
])
dnl Unconditionally enables the replacement of <arpa/inet.h>.
AC_DEFUN([gl_REPLACE_ARPA_INET_H],
[
- AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
- ARPA_INET_H='arpa/inet.h'
+ dnl This is a no-op, because <arpa/inet.h> is always overridden.
+ :
])
AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
@@ -46,5 +54,4 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
- ARPA_INET_H=''; AC_SUBST([ARPA_INET_H])
])
diff --git a/gl/m4/autobuild.m4 b/gl/m4/autobuild.m4
index a025e73795..93ccb5468a 100644
--- a/gl/m4/autobuild.m4
+++ b/gl/m4/autobuild.m4
@@ -1,5 +1,6 @@
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index fdcc96b673..1ee3add9b9 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,5 +1,5 @@
# close.m4 serial 5
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 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/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 4ce1ccbd9f..d02a039363 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 6
-dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008, 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/error.m4 b/gl/m4/error.m4
index 7c7746e2cc..9f1307a428 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,7 +1,6 @@
-#serial 11
+#serial 12
-# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -18,5 +17,6 @@ AC_DEFUN([gl_ERROR],
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
+ AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index ba6d5e190f..7d9458a8d6 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 8 -*- Autoconf -*-
+# serial 9 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,20 @@
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
@@ -74,8 +88,8 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
-# define __EXTENSIONS__ 1
- ]AC_INCLUDES_DEFAULT])],
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
[ac_cv_safe_to_define___extensions__=yes],
[ac_cv_safe_to_define___extensions__=no])])
test $ac_cv_safe_to_define___extensions__ = yes &&
diff --git a/gl/m4/fclose.m4 b/gl/m4/fclose.m4
index ab2986fd11..85de629423 100644
--- a/gl/m4/fclose.m4
+++ b/gl/m4/fclose.m4
@@ -1,5 +1,5 @@
# fclose.m4 serial 2
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 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/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index d36e3a46ca..a74a0d957f 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
# float_h.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 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/fseeko.m4 b/gl/m4/fseeko.m4
index a370648e9f..5f7f97729c 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# fseeko.m4 serial 7
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,12 +17,10 @@ AC_DEFUN([gl_FUNC_FSEEKO],
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
]], [fseeko (stdin, 0, 0);])],
- [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
+ [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
])
- if test $gl_cv_func_fseeko = no; then
- HAVE_FSEEKO=0
- gl_REPLACE_FSEEKO
- elif test $gl_cv_var_stdin_large_offset = no; then
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
gl_REPLACE_FSEEKO
fi
])
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 526dce5ba1..05fd2b6c4f 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,5 +1,5 @@
# getaddrinfo.m4 serial 22
-dnl Copyright (C) 2004-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-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.
@@ -39,7 +39,7 @@ AC_DEFUN([gl_GETADDRINFO],
[gl_cv_func_getaddrinfo=no])])
if test $gl_cv_func_getaddrinfo = no; then
AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32],
- gl_cv_w32_getaddrinfo, [
+ gl_cv_w32_getaddrinfo, [
gl_cv_w32_getaddrinfo=no
am_save_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 8ab3839885..9e5ad5baaf 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
# getdelim.m4 serial 5
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 4897bc3690..5b8a712fbc 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,7 @@
# getline.m4 serial 20
-dnl Copyright (C) 1998-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,9 +24,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
gl_getline_needs_run_time_check=no
AC_CHECK_FUNC([getline],
- dnl Found it in some library. Verify that it works.
- gl_getline_needs_run_time_check=yes,
- am_cv_func_working_getline=no)
+ dnl Found it in some library. Verify that it works.
+ gl_getline_needs_run_time_check=yes,
+ am_cv_func_working_getline=no)
if test $gl_getline_needs_run_time_check = yes; then
AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline],
[echo fooN |tr -d '\012'|tr N '\012' > conftest.data
@@ -40,7 +41,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
int len;
FILE *in = fopen ("./conftest.data", "r");
if (!in)
- return 1;
+ return 1;
len = getline (&line, &siz, in);
exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
}
diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4
index 3b55ee48ec..cb80a65c52 100644
--- a/gl/m4/getpass.m4
+++ b/gl/m4/getpass.m4
@@ -1,5 +1,6 @@
# getpass.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 0fec7d42b7..735123e6dc 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
# serial 12
-# Copyright (C) 2001-2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,16 +17,16 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
[gl_cv_func_gettimeofday_posix_signature],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <sys/time.h>
- struct timeval c;
- ]],
- [[
- int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
- int x = f (&c, 0);
- return !(x | c.tv_sec | c.tv_usec);
- ]])],
- [gl_cv_func_gettimeofday_posix_signature=yes],
- [gl_cv_func_gettimeofday_posix_signature=no])])
+ [[#include <sys/time.h>
+ struct timeval c;
+ ]],
+ [[
+ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=yes],
+ [gl_cv_func_gettimeofday_posix_signature=no])])
gl_FUNC_GETTIMEOFDAY_CLOBBER
@@ -56,21 +56,21 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
[gl_cv_func_gettimeofday_clobber],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <string.h>
- #include <sys/time.h>
- #include <time.h>
- #include <stdlib.h>
- ]],
- [[
- time_t t = 0;
- struct tm *lt;
- struct tm saved_lt;
- struct timeval tv;
- lt = localtime (&t);
- saved_lt = *lt;
- gettimeofday (&tv, NULL);
- return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
- ]])],
+ [[#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+ ]],
+ [[
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+ ]])],
[gl_cv_func_gettimeofday_clobber=no],
[gl_cv_func_gettimeofday_clobber=yes],
dnl When crosscompiling, assume it is broken.
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 628c187630..4be01511f8 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index c8fda20330..b7812a8962 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 11
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 12
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -23,14 +23,17 @@ AC_DEFUN([gl_COMMON_BODY], [
# define __GNUC_STDC_INLINE__ 1
#endif])
AH_VERBATIM([unused_parameter],
-[/* Define as a marker that can be attached to function parameter declarations
- for parameters that are not used. This helps to reduce warnings, such as
- from GCC -Wunused-parameter. */
+[/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
+# define _GL_UNUSED __attribute__ ((__unused__))
#else
-# define _UNUSED_PARAMETER_
+# define _GL_UNUSED
#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
])
])
@@ -49,6 +52,14 @@ m4_ifndef([m4_foreach_w],
[m4_define([m4_foreach_w],
[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
+# ----------------------------------------------------
+# Backport of autoconf-2.63b's macro.
+# Remove this macro when we can assume autoconf >= 2.64.
+m4_ifndef([AS_VAR_IF],
+[m4_define([AS_VAR_IF],
+[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
+
# AC_PROG_MKDIR_P
# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
# Remove this macro when we can assume autoconf >= 2.60.
@@ -70,13 +81,13 @@ AC_DEFUN([AC_C_RESTRICT],
for ac_kw in __restrict __restrict__ _Restrict restrict; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[typedef int * int_ptr;
- int foo (int_ptr $ac_kw ip) {
- return ip[0];
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
}]],
[[int s[1];
- int * $ac_kw t = s;
- t[0] = 0;
- return foo(t)]])],
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)]])],
[ac_cv_c_restrict=$ac_kw])
test "$ac_cv_c_restrict" != no && break
done
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 9bfd46733d..099a0830ae 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
@@ -54,7 +54,7 @@ AC_DEFUN([gl_INIT],
fi
gl_SYS_SOCKET_MODULE_INDICATOR([accept])
changequote(,)dnl
-LTALLOCA=`echo "$ALLOCA" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
changequote([, ])dnl
AC_SUBST([LTALLOCA])
gl_FUNC_ALLOCA
@@ -113,6 +113,8 @@ AC_SUBST([LTALLOCA])
gl_SYS_SOCKET_MODULE_INDICATOR([listen])
gl_FUNC_LSEEK
gl_UNISTD_MODULE_INDICATOR([lseek])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
gl_FUNC_MEMCHR
gl_STRING_MODULE_INDICATOR([memchr])
gl_MINMAX
@@ -217,7 +219,7 @@ AC_SUBST([LTALLOCA])
if test -n "$gl_LIBOBJS"; then
# Remove the extension.
sed_drop_objext='s/\.o$//;s/\.obj$//'
- for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gl_libobjs="$gl_libobjs $i.$ac_objext"
gl_ltlibobjs="$gl_ltlibobjs $i.lo"
done
@@ -278,7 +280,7 @@ AC_SUBST([LTALLOCA])
if test -n "$gltests_LIBOBJS"; then
# Remove the extension.
sed_drop_objext='s/\.o$//;s/\.obj$//'
- for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gltests_libobjs="$gltests_libobjs $i.$ac_objext"
gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
done
@@ -347,14 +349,15 @@ AC_DEFUN([gltests_LIBSOURCES], [
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
+ build-aux/arg-nonnull.h
build-aux/config.rpath
build-aux/gendocs.sh
build-aux/gnupload
- build-aux/link-warning.h
build-aux/pmccabe.css
build-aux/pmccabe2html
build-aux/useless-if-before-free
build-aux/vc-list-files
+ build-aux/warn-on-use.h
doc/fdl-1.3.texi
doc/gendocs_template
doc/gpl-3.0.texi
@@ -509,11 +512,14 @@ AC_DEFUN([gl_FILE_LIST], [
m4/unistd_h.m4
m4/vasnprintf.m4
m4/version-etc.m4
+ m4/warn-on-use.m4
m4/warnings.m4
m4/wchar.m4
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4
+ tests/macros.h
+ tests/signature.h
tests/test-alignof.c
tests/test-alloca-opt.c
tests/test-arpa_inet.c
@@ -550,6 +556,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-stdlib.c
tests/test-strerror.c
tests/test-string.c
+ tests/test-sys_ioctl.c
tests/test-sys_select.c
tests/test-sys_socket.c
tests/test-sys_stat.c
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index 4438d48869..69e7733b99 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 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/hostent.m4 b/gl/m4/hostent.m4
index 4a96af7a53..1111041129 100644
--- a/gl/m4/hostent.m4
+++ b/gl/m4/hostent.m4
@@ -1,5 +1,5 @@
# hostent.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/include_next.m4 b/gl/m4/include_next.m4
index 5e22ded936..c7e0672f60 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 14
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -109,11 +109,11 @@ EOF
# be
# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
# That way, a header file with the following line:
-# #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# #@INCLUDE_NEXT@ @NEXT_FOO_H@
# or
-# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
+# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
# behaves (after sed substitution) as if it contained
-# #include_next <foo.h>
+# #include_next <foo.h>
# even if the compiler does not support include_next.
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
@@ -129,46 +129,46 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
m4_foreach_w([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
- [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
+ [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
if test $gl_cv_have_include_next = yes; then
AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
else
AC_CACHE_CHECK(
- [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
- m4_defn([gl_next_header]),
- [AS_VAR_PUSHDEF([gl_header_exists],
- [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
- if test AS_VAR_GET(gl_header_exists) = yes; then
- AC_LANG_CONFTEST(
- [AC_LANG_SOURCE(
- [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
- )])
- dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
- dnl that contain only a #include of other header files and no
- dnl non-comment tokens of their own. This leads to a failure to
- dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
- dnl and others. The workaround is to force preservation of comments
- dnl through option -C. This ensures all necessary #line directives
- dnl are present. GCC supports option -C as well.
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
- dnl eval is necessary to expand gl_absname_cpp.
- dnl Ultrix and Pyramid sh refuse to redirect output of eval,
- dnl so use subshell.
- AS_VAR_SET([gl_next_header],
- ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
- s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'])
- else
- AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
- fi
- AS_VAR_POPDEF([gl_header_exists])])
+ [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+ m4_defn([gl_next_header]),
+ [AS_VAR_PUSHDEF([gl_header_exists],
+ [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
+ if test AS_VAR_GET(gl_header_exists) = yes; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE(
+ [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+ )])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
+ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'])
+ else
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ AS_VAR_POPDEF([gl_header_exists])])
fi
AC_SUBST(
AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 2a8ff20515..20e8d7c52e 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,5 +1,5 @@
# inet_ntop.m4 serial 11
-dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2008, 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/inet_pton.m4 b/gl/m4/inet_pton.m4
index e890b9b7a0..e0b794242f 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,5 +1,5 @@
# inet_pton.m4 serial 9
-dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008, 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/intmax_t.m4 b/gl/m4/intmax_t.m4
index 264cb57184..975caac506 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,6 @@
# intmax_t.m4 serial 7
-dnl Copyright (C) 1997-2004, 2006-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index f4ca16021c..782d77ed8b 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 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/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index e4863f2c9b..ebb30528bd 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,5 +1,5 @@
# lib-ld.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 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.
@@ -59,7 +59,7 @@ if test "$GCC" = yes; then
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -89,9 +89,9 @@ AC_CACHE_VAL([acl_cv_path_LD],
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break ;;
esac
fi
done
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 2f8b7ff38f..90e1ac9170 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 20 (gettext-0.18)
-dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-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/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index 4b7ee3358d..1601ceaefd 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-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/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index eedc8d5682..cca3c1a90f 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 14
-dnl Copyright (C) 1999-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 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.
@@ -20,30 +20,30 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
[AC_LINK_IFELSE(
[_AC_TYPE_LONG_LONG_SNIPPET],
[dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
- dnl If cross compiling, assume the bug isn't important, since
- dnl nobody cross compiles for this platform as far as we know.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <limits.h>
- @%:@ifndef LLONG_MAX
- @%:@ define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- @%:@ define LLONG_MAX (HALF - 1 + HALF)
- @%:@endif]],
- [[long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;]])],
- [ac_cv_type_long_long_int=yes],
- [ac_cv_type_long_long_int=no],
- [ac_cv_type_long_long_int=yes])],
+ dnl If cross compiling, assume the bug isn't important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no],
+ [ac_cv_type_long_long_int=yes])],
[ac_cv_type_long_long_int=no])])
if test $ac_cv_type_long_long_int = yes; then
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
@@ -83,24 +83,24 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
[
AC_LANG_PROGRAM(
[[/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;]],
[[/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));]])
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
])
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index f336990709..f3084957c1 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,5 +1,5 @@
# lseek.m4 serial 4
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 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.
@@ -19,21 +19,21 @@ int main ()
/* Exit with success only if stdin is seekable. */
return lseek (0, (off_t)0, SEEK_CUR) < 0;
}],
- [if test -s conftest$ac_exeext \
- && ./conftest$ac_exeext < conftest.$ac_ext \
- && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
- gl_cv_func_lseek_pipe=yes
- else
- gl_cv_func_lseek_pipe=no
- fi],
- [gl_cv_func_lseek_pipe=no])
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi],
+ [gl_cv_func_lseek_pipe=no])
else
AC_COMPILE_IFELSE([
#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
Choke me.
#endif],
- [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+ [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
fi])
if test $gl_cv_func_lseek_pipe = no; then
gl_REPLACE_LSEEK
@@ -46,5 +46,5 @@ AC_DEFUN([gl_REPLACE_LSEEK],
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
REPLACE_LSEEK=1
AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
- [Define to 1 if lseek does not detect pipes.])
+ [Define to 1 if lseek does not detect pipes.])
])
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 807017166b..910ac92292 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
# malloc.m4 serial 9
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 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/manywarnings.m4 b/gl/m4/manywarnings.m4
index 7f36fb4f67..844a9ba2a0 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,5 +1,5 @@
# manywarnings.m4 serial 1
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/memchr.m4 b/gl/m4/memchr.m4
index 1194bac2e8..94596ef959 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
# memchr.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 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.
@@ -53,11 +53,11 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
{
int pagesize = getpagesize ();
char *two_pages =
- (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
- flags, fd, 0);
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
if (two_pages != (char *)(-1)
- && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
- fence = two_pages + pagesize;
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
}
#endif
if (fence)
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index d2993fbaf7..d9e9cecfd7 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
# minmax.m4 serial 3
-dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 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/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index 14b6270d28..a6b7b9ac3b 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 8
-dnl Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 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/multiarch.m4 b/gl/m4/multiarch.m4
index ec377bac86..389bd2bbaa 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 5
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/netdb_h.m4 b/gl/m4/netdb_h.m4
index 5a12251f9a..84afce6e5e 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,5 +1,5 @@
-# netdb_h.m4 serial 5
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# netdb_h.m4 serial 6
+dnl Copyright (C) 2008, 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.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_HEADER_NETDB],
[
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
+ AC_CHECK_HEADERS_ONCE([netdb.h])
gl_CHECK_NEXT_HEADERS([netdb.h])
if test $ac_cv_header_netdb_h = yes; then
AC_COMPILE_IFELSE(
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index 47fd9cc317..cc7a44cc21 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
# netinet_in_h.m4 serial 4
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4
index fb37fd0d99..350cd4203f 100644
--- a/gl/m4/perror.m4
+++ b/gl/m4/perror.m4
@@ -1,5 +1,5 @@
# perror.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/printf.m4 b/gl/m4/printf.m4
index 87aa45c5e7..ebca5364c4 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
# printf.m4 serial 33
-dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4
index 8d1b8f3c5f..35a3a4817f 100644
--- a/gl/m4/read-file.m4
+++ b/gl/m4/read-file.m4
@@ -1,5 +1,6 @@
# read-file.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+dnl 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/readline.m4 b/gl/m4/readline.m4
index eb44b0ad03..27f81629a5 100644
--- a/gl/m4/readline.m4
+++ b/gl/m4/readline.m4
@@ -1,5 +1,5 @@
# readline.m4 serial 7
-dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 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.
@@ -42,7 +42,7 @@ AC_DEFUN([gl_FUNC_READLINE],
[[readline((char*)0);]])],
[gl_cv_lib_readline=" -l$extra_lib"])
if test "$gl_cv_lib_readline" != no; then
- break
+ break
fi
done
LIBS="$am_save_LIBS"
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 5925796864..dc30235c17 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
# realloc.m4 serial 9
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 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/select.m4 b/gl/m4/select.m4
index 53cc059656..da266f0bfa 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,5 +1,5 @@
-# select.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# select.m4 serial 3
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,7 @@ AC_DEFUN([gl_FUNC_SELECT],
[
AC_REQUIRE([gl_HEADER_SYS_SELECT])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_SOCKETS])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([select])
else
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index 242f9e3602..2ed961a439 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,5 +1,5 @@
# servent.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/size_max.m4 b/gl/m4/size_max.m4
index 35bd3d6ae3..ce992db1f1 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 9
-dnl Copyright (C) 2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 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/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4
index 6021786ee1..522b107b12 100644
--- a/gl/m4/snprintf.m4
+++ b/gl/m4/snprintf.m4
@@ -1,5 +1,5 @@
# snprintf.m4 serial 5
-dnl Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index 3edc010610..aefb936079 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
# sockets.m4 serial 6
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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/socklen.m4 b/gl/m4/socklen.m4
index 80ed5135fd..2933d4b890 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
# socklen.m4 serial 7
-dnl Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 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.
@@ -20,30 +20,30 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T],
AC_CHECK_TYPE([socklen_t], ,
[AC_MSG_CHECKING([for socklen_t equivalent])
AC_CACHE_VAL([gl_cv_socklen_t_equiv],
- [# Systems have either "struct sockaddr *" or
- # "void *" as the second argument to getpeername
- gl_cv_socklen_t_equiv=
- for arg2 in "struct sockaddr" void; do
- for t in int size_t "unsigned int" "long int" "unsigned long int"; do
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [# Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ gl_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t "unsigned int" "long int" "unsigned long int"; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/types.h>
#include <sys/socket.h>
int getpeername (int, $arg2 *, $t *);]],
[[$t len;
getpeername (0, 0, &len);]])],
- [gl_cv_socklen_t_equiv="$t"])
- test "$gl_cv_socklen_t_equiv" != "" && break
- done
- test "$gl_cv_socklen_t_equiv" != "" && break
- done
+ [gl_cv_socklen_t_equiv="$t"])
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
+ test "$gl_cv_socklen_t_equiv" != "" && break
+ done
])
if test "$gl_cv_socklen_t_equiv" = ""; then
- AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
fi
AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
- [type to use in place of socklen_t if not defined])],
+ [type to use in place of socklen_t if not defined])],
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index bbdfabc919..8a0c236038 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
# sockpfaf.m4 serial 7
-dnl Copyright (C) 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 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/stdarg.m4 b/gl/m4/stdarg.m4
index a9ada4f4e0..5c87bd8b5f 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 3
-dnl Copyright (C) 2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 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/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
index 57c804a80f..3d672d7476 100644
--- a/gl/m4/stdbool.m4
+++ b/gl/m4/stdbool.m4
@@ -1,6 +1,6 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-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.
@@ -38,77 +38,77 @@ AC_DEFUN([AC_HEADER_STDBOOL],
[AC_CACHE_CHECK([for stdbool.h that conforms to C99],
[ac_cv_header_stdbool_h],
[AC_TRY_COMPILE(
- [
- #include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
- #endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
- #endif
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { _Bool s: 1; _Bool t; } s;
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- bool e = &s;
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- #if defined __xlc__ || defined __GNUC__
- /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
- reported by James Lemley on 2005-10-05; see
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
- This test is not quite right, since xlc is allowed to
- reject this program, as the initializer for xlcbug is
- not one of the forms that C requires support for.
- However, doing the test right would require a run-time
- test, and that would make cross-compilation harder.
- Let us hope that IBM fixes the xlc bug, and also adds
- support for this kind of constant expression. In the
- meantime, this test will reject xlc, which is OK, since
- our stdbool.h substitute should suffice. We also test
- this with GCC, where it should work, to detect more
- quickly whether someone messes up the test in the
- future. */
- char digs[] = "0123456789";
- int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
- #endif
- /* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- */
- _Bool q = true;
- _Bool *pq = &q;
- ],
- [
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
- ],
- [ac_cv_header_stdbool_h=yes],
- [ac_cv_header_stdbool_h=no])])
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+ ],
+ [
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
AC_CHECK_TYPES([_Bool])
if test $ac_cv_header_stdbool_h = yes; then
AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 682e9c626e..c8572de947 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index a2e8bdd628..1cc57e6e96 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
# stdint.m4 serial 34
-dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-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.
@@ -396,12 +396,12 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
case $glsuf in
'') gltype1='int';;
- l) gltype1='long int';;
- ll) gltype1='long long int';;
- i64) gltype1='__int64';;
- u) gltype1='unsigned int';;
- ul) gltype1='unsigned long int';;
- ull) gltype1='unsigned long long int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
ui64)gltype1='unsigned __int64';;
esac
AC_COMPILE_IFELSE(
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index 82f0c244c8..b8e3c6cc71 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 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/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index ed828eac89..20af579d14 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 21
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# stdio_h.m4 serial 24
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
@@ -30,6 +31,13 @@ AC_DEFUN([gl_STDIO_H],
AC_LIBOBJ([stdio-write])
fi
])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+ ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+ snprintf vdprintf vsnprintf])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -89,8 +97,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
- HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
- HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT])
HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
@@ -140,6 +146,6 @@ AC_DEFUN([gl_STDIN_LARGE_OFFSET],
choke me
# endif
#endif]])],
- [gl_cv_var_stdin_large_offset=yes],
- [gl_cv_var_stdin_large_offset=no])])
+ [gl_cv_var_stdin_large_offset=yes],
+ [gl_cv_var_stdin_large_offset=no])])
])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 4556ac04c5..0693d1a5ec 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 21
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 22
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,6 +22,20 @@ AC_DEFUN([gl_STDLIB_H],
# include <random.h>
#endif
]])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#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])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -80,6 +94,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
+ REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
- VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
+ REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
])
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 8c16ca9a87..1649b24511 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
# strerror.m4 serial 9
-dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index edc5c6e825..73c6d83378 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
+# serial 11
# Written by Paul Eggert.
@@ -21,6 +21,13 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([string.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <string.h>
+ ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
+ strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -64,33 +71,34 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
- GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
- HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
- HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
- HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
- HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
- HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
- HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
- HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
- HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
- HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
- HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
- HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
- HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
- HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
- HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
- HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
- HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
- REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
- REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
- REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
- REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
- REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
- REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
- REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
- REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
- REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
- UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+ HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
+ HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
+ HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
+ REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
+ REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
+ UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 22aa83ee59..829dc610dc 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
-# sys_ioctl_h.m4 serial 3
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+# sys_ioctl_h.m4 serial 5
+dnl Copyright (C) 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.
@@ -27,24 +27,28 @@ AC_DEFUN([gl_SYS_IOCTL_H],
[gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
[gl_cv_decl_ioctl_in_sys_ioctl_h=no])
])
- if test $gl_cv_decl_ioctl_in_sys_ioctl_h != yes; then
- SYS_IOCTL_H='sys/ioctl.h'
- fi
else
HAVE_SYS_IOCTL_H=0
- SYS_IOCTL_H='sys/ioctl.h'
fi
AC_SUBST([HAVE_SYS_IOCTL_H])
- dnl Execute this unconditionally, because SYS_IOCTL_H may be set by other
- dnl modules, after this code is executed.
+ dnl <sys/ioctl.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([sys/ioctl.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <sys/ioctl.h>
+/* Some platforms declare ioctl in the wrong header. */
+#ifndef __GLIBC__
+# include <unistd.h>
+#endif
+ ]], [ioctl])
])
dnl Unconditionally enables the replacement of <sys/ioctl.h>.
AC_DEFUN([gl_REPLACE_SYS_IOCTL_H],
[
- AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
- SYS_IOCTL_H='sys/ioctl.h'
+ dnl This is a no-op, because <sys/ioctl.h> is always overridden.
+ :
])
AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
@@ -61,5 +65,4 @@ AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS],
SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H])
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
- SYS_IOCTL_H=''; AC_SUBST([SYS_IOCTL_H])
])
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index 0bb097e1a7..590554a11f 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
-# sys_select_h.m4 serial 8
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# sys_select_h.m4 serial 11
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,7 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
dnl 2. On OSF/1 4.0, <sys/select.h> provides only a forward declaration
dnl of 'struct timeval', and no definition of this type.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
- [[struct timeval b;]])],
+ [[struct timeval b;]])],
[gl_cv_header_sys_select_h_selfcontained=yes],
[gl_cv_header_sys_select_h_selfcontained=no])
dnl Test against another bug:
@@ -45,20 +45,28 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
])
fi
])
- if test $gl_cv_header_sys_select_h_selfcontained = yes; then
- SYS_SELECT_H=''
+ AC_CHECK_HEADERS_ONCE([sys/select.h])
+ gl_CHECK_NEXT_HEADERS([sys/select.h])
+ if test $ac_cv_header_sys_select_h = yes; then
+ HAVE_SYS_SELECT_H=1
else
- SYS_SELECT_H='sys/select.h'
- gl_CHECK_NEXT_HEADERS([sys/select.h])
- if test $ac_cv_header_sys_select_h = yes; then
- HAVE_SYS_SELECT_H=1
- else
- HAVE_SYS_SELECT_H=0
- fi
- AC_SUBST([HAVE_SYS_SELECT_H])
+ HAVE_SYS_SELECT_H=0
+ fi
+ AC_SUBST([HAVE_SYS_SELECT_H])
+ if test $gl_cv_header_sys_select_h_selfcontained != yes; then
gl_PREREQ_SYS_H_WINSOCK2
fi
- AC_SUBST([SYS_SELECT_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require prerequisite headers. */
+#include <sys/types.h>
+#if !defined __GLIBC__ && HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/select.h>
+ ]], [select])
])
AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR],
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index e864b2c7e2..1d47656027 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
-# sys_socket_h.m4 serial 13
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 14
+dnl Copyright (C) 2005-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.
@@ -66,6 +66,18 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
gl_PREREQ_SYS_H_WINSOCK2
fi
AC_SUBST([SYS_SOCKET_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require prerequisite headers. */
+#include <sys/types.h>
+#if !defined __GLIBC__ && HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/select.h>
+ ]], [socket connect accept bind getpeername getsockname getsockopt
+ listen recv send recvfrom sendto setsockopt shutdown accept4])
])
AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 838cf484e9..5a113d02ea 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 21 -*- Autoconf -*-
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 22 -*- 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,
dnl with or without modifications, as long as this notice is preserved.
@@ -27,6 +27,11 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
[#include <sys/types.h>
#include <sys/stat.h>])
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+ ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+ mknod mknodat stat utimensat])
]) # gl_HEADER_SYS_STAT_H
AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index 13ac5763b3..9c16487957 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,6 +1,7 @@
# Configure a replacement for <sys/time.h>.
+# serial 2
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -18,6 +19,7 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H],
AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
gl_CHECK_NEXT_HEADERS([sys/time.h])
if test $ac_cv_header_sys_time_h = yes; then
@@ -30,12 +32,12 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#if HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
- #include <time.h>
- ]],
- [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ ]],
+ [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
[gl_cv_sys_struct_timeval=yes],
[gl_cv_sys_struct_timeval=no])])
if test $gl_cv_sys_struct_timeval = yes; then
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index 16fefa1974..c00bfae922 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,6 +1,6 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -45,9 +45,9 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[gl_cv_sys_struct_timespec_in_time_h],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <time.h>
- ]],
- [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [[#include <time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
[gl_cv_sys_struct_timespec_in_time_h=yes],
[gl_cv_sys_struct_timespec_in_time_h=no])])
@@ -59,12 +59,12 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
[gl_cv_sys_struct_timespec_in_sys_time_h],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/time.h>
- ]],
- [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
- [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
- [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
fi
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index eb652356b5..68ccf88349 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,5 +1,5 @@
# ungetc.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,21 +13,21 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
]], [FILE *f;
- if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
- if (fputs ("abc", f) < 0) return 2;
- rewind (f);
- if (fgetc (f) != 'a') return 3;
- if (fgetc (f) != 'b') return 4;
- if (ungetc ('d', f) != 'd') return 5;
- if (ftell (f) != 1) return 6;
- if (fgetc (f) != 'd') return 7;
- if (ftell (f) != 2) return 8;
- if (fseek (f, 0, SEEK_CUR) != 0) return 9;
- if (ftell (f) != 2) return 10;
- if (fgetc (f) != 'c') return 11;
- fclose (f); remove ("conftest.tmp");])],
- [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
- [gl_cv_func_ungetc_works='guessing no'])
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");])],
+ [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
+ [gl_cv_func_ungetc_works='guessing no'])
])
if test "$gl_cv_func_ungetc_works" != yes; then
AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 88e60a0538..31d31c1e93 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 34
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# unistd_h.m4 serial 39
+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,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
@@ -21,6 +22,24 @@ AC_DEFUN([gl_UNISTD_H],
HAVE_UNISTD_H=0
fi
AC_SUBST([HAVE_UNISTD_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+ ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
+ fsync ftruncate getcwd getdomainname getdtablesize getgroups
+ gethostname getlogin getlogin_r getpagesize getusershell setusershell
+ endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
+ rmdir sleep symlink symlinkat unlink unlinkat usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -48,6 +67,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
+ GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
@@ -56,6 +76,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
+ GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
@@ -66,6 +87,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
+ GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
@@ -80,12 +102,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
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])
HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
+ HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
@@ -96,6 +120,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
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])
@@ -109,11 +134,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
+ REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
+ REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index 3a1d1e0100..50a20cca23 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
# vasnprintf.m4 serial 29
-dnl Copyright (C) 2002-2004, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4
index 14d6eb6dce..2c572b4bca 100644
--- a/gl/m4/version-etc.m4
+++ b/gl/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,8 +11,8 @@ m4_define([gl_VERSION_ETC_FLAG],
AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
[dnl
case $withval in
- yes|no) ;;
- *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
+ yes|no) ;;
+ *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
esac
])
])
@@ -20,11 +20,11 @@ m4_define([gl_VERSION_ETC_FLAG],
AC_DEFUN([gl_VERSION_ETC],
[dnl
gl_VERSION_ETC_FLAG([packager],
- [String identifying the packager of this software])
+ [String identifying the packager of this software])
gl_VERSION_ETC_FLAG([packager-version],
- [Packager-specific version information])
+ [Packager-specific version information])
gl_VERSION_ETC_FLAG([packager-bug-reports],
- [Packager info for bug reports (URL/e-mail/...)])
+ [Packager info for bug reports (URL/e-mail/...)])
if test "X$with_packager" = "X" && \
test "X$with_packager_version$with_packager_bug_reports" != "X"
then
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index c32cf4ed66..dad5c1f29c 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,19 +1,11 @@
# warnings.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 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.
dnl From Simon Josefsson
-# gl_AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
-# ----------------------------------------------------
-# Provide the functionality of AS_VAR_IF if Autoconf does not have it.
-m4_ifdef([AS_VAR_IF],
-[m4_copy([AS_VAR_IF], [gl_AS_VAR_IF])],
-[m4_define([gl_AS_VAR_IF],
-[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
-
# gl_AS_VAR_APPEND(VAR, VALUE)
# ----------------------------
# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
@@ -33,11 +25,11 @@ AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [
CPPFLAGS="${CPPFLAGS} $1"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
[AS_VAR_SET([gl_Warn], [yes])],
- [AS_VAR_SET([gl_Warn], [no])])
+ [AS_VAR_SET([gl_Warn], [no])])
CPPFLAGS="$save_CPPFLAGS"
])
AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl
-gl_AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
+AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
diff --git a/gl/m4/wchar.m4 b/gl/m4/wchar.m4
index ce53a45cf5..e81485d01e 100644
--- a/gl/m4/wchar.m4
+++ b/gl/m4/wchar.m4
@@ -1,23 +1,30 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+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,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar.m4 serial 25
+# wchar.m4 serial 31
AC_DEFUN([gl_WCHAR_H],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
- AC_CACHE_CHECK([whether <wchar.h> is standalone],
- [gl_cv_header_wchar_h_standalone],
- [AC_COMPILE_IFELSE([[#include <wchar.h>
-wchar_t w;]],
- [gl_cv_header_wchar_h_standalone=yes],
- [gl_cv_header_wchar_h_standalone=no])])
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
AC_REQUIRE([gt_TYPE_WINT_T])
if test $gt_cv_c_wint_t = yes; then
@@ -27,32 +34,73 @@ wchar_t w;]],
fi
AC_SUBST([HAVE_WINT_T])
- dnl If <stddef.h> is replaced, then <wchar.h> must also be replaced.
- AC_REQUIRE([gl_STDDEF_H])
-
- if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then
- WCHAR_H=wchar.h
- fi
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+ wcsrtombs wcsnrtombs wcwidth])
+])
- dnl Prepare for creating substitute <wchar.h>.
- dnl Do it always: WCHAR_H may be empty here but can be set later.
- dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
- dnl character support).
- AC_CHECK_HEADERS_ONCE([wchar.h])
- if test $ac_cv_header_wchar_h = yes; then
- HAVE_WCHAR_H=1
- else
- HAVE_WCHAR_H=0
+dnl Check whether <wchar.h> is usable at all.
+AC_DEFUN([gl_WCHAR_H_INLINE_OK],
+[
+ dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
+ dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
+ dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+ AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
+ [gl_cv_header_wchar_h_correct_inline],
+ [gl_cv_header_wchar_h_correct_inline=yes
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ ])
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted.])
fi
- AC_SUBST([HAVE_WCHAR_H])
- gl_CHECK_NEXT_HEADERS([wchar.h])
])
dnl Unconditionally enables the replacement of <wchar.h>.
AC_DEFUN([gl_REPLACE_WCHAR_H],
[
- AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
- WCHAR_H=wchar.h
+ dnl This is a no-op, because <wchar.h> is always overridden.
+ :
])
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
@@ -99,5 +147,4 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
- WCHAR_H=''; AC_SUBST([WCHAR_H])
])
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index fb27a7f65f..ed804e664b 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 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/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index 47a4363d79..a6c7d15cb5 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 631893cf59..b653693a30 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
# xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 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.