Re: PATCH: Fix poll() impl on Win32

2009-01-07 Thread Jim Meyering
"Daniel P. Berrange" wrote: > I've been using the GNULIB poll() impl in libvirt on Win32 (well Mingw + > WINE) and found it was producing really wierd results, such ret=-1 + > errno=EAGAIN, or ret=0 even though requested timeout was infinite. > After a little debugging I discovered a missing initi

Re: PATCH: Fix poll() impl on Win32

2009-01-07 Thread Jim Meyering
Jim Meyering wrote: > "Daniel P. Berrange" wrote: >> I've been using the GNULIB poll() impl in libvirt on Win32 (well Mingw + >> WINE) and found it was producing really wierd results, such ret=-1 + >> errno=EAGAIN, or ret=0 even though requested timeout was i

Re: option abbreviation exceptions

2009-01-10 Thread Jim Meyering
Eric Blake wrote: > According to Jim Meyering on 12/29/2008 10:02 AM: >>> $ /bin/[ --help me | head -n1 >>> /bin/[: missing `]' >>> $ /bin/[ --help | head -n1 >>> Usage: test EXPRESSION >>> $ /bin/[ --hel | head -n1 >>> Usage: test

Re: option abbreviation exceptions

2009-01-10 Thread Jim Meyering
Eric Blake wrote: > According to Jim Meyering on 1/10/2009 10:48 AM: >> "[" feels like it should be the exception. >> I see treating --v like --version as a feature. a typing saver. >> But with "[", it's good to minimize the number of strings that

Re: [bug #25294] assertion failure on dangling symlink to //

2009-01-11 Thread Jim Meyering
LINK(Errno) ((Errno) == ENOENT) #endif I checked a few Linux/GNU systems and found no ENOSHARE definition. I.e,. how about this patch? >From e5661c09cb915e2a3f24f9824be23ecd03fc Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 11 Jan 2009 22:57:37 +0100 Subject: [PATCH] fts: avoid

Re: [bug #25294] assertion failure on dangling symlink to //

2009-01-11 Thread Jim Meyering
Eric Blake wrote: > According to Jim Meyering on 1/11/2009 3:06 PM: >> I tried your "find -L dir-containing-loop" example >> on ext3, tmpfs, and xfs, and it appears d_type is always DT_LNK, > > Is there any file system on Linux where you can always get DT_UNKNOW

Re: [PATCH] inttostr.c: suppress a warning

2009-01-12 Thread Jim Meyering
shed the following change: >From 19b4d0fb6a9dff94b74fc948880da2f0c7ddd3e9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Nov 2008 17:36:15 +0100 Subject: [PATCH] inttostr.c: suppress a warning * lib/inttostr.c: Use #pragma GCC diagnostic ignored "-Wtype-limits" to ignore &q

Re: more m4 quoting

2009-01-13 Thread Jim Meyering
Jim Meyering wrote: > Jim Meyering wrote: >> FYI, now I'm looking at the changes induced by the following: >> >> git ls-files | grep '\.m4$' | xargs perl -pi \ >> -e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \ >> -e '

Re: more m4 quoting

2009-01-13 Thread Jim Meyering
Bruno Haible wrote: >> I'm about to apply the changes induced by the above commands. > > What's the rationale of quoting purely numeric m4 arguments, like in >AC_DEFINE([FOO], [1], ...) ? > It looks a bit like clutter to me, Initially I didn't do it, for just that reason, but once Eric sugge

Re: ACL related test-copy-file failure

2009-01-13 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > > Jim Meyering wrote: >> Here's more detail for the test-copy-file failure: >> [Bruno, the output you see below is slightly different that you might >> expect because I modified the script to use diff -c rather than cmp. ] >>

Re: C++ patch for m4/mktime.m4

2009-01-14 Thread Jim Meyering
Albert Chin wrote: > The Sun C++ compiler fails to compile the test case in m4/mktime.m4 > correctly because of the K&R style function prototypes. Patch attached. Hi Albert, That patch looks fine. Would you please write a ChangeLog entry and then send git format-patch output to the list? Then,

Re: sys/stat.h and nlink

2009-01-14 Thread Jim Meyering
Simon Josefsson wrote: > The test-sys_stat self-test fails on debian etch x86, see: > > http://autobuild.josefsson.org/gnulib/log-200901140954236318000.txt > > The problem is that sys/stat.h does not define nlink_t (at least not > unconditionally), however sys/types.h does: > > gnu...@mejsel:~$ ca

Re: C++ patch for m4/mktime.m4

2009-01-15 Thread Jim Meyering
Albert Chin wrote: >> That patch looks fine. >> Would you please write a ChangeLog entry and then send git format-patch >> output to the list? Then, I can easily/reliably apply it in your name >> using "git am". coreutils has similar contribution guidelines, with >> set-up instructions: >> >>

Re: more m4 quoting

2009-01-15 Thread Jim Meyering
Simon Josefsson wrote: > Hi Jim. The patch breaks openmp on debian etch. The patch below fixes > it, but maybe the remaining quoting also cause problems if you use > fortran (I don't know how to test that). Hi Simon, Nice catch. > gnu...@mejsel:~$ gnulib-tool --test --with-tests openmp ... >

Re: more m4 quoting

2009-01-15 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: > >>> AC_DEFUN([_AC_LANG_OPENMP], >>> -[_AC_LANG_DISPATCH([$0], [_AC_LANG], [...@])]) >>> +[_AC_LANG_DISPATCH([$0], _AC_LANG, [...@])]) >> >> This one makes sense. >> It fails on etch because i

Re: more m4 quoting

2009-01-15 Thread Jim Meyering
Bruno Haible wrote: > Simon Josefsson wrote: >> > If "C" must not be quoted, then shouldn't the quotes >> > around "C++" be dropped, too? >> >> I suppose, but I cannot trigger a problem. > > So, everyone is modifying this file based on guesswork? Stop, please. > > I wrote openmp.m4, incorporating

[PATCH] poll: remove declarations of unused variables

2009-01-15 Thread Jim Meyering
Hi Paolo, Ok to apply this? >From f446bd3210c4c9e708fb91677f9855c80eb90353 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Thu, 15 Jan 2009 22:29:34 +0100 Subject: [PATCH] poll: remove declarations of unused variables * lib/poll.c (poll) [WIN32_NATIVE]: Remove declarations of unused soc

poll: avoiding more warnings

2009-01-15 Thread Jim Meyering
Hi Paolo, After the used-uninitialized bug Dan Berrange found in the windows-only part of poll.c, we've been motivated to enable more warnings when building libvirt's subset of gnulib, even (or rather especially) when cross-compiling for mingw. To that end, there are a few more warnings in poll.c

Re: [PATCH] poll: remove declarations of unused variables

2009-01-16 Thread Jim Meyering
Paolo Bonzini wrote: > Jim Meyering wrote: >> Ok to apply this? > > Sure. I pushed Dan's change: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=03ba7406f5e0 >> /* Tell gcc not to warn about the (nfd < 0) tests, below. */ >> #if (_

Re: poll: avoiding more warnings

2009-01-16 Thread Jim Meyering
Jim Meyering wrote: > After the used-uninitialized bug Dan Berrange found > in the windows-only part of poll.c, we've been motivated > to enable more warnings when building libvirt's subset > of gnulib, even (or rather especially) when cross-compiling > for mingw. > &g

[PATCH] strerror: avoid warnings about discarding "const"

2009-01-16 Thread Jim Meyering
I'd like to push this today. Speak now if you object ;-) >From 7d9de4da85365b7b66d697f0b11ce93e416c7fd7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 16 Jan 2009 12:09:48 +0100 Subject: [PATCH] strerror: avoid warnings about discarding "const" * lib/strerror.c (rpl_

Re: [PATCH] strerror: avoid warnings about discarding "const"

2009-01-16 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > >> Speak now if you object ;-) >> + char const *m = NULL; > > I would prefer an identifier that is a little more verbose. Such as 'msg' > instead of 'm'? Ha! I used "msg" initially, but there's already an "mesg" local at the end, so I opted for shorter, to avoid

Re: [PATCH] strerror: avoid warnings about discarding "const"

2009-01-16 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> case EINPROGRESS: >> - return "Operation now in progress"; >> + m = "Operation now in progress"; >> case EALREADY: >> - return "Operation already in progress";

Re: [PATCH] strerror: avoid warnings about discarding "const"

2009-01-16 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> there's already an "mesg" local at the end > > Indeed! But still, I find 'msg' better instead of 'm'. Ok. I've changed back to "msg", and changed the offending "mesg" to &qu

Re: filenamecat-tests & fstrcmp-tests: needs program_name symbol

2009-01-18 Thread Jim Meyering
Simon Josefsson wrote: > The self-test for filenamecat fails to build on darwin: > > http://autobuild.josefsson.org/gnulib/log-200901180512377089000.txt > > Which also breaks the canonicalize module: > > http://autobuild.josefsson.org/gnulib/log-200901180511842725000.txt > > The fstrcmp-tests has

[PATCH] inttostr.c: suppress a warning

2009-01-18 Thread Jim Meyering
FYI, I've pushed this a few days ago. >From 19b4d0fb6a9dff94b74fc948880da2f0c7ddd3e9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Nov 2008 17:36:15 +0100 Subject: [PATCH] inttostr.c: suppress a warning * lib/inttostr.c: Use #pragma GCC diagnostic ignored "-Wtype-limi

Re: strftime updates

2009-01-18 Thread Jim Meyering
Bruno Haible wrote: > How about the other small cleanups that I mentioned in > ? > Here is a proposed patch. The comment in glibc ("The GNU C Library uses UTF8 > multibyte encoding") is actually wrong, since glibc supports local

[PATCH] gettimeofday: avoid warning: nested extern declaration of 'localtime'

2009-01-18 Thread Jim Meyering
FYI, I've just pushed this: >From b4c5933136d31eeb6d8abc2301044a5a7dfe4676 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Mon, 19 Jan 2009 08:13:17 +0100 * lib/gettimeofday.c: Move extern declaration out of function. --- ChangeLog |5 + lib/gettimeofday.c |5 +++--

Re: [PATCH] gettimeofday: avoid warning: nested extern declaration of 'localtime'

2009-01-19 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> FYI, I've just pushed this: >> * lib/gettimeofday.c: Move extern declaration out of function. > > Why not also do the same thing with the 'gmtime' declaration in the same file? Thanks. I d

Re: snapshot in preparation for 1.4.13

2009-01-19 Thread Jim Meyering
Eric Blake wrote: >> Meanwhile, I will be working on a gnulib patch that fixes >> unistd.h to provide STD{IN,OUT,ERR}_FILENO (gnulib has several files that >> do ad-hoc definition of these constants, but we might as well provide it >> for free in our replacement header). > > I'm applying this: > >

Re: getloadavg: check for c_strtod errors

2009-01-21 Thread Jim Meyering
Bruno Haible wrote: > getloadavg uses c_strtod, but does not completely chcek against all error > conditions (such as EINVAL or ENOMEM). Here's a proposed patch to that effect. > > The strtod documentation in POSIX says: > "Since 0 is returned on error and is also a valid return on success, an >

Re: c-strtod: improve error checking

2009-01-21 Thread Jim Meyering
Bruno Haible wrote: > Here's a proposed patch to improve c_strtod's error checking: > 1) It currently does not check against a NULL return from newlocale(), >which can happen for example if out of memory. > 2) When strtod_l or strtod returns an error, c_strtod fails to preserve >errno as a

Re: unicode printf modules failures on powerpc

2009-01-21 Thread Jim Meyering
Bruno Haible wrote: > Jim, it might be a good idea to do the same thing in > coreutils/m4/jm-macros.m4. Thanks. I've just done this: >From 2a8f5104cd4ee76dad4b803f04ec327e5199bcf8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 21 Jan 2009 14:48:15 +0100 Subject: [PATCH]

Re: support for universal binaries on MacOS X (5/6)

2009-01-21 Thread Jim Meyering
ends-on): Add multiarch. --- ChangeLog |8 m4/mktime.m4 |9 - modules/mktime |2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 168fbc2..07eb24a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-21

Re: c-strtod: improve error checking

2009-01-21 Thread Jim Meyering
Bruno Haible wrote: > Paolo Bonzini wrote: >> > + c_locale = newlocale (LC_ALL_MASK, "C", (locale_t)0); >> >> Can we cache c_locale in a static variable? > > This would make sense for speed, yes. (Think of calling c_strtod in a loop, > like it is done in getloadavg.c.) Here is a proposed patch. O

Re: [gnu-prog-discuss] url's in --help output

2009-01-23 Thread Jim Meyering
Simon Josefsson wrote: > l...@gnu.org (Ludovic Courtès) writes: ... >> Is there any reason this cannot be made part of `version-etc'? > > No reason. It seems like a better place actually. Jim, how about this > patch? Hi Simon, That looks fine. However, please make the three changes like this:

Re: c-strtod: handling of out-of-memory

2009-01-23 Thread Jim Meyering
e. Before, c_strtod had semantics very similar to those of strtod. The patch below fixes the existing problem. Once you've adjusted your patch to do the same for the new return path it adds, you're welcome to commit it. >From 2606266c5763fb46d7c61d97fc72de02a674c08f Mon Sep 17 00:00:

[PATCH] build: resolve conflict with new declaration from version-etc.h

2009-01-23 Thread Jim Meyering
FYI, today's addition in gnulib of emit_bug_reporting_address, broke coreutils builds, as Bob Proulx noted: http://buildbot.proulx.com:9000/ Here's the fix I've pushed: >From 016f8c99984d4a6005eef76d204cd2c396b357d0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 23

Re: c-strtod: handling of out-of-memory

2009-01-24 Thread Jim Meyering
Bruno Haible wrote: > 2009-01-23 Bruno Haible > > * lib/c-strtod.h (c_strtod, c_strtold): Add specification. Hi Bruno, > --- lib/c-strtod.h.orig 2009-01-24 00:08:16.0 +0100 > +++ lib/c-strtod.h2009-01-24 00:07:51.0 +0100 ... > + If successful, return the valu

Re: c-strtod: handling of out-of-memory

2009-01-24 Thread Jim Meyering
Bruno Haible wrote: > Yup, thanks. Committed with this fix, and a bit nicer formatting: Nicer indeed. > +/* Parse the initial portion of the string pointed to by NPTR as a floating- > + point number (in decimal or hexadecimal notation), like in the C locale: > + accepting only the ASCII digi

[PATCH] fflush: avoid warnings on modern systems

2009-01-26 Thread Jim Meyering
t portability cruft is evoking warnings, I propose to add even more cruft ;-) What do you think? Is it worth reindenting for the outer (pos-enclosing) braces I added? I presume C99 decl-after-code is not an option. Jim >From 5bc5a63fbe7a13b538cffdb0a933a9a33bda8fd4 Mon Sep 17 00:00:00 2001 From: Jim

[Mark McLoughlin] [PATCH] gnulib/tests: allow test-getaddrinfo to pass when offline

2009-01-26 Thread Jim Meyering
") If you like it, let me know and I'll take care of it. Subject: [PATCH] gnulib/tests: allow test-getaddrinfo to pass when offline From: Mark McLoughlin To: Jim Meyering Cc: libvir-list Date: Mon, 26 Jan 2009 08:30:27 + Message-Id: <1232958627.3724.16.ca...@b

Re: [PATCH] fflush: avoid warnings on modern systems

2009-01-26 Thread Jim Meyering
Eric Blake wrote: > According to Jim Meyering on 1/26/2009 10:34 AM: >> Annoyed that portability cruft is evoking warnings, >> I propose to add even more cruft ;-) >> What do you think? >> >> Is it worth reindenting for the outer (pos-enclosing) braces I added?

Re: [Mark McLoughlin] [PATCH] gnulib/tests: allow test-getaddrinfo to pass when offline

2009-01-27 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: >> Mark McLoughlin noticed that the getaddrinfo test fails >> when there's no network, and sent the patch below. >> >> This looks like a good idea. >> Though maybe we should make it skip the test (return 77)

[PATCH] useless-if-before-free: recognize more variants

2009-01-28 Thread Jim Meyering
test $$($u --name=z <(printf 'if(p)z(p);if(p)z(p);')|wc -l) = 2 i='if(NULL != p){\nfree (p);}'; $(do_diff) i='if(p != NULL){\nfree (p);}'; $(do_diff) i='if(p != 0){\nfree (p);}'; $(do_diff) # i='if((void *)0 != p){\nfree (p)

Re: expand-before-require bug

2009-01-28 Thread Jim Meyering
First, thanks for all your work on this. At least autoconf-2.59 warns: gnulib/m4/00gnulib.m4:11: warning: underquoted definition of NAME How about this work-around? >From f20cf45aad2fca5726dfaeb16865f1e0903357ed Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 28 Jan 2009 14:02:

Re: url's in --help output

2009-01-28 Thread Jim Meyering
Eric Blake wrote: > According to Eric Blake on 1/27/2009 10:08 AM: >> >> What do you think of this followup, which makes complete sentences, and >> consistently brackets URLs inside <>? > > Since Jim already changed coreutils to use this proposed style, and I just > committed a patch to autoconf t

Re: url's in --help output

2009-01-30 Thread Jim Meyering
k...@freefriends.org (Karl Berry) wrote: > Sorry for the delayed reply. > > > What do you think of this followup, which makes complete sentences, and > > consistently brackets URLs inside <>? > ... > + printf (_("%s home page: .\n"), > + printf (_("Gen

Re: fts finds no files under mingw

2009-02-01 Thread Jim Meyering
ko...@comcast.net wrote: > I've found a problem with the gnulib fts module. When using the mingw > cross compiler, the fts_read routine never finds any files or > directories other than the directories supplied to the preceeding > fts_open call. It seems that this will happen on any platform that

Re: fts finds no files under mingw

2009-02-01 Thread Jim Meyering
ko...@comcast.net wrote: ... > To find out what was happening, I took all of the gnulib code out of > the picture by using the i686-pc-mingw32-gcc compiler to directly > compile a simple test program, and found that the mingw opendir > routine sets the dd_handle to -1 itself. > > #include >

Re: url's in --help output

2009-02-03 Thread Jim Meyering
k...@freefriends.org (Karl Berry) wrote: ... > What will it take to get these modifications back upstream, so that > everyone can benefit from a new release of help2man? > > I pinged Brendan (help2man maintainer, bod at debian) fairly recently > about making a new release (GPLv3 etc.), and

Re: url's in --help output

2009-02-03 Thread Jim Meyering
"Brendan O'Dea" wrote: > On Tue, Feb 3, 2009 at 11:07 PM, Jim Meyering wrote: >> I've just done that with a message to bug-help2man, >> but don't see a list. Maybe it's just an alias. > > It is just an alias. > >> Similarly, I looked

[PATCH] avoid misc. warnings

2009-02-04 Thread Jim Meyering
I wrote these changes some time ago, and am going to push them shortly. >From 69dc39bca283cd4e8b8900858a5b0c90b445df6e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Nov 2008 17:10:29 +0100 Subject: [PATCH] avoid misc. warnings * lib/fsusage.c (UNUSED_PARAM): Define. (get_fs_us

Re: [PATCH] avoid misc. warnings

2009-02-04 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: >> +++ b/lib/fsusage.c >> @@ -1,6 +1,6 @@ >> /* fsusage.c -- return space usage of mounted file systems >> >> - Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003, 2004, 2005, 2006 >> + Copy

Re: fts finds no files under mingw

2009-02-04 Thread Jim Meyering
ke this change: I considered whether to distinguish the cases of always returning -1 (ENOTSUP) and returning some dirent. whose value happens to be -1 (EINVAL?), but it didn't seem to be worthwhile. >From 741ade865eee16193217bf7fa83596409e6091a9 Mon Sep 17 00:00:00 2001 From: Jim Meyering

Re: [PATCH] avoid misc. warnings

2009-02-05 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> I wrote these changes some time ago, and >> am going to push them shortly. >> >> +#undef UNUSED_PARAM >> +#ifdef __linux__ >> +# define UNUSED_PARAM _UNUSED_PARAMETER_ >> +#else >> +# defin

Re: error compiling regex gnulib module with pgcc compiler

2009-02-05 Thread Jim Meyering
ng gcc-4.4 it causes a compilation error: regex_internal.h:189:55: error: integer overflow in preprocessor expression This was reported against parted in November, I've noticed it in coreutils, too. If someone cares enough about those buggy old versions of PGC, they will find a better solu

Re: error compiling regex gnulib module with pgcc compiler

2009-02-06 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> I'm reverting this patch, >> >> http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=e48d8b47fb3eee8 >> >> since with the upcoming gcc-4.4 it causes a compilation error: >> >> r

Re: Bugs in unexpand(1) version 6.10

2009-02-10 Thread Jim Meyering
Mike Frysinger wrote: > On Friday 06 February 2009 01:13:13 Jim Meyering wrote: >> Pádraig Brady wrote: >> > Mike Frysinger wrote: >> >> On Tuesday 03 February 2009 03:28:58 Jim Meyering wrote: >> >>> Mike Frysinger wrote: >> >>

Re: Bugs in unexpand(1) version 6.10

2009-02-10 Thread Jim Meyering
Mike Frysinger wrote: ... >> > i was thinking a common change to the version-etc module to add a >> > "packager" field rather than having every package out there allow people >> > to tweak PACKAGE_NAME. what do you think of that ? >> >> Sounds sensible. >> The question then becomes whether to cha

[PATCH] fts: correct internal computation of nlinks (optimization-related)

2009-02-11 Thread Jim Meyering
FYI, while looking at the problem with du -X vs. fuse and stat'ing an excluded directory, I noticed a bogus conjunct. The patch below removes it: >From 66216f4811a8d82810e88371c64214191b31e244 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 11 Feb 2009 11:13:11 +0100 Subject: [PA

fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-12 Thread Jim Meyering
shing. >From 86014dca17f984dbb6c8e66dfcce0f655f7bd3eb Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 11 Feb 2009 21:08:11 +0100 Subject: [PATCH 1/2] fts: move a function definition "up" (no semantic change) * lib/fts.c (dirent_inode_sort_may_be_useful): Move definition "up" to precede upcoming use

Re: fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-13 Thread Jim Meyering
tion in the dir, FTS_CWD_FD? */ + opt_ok = leaf_optimization_applies (sp->fts_cwd_fd); t2->opt_ok = opt_ok; + t2->st_dev = p->fts_statp->st_dev; - struct LCO_ent *e = hash_insert (h, t2); - if (e == NULL) + ent = hash_insert (h, t2); + if (ent == NULL) { /* in

Re: fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-13 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: >> I vaguely recall feeling a slight twinge as I did that, >> but since coreutils proper has been using decl-after-stmt, >> for so long, I let it slide. > > How does that work? Do most compilers out there really support &g

Re: fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-13 Thread Jim Meyering
Jim Meyering wrote: ... > Here's an incremental, then the adjusted full patch. > > BTW, I test this with coreutils by running chcon -R[*] on a directory > containing 1000 files. With the patch, strace -c reports *1* > calls to newfstatat, but without, it reports 1001 of them. Pushed.

Re: fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-13 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: > >> Simon Josefsson wrote: >>> Jim Meyering writes: >>>> I vaguely recall feeling a slight twinge as I did that, >>>> but since coreutils proper has been using decl-after-stmt, >>>> for

make find *much* faster on reiserfs

2009-02-15 Thread Jim Meyering
cleanly. And my daily updatedb-run find now runs in just 3-4 minutes instead of over 30. >From 167e1bb018f4a336b57a792e3b552dfc9993459b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 15 Feb 2009 13:03:52 +0100 Subject: [PATCH 1/2] find: enable fts's FTS_CWDFD mode * find/ftsfind.c (ft

Re: fts: make find *much* faster on dirent.d_type-challenged FS

2009-02-16 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: > >> Jim Meyering wrote: >> ... >>> Here's an incremental, then the adjusted full patch. >>> >>> BTW, I test this with coreutils by running chcon -R[*] on a directory >>> containing 1000

Re: [PATCH] fts: correct internal computation of nlinks (optimization-related)

2009-02-17 Thread Jim Meyering
James Youngman wrote: > What's the effect of the change? Merely a performance difference? > Or is there a correctness issue? "slight clarification" The only possible influence on correctness would be if the change affected how "nlinks" was calculated, since that's the only place "is_dir" is us

[PATCH] fts: avoid used-uninitialized error due to recent change

2009-02-17 Thread Jim Meyering
In my pre-release testing of coreutils valgrind spotted a new problem. Here's the fix I'll probably push soon. >From 35cacf46fb3848941709955041c6902c7f6c20ca Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 18 Feb 2009 08:37:24 +0100 Subject: [PATCH] fts: avoid used-uninitiali

Re: vc-list-files-cvs failure?

2009-02-18 Thread Jim Meyering
Simon Josefsson wrote: > The test-vc-list-files-cvs.sh self test appears to fail on minimal > debian lenny installations: > > http://autobuild.josefsson.org/gnulib/log-200902170434329384000.txt > http://autobuild.josefsson.org/gnulib/log-2009021709042.txt > > However it works on debian etc

Re: utimensat breakage

2009-02-18 Thread Jim Meyering
Michael Stone wrote: > It seems that libc6 doesn't have any fallback code in utimensat to > handle older kernels that don't provide that interface (leading to > "fuction not implemented" messages from touch or other utilities which > use the function. This is a runtime error which depends on the k

Re: utimensat breakage

2009-02-18 Thread Jim Meyering
Jim Meyering wrote: > Michael Stone wrote: >> It seems that libc6 doesn't have any fallback code in utimensat to >> handle older kernels that don't provide that interface (leading to >> "fuction not implemented" messages from touch or other utilities whi

test-fflush2 fails on debian unstable (probably lenny, too)

2009-02-18 Thread Jim Meyering
Currently, coreutils (latest snapshot) gets one failure on debian unstable (and probably Lenny, too): FAIL: test-fflush2.sh.log (exit: 134) = test-fflush2.c:112: assertion failed ./test-fflush2.sh: line 6: 9631 Aborted ./test-fflush2${EXEEXT}

Re: test-fflush2 fails on debian unstable (probably lenny, too)

2009-02-18 Thread Jim Meyering
Eric Blake wrote: > Jim Meyering meyering.net> writes: >> Currently, coreutils (latest snapshot) gets one failure >> on debian unstable (and probably Lenny, too): >> >> FAIL: test-fflush2.sh.log (exit: 134) >> = >>

Re: new modules for Unicode normalization

2009-02-21 Thread Jim Meyering
Bruno Haible wrote: ... > With this, you can easily create a program that reads UTF-8 from stdin and > outputs it as canonicalized UTF-8 on stdout: > - create a "stream" that takes a Unicode character and outputs it to > stdout. (Gnulib module 'unistr/u8-uctomb'.) > - Wrap a Unicode normali

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c

2009-02-28 Thread Jim Meyering
Paul Eggert wrote: > Eric Blake writes: >> I just checked POSIX, and this is entirely true - the exec*() family is >> allowed to inherit an ignored SIGCHLD, in deference to older systems like >> SysV; and wait()/waitpid() are allowed to fail with ECHILD if SIGCHLD is >> ignored. But most systems

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c

2009-02-28 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> [reviving an old thread...] > > This was a reply to > <http://lists.gnu.org/archive/html/bug-coreutils/2008-10/msg00216.html>, > for those who - like me - lost the context after 4 months. > >> I confirmed th

Re: [patch #6758] Add support for Atari FreeMiNT OS

2009-02-28 Thread Jim Meyering
Alan Hourihane wrote: > > Summary: Add support for Atari FreeMiNT OS > Project: GNU Core Utilities Thanks for the work. I've included that patch below for convenience. Most of it applies to gnulib, so I've Cc'd its list. Th

Re: vc-list-files-cvs failure?

2009-03-01 Thread Jim Meyering
Ralf Wildenhues wrote: ... >> That fall-back code relies on gawk, sed and /bin/sh, >> so you might try with a different shell, e.g., bash vs. dash, >> or inserting "| tee /tmp/log " into the pipeline to see if >> the damage is already done before the eval'd "sed" code runs. > > I can reproduce this

[PATCH] announce-gen: new option: --no-print-checksums

2009-03-01 Thread Jim Meyering
I've been manually removing MD5 and SHA1 checksums from the template generated by coreutils' "make alpha/beta/major", so have added this so I can automate it: >From 7d6b0649427017451841dc69f0be307ba2646076 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 2 Mar 2009

Re: Darwin vs. cat

2009-03-03 Thread Jim Meyering
Eric Blake wrote: > When running test-closein.sh, I'm getting spurious output on Darwin: > > cat: standard output: Bad file descriptor > PASS: test-closein.sh > > $ cat --version | head -n 1 > cat (GNU coreutils) 7.1 > $ uname -v > Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; > root:

Re: [PATCH] announce-gen: new option: --no-print-checksums

2009-03-03 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: >> I've been manually removing MD5 and SHA1 checksums from the template >> generated by coreutils' "make alpha/beta/major", so have added this >> so I can automate it: > > Btw, is there any point in pub

Re: chmod failing with EPERM and PRIV_ALL needed

2009-03-03 Thread Jim Meyering
David Bartley wrote: > I've encountered a bug in tar on OpenSolaris (possibly present in > Solaris 10 and others). I have a tarball that contains a setuid binary > (usr/bin/passwd). When I untar it as root, I see the following error: > > tar: usr/bin/passwd: Cannot change mode to r-sr-sr-x: Not own

[PATCH] unlinkdir: cannot_unlink_dir may modify process state

2009-03-03 Thread Jim Meyering
[oops, sent to bug-coreutils by mistake] FYI, I've added this comment: >From 8d2524ce78ca107074727cbd8780c26a203a107c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 3 Mar 2009 15:07:45 +0100 Subject: [PATCH] unlinkdir: cannot_unlink_dir may modify process state * lib/unl

Re: [PATCH] Specify archive suffixes to announce-gen

2009-03-05 Thread Jim Meyering
Sergey Poznyakoff wrote: > The enclosed patch add to announce-gen a new option, --archive-suffix, > which allows to specify new archive suffixes. For example: > > announce-gen --archive-suffix cpio.gz --archive-suffix shar.gz > > It is useful for such projects as GNU tar, which is distributed in

Re: automatically preventing merge commits on master

2009-03-07 Thread Jim Meyering
Bruno Haible wrote: > Oops, I did it again. This time, I have a history of what I did, and I'm sure > I worked in a single gnulib checkout: > > - Did a "git commit" of some change, but did not push it. > - In the meantime you did your commit. > - Then, in rapid sequence: > git pull > git co

Re: [PATCH] Fix bug on Solaris that prevents setuid root files from being created

2009-03-11 Thread Jim Meyering
David Bartley wrote: > The following two patches (1 for tar, 1 for gnulib) fix the bug I > reported earlier [1]. I ran 'make check' successfully on Linux as > well. Hi David, Sorry about the delay. Thanks for working on this. Have you started the copyright assignment process described here (for

Re: bug in join: case comparisons don't work in multibyte locales

2009-03-11 Thread Jim Meyering
Bruno Haible wrote: > In coreutils/src/join.c, there is a FIXME mentioning that the -i option for > case insensitive comparison of the input lines does not work in multibyte > locales. And indeed, in an UTF-8 locale, I see this: ... > Find attached a draft patch for the 'join' program, that fixes t

Re: interix 3.5 select bug

2009-03-11 Thread Jim Meyering
Pádraig Brady wrote: > Markus Duft wrote: >> Hi! >> >> I have a more or less trivial patch for the nanosleep replacement for >> interix. The problem I ran into is, that select() has a bug, making it fail >> with "bad address" if the number of fd's to select on is zero. Setting the >> set-size to 1

Re: interix 3.5 select bug

2009-03-11 Thread Jim Meyering
Simon Josefsson wrote: > Jim Meyering writes: > >> +* lib/nanosleep.c (my_usleep): Use 1, not 0, as the first argument. >> +This avoids a failure on Interix 3.5. Details in >> +http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16077 > > Is this the

Re: interix 3.5 select bug

2009-03-12 Thread Jim Meyering
Bruno Haible wrote: > Simon Josefsson wrote: >> > It seems that another solution would be to >> > detect this problem, and to replace select if the system's select >> > doesn't work. > > Good point. Using 0 as nfd argument is common; try searching for > " = select (0, " on http://www.google.com/cod

[PATCH] avoid gcc warnings about unused macro definitions

2009-03-12 Thread Jim Meyering
e, and I'm not inclined to move definitions "down" into the #if blocks where they're used or even to add #if directives around the definition at the top. We may well just have to live with some of these. >From f93bd98a9570a4455f16eafc49c6227e5caa5a53 Mon Sep 17 00:00:00 2001 F

Re: interix 3.5 select bug

2009-03-13 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: >> > + /* Interix 3.5 has a bug: it does not support nfds == 0. */ >> > + if (nfds == 0) >> > +{ >> > + nfds = 1; >> > + rfds = NULL; >> > + wfds = NULL; >> > + xf

Re: parallel make and the maintainer GNUmakefile

2009-03-14 Thread Jim Meyering
Ralf Wildenhues wrote: > Hello Jim, all, ... > 2) disable parallel builds if more than one target is listed on the > command line, and at least one of them invokes a recursive target. > This is the gist of the issue, and the patch only avoids this issue > while practically enabling parallelism thro

Re: Inaccurate description of configure option --without-included-regex

2009-03-17 Thread Jim Meyering
Reuben Thomas wrote: > The documentation says: > > --without-included-regex > don't compile regex; this is the default on 32-bit > systems with recent-enough versions of the GNU C > Library (use with caution on other sy

Re: Inaccurate description of configure option --without-included-regex

2009-03-18 Thread Jim Meyering
Eric Blake wrote: > According to Reuben Thomas on 3/17/2009 5:53 PM: >> On Tue, 17 Mar 2009, Jim Meyering wrote: >> >>> Thanks. That sounds like a fine improvement. >>> Do you feel like writing a commit-log/ChangeLog entry, too? >>> (i.e., gi

Re: cgit on savannah

2009-03-19 Thread Jim Meyering
Eric Blake wrote: >> http://git.savannah.gnu.org/cgit/zile.git/tree/src/lists.c > > Wow. That was my first experience with cgit instead of gitweb, and I > liked it. When did savannah add cgit, and when did the savannah project > link to 'browse this project's source' switch over to the cgit URL?

[PATCH] fsusage: avoid syntax error due to statement-before-declaration

2009-03-19 Thread Jim Meyering
FYI, I've pushed this: >From 22e91b1ffcc74d3cfa0466741dec6f54841e042f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 19 Mar 2009 09:15:24 +0100 Subject: [PATCH] fsusage: avoid syntax error due to statement-before-declaration * lib/fsusage.c (get_fs_usage): Put warning-a

Re: string.h uses restrict

2009-03-19 Thread Jim Meyering
Reuben Thomas wrote: > On Wed, 18 Mar 2009, Eric Blake wrote: > >> Ahh. The bug is in zile, not gnulib. > > Ah, thanks very much, and apologies for the noise. Always including first is easy to forget. You might want to use rules like these from gnulib's maint.mk: # Nearly all .c files must incl

<    2   3   4   5   6   7   8   9   10   11   >