Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site hou3c.UUCP
Path: utzoo!watmath!clyde!burl!hou3c!ka
From: ka@hou3c.UUCP (Kenneth Almquist)
Newsgroups: net.lang.c
Subject: Re: Re: What is the setjump call
Message-ID: <869@hou3c.UUCP>
Date: Sat, 13-Oct-84 18:41:32 EDT
Article-I.D.: hou3c.869
Posted: Sat Oct 13 18:41:32 1984
Date-Received: Sun, 14-Oct-84 07:55:50 EDT
References: <2528@ihldt.UUCP> <169@rlgvax.UUCP>
Organization: Bell Labs, Holmdel, NJ
Lines: 14

> The "libPW" library on System V Release 2 (and, presumably, all earlier
> versions) calls "longjmp" with only one argument; this works (I presume)
> on System V on the VAX-11 by sheer accident, as there must have been a
> non-zero value on the stack at the point where "longjmp" expected its
> argument.

Actually, the fact that longjmp works with one argument is not an
accident.  The SVR2 manual page for setjmp states, "If longjmp is
invoked with a second argument of 0, setjmp will return 1."  This
was done to make the two argument version of setjmp backward com-
patable with the one argument version.  The BSD version of setjmp
does not do this, so you have to convert all longjmp calls to use
two arguments when porting code to Berkely UN*X.
				Kenneth Almquist