[MLton] "cast does not match function type" warning on Cygwin

Stephen Weeks MLton@mlton.org
Thu, 25 May 2006 00:04:09 -0700


The new runtime now compiles on Cygwin, with only a single warning
remaining:

  platform/cygwin.c:12: warning: cast does not match function type

Here is the offending code.

  HANDLE fileDesHandle (int fd) {
          return (HANDLE)(get_osfhandle (fd));
  }

Line 12 is the "return" line.  The declaration of get_osfhandle in
/usr/include/io.h is

  extern long get_osfhandle(int);

Any ideas how to fix this problem?