Re: [PATCH 04/15] Set _O_BINARY as default fmode for both MinGW and MSVC
- From
Alexey Borzenkov <snaury@gmail.com>
- Date
- Sep 17, 2009, 08:39 UTC
- Message-ID
- <e2480c70909170139x9580bb4pcc1ad8e1b93aef17@mail.gmail.com>
- In-Reply-To
- <4AB1EF0E.5010600@viscovery.net>
On Thu, Sep 17, 2009 at 12:10 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 7 quoted lines
> 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?