[PATCH] test-fflush: silence compiler warning

2011-05-11 Thread Eric Blake
Detected by clang. * tests/test-fflush.c (main): Don't fclose a NULL pointer. Signed-off-by: Eric Blake --- ChangeLog |5 + tests/test-fflush.c |3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ce48bb..34ccc10 100644 --- a/

Re: [PATCH 1/2] Backport glibc change fixing Bugzilla bug #12378.

2011-05-11 Thread Bruno Haible
Hi James, > + Backport glibc change fixing Bugzilla bug #12378. Thanks for doing this sync between gnulib and glibc. > + CHAR *p_init = p; > + CHAR *n_init = n; No tabs in gnulib source code. Can you please untabify the file before committing it in gnulib? > +if

Re: realpath(path,NULL)

2011-05-11 Thread Bruno Haible
Jim Meyering wrote: > > 2011-05-11 Bruno Haible > > > > canonicalize, canonicalize-lgpl: Avoid crash dialog on MacOS X. > > * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add GL_NOCRASH code. > > * modules/canonicalize (Depends-on): Add 'nocrash'. > > * modules/canonicalize-lgpl

[PATCH 1/2] Backport glibc change fixing Bugzilla bug #12378.

2011-05-11 Thread James Youngman
From: James Youngman * lib/fnmatch_loop.c (FCT): When matching '[' keep track of beginning and fall back to matching as normal character if the string ends before the matching ']' is found. This is what POSIX requires. Signed-off-by: James Youngman --- ChangeLog |8 lib/

[PATCH 2/2] Add a test for glibc's Bugzilla bug #12378.

2011-05-11 Thread James Youngman
From: James Youngman * m4/fnmatch.m4: Use gnulib's fnmatch if the system fnmatch doesn't allow the literal matching of a lone "[" (which is required by POSIX). * tests/test-fnmatch.c (main): Check that "[/b" matches itself. Signed-off-by: James Youngman --- ChangeLog|8

Re: group_member: tie to unistd

2011-05-11 Thread Bruno Haible
Hi Jim, > > 2011-05-08 Bruno Haible > > > > group-member: Declare function in . > ... > That looks like a fine change. Thanks! I've applied the change now. You can update coreutils. Bruno > The coreutils adjustments will be trivial. > There, removing two lines is sufficient: > > $

[PATCH] fclose: preserve fflush errors

2011-05-11 Thread Eric Blake
Caught by gcc -Werror=unused-but-set-variable. * lib/fclose.c (rpl_fclose): Don't lose fflush errors. Reported by Jim Meyering. Signed-off-by: Eric Blake --- ChangeLog|4 lib/fclose.c | 12 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/C

Re: realpath(path,NULL)

2011-05-11 Thread Jim Meyering
Bruno Haible wrote: > It was reported in that the test > program > of canonicalize.m4 leads to a crash and a dialog box while running 'configure' > on MacOS X 10.4. > > Actually I reproduce it also on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.4 with > this small t

[PATCH] bootstrap: support a prereq of 'rpcgen -' on RHEL5

2011-05-11 Thread Eric Blake
On RHEL 5, 'rpcgen --version' spews usage to stderr with status 1, rather than a version string to stdout with status 0. But libvirt merely requires a prereq of 'rpcgen -' - that is, it must exist, but need not have a well-behaved --version. * build-aux/bootstrap (check_versions): When no specifi

Re: [PATCH] maint.mk: drop redundant check

2011-05-11 Thread Jim Meyering
Eric Blake wrote: > * top/maint.mk (sc_the_the): Delete; sc_prohibit_doubled_word does > the same but better. Thanks!

Re: latest fclose.c evokes new warning/error

2011-05-11 Thread Eric Blake
On 05/11/2011 11:22 AM, Jim Meyering wrote: > Hi Eric, > > I've just tried the latest from gnulib in coreutils, > and bootstrap+build failed with this: > > fclose.c: In function 'rpl_fclose': > fclose.c:33:7: error: variable 'saved_errno' set but not used > [-Werror=unused-but-set-variab

latest fclose.c evokes new warning/error

2011-05-11 Thread Jim Meyering
Hi Eric, I've just tried the latest from gnulib in coreutils, and bootstrap+build failed with this: fclose.c: In function 'rpl_fclose': fclose.c:33:7: error: variable 'saved_errno' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors Isn't tha

[PATCH] maint.mk: drop redundant check

2011-05-11 Thread Eric Blake
* top/maint.mk (sc_the_the): Delete; sc_prohibit_doubled_word does the same but better. Signed-off-by: Eric Blake --- ChangeLog|6 ++ top/maint.mk |6 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7dec5e..e26d257 100644 --- a/C

Re: question about correct usage of gnulib

2011-05-11 Thread Simon Josefsson
Lorenzo Bettini writes: > On 05/03/2011 01:11 PM, Lorenzo Bettini wrote: >> On 05/02/2011 02:59 PM, Bastien ROUCARIES wrote: >>> On Mon, May 2, 2011 at 12:02 PM, Lorenzo Bettini >>> wrote: On 04/25/2011 06:36 PM, Bruno Haible wrote: > > Lorenzo Bettini wrote: >> >> on the ma

realpath(path,NULL)

2011-05-11 Thread Bruno Haible
Hi Jim, It was reported in that the test program of canonicalize.m4 leads to a crash and a dialog box while running 'configure' on MacOS X 10.4. Actually I reproduce it also on MacOS X 10.5, FreeBSD 6.4, OpenBSD 4.4 with this small test program:

Re: [PATCH] fclose: avoid double close race when possible

2011-05-11 Thread Bruno Haible
Hi Eric, > Is it worth thinking about replacing _every_ standard function on > mingw that can possibly create an fd in another thread (obviously, > as an optional module, only needed in multithreaded gnulib clients), > by grabbing a mutex to thus guarantee atomicity around otherwise > racy operati

Re: question about correct usage of gnulib

2011-05-11 Thread Bruno Haible
Lorenzo Bettini wrote: > actually I see that in the build directory (in the subdirectory where > gnulib headers are generated) there's no stdint.h and stdbool.h, so I > should be OK, right? Then you are likely OK. If you want to be sure, grep the header files that your library installs for 'boo

Re: [PATCH] maint.mk: prohibit use of "can not"

2011-05-11 Thread Jim Meyering
Jim Meyering wrote: > Eric Blake wrote: > >> On 04/09/2011 03:02 PM, Jim Meyering wrote: >>> There was a new use of "can not" in coreutils despite >>> my having performed this transformation before. >>> Autoconf is the same: one current/new violation, >>> in spite of applying the fix before. >>> I

Re: [PATCH] fclose: avoid double close race when possible

2011-05-11 Thread Jim Meyering
Eric Blake wrote: > Calling close(fileno(fp)) prior to fclose(fp) is racy in a > multi-threaded application - some other thread could open a new file, > which is then inadvertently closed by the fclose that we thought > should fail with EBADF. For mingw, this is no worse than the race > already pr

Re: [PATCH] maint.mk: prohibit use of "can not"

2011-05-11 Thread Jim Meyering
Eric Blake wrote: > On 04/09/2011 03:02 PM, Jim Meyering wrote: >> There was a new use of "can not" in coreutils despite >> my having performed this transformation before. >> Autoconf is the same: one current/new violation, >> in spite of applying the fix before. >> I noticed that James Youngman r

Re: question about correct usage of gnulib

2011-05-11 Thread Lorenzo Bettini
On 05/03/2011 11:57 PM, Bruno Haible wrote: Lorenzo Bettini asked: Would it be correct to put config.h only say in file1.cpp (and use the ā€˜-I’ option that refers to the Gnulib library directory for that file only), and not in file2.cpp and file3.cpp (where I don't use -I to refer to gnulib libra

Re: question about correct usage of gnulib

2011-05-11 Thread Lorenzo Bettini
On 05/03/2011 01:11 PM, Lorenzo Bettini wrote: On 05/02/2011 02:59 PM, Bastien ROUCARIES wrote: On Mon, May 2, 2011 at 12:02 PM, Lorenzo Bettini wrote: On 04/25/2011 06:36 PM, Bruno Haible wrote: Lorenzo Bettini wrote: on the manual I read "These Gnulib substitute header files rely on bei