summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-07 18:36:19 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commit3da6257debbf51b1478c877ca0d154cff731af3f (patch)
treec7694d982301de7fd9d7a8da747fc2f7562a6f07 /dyn_load.c
parentba41f966c4d3041e54117cdeb29b0ad53b8d8dc9 (diff)
2011-03-07 Ivan Maidanski <ivmai@mail.ru>
* dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test GC_NO_DLOPEN. * gc_dlopen.c: Ditto. * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Ditto. * gc_dlopen.c: Don't include dlfcn.h (as it is included in gc_pthread_redirects.h). * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t, GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL). * include/gc_pthread_redirects.h (GC_pthread_sigmask, pthread_sigmask): Ditto. * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS); reformat the comment. * pthread_support.c (pthread_create, GC_pthread_create_t, GC_pthread_create): Rename GC_PTHREAD_CONST to GC_PTHREAD_CREATE_CONST. * win32_threads.c (GC_pthread_create): Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_pthread_redirects.h (GC_NO_DLOPEN, GC_NO_PTHREAD_SIGMASK): New macro defined. * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to empty for NaCl. * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do not define for Android (as CANCEL_SAFE is not defined).
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 41e89df..a15a8e2 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -34,17 +34,17 @@
#endif
/* 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 */
- /* defining "dlopen" to be "GC_dlopen", which is implemented below. */
- /* However, both GC_FirstDLOpenedLinkMap() and GC_dlopen() use the */
- /* 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
-# endif
+#undef GC_MUST_RESTORE_REDEFINED_DLOPEN
+#if defined(GC_PTHREADS) && !defined(GC_NO_DLOPEN) \
+ && !defined(GC_NO_THREAD_REDIRECTS) && !defined(GC_USE_LD_WRAP)
+ /* To support threads in Solaris, gc.h interposes on dlopen by */
+ /* defining "dlopen" to be "GC_dlopen", which is implemented below. */
+ /* However, both GC_FirstDLOpenedLinkMap() and GC_dlopen() use the */
+ /* 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
+#endif /* !GC_NO_DLOPEN */
/* A user-supplied routine (custom filter) that might be called to */
/* determine whether a DSO really needs to be scanned by the GC. */