Re: Comparing binary files with Diff 3.2 compiled with MinGW

2012-05-13 Thread Paul Eggert
Thanks for the diffutils patch. We're a bit better off with something even closer to the pre-2006 approach, which took care to convert size_t to off_t before negating it, as that is important on hosts where sizeof (size_t) < sizeof (off_t). Also, it's cleaner to use set_binary_mode uniformly rath

Re: unavoidable wildcard expansion on Windows 7

2012-05-13 Thread Eli Zaretskii
> From: Bruno Haible > Cc: bug-gnulib@gnu.org > Date: Sun, 13 May 2012 22:38:58 +0200 > > There are many programs that except to get a wildcard expression or > regular expression on the command line, such as > csplit expr find grep nl ptx sed tac tr And Diff (the -x and -I switches), and 'ls'

Re: Comparing binary files with Diff 3.2 compiled with MinGW

2012-05-13 Thread Bruno Haible
Paul Eggert wrote: > With that approach, code like this: > >set_binary_mode (current->desc, prev_mode); > > yields the following undesirable diagnostic: > >io.c:127:8: error: statement with no effect [-Werror=unused-value] > > How about something like the following definition instead? >

Re: [PATCH] ignore-value: remove deprecated ignore_ptr function

2012-05-13 Thread Bruno Haible
Jim Meyering wrote on 2012-01-10: > We deprecated ignore_ptr a year ago: > > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/3784/focus=3802 > > So I've removed it. > ... > +2012-01-10 Jim Meyering > + > + ignore-value: remove deprecated ignore_ptr function > + * lib/igno

Re: unavoidable wildcard expansion on Windows 7

2012-05-13 Thread Bruno Haible
Eli Zaretskii wrote: > > Since '^' is a quoting character in cmd.exe, maybe you can try whether > > it helps to protect "*" inside double-quotes on Windows 7? That is, > > try to pass arguments such as > > ^* > > ^^* > > "*" > > "^*" > > "^^*" > > \"*\" > > \"^*\" > > \"^^*\" > >

Re: Comparing binary files with Diff 3.2 compiled with MinGW

2012-05-13 Thread Paul Eggert
On 05/12/2012 07:00 PM, Bruno Haible wrote: > +# define set_binary_mode(fd, mode) ((void) (fd), (void) (mode), O_BINARY) With that approach, code like this: set_binary_mode (current->desc, prev_mode); yields the following undesirable diagnostic: io.c:127:8: error: statement with no effect

Re: new module 'system-quote'

2012-05-13 Thread Eli Zaretskii
> From: Bruno Haible > Cc: bug-gnulib@gnu.org > Date: Fri, 11 May 2012 11:28:17 +0200 > > Since '^' is a quoting character in cmd.exe, maybe you can try whether > it helps to protect "*" inside double-quotes on Windows 7? That is, > try to pass arguments such as > ^* > ^^* > "*" > "^*" >

Re: Comparing binary files with Diff 3.2 compiled with MinGW

2012-05-13 Thread Eli Zaretskii
> From: Bruno Haible > Cc: bug-gnulib@gnu.org, Eli Zaretskii , bug-gnu-ut...@gnu.org > Date: Sun, 13 May 2012 04:00:25 +0200 > > > 'set_binary_mode' would be OK > > Good. New proposal attached below. And here's the patch for Diffutils' io.c to go with the new proposal: 2012-05-13 Eli Zaretski

Re: [PATCH] bootstrap: take advantage of POSIX shell features

2012-05-13 Thread Stefano Lattarini
On 05/13/2012 03:04 PM, Jim Meyering wrote: > >> + * build-aux/bootstrap: Prefer xpg4 parameter expansions over use >> + of sed/expr plus command substitutions, to save some forks. Since >> + we are at it, prefer the POSIX $(...) form of command substitution, > > The idiom

Re: [PATCH] bootstrap: take advantage of POSIX shell features

2012-05-13 Thread Jim Meyering
Stefano Lattarini wrote: > Hi Jim. > > On 05/13/2012 10:31 AM, Jim Meyering wrote: >> >>> diff --git a/build-aux/bootstrap b/build-aux/bootstrap >> ... >>> @@ -442,7 +442,7 @@ check_versions() { >>> # "GNU automake-ng") when asked their version. >>> case $app in >>>automake-ng|acl

Re: [PATCH] bootstrap: take advantage of POSIX shell features

2012-05-13 Thread Stefano Lattarini
Hi Jim. On 05/13/2012 10:31 AM, Jim Meyering wrote: > >> diff --git a/build-aux/bootstrap b/build-aux/bootstrap > ... >> @@ -442,7 +442,7 @@ check_versions() { >> # "GNU automake-ng") when asked their version. >> case $app in >>automake-ng|aclocal-ng) >> -app=`echo "$app"

Re: [PATCH] bootstrap: take advantage of POSIX shell features

2012-05-13 Thread Jim Meyering
Stefano Lattarini wrote: > The 'bootstrap' script offered by Gnulib script already uses POSIX > shell features (like $((...)) arithmetic expansions) that are not > supported by legacy Bourne shells like Solaris 10 /bin/sh. This > means that bootstrap must already be run using a proper POSIX shell

[PATCH] bootstrap: take advantage of POSIX shell features

2012-05-13 Thread Stefano Lattarini
The 'bootstrap' script offered by Gnulib script already uses POSIX shell features (like $((...)) arithmetic expansions) that are not supported by legacy Bourne shells like Solaris 10 /bin/sh. This means that bootstrap must already be run using a proper POSIX shell, which will thus provide more fea