bug#21554: no previous prototype for 'set_binary_mode'

2015-09-25 Thread Benno Schulenberg
On Thu, Sep 24, 2015, at 22:32, Eric Blake wrote: > On 09/24/2015 01:50 PM, Benno Schulenberg wrote: > > (I can't get grep to build from git: binary-io.h:53: error: > > no previous prototype for 'set_binary_mode'.) > > On which platform are you testing? Ubuntu Lucid. $ gcc --version | head -1 g

bug#21554: no previous prototype for 'set_binary_mode'

2015-09-25 Thread Benno Schulenberg
On Thu, Sep 24, 2015, at 22:36, Paul Eggert wrote: > On 09/24/2015 12:50 PM, Benno Schulenberg wrote: > > (I can't get grep to build from git: binary-io.h:53: error: > > no previous prototype for 'set_binary_mode'.) > > If you're having that problem with git grep, you'd surely have the same > pr

bug#21558: checking for a binary file is not deterministic

2015-09-25 Thread Benno Schulenberg
Hi, When piping a certain diff into grep-2.21, it sometimes thinks it is a binary file, and sometimes treats it as text. The latter behaviour is expected and desired. I think grep should never consider standard input to be binary. For lack of a simple recipe, here is the actual use case: wg

bug#21554: no previous prototype for 'set_binary_mode'

2015-09-25 Thread Benno Schulenberg
On Fri, Sep 25, 2015, at 09:29, Benno Schulenberg wrote: > On Thu, Sep 24, 2015, at 22:32, Eric Blake wrote: > > On which platform are you testing? > > Ubuntu Lucid. > > $ gcc --version | head -1 > gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 > > > Are you sure you have a matching > > gnulib submodule c

bug#21558: checking for a binary file is not deterministic

2015-09-25 Thread Paul Eggert
Thanks for the bug report. This appears to be basically the same as Bug#20526. An idea to fix it in a deterministic way was proposed here: http://bugs.gnu.org/20526#35 and this seems to have been received positively, but nobody has had the time to implement it yet. In the meantime I'll merg

bug#21558: checking for a binary file is not deterministic

2015-09-25 Thread Benno Schulenberg
On Fri, Sep 25, 2015, at 20:02, Paul Eggert wrote: > Thanks for the bug report. This appears to be basically the same as > Bug#20526. Well, not quite. That grep will see misencoded files as binary data, I understand. But what perplexed me is that grep would *sometimes* see the piped data as b

bug#21554: no previous prototype for 'set_binary_mode'

2015-09-25 Thread Paul Eggert
On 09/25/2015 12:40 AM, Benno Schulenberg wrote: CC argmatch.o cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C CC binary-io.o cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C cc1: warnings being treat

bug#21558: checking for a binary file is not deterministic

2015-09-25 Thread Paul Eggert
On 09/25/2015 11:54 AM, Benno Schulenberg wrote: On Fri, Sep 25, 2015, at 20:02, Paul Eggert wrote: Thanks for the bug report. This appears to be basically the same as Bug#20526. Well, not quite. That grep will see misencoded files as binary data, I understand. But what perplexed me is that

bug#21554: no previous prototype for 'set_binary_mode'

2015-09-25 Thread Benno Schulenberg
On Fri, Sep 25, 2015, at 21:07, Paul Eggert wrote: > On 09/25/2015 12:40 AM, Benno Schulenberg wrote: > > In file included from binary-io.c:3: > > binary-io.h:53: error: no previous prototype for 'set_binary_mode' > > Thanks, I managed to reproduce this on an old RHEL 6 server we have. It > use