bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #30868] Take advantage of dirent.d_type to save a stat()


From: Bruno Haible
Subject: Re: [bug #30868] Take advantage of dirent.d_type to save a stat()
Date: Thu, 26 Aug 2010 10:09:45 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> >    <http://savannah.gnu.org/bugs/?30868>
> >
> > In lib/savedir.c, in isdir1() (or the code that calls it), the d_type member
> > of the dirent struct can be checked instead of doing a comparatively 
> > expensive
> > isdir() (which calls stat()).
> 
> Thanks for the suggestion; adding bug-gnulib, since this code is 
> maintained there and shared by several projects.

gnulib/lib/savedir.c and grep/lib/savedir.c have diverged long ago. The one in
gnulib does not call isdir at all. The one in grep takes include / exclude
arguments for filtering the result, which users of gnulib's savedir don't need.

So, IMO, this report is best handled on grep's side alone.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]