Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2002 17:20:06 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Dan Eischen <eischen@vigrid.com>
Cc:        <arch@freebsd.org>
Subject:   Re: Request for review: getcontext, setcontext, etc
Message-ID:  <Pine.BSF.4.33.0201071717510.94490-100000@herring.nlsystems.com>
In-Reply-To: <3C39A340.81AD7F4C@vigrid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 7 Jan 2002, Dan Eischen wrote:

> Doug Rabson wrote:
> > The other difference with the linux version is that it uses va_arg(ap,
> > long) to read the arguments instead of va_arg(ap, int) which makes it
> > possible to pass 64bit arguments. The SUSv2 spec document does seem to
> > suggest that the arguments must be integers which makes the linux
> > behaviour wrong although its probably more useful than truncating
> > everything to 32bits.
>
> Well, even the new IEEE ratified POSIX spec suggests the parameters
> are integers:
>
>   "The application shall ensure that the value of argc matches
>    the number of integer arguments passed to func; otherwise,
>    the behavior is undefined."
>
> I don't care; if you want to use long arguments, I can change it...

Hmm. It says 'integer' not 'int' which seems to allow some flexibility. I
think it probably does intend 'int' but that makes it pretty useless for
passing pointers etc. In my opinion the arguments should 'uintptr_t' or
similar.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0201071717510.94490-100000>