From: Akim Demaille Date: Tue, 12 Jun 2001 14:46:13 +0000 (+0000) Subject: Stupid me :( X-Git-Tag: AUTOCONF-2.50a~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e940773c63459088facfad56cbdb284e8feb4d18;p=thirdparty%2Fautoconf.git Stupid me :( Reverse the patch incorrectly applied when adding prev-version.txt --- diff --git a/NEWS b/NEWS index 49e8069d7..10fdd6ba7 100644 --- 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. * Major changes in Autoconf 2.50 diff --git a/acfunctions.m4 b/acfunctions.m4 index 36056d8ca..c95375083 100644 --- a/acfunctions.m4 +++ b/acfunctions.m4 @@ -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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif +[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include +#include #include #ifdef HAVE_UNISTD_H # include @@ -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 -#endif +[#include #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 -#if HAVE_SYS_TYPES_H -# include -#endif +#include 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 -#endif +#include #include #include @@ -985,9 +973,7 @@ char *malloc (); #if HAVE_UNISTD_H # include #endif -#if HAVE_SYS_STAT_H -# include -#endif +#include /* 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 -#endif +[#include #if HAVE_SYS_TIME_H # include #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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif +[#include +#include 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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +[#include +#include 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 -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif +#include +#include #if HAVE_UNISTD_H # include #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 -#if HAVE_SYS_TYPES_H -# include -#endif +[#include #include #include - +#include /* HP-UX has wait3 but does not fill in rusage at all. */ int main () diff --git a/acgeneral.m4 b/acgeneral.m4 index 8173d3ce3..6820acded 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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 -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif +#include +#include #if STDC_HEADERS # include # include @@ -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) ]) diff --git a/acheaders.m4 b/acheaders.m4 index 09c26c33b..56c0b3d0b 100644 --- a/acheaders.m4 +++ b/acheaders.m4 @@ -60,15 +60,12 @@ ## 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 -#endif +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #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 ], [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 -#endif +[AC_EGREP_CPP([You lose], [#include #include #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 -#endif +[AC_LANG_PROGRAM([#include #include #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 -#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 #include #include ], @@ -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 -#endif + [#include #include #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 -#endif + [#include #include #ifdef TIOCGWINSZ yes diff --git a/aclang.m4 b/aclang.m4 index e40ef6e3f..57aaef774 100644 --- 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 #include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +#include +#include /* 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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if BYTE_ORDER != BIG_ENDIAN not big endian diff --git a/acspecific.m4 b/acspecific.m4 index 62a3233e7..184ce298e 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -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 -#endif +[AC_LANG_PROGRAM([#include #include /* 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 -#endif +#include #include #if HAVE_UNISTD_H # include @@ -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 -#endif -#if HAVE_UNISTD_H -# include -#endif +[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios, +[AC_TRY_LINK([#include +#include @%:@include ], [/* SunOS 4.0.3 has termios.h but not the library calls. */ tcgetattr(0, 0);], diff --git a/actypes.m4 b/actypes.m4 index 0ad63f213..4762f6cfc 100644 --- a/actypes.m4 +++ b/actypes.m4 @@ -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 -#endif +#include #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 -#endif +[AC_LANG_PROGRAM([#include #include #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 -#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 #include ], [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 -#endif +AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include #include <$ac_cv_struct_tm> ]) if test "$ac_cv_member_struct_tm_tm_zone" = yes; then diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 8d9fce30f..2ec87f936 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2778,12 +2778,8 @@ Most generic macros provide the following default set of includes: @example @group #include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif +#include +#include #if STDC_HEADERS # include # include @@ -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 diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index e40ef6e3f..57aaef774 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.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 #include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +#include +#include /* 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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if BYTE_ORDER != BIG_ENDIAN not big endian diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index e40ef6e3f..57aaef774 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.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 #include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +#include +#include /* 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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if BYTE_ORDER != BIG_ENDIAN not big endian diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 36056d8ca..c95375083 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif +[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include +#include #include #ifdef HAVE_UNISTD_H # include @@ -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 -#endif +[#include #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 -#if HAVE_SYS_TYPES_H -# include -#endif +#include 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 -#endif +#include #include #include @@ -985,9 +973,7 @@ char *malloc (); #if HAVE_UNISTD_H # include #endif -#if HAVE_SYS_STAT_H -# include -#endif +#include /* 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 -#endif +[#include #if HAVE_SYS_TIME_H # include #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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif +[#include +#include 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 -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +[#include +#include 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 -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif +#include +#include #if HAVE_UNISTD_H # include #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 -#if HAVE_SYS_TYPES_H -# include -#endif +[#include #include #include - +#include /* HP-UX has wait3 but does not fill in rusage at all. */ int main () diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 8173d3ce3..6820acded 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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 -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif +#include +#include #if STDC_HEADERS # include # include @@ -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) ]) diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 09c26c33b..56c0b3d0b 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -60,15 +60,12 @@ ## 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 -#endif +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #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 ], [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 -#endif +[AC_EGREP_CPP([You lose], [#include #include #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 -#endif +[AC_LANG_PROGRAM([#include #include #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 -#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 #include #include ], @@ -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 -#endif + [#include #include #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 -#endif + [#include #include #ifdef TIOCGWINSZ yes diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index e40ef6e3f..57aaef774 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.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 #include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif - +#include +#include /* 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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#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 -#endif +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if BYTE_ORDER != BIG_ENDIAN not big endian diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 62a3233e7..184ce298e 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -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 -#endif +[AC_LANG_PROGRAM([#include #include /* 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 -#endif +#include #include #if HAVE_UNISTD_H # include @@ -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 -#endif -#if HAVE_UNISTD_H -# include -#endif +[AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios, +[AC_TRY_LINK([#include +#include @%:@include ], [/* SunOS 4.0.3 has termios.h but not the library calls. */ tcgetattr(0, 0);], diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 index 0ad63f213..4762f6cfc 100644 --- a/lib/autoconf/types.m4 +++ b/lib/autoconf/types.m4 @@ -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 -#endif +#include #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 -#endif +[AC_LANG_PROGRAM([#include #include #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 -#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 #include ], [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 -#endif +AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include #include <$ac_cv_struct_tm> ]) if test "$ac_cv_member_struct_tm_tm_zone" = yes; then