Subject: Fix for stippled fill crash of X11R5 XhpBSD
To: None <port-hp300@netbsd.org>
From: Jason Downs <downsj@downsj.com>
List: port-hp300
Date: 10/18/2001 15:57:56
Hi guys,
A couple of years ago I started debugging the X server again for some odd
reason. I actually produced a working XhpBSD binary, and threw it up on
my web pages for people to play with. And then promptly got distracted by
other things, and the changes forgotten about.
I was reminded of this today, and dug them out. I figured I'd share them
with all of you as well, in case you still don't have a working native X
server.
There are two very small diffs here. They work with X11R5, as provided
from ftp.x.org and with the hpbsd files from the 4.4-Lite CD. The issues of
building X11R5 on a modern system I'm not going to go into here, and other
changes that have been previously posted on various mailing lists over the
years I will not go into here.
My memory is a little fuzzy, but I will attempt to provide some explanation of
the changes.
First, kill the asm code in hpbsd/cfb/cfbglblt8.c:
*** cfbglblt8.c Thu Oct 18 13:36:13 2001
--- mit/server/ddx/hpbsd/cfb/cfbglblt8.c Sun May 2 23:22:19 1999
***************
*** 81,88 ****
--- 81,90 ----
#define USE_STIPPLE_CODE
#endif
+ #if 0
#if defined(__GNUC__) && !defined(GLYPHROP) && (defined(mc68020) || defined(mc68000) || defined(__mc68000__)) && !defined(USE_LEFTBITS)
#include <stip68kgnu.h>
+ #endif
#endif
void
I believe I did this mostly for debugging reasons.
Then, kill this if() in hpbsd/topcat/topcatgc.c:
*** topcatgc.c Thu Oct 18 13:38:04 2001
--- mit/server/ddx/hpbsd/topcat/topcatgc.c Thu Oct 18 15:38:54 2001
***************
*** 808,819 ****
--- 808,823 ----
{
int width = pGC->stipple->drawable.width;
+ #if 0
if ((width <= 32) && !(width & (width - 1)))
{
+ #endif
mfbCopyRotatePixmap(pGC->stipple,
&devPriv->pRotatedPixmap, xrot, yrot);
new_pix = TRUE;
+ #if 0
}
+ #endif
}
break;
#endif
I recall that my thoughts at the time were that the gcc used in 4.4BSD was
compiling the test such that the enclosed code was always being executed.
This is the part that actually fixes the X server.
Anyway, I don't read this list, so I have no idea what your current status
wrt the X11R5 server actually is. If this helps, great, if not...
--
Jason Downs
downsj@downsj.com
Think securely. http://www.openbsd.org/