[dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
Zack Weinberg
zackw@Stanford.EDU
Fri Mar 30 09:51:00 GMT 2001
On Fri, Mar 30, 2001 at 06:16:38PM +0100, Neil Booth wrote:
> Zack Weinberg wrote:-
>
> > I'd like some more context. How do we get a silly path like that in
> > the first place?
>
> Surely that's not the point; what matters is that they do occur and we
> should get these cases right.
>
> How about _cpp_simplify_pathname doing a lstat () on the path to the left
> when about to simplify a ".." segment and not bothering unless S_ISDIR?
> Is lstat portable enough? We could do it iff !VMS && !MSDOS_BLAH.
That seems reasonable enough. Not everyone has lstat, but I believe
that all systems which lack it, don't have symlinks at all, so the
check is unnecessary.
zw
More information about the Gcc-bugs
mailing list