delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/02/16:04:38

Message-ID: <39887E9F.CBF071DA@softhome.net>
Date: Wed, 02 Aug 2000 22:03:43 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.73 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp-workers AT delorie DOT com
Subject: Re: New function: lstat()
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000802102812 DOT 26285B-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> > +int
> > +stat(const char *path, struct stat *statbuf)
> > +{
> > +   return lstat(path, statbuf);
> > +}
> 
> If this is all `stat' does, then it is identical to `lstat', right?

That's the point.

> But AFAIK they should be different: if the file is a link, `lstat'
> brings the info about the link, not about its target.  

Correct.

> I would expect
> `stat' to call `lstat' after it resolves the symlinks in its argument.
> I also don't see any symlink-related code in (what now is) `lstat',
> and lstat.txh doesn't say anything about symlinks.

This patch (as all previous) is meant as if release would happen tomorrow.
So it just adds lstat() wrapper. If political decision to accept symlinks
for the next DJGPP release is made, then there will be next patch to make
stat() actually resolve symlinks.

Laurynas

- Raw text -


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