cvs commit: src/lib/libc/include namespace.h un-namespace.h

Dag-Erling Smørgrav des at des.no
Tue Mar 28 21:35:39 UTC 2006


Daniel Eischen <deischen at freebsd.org> writes:
> I think this broke (at least) building libpthread.  There are
> several files in src/libpthread/thread/ that use these
> namespace files.

My bad.  I shouldn't have committed this yet: the patch is correct,
but requires other changes in libthr and libpthread.

> Kris Kennaway wrote in a different thread:
>> /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.

no, my commit did exactly what it was intended to do: the mismatch
between prototype and definition is a bug that went undetected because
the barrier functions were missing from {,un-}namespace.h.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the cvs-all mailing list