[comp.windows.x] X11R4 gcc-1.36 SunOS 4.0.3 puzzle

cbcscmrs@mx.csun.edu (Mike Stump) (02/08/90)

puzzle will dump core if gcc-1.36 is used on a Sun3 running SunOS 4.0.3

To fix, use /bin/cc
--
If I can get mail to you via a legally registered fully qualified
domain name, you could be on Saturn for all I care.

		-- Bob Sutterfield <bob@MorningStar.Com>

weening@Gang-of-Four.Stanford.EDU (Joe Weening) (02/08/90)

In article <1990Feb8.010833.20242@ucselx.sdsu.edu> cbcscmrs@mx.csun.edu (Mike Stump) writes:

   puzzle will dump core if gcc-1.36 is used on a Sun3 running SunOS 4.0.3

   To fix, use /bin/cc

Reason: puzzle calls sscanf() with a constant string argument.
Fix: use gcc -fwritable-strings.

--
Joe Weening                                Computer Science Dept.
weening@Gang-of-Four.Stanford.EDU          Stanford University

kaleb@mars.jpl.nasa.gov (Kaleb Keithley) (02/09/90)

In article <1990Feb8.010833.20242@ucselx.sdsu.edu> cbcscmrs@mx.csun.edu (Mike Stump) writes:
>puzzle will dump core if gcc-1.36 is used on a Sun3 running SunOS 4.0.3
>
>To fix, use /bin/cc

Maybe I have a line eater, because the above is what I got, and it doesn't
make much sense!  If it means what I think it means, then the answer is:

Compile the following with cc
os/4.2bsd/oscolor.c
dix/window.c
ddx/mi/mifillarc.c
ddx/cfb/cfbwindow.c

Don't forget, for "real" optimization, specify -O2 on 680x0 machines.


Chewey, get us outta here!
                 
kaleb@mars.jpl.nasa.gov            Jet Propeller Labs
Kaleb Keithley

jonas@cd.chalmers.se. (Jonas Olsson) (02/10/90)

In article <2776@jato.Jpl.Nasa.Gov> kaleb@mars.UUCP (Kaleb Keithley) writes:
>In article <1990Feb8.010833.20242@ucselx.sdsu.edu> cbcscmrs@mx.csun.edu (Mike Stump) writes:
>>puzzle will dump core if gcc-1.36 is used on a Sun3 running SunOS 4.0.3
>>
>>To fix, use /bin/cc
>
>Maybe I have a line eater, because the above is what I got, and it doesn't
>make much sense!  If it means what I think it means, then the answer is:
>
>Compile the following with cc
>os/4.2bsd/oscolor.c
>dix/window.c
>ddx/mi/mifillarc.c
>ddx/cfb/cfbwindow.c
>
I have compiled the entire server with some different flavors of gcc,
and for all of them I have had a problem that wide lines are not drawn
as lines, but as filled areas with the line as the left delimiter and
the right edge of the window as the right. This occurs on both Sun2 and
Sun3 systems and the following versions of gcc: 1.36, 1.36.93, 1.36.94.
Fix 1 to the server didn't affect this.

The flags I have been using for compiling the server are:
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O

I have found that it is the file 'ddx/mi/miwideline.c' that causes above
mentioned problem, if I use cc -O4 for it everything works OK, but if I
try to use gcc with any combination of flags the problem occurs.

But the files namned by Kaleb Keithley haven't given me any problems.
I think -fpcc-struct-return combined with running fixincludes solves most
problems. If anyone have encountered any similar problem, and have found out
Anything more about it Please let me know.

In SunOS 3.2 The XDMCP code doesn'nt work, and in in SunOS 3.5 os/4.2bsd/xdmcp.c
fails to compile with gcc (at least on Sun2 with a bit too old files
created by fixinclude).

Regards Jonas Olsson
Jonas Olsson			Tel: 031-205955, 010-846031
email:	jonas@cd.chalmers.se,	jonas@ce.chalmers.se,
	jonas@sisug.sisu.se,	jonas@myab.se

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (02/11/90)

>> puzzle will dump core if gcc-1.36 is used on a Sun3 running SunOS
>> 4.0.3
>> To fix, use /bin/cc

> Reason: puzzle calls sscanf() with a constant string argument.
> Fix: use gcc -fwritable-strings.

Proper fix: use a non-broken stdio that doesn't stamp on strings passed
to sscanf().  (Finding such a stdio may not be entirely trivial, alas.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu