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.)

llvm-svn: 6761
This commit is contained in:
Brian Gaeke 2003-06-17 23:14:06 +00:00
parent a36eea5142
commit a7cf81bc75
1 changed files with 3 additions and 0 deletions

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)