[Haskell-cafe] Re: Unicode workaround for getDirectoryContents under Windows?

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Jun 17 04:43:33 EDT 2009

Hello Simon,

Wednesday, June 17, 2009, 12:01:11 PM, you wrote:

> foreign import stdcall unsafe "GetFullPathNameW"
>    c_GetFullPathName :: LPCTSTR -> DWORD -> LPTSTR -> Ptr LPTSTR -> IO DWORD

you are right, i was troubled by unused GetFullPathNameA import in System.Directory:

#if defined(mingw32_HOST_OS)
foreign import stdcall unsafe "GetFullPathNameA"
            c_GetFullPathName :: CString
                              -> CInt
                              -> CString
                              -> Ptr CString
                              -> IO CInt
foreign import ccall unsafe "realpath"
                   c_realpath :: CString
                              -> CString
                              -> IO CString

> So as you can see, there's not much left to do.  I'll fix openFile.

c_stat is widely used here and there. it may be that half of
System.Directory functions is broken due to direct or indirect calls
to this function

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list