delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/14/15:20:49

Date: Thu, 14 Jun 2001 22:18:04 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: lauras AT softhome DOT net
Message-Id: <7458-Thu14Jun2001221803+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: <20010524195242.A236@lauras.lt>
Subject: Re: Add d_type member to struct dirent
References: <20010523210505 DOT A478 AT lauras DOT lt> <Pine DOT SUN DOT 3 DOT 91 DOT 1010524084349 DOT 17472E-100000 AT is> <20010524195242 DOT A236 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

> From: "Laurynas Biveinis" <lauras AT softhome DOT net>
> Date: Thu, 24 May 2001 19:52:42 +0200
> 
> > > ...but in 99.9% cases __internal_readlink() will call just filelength()
> > > to check for 510 bytes magic size. No open() at all in this case, and plain
> > > filelength() is cheaper that stat(), isn't it?
> > 
> > ??? I don't have the latest CVS sources handy where I type this, but IIRC 
> > filelength takes a handle, so __internal_readlink needs to open the file, 
> > before it knows that it's 510 byte long.
> 
> What I forgot to tell is that __internal_readlink does findfirst() to
> find out file size if it has path instead of the handle. Does my point
> still hold true then?

I ended up opening the file and passing a handle to
__internal_readlink.  It seemed simpler.

Thanks for the feedback.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019