Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site aesat.UUCP
Path: utzoo!aesat!bmw
From: bmw@aesat.UUCP (Bruce Walker)
Newsgroups: net.unix-wizards
Subject: Re: HELP! Can't Compile Netnews Code (on S8000)
Message-ID: <331@aesat.UUCP>
Date: Tue, 22-Jan-85 13:13:07 EST
Article-I.D.: aesat.331
Posted: Tue Jan 22 13:13:07 1985
Date-Received: Tue, 22-Jan-85 17:16:53 EST
References: <1658@proper.UUCP>
Organization: AES Data Inc., Mississauga Ont., Canada
Lines: 41

>
> I am having problems getting the Netnews software up and running
> on my system.  I am using a Zilog System 8000.
> 
> There is an include file 'setjmp.h' which my system doesn't
> have.
>                                   Brian Day
> UUCP:  philabs!exquisit!brian
> 

On the System 8000 (Z8000-based) Zilog implimented the C parameter passing
convention differently from the "standard" method of passing everything on the
stack.  Instead, the first several parameters (varies depending on operand
sizes) are passed in certain defined CPU registers (with the rest passed on
the stack).  Because of this, they decided to impliment a "restricted" version
of setjmp(3) and longjmp(3) which they call setret(3) and longret(3).  The
restriction on their use is that setret() must not be called from any routine
which contains "register" variables.

To fix readnews, you must edit each file that contains "setjmp", "longjmp" or
"jmpbuf" (a typedef), and replace each with its corresponding Zilog equiv.:
"setret", "longret" and "retbuf" respectively.  Also, wherever "setjmp()" (now
setret()) appeared in a routine, you must alter any "register" declarations to
make them plain-jane declarations; eg:

	register char frobozz;
	register footpad;

become:

	char frobozz;
	int footpad;

... also: don't forget to change "#include " to "#include "
wherever that may appear.

Good luck!


Bruce Walker     {allegra,ihnp4,linus,decvax}!utzoo!aesat!bmw