mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
check for systems with broken RTLD_GLOBAL.
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org> * configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems with broken RTLD_GLOBAL. Sat Feb 17 07:33:21 2001 Tim Janik <timj@gtk.org> * gmodule-dl.c: fix systems with broken RTLD_GLOBAL.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:33:44 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_BROKEN_RTLD_GLOBAL): check for systems
|
||||
with broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-02 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* garray.h (g_array_append_val, g_array_prepend_val,
|
||||
|
32
configure.in
32
configure.in
@@ -481,6 +481,7 @@ G_MODULE_LIBS=
|
||||
G_MODULE_LDFLAGS=
|
||||
dnl G_MODULE_IMPL= don't reset, so cmd-line can override
|
||||
G_MODULE_NEED_USCORE=0
|
||||
G_MODULE_BROKEN_RTLD_GLOBAL=0
|
||||
G_MODULE_HAVE_DLERROR=0
|
||||
dnl *** dlopen() and dlsym() in system libraries
|
||||
if test -z "$G_MODULE_IMPL"; then
|
||||
@@ -533,6 +534,36 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
|
||||
LDFLAGS_orig="$LDFLAGS"
|
||||
LIBS="$LIBS $G_MODULE_LIBS"
|
||||
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
|
||||
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
|
||||
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
|
||||
glib_cv_rtldglobal_broken,[
|
||||
AC_TRY_RUN([
|
||||
#include <dlfcn.h>
|
||||
#ifndef RTLD_GLOBAL
|
||||
#define RTLD_GLOBAL 0
|
||||
#endif
|
||||
#ifndef RTLD_LAZY
|
||||
#define RTLD_LAZY 0
|
||||
#endif
|
||||
int pthread_create;
|
||||
int main () {
|
||||
void *handle, *global, *local;
|
||||
global = &pthread_create;
|
||||
handle = dlopen ("libpthread.so", RTLD_GLOBAL | RTLD_LAZY);
|
||||
if (!handle) return 0;
|
||||
local = dlsym (handle, "pthread_create");
|
||||
return global == local;
|
||||
}],
|
||||
[glib_cv_rtldglobal_broken=no],
|
||||
[glib_cv_rtldglobal_broken=yes],
|
||||
[])
|
||||
rm -f plugin.c plugin.o plugin.lo
|
||||
])
|
||||
if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
|
||||
G_MODULE_BROKEN_RTLD_GLOBAL=1
|
||||
else
|
||||
G_MODULE_BROKEN_RTLD_GLOBAL=0
|
||||
fi
|
||||
dnl *** check whether we need preceeding underscores
|
||||
AC_MSG_CHECKING(for preceeding underscore in symbols)
|
||||
AC_CACHE_VAL(glib_cv_uscore,[
|
||||
@@ -575,6 +606,7 @@ AC_SUBST(G_MODULE_LIBS)
|
||||
AC_SUBST(G_MODULE_LDFLAGS)
|
||||
AC_SUBST(G_MODULE_HAVE_DLERROR)
|
||||
AC_SUBST(G_MODULE_NEED_USCORE)
|
||||
AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
|
||||
AC_SUBST(GLIB_DEBUG_FLAGS)
|
||||
|
||||
|
||||
|
@@ -1,3 +1,7 @@
|
||||
Sat Feb 17 07:33:21 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmodule-dl.c: fix systems with broken RTLD_GLOBAL.
|
||||
|
||||
2000-07-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* gmodule.h: include glib.h before doing extern "C". Makes some
|
||||
|
@@ -58,15 +58,19 @@
|
||||
* RTLD_GLOBAL - the external symbols defined in the library will be made
|
||||
* available to subsequently loaded libraries.
|
||||
*/
|
||||
#ifndef RTLD_GLOBAL
|
||||
#define RTLD_GLOBAL 0
|
||||
#endif /* RTLD_GLOBAL */
|
||||
#ifndef RTLD_LAZY
|
||||
#define RTLD_LAZY 1
|
||||
#endif /* RTLD_LAZY */
|
||||
#ifndef RTLD_NOW
|
||||
#define RTLD_NOW 0
|
||||
#endif /* RTLD_NOW */
|
||||
/* some systems (OSF1 V5.0) have broken RTLD_GLOBAL linkage */
|
||||
#ifdef G_MODULE_BROKEN_RTLD_GLOBAL
|
||||
#undef RTLD_GLOBAL
|
||||
#endif /* G_MODULE_BROKEN_RTLD_GLOBAL */
|
||||
#ifndef RTLD_GLOBAL
|
||||
#define RTLD_GLOBAL 0
|
||||
#endif /* RTLD_GLOBAL */
|
||||
|
||||
|
||||
/* --- functions --- */
|
||||
|
@@ -38,6 +38,9 @@ extern "C" {
|
||||
#if (@G_MODULE_NEED_USCORE@) || defined (hp9000s300) || defined (__hp9000s300) || defined (__hp9000s300__)
|
||||
#define G_MODULE_NEED_USCORE
|
||||
#endif
|
||||
#if (@G_MODULE_BROKEN_RTLD_GLOBAL@)
|
||||
#define G_MODULE_BROKEN_RTLD_GLOBAL
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user