diff options
author | ivmai <ivmai> | 2009-10-01 12:22:02 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:49 +0400 |
commit | d07f685fb7d89fd1b09a620ffccc22f7c838d517 (patch) | |
tree | c93bb7075ceca0386b95d423efad5611cb299dfd /gc_dlopen.c | |
parent | 04a3b39359550f960849d4d6aa4d1709f35df29a (diff) | |
download | bdwgc-d07f685fb7d89fd1b09a620ffccc22f7c838d517.tar.gz |
2009-10-01 Ivan Maidanski <ivmai@mail.ru>
* 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.
Diffstat (limited to 'gc_dlopen.c')
-rw-r--r-- | gc_dlopen.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 ... */ |