From d07f685fb7d89fd1b09a620ffccc22f7c838d517 Mon Sep 17 00:00:00 2001 From: ivmai Date: Thu, 1 Oct 2009 12:22:02 +0000 Subject: 2009-10-01 Ivan Maidanski * gc_dlopen.c (GC_dlopen): Add function redirector (only if GC_USE_LD_WRAP). * include/gc.h: Include "gc_pthread_redirects.h" even if GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't define and check for (since included only from gc.h). * include/gc_pthread_redirects.h: Declare "GC_" symbols even if GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. * include/gc_pthread_redirects.h: Include signal.h only to get sigset_t definition. --- gc_dlopen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gc_dlopen.c') diff --git a/gc_dlopen.c b/gc_dlopen.c index c0ca658a..64619848 100644 --- a/gc_dlopen.c +++ b/gc_dlopen.c @@ -85,4 +85,14 @@ GC_API void * WRAP_FUNC(dlopen)(const char *path, int mode) # endif return(result); } + +#ifdef GC_USE_LD_WRAP + /* Define GC_ function as an alias for the plain one, which will be */ + /* intercepted. This allows files which include gc.h, and hence */ + /* generate references to the GC_ symbol, to see the right symbol. */ + GC_API int GC_dlopen(const char *path, int mode) { + return dlopen(path, mode); + } +#endif /* Linker-based interception. */ + # endif /* GC_PTHREADS || GC_SOLARIS_THREADS ... */ -- cgit v1.2.1