From 12de17db02dca026fea1e2aee57ebdca97784292 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 19 Sep 2004 22:31:49 +0000 Subject: Bring the script out of the dark ages and into modern autoconfness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16415 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/m4/func_mmap_file.m4 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'autoconf/m4/func_mmap_file.m4') diff --git a/autoconf/m4/func_mmap_file.m4 b/autoconf/m4/func_mmap_file.m4 index 707a1d1..96b5173 100644 --- a/autoconf/m4/func_mmap_file.m4 +++ b/autoconf/m4/func_mmap_file.m4 @@ -4,9 +4,8 @@ AC_DEFUN([AC_FUNC_MMAP_FILE], [AC_CACHE_CHECK(for mmap of files, ac_cv_func_mmap_file, -[AC_LANG_SAVE - AC_LANG_C - AC_TRY_RUN([ +[ AC_LANG_PUSH([C]) + AC_RUN_IFELSE([ #ifdef HAVE_SYS_TYPES_H #include #endif @@ -22,8 +21,8 @@ ac_cv_func_mmap_file, int fd; int main () { fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != (int) MAP_FAILED);}], - ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no) - AC_LANG_RESTORE + ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no, ac_cv_func_mmap_file=no) + AC_LANG_POP([C]) ]) if test "$ac_cv_func_mmap_file" = yes; then AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory]) -- cgit v1.1