From: Paul Eggert Date: Sat, 20 Nov 2010 23:26:39 +0000 (-0800) Subject: autoconf: don't assume sys/stat.h and sys/types.h when testing C89 X-Git-Tag: v2.68b~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=234d3c32688c335ee19e8d7f409e713badb5c669;p=thirdparty%2Fautoconf.git autoconf: don't assume sys/stat.h and sys/types.h when testing C89 Problem reported by Patrick Pelissier in . * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Don't include sys/types.h and sys/stat.h. Instead, define a dummy struct stat. C89 doesn't guarantee sys/types.h and sys/stat.h. --- diff --git a/ChangeLog b/ChangeLog index e34119ca..62358eaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-11-20 Paul Eggert + + autoconf: don't assume sys/stat.h and sys/types.h when testing C89 + Problem reported by Patrick Pelissier in + . + * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Don't include sys/types.h + and sys/stat.h. Instead, define a dummy struct stat. C89 doesn't + guarantee sys/types.h and sys/stat.h. + 2010-11-10 Reuben Thomas (tiny change) docs: avoid first person, and credit history to David MacKenzie diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 233644a0..a873ccd2 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -1102,8 +1102,7 @@ AC_DEFUN([_AC_PROG_CC_C89], [_AC_C_STD_TRY([c89], [[#include #include -#include -#include +struct stat; /* 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);