[quake3-commits] r2177 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 26 21:38:13 EDT 2011
Author: thilo
Date: 2011-09-26 21:38:13 -0400 (Mon, 26 Sep 2011)
New Revision: 2177
Modified:
trunk/code/qcommon/vm_x86.c
Log:
Fix q3vm execution on x86/x86_64 MacOSX
Modified: trunk/code/qcommon/vm_x86.c
===================================================================
--- trunk/code/qcommon/vm_x86.c 2011-09-21 15:17:22 UTC (rev 2176)
+++ trunk/code/qcommon/vm_x86.c 2011-09-27 01:38:13 UTC (rev 2177)
@@ -24,23 +24,24 @@
#include "vm_local.h"
#ifdef _WIN32
-#include <windows.h>
-#endif
+ #include <windows.h>
+#else
+ #ifdef __FreeBSD__
+ #include <sys/types.h>
+ #endif
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
+ #include <sys/mman.h> // for PROT_ stuff
-#ifndef _WIN32
-#include <sys/mman.h> // for PROT_ stuff
+ /* need this on NX enabled systems (i386 with PAE kernel or
+ * noexec32=on x86_64) */
+ #define VM_X86_MMAP
+
+ // workaround for systems that use the old MAP_ANON macro
+ #ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
#endif
-/* need this on NX enabled systems (i386 with PAE kernel or
- * noexec32=on x86_64) */
-#if defined(__linux__) || defined(__FreeBSD__)
-#define VM_X86_MMAP
-#endif
-
static void VM_Destroy_Compiled(vm_t* self);
/*
More information about the quake3-commits
mailing list