tweak to ensure we have anonymous memory if we are using mmap

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26739 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-07-02 10:46:16 +00:00
parent 1cc66c3501
commit 7e82f60a9e

View file

@ -43,6 +43,16 @@
#include <sys/mman.h>
#endif
#if defined(HAVE_MMAP)
# if !defined(MAP_ANONYMOUS)
# if defined(MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# else
# undef HAVE_MMAP
# endif
# endif
#endif
@interface NSInvocation (Private)
/* Tell the invocation to store return values locally rather than writing
* themto the stack location specified when the invocation was produced
@ -80,9 +90,6 @@
- (id) initWithSize: (unsigned)_size
{
#if defined(HAVE_MMAP)
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
#if defined(HAVE_MPROTECT)
/* We have mprotect, so we create memory as writable and change it to
* executable later (writable and executable may not be possible at