summaryrefslogtreecommitdiff
path: root/gl/m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/arpa_inet_h.m44
-rw-r--r--gl/m4/getaddrinfo.m44
-rw-r--r--gl/m4/gettimeofday.m48
-rw-r--r--gl/m4/gnulib-common.m472
-rw-r--r--gl/m4/gnulib-comp.m4260
-rw-r--r--gl/m4/inet_ntop.m44
-rw-r--r--gl/m4/inet_pton.m44
-rw-r--r--gl/m4/lseek.m45
-rw-r--r--gl/m4/netdb_h.m44
-rw-r--r--gl/m4/stddef_h.m44
-rw-r--r--gl/m4/stdio_h.m46
-rw-r--r--gl/m4/stdlib_h.m419
-rw-r--r--gl/m4/string_h.m46
-rw-r--r--gl/m4/sys_ioctl_h.m47
-rw-r--r--gl/m4/sys_select_h.m411
-rw-r--r--gl/m4/sys_socket_h.m416
-rw-r--r--gl/m4/sys_stat_h.m46
-rw-r--r--gl/m4/sys_time_h.m47
-rw-r--r--gl/m4/time_h.m438
-rw-r--r--gl/m4/unistd_h.m416
-rw-r--r--gl/m4/warn-on-use.m48
-rw-r--r--gl/m4/wchar.m4150
22 files changed, 429 insertions, 230 deletions
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 4360dd8104..15a30e2bca 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,4 +1,4 @@
-# arpa_inet_h.m4 serial 7
+# arpa_inet_h.m4 serial 8
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,
@@ -44,7 +44,7 @@ AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
- GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 05fd2b6c4f..bc3066db18 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 22
+# getaddrinfo.m4 serial 23
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,
@@ -96,7 +96,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
- AC_REQUIRE([gl_INET_NTOP]) dnl for INET_NTOP_LIB
+ AC_REQUIRE([gl_FUNC_INET_NTOP]) dnl for INET_NTOP_LIB
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 32e4f29a9f..709a4d4fb4 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
-# serial 14
+# serial 15
# Copyright (C) 2001-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -15,7 +15,11 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
AC_CHECK_FUNCS_ONCE([gettimeofday])
gl_gettimeofday_timezone=void
- if test $ac_cv_func_gettimeofday = yes; then
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ else
gl_FUNC_GETTIMEOFDAY_CLOBBER
AC_CACHE_CHECK([for gettimeofday with POSIX signature],
[gl_cv_func_gettimeofday_posix_signature],
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index b7812a8962..9cc519e765 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 12
+# 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
@@ -61,9 +112,16 @@ m4_ifndef([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.
-m4_ifdef([AC_PROG_MKDIR_P], [], [
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
+# for interoperability with automake-1.9.6 from autoconf-2.62.
+# Remove this macro when we can assume autoconf >= 2.62 or
+# autoconf >= 2.60 && automake >= 1.10.
+m4_ifdef([AC_PROG_MKDIR_P], [
+ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
+ m4_define([AC_PROG_MKDIR_P],
+ m4_defn([AC_PROG_MKDIR_P])[
+ AC_SUBST([MKDIR_P])])], [
+ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index fd0b0da43a..8830de9c41 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -25,14 +25,147 @@ AC_DEFUN([gl_EARLY],
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
AC_REQUIRE([AC_PROG_RANLIB])
+ # Code from module accept:
+ # Code from module alignof:
+ # Code from module alignof-tests:
+ # Code from module alloca:
+ # Code from module alloca-opt:
+ # Code from module alloca-opt-tests:
+ # Code from module arg-nonnull:
+ # Code from module arpa_inet:
+ # Code from module arpa_inet-tests:
+ # Code from module autobuild:
AB_INIT
+ # Code from module bind:
+ # Code from module c++defs:
+ # Code from module c-ctype:
+ # Code from module c-ctype-tests:
+ # Code from module clock-time:
+ # Code from module close:
+ # Code from module close-hook:
+ # Code from module connect:
+ # Code from module errno:
+ # Code from module errno-tests:
+ # Code from module error:
+ # Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module fclose:
+ # Code from module fdl-1.3:
+ # Code from module float:
+ # Code from module fseeko:
AC_REQUIRE([AC_FUNC_FSEEKO])
+ # Code from module fseeko-tests:
+ # Code from module gendocs:
+ # Code from module getaddrinfo:
+ # Code from module getaddrinfo-tests:
+ # Code from module getdelim:
+ # Code from module getdelim-tests:
+ # Code from module getline:
+ # Code from module getline-tests:
+ # Code from module getpass-gnu:
+ # Code from module gettext-h:
+ # Code from module gettime:
+ # Code from module gettimeofday:
+ # Code from module gettimeofday-tests:
+ # Code from module gnumakefile:
+ # Code from module gnupload:
+ # Code from module gpl-3.0:
+ # Code from module havelib:
+ # Code from module hostent:
+ # Code from module include_next:
+ # Code from module inet_ntop:
+ # Code from module inet_ntop-tests:
+ # Code from module inet_pton:
+ # Code from module inet_pton-tests:
+ # Code from module intprops:
+ # Code from module ioctl:
+ # Code from module lgpl-2.1:
+ # Code from module listen:
+ # Code from module lseek:
+ # Code from module lseek-tests:
+ # Code from module maintainer-makefile:
+ # Code from module manywarnings:
+ # Code from module memchr:
+ # Code from module memchr-tests:
+ # Code from module minmax:
+ # Code from module multiarch:
+ # Code from module netdb:
+ # Code from module netdb-tests:
+ # Code from module netinet_in:
+ # Code from module netinet_in-tests:
+ # Code from module perror:
+ # Code from module perror-tests:
+ # Code from module pmccabe2html:
+ # Code from module progname:
+ # Code from module read-file:
+ # Code from module read-file-tests:
+ # Code from module readline:
+ # Code from module realloc-posix:
+ # Code from module recv:
+ # Code from module select:
+ # Code from module select-tests:
+ # Code from module send:
+ # Code from module servent:
+ # Code from module setsockopt:
+ # Code from module shutdown:
+ # Code from module size_max:
+ # Code from module snprintf:
+ # Code from module snprintf-tests:
+ # Code from module socket:
+ # Code from module sockets:
+ # Code from module sockets-tests:
+ # Code from module socklen:
+ # Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
dnl shouldn't hurt, though installers are on their own to set c99 mode.
AC_REQUIRE([AC_PROG_CC_STDC])
+ # Code from module stdbool:
+ # Code from module stdbool-tests:
+ # Code from module stddef:
+ # Code from module stddef-tests:
+ # Code from module stdint:
+ # Code from module stdint-tests:
+ # Code from module stdio:
+ # Code from module stdio-tests:
+ # Code from module stdlib:
+ # Code from module stdlib-tests:
+ # Code from module strerror:
+ # Code from module strerror-tests:
+ # Code from module string:
+ # Code from module string-tests:
+ # Code from module sys_ioctl:
+ # Code from module sys_ioctl-tests:
+ # Code from module sys_select:
+ # Code from module sys_select-tests:
+ # Code from module sys_socket:
+ # Code from module sys_socket-tests:
+ # Code from module sys_stat:
+ # Code from module sys_stat-tests:
+ # Code from module sys_time:
+ # Code from module sys_time-tests:
+ # Code from module time:
+ # Code from module time-tests:
+ # Code from module timespec:
+ # Code from module unistd:
+ # Code from module unistd-tests:
+ # Code from module update-copyright:
+ # Code from module update-copyright-tests:
+ # Code from module useless-if-before-free:
+ # Code from module vasnprintf:
+ # Code from module vasnprintf-tests:
+ # Code from module vc-list-files:
+ # Code from module vc-list-files-tests:
+ # Code from module verify:
+ # Code from module version-etc:
+ # Code from module version-etc-fsf:
+ # Code from module version-etc-tests:
+ # Code from module warn-on-use:
+ # Code from module warnings:
+ # Code from module wchar:
+ # Code from module wchar-tests:
+ # Code from module xsize:
])
# This macro should be invoked from ./configure.ac, in the section
@@ -48,53 +181,83 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl'
+ # Code from module accept:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([accept])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+ # Code from module alignof:
+ # Code from module alloca:
changequote(,)dnl
LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
changequote([, ])dnl
AC_SUBST([LTALLOCA])
+ # Code from module alloca-opt:
gl_FUNC_ALLOCA
+ # Code from module arg-nonnull:
+ # Code from module arpa_inet:
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
+ # Code from module autobuild:
+ # Code from module bind:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([bind])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+ # Code from module c++defs:
+ # Code from module c-ctype:
+ # Code from module clock-time:
gl_CLOCK_TIME
+ # Code from module close:
gl_FUNC_CLOSE
gl_UNISTD_MODULE_INDICATOR([close])
+ # Code from module close-hook:
+ # Code from module connect:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([connect])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+ # Code from module errno:
gl_HEADER_ERRNO_H
+ # Code from module error:
gl_ERROR
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ # Code from module extensions:
+ # Code from module fclose:
gl_FUNC_FCLOSE
gl_STDIO_MODULE_INDICATOR([fclose])
+ # Code from module fdl-1.3:
+ # Code from module float:
gl_FLOAT_H
+ # Code from module fseeko:
gl_FUNC_FSEEKO
gl_STDIO_MODULE_INDICATOR([fseeko])
+ # Code from module gendocs:
+ # Code from module getaddrinfo:
gl_GETADDRINFO
gl_NETDB_MODULE_INDICATOR([getaddrinfo])
+ # Code from module getdelim:
gl_FUNC_GETDELIM
gl_STDIO_MODULE_INDICATOR([getdelim])
+ # Code from module getline:
gl_FUNC_GETLINE
gl_STDIO_MODULE_INDICATOR([getline])
+ # Code from module getpass-gnu:
gl_FUNC_GETPASS_GNU
+ # Code from module gettext-h:
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
+ # Code from module gettime:
gl_GETTIME
+ # Code from module gettimeofday:
gl_FUNC_GETTIMEOFDAY
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ # Code from module gnumakefile:
# Autoconf 2.61a.99 and earlier don't support linking a file only
# in VPATH builds. But since GNUmakefile is for maintainer use
# only, it does not matter if we skip the link with older autoconf.
@@ -105,62 +268,95 @@ AC_SUBST([LTALLOCA])
m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
+ # Code from module gnupload:
+ # Code from module gpl-3.0:
+ # Code from module havelib:
+ # Code from module hostent:
gl_HOSTENT
- gl_INET_NTOP
+ # Code from module include_next:
+ # Code from module inet_ntop:
+ gl_FUNC_INET_NTOP
gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
- gl_INET_PTON
+ # Code from module inet_pton:
+ gl_FUNC_INET_PTON
gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+ # Code from module intprops:
+ # Code from module lgpl-2.1:
+ # Code from module listen:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([listen])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+ # Code from module lseek:
gl_FUNC_LSEEK
gl_UNISTD_MODULE_INDICATOR([lseek])
+ # Code from module maintainer-makefile:
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ # Code from module manywarnings:
+ # Code from module memchr:
gl_FUNC_MEMCHR
gl_STRING_MODULE_INDICATOR([memchr])
+ # Code from module minmax:
gl_MINMAX
+ # Code from module multiarch:
gl_MULTIARCH
+ # Code from module netdb:
gl_HEADER_NETDB
+ # Code from module netinet_in:
gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P
+ # Code from module perror:
gl_FUNC_PERROR
gl_STRING_MODULE_INDICATOR([perror])
+ # Code from module pmccabe2html:
AC_PATH_PROG([PMCCABE], [pmccabe], [false])
+ # Code from module progname:
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ # Code from module read-file:
gl_FUNC_READ_FILE
+ # Code from module readline:
gl_FUNC_READLINE
+ # Code from module realloc-posix:
gl_FUNC_REALLOC_POSIX
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+ # Code from module recv:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([recv])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+ # Code from module select:
gl_FUNC_SELECT
gl_SYS_SELECT_MODULE_INDICATOR([select])
+ # Code from module send:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([send])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([send])
+ # Code from module servent:
gl_SERVENT
+ # Code from module setsockopt:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([setsockopt])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+ # Code from module shutdown:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([shutdown])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
+ # Code from module size_max:
gl_SIZE_MAX
+ # Code from module snprintf:
gl_FUNC_SNPRINTF
gl_STDIO_MODULE_INDICATOR([snprintf])
+ # Code from module socket:
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([socket])
@@ -175,33 +371,61 @@ AC_SUBST([LTALLOCA])
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
fi
gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+ # Code from module sockets:
gl_SOCKETS
+ # Code from module socklen:
gl_TYPE_SOCKLEN_T
+ # Code from module stdarg:
gl_STDARG_H
+ # Code from module stdbool:
AM_STDBOOL_H
+ # Code from module stddef:
gl_STDDEF_H
+ # Code from module stdint:
gl_STDINT_H
+ # Code from module stdio:
gl_STDIO_H
+ # Code from module stdlib:
gl_STDLIB_H
+ # Code from module strerror:
gl_FUNC_STRERROR
gl_STRING_MODULE_INDICATOR([strerror])
+ # Code from module string:
gl_HEADER_STRING_H
+ # Code from module sys_select:
gl_HEADER_SYS_SELECT
AC_PROG_MKDIR_P
+ # Code from module sys_socket:
gl_HEADER_SYS_SOCKET
AC_PROG_MKDIR_P
+ # Code from module sys_stat:
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
+ # Code from module sys_time:
gl_HEADER_SYS_TIME_H
AC_PROG_MKDIR_P
+ # Code from module time:
gl_HEADER_TIME_H
+ # Code from module timespec:
gl_TIMESPEC
+ # Code from module unistd:
gl_UNISTD_H
+ # Code from module update-copyright:
+ # Code from module useless-if-before-free:
+ # Code from module vasnprintf:
gl_FUNC_VASNPRINTF
+ # Code from module vc-list-files:
+ # Code from module version-etc:
gl_VERSION_ETC
+ # Code from module version-etc-fsf:
+ # Code from module warn-on-use:
+ # Code from module warnings:
AC_SUBST([WARN_CFLAGS])
+ # Code from module wchar:
gl_WCHAR_H
+ # Code from module xsize:
gl_XSIZE
+ # End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
for gl_file in ]gl_LIBSOURCES_LIST[ ; do
@@ -241,9 +465,16 @@ AC_SUBST([LTALLOCA])
m4_pushdef([gltests_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='gl/tests'
+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_UNGETC_WORKS
AC_C_BIGENDIAN
AC_C_BIGENDIAN
+ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
dnl Even if the 'socket' module is not used here, another part of the
@@ -251,9 +482,28 @@ AC_SUBST([LTALLOCA])
dnl sockets to the ioctl() function. So enable the support for sockets.
AC_LIBOBJ([ioctl])
gl_REPLACE_SYS_IOCTL_H
+ else
+ AC_CHECK_FUNCS([ioctl])
+ dnl On glibc systems, the second parameter is 'unsigned long int request',
+ dnl not 'int request'. We cannot simply cast the function pointer, but
+ dnl instead need a wrapper.
+ AC_CACHE_CHECK([for ioctl with POSIX signature],
+ [gl_cv_func_ioctl_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/ioctl.h>]],
+ [[extern int ioctl (int, int, ...);]])
+ ],
+ [gl_cv_func_ioctl_posix_signature=yes],
+ [gl_cv_func_ioctl_posix_signature=no])
+ ])
+ if test $gl_cv_func_ioctl_posix_signature != yes; then
+ REPLACE_IOCTL=1
+ AC_LIBOBJ([ioctl])
+ gl_REPLACE_SYS_IOCTL_H
+ fi
fi
gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
- gl_MODULE_INDICATOR([ioctl])
AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
gt_TYPE_WCHAR_T
gt_TYPE_WINT_T
@@ -264,6 +514,7 @@ AC_SUBST([LTALLOCA])
AC_SUBST([abs_aux_dir])
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
AC_SUBST([abs_aux_dir])
+ 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
@@ -356,6 +607,7 @@ AC_DEFUN([gltests_LIBSOURCES], [
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
build-aux/arg-nonnull.h
+ build-aux/c++defs.h
build-aux/config.rpath
build-aux/gendocs.sh
build-aux/gnupload
@@ -527,7 +779,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/version-etc.m4
m4/warn-on-use.m4
m4/warnings.m4
- m4/wchar.m4
+ m4/wchar_h.m4
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 20e8d7c52e..a6d219c208 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,10 +1,10 @@
-# inet_ntop.m4 serial 11
+# inet_ntop.m4 serial 12
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.
-AC_DEFUN([gl_INET_NTOP],
+AC_DEFUN([gl_FUNC_INET_NTOP],
[
dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index e0b794242f..193f17d0a3 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,10 +1,10 @@
-# inet_pton.m4 serial 9
+# inet_pton.m4 serial 10
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.
-AC_DEFUN([gl_INET_PTON],
+AC_DEFUN([gl_FUNC_INET_PTON],
[
dnl Persuade Solaris <arpa/inet.h> to declare inet_pton.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index f3084957c1..9bf4dc2d04 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,4 +1,4 @@
-# lseek.m4 serial 4
+# lseek.m4 serial 5
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,
@@ -21,7 +21,8 @@ int main ()
}],
[if test -s conftest$ac_exeext \
&& ./conftest$ac_exeext < conftest.$ac_ext \
- && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
gl_cv_func_lseek_pipe=yes
else
gl_cv_func_lseek_pipe=no
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index 84afce6e5e..40ba8f6633 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,4 +1,4 @@
-# netdb_h.m4 serial 6
+# netdb_h.m4 serial 7
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,
@@ -31,7 +31,7 @@ AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
- GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
])
AC_DEFUN([gl_NETDB_H_DEFAULTS],
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index c8572de947..c3ae569431 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/stdio_h.m4 b/gl/m4/stdio_h.m4
index 781fa8d388..af56b1f9da 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 25
+# stdio_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,
@@ -44,7 +44,9 @@ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_STDIO_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_FOR_TESTS([$1])
])
AC_DEFUN([gl_STDIO_H_DEFAULTS],
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 0693d1a5ec..4c5cca89ab 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 22
+# 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,
@@ -33,16 +33,19 @@ AC_DEFUN([gl_STDLIB_H],
#if HAVE_RANDOM_H
# include <random.h>
#endif
- ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp
- mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r
- setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv])
+ ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
+ mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
+ setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
+ unsetenv])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
[
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_FOR_TESTS([$1])
])
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
@@ -52,12 +55,14 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+ GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT])
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
+ GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -67,6 +72,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
+ GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
@@ -74,11 +80,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
+ HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
@@ -89,6 +97,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
+ HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 73c6d83378..9ceeea986a 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 11
+# serial 13
# Written by Paul Eggert.
@@ -34,7 +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_FOR_TESTS([$1])
])
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 829dc610dc..f6face2574 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,4 +1,4 @@
-# sys_ioctl_h.m4 serial 5
+# sys_ioctl_h.m4 serial 8
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,
@@ -55,7 +55,9 @@ AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_SYS_IOCTL_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_FOR_TESTS([$1])
])
AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS],
@@ -65,4 +67,5 @@ 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])
+ REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL])
])
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index 590554a11f..95e7818fd8 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,4 +1,4 @@
-# sys_select_h.m4 serial 11
+# sys_select_h.m4 serial 14
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,6 +46,7 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
fi
])
AC_CHECK_HEADERS_ONCE([sys/select.h])
+ dnl <sys/select.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([sys/select.h])
if test $ac_cv_header_sys_select_h = yes; then
HAVE_SYS_SELECT_H=1
@@ -53,9 +54,7 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
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
+ gl_PREREQ_SYS_H_WINSOCK2
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
@@ -73,7 +72,9 @@ AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_SYS_SELECT_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_FOR_TESTS([$1])
])
AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS],
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 1d47656027..9f4db56230 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 14
+# sys_socket_h.m4 serial 17
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,
@@ -19,7 +19,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
[gl_cv_header_sys_socket_h_selfcontained=no])
])
if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
- SYS_SOCKET_H=''
dnl If the shutdown function exists, <sys/socket.h> should define
dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
AC_CHECK_FUNCS([shutdown])
@@ -37,8 +36,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
SYS_SOCKET_H='sys/socket.h'
fi
fi
- else
- SYS_SOCKET_H='sys/socket.h'
fi
# We need to check for ws2tcpip.h now.
gl_PREREQ_SYS_H_SOCKET
@@ -56,16 +53,11 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
])
if test $ac_cv_type_struct_sockaddr_storage = no; then
HAVE_STRUCT_SOCKADDR_STORAGE=0
- SYS_SOCKET_H='sys/socket.h'
fi
if test $ac_cv_type_sa_family_t = no; then
HAVE_SA_FAMILY_T=0
- SYS_SOCKET_H='sys/socket.h'
- fi
- if test -n "$SYS_SOCKET_H"; then
- gl_PREREQ_SYS_H_WINSOCK2
fi
- AC_SUBST([SYS_SOCKET_H])
+ gl_PREREQ_SYS_H_WINSOCK2
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
@@ -133,7 +125,9 @@ AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_SYS_SOCKET_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_FOR_TESTS([$1])
])
AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 5a113d02ea..7181c253b9 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 22 -*- 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,7 +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_FOR_TESTS([$1])
])
AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index b14bc4ba2b..da57527163 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,5 +1,5 @@
# Configure a replacement for <sys/time.h>.
-# serial 3
+# serial 6
# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -56,13 +56,16 @@ AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_HEADER_SYS_TIME_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_FOR_TESTS([$1])
])
AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
[
GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY])
dnl Assume POSIX behavior unless another module says otherwise.
+ HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index c00bfae922..f2e54f2a94 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -23,18 +23,6 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
])
-AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
-[
- dnl If another module says to replace or to not replace, do that.
- dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
- dnl this lets maintainers check for portability.
- REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
- REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
- REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
- REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
- REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
-])
-
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
dnl in time.h or sys/time.h.
@@ -72,3 +60,29 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
])
+
+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])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+ GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME])
+ GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP])
+ GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
+ GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
+ GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
+ dnl If another module says to replace or to not replace, do that.
+ dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+ dnl this lets maintainers check for portability.
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
+ REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
+ REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 31d31c1e93..789739dffa 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 39
+# 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,
@@ -39,14 +39,16 @@ AC_DEFUN([gl_UNISTD_H],
fsync ftruncate getcwd getdomainname getdtablesize getgroups
gethostname getlogin getlogin_r getpagesize getusershell setusershell
endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
- rmdir sleep symlink symlinkat unlink unlinkat usleep])
+ rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
[
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_FOR_TESTS([$1])
])
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
@@ -83,6 +85,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
@@ -104,7 +107,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
- HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL])
HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
@@ -115,12 +117,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
+ HAVE_TTYNAME_R=1; AC_SUBST([HAVE_TTYNAME_R])
+ HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
+ HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
- HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
- HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index ab46422bab..42daae87b8 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,4 +1,4 @@
-# warn-on-use.m4 serial 1
+# warn-on-use.m4 serial 2
dnl Copyright (C) 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,
@@ -30,12 +30,12 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
for gl_func in m4_flatten([$2]); do
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
- [gl_Symbol],
+ gl_Symbol,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
[@%:@undef $gl_func
(void) $gl_func;])],
- [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
- AS_VAR_IF([gl_Symbol], [yes],
+ [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+ AS_VAR_IF(gl_Symbol, [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
dnl shortcut - if the raw declaration exists, then set a cache
dnl variable to allow skipping any later AC_CHECK_DECL efforts
diff --git a/gl/m4/wchar.m4 b/gl/m4/wchar.m4
deleted file mode 100644
index e81485d01e..0000000000
--- a/gl/m4/wchar.m4
+++ /dev/null
@@ -1,150 +0,0 @@
-dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-
-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 31
-
-AC_DEFUN([gl_WCHAR_H],
-[
- AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
- 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
- HAVE_WINT_T=1
- else
- HAVE_WINT_T=0
- fi
- AC_SUBST([HAVE_WINT_T])
-
- dnl Check for declarations of anything we want to poison if the
- dnl corresponding gnulib module is not in use.
- gl_WARN_ON_USE_PREPARE([[
-/* 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 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
-])
-
-dnl Unconditionally enables the replacement of <wchar.h>.
-AC_DEFUN([gl_REPLACE_WCHAR_H],
-[
- dnl This is a no-op, because <wchar.h> is always overridden.
- :
-])
-
-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
-])
-
-AC_DEFUN([gl_WCHAR_H_DEFAULTS],
-[
- GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
- GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
- GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
- GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
- GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
- GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
- GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
- GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
- GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
- GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
- GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
- HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
- HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
- HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
- HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
- HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
- HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
- HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
- HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
- HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
- HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
- REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
- REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
- REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
- REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
- REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
- REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
- REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
- REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
- REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
- REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
- REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
- REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
-])