[net.unix-wizards] HELP! Can't Compile Netnews Code

bmw@aesat.UUCP (Bruce Walker) (01/22/85)

>
> 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 <setjmp.h>" to "#include <setret.h>"
wherever that may appear.

Good luck!


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