Alexandre Julliard : explorer:
Work around the latest HAL binary compatibility breakage.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Sep 26 15:04:47 CDT 2006
Module: wine
Branch: master
Commit: 9ae4e8d98efc952918bcdae86b2f640c4b062a3b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9ae4e8d98efc952918bcdae86b2f640c4b062a3b
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Sep 26 20:29:15 2006 +0200
explorer: Work around the latest HAL binary compatibility breakage.
---
configure | 92 -----------------------------------------------
configure.ac | 1 -
include/config.h.in | 3 --
programs/explorer/hal.c | 12 ++++--
4 files changed, 8 insertions(+), 100 deletions(-)
diff --git a/configure b/configure
index 2df837e..619a90e 100755
--- a/configure
+++ b/configure
@@ -17053,98 +17053,6 @@ _ACEOF
fi
- { echo "$as_me:$LINENO: checking for -ldbus-1 soname" >&5
-echo $ECHO_N "checking for -ldbus-1 soname... $ECHO_C" >&6; }
-if test "${ac_cv_lib_soname_dbus_1+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_get_soname_save_LIBS=$LIBS
-LIBS="-ldbus-1 $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dbus_error_init ();
-int
-main ()
-{
-return dbus_error_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- case "$LIBEXT" in
- dylib) ac_cv_lib_soname_dbus_1=`otool -L conftest$ac_exeext | grep libdbus-1\\.[0-9A-Za-z.]*dylib | sed -e "s/^.*\/\(libdbus-1\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
- so) ac_cv_lib_soname_dbus_1=`$ac_cv_path_LDD conftest$ac_exeext | grep libdbus-1\\.so | sed -e "s/^.*\(libdbus-1\.so[^ ]*\).*$/\1/"';2,$d'` ;;
- esac
- if test "x$ac_cv_lib_soname_dbus_1" = "x"
- then
- ac_cv_lib_soname_dbus_1="libdbus-1.$LIBEXT"
- fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_soname_dbus_1="libdbus-1.$LIBEXT"
-fi
-
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_get_soname_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_dbus_1" >&5
-echo "${ECHO_T}$ac_cv_lib_soname_dbus_1" >&6; }
-if test "${ac_cv_lib_soname_dbus_1+set}" = set; then
-
-cat >>confdefs.h <<_ACEOF
-#define SONAME_LIBDBUS_1 "$ac_cv_lib_soname_dbus_1"
-_ACEOF
-
-fi
-
{ echo "$as_me:$LINENO: checking for -lhal soname" >&5
echo $ECHO_N "checking for -lhal soname... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_hal+set}" = set; then
diff --git a/configure.ac b/configure.ac
index f7246c0..0ccb9d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1137,7 +1137,6 @@ then
WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
- WINE_GET_SONAME(dbus-1,dbus_error_init)
WINE_GET_SONAME(hal,libhal_ctx_new)
WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
WINE_GET_SONAME(cups,cupsGetDefault)
diff --git a/include/config.h.in b/include/config.h.in
index 7f0a419..3869898 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -977,9 +977,6 @@ #undef SONAME_LIBCUPS
/* Define to the soname of the libcurses library. */
#undef SONAME_LIBCURSES
-/* Define to the soname of the libdbus-1 library. */
-#undef SONAME_LIBDBUS_1
-
/* Define to the soname of the libfontconfig library. */
#undef SONAME_LIBFONTCONFIG
diff --git a/programs/explorer/hal.c b/programs/explorer/hal.c
index adb1281..bcb1d98 100644
--- a/programs/explorer/hal.c
+++ b/programs/explorer/hal.c
@@ -88,13 +88,17 @@ #undef DO_FUNC
static BOOL load_functions(void)
{
- void *dbus_handle, *hal_handle;
+ void *hal_handle;
char error[128];
- if (!(dbus_handle = wine_dlopen(SONAME_LIBDBUS_1, RTLD_NOW, error, sizeof(error)))) goto failed;
- if (!(hal_handle = wine_dlopen(SONAME_LIBHAL, RTLD_NOW, error, sizeof(error)))) goto failed;
+ /* Load libhal with RTLD_GLOBAL so that the dbus symbols are available.
+ * We can't load libdbus directly since libhal may have been built against a
+ * different version but with the same soname. Binary compatibility is for wimps. */
-#define DO_FUNC(f) if (!(p_##f = wine_dlsym( dbus_handle, #f, error, sizeof(error) ))) goto failed
+ if (!(hal_handle = wine_dlopen(SONAME_LIBHAL, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error))))
+ goto failed;
+
+#define DO_FUNC(f) if (!(p_##f = wine_dlsym( RTLD_DEFAULT, #f, error, sizeof(error) ))) goto failed
DBUS_FUNCS;
#undef DO_FUNC
More information about the wine-cvs
mailing list