[MLton] C99 runtime problems on Darwin

Stephen Weeks MLton@mlton.org
Thu, 23 Dec 2004 12:13:35 -0800


Whoops.  Responded to the wrong mail.

> The _GNU_SOURCE is needed for mremap.
>
> Ideally, I would move heapRemap out of gc.c and into platform/mremap.c.
> Then you don't need the _GNU_SOURCE in gc.c; only in linux.c and cygwin.c
> where it makes the most sense anyways---platform dependant.
> One less macro to manage that way too.

I moved mremap into linux.c, but left the rest of heapRemap (the
platform-independent bit) in gc.c.

The _GNU_SOURCE was still needed for the time profiling signal handler
stuff, so I also moved that code into the platform/ directory.  After
that, I was able to remove the _GNU_SOURCE from gc.c.

You mention _GNU_SOURCE is needed in linux.c and cygwin.c.  I see it
is also in mingw.c.  Should that be removed?