Date: Wed, 23 May 2001 06:29:33 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Laurynas Biveinis" Message-Id: <3405-Wed23May2001062932+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <20010522222711.A2213@lauras.lt> Subject: Re: Add d_type member to struct dirent References: <1659-Tue22May2001182402+0300-eliz AT is DOT elta DOT co DOT il> <20010522222711 DOT A2213 AT lauras DOT lt> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Laurynas Biveinis" > Date: Tue, 22 May 2001 22:27:11 +0200 > > > + /* This could or could not be a symlink. Since we don't want > > + to pay the price of finding out, we return DT_UNKNOWN, and > > + the application is supposed to stat the file in response. */ > > + dir->de.d_type = DT_UNKNOWN; > > This scenario in comment isn't the fastest one - the fastest > way to check out for symlinkiness is __internal_readlink(), > not *stat(). So if application really stat unknown files, I suggest > doing __internal_readlink() here. I was thinking about GNU Fileutils, and they only use standard functions. But you are right: the comment should be more general. Perhaps I should add something to the docs about this.