[MLton] two bugs in mingw port

Tom 7 twm at andrew.cmu.edu
Wed Jan 17 21:29:47 PST 2007


I found two problems when using the mingw port of mlton.

The first is pretty trivial--in mlton's 
/mingw/lib/mlton/include/platform/mingw.h the following declarations 
should be removed:

struct timezone {
     int tz_dsttime;
     int tz_minuteswest;
};

int gettimeofday (struct timeval *tv, struct timezone *tz);

as they conflict with the ones already made in the newest system headers. 
(e.g. MinGW-5.1.3.exe on 
http://sourceforge.net/project/showfiles.php?group_id=2435)

The second is that Real.trunc always segfaults, for example in:

   val x = Real.trunc 4.2
   val () = print (Int.toString x ^ "\n")

The same program works fine on the same machine with the cygwin mlton.


I've just started using this port today to interface with SDL. Thanks for 
it!

  - Tom



More information about the MLton mailing list