summaryrefslogtreecommitdiff
path: root/gc_dlopen.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-07-13 11:01:46 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:54 +0400
commit65a596328d7c71356dcdb7e3eea7f31b9e03ceec (patch)
treec5dd8fb3828bb588eb114dc359f95188b9385588 /gc_dlopen.c
parentd9f77cc8207154459a6ca71e3e6ca3f97696e31d (diff)
downloadbdwgc-65a596328d7c71356dcdb7e3eea7f31b9e03ceec.tar.gz
2010-07-13 Ivan Maidanski <ivmai@mail.ru>
* gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP. * pthread_support.c (pthread_create, pthread_join, pthread_detach, pthread_sigmask): Ditto. * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype is added). * gc_dlopen.c (GC_dlopen): Fix return type. * pthread_support.c (GC_init_real_syms): Don't define LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and libpthread_name if RTLD_NEXT.
Diffstat (limited to 'gc_dlopen.c')
-rw-r--r--gc_dlopen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc_dlopen.c b/gc_dlopen.c
index 87d14c10..156b1e67 100644
--- a/gc_dlopen.c
+++ b/gc_dlopen.c
@@ -68,6 +68,7 @@
#ifdef GC_USE_LD_WRAP
# define WRAP_DLFUNC(f) __wrap_##f
# define REAL_DLFUNC(f) __real_##f
+ void * REAL_DLFUNC(dlopen)(const char *, int);
#else
# define WRAP_DLFUNC(f) GC_##f
# define REAL_DLFUNC(f) f
@@ -82,7 +83,7 @@ GC_API void * WRAP_DLFUNC(dlopen)(const char *path, int mode)
/* even, heap overflow) but there seems no better solutions. */
disable_gc_for_dlopen();
# endif
- result = (void *)REAL_DLFUNC(dlopen)(path, mode);
+ result = REAL_DLFUNC(dlopen)(path, mode);
# ifndef USE_PROC_FOR_LIBRARIES
GC_enable(); /* undoes disable_gc_for_dlopen */
# endif
@@ -93,7 +94,7 @@ GC_API void * WRAP_DLFUNC(dlopen)(const char *path, int mode)
/* 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)
+ GC_API void *GC_dlopen(const char *path, int mode)
{
return dlopen(path, mode);
}