summaryrefslogtreecommitdiff
path: root/emulators/xmame/patches/patch-ad
blob: a6c9f4203963f297aa0d29f333f12105234144fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$NetBSD: patch-ad,v 1.4 2003/05/27 12:42:40 kristerw Exp $
--- src/unix/video-drivers/blit.h.orig	Sat May 24 21:36:36 2003
+++ src/unix/video-drivers/blit.h	Tue May 27 13:57:14 2003
@@ -27,6 +27,13 @@
    These routines use long copies so everything should always be long aligned.
 */
 
+#if __GNUC__ <= 2
+/* The massive unrolling in this file causes a memory explosion in
+ * GCC 2.95 (e.g. x11_window.c needas about 450 Mbytes of memory
+ * to compile).  Limit the code unrolling for GCC 2.x. */
+#define BROKEN_COMPILER
+#endif
+
 #ifdef PACK_BITS
 /* scale destptr delta's by 3/4 since we're using 32 bits ptr's for a 24 bits
    dest */
@@ -156,6 +163,7 @@
 
 
 
+#ifndef BROKEN_COMPILER
 case 2:
 #define SCALE_X(X) ((X)*2)
 #ifdef INDIRECT
@@ -265,6 +273,7 @@
 #include "blit_core.h"
 break;
 
+#endif /* #ifndef BROKEN_COMPILER */
 #undef SCALE_X
 #undef COPY_LINE2
 
@@ -517,6 +526,7 @@
 #define SCALE_Y(Y)   ((Y)<<1)
 
 /* 1x2 no scanlines */
+#ifndef BROKEN_COMPILER
 case 0x00102:
 
 #ifdef DOUBLEBUFFER
@@ -958,6 +968,10 @@
 /* This is what happens when you give an assembly-language programmer
    a C compiler.  Thanks to td, of course.                             -JDL */
 
+#endif /* #ifndef BROKEN_COMPILER */
+#undef COPY_LINE2
+#undef SCALE_X
+#undef SCALE_Y
 default:
 
 #ifdef INDIRECT