mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
add check for broken RTLD_GLOBAL (on OSF1 V5.0).
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org> * configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL (on OSF1 V5.0). Sat Feb 17 07:27:15 2001 Tim Janik <timj@gtk.org> * gmodule.c: work around platforms that have broken RTLD_GLOBAL.
This commit is contained in:
parent
bbc5a3adac
commit
80d0c742e5
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
@ -1,3 +1,8 @@
|
||||
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
|
||||
(on OSF1 V5.0).
|
||||
|
||||
2001-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* acconfig.h, configure.in: Reverted the changes necessary to
|
||||
|
33
configure.in
33
configure.in
@ -676,6 +676,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_CACHE_CHECK([for preceeding underscore in symbols],
|
||||
glib_cv_uscore,[
|
||||
@ -708,7 +738,7 @@ dnl *** check for having dlerror()
|
||||
[G_MODULE_HAVE_DLERROR=0])
|
||||
LIBS="$LIBS_orig"
|
||||
fi
|
||||
dnl *** done, have e got an implementation?
|
||||
dnl *** done, have we got an implementation?
|
||||
if test -z "$G_MODULE_IMPL"; then
|
||||
G_MODULE_IMPL=0
|
||||
fi
|
||||
@ -733,6 +763,7 @@ AC_SUBST(G_MODULE_LIBS_EXTRA)
|
||||
AC_SUBST(G_MODULE_PLUGIN_LIBS)
|
||||
AC_SUBST(G_MODULE_LDFLAGS)
|
||||
AC_SUBST(G_MODULE_HAVE_DLERROR)
|
||||
AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
|
||||
AC_SUBST(G_MODULE_NEED_USCORE)
|
||||
AC_SUBST(GLIB_DEBUG_FLAGS)
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
Sat Feb 17 07:27:15 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmodule.c: work around platforms that have broken RTLD_GLOBAL.
|
||||
|
||||
2001-01-27 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gmodule.c: (Win32) Need <io.h> for open() and close().
|
||||
|
@ -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 --- */
|
||||
|
@ -40,7 +40,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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user