From owner-freebsd-arch Mon Jan 7 9:21:29 2002 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by hub.freebsd.org (Postfix) with ESMTP id A181237B404 for ; Mon, 7 Jan 2002 09:21:23 -0800 (PST) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 16NdSc-000Npm-0V; Mon, 7 Jan 2002 17:21:22 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.2/8.11.2) with ESMTP id g07HK6995375; Mon, 7 Jan 2002 17:20:06 GMT (envelope-from dfr@nlsystems.com) Date: Mon, 7 Jan 2002 17:20:06 +0000 (GMT) From: Doug Rabson To: Dan Eischen Cc: Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <3C39A340.81AD7F4C@vigrid.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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