From d1a73882fc992d3184bec3a4ccd57b52d95a7458 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 24 Dec 2009 12:06:48 -0700 Subject: [PATCH] link-warning: always build headers with link warnings Replacement headers must be built unconditionally if they use GL_LINK_WARNING, if the warning is to ever trigger on a glibc system during CFLAGS=-DGNULIB_POSIXCHECK. * modules/arpa_inet (Makefile.am): Always build replacement header. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/inttypes (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/sys_file (Makefile.am): Likewise. * modules/sys_ioctl (Makefile.am): Likewise. * modules/sys_select (Makefile.am): Likewise. * modules/sys_socket (Makefile.am): Likewise. * modules/sys_times (Makefile.am): Likewise. * modules/sys_utsname (Makefile.am): Likewise. * modules/sys_wait (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET) (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable. * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise. * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise. * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS): Likewise. * m4/inttypes.m4 (gl_INTTYPES_H): Likewise. * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise. * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS): Likewise. * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS): Likewise. * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise. * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H) (gl_SYS_IOCTL_H_DEFAULTS): Likewise. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H) (gl_SYS_UTSNAME_H_DEFAULTS): Likewise. * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H) (gl_WCHAR_H_DEFAULTS): Likewise. --- ChangeLog | 43 ++++++++++++- m4/arpa_inet_h.m4 | 6 +- m4/ctype.m4 | 3 +- m4/dirent_h.m4 | 5 +- m4/inttypes.m4 | 169 +++++++++++++++++++++++++--------------------------- m4/isblank.m4 | 3 +- m4/langinfo_h.m4 | 9 +-- m4/locale_h.m4 | 5 +- m4/spawn_h.m4 | 5 +- m4/sys_file_h.m4 | 4 +- m4/sys_ioctl_h.m4 | 9 +-- m4/sys_select_h.m4 | 20 +++---- m4/sys_times_h.m4 | 5 +- m4/sys_utsname_h.m4 | 3 +- m4/sys_wait_h.m4 | 4 +- m4/wchar.m4 | 9 +-- modules/arpa_inet | 2 +- modules/ctype | 2 +- modules/dirent | 2 +- modules/inttypes | 2 +- modules/langinfo | 2 +- modules/locale | 2 +- modules/spawn | 2 +- modules/sys_file | 2 +- modules/sys_ioctl | 2 +- modules/sys_select | 2 +- modules/sys_socket | 2 +- modules/sys_times | 2 +- modules/sys_utsname | 2 +- modules/sys_wait | 2 +- modules/wchar | 2 +- 31 files changed, 164 insertions(+), 168 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed0bbb1f6..d1e62344f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,46 @@ 2009-12-31 Eric Blake + link-warning: always build headers with link warnings + * modules/arpa_inet (Makefile.am): Always build replacement + header. + * modules/ctype (Makefile.am): Likewise. + * modules/dirent (Makefile.am): Likewise. + * modules/inttypes (Makefile.am): Likewise. + * modules/langinfo (Makefile.am): Likewise. + * modules/locale (Makefile.am): Likewise. + * modules/spawn (Makefile.am): Likewise. + * modules/sys_file (Makefile.am): Likewise. + * modules/sys_ioctl (Makefile.am): Likewise. + * modules/sys_select (Makefile.am): Likewise. + * modules/sys_socket (Makefile.am): Likewise. + * modules/sys_times (Makefile.am): Likewise. + * modules/sys_utsname (Makefile.am): Likewise. + * modules/sys_wait (Makefile.am): Likewise. + * modules/wchar (Makefile.am): Likewise. + * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET) + (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable. + * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise. + * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise. + * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS): + Likewise. + * m4/inttypes.m4 (gl_INTTYPES_H): Likewise. + * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise. + * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS): + Likewise. + * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS): + Likewise. + * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise. + * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H) + (gl_SYS_IOCTL_H_DEFAULTS): Likewise. + * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. + * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. + * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H) + (gl_SYS_UTSNAME_H_DEFAULTS): Likewise. + * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H) + (gl_WCHAR_H_DEFAULTS): Likewise. + +2009-12-31 Eric Blake + signal, spawn: use link warnings * lib/signal.in.h (sigset_t): Make unconditional. (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset) @@ -19,8 +60,6 @@ * m4/signal_h.m4 (gl_SIGNAL_H): Guarantee uid_t. * tests/test-signal.c (main): Enhance test. -2009-12-31 Eric Blake - spawn: improve wrapper support * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence. (gl_SPAWN_H_DEFAULTS): New defaults. diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4 index c97b1a8aa..84f3e571d 100644 --- a/m4/arpa_inet_h.m4 +++ b/m4/arpa_inet_h.m4 @@ -1,4 +1,4 @@ -# arpa_inet_h.m4 serial 5 +# arpa_inet_h.m4 serial 6 dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,6 @@ 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]) @@ -29,7 +28,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_ARPA_INET_H], [ AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) - ARPA_INET_H='arpa/inet.h' + : ]) AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], @@ -46,5 +45,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/m4/ctype.m4 b/m4/ctype.m4 index 51e5333f6..b25c62b3f 100644 --- a/m4/ctype.m4 +++ b/m4/ctype.m4 @@ -1,4 +1,4 @@ -# ctype_h.m4 serial 1 +# ctype_h.m4 serial 2 dnl Copyright (C) 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -24,5 +24,4 @@ AC_DEFUN([gl_CTYPE_H_DEFAULTS], GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK]) - CTYPE_H=''; AC_SUBST([CTYPE_H]) ]) diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4 index 481212bb3..54dea8e47 100644 --- a/m4/dirent_h.m4 +++ b/m4/dirent_h.m4 @@ -1,4 +1,4 @@ -# dirent_h.m4 serial 7 +# dirent_h.m4 serial 8 dnl Copyright (C) 2008-2009 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,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_DIRENT_H], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - DIRENT_H='dirent.h' + : ]) AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], @@ -46,5 +46,4 @@ AC_DEFUN([gl_DIRENT_H_DEFAULTS], REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) - DIRENT_H=''; AC_SUBST([DIRENT_H]) ]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index e1c656d14..45bbac8cc 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 14 +# inttypes.m4 serial 15 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -136,25 +136,20 @@ const char *l = /* implicit string concatenation */ fi]) dnl Override always, so that the portability warnings work. - if false && test $gl_cv_header_working_inttypes_h = yes; then - dnl Use the existing . - INTTYPES_H='' - else - - AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([inttypes.h]) + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([inttypes.h]) - AC_REQUIRE([gl_MULTIARCH]) + AC_REQUIRE([gl_MULTIARCH]) - dnl Ensure that defines the limit macros, since gnulib's - dnl relies on them. This macro is only needed when a - dnl C++ compiler is in use; it has no effect for a C compiler. - dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's - dnl is going to be created, and to avoid redefinition warnings - dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. - AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], - [Define to make the limit macros in visible.]) - AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], + dnl Ensure that defines the limit macros, since gnulib's + dnl relies on them. This macro is only needed when a + dnl C++ compiler is in use; it has no effect for a C compiler. + dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's + dnl is going to be created, and to avoid redefinition warnings + dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. + AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], + [Define to make the limit macros in visible.]) + AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], [/* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS @@ -162,85 +157,81 @@ const char *l = /* implicit string concatenation */ #endif ]) - PRIPTR_PREFIX= - if test -n "$STDINT_H"; then - dnl Using the gnulib . It always defines intptr_t to 'long'. - PRIPTR_PREFIX='"l"' - else - dnl Using the system's . - for glpfx in '' l ll I64; do - case $glpfx in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - I64) gltype1='__int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include - extern intptr_t foo; - extern $gltype1 foo;]])], - [PRIPTR_PREFIX='"'$glpfx'"']) - test -n "$PRIPTR_PREFIX" && break - done - fi - AC_SUBST([PRIPTR_PREFIX]) + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + dnl Using the gnulib . It always defines intptr_t to 'long'. + PRIPTR_PREFIX='"l"' + else + dnl Using the system's . + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + extern intptr_t foo; + extern $gltype1 foo;]])], + [PRIPTR_PREFIX='"'$glpfx'"']) + test -n "$PRIPTR_PREFIX" && break + done + fi + AC_SUBST([PRIPTR_PREFIX]) - if test "$ac_cv_have_decl_imaxabs" = yes; then - HAVE_DECL_IMAXABS=1 - else - HAVE_DECL_IMAXABS=0 - fi + if test "$ac_cv_have_decl_imaxabs" = yes; then + HAVE_DECL_IMAXABS=1 + else + HAVE_DECL_IMAXABS=0 + fi - if test "$ac_cv_have_decl_imaxdiv" = yes; then - HAVE_DECL_IMAXDIV=1 - else - HAVE_DECL_IMAXDIV=0 - fi + if test "$ac_cv_have_decl_imaxdiv" = yes; then + HAVE_DECL_IMAXDIV=1 + else + HAVE_DECL_IMAXDIV=0 + fi - if test "$ac_cv_have_decl_strtoimax" = yes; then - HAVE_DECL_STRTOIMAX=1 - else - HAVE_DECL_STRTOIMAX=0 - fi + if test "$ac_cv_have_decl_strtoimax" = yes; then + HAVE_DECL_STRTOIMAX=1 + else + HAVE_DECL_STRTOIMAX=0 + fi - if test "$ac_cv_have_decl_strtoumax" = yes; then - HAVE_DECL_STRTOUMAX=1 - else - HAVE_DECL_STRTOUMAX=0 - fi + if test "$ac_cv_have_decl_strtoumax" = yes; then + HAVE_DECL_STRTOUMAX=1 + else + HAVE_DECL_STRTOUMAX=0 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT32_MAX_LT_INTMAX_MAX], + [defined INT32_MAX && defined INTMAX_MAX], + [INT32_MAX < INTMAX_MAX], + [sizeof (int) < sizeof (long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [INT32_MAX_LT_INTMAX_MAX], - [defined INT32_MAX && defined INTMAX_MAX], - [INT32_MAX < INTMAX_MAX], - [sizeof (int) < sizeof (long long int)]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [INT64_MAX_EQ_LONG_MAX], - [defined INT64_MAX], - [INT64_MAX == LONG_MAX], - [sizeof (long long int) == sizeof (long int)]) - else - INT64_MAX_EQ_LONG_MAX=-1 - fi + [INT64_MAX_EQ_LONG_MAX], + [defined INT64_MAX], + [INT64_MAX == LONG_MAX], + [sizeof (long long int) == sizeof (long int)]) + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT32_MAX_LT_UINTMAX_MAX], + [defined UINT32_MAX && defined UINTMAX_MAX], + [UINT32_MAX < UINTMAX_MAX], + [sizeof (unsigned int) < sizeof (unsigned long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [UINT32_MAX_LT_UINTMAX_MAX], - [defined UINT32_MAX && defined UINTMAX_MAX], - [UINT32_MAX < UINTMAX_MAX], - [sizeof (unsigned int) < sizeof (unsigned long long int)]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [UINT64_MAX_EQ_ULONG_MAX], - [defined UINT64_MAX], - [UINT64_MAX == ULONG_MAX], - [sizeof (unsigned long long int) == sizeof (unsigned long int)]) - else - UINT64_MAX_EQ_ULONG_MAX=-1 - fi - - INTTYPES_H='inttypes.h' + [UINT64_MAX_EQ_ULONG_MAX], + [defined UINT64_MAX], + [UINT64_MAX == ULONG_MAX], + [sizeof (unsigned long long int) == sizeof (unsigned long int)]) + else + UINT64_MAX_EQ_ULONG_MAX=-1 fi - AC_SUBST([INTTYPES_H]) ]) # Define the symbol $1 to be 1 if the condition is true, 0 otherwise. diff --git a/m4/isblank.m4 b/m4/isblank.m4 index 37f1a75a5..890c2fd4e 100644 --- a/m4/isblank.m4 +++ b/m4/isblank.m4 @@ -1,4 +1,4 @@ -# isblank.m4 serial 1 +# isblank.m4 serial 2 dnl Copyright (C) 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,6 @@ AC_DEFUN([gl_FUNC_ISBLANK], AC_CHECK_FUNCS_ONCE([isblank]) if test $ac_cv_func_isblank = no; then HAVE_ISBLANK=0 - CTYPE_H='ctype.h' AC_LIBOBJ([isblank]) fi ]) diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4 index 4975734cb..4ea23a4ac 100644 --- a/m4/langinfo_h.m4 +++ b/m4/langinfo_h.m4 @@ -1,4 +1,4 @@ -# langinfo_h.m4 serial 1 +# langinfo_h.m4 serial 2 dnl Copyright (C) 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -51,13 +51,6 @@ int a = ERA; AC_SUBST([HAVE_LANGINFO_H]) AC_SUBST([HAVE_LANGINFO_CODESET]) AC_SUBST([HAVE_LANGINFO_ERA]) - - if test $HAVE_LANGINFO_H = 1 && test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then - LANGINFO_H= - else - LANGINFO_H='langinfo.h' - fi - AC_SUBST([LANGINFO_H]) ]) AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], diff --git a/m4/locale_h.m4 b/m4/locale_h.m4 index 35b8b322f..9228118b5 100644 --- a/m4/locale_h.m4 +++ b/m4/locale_h.m4 @@ -1,4 +1,4 @@ -# locale_h.m4 serial 5 +# locale_h.m4 serial 6 dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -63,7 +63,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_LOCALE_H], [ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - LOCALE_H=locale.h + : ]) AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], @@ -78,5 +78,4 @@ AC_DEFUN([gl_LOCALE_H_DEFAULTS], GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) - LOCALE_H=''; AC_SUBST([LOCALE_H]) ]) diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4 index a369c2731..5b4b214d2 100644 --- a/m4/spawn_h.m4 +++ b/m4/spawn_h.m4 @@ -1,4 +1,4 @@ -# spawn_h.m4 serial 4 +# spawn_h.m4 serial 5 dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,7 +41,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_SPAWN_H], [ AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) - SPAWN_H='spawn.h' + : ]) AC_DEFUN([gl_SPAWN_MODULE_INDICATOR], @@ -80,5 +80,4 @@ AC_DEFUN([gl_SPAWN_H_DEFAULTS], HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1; AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T]) REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN]) - SPAWN_H=''; AC_SUBST([SPAWN_H]) ]) diff --git a/m4/sys_file_h.m4 b/m4/sys_file_h.m4 index f24de0bf4..419dda843 100644 --- a/m4/sys_file_h.m4 +++ b/m4/sys_file_h.m4 @@ -7,6 +7,8 @@ # Written by Richard W.M. Jones. +# serial 2 + AC_DEFUN([gl_HEADER_SYS_FILE_H], [ AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS]) @@ -16,8 +18,6 @@ AC_DEFUN([gl_HEADER_SYS_FILE_H], AC_CHECK_FUNCS_ONCE([flock]) gl_CHECK_NEXT_HEADERS([sys/file.h]) - SYS_FILE_H='sys/file.h' - AC_SUBST([SYS_FILE_H]) AC_CHECK_HEADERS_ONCE([sys/file.h]) if test $ac_cv_header_sys_file_h = yes; then diff --git a/m4/sys_ioctl_h.m4 b/m4/sys_ioctl_h.m4 index 22aa83ee5..1de3b4429 100644 --- a/m4/sys_ioctl_h.m4 +++ b/m4/sys_ioctl_h.m4 @@ -1,4 +1,4 @@ -# sys_ioctl_h.m4 serial 3 +# sys_ioctl_h.m4 serial 4 dnl Copyright (C) 2008-2009 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,12 +27,8 @@ 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 @@ -44,7 +40,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_SYS_IOCTL_H], [ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) - SYS_IOCTL_H='sys/ioctl.h' + : ]) AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR], @@ -61,5 +57,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/m4/sys_select_h.m4 b/m4/sys_select_h.m4 index 991c7b742..a652dac83 100644 --- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -1,4 +1,4 @@ -# sys_select_h.m4 serial 8 +# sys_select_h.m4 serial 9 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -45,20 +45,16 @@ AC_DEFUN([gl_HEADER_SYS_SELECT], ]) fi ]) - if test $gl_cv_header_sys_select_h_selfcontained = yes; then - 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]) + gl_CHECK_NEXT_HEADERS([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]) ]) AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], diff --git a/m4/sys_times_h.m4 b/m4/sys_times_h.m4 index 2fe9f24c1..1389d2b79 100644 --- a/m4/sys_times_h.m4 +++ b/m4/sys_times_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for . -# serial 2 +# serial 3 # Copyright (C) 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -15,17 +15,14 @@ AC_DEFUN([gl_SYS_TIMES_H], gl_CHECK_NEXT_HEADERS([sys/times.h]) AC_CHECK_HEADERS_ONCE([sys/times.h]) if test $ac_cv_header_sys_times_h = yes; then - SYS_TIMES_H= HAVE_SYS_TIMES_H=1 AC_CHECK_TYPES([struct tms], [], [HAVE_STRUCT_TMS=0], [[ #include ]]) else - SYS_TIMES_H=sys/times.h HAVE_SYS_TIMES_H=0 HAVE_STRUCT_TMS=0 fi - AC_SUBST([SYS_TIMES_H]) AC_SUBST([HAVE_SYS_TIMES_H]) ]) diff --git a/m4/sys_utsname_h.m4 b/m4/sys_utsname_h.m4 index 84b781f85..33f28954b 100644 --- a/m4/sys_utsname_h.m4 +++ b/m4/sys_utsname_h.m4 @@ -1,4 +1,4 @@ -# sys_utsname_h.m4 serial 2 +# sys_utsname_h.m4 serial 3 dnl Copyright (C) 2009 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,7 +15,6 @@ AC_DEFUN([gl_SYS_UTSNAME_H], gl_CHECK_NEXT_HEADERS([sys/utsname.h]) AC_CHECK_HEADERS_ONCE([sys/utsname.h]) if test $ac_cv_header_sys_utsname_h != yes; then - SYS_UTSNAME_H='sys/utsname.h' HAVE_SYS_UTSNAME_H=0 HAVE_STRUCT_UTSNAME=0 else diff --git a/m4/sys_wait_h.m4 b/m4/sys_wait_h.m4 index 8fb099a11..999da1c83 100644 --- a/m4/sys_wait_h.m4 +++ b/m4/sys_wait_h.m4 @@ -1,4 +1,4 @@ -# sys_wait_h.m4 serial 1 +# sys_wait_h.m4 serial 2 dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,8 +9,6 @@ AC_DEFUN([gl_SYS_WAIT_H], AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([sys/wait.h]) - SYS_WAIT_H='sys/wait.h' - AC_SUBST([SYS_WAIT_H]) ]) AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR], diff --git a/m4/wchar.m4 b/m4/wchar.m4 index ad19376f3..daf532ae7 100644 --- a/m4/wchar.m4 +++ b/m4/wchar.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar.m4 serial 27 +# wchar.m4 serial 28 AC_DEFUN([gl_WCHAR_H], [ @@ -31,10 +31,6 @@ wchar_t w;]], dnl If is replaced, then 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 Prepare for creating substitute . dnl Do it always: WCHAR_H may be empty here but can be set later. dnl Check for (missing in Linux uClibc when built without wide @@ -103,7 +99,7 @@ dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - WCHAR_H=wchar.h + : ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], @@ -150,5 +146,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/modules/arpa_inet b/modules/arpa_inet index e76c7e47f..27eccc3ee 100644 --- a/modules/arpa_inet +++ b/modules/arpa_inet @@ -16,7 +16,7 @@ gl_HEADER_ARPA_INET AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(ARPA_INET_H) +BUILT_SOURCES += arpa/inet.h # We need the following in order to create when the system # doesn't have one. diff --git a/modules/ctype b/modules/ctype index e89681400..8847f2cc1 100644 --- a/modules/ctype +++ b/modules/ctype @@ -13,7 +13,7 @@ configure.ac: gl_CTYPE_H Makefile.am: -BUILT_SOURCES += $(CTYPE_H) +BUILT_SOURCES += ctype.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/dirent b/modules/dirent index aed61e4cc..5a92d5da5 100644 --- a/modules/dirent +++ b/modules/dirent @@ -15,7 +15,7 @@ configure.ac: gl_DIRENT_H Makefile.am: -BUILT_SOURCES += $(DIRENT_H) +BUILT_SOURCES += dirent.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/inttypes b/modules/inttypes index 7a49b77e6..743add467 100644 --- a/modules/inttypes +++ b/modules/inttypes @@ -17,7 +17,7 @@ configure.ac: gl_INTTYPES_H Makefile.am: -BUILT_SOURCES += $(INTTYPES_H) +BUILT_SOURCES += inttypes.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/langinfo b/modules/langinfo index fb413d0e1..cc717790b 100644 --- a/modules/langinfo +++ b/modules/langinfo @@ -14,7 +14,7 @@ configure.ac: gl_LANGINFO_H Makefile.am: -BUILT_SOURCES += $(LANGINFO_H) +BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. diff --git a/modules/locale b/modules/locale index 2541300e5..75d1eaf94 100644 --- a/modules/locale +++ b/modules/locale @@ -16,7 +16,7 @@ configure.ac: gl_LOCALE_H Makefile.am: -BUILT_SOURCES += $(LOCALE_H) +BUILT_SOURCES += locale.h # We need the following in order to create when the system # doesn't have one that provides all definitions. diff --git a/modules/spawn b/modules/spawn index 18821520b..8a80bbf59 100644 --- a/modules/spawn +++ b/modules/spawn @@ -15,7 +15,7 @@ configure.ac: gl_SPAWN_H Makefile.am: -BUILT_SOURCES += $(SPAWN_H) +BUILT_SOURCES += spawn.h # We need the following in order to create a replacement for when # the system doesn't have one. diff --git a/modules/sys_file b/modules/sys_file index 61c620234..5cbd9f083 100644 --- a/modules/sys_file +++ b/modules/sys_file @@ -14,7 +14,7 @@ gl_HEADER_SYS_FILE_H AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_FILE_H) +BUILT_SOURCES += sys/file.h # We need the following in order to create when the system # has one that is incomplete. diff --git a/modules/sys_ioctl b/modules/sys_ioctl index 5ae8c8436..e1cce9638 100644 --- a/modules/sys_ioctl +++ b/modules/sys_ioctl @@ -15,7 +15,7 @@ gl_SYS_IOCTL_H AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_IOCTL_H) +BUILT_SOURCES += sys/ioctl.h # We need the following in order to create when the system # does not have a complete one. diff --git a/modules/sys_select b/modules/sys_select index 093e5e5e7..7ddcf8866 100644 --- a/modules/sys_select +++ b/modules/sys_select @@ -16,7 +16,7 @@ gl_HEADER_SYS_SELECT AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_SELECT_H) +BUILT_SOURCES += sys/select.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/sys_socket b/modules/sys_socket index b1b9ad27d..47408fed9 100644 --- a/modules/sys_socket +++ b/modules/sys_socket @@ -18,7 +18,7 @@ gl_HEADER_SYS_SOCKET AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_SOCKET_H) +BUILT_SOURCES += sys/socket.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/sys_times b/modules/sys_times index 8ccf5dab3..64683d96a 100644 --- a/modules/sys_times +++ b/modules/sys_times @@ -15,7 +15,7 @@ gl_SYS_TIMES_H AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_TIMES_H) +BUILT_SOURCES += sys/times.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. diff --git a/modules/sys_utsname b/modules/sys_utsname index cdb346803..ddb1d8e0c 100644 --- a/modules/sys_utsname +++ b/modules/sys_utsname @@ -15,7 +15,7 @@ gl_SYS_UTSNAME_H AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_UTSNAME_H) +BUILT_SOURCES += sys/utsname.h # We need the following in order to create when the system # does not have one. diff --git a/modules/sys_wait b/modules/sys_wait index 2a073d3e8..376b08c2c 100644 --- a/modules/sys_wait +++ b/modules/sys_wait @@ -13,7 +13,7 @@ gl_SYS_WAIT_H AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(SYS_WAIT_H) +BUILT_SOURCES += sys/wait.h # We need the following in order to create when the system # has one that is incomplete. diff --git a/modules/wchar b/modules/wchar index eb8615ca9..27194fc88 100644 --- a/modules/wchar +++ b/modules/wchar @@ -16,7 +16,7 @@ configure.ac: gl_WCHAR_H Makefile.am: -BUILT_SOURCES += $(WCHAR_H) +BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. -- 2.11.0