From cc69a08fbfbd64dd13ebb80b18cc83824a3c8781 Mon Sep 17 00:00:00 2001 From: deischen Date: Mon, 13 Mar 2006 00:59:51 +0000 Subject: Add compatibility symbol maps. libpthread (.so.1 and .so.2) used LIBTHREAD_1_0 as its version definition, but now needs to define its symbols in the same namespace used by libc. The compatibility hooks allows you to use libraries and binaries built and linked to libpthread before libc was built with symbol versioning. The shims can be removed if libpthread is given a version bump. Reviewed by: davidxu --- lib/libpthread/thread/thr_mutex.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/libpthread/thread/thr_mutex.c') diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index 0f56069..39e36ff 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -91,6 +91,23 @@ static struct pthread_mutex_attr static_mutex_attr = PTHREAD_MUTEXATTR_STATIC_INITIALIZER; static pthread_mutexattr_t static_mattr = &static_mutex_attr; +LT10_COMPAT_PRIVATE(__pthread_mutex_init); +LT10_COMPAT_PRIVATE(_pthread_mutex_init); +LT10_COMPAT_DEFAULT(pthread_mutex_init); +LT10_COMPAT_PRIVATE(__pthread_mutex_lock); +LT10_COMPAT_PRIVATE(_pthread_mutex_lock); +LT10_COMPAT_DEFAULT(pthread_mutex_lock); +LT10_COMPAT_PRIVATE(__pthread_mutex_timedlock); +LT10_COMPAT_PRIVATE(_pthread_mutex_timedlock); +LT10_COMPAT_DEFAULT(pthread_mutex_timedlock); +LT10_COMPAT_PRIVATE(__pthread_mutex_trylock); +LT10_COMPAT_PRIVATE(_pthread_mutex_trylock); +LT10_COMPAT_DEFAULT(pthread_mutex_trylock); +LT10_COMPAT_PRIVATE(_pthread_mutex_destroy); +LT10_COMPAT_DEFAULT(pthread_mutex_destroy); +LT10_COMPAT_PRIVATE(_pthread_mutex_unlock); +LT10_COMPAT_DEFAULT(pthread_mutex_unlock); + /* Single underscore versions provided for libc internal usage: */ __weak_reference(__pthread_mutex_init, pthread_mutex_init); __weak_reference(__pthread_mutex_lock, pthread_mutex_lock); -- cgit v1.1