svn commit: r189828 - in head: include sys/sys

David Schultz das at FreeBSD.ORG
Fri Mar 20 08:32:34 PDT 2009

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:
> > 
> > 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
> 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

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 SYS_PTHREAD_H
  #define _SYS_PTHREAD_H
  #define _SYS_PTHREAD_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?

More information about the svn-src-head mailing list