mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
For PR351:
Provide a check to determine if /dev/zero is needed for AllocateRWX function. llvm-svn: 19147
This commit is contained in:
parent
4887b109fc
commit
2b7aff24f2
17
autoconf/m4/need_dev_zero_for_mmap.m4
Normal file
17
autoconf/m4/need_dev_zero_for_mmap.m4
Normal file
@ -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])
|
Loading…
Reference in New Issue
Block a user