This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Mon, Jul 03, 2000 at 10:17:07AM +0200, Jakub Jelinek wrote: > Hi! > > libc-lock.h is public header, used by e.g. libstdc++. As such, it cannot use > a non-public header (bp-sym.h). I'm not sure what's the correct fix though, > this patch should make things working at least in the !__BOUNDED_POINTERS__ > case. Other solutions might include distributing bp-sym.h (but in that case > I'd think it would be better not to polute namespace with BP_SYM). > Actually, it is still broken. #pragma does not expand macros, so BP_SYM cannot be used there at all. Either hardcode the bp names into the libc-lock.h file (ifdef __BOUNDED_POINTERS__, leave the current ones if not), or whatever. 2000-07-03 Jakub Jelinek <jakub@redhat.com> * sysdeps/pthread/bits/libc-lock.h: Only include bp-sym.h if in glibc, otherwise define BP_SYM(sym) to sym. Don't use macros in #pragma weak. --- libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h.jj Thu Jun 29 23:24:11 2000 +++ libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h Mon Jul 3 12:22:10 2000 @@ -246,8 +246,12 @@ extern int __pthread_atfork (void (*__pr /* Make the pthread functions weak so that we can elide them from single-threaded processes. */ #ifndef __NO_WEAK_PTHREAD_ALIASES -# include <bp-sym.h> # ifdef weak_extern +# ifdef _LIBC +# include <bp-sym.h> +# else +# define BP_SYM(sym) sym +# endif weak_extern (BP_SYM (__pthread_mutex_init)) weak_extern (BP_SYM (__pthread_mutex_destroy)) weak_extern (BP_SYM (__pthread_mutex_lock)) @@ -272,28 +276,28 @@ weak_extern (__pthread_atfork) weak_extern (BP_SYM (_pthread_cleanup_push_defer)) weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) # else -# pragma weak BP_SYM (__pthread_mutex_init) -# pragma weak BP_SYM (__pthread_mutex_destroy) -# pragma weak BP_SYM (__pthread_mutex_lock) -# pragma weak BP_SYM (__pthread_mutex_trylock) -# pragma weak BP_SYM (__pthread_mutex_unlock) -# pragma weak BP_SYM (__pthread_mutexattr_init) -# pragma weak BP_SYM (__pthread_mutexattr_destroy) -# pragma weak BP_SYM (__pthread_mutexattr_settype) -# pragma weak BP_SYM (__pthread_rwlock_destroy) -# pragma weak BP_SYM (__pthread_rwlock_rdlock) -# pragma weak BP_SYM (__pthread_rwlock_tryrdlock) -# pragma weak BP_SYM (__pthread_rwlock_wrlock) -# pragma weak BP_SYM (__pthread_rwlock_trywrlock) -# pragma weak BP_SYM (__pthread_rwlock_unlock) -# pragma weak BP_SYM (__pthread_key_create) -# pragma weak BP_SYM (__pthread_setspecific) -# pragma weak BP_SYM (__pthread_getspecific) -# pragma weak BP_SYM (__pthread_once) +# pragma weak __pthread_mutex_init +# pragma weak __pthread_mutex_destroy +# pragma weak __pthread_mutex_lock +# pragma weak __pthread_mutex_trylock +# pragma weak __pthread_mutex_unlock +# pragma weak __pthread_mutexattr_init +# pragma weak __pthread_mutexattr_destroy +# pragma weak __pthread_mutexattr_settype +# pragma weak __pthread_rwlock_destroy +# pragma weak __pthread_rwlock_rdlock +# pragma weak __pthread_rwlock_tryrdlock +# pragma weak __pthread_rwlock_wrlock +# pragma weak __pthread_rwlock_trywrlock +# pragma weak __pthread_rwlock_unlock +# pragma weak __pthread_key_create +# pragma weak __pthread_setspecific +# pragma weak __pthread_getspecific +# pragma weak __pthread_once # pragma weak __pthread_initialize # pragma weak __pthread_atfork -# pragma weak BP_SYM (_pthread_cleanup_push_defer) -# pragma weak BP_SYM (_pthread_cleanup_pop_restore) +# pragma weak _pthread_cleanup_push_defer +# pragma weak _pthread_cleanup_pop_restore # endif #endif Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |