#ifndef SHARED in pthread.h
Carlos O'Donell
carlos@systemhalted.org
Sat Jun 2 17:26:00 GMT 2012
On Fri, Jun 1, 2012 at 1:57 PM, Roland McGrath <roland@hack.frob.com> wrote:
> I just noticed in nptl/sysdeps/pthread/pthread.h:
>
> /* Internal interface to initiate cleanup. */
> extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
> __cleanup_fct_attribute __attribute__ ((__noreturn__))
> # ifndef SHARED
> __attribute__ ((__weak__))
> # endif
> ;
>
> This is using the internal macro SHARED in a public header, which is bad.
> This is inside the #else of:
>
> #if defined __GNUC__ && defined __EXCEPTIONS
>
> which I think will always be true when building libc itself.
>
> So perhaps this conditional should just go away?
>
> But I'm not really clear on all the details here.
Right, the use of SHARED is bad.
There is a hidden definition of __pthread_unwind_next in nptl/unwind.c.
Where would a second definition of __pthread_unwind_next come from?
Cheers,
Carlos.
More information about the Libc-alpha
mailing list