X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fruntime%2Fstorage%2Fmprotect.lc;h=dabf3c4180e9a52e625eaa73f2b3668b33d04834;hb=769ce8e72ae626356ce57162b7ff448c0ef7e700;hp=a27199ffe5aa065e9f2e89bd7f5b3f210bcdfc3c;hpb=a7e6cdbfc4f27c2e0ab9c12ebe6431c246c74c6d;p=ghc-hetmet.git diff --git a/ghc/runtime/storage/mprotect.lc b/ghc/runtime/storage/mprotect.lc index a27199f..dabf3c4 100644 --- a/ghc/runtime/storage/mprotect.lc +++ b/ghc/runtime/storage/mprotect.lc @@ -10,7 +10,6 @@ Is @mprotect@ POSIX now? \begin{code} - #if STACK_CHECK_BY_PAGE_FAULT /* #define STK_CHK_DEBUG */ @@ -36,7 +35,12 @@ Is @mprotect@ POSIX now? # if defined(HAVE_GETPAGESIZE) # define GETPAGESIZE() getpagesize() # else -# error getpagesize +# if defined(linux_TARGET_OS) || defined(linuxaout_TARGET_OS) +# /* it has it, but it is in BSD land; easier to just say so */ +# define GETPAGESIZE() getpagesize() +# else +# error getpagesize +# endif # endif # endif @@ -45,6 +49,11 @@ extern int getpagesize PROTO((void)); extern int mprotect PROTO((caddr_t, size_t, int)); #endif +/* Needed for FreeBSD (SDM, 96/03) */ +#ifndef PROT_NONE +#define PROT_NONE 0 +#endif + void unmapMiddleStackPage(addr_, size) char * /*caddr_t*/ addr_; @@ -74,5 +83,4 @@ int size; } #endif /* STACK_CHECK_BY_PAGE_FAULT */ - \end{code}