]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Stupid me :(
authorAkim Demaille <akim@epita.fr>
Tue, 12 Jun 2001 14:46:13 +0000 (14:46 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 12 Jun 2001 14:46:13 +0000 (14:46 +0000)
Reverse the patch incorrectly applied when adding prev-version.txt

16 files changed:
NEWS
acfunctions.m4
acgeneral.m4
acheaders.m4
aclang.m4
acspecific.m4
actypes.m4
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/functions.m4
lib/autoconf/general.m4
lib/autoconf/headers.m4
lib/autoconf/lang.m4
lib/autoconf/specific.m4
lib/autoconf/types.m4

diff --git a/NEWS b/NEWS
index 49e8069d7fc29227ff38e2625deb0f5e40f4aad3..10fdd6ba724b417efd88b523eea68bad0e6fa0ce 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,6 @@
 * Major changes in Autoconf 2.50a                       -*- outline -*-
 ** Default includes
-- Now include stdint.h.
-- sys/types.h and sys/stat.h are guarded.
+Now include stdint.h.
 
 ** Bug fixes
 - Mostly in the test suite.
@@ -9,12 +8,6 @@
 - configure accepts --prefix='' again.
 - AC_CHECK_LIB works properly when its first argument is not a
   literal.
-- HAVE_INTTYPES_H is defined only if not conflicting with previous
-  headers.
-
-** Generic macros
-- AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to
-  specify pre-includes.
 \f
 * Major changes in Autoconf 2.50
 
index 36056d8cad7eccb63d04cb3193c4a4aa8ebda689..c953750832c5bfd159d3be7ef68cb39fb5936481 100644 (file)
@@ -257,12 +257,8 @@ AC_DEFUN([AC_FUNC_CHOWN],
 [AC_REQUIRE([AC_TYPE_UID_T])dnl
 AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[#if SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
+#include <sys/stat.h>
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -306,9 +302,7 @@ AC_DEFUN([AC_FUNC_CLOSEDIR_VOID],
 AC_CACHE_CHECK([whether closedir returns void],
                [ac_cv_func_closedir_void],
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #include <$ac_header_dirent>
 
 int closedir ();
@@ -605,8 +599,7 @@ AC_CHECK_FUNC(getmntent,
 # AC_FUNC_GETPGRP
 # ---------------
 AC_DEFUN([AC_FUNC_GETPGRP],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
+[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 /*
  * If this system has a BSD-style getpgrp(),
@@ -615,9 +608,7 @@ AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
  * Snarfed from Chet Ramey's bash pgrp.c test program
  */
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 
 int     pid;
 int     pg1, pg2, pg3, pg4;
@@ -945,7 +936,7 @@ fi
 # AC_FUNC_MMAP
 # ------------
 AC_DEFUN([AC_FUNC_MMAP],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h stdlib.h unistd.h)
+[AC_CHECK_HEADERS(stdlib.h unistd.h)
 AC_CHECK_FUNCS(getpagesize)
 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
@@ -970,10 +961,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
    The main things grep needs to know about mmap are:
    * does it exist and is it safe to write into the mmap'd area
    * how to use it (BSD variants)  */
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 
@@ -985,9 +973,7 @@ char *malloc ();
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #if !HAVE_GETPAGESIZE
@@ -1129,17 +1115,14 @@ fi
 # function's arguments, and define those types in `SELECT_TYPE_ARG1',
 # `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'.
 AC_DEFUN([AC_FUNC_SELECT_ARGTYPES],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS(sys/types.h sys/select.h sys/socket.h)
+[AC_CHECK_HEADERS(sys/select.h sys/socket.h)
 AC_CACHE_CHECK([types of arguments for select],
 [ac_cv_func_select_args],
 [for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #if HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
@@ -1204,17 +1187,12 @@ fi
 # HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper
 # function.
 m4_define([_AC_FUNC_STAT],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
+[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
 AC_CACHE_CHECK([whether $1 accepts an empty string],
                [ac_cv_func_$1_empty_string_bug],
 [AC_TRY_RUN(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+[#include <sys/types.h>
+#include <sys/stat.h>
 
 int
 main ()
@@ -1433,18 +1411,12 @@ AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL])
 # AC_FUNC_UTIME_NULL
 # ------------------
 AC_DEFUN([AC_FUNC_UTIME_NULL],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
+[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
 [rm -f conftest.data; >conftest.data
 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
 AC_TRY_RUN(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+[#include <sys/types.h>
+#include <sys/stat.h>
 int
 main ()
 {
@@ -1475,16 +1447,12 @@ AU_ALIAS([AC_UTIME_NULL], [AC_FUNC_UTIME_NULL])
 # -------------
 AC_DEFUN([AC_FUNC_VFORK],
 [AC_REQUIRE([AC_TYPE_PID_T])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h unistd.h vfork.h)
+AC_CHECK_HEADERS(unistd.h vfork.h)
 AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
 [AC_TRY_RUN([/* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -1610,16 +1578,12 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF])
 # AC_FUNC_WAIT3
 # -------------
 AC_DEFUN([AC_FUNC_WAIT3],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
 [AC_TRY_RUN(
-[#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-
+#include <stdio.h>
 /* HP-UX has wait3 but does not fill in rusage at all.  */
 int
 main ()
index 8173d3ce3ed31cad882f4bc9fe056f3be106d52b..6820acded61b9f65edff0493bb87b6c5fc4b923a 100644 (file)
@@ -2180,12 +2180,8 @@ AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
 dnl If ever you change this variable, please keep autoconf.texi in sync.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
@@ -2216,7 +2212,7 @@ ac_includes_default="\
 #endif"
 ])dnl
 AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h, [], [], $ac_includes_default)
+AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h)
 ])
 
 
index 09c26c33b22144b11a72b90d23f8163dd5eb7577..56c0b3d0b7ca4172afd3bbe016a2088da4edb56b 100644 (file)
 ## 1. Generic tests for headers.  ##
 ## ------------------------------ ##
 
-# AC_CHECK_HEADER(HEADER-FILE,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-# ---------------------------------------------------------
+# AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ----------------------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADER],
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
 AC_CACHE_CHECK([for $1], ac_Header,
-               [AC_PREPROC_IFELSE([AC_LANG_SOURCE([m4_n([$4])dnl
-@%:@include <$1>])],
+               [AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$1>])],
                                   [AS_VAR_SET(ac_Header, yes)],
                                   [AS_VAR_SET(ac_Header, no)])])
 AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl
@@ -86,7 +83,6 @@ m4_define([AH_CHECK_HEADERS],
 
 # AC_CHECK_HEADERS(HEADER-FILE...
 #                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#                 [INCLUDES])
 # ----------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADERS],
 [AH_CHECK_HEADERS([$1])dnl
@@ -94,8 +90,7 @@ for ac_header in $1
 do
 AC_CHECK_HEADER($ac_header,
                 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_header)) $2],
-                [$3],
-                [$4])dnl
+                [$3])dnl
 done
 ])
 
@@ -116,9 +111,7 @@ done
 m4_define([_AC_CHECK_HEADER_DIRENT],
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_dirent_$1])dnl
 AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <$1>
 ],
                                     [DIR *dirp = 0;])],
@@ -142,7 +135,6 @@ m4_define([AH_CHECK_HEADERS_DIRENT],
 # ----------------
 AC_DEFUN([AC_HEADER_DIRENT],
 [AH_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h)
-AC_CHECK_HEADERS(sys/types.h)
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   _AC_CHECK_HEADER_DIRENT($ac_hdr,
@@ -162,7 +154,7 @@ fi
 # ---------------
 AC_DEFUN([AC_HEADER_MAJOR],
 [AC_CACHE_CHECK(whether sys/types.h defines makedev,
-                ac_cv_header_sys_types_h_makedev,
+  ac_cv_header_sys_types_h_makedev,
 [AC_TRY_LINK([#include <sys/types.h>
 ], [return makedev(0, 0);],
   ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
@@ -188,12 +180,9 @@ fi
 # --------------
 # FIXME: Shouldn't this be named AC_HEADER_SYS_STAT?
 AC_DEFUN([AC_HEADER_STAT],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether stat file-mode macros are broken,
+[AC_CACHE_CHECK(whether stat file-mode macros are broken,
   ac_cv_header_stat_broken,
-[AC_EGREP_CPP([You lose], [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_EGREP_CPP([You lose], [#include <sys/types.h>
 #include <sys/stat.h>
 
 #if defined(S_ISBLK) && defined(S_IFDIR)
@@ -283,13 +272,10 @@ fi
 # AC_HEADER_SYS_WAIT
 # ------------------
 AC_DEFUN([AC_HEADER_SYS_WAIT],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
-                ac_cv_header_sys_wait_h,
+[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
+  ac_cv_header_sys_wait_h,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/wait.h>
 #ifndef WEXITSTATUS
 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
@@ -313,12 +299,9 @@ fi
 # AC_HEADER_TIME
 # --------------
 AC_DEFUN([AC_HEADER_TIME],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
-               ac_cv_header_time,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
+  ac_cv_header_time,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
 ],
@@ -335,13 +318,10 @@ fi
 # _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
 # ----------------------------------
 m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
+[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
                 ac_cv_sys_tiocgwinsz_in_termios_h,
 [AC_EGREP_CPP([yes],
-              [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+              [#include <sys/types.h>
 #include <termios.h>
 #ifdef TIOCGWINSZ
   yes
@@ -355,13 +335,10 @@ AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
 # _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
 # ----------------------------------
 m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
+[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
                 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
 [AC_EGREP_CPP([yes],
-              [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+              [#include <sys/types.h>
 #include <sys/ioctl.h>
 #ifdef TIOCGWINSZ
   yes
index e40ef6e3fa15a9e49a8144493be74037ff91a93a..57aaef7747fbc8e17cc0ff40726a2e9066245c43 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -1376,7 +1376,6 @@ AC_DEFUN([AC_PROG_CC_STDC],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_BEFORE([$0], [AC_C_INLINE])dnl
 AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h)
 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
 dnl a magic option to avoid problems with ANSI preprocessor commands
 dnl like #elif.
@@ -1390,15 +1389,9 @@ ac_save_CC=$CC
 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
 [[#include <stdarg.h>
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+#include <sys/types.h>
+#include <sys/stat.h>
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
 static char *e (p, i)
@@ -1503,13 +1496,10 @@ fi
 # AC_C_BIGENDIAN
 # --------------
 AC_DEFUN([AC_C_BIGENDIAN],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 [ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ],
 [#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
@@ -1517,9 +1507,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
 #endif
 ])],
 [# It does; now see whether it defined to BIG_ENDIAN or not.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ], [#if BYTE_ORDER != BIG_ENDIAN
  not big endian
index 62a3233e793d0f7bf5b0377dee86aa2b9026dc1b..184ce298ea255d441e1b8f0616d3acc4a26017ad 100644 (file)
@@ -294,13 +294,10 @@ Remove this warning when you adjust the code.])])
 # AC_DECL_SYS_SIGLIST
 # -------------------
 AC_DEFUN([AC_DECL_SYS_SIGLIST],
-[AC_CHECK_HEADERS(sys/types.h unistd.h)
-AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
-               ac_cv_decl_sys_siglist,
+[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
+  ac_cv_decl_sys_siglist,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <signal.h>
 /* NetBSD declares sys_siglist in unistd.h.  */
 #if HAVE_UNISTD_H
@@ -498,16 +495,14 @@ fi
 # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
 AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
 [AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
-AC_CHECK_HEADERS(sys/types.h unistd.h)
+AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [/* Exit 0 (true) if wait returns something other than -1,
    i.e. the pid of the child, which means that wait was restarted
    after getting the signal.  */
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #include <signal.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>
@@ -558,14 +553,9 @@ fi
 # AC_SYS_POSIX_TERMIOS
 # --------------------
 AC_DEFUN([AC_SYS_POSIX_TERMIOS],
-[AC_CHECK_HEADERS(sys/types.h unistd.h)
-AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
-[AC_TRY_LINK([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>
 @%:@include <termios.h>],
              [/* SunOS 4.0.3 has termios.h but not the library calls.  */
    tcgetattr(0, 0);],
index 0ad63f213775bf19fdf75dc542f8840a08da3ce5..4762f6cfcc16cc303a396eed128665f42d989730 100644 (file)
@@ -244,13 +244,10 @@ AC_DEFUN([AC_CHECK_TYPE],
 # -----------------
 AC_DEFUN([AC_TYPE_GETGROUPS],
 [AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_CHECK_HEADERS(sys/types.h)
 AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Thanks to Mike Rendell for this test.  */
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #define NGID 256
 #undef MAX
 #define MAX(x, y) ((x) > (y) ? (x) : (y))
@@ -316,12 +313,9 @@ AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
 # --------------
 # Note that identifiers starting with SIG are reserved by ANSI C.
 AC_DEFUN([AC_TYPE_SIGNAL],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <signal.h>
 #ifdef signal
 # undef signal
@@ -522,12 +516,9 @@ AC_CHECK_MEMBERS([struct stat.st_rdev],
 # FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
 # Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
 AC_DEFUN([AC_STRUCT_TM],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
-               ac_cv_struct_tm,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+  ac_cv_struct_tm,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <time.h>
 ],
                                     [struct tm *tp; tp->tm_sec;])],
@@ -547,9 +538,7 @@ fi
 # external array `tzname' is found, define `HAVE_TZNAME'.
 AC_DEFUN([AC_STRUCT_TIMEZONE],
 [AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
 #include <$ac_cv_struct_tm>
 ])
 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
index 8d9fce30f2f026bf41593099bfa266be3682e809..2ec87f9365bf9e97c0198cfa51e38ff544e2df7a 100644 (file)
@@ -2778,12 +2778,8 @@ Most generic macros provide the following default set of includes:
 @example
 @group
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
@@ -3864,20 +3860,15 @@ These macros are used to find system header files not covered by the
 as well as find out whether it is present, you have to write your own
 test for it (@pxref{Writing Tests}).
 
-@defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac AC_CHECK_HEADER (@var{header-file}, @ovar{action-if-found}, @ovar{action-if-not-found})
 @maindex CHECK_HEADER
 If the system header file @var{header-file} exists, execute shell commands
 @var{action-if-found}, otherwise execute @var{action-if-not-found}.  If
 you just want to define a symbol if the header file is available,
 consider using @code{AC_CHECK_HEADERS} instead.
-
-This macro actually checks whether @var{header-file} can be included
-without error.  If @var{includes} is specified, they are included before
-@var{header-file}.  Note that the @var{includes} are @emph{not}
-defaulted.  They might be in future releases.
 @end defmac
 
-@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
+@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}, @ovar{action-if-found}, @ovar{action-if-not-found})
 @maindex CHECK_HEADERS
 @cvindex HAVE_@var{header}
 For each given system header file @var{header-file} in the
@@ -3887,11 +3878,6 @@ is given, it is additional shell code to execute when one of the header
 files is found.  You can give it a value of @samp{break} to break out of
 the loop on the first match.  If @var{action-if-not-found} is given, it
 is executed when one of the header files is not found.
-
-This macro actually checks whether @var{header-file} can be included
-without error.  If @var{includes} is specified, they are included before
-@var{header-file}.  Note that the @var{includes} are @emph{not}
-defaulted.  They might be in future releases.
 @end defmac
 
 @node Declarations, Structures, Header Files, Existing Tests
index e40ef6e3fa15a9e49a8144493be74037ff91a93a..57aaef7747fbc8e17cc0ff40726a2e9066245c43 100644 (file)
@@ -1376,7 +1376,6 @@ AC_DEFUN([AC_PROG_CC_STDC],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_BEFORE([$0], [AC_C_INLINE])dnl
 AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h)
 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
 dnl a magic option to avoid problems with ANSI preprocessor commands
 dnl like #elif.
@@ -1390,15 +1389,9 @@ ac_save_CC=$CC
 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
 [[#include <stdarg.h>
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+#include <sys/types.h>
+#include <sys/stat.h>
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
 static char *e (p, i)
@@ -1503,13 +1496,10 @@ fi
 # AC_C_BIGENDIAN
 # --------------
 AC_DEFUN([AC_C_BIGENDIAN],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 [ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ],
 [#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
@@ -1517,9 +1507,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
 #endif
 ])],
 [# It does; now see whether it defined to BIG_ENDIAN or not.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ], [#if BYTE_ORDER != BIG_ENDIAN
  not big endian
index e40ef6e3fa15a9e49a8144493be74037ff91a93a..57aaef7747fbc8e17cc0ff40726a2e9066245c43 100644 (file)
@@ -1376,7 +1376,6 @@ AC_DEFUN([AC_PROG_CC_STDC],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_BEFORE([$0], [AC_C_INLINE])dnl
 AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h)
 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
 dnl a magic option to avoid problems with ANSI preprocessor commands
 dnl like #elif.
@@ -1390,15 +1389,9 @@ ac_save_CC=$CC
 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
 [[#include <stdarg.h>
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+#include <sys/types.h>
+#include <sys/stat.h>
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
 static char *e (p, i)
@@ -1503,13 +1496,10 @@ fi
 # AC_C_BIGENDIAN
 # --------------
 AC_DEFUN([AC_C_BIGENDIAN],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 [ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ],
 [#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
@@ -1517,9 +1507,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
 #endif
 ])],
 [# It does; now see whether it defined to BIG_ENDIAN or not.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ], [#if BYTE_ORDER != BIG_ENDIAN
  not big endian
index 36056d8cad7eccb63d04cb3193c4a4aa8ebda689..c953750832c5bfd159d3be7ef68cb39fb5936481 100644 (file)
@@ -257,12 +257,8 @@ AC_DEFUN([AC_FUNC_CHOWN],
 [AC_REQUIRE([AC_TYPE_UID_T])dnl
 AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[#if SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
+#include <sys/stat.h>
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -306,9 +302,7 @@ AC_DEFUN([AC_FUNC_CLOSEDIR_VOID],
 AC_CACHE_CHECK([whether closedir returns void],
                [ac_cv_func_closedir_void],
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #include <$ac_header_dirent>
 
 int closedir ();
@@ -605,8 +599,7 @@ AC_CHECK_FUNC(getmntent,
 # AC_FUNC_GETPGRP
 # ---------------
 AC_DEFUN([AC_FUNC_GETPGRP],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
+[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 /*
  * If this system has a BSD-style getpgrp(),
@@ -615,9 +608,7 @@ AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
  * Snarfed from Chet Ramey's bash pgrp.c test program
  */
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 
 int     pid;
 int     pg1, pg2, pg3, pg4;
@@ -945,7 +936,7 @@ fi
 # AC_FUNC_MMAP
 # ------------
 AC_DEFUN([AC_FUNC_MMAP],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h stdlib.h unistd.h)
+[AC_CHECK_HEADERS(stdlib.h unistd.h)
 AC_CHECK_FUNCS(getpagesize)
 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
@@ -970,10 +961,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
    The main things grep needs to know about mmap are:
    * does it exist and is it safe to write into the mmap'd area
    * how to use it (BSD variants)  */
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 
@@ -985,9 +973,7 @@ char *malloc ();
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #if !HAVE_GETPAGESIZE
@@ -1129,17 +1115,14 @@ fi
 # function's arguments, and define those types in `SELECT_TYPE_ARG1',
 # `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'.
 AC_DEFUN([AC_FUNC_SELECT_ARGTYPES],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS(sys/types.h sys/select.h sys/socket.h)
+[AC_CHECK_HEADERS(sys/select.h sys/socket.h)
 AC_CACHE_CHECK([types of arguments for select],
 [ac_cv_func_select_args],
 [for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #if HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
@@ -1204,17 +1187,12 @@ fi
 # HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper
 # function.
 m4_define([_AC_FUNC_STAT],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
+[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
 AC_CACHE_CHECK([whether $1 accepts an empty string],
                [ac_cv_func_$1_empty_string_bug],
 [AC_TRY_RUN(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+[#include <sys/types.h>
+#include <sys/stat.h>
 
 int
 main ()
@@ -1433,18 +1411,12 @@ AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL])
 # AC_FUNC_UTIME_NULL
 # ------------------
 AC_DEFUN([AC_FUNC_UTIME_NULL],
-[AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
+[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
 [rm -f conftest.data; >conftest.data
 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
 AC_TRY_RUN(
-[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+[#include <sys/types.h>
+#include <sys/stat.h>
 int
 main ()
 {
@@ -1475,16 +1447,12 @@ AU_ALIAS([AC_UTIME_NULL], [AC_FUNC_UTIME_NULL])
 # -------------
 AC_DEFUN([AC_FUNC_VFORK],
 [AC_REQUIRE([AC_TYPE_PID_T])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h unistd.h vfork.h)
+AC_CHECK_HEADERS(unistd.h vfork.h)
 AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
 [AC_TRY_RUN([/* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -1610,16 +1578,12 @@ AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF])
 # AC_FUNC_WAIT3
 # -------------
 AC_DEFUN([AC_FUNC_WAIT3],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
 [AC_TRY_RUN(
-[#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[#include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-
+#include <stdio.h>
 /* HP-UX has wait3 but does not fill in rusage at all.  */
 int
 main ()
index 8173d3ce3ed31cad882f4bc9fe056f3be106d52b..6820acded61b9f65edff0493bb87b6c5fc4b923a 100644 (file)
@@ -2180,12 +2180,8 @@ AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
 dnl If ever you change this variable, please keep autoconf.texi in sync.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
@@ -2216,7 +2212,7 @@ ac_includes_default="\
 #endif"
 ])dnl
 AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h, [], [], $ac_includes_default)
+AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h)
 ])
 
 
index 09c26c33b22144b11a72b90d23f8163dd5eb7577..56c0b3d0b7ca4172afd3bbe016a2088da4edb56b 100644 (file)
 ## 1. Generic tests for headers.  ##
 ## ------------------------------ ##
 
-# AC_CHECK_HEADER(HEADER-FILE,
-#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                 [INCLUDES])
-# ---------------------------------------------------------
+# AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ----------------------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADER],
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
 AC_CACHE_CHECK([for $1], ac_Header,
-               [AC_PREPROC_IFELSE([AC_LANG_SOURCE([m4_n([$4])dnl
-@%:@include <$1>])],
+               [AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$1>])],
                                   [AS_VAR_SET(ac_Header, yes)],
                                   [AS_VAR_SET(ac_Header, no)])])
 AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl
@@ -86,7 +83,6 @@ m4_define([AH_CHECK_HEADERS],
 
 # AC_CHECK_HEADERS(HEADER-FILE...
 #                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#                 [INCLUDES])
 # ----------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADERS],
 [AH_CHECK_HEADERS([$1])dnl
@@ -94,8 +90,7 @@ for ac_header in $1
 do
 AC_CHECK_HEADER($ac_header,
                 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_header)) $2],
-                [$3],
-                [$4])dnl
+                [$3])dnl
 done
 ])
 
@@ -116,9 +111,7 @@ done
 m4_define([_AC_CHECK_HEADER_DIRENT],
 [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_dirent_$1])dnl
 AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <$1>
 ],
                                     [DIR *dirp = 0;])],
@@ -142,7 +135,6 @@ m4_define([AH_CHECK_HEADERS_DIRENT],
 # ----------------
 AC_DEFUN([AC_HEADER_DIRENT],
 [AH_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h)
-AC_CHECK_HEADERS(sys/types.h)
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   _AC_CHECK_HEADER_DIRENT($ac_hdr,
@@ -162,7 +154,7 @@ fi
 # ---------------
 AC_DEFUN([AC_HEADER_MAJOR],
 [AC_CACHE_CHECK(whether sys/types.h defines makedev,
-                ac_cv_header_sys_types_h_makedev,
+  ac_cv_header_sys_types_h_makedev,
 [AC_TRY_LINK([#include <sys/types.h>
 ], [return makedev(0, 0);],
   ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
@@ -188,12 +180,9 @@ fi
 # --------------
 # FIXME: Shouldn't this be named AC_HEADER_SYS_STAT?
 AC_DEFUN([AC_HEADER_STAT],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether stat file-mode macros are broken,
+[AC_CACHE_CHECK(whether stat file-mode macros are broken,
   ac_cv_header_stat_broken,
-[AC_EGREP_CPP([You lose], [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_EGREP_CPP([You lose], [#include <sys/types.h>
 #include <sys/stat.h>
 
 #if defined(S_ISBLK) && defined(S_IFDIR)
@@ -283,13 +272,10 @@ fi
 # AC_HEADER_SYS_WAIT
 # ------------------
 AC_DEFUN([AC_HEADER_SYS_WAIT],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
-                ac_cv_header_sys_wait_h,
+[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
+  ac_cv_header_sys_wait_h,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/wait.h>
 #ifndef WEXITSTATUS
 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
@@ -313,12 +299,9 @@ fi
 # AC_HEADER_TIME
 # --------------
 AC_DEFUN([AC_HEADER_TIME],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
-               ac_cv_header_time,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
+  ac_cv_header_time,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
 ],
@@ -335,13 +318,10 @@ fi
 # _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
 # ----------------------------------
 m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
+[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
                 ac_cv_sys_tiocgwinsz_in_termios_h,
 [AC_EGREP_CPP([yes],
-              [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+              [#include <sys/types.h>
 #include <termios.h>
 #ifdef TIOCGWINSZ
   yes
@@ -355,13 +335,10 @@ AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
 # _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
 # ----------------------------------
 m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
+[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
                 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
 [AC_EGREP_CPP([yes],
-              [#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+              [#include <sys/types.h>
 #include <sys/ioctl.h>
 #ifdef TIOCGWINSZ
   yes
index e40ef6e3fa15a9e49a8144493be74037ff91a93a..57aaef7747fbc8e17cc0ff40726a2e9066245c43 100644 (file)
@@ -1376,7 +1376,6 @@ AC_DEFUN([AC_PROG_CC_STDC],
 [AC_REQUIRE([AC_PROG_CC])dnl
 AC_BEFORE([$0], [AC_C_INLINE])dnl
 AC_BEFORE([$0], [AC_C_CONST])dnl
-AC_CHECK_HEADERS(sys/types.h sys/stat.h)
 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
 dnl a magic option to avoid problems with ANSI preprocessor commands
 dnl like #elif.
@@ -1390,15 +1389,9 @@ ac_save_CC=$CC
 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
 [[#include <stdarg.h>
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
+#include <sys/types.h>
+#include <sys/stat.h>
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
 static char *e (p, i)
@@ -1503,13 +1496,10 @@ fi
 # AC_C_BIGENDIAN
 # --------------
 AC_DEFUN([AC_C_BIGENDIAN],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 [ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ],
 [#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
@@ -1517,9 +1507,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
 #endif
 ])],
 [# It does; now see whether it defined to BIG_ENDIAN or not.
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <sys/param.h>
 ], [#if BYTE_ORDER != BIG_ENDIAN
  not big endian
index 62a3233e793d0f7bf5b0377dee86aa2b9026dc1b..184ce298ea255d441e1b8f0616d3acc4a26017ad 100644 (file)
@@ -294,13 +294,10 @@ Remove this warning when you adjust the code.])])
 # AC_DECL_SYS_SIGLIST
 # -------------------
 AC_DEFUN([AC_DECL_SYS_SIGLIST],
-[AC_CHECK_HEADERS(sys/types.h unistd.h)
-AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
-               ac_cv_decl_sys_siglist,
+[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
+  ac_cv_decl_sys_siglist,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <signal.h>
 /* NetBSD declares sys_siglist in unistd.h.  */
 #if HAVE_UNISTD_H
@@ -498,16 +495,14 @@ fi
 # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
 AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS],
 [AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl
-AC_CHECK_HEADERS(sys/types.h unistd.h)
+AC_CHECK_HEADERS(unistd.h)
 AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [/* Exit 0 (true) if wait returns something other than -1,
    i.e. the pid of the child, which means that wait was restarted
    after getting the signal.  */
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #include <signal.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>
@@ -558,14 +553,9 @@ fi
 # AC_SYS_POSIX_TERMIOS
 # --------------------
 AC_DEFUN([AC_SYS_POSIX_TERMIOS],
-[AC_CHECK_HEADERS(sys/types.h unistd.h)
-AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
-[AC_TRY_LINK([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>
 @%:@include <termios.h>],
              [/* SunOS 4.0.3 has termios.h but not the library calls.  */
    tcgetattr(0, 0);],
index 0ad63f213775bf19fdf75dc542f8840a08da3ce5..4762f6cfcc16cc303a396eed128665f42d989730 100644 (file)
@@ -244,13 +244,10 @@ AC_DEFUN([AC_CHECK_TYPE],
 # -----------------
 AC_DEFUN([AC_TYPE_GETGROUPS],
 [AC_REQUIRE([AC_TYPE_UID_T])dnl
-AC_CHECK_HEADERS(sys/types.h)
 AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Thanks to Mike Rendell for this test.  */
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #define NGID 256
 #undef MAX
 #define MAX(x, y) ((x) > (y) ? (x) : (y))
@@ -316,12 +313,9 @@ AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
 # --------------
 # Note that identifiers starting with SIG are reserved by ANSI C.
 AC_DEFUN([AC_TYPE_SIGNAL],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
+[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
 [AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_LANG_PROGRAM([#include <sys/types.h>
 #include <signal.h>
 #ifdef signal
 # undef signal
@@ -522,12 +516,9 @@ AC_CHECK_MEMBERS([struct stat.st_rdev],
 # FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM.
 # Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME?
 AC_DEFUN([AC_STRUCT_TM],
-[AC_CHECK_HEADERS(sys/types.h)
-AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
-               ac_cv_struct_tm,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
+  ac_cv_struct_tm,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <time.h>
 ],
                                     [struct tm *tp; tp->tm_sec;])],
@@ -547,9 +538,7 @@ fi
 # external array `tzname' is found, define `HAVE_TZNAME'.
 AC_DEFUN([AC_STRUCT_TIMEZONE],
 [AC_REQUIRE([AC_STRUCT_TM])dnl
-AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
 #include <$ac_cv_struct_tm>
 ])
 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then