From owner-svn-src-head@FreeBSD.ORG Fri Mar 20 15:32:34 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B02106566B; Fri, 20 Mar 2009 15:32:34 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id F29248FC1D; Fri, 20 Mar 2009 15:32:33 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n2KFY5Pv062737; Fri, 20 Mar 2009 11:34:05 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n2KFY5Eh062736; Fri, 20 Mar 2009 11:34:05 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 20 Mar 2009 11:34:05 -0400 From: David Schultz To: Vasil Dimov Message-ID: <20090320153405.GA62675@zim.MIT.EDU> Mail-Followup-To: Vasil Dimov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <200903142010.n2EKAESF006945@svn.freebsd.org> <20090320140015.GA17645@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090320140015.GA17645@hub.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r189828 - in head: include sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 15:32:34 -0000 On Fri, Mar 20, 2009, Vasil Dimov wrote: > On Sat, Mar 14, 2009 at 08:10:14PM +0000, David Schultz wrote: > > Author: das > > Date: Sat Mar 14 20:10:14 2009 > > New Revision: 189828 > > URL: http://svn.freebsd.org/changeset/base/189828 > > > > Log: > > Fix the visibility of several prototypes. Also move pthread_kill() and > > pthread_sigmask() to signal.h. In principle, this shouldn't break anything, > [...] > > But it did break, see http://www.freebsd.org/cgi/query-pr.cgi?pr=132828 > > I think one's namespace shouldn't be polluted with the prototype of > pthread_kill() if he has not included pthread.h. The pthreads API has always defined pthread_kill() to be in signal.h, not pthread.h. This is what is done in glibc and elsewhere. GNU Pth has some bogus and extremely unportable hacks to ``trick'' system headers into not declaring symbols: /* * Prevent system includes from implicitly including * possibly existing vendor Pthread headers */ #define PTHREAD #define PTHREAD_H #define _PTHREAD_T #define _PTHREAD_H #define _PTHREAD_H_ #define PTHREAD_INCLUDED #define _PTHREAD_INCLUDED #define SYS_PTHREAD_H #define _SYS_PTHREAD_H #define _SYS_PTHREAD_H_ #define SYS_PTHREAD_INCLUDED #define _SYS_PTHREAD_INCLUDED #define BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H_ #define _BITS_SIGTHREAD_H The one that works for glibc is _BITS_SIGTHREAD_H. I'd rather not be complicit in these shenanigans, but if we can't easily fix the problem in Pth, I suppose we can teach signal.h about one of these bogus macros. What do you think?