From: Alexey Borzenkov Date: Thu, 17 Sep 2009 08:39:22 GMT Subject: Re: [PATCH 04/15] Set _O_BINARY as default fmode for both MinGW and MSVC Message-ID: In-Reply-To: <4AB1EF0E.5010600@viscovery.net> On Thu, Sep 17, 2009 at 12:10 PM, Johannes Sixt wrote: > Marius Storm-Olsen schrieb: >> BTW, I ran all the tests (make /k test) before and after the >> whole series, with msysgit 'devel' branch + plain git.git 'next', >> and it turns out that 2 more tests pass after this series :) > Sorry to disappoint you: these 2 tests only passed by chance. For a > work-around see e95a73ef in mingw.git (it papers over an undetected > racily-clean index). Maybe we should just implement nsec for mingw? The code is already almost there: Converter filetime_to_timespec is available in cygwin.c Definition of struct timespec and struct stat that uses it can be borrowed from cygwin's cygwin/stat.h and cygwin/types.h, we could call it struct mingw_timespec and struct mingw_stat. Then #define timespec mingw_timespec and #define stat mingw_stat, as well as #define st_atime (st_atim.tv_sec) and similarly others, just like cygwin/stat.h does. Since we already reimplement stat/lstat/fstat it should be relatively simple and we don't care about usage of mingw's stat. Do you want me to cook up a patch?