From owner-freebsd-current Mon Feb 11 19:48:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from newman2.bestweb.net (newman2.bestweb.net [209.94.102.67]) by hub.freebsd.org (Postfix) with ESMTP id A294537B659 for ; Mon, 11 Feb 2002 18:19:13 -0800 (PST) Received: from okeeffe.bestweb.net (okeefe.bestweb.net [209.94.100.110]) by newman2.bestweb.net (Postfix) with ESMTP id 871EC23006; Mon, 11 Feb 2002 21:18:08 -0500 (EST) Received: by okeeffe.bestweb.net (Postfix, from userid 0) id AE7B99F3DE; Mon, 11 Feb 2002 21:12:46 -0500 (EST) Date: Mon, 11 Feb 2002 10:14:04 -0500 (EST) From: Daniel Eischen To: Bruce Evans Cc: Kevin Day , current@FreeBSD.ORG, Subject: Re: function name collision on "getcontext" with ports/editors/joe Message-Id: <20020212021246.AE7B99F3DE@okeeffe.bestweb.net> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 11 Feb 2002, Bruce Evans wrote: > On Sun, 10 Feb 2002, Daniel Eischen wrote: > > > On Mon, 11 Feb 2002, Bruce Evans wrote: > > > includes for the normal namespace > > > pollution that was needed to use sigreturn(2) (except sigreturn(2) > > > itself isn't actually declared anywhere). Including > > > gives the corresponding namespace pollution for using the current > > > sigreturn(2). This is probably a mistake. (Don't believe the > > > sigreturn man page; it documents osigreturn(2) for the i386 only.) > > > Programs shouldn't have any problems with this, since they should > > > define _POSIX_SOURCE if they only want the POSIX namespace ;-). > > > > Poking about on a Solaris 8 system shows that they have a > > that defines the {get,set,make,swap}context > > prototypes. also includes > > to get the definitions for ucontext_t. > > is just as nonstandard as . > > > Under FreeBSD, is a link to , > > which both declare ucontext_t and {get,set,make,swap}context. > > The link part is intentional. We have to have for > use in the kernel, so it is simpler not to have a separate user > header. The only advantage of the Solaris implementation is that > it punishes applications that include the nonstandard header. > > > What do you recommend we do? Should we not include > > from , or do what Solaris does, or just leave > > everything as is? > > Don't include from , and fix whatever > breaks. I think applications that use the new sigreturn can be required > to include both and . There should be fewer > of them than there used to be -- they can now use setcontext(). The > old sigcontext/sigreturn stuff should be cleaned up too (don't export > it to userland). It breaks more than that. Applications that just want to use sigaction, sigaltstack, etc, only need to include , but that also defines sigreturn as: int sigreturn __P((ucontext_t *)); Removing from prevents ucontext_t from being defined, so all users of would choke. We can change the prototype of sigreturn back to struct sigcontext *, or just forward declare ucontext_t in or . -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message