OS.FileSys on Win32...

Anoq of the Sun anoq@HardcoreProcessing.com
Thu, 14 Jun 2001 15:42:55 +0200


Hello!


I have just hit a couple problems in my Win32 port of
MLton - regarding OS.FileSys.

1) Win32 does not have support for symlinks - I solved
   this by defining apropriate macros in C for
   the missing POSIX functions (lstat, readlink, S_ISLNK) -
   and this part works fine now.
2) But OS.FileSys.fullPath on Windows expands a path like "./"
   into "/D:\whatever". I can see this is because the
   implementation of fullPath in MLton's basislibrary is
   UNIX specific, so it adds the "/" as prefix.
3) OS.FileSys.openDir cannot handle relative directories
   like "./" properly on Windows. It just raises an IO exception.
   Apparently the POSIX opendir function works differently on Win32.
   However OS.FileSys.openDir works fine on relative directories
   for MLton on Linux and SML/NJ on both Linux and Windows, so 
   I guess it should be fixed.

But how would you like the implmentation of these
Win32 specific changes (problem 2) and 3) ) to be done
in the MLton code? I know that you would like to keep
it as easily portable as possible... :)


Cheers
-- 
http://www.HardcoreProcessing.com