git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test-genrandom: ensure stdout is set to _O_BINARY on Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2009, 07:36 UTC
Message-ID
<7vws3svjel.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4AB72CA2.1020808@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 15 quoted lines
> From: Johannes Sixt <j6t@kdbg.org>
>
> Commit a6ca8c62 (Set _O_BINARY as default fmode for both MinGW and MSVC)
> removed the definition of _CRT_fmode from mingw.c. Before this commit,
> since test-genrandom is linked against libgit.a, the MinGW process
> initialization code would pick up that definition of _CRT_fmode, which was
> initialized to _O_BINARY. After this commit, however, text mode is used
> for std(in|out|err) because it is the default in absence of _CRT_fmode.
> In order to fix that, we must use git-compat-util.h, which overrides
> main() to set the mode to binary.
>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  Unfortunately, this change in an updated patch 04/15 of the MSVC series
>  went to the Big Void. ;)
Thanks.
Previous: Johannes Sixt
Message 2 of 2 in “test-genrandom: ensure stdout is set to _O_BINARY on Windows”
  1. test-genrandom: ensure stdout is set to _O_BINARY on WindowsJohannes Sixt, Sep 21, 2009
  2. Junio C HamanoSep 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.