From 634e4a58c6927c6d14673dae6cce479c7f1d9055 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 21 Oct 1998 18:04:47 +0000 Subject: [PATCH] reverted part of the changes from Sebastian Wilhelmi (1998-10-20). don't Wed Oct 21 19:22:58 1998 Tim Janik * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. changed the return value from (!f2 && f1) to (!f2 || f1) so we default to not needing an underscore. reverted the extra plugin.c building, because .lo files are not ELF libraries, this can't work. This needs further investigation on Solaris... Wed Oct 21 19:58:27 1998 Tim Janik * gmodule.c (g_module_symbol): fixed a string pointer bug that could cause garbage error messages from g_module_symbol() for systems that NEED_USCORE. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-12 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ configure.in | 7 +++---- gmodule/ChangeLog | 6 ++++++ gmodule/gmodule.c | 10 +++++++--- 11 files changed, 96 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index db364d42..e4a7a34f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index db364d42..e4a7a34f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Wed Oct 21 19:22:58 1998 Tim Janik + + * configure.in (G_MODULE_HAVE_DLERROR): reverted part of the changes + from Sebastian Wilhelmi (1998-10-20). don't specify a specific loading + behaviour (i.e. RTLD_NOW) when we are not sure whether it is supplied. + changed the return value from (!f2 && f1) to (!f2 || f1) so we default + to not needing an underscore. reverted the extra plugin.c building, + because .lo files are not ELF libraries, this can't work. This needs + further investigation on Solaris... + Wed Oct 21 17:03:05 1998 Tim Janik * glib.h: diff --git a/configure.in b/configure.in index d4235c2a..e840ba28 100644 --- a/configure.in +++ b/configure.in @@ -433,17 +433,16 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then dnl *** check whether we need preceeding underscores AC_MSG_CHECKING(for preceeding underscore in symbols) AC_CACHE_VAL(glib_cv_uscore,[ - echo "int glib_underscore_test (void) { return 42; }" >plugin.c - ./libtool --mode=compile $CC -c plugin.c >/dev/null 2>&1 AC_TRY_RUN([ #include + int glib_underscore_test (void) { return 42; } int main() { void *f1 = (void*)0, *f2 = (void*)0, *handle; - handle = dlopen ("./plugin.lo", RTLD_NOW ); + handle = dlopen ((void*)0, 0); if (handle) { f1 = dlsym (handle, "glib_underscore_test"); f2 = dlsym (handle, "_glib_underscore_test"); - } return (!f2 && f1); + } return (!f2 || f1); }], glib_cv_uscore=yes, glib_cv_uscore=no, diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog index 07493b40..fecf1d99 100644 --- a/gmodule/ChangeLog +++ b/gmodule/ChangeLog @@ -1,3 +1,9 @@ +Wed Oct 21 19:58:27 1998 Tim Janik + + * gmodule.c (g_module_symbol): fixed a string pointer bug that could + cause garbage error messages from g_module_symbol() for systems that + NEED_USCORE. + Mon Sep 21 01:54:48 1998 Tim Janik * gmodule.h: diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c index 17133ffb..bb00ddef 100644 --- a/gmodule/gmodule.c +++ b/gmodule/gmodule.c @@ -319,9 +319,13 @@ g_module_symbol (GModule *module, g_return_val_if_fail (symbol != NULL, FALSE); #ifdef G_MODULE_NEED_USCORE - symbol_name = g_strconcat ("_", symbol_name, NULL); - *symbol = _g_module_symbol (module->handle, symbol_name); - g_free (symbol_name); + { + gchar *name; + + name = g_strconcat ("_", symbol_name, NULL); + *symbol = _g_module_symbol (module->handle, name); + g_free (name); + } #else /* !G_MODULE_NEED_USCORE */ *symbol = _g_module_symbol (module->handle, symbol_name); #endif /* !G_MODULE_NEED_USCORE */ -- 2.34.1