Changeset View
Changeset View
Standalone View
Standalone View
head/games/ioquake3/files/patch-code-qcommon-vm_x86.c
--- code/qcommon/vm_x86.c.orig 2008-08-18 01:22:06.000000000 +0200 | --- code/qcommon/vm_x86.c.orig 2008-08-17 23:22:06 UTC | ||||
+++ code/qcommon/vm_x86.c 2013-11-14 11:44:27.000000000 +0100 | +++ code/qcommon/vm_x86.c | ||||
@@ -36,7 +36,25 @@ | @@ -36,7 +36,25 @@ Foundation, Inc., 51 Franklin St, Fifth | ||||
/* need this on NX enabled systems (i386 with PAE kernel or | /* need this on NX enabled systems (i386 with PAE kernel or | ||||
* noexec32=on x86_64) */ | * noexec32=on x86_64) */ | ||||
-#ifdef __linux__ | -#ifdef __linux__ | ||||
+// Rambetter's note: I'm adding the test for __FreeBSD__ in addition to the [already | +// Rambetter's note: I'm adding the test for __FreeBSD__ in addition to the [already | ||||
+// existing] test for __linux__. Here is why. I own a 32 bit FreeBSD 8.0 server with | +// existing] test for __linux__. Here is why. I own a 32 bit FreeBSD 8.0 server with | ||||
+// a PAE kernel. Without VM_X86_MMAP, ioq3ded segfaults shortly after starting | +// a PAE kernel. Without VM_X86_MMAP, ioq3ded segfaults shortly after starting | ||||
+// (this should come as no surprise). With VM_X86_MMAP, ioq3ded runs very smoothly. | +// (this should come as no surprise). With VM_X86_MMAP, ioq3ded runs very smoothly. | ||||
Show All 10 Lines | |||||
+// other system that has __unix__ defined, so I cannot possibly test all those cases to | +// other system that has __unix__ defined, so I cannot possibly test all those cases to | ||||
+// make sure things work. We'll just leave it with __linux__ and __FreeBSD__ to be safe. | +// make sure things work. We'll just leave it with __linux__ and __FreeBSD__ to be safe. | ||||
+// If someone with a different flavor of UNIX running a PAE kernel has this problem too, | +// If someone with a different flavor of UNIX running a PAE kernel has this problem too, | ||||
+// they can report the bug and we will adjust the line below accordingly. | +// they can report the bug and we will adjust the line below accordingly. | ||||
+#if defined(__linux__) || defined(__FreeBSD__) | +#if defined(__linux__) || defined(__FreeBSD__) | ||||
#define VM_X86_MMAP | #define VM_X86_MMAP | ||||
#endif | #endif | ||||
@@ -90,7 +108,11 @@ | @@ -90,7 +108,11 @@ void AsmCall(void); | ||||
static void (*const asmCallPtr)(void) = AsmCall; | static void (*const asmCallPtr)(void) = AsmCall; | ||||
+#ifdef __clang__ | +#ifdef __clang__ | ||||
+ int callMask = 0; | + int callMask = 0; | ||||
+#else | +#else | ||||
static int callMask = 0; | static int callMask = 0; | ||||
+#endif | +#endif | ||||
static int instruction, pass; | static int instruction, pass; | ||||
static int lastConst = 0; | static int lastConst = 0; |