From owner-freebsd-current Mon Feb 11 7:14:13 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id D11C837B416; Mon, 11 Feb 2002 07:14:07 -0800 (PST) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.1/8.12.1) with ESMTP id g1BFE4oe017600; Mon, 11 Feb 2002 10:14:04 -0500 (EST) Date: Mon, 11 Feb 2002 10:14:04 -0500 (EST) From: Daniel Eischen To: Bruce Evans Cc: Kevin Day , current@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: function name collision on "getcontext" with ports/editors/joe In-Reply-To: <20020211114221.H10505-100000@gamplex.bde.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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