From 454d418dec1eda78f7dedfebeec978a87d6ff773 Mon Sep 17 00:00:00 2001 From: ivmai Date: Fri, 16 Oct 2009 06:41:03 +0000 Subject: [PATCH] 2009-10-16 Ivan Maidanski * alloc.c (GC_finish_collection): Replace getenv() with GETENV(). * dyn_load.c (GC_init_dyld): Ditto. * os_dep.c (GC_print_callers): Ditto. * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name() result (since it's always of "struct mach_header" type). * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and GC_dyld_image_remove (to always have the first argument of "struct mach_header" pointer type). --- ChangeLog | 11 +++++++++++ alloc.c | 2 +- dyn_load.c | 38 +++++++++++++++++++------------------- os_dep.c | 2 +- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd63c4a9..60cd9776 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-10-16 Ivan Maidanski + + * alloc.c (GC_finish_collection): Replace getenv() with GETENV(). + * dyn_load.c (GC_init_dyld): Ditto. + * os_dep.c (GC_print_callers): Ditto. + * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name() + result (since it's always of "struct mach_header" type). + * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and + GC_dyld_image_remove (to always have the first argument of + "struct mach_header" pointer type). + 2009-10-16 Ivan Maidanski (really Petter Urkedal) * configure.ac: Add threads support for OpenBSD case (threads may diff --git a/alloc.c b/alloc.c index d5309ce7..8d4dbe03 100644 --- a/alloc.c +++ b/alloc.c @@ -782,7 +782,7 @@ STATIC void GC_finish_collection(void) GC_bytes_found = 0; # if defined(LINUX) && defined(__ELF__) && !defined(SMALL_CONFIG) - if (getenv("GC_PRINT_ADDRESS_MAP") != 0) { + if (GETENV("GC_PRINT_ADDRESS_MAP") != 0) { GC_print_address_map(); } # endif diff --git a/dyn_load.c b/dyn_load.c index b4f733e2..498879af 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -1155,10 +1155,12 @@ const static struct { { SEG_DATA, SECT_COMMON } }; -static const char *GC_dyld_name_for_hdr(const struct GC_MACH_HEADER *hdr) { - unsigned long i,c; +static const char *GC_dyld_name_for_hdr(const struct GC_MACH_HEADER *hdr) +{ + unsigned long i, c; c = _dyld_image_count(); - for(i=0;i= PRELOAD_SZ) { will_fail = TRUE; -- 2.40.0