cvsdist 7c113d
--- autoconf-2.13/acspecific.m4.orig	Fri Jun 29 16:26:39 2001
cvsdist 7c113d
+++ autoconf-2.13/acspecific.m4	Fri Jun 29 16:26:39 2001
cvsdist 7c113d
@@ -1010,7 +1043,7 @@
cvsdist 7c113d
 ])
cvsdist 7c113d
 
cvsdist 7c113d
 AC_DEFUN(AC_FUNC_MMAP,
cvsdist 7c113d
-[AC_CHECK_HEADERS(unistd.h)
cvsdist 7c113d
+[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
cvsdist 7c113d
 AC_CHECK_FUNCS(getpagesize)
cvsdist 7c113d
 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
cvsdist 7c113d
 [AC_TRY_RUN([
cvsdist 7c113d
@@ -1039,11 +1072,24 @@
cvsdist 7c113d
 #include <fcntl.h>
cvsdist 7c113d
 #include <sys/mman.h>
cvsdist 7c113d
 
cvsdist 7c113d
+#if HAVE_SYS_TYPES_H
cvsdist 7c113d
+# include <sys/types.h>
cvsdist 7c113d
+#endif
cvsdist 7c113d
+
cvsdist 7c113d
+#if HAVE_STDLIB_H
cvsdist 7c113d
+# include <stdlib.h>
cvsdist 7c113d
+#endif
cvsdist 7c113d
+
cvsdist 7c113d
+#if HAVE_SYS_STAT_H
cvsdist 7c113d
+# include <sys/stat.h>
cvsdist 7c113d
+#endif
cvsdist 7c113d
+
cvsdist 7c113d
+#if HAVE_UNISTD_H
cvsdist 7c113d
+# include <unistd.h>
cvsdist 7c113d
+#endif
cvsdist 7c113d
+
cvsdist 7c113d
 /* This mess was copied from the GNU getpagesize.h.  */
cvsdist 7c113d
 #ifndef HAVE_GETPAGESIZE
cvsdist 7c113d
-# ifdef HAVE_UNISTD_H
cvsdist 7c113d
-#  include <unistd.h>
cvsdist 7c113d
-# endif
cvsdist 7c113d
 
cvsdist 7c113d
 /* Assume that all systems that can run configure have sys/param.h.  */
cvsdist 7c113d
 # ifndef HAVE_SYS_PARAM_H