1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-10 08:58:16 +03:00

applied 2 patches from Albert Chin for module portability Daniel

* xmlmodule.c configure.in: applied 2 patches from Albert Chin for
  module portability
Daniel
This commit is contained in:
Daniel Veillard 2005-10-28 08:44:48 +00:00
parent dbf7bfed8a
commit 1d96f5aa97
3 changed files with 29 additions and 8 deletions

View File

@ -1,3 +1,8 @@
Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xmlmodule.c configure.in: applied 2 patches from Albert Chin for
module portability
Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
* error.c: fixing a portability problem on some old Unices with

View File

@ -724,18 +724,34 @@ if test "$with_modules" != "no" ; then
])
;;
*)
MODULE_EXTENSION=".so"
AC_CHECK_LIB(dld, shl_load, [
AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
AC_CHECK_LIB(dld, shl_load, [
MODULE_PLATFORM_LIBS="-ldld"
libxml_have_shl_load=yes], [
AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
AC_CHECK_LIB(dl, dlopen, [
MODULE_PLATFORM_LIBS="-ldl"
libxml_have_dlopen=yes])])])])
if test "${libxml_have_shl_load}" = "yes"; then
MODULE_EXTENSION=".sl"
WITH_MODULES=1
MODULE_PLATFORM_LIBS="-ldld"
AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
])
fi
AC_CHECK_LIB(dl, dlopen, [
if test "${libxml_have_dlopen}" = "yes"; then
case "${host}" in
*-*-hpux* )
MODULE_EXTENSION=".sl"
;;
* )
MODULE_EXTENSION=".so"
;;
esac
WITH_MODULES=1
MODULE_PLATFORM_LIBS="-ldl"
AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
])
fi
;;
esac
fi

View File

@ -277,7 +277,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
int rc;
errno = 0;
rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol);
rc = shl_findsym(&handle, name, TYPE_PROCEDURE, symbol);
if ((-1 == rc) && (0 == errno)) {
rc = shl_findsym(handle, name, TYPE_DATA, symbol);
}