[comp.windows.x] Xsun purdue fix

kevinj@boulder.Colorado.EDU (Kevin M. Jackson) (08/21/89)

Many thanks to all those who sent useful replies regarding fixing problems
with the Xsun purdue patches.  For those who missed the first message, the
symptoms are:

        + Server starts up and displays root window.
        + Cursor is activated and works.
        + No xterm appears and cursor dies with the error:

        XIO:  fatal IO error 32 (Broken pipe) on X server "unix:0.0"
              after 38 requests (28 known processed) with 0 events remaining.
              The connection was probably broken by a server shutdown or
              KillClient.

Here are a list of the possible things that could be causing this to break,
and the solutions to them:

Problem:
	/usr/include/dbm.h not updated when patches installed (this can occur
	if you are not root when installing the patches, or if the patches
	are destined for another machine).  
Solution:
	Patch /usr/include/dbm.h or compile oscolor.c with /bin/cc.

Problem:
	Incorrect flags used (the gcc notes for X11 are WRONG).

Solution:
	Use the following flags for gcc: -traditional -fcombine-regs 
	-fstrength-reduce -finline-functions -O -DPURDUE -Dinline=INLINE 
	-DNOSTDHDRS
	Do not use -fpcc-struct-return, as it does not work as advertised. 
	Also, for dix/window.c, do not use -finline-functions (or compile with
	normal cc).

In summary, Here are the items I have in my site.def:

	CC = gcc -traditional -fcombine-regs -fstrength-reduce 
	     -finline-functions
	
	#define OptimizedCDebugFlags -O -DPURDUE -DNO_3_60_CG4 -Dinline=INLINE
	 -D NOSTDHDRS

For my site, i compiled oscolor.c with standard cc and compiled dix/window.c
using gcc without the -finline-functions flag.  This seems to have fixed the
problem, and it is working well.

Thanks to Rolf Halle (rolfh@idt.unit.no), Brian Crowley (brian@amc.com), and
Bert Still (bert@cs.scarolina.edu) for their suggestions.

kevinj <Kevin M. Jackson>
kevinj@boulder.Colorado.EDU