diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-03 23:51:16 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-03 23:51:16 +0100 |
commit | 4b34c76fd6040bb0332923165fcfaf8c85b5dac6 (patch) | |
tree | 7d1998fa4f06ace67814df913acbe6e49a7c813a /unix/gccollect.c | |
parent | 3996611c1bb70af23bfe33809900fe5ee6fa0a3f (diff) |
Changes to get unix/ port compiling on Cygwin.
Diffstat (limited to 'unix/gccollect.c')
-rw-r--r-- | unix/gccollect.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/unix/gccollect.c b/unix/gccollect.c index 450a69778..33748d240 100644 --- a/unix/gccollect.c +++ b/unix/gccollect.c @@ -78,9 +78,14 @@ void gc_collect(void) { gc_collect_start(); // this traces .data and .bss sections - extern char __bss_start, _end; - //printf(".bss: %p-%p\n", &__bss_start, &_end); - gc_collect_root((void**)&__bss_start, ((machine_uint_t)&_end - (machine_uint_t)&__bss_start) / sizeof(machine_uint_t)); +#ifdef __CYGWIN__ +#define BSS_START __bss_start__ +#else +#define BSS_START __bss_start +#endif + extern char BSS_START, _end; + //printf(".bss: %p-%p\n", &BSS_START, &_end); + gc_collect_root((void**)&BSS_START, ((machine_uint_t)&_end - (machine_uint_t)&BSS_START) / sizeof(machine_uint_t)); regs_t regs; gc_helper_get_regs(regs); // GC stack (and regs because we captured them) |