Re: [PATCH 04/15] Set _O_BINARY as default fmode for both MinGW and MSVC
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 17, 2009, 07:25 UTC
- Message-ID
- <7vfxamjamq.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4AB1E118.70504@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 7 quoted lines
> Just for the records: The reason why including git-compat-util.h was not > necessary before 04/15 is that test-genrandom is linked against libgit.a. > This way the startup code had picked up the definition of _CRT_fmode from > mingw.c that is initialized to _O_BINARY. After the original 04/15 this > symbol was not present anymore in libgit.a, and the default (text mode) > was used. And with this fix, main() is overridden to explicitly set the > mode of stdout to _O_BINARY.
Beautiful. I think it is worth mentioning some of the above in the commit log message.
Thanks.