1 (* Copyright (C
) 2017 Matthew Fluet
.
2 * Copyright (C
) 2007 Henry Cejtin
, Matthew Fluet
, Suresh
3 * Jagannathan
, and Stephen Weeks
.
5 * MLton is released under a BSD
-style license
.
6 * See the file MLton
-LICENSE for details
.
15 val buf
= CharArray
.alloc (C_Size
.toInt bufSz
)
16 val reqSz
= PrimitiveFFI
.MinGW
.getTempPath (bufSz
, buf
)
20 else if C_Size
.< (reqSz
, bufSz
)
21 then SOME (CharArraySlice
.vector
22 (CharArraySlice
.unsafeSlice
23 (buf
, 0, SOME (C_Size
.toInt reqSz
))))
27 (* Win32 MAX_PATH is
260, but some subsystems allow longer names
*)