Remove HAVE_MPROTECT cmake check
Summary
The posix function mprotect()
is defined in the header sys/mman.h
. Instead of implementing a cmake check for the header and whether a c source file compiles, this MR uses __has_include(<sys/mman.h>)
instead.
Note, the cmake variable HAVE_MPROTECT
is not defined anymore. Also the config.h
variables HAVE_MPROTECT
and HAVE_SYS_MMAN_H
are not defined anymore. They are used exclusively inside debugallocator.hh
and thus (for backwards compatibility) defined there if the corresponding header is found.
Merge request reports
Activity
- Resolved by Christoph Grüninger
Summary
The posix function
mprotect()
is defined in the headersys/mman.h
. Instead of implementing a cmake check for the header and whether a c source file compiles, this MR uses__has_include(<sys/mman.h>)
instead.Note, the cmake variable
HAVE_MPROTECT
is not defined anymore. Also theconfig.h
variablesHAVE_MPROTECT
andHAVE_SYS_MMAN_H
are not defined anymore. They are used exclusively insidedebugallocator.hh
and thus (for backwards compatibility) defined there if the corresponding header is found.If I remember correctly, the problem was that the header is available on MacOS, but the mprotect is not usable.
mentioned in issue #199 (closed)
mentioned in issue #234 (closed)
added 12 commits
-
52dfb5bd...ff9237b5 - 11 commits from branch
master
- afd13745 - Remove HAVE_MPROTECT cmake check
-
52dfb5bd...ff9237b5 - 11 commits from branch
mentioned in commit 1866e6cb