diff options
author | ivmai <ivmai> | 2009-10-21 09:33:39 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:51 +0400 |
commit | bad4c7acb6060861cd4be55968c1f58b2026a747 (patch) | |
tree | e4772ccd33aeec9ccd4d9baadbadb48a913a13e2 /dyn_load.c | |
parent | c4e4721f491632c2039cece14400f353794273f4 (diff) | |
download | bdwgc-bad4c7acb6060861cd4be55968c1f58b2026a747.tar.gz |
2009-10-21 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (DEBUG): Remove macro (since unused).
* allchblk.c: Include private/gc_priv.h before other includes and
definitions.
* alloc.c: Ditto.
* gc_dlopen.c: Ditto.
* headers.c: Ditto.
* mallocx.c: Ditto.
* mark_rts.c: Ditto.
* new_hblk.c: Ditto.
* reclaim.c: Ditto.
* mark.c: Include private/gc_pmark.h before other includes.
* misc.c: Ditto.
* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
* pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto.
* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
already defined in gc_config_macros.h).
* dyn_load.c (GC_init_dyld): Remove parameter cast for
_dyld_register_func_for_add_image() and
_dyld_register_func_for_remove_image(); add the comment about
possible warnings; add FIXME for the deprecated
_dyld_bind_fully_image_containing_address().
* include/private/gc_priv.h: Include gc.h before the standard
headers inclusion.
* tests/test.c: Ditto.
* include/private/gcconfig.h (DebugBreak): Update the comment.
* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
* alloc.c: Reformat the code (partly adjust indentation).
* backgraph.c: Ditto.
* blacklst.c: Ditto.
* checksums.c: Ditto.
* finalize.c: Ditto.
* gcj_mlc.c: Ditto.
* mach_dep.c: Ditto.
* mark_rts.c: Ditto.
* obj_map.c: Ditto.
* os_dep.c: Ditto.
* ptr_chck.c: Ditto.
* stubborn.c: Ditto.
* thread_local_alloc.c: Ditto.
* typd_mlc.c: Ditto.
Diffstat (limited to 'dyn_load.c')
-rw-r--r-- | dyn_load.c | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -15,6 +15,8 @@ * Heavily modified by Hans Boehm and others */ +#include "private/gc_priv.h" + /* * This is incredibly OS specific code for tracking down data sections in * dynamic libraries. There appears to be no way of doing this quickly @@ -27,14 +29,6 @@ * But then not much of anything is safe in the presence of dlclose. */ -#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 - -#include "private/gc_priv.h" - #if !defined(MACOS) && !defined(_WIN32_WCE) # include <sys/types.h> #endif @@ -1253,10 +1247,12 @@ void GC_init_dyld(void) linked in the future. */ - _dyld_register_func_for_add_image( - (void (*)(struct mach_header *, intptr_t))GC_dyld_image_add); - _dyld_register_func_for_remove_image( - (void (*)(struct mach_header *, intptr_t))GC_dyld_image_remove); + _dyld_register_func_for_add_image(GC_dyld_image_add); + _dyld_register_func_for_remove_image(GC_dyld_image_remove); + /* Ignore 2 compiler warnings here: passing argument 1 of */ + /* '_dyld_register_func_for_add/remove_image' from incompatible */ + /* pointer type. */ + /* Set this early to avoid reentrancy issues. */ initialized = TRUE; @@ -1265,6 +1261,7 @@ void GC_init_dyld(void) # ifdef DARWIN_DEBUG GC_printf("Forcing full bind of GC code...\n"); # endif + /* FIXME: '_dyld_bind_fully_image_containing_address' is deprecated. */ if(!_dyld_bind_fully_image_containing_address((unsigned long*)GC_malloc)) ABORT("_dyld_bind_fully_image_containing_address failed"); } |