Re: [PATCH 04/15] Set _O_BINARY as default fmode for both MinGW and MSVC
From: Alexey Borzenkov <hidden>
Date: 2016-06-15 22:47:25
On Thu, Sep 17, 2009 at 12:10 PM, Johannes Sixt [off-list ref] wrote:
Marius Storm-Olsen schrieb:quoted
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?