1 # 2 # When allocating RWX memory, check whether we need to use /dev/zero 3 # as the file descriptor or not. 4 # 5 AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP], 6 [AC_CACHE_CHECK([if /dev/zero is needed for mmap], 7 ac_cv_need_dev_zero_for_mmap, 8 [if test "$llvm_cv_os_type" = "Interix" ; then 9 ac_cv_need_dev_zero_for_mmap=yes 10 else 11 ac_cv_need_dev_zero_for_mmap=no 12 fi 13 ]) 14 if test "$ac_cv_need_dev_zero_for_mmap" = yes; then 15 AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1], 16 [Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary]) 17 fi]) 18