link-warning: always build headers with link warnings
authorEric Blake <ebb9@byu.net>
Thu, 24 Dec 2009 19:06:48 +0000 (12:06 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 31 Dec 2009 14:05:10 +0000 (07:05 -0700)
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.

31 files changed:
ChangeLog
m4/arpa_inet_h.m4
m4/ctype.m4
m4/dirent_h.m4
m4/inttypes.m4
m4/isblank.m4
m4/langinfo_h.m4
m4/locale_h.m4
m4/spawn_h.m4
m4/sys_file_h.m4
m4/sys_ioctl_h.m4
m4/sys_select_h.m4
m4/sys_times_h.m4
m4/sys_utsname_h.m4
m4/sys_wait_h.m4
m4/wchar.m4
modules/arpa_inet
modules/ctype
modules/dirent
modules/inttypes
modules/langinfo
modules/locale
modules/spawn
modules/sys_file
modules/sys_ioctl
modules/sys_select
modules/sys_socket
modules/sys_times
modules/sys_utsname
modules/sys_wait
modules/wchar

index ed0bbb1..d1e6234 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,46 @@
 2009-12-31  Eric Blake  <ebb9@byu.net>
 
+       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  <ebb9@byu.net>
+
        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  <ebb9@byu.net>
-
        spawn: improve wrapper support
        * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence.
        (gl_SPAWN_H_DEFAULTS): New defaults.
index c97b1a8..84f3e57 100644 (file)
@@ -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 <arpa/inet.h>.
 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])
 ])
index 51e5333..b25c62b 100644 (file)
@@ -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])
 ])
index 481212b..54dea8e 100644 (file)
@@ -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 <dirent.h>.
 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])
 ])
index e1c656d..45bbac8 100644 (file)
@@ -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 <inttypes.h> always, so that the portability warnings work.
-  if false && test $gl_cv_header_working_inttypes_h = yes; then
-    dnl Use the existing <inttypes.h>.
-    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 <stdint.h> defines the limit macros, since gnulib's
-    dnl <inttypes.h> 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 <inttypes.h> 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 <stdint.h> visible.])
-    AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+  dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+  dnl <inttypes.h> 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 <inttypes.h> 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 <stdint.h> visible.])
+  AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
 [/* Ensure that <stdint.h> defines the limit macros, since gnulib's
    <inttypes.h> 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 <stdint.h>. It always defines intptr_t to 'long'.
-      PRIPTR_PREFIX='"l"'
-    else
-      dnl Using the system's <stdint.h>.
-      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 <stdint.h>
-             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 <stdint.h>. It always defines intptr_t to 'long'.
+    PRIPTR_PREFIX='"l"'
+  else
+    dnl Using the system's <stdint.h>.
+    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 <stdint.h>
+           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.
index 37f1a75..890c2fd 100644 (file)
@@ -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
 ])
index 4975734..4ea23a4 100644 (file)
@@ -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],
index 35b8b32..9228118 100644 (file)
@@ -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 <locale.h>.
 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])
 ])
index a369c27..5b4b214 100644 (file)
@@ -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 <spawn.h>.
 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])
 ])
index f24de0b..419dda8 100644 (file)
@@ -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
index 22aa83e..1de3b44 100644 (file)
@@ -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 <sys/ioctl.h>.
 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])
 ])
index 991c7b7..a652dac 100644 (file)
@@ -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],
index 2fe9f24..1389d2b 100644 (file)
@@ -1,5 +1,5 @@
 # Configure a replacement for <sys/times.h>.
-# 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 <sys/times.h>
       ]])
   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])
 ])
 
index 84b781f..33f2895 100644 (file)
@@ -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
index 8fb099a..999da1c 100644 (file)
@@ -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],
index ad19376..daf532a 100644 (file)
@@ -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 <stddef.h> is replaced, then <wchar.h> must also be replaced.
   AC_REQUIRE([gl_STDDEF_H])
 
-  if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then
-    WCHAR_H=wchar.h
-  fi
-
   dnl Prepare for creating substitute <wchar.h>.
   dnl Do it always: WCHAR_H may be empty here but can be set later.
   dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
@@ -103,7 +99,7 @@ dnl Unconditionally enables the replacement of <wchar.h>.
 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])
 ])
index e76c7e4..27eccc3 100644 (file)
@@ -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 <arpa/inet.h> when the system
 # doesn't have one.
index e896814..8847f2c 100644 (file)
@@ -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 <ctype.h> when the system
 # doesn't have one that works with the given compiler.
index aed61e4..5a92d5d 100644 (file)
@@ -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 <dirent.h> when the system
 # doesn't have one that works with the given compiler.
index 7a49b77..743add4 100644 (file)
@@ -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 <inttypes.h> when the system
 # doesn't have one that works with the given compiler.
index fb413d0..cc71779 100644 (file)
@@ -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
 # <langinfo.h> when the system doesn't have one.
index 2541300..75d1eaf 100644 (file)
@@ -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 <locale.h> when the system
 # doesn't have one that provides all definitions.
index 1882152..8a80bbf 100644 (file)
@@ -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 <spawn.h> when
 # the system doesn't have one.
index 61c6202..5cbd9f0 100644 (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 <sys/file.h> when the system
 # has one that is incomplete.
index 5ae8c84..e1cce96 100644 (file)
@@ -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 <sys/ioctl.h> when the system
 # does not have a complete one.
index 093e5e5..7ddcf88 100644 (file)
@@ -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 <sys/select.h> when the system
 # doesn't have one that works with the given compiler.
index b1b9ad2..47408fe 100644 (file)
@@ -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 <sys/socket.h> when the system
 # doesn't have one that works with the given compiler.
index 8ccf5da..64683d9 100644 (file)
@@ -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 <sys/times.h> when the system
 # doesn't have one that works with the given compiler.
index cdb3468..ddb1d8e 100644 (file)
@@ -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 <sys/utsname.h> when the system
 # does not have one.
index 2a073d3..376b08c 100644 (file)
@@ -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 <sys/wait.h> when the system
 # has one that is incomplete.
index eb8615c..27194fc 100644 (file)
@@ -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 <wchar.h> when the system
 # version does not work standalone.