$NetBSD: patch-ad,v 1.3 2003/05/27 12:43:17 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