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

2009-02-13 Thread Simon Josefsson
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 decl-after-stmt (not likely?!), or do you offer a patch for u

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

2009-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Karl Berry on 2/13/2009 6:00 PM: > On the other hand, I thought I remembered seeing some previous mail > about not requiring C99 in general. So we consider decl-after-stmt an > exception to this? True C99 support is very difficult to fin

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

2009-02-13 Thread Karl Berry
Do most compilers out there really support decl-after-stmt (not likely?!), In compiling the binaries for TeX Live, where we try to use fairly old compilers and systems, the only platform which had problems with decl-after-stmt was v5 of the IBM C compiler for AIX 4.3. There are various r

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
Ralf Wildenhues wrote: ... > Nice speedup! A couple of comments, reading the patch: Hi Ralf, Thanks for taking the time. >> diff --git a/lib/fts.c b/lib/fts.c >> index 164834c..735f23f 100644 >> --- a/lib/fts.c >> +++ b/lib/fts.c > >> +case S_MAGIC_PROC: >> + /* Explicitly listing thi