Re: fts: slightly more robust

2009-09-01 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: >> I suspect that it'd be very hard to trigger these close failures, >> but it's better to be safe. > > While we're visiting fts, how about this patch? POSIX 2008 is clear that > opendir should use O_DIRECTORY, so opendirat should probably do

Re: avoiding obsolete macros like AC_TRY_RUN

2009-09-01 Thread Ralf Wildenhues
* Jim Meyering wrote on Tue, Sep 01, 2009 at 08:19:55AM CEST: > > I'd welcome patches to modernize the m4/*.m4 files under my care. > Since I tend to use gnulib's files as models, it's worthwhile to > update them to use macros that aren't listed as "obsolete". OK, here we go. This patch is for m

Re: fts: slightly more robust

2009-09-01 Thread Eric Blake
Jim Meyering meyering.net> writes: > > I suspect that it'd be very hard to trigger these close failures, > but it's better to be safe. While we're visiting fts, how about this patch? POSIX 2008 is clear that opendir should use O_DIRECTORY, so opendirat should probably do likewise. Do we wan

Re: need opendir_safer, dirent--.h

2009-09-01 Thread Eric Blake
Eric Blake byu.net> writes: > > I think we need to implement opendir_safer, alongside all the other > > *_safer modules. Otherwise, opendir can end up placing an open directory > > fd in one of the standard slots, and end up interfering with the intent of > > all the other *_safer wrappers. > >

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Ralf Wildenhues
Hello Bruno, * Bruno Haible wrote on Tue, Sep 01, 2009 at 10:37:49AM CEST: > I can see that in rare, rare cases, since MKDIR_P is a command, people > may want to use different versions of it. But for things like @LIBINTL@ > and @LIBSOCKET@, it is still better to write them as @LIBINTL@, not > $(L

Re: fchdir on mingw

2009-09-01 Thread Eric Blake
Eric Blake byu.net> writes: > +/* Return stat information about FD in STATBUF. Needed when > + rpl_open() used a dummy file to work around an open() that can't > + normally visit directories. */ > +#if REPLACE_OPEN_DIRECTORY > +int > +rpl_fstat (int fd, struct stat *statbuf) > +{ > + if (0

[PATCH] maint.mk: sort the list of syntax-check rules

2009-09-01 Thread Jim Meyering
FYI, Here's a patch from Daniel P. Berrange to maint.mk. Just pushed. >From 1f6f04fa73397e0ed8de600aafdec45b976335a8 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Tue, 1 Sep 2009 16:39:43 +0200 Subject: [PATCH] maint.mk: sort the list of syntax-check rules * top/maint.mk (syntax-check-

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Simon Josefsson
Jim Meyering writes: > So I'll let Simon push his patch. Done! Thanks for discussion. /Simon

Re: fix bug in glibc 2.7 macro implementation of strtok_r.

2009-09-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ben Pfaff on 8/31/2009 6:56 AM: > The reason that I'm submitting it is > that I discovered this glibc bug myself, and it's been bothering > me ever since that gnulib doesn't detect and work around it, > because it seems very easy to trigge

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Tue, 2009-09-01 at 13:24 +0300, Sergey Poznyakoff wrote: > Alan Hourihane ha escrit: > > > Yes, but I get this > > > > nm exclude.o | grep towlower > > U _towlower > > > > And my libc doesn't define towlower() either. > > I see. Perhaps it is defined elsewhere? Could you pleas

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Tue, 2009-09-01 at 13:24 +0300, Sergey Poznyakoff wrote: > Alan Hourihane ha escrit: > > > Yes, but I get this > > > > nm exclude.o | grep towlower > > U _towlower > > > > And my libc doesn't define towlower() either. > > I see. Perhaps it is defined elsewhere? Could you pleas

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Sergey Poznyakoff
Alan Hourihane ha escrit: > Yes, but I get this > > nm exclude.o | grep towlower > U _towlower > > And my libc doesn't define towlower() either. I see. Perhaps it is defined elsewhere? Could you please check? The gnulib's wchar.h does not provide a wrapper for it, unfortunately.

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Tue, 2009-09-01 at 13:10 +0300, Sergey Poznyakoff wrote: > Alan Hourihane ha escrit: > > > exclude.c: In function 'string_hasher_ci': > > exclude.c:167: warning: implicit declaration of function 'towlower' > > exclude.c:167: warning: incompatible implicit declaration of built-in > > function '

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Sergey Poznyakoff
Alan Hourihane ha escrit: > exclude.c: In function 'string_hasher_ci': > exclude.c:167: warning: implicit declaration of function 'towlower' > exclude.c:167: warning: incompatible implicit declaration of built-in > function 'towlower' These are warnings, not errors. What errors do you get? Pleas

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Tue, 2009-09-01 at 12:30 +0300, Sergey Poznyakoff wrote: > Alan Hourihane ha escrit: > > > Not sure this is right, but it works > > Surely it is not right. And it does not work, either: it does > not correctly lower the case of the input string. > > Have you tried the patch I sent? Your

fts: slightly more robust

2009-09-01 Thread Jim Meyering
I suspect that it'd be very hard to trigger these close failures, but it's better to be safe. And along the same lines, since there are more way in which fts_close can fail, encourage callers not to ignore its return value. There were four offenders in coreutils, before today. I chose not to make

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Tue, 2009-09-01 at 12:30 +0300, Sergey Poznyakoff wrote: > Alan Hourihane ha escrit: > > > Not sure this is right, but it works > > Surely it is not right. And it does not work, either: it does > not correctly lower the case of the input string. > > Have you tried the patch I sent? Yike

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Sergey Poznyakoff
Alan Hourihane ha escrit: > Not sure this is right, but it works Surely it is not right. And it does not work, either: it does not correctly lower the case of the input string. Have you tried the patch I sent? Regards, Sergey

Re: lib/exclude.c calls towlower() without checking for wideline support

2009-09-01 Thread Alan Hourihane
On Thu, 2009-08-27 at 15:24 +0100, Alan Hourihane wrote: > As the subject line says, and I end up with an unresolved symbol. > > Not sure what the right definition check to wrap that up in though. Not sure this is right, but it works Alan. diff --git a/lib/exclude.c b/lib/exclude.c index 32

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Bruno Haible
Eric Blake wrote: > > I usually modify CC instead. I never tried for gnulib, but it would > > look like this: > > > > MINGW=$(cygpath -u '\mingw') > > export PATH=$MINGW/bin:$PATH > > ./configure --host=i586-pc-mingw32 --prefix=$MINGW \ > > CC="gcc -mno-cygwin" CXX="g++ -mno-cygw

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> Consider consistency with automake-generated rules. >> For example, I see these uses of $(MKDIR_P) in coreutils/lib/Makefile: >> ... >> I think anyone wanting to use some other MKDIR_P value >> would be surprised (and report it as a bug) to have to >> r

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Jim Meyering
Bruno Haible wrote: > Ralf Wildenhues wrote: >> Still, the standards.texi authors found that additional flexibility so >> useful that they explicitly document it as required for a set of tools >> (node: Utilities in Makefiles). > > Citing it: > Use the following @code{make} variables to run thos

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Bruno Haible
Jim Meyering wrote: > Consider consistency with automake-generated rules. > For example, I see these uses of $(MKDIR_P) in coreutils/lib/Makefile: > ... > I think anyone wanting to use some other MKDIR_P value > would be surprised (and report it as a bug) to have to > resort to rerunning configure

Re: Use $(MKDIR_P) instead of @MKDIR_P@

2009-09-01 Thread Bruno Haible
Ralf Wildenhues wrote: > Still, the standards.texi authors found that additional flexibility so > useful that they explicitly document it as required for a set of tools > (node: Utilities in Makefiles). Citing it: Use the following @code{make} variables to run those programs: $(AR) $(BISON) $