[llvm-commits] CVS: llvm/autoconf/m4/need_dev_zero_for_mmap.m4
Reid Spencer
reid at x10sys.com
Sun Dec 26 22:14:59 PST 2004
Changes in directory llvm/autoconf/m4:
need_dev_zero_for_mmap.m4 added (r1.1)
---
Log message:
For PR351: http://llvm.cs.uiuc.edu/PR351 :
Provide a check to determine if /dev/zero is needed for AllocateRWX function.
---
Diffs of the changes: (+17 -0)
Index: llvm/autoconf/m4/need_dev_zero_for_mmap.m4
diff -c /dev/null llvm/autoconf/m4/need_dev_zero_for_mmap.m4:1.1
*** /dev/null Mon Dec 27 00:14:58 2004
--- llvm/autoconf/m4/need_dev_zero_for_mmap.m4 Mon Dec 27 00:14:48 2004
***************
*** 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])
More information about the llvm-commits
mailing list