| delorie.com/archives/browse.cgi | search |
| Date: | Sun, 07 Jan 2001 19:44:51 +0200 |
| 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: | <9003-Sun07Jan2001194450+0200-eliz@is.elta.co.il> |
| X-Mailer: | Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 |
| CC: | djgpp-workers AT delorie DOT com, rich AT phekda DOT freeserve DOT co DOT uk |
| In-reply-to: | <20010107155532.A4259@lauras.lt> |
| Subject: | Re: Bug in lstat() - wrong arguments to FSEXT |
| References: | <20010107141016 DOT A314 AT lauras DOT lt> <Pine DOT SUN DOT 3 DOT 91 DOT 1010107141348 DOT 25836D-100000 AT is> <20010107155532 DOT A4259 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: lauras AT softhome DOT net
> Date: Sun, 7 Jan 2001 15:55:32 +0200
>
> Oh, thanks for explanation. But I still feel not very confident
> about how should I fix it. Would passing `real_path' itself
> instead of `&real_path' work?
One way is to have an intermediary function:
int lstat (const char *path, struct stat *statbuf)
{
char real_path[FILENAME_MAX];
...
if (!__solve_dir_symlinks(path, real_path))
return -1;
...
if (try_fsext (&ret, real_path, statbuf))
return ret;
if (stat_assist (real_path, statbuf))
...
where try_fsext is this:
static int try_fsext (int *ret, const char *path, struct stat *statbuf)
{
return __FSEXT_call_open_handlers (__FSEXT_stat, ret, &path);
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |