Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2006 15:40:21 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Dag-Erling Smorgrav <des@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, kris@obsecurity.org
Subject:   Re: cvs commit: src/lib/libc/include namespace.h un-namespace.h
Message-ID:  <Pine.GSO.4.43.0603281537580.18701-100000@sea.ntplx.net>
In-Reply-To: <Pine.GSO.4.43.0603281515590.18701-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 28 Mar 2006, Daniel Eischen wrote:

> On Tue, 28 Mar 2006, Dag-Erling Smorgrav wrote:
>
> > des         2006-03-28 16:41:06 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     lib/libc/include     namespace.h un-namespace.h
> >   Log:
> >   Add a bunch of missing pthread functions, and move out-of-order functions.
> >
> >   Revision  Changes    Path
> >   1.19      +64 -6     src/lib/libc/include/namespace.h
> >   1.16      +64 -7     src/lib/libc/include/un-namespace.h
>
> I think this broke (at least) building libpthread.  There are
> several files in src/libpthread/thread/ that use these
> namespace files.
>
> Kris Kennaway wrote in a different thread:
>
> > On 7.0 during buildworld:
> >
> > /usr/src/lib/libpthread/thread/thr_barrier.c:69: error: conflicting types for
> > '_pthread_barrier_init'
> > /usr/src/lib/libpthread/../../include/pthread.h:156: error: previous declaration of
> > '_pthread_barrier_init' was here
> > /usr/src/lib/libpthread/thread/thr_barrier.c:69: error: conflicting types for
> > '_pthread_barrier_init'
> > /usr/src/lib/libpthread/../../include/pthread.h:156: error: previous declaration of
> > '_pthread_barrier_init' was here
> > *** Error code 1
> >
> > Those two declarations are:
> >
> > > int
> > > _pthread_barrier_init(pthread_barrier_t *barrier,
> > >                       const pthread_barrierattr_t *attr, int count)
> >
> > > int             pthread_barrier_init(pthread_barrier_t *,
> > >                         const pthread_barrierattr_t *, unsigned);
> >
> > What is odd is that I can't see how this suddenly broke.
>
> In order to keep the namespace changes, we need to remove the
> use of [un-]namespace.h in these files and add separate declarations
> for the needed _pthread_foo() functions in
> libpthread/thread/thr_private.h.

Oops, I missed the real error above.  The namespace changes just
exposed the incorrect argument type.  POSIX says the 3rd argument
is "unsigned", so <pthread.h> is correct and thr_barrier.c should
be corrected to match.

-- 
DE




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0603281537580.18701-100000>