summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-18 07:40:22 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-18 07:40:22 -0800
commit3c1b160ba5b63be04cf8ea069d0ac35a6d37aff5 (patch)
treefb39b464141490f76e2962c7fcf8e8b77a463932
parentcf1f8b1efacc53f86fd871b5d3e8d65a373406b8 (diff)
downloadautoconf213-3c1b160ba5b63be04cf8ea069d0ac35a6d37aff5.tar.gz
autoconf213-3c1b160ba5b63be04cf8ea069d0ac35a6d37aff5.tar.bz2
autoconf213-3c1b160ba5b63be04cf8ea069d0ac35a6d37aff5.zip
autoconf-2.13-headers
-rw-r--r--acspecific.m421
1 files changed, 17 insertions, 4 deletions
diff --git a/acspecific.m4 b/acspecific.m4
index 8fc485a..178e79f 100644
--- a/acspecific.m4
+++ b/acspecific.m4
@@ -1043,7 +1043,7 @@ fi
])
AC_DEFUN(AC_FUNC_MMAP,
-[AC_CHECK_HEADERS(unistd.h)
+[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
AC_CHECK_FUNCS(getpagesize)
AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
[AC_TRY_RUN([
@@ -1072,11 +1072,24 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H