From 8a3d666da390b1356f5545649e23bda7ccb6d710 Mon Sep 17 00:00:00 2001 From: Diego 'Flameeyes' Pettenò Date: Fri, 8 Aug 2008 12:39:04 +0200 Subject: Fix building again libtool/ltdl 2.2.4. On changeset f1d2bf84089b1e5b5988a5e5d6d571a507a52337 support for libtool 2.2 was broken as libtool_set_error was not defined anymore on that version. Fix this by also putting under #ifdef the calls to that function. --- src/daemon/ltdl-bind-now.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c index 40077248..1215d125 100644 --- a/src/daemon/ltdl-bind-now.c +++ b/src/daemon/ltdl-bind-now.c @@ -102,7 +102,9 @@ static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise ad pa_assert(fname); if (!(m = dlopen(fname, PA_BIND_NOW))) { +#ifdef HAVE_LT_DLMUTEX_REGISTER libtool_set_error(dlerror()); +#endif return NULL; } @@ -114,7 +116,9 @@ static int bind_now_close(lt_user_data d, lt_module m) { pa_assert(m); if (dlclose(m) != 0){ +#ifdef HAVE_LT_DLMUTEX_REGISTER libtool_set_error(dlerror()); +#endif return 1; } @@ -128,7 +132,9 @@ static lt_ptr bind_now_find_sym(lt_user_data d, lt_module m, const char *symbol) pa_assert(symbol); if (!(ptr = dlsym(m, symbol))) { +#ifdef HAVE_LT_DLMUTEX_REGISTER libtool_set_error(dlerror()); +#endif return NULL; } -- cgit From daf3e8b97d09d85d51eac34b9d5acf4545d03a2d Mon Sep 17 00:00:00 2001 From: Diego 'Flameeyes' Pettenò Date: Fri, 8 Aug 2008 14:03:54 +0200 Subject: Create a new macro for checking compiler support for TLS. Create a new macro that can be shared between projects to check for __thread support by the compiler. This macro might come useful for xine-lib too so I want to keep it separate for easier importing it over. Name the defined macro SUPPORT_TLS___THREAD to follow the same style as the checks from attributes.m4. --- src/pulsecore/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pulsecore/thread.h b/src/pulsecore/thread.h index f3aca13e..87e850d6 100644 --- a/src/pulsecore/thread.h +++ b/src/pulsecore/thread.h @@ -86,7 +86,7 @@ void *pa_tls_set(pa_tls *t, void *userdata); } \ struct __stupid_useless_struct_to_allow_trailing_semicolon -#ifdef HAVE_TLS_BUILTIN +#ifdef SUPPORT_TLS___THREAD /* An optimized version of the above that requires no dynamic * allocation if the compiler supports __thread */ #define PA_STATIC_TLS_DECLARE_NO_FREE(name) \ -- cgit