]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Guard
authorAkim Demaille <akim@epita.fr>
Wed, 13 Jun 2001 08:45:39 +0000 (08:45 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 13 Jun 2001 08:45:39 +0000 (08:45 +0000)
sys/types.h and sys/stat.h, and check for them.

ChangeLog
NEWS
acgeneral.m4
doc/autoconf.texi
lib/autoconf/general.m4
tests/atspecific.m4

index 5e432d45679df94eef3a9ea9a6511b70ff30e22c..3cd1e031f020564f37e3038bbb545364c4bdc086 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-13  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Guard
+       sys/types.h and sys/stat.h, and check for them.
+
 2001-06-13  Akim Demaille  <akim@epita.fr>
 
        * acheaders.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Support $4 =
diff --git a/NEWS b/NEWS
index 39ce02b2f7afb3986fae976d07679c9ff3a1dff7..49e8069d7fc29227ff38e2625deb0f5e40f4aad3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 * Major changes in Autoconf 2.50a                       -*- outline -*-
 ** Default includes
-Now include stdint.h.
+- Now include stdint.h.
+- sys/types.h and sys/stat.h are guarded.
 
 ** Bug fixes
 - Mostly in the test suite.
@@ -8,6 +9,8 @@ Now include stdint.h.
 - 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
index 6820acded61b9f65edff0493bb87b6c5fc4b923a..47c6befc4ec56ad30046db530c8e7479aa5fc366 100644 (file)
@@ -2180,8 +2180,12 @@ 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>
-#include <sys/types.h>
-#include <sys/stat.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
@@ -2212,7 +2216,9 @@ ac_includes_default="\
 #endif"
 ])dnl
 AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h)
+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)
 ])
 
 
index e843628a7accce704ae2294ad3d5a480c8d1c19c..8d9fce30f2f026bf41593099bfa266be3682e809 100644 (file)
@@ -2778,8 +2778,12 @@ Most generic macros provide the following default set of includes:
 @example
 @group
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
index 6820acded61b9f65edff0493bb87b6c5fc4b923a..47c6befc4ec56ad30046db530c8e7479aa5fc366 100644 (file)
@@ -2180,8 +2180,12 @@ 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>
-#include <sys/types.h>
-#include <sys/stat.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #if STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
@@ -2212,7 +2216,9 @@ ac_includes_default="\
 #endif"
 ])dnl
 AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h)
+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)
 ])
 
 
index 2033cc50187a6983977c2413a131a3c57827ddcc..c339c89e13e1fa12883157323de3d4c85a300769 100644 (file)
@@ -98,7 +98,8 @@ fi
 # AT_CHECK_HEADER is a better name, but too close from AC_CHECK_HEADER.
 m4_define([AT_CHECK_DEFINES],
 [AT_CHECK([[fgrep '#' config.h |
-   egrep -v 'STDC_HEADERS|STDINT|STDLIB|INTTYPES|MEMORY|STRING|UNISTD']],, [$1])])
+ egrep -v 'STDC_HEADERS|STD(INT|LIB)|INTTYPES|MEMORY|STRING|UNISTD|SYS_(TYPES|STAT)']],,
+          [$1])])
 
 
 # AT_CHECK_AUTOUPDATE