Re: [PATCH] xfreopen: keep append mode when converting stdout to binary

2010-03-10 Thread Eric Blake
On 03/10/2010 04:43 PM, Bruno Haible wrote: > I would find it better to leave xfreopen alone and add a function > > /* Returns the current mode of FP, combined with the additional > open_flags. Allowed open_flags are O_APPEND, O_TEXT, O_BINARY, > or a combination of these. */ > con

Re: [PATCH] xfreopen: keep append mode when converting stdout to binary

2010-03-10 Thread Bruno Haible
Hi Eric, > For a long time, we've had reports against coreutils about improper > use of freopen(NULL) on platforms with non-zero O_BINARY: basically, > when built out of the box, things like 'cat a >> b' would overwrite > data in b, because the freopen(NULL,"wb",stdout) lost the O_APPEND > flag.

[PATCH] xfreopen: keep append mode when converting stdout to binary

2010-03-10 Thread Eric Blake
Particularly useful for porting coreutils to cygwin. * lib/xfreopen.c (xfreopen): Preserve O_APPEND when using xfreopen to convert an existing stream to binary. Signed-off-by: Eric Blake --- For a long time, we've had reports against coreutils about improper use of freopen(NULL) on platforms wi

Re: bootstrap and git submodules

2010-03-10 Thread Eric Blake
On 03/10/2010 03:18 AM, Jim Meyering wrote: >> I did a grep of '80cd995cdcbf4b9ded895a43621a11f11806ad8d' over the source >> tree >> and did not find it. Maybe worth reporting to the git list as an enhancement request to 'git grep' to search the textual representation of submodules? At any rate,

test-string-c++ test failure [Re: bootstrap and git submodules

2010-03-10 Thread Jim Meyering
>> I tried the latest from gnulib via coreutils, >> ... >> In file included from test-string-c++.cc:23: >> ../lib/string.h:301: error: type of 'memchr' is unknown > > Can you please tell me how to reproduce? Here's a much easier way to reproduce the problem, using only gnulib. The key is to test

Re: bootstrap and git submodules

2010-03-10 Thread Jim Meyering
>> I tried the latest from gnulib via coreutils, >> ... >> In file included from test-string-c++.cc:23: >> ../lib/string.h:301: error: type of 'memchr' is unknown > > Can you please tell me how to reproduce? > > I checked out coreutils from git, saw that its "bootstrap --help" script says > --gnul

Re: bootstrap and git submodules

2010-03-10 Thread Bruno Haible
Hi Jim, > I tried the latest from gnulib via coreutils, > ... > In file included from test-string-c++.cc:23: > ../lib/string.h:301: error: type of 'memchr' is unknown Can you please tell me how to reproduce? I checked out coreutils from git, saw that its "bootstrap --help" script says --gnulib-