Add #ifdef hack for MAP_ANONYMOUS being spelled MAP_ANON on some platforms.

(We're already talking about autoconf'ing this, so I'm assuming this hack
will be short-lived...I just don't want it to get lost in my working files.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2003-06-17 23:14:06 +00:00
parent c0feeb5a0f
commit 4399a4982a

View File

@ -73,6 +73,9 @@ static void *getMemory(unsigned NumPages) {
static const long pageSize = sysconf(_SC_PAGESIZE);
#if defined(i386) || defined(__i386__) || defined(__x86__)
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
# define MAP_ANONYMOUS MAP_ANON
#endif
pa = mmap(0, pageSize*NumPages, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); /* fd = 0 */
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)