[MLton] Patch to build MLton on MinGW
Matthew Fluet
fluet at cs.cornell.edu
Fri Nov 24 18:37:12 PST 2006
> Below is the patch I'm currently using to build MLton on MinGW.
Just to be clear -- this patch shouldn't be necessary to build MLton on
MinGW. Rather, it is a patch to get usable functionality out of MLNLFFI
generated code that uses the MLNLFFI Library.
> The patch replaces the use of dl* functions to import malloc and
> free with MLton FFI code to import the functions.
That seems fine.
> The semantics of dlopen(NULL, /*...*/) seem difficult to emulate.
SML/NJ seems to have faked this issue by making the main lib NONE under a
Unix system and making it SOME "kernel32.dll" under a win32 system.
> Index: runtime/platform/mingw.c
> ===================================================================
> --- runtime/platform/mingw.c (revision 4860)
> +++ runtime/platform/mingw.c (working copy)
> Index: lib/mlnlffi/memory/memalloc-a4-unix.sml
> ===================================================================
> --- lib/mlnlffi/memory/memalloc-a4-unix.sml (revision 4860)
> +++ lib/mlnlffi/memory/memalloc-a4-unix.sml (working copy)
Feel free to commit the patches.
More information about the MLton
mailing list