summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-10-17 22:40:55 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:50 +0200
commitbfe226bf119aac653ed394278adc0a3979f72af0 (patch)
tree882f86fd7592403ed9d1c1a1882115ea2904f6b1 /dyn_load.c
parent3b5c352965d4da78e10fbe65890e5d4af583f17e (diff)
2009-10-17 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c: Include gc_priv.h before using configuration information (MACOS). * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to GC_MUST_RESTORE_REDEFINED_DLOPEN.
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 469d9d1..f7587e6 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -26,17 +26,20 @@
* None of this is safe with dlclose and incremental collection.
* But then not much of anything is safe in the presence of dlclose.
*/
+#include "private/gc_priv.h"
+
#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \
&& !defined(_GNU_SOURCE)
/* Can't test LINUX, since this must be defined before other includes */
# define _GNU_SOURCE
#endif
+
#if !defined(MACOS) && !defined(_WIN32_WCE)
# include <sys/types.h>
#endif
-#include "private/gc_priv.h"
/* BTL: avoid circular redefinition of dlopen if GC_SOLARIS_THREADS defined */
+# undef GC_MUST_RESTORE_REDEFINED_DLOPEN
# if (defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS)) \
&& defined(dlopen) && !defined(GC_USE_LD_WRAP)
/* To support threads in Solaris, gc.h interposes on dlopen by */
@@ -45,9 +48,7 @@
/* real system dlopen() in their implementation. We first remove */
/* gc.h's dlopen definition and restore it later, after GC_dlopen(). */
# undef dlopen
-# define GC_must_restore_redefined_dlopen
-# else
-# undef GC_must_restore_redefined_dlopen
+# define GC_MUST_RESTORE_REDEFINED_DLOPEN
# endif
/* A user-supplied routine (custom filter) that might be called to */
@@ -165,7 +166,7 @@ GC_FirstDLOpenedLinkMap(void)
#endif /* SOLARISDL ... */
/* BTL: added to fix circular dlopen definition if GC_SOLARIS_THREADS defined */
-# if defined(GC_must_restore_redefined_dlopen)
+# ifdef GC_MUST_RESTORE_REDEFINED_DLOPEN
# define dlopen GC_dlopen
# endif