diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/gccollect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/unix/gccollect.c b/unix/gccollect.c index 1014a2629b..f24cc52495 100644 --- a/unix/gccollect.c +++ b/unix/gccollect.c @@ -130,8 +130,11 @@ void gc_collect(void) { gc_collect_start(); // this traces the .bss section -#ifdef __CYGWIN__ +#if defined( __CYGWIN__ ) #define BSS_START __bss_start__ +#elif defined( _MSC_VER ) || defined( __MINGW32__ ) +#define BSS_START *bss_start +#define _end *bss_end #else #define BSS_START __bss_start #endif @@ -141,7 +144,8 @@ void gc_collect(void) { regs_t regs; gc_helper_get_regs(regs); // GC stack (and regs because we captured them) - gc_collect_root((void**)®s, ((machine_uint_t)stack_top - (machine_uint_t)®s) / sizeof(machine_uint_t)); + void **regs_ptr = (void**)(void*)®s; + gc_collect_root(regs_ptr, ((machine_uint_t)stack_top - (machine_uint_t)®s) / sizeof(machine_uint_t)); gc_collect_end(); //printf("-----\n"); |