diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-27 06:14:48 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-27 06:14:48 +0000 |
commit | 5d01fa5bbe82504e2977d9152c619303e65c839c (patch) | |
tree | 9b52a2188b85349cc96bb9712c2c85a787a67a4e /autoconf/m4 | |
parent | 3ed2f2f27a6f303a0da7c52db54134876624bc24 (diff) | |
download | external_llvm-5d01fa5bbe82504e2977d9152c619303e65c839c.zip external_llvm-5d01fa5bbe82504e2977d9152c619303e65c839c.tar.gz external_llvm-5d01fa5bbe82504e2977d9152c619303e65c839c.tar.bz2 |
For PR351:
Provide a check to determine if /dev/zero is needed for AllocateRWX function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/m4')
-rw-r--r-- | autoconf/m4/need_dev_zero_for_mmap.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/autoconf/m4/need_dev_zero_for_mmap.m4 b/autoconf/m4/need_dev_zero_for_mmap.m4 new file mode 100644 index 0000000..352c518 --- /dev/null +++ b/autoconf/m4/need_dev_zero_for_mmap.m4 @@ -0,0 +1,17 @@ +# +# When allocating RWX memory, check whether we need to use /dev/zero +# as the file descriptor or not. +# +AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP], +[AC_CACHE_CHECK([if /dev/zero is needed for mmap], +ac_cv_need_dev_zero_for_mmap, +[if test "$llvm_cv_os_type" == "Interix" ; then + ac_cv_need_dev_zero_for_mmap=yes + else + ac_cv_need_dev_zero_for_mmap=no + fi +]) +if test "$ac_cv_need_dev_zero_for_mmap" = yes; then + AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1], + [Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary]) +fi]) |