[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: es-0.7 on sun4



great stuff.  thanks so for fixing it.  my apologies for not getting to it.

to anyone on the list who has been having the sun4/control-c problem,
this fix feels right.  for gcc-haters, note that i think that this is
a bug in my code and gcc is right.  (i hate when that happens.)
the real fix is just to eliminate all the consts on gcblocked, and that
will be done in the next release.

> From @prg.ox.ac.uk:peter@robots.oxford.ac.uk Tue Dec  8 14:22:17 1992
> Received: by astro.mv.us.adobe.com; id AA22849; Tue, 8 Dec 92 14:22:16 -0800
> Received: by mail-relay-1.mv.us.adobe.com; id AA03186; Tue, 8 Dec 92 14:20:43 -0800
> Via: uk.ac.oxford.prg; Tue, 8 Dec 1992 22:20:36 +0000
> Received: from uk.ac.oxford.robots.lucrece.robots (lucrece-gate.robots) 
>           by prg.oxford.ac.uk id AA14968; Tue, 8 Dec 92 22:20:20 GMT
> Received: from hotspur.robots.robots 
>           by uk.ac.oxford.robots.lucrece.robots (4.1/robots.1) id AA16325;
>           Tue, 8 Dec 92 22:20:19 GMT
> Date: Tue, 8 Dec 92 22:20:19 GMT
> From: peter@robots.ox.ac.uk (Peter Ho)
> Message-Id: <9212082220.AA16325@uk.ac.oxford.robots.lucrece.robots>
> To: haahr@adobe.com
> Subject: es-0.7 on sun4
> Cc: byron@netapp.com

> Hi,
> 	I decided to have a look at the problem myself as I was getting
> very jealous of those on the mailing list.  I've found it!  The
> reason why the loop in sigint() on line 79 of signal.c didn't terminate
> when gcblocked == 0, was because gcc generated incorrect code due to
> the variable being declared as extern const int.  The fix is to declare
> it as extern int.  It won't dump core now when I type ^C at the prompt :-).

> 	Here's the (trivial) patch (with a massive comment so I can remember
> what I did :-) ).

> 	Hope I wasn't too late for this to be of help,
> 		Pete.

> *** signal.c.dist	Tue Dec  8 21:01:04 1992
> --- signal.c	Tue Dec  8 22:10:19 1992
> ***************
> *** 70,75 ****
> --- 70,83 ----
>   }
>   
>   static sigresult sigint(int sig) {
> + 	/*
> + 	 * declaring extern const int gcblocked caused SunOS4.1.x + gcc
> + 	 * problems with updating gcblocked for the loop at wrong time so loop
> + 	 * was entered even though gcenable() had decremented gcblocked,
> + 	 * declaring it as non-const solves the problem.
> + 	 * peter@robots.ox.ac.uk
> + 	 */
> + 	extern int gcblocked;
>   	assert(sig == SIGINT);
>   	/* this is the newline you see when you hit ^C while typing a command */
>   	if (sigint_newline)