diff options
author | Simon Josefsson <simon@josefsson.org> | 2010-12-06 16:20:45 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2010-12-06 16:20:45 +0100 |
commit | 705bd41bc85effe81660de90acf10f65bb23977c (patch) | |
tree | 9f41b7bbe9b1f9416f94a46cfd995eb0db5c8774 /gl/m4 | |
parent | 3ec531a07ddfaddacdef08af6d49abc0eb8d8edd (diff) | |
download | gnutls-705bd41bc85effe81660de90acf10f65bb23977c.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/alloca.m4 | 6 | ||||
-rw-r--r-- | gl/m4/arpa_inet_h.m4 | 8 | ||||
-rw-r--r-- | gl/m4/getdelim.m4 | 4 | ||||
-rw-r--r-- | gl/m4/getline.m4 | 4 | ||||
-rw-r--r-- | gl/m4/getpass.m4 | 8 | ||||
-rw-r--r-- | gl/m4/gnulib-common.m4 | 15 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 3 | ||||
-rw-r--r-- | gl/m4/mmap-anon.m4 | 6 | ||||
-rw-r--r-- | gl/m4/printf.m4 | 26 | ||||
-rw-r--r-- | gl/m4/readline.m4 | 18 | ||||
-rw-r--r-- | gl/m4/string_h.m4 | 9 | ||||
-rw-r--r-- | gl/m4/sys_ioctl_h.m4 | 4 | ||||
-rw-r--r-- | gl/m4/sys_select_h.m4 | 4 | ||||
-rw-r--r-- | gl/m4/sys_socket_h.m4 | 26 | ||||
-rw-r--r-- | gl/m4/unistd_h.m4 | 7 | ||||
-rw-r--r-- | gl/m4/vasnprintf.m4 | 3 | ||||
-rw-r--r-- | gl/m4/wchar_h.m4 | 6 |
17 files changed, 100 insertions, 57 deletions
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4 index f3ee34380c..80d67aad77 100644 --- a/gl/m4/alloca.m4 +++ b/gl/m4/alloca.m4 @@ -1,4 +1,4 @@ -# alloca.m4 serial 9 +# alloca.m4 serial 10 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 index 15a30e2bca..80fdb406b6 100644 --- a/gl/m4/arpa_inet_h.m4 +++ b/gl/m4/arpa_inet_h.m4 @@ -1,5 +1,5 @@ -# arpa_inet_h.m4 serial 8 -dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc. +# arpa_inet_h.m4 serial 10 +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. @@ -22,11 +22,13 @@ AC_DEFUN([gl_HEADER_ARPA_INET], dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([arpa/inet.h]) + AC_REQUIRE([gl_FEATURES_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__ +#if !(defined __GLIBC__ || defined __UCLIBC__) # include <sys/socket.h> #endif #include <arpa/inet.h> diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4 index 4beb1501c2..2bbd5cff6e 100644 --- a/gl/m4/getdelim.m4 +++ b/gl/m4/getdelim.m4 @@ -1,4 +1,4 @@ -# getdelim.m4 serial 6 +# getdelim.m4 serial 7 dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc. dnl @@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_GETDELIM], [ #include <features.h> #ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 index 83005600d6..0f8e3134d9 100644 --- a/gl/m4/getline.m4 +++ b/gl/m4/getline.m4 @@ -1,4 +1,4 @@ -# getline.m4 serial 21 +# getline.m4 serial 22 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. @@ -65,7 +65,7 @@ AC_DEFUN([gl_FUNC_GETLINE], [ #include <features.h> #ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif diff --git a/gl/m4/getpass.m4 b/gl/m4/getpass.m4 index cb80a65c52..8072e46442 100644 --- a/gl/m4/getpass.m4 +++ b/gl/m4/getpass.m4 @@ -1,4 +1,4 @@ -# getpass.m4 serial 11 +# getpass.m4 serial 12 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -8,6 +8,9 @@ dnl with or without modifications, as long as this notice is preserved. # Provide a getpass() function if the system doesn't have it. AC_DEFUN([gl_FUNC_GETPASS], [ + dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REPLACE_FUNCS([getpass]) AC_CHECK_DECLS_ONCE([getpass]) if test $ac_cv_func_getpass = no; then @@ -19,6 +22,9 @@ AC_DEFUN([gl_FUNC_GETPASS], # arbitrary length (not just 8 bytes as on HP-UX). AC_DEFUN([gl_FUNC_GETPASS_GNU], [ + dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_DECLS_ONCE([getpass]) dnl TODO: Detect when GNU getpass() is already found in glibc. AC_LIBOBJ([getpass]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 4c7ac30d0f..d0c8b66287 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 20 +# gnulib-common.m4 serial 21 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, @@ -102,6 +102,19 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [Define to 1 when the gnulib module $1 should be tested.]) ]) +# Test whether <features.h> exists. +# Set HAVE_FEATURES_H. +AC_DEFUN([gl_FEATURES_H], +[ + AC_CHECK_HEADERS_ONCE([features.h]) + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 + fi + AC_SUBST([HAVE_FEATURES_H]) +]) + # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 201ec0f99a..56f86b804a 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -437,6 +437,7 @@ AC_SUBST([LTALLOCA]) # Code from module vasnprintf: gl_FUNC_VASNPRINTF # Code from module vc-list-files: + # Code from module verify: # Code from module version-etc: gl_VERSION_ETC # Code from module version-etc-fsf: @@ -705,6 +706,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/unistd.in.h lib/vasnprintf.c lib/vasnprintf.h + lib/verify.h lib/version-etc-fsf.c lib/version-etc.c lib/version-etc.h @@ -861,7 +863,6 @@ AC_DEFUN([gl_FILE_LIST], [ tests=lib/getpagesize.c tests=lib/ioctl.c tests=lib/sys_ioctl.in.h - tests=lib/verify.h tests=lib/w32sock.h top/GNUmakefile top/maint.mk diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4 index a6b7b9ac3b..e20fc3c670 100644 --- a/gl/m4/mmap-anon.m4 +++ b/gl/m4/mmap-anon.m4 @@ -1,4 +1,4 @@ -# mmap-anon.m4 serial 8 +# mmap-anon.m4 serial 9 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, @@ -15,10 +15,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MMAP_ANON], [ - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index e850862c01..b1ac37833e 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 35 +# printf.m4 serial 39 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, @@ -439,16 +439,9 @@ changequote(,)dnl # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on MacOS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";; - darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_infinite_long_double="guessing no";; - netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_printf_infinite_long_double="guessing no";; esac @@ -533,7 +526,7 @@ int main () AC_EGREP_CPP([BZ2908], [ #include <features.h> #ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2) + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ BZ2908 #endif #endif @@ -889,8 +882,9 @@ changequote([,])dnl dnl Test whether the *printf family of functions supports large precisions. dnl On mingw, precisions larger than 512 are treated like 512, in integer, -dnl floating-point or pointer output. On BeOS, precisions larger than 1044 -dnl crash the program. +dnl floating-point or pointer output. On Solaris 10/x86, precisions larger +dnl than 510 in floating-point output crash the program. On BeOS, precisions +dnl larger than 1044 crash the program. dnl Result is gl_cv_func_printf_precision. AC_DEFUN([gl_PRINTF_PRECISION], @@ -913,6 +907,8 @@ int main () #endif if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) return 1; + if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) + return 2; return 0; }]])], [gl_cv_func_printf_precision=yes], @@ -920,7 +916,8 @@ int main () [ changequote(,)dnl case "$host_os" in - # Guess no only on native Win32 and BeOS systems. + # Guess no only on Solaris, native Win32, and BeOS systems. + solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; *) gl_cv_func_printf_precision="guessing yes" ;; @@ -1439,12 +1436,14 @@ dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . +dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . . dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 10 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 11 2010-11 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # dnl AIX 5.2, 7.1 . . # # # . . . . . . # . . . . . . . . @@ -1455,6 +1454,7 @@ dnl HP-UX 10.20 # . # . # # . ? . . # # . . . dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # +dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . . . . . diff --git a/gl/m4/readline.m4 b/gl/m4/readline.m4 index 27f81629a5..7a97ecba91 100644 --- a/gl/m4/readline.m4 +++ b/gl/m4/readline.m4 @@ -1,4 +1,4 @@ -# readline.m4 serial 7 +# readline.m4 serial 8 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, @@ -40,7 +40,12 @@ AC_DEFUN([gl_FUNC_READLINE], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> #include <readline/readline.h>]], [[readline((char*)0);]])], - [gl_cv_lib_readline=" -l$extra_lib"]) + [if test -n "$extra_lib"; then + gl_cv_lib_readline="yes, requires -l$extra_lib" + else + gl_cv_lib_readline="yes" + fi + ]) if test "$gl_cv_lib_readline" != no; then break fi @@ -50,9 +55,10 @@ AC_DEFUN([gl_FUNC_READLINE], if test "$gl_cv_lib_readline" != no; then AC_DEFINE([HAVE_READLINE], [1], [Define if you have the readline library.]) - if test "$gl_cv_lib_readline" != " -l"; then - LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline" - LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline" + extra_lib=`echo "$gl_cv_lib_readline" | sed -n -e 's/yes, requires //p'` + if test -n "$extra_lib"; then + LIBREADLINE="$LIBREADLINE $extra_lib" + LTLIBREADLINE="$LTLIBREADLINE $extra_lib" fi AC_MSG_CHECKING([how to link with libreadline]) AC_MSG_RESULT([$LIBREADLINE]) @@ -68,7 +74,7 @@ AC_DEFUN([gl_FUNC_READLINE], AC_CHECK_HEADERS([readline/readline.h]) - if test $gl_cv_lib_readline = no; then + if test "$gl_cv_lib_readline" = no; then AC_LIBOBJ([readline]) gl_PREREQ_READLINE fi diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 index 1977aecf91..5844b2d660 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 17 +# serial 18 # Written by Paul Eggert. @@ -28,8 +28,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY], gl_WARN_ON_USE_PREPARE([[#include <string.h> ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup - strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal - strverscmp]) + strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r + strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], @@ -75,6 +75,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) + GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) @@ -94,6 +95,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 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_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) @@ -103,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) + REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4 index f6face2574..5c342a5b1d 100644 --- a/gl/m4/sys_ioctl_h.m4 +++ b/gl/m4/sys_ioctl_h.m4 @@ -1,4 +1,4 @@ -# sys_ioctl_h.m4 serial 8 +# sys_ioctl_h.m4 serial 9 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, @@ -38,7 +38,7 @@ AC_DEFUN([gl_SYS_IOCTL_H], 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__ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include <unistd.h> #endif ]], [ioctl]) diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4 index 95e7818fd8..0e8063ea97 100644 --- a/gl/m4/sys_select_h.m4 +++ b/gl/m4/sys_select_h.m4 @@ -1,4 +1,4 @@ -# sys_select_h.m4 serial 14 +# sys_select_h.m4 serial 15 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, @@ -61,7 +61,7 @@ AC_DEFUN([gl_HEADER_SYS_SELECT], gl_WARN_ON_USE_PREPARE([[ /* Some systems require prerequisite headers. */ #include <sys/types.h> -#if !defined __GLIBC__ && HAVE_SYS_TIME_H +#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H # include <sys/time.h> #endif #include <sys/select.h> diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 index 9f4db56230..c7627cb94e 100644 --- a/gl/m4/sys_socket_h.m4 +++ b/gl/m4/sys_socket_h.m4 @@ -1,4 +1,4 @@ -# sys_socket_h.m4 serial 17 +# sys_socket_h.m4 serial 20 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, @@ -57,6 +57,23 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], + [], + [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], + [#include <sys/types.h> + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> + #endif + #ifdef HAVE_WS2TCPIP_H + #include <ws2tcpip.h> + #endif + ]) + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi gl_PREREQ_SYS_H_WINSOCK2 dnl Check for declarations of anything we want to poison if the @@ -64,10 +81,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], 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> +#include <sys/socket.h> ]], [socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4]) ]) @@ -148,6 +162,8 @@ AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) ]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 48d06c7426..e2f7f2bf45 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 46 +# unistd_h.m4 serial 48 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, @@ -27,7 +27,7 @@ AC_DEFUN([gl_UNISTD_H], 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__ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include <fcntl.h> # include <stdio.h> # include <stdlib.h> @@ -104,7 +104,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) @@ -125,6 +124,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) @@ -136,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 index ebe3c52cde..9c04520242 100644 --- a/gl/m4/vasnprintf.m4 +++ b/gl/m4/vasnprintf.m4 @@ -1,4 +1,4 @@ -# vasnprintf.m4 serial 31 +# vasnprintf.m4 serial 32 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, @@ -40,6 +40,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS], # Prequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ + AC_REQUIRE([gl_FEATURES_H]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4 index 8cae82dd0b..8c8fad96df 100644 --- a/gl/m4/wchar_h.m4 +++ b/gl/m4/wchar_h.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar_h.m4 serial 33 +# wchar_h.m4 serial 35 AC_DEFUN([gl_WCHAR_H], [ @@ -26,6 +26,8 @@ AC_DEFUN([gl_WCHAR_H], fi AC_SUBST([HAVE_WCHAR_H]) + AC_REQUIRE([gl_FEATURES_H]) + AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 @@ -38,7 +40,7 @@ AC_DEFUN([gl_WCHAR_H], dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ /* Some systems require additional headers. */ -#ifndef __GLIBC__ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include <stddef.h> # include <stdio.h> # include <time.h> |