[MLton] MinGW port mostly works

Stephen Weeks MLton@mlton.org
Mon, 30 Aug 2004 10:33:42 -0700


> >   unixpath:
> > 	many problems
> 
> This one causes me the most concern, as it is what prevents MinGW
> MLton from compiling from CM files.  I took a stab at trying to make
> some changes in the Basis to support this, but had limited success
> getting it to work.

It might be helpful to look at what SML/NJ does here.  We can include
(and have included) SML/NJ code in our library because its license
allows it.

> > Posix.FileSys.createf.  For some reason the call to the open
> > system call is failing.
>
> This should work -- I suspect some flag foo is causing the problem.
> Does the createf use the mkstemp call?

No.

MLton.TextIO.mkstemp is defined in basis-library/mlton/io.fun, and
calls Posix.FileSys.createf, which is defined in
basis-library/posix/file-sys.sml, and calls Posix_FileSys_open, which
is defined in runtime/Posix/FileSys/open.c, and calls the C library
open() function.  You can turn on debugging in open.c to see what
flags open() is being called with.