[MLton-commit] r4272
Stephen Weeks
MLton@mlton.org
Thu, 1 Dec 2005 18:31:00 -0800
Fixed SMLofNJ.SysInfo.getOSKind.
----------------------------------------------------------------------
U mlton/trunk/basis-library/sml-nj/sml-nj.sml
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/sml-nj/sml-nj.sml
===================================================================
--- mlton/trunk/basis-library/sml-nj/sml-nj.sml 2005-12-01 19:07:26 UTC (rev 4271)
+++ mlton/trunk/basis-library/sml-nj/sml-nj.sml 2005-12-02 02:30:59 UTC (rev 4272)
@@ -25,7 +25,20 @@
fun getHostArch () =
MLton.Platform.Arch.toString MLton.Platform.Arch.host
- fun getOSKind () = UNIX
+ fun getOSKind () =
+ let
+ open MLton.Platform.OS
+ in
+ case host of
+ Cygwin => UNIX
+ | Darwin => MACOS
+ | FreeBSD => UNIX
+ | Linux => UNIX
+ | MinGW => WIN32
+ | NetBSD => UNIX
+ | OpenBSD => UNIX
+ | Solaris => UNIX
+ end
fun getOSName () = MLton.Platform.OS.toString MLton.Platform.OS.host
end