On 24/04/10 15:07, Petr Rockai wrote:
Hi,

Eric Kow<[email protected]>  writes:
3. Work on darcs 2.4.2 resolving the Windows issue specifically
at this point, it is a matter of bumping h-s dependency to 0.4.12.

I have (semi-accidentally) tracked this bug down to yet another lstat
screwup in GHC. On win32, System.Posix.Internals.lstat just gives random
data. The index size and existence is derived from this random data and
that explains both symptoms that have been observed.

Could you submit a bug for that? I'm not by a Windows box right now to test it, but looking at the code it looks like lstat has exactly the same implementation as c_stat:

foreign import ccall unsafe "HsBase.h __hscore_lstat"
   lstat :: CFilePath -> Ptr CStat -> IO CInt

foreign import ccall unsafe "HsBase.h __hscore_stat"
   c_stat :: CFilePath -> Ptr CStat -> IO CInt

and

INLINE int __hscore_stat(wchar_t *file, struct_stat *buf) {
        return _wstati64(file,buf);
}
INLINE int __hscore_lstat(wchar_t *fname, struct_stat *buf )
{
        return _wstati64(fname,buf);
}

very strange...

Cheers,
        Simon

I now use:

#if mingw32_HOST_OS
lstat = c_stat
#else
import System.Posix.Internals( lstat )
#endif

Yours,
    Petr.

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to