This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- To: Zack Weinberg <zackw at stanford dot edu>
- Subject: Re: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 30 Mar 2001 18:16:38 +0100
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, gcc-bugs at gcc dot gnu dot org
- References: <20010329221600.A6696@daikokuya.demon.co.uk> <20010329142059.A239@stanford.edu>
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.
I could try to implement this, in such a way that the include paths on
the include chain are simplified at most once, and that simplification
on these only occurs lazily. This way we'd only do the work if we need
to do it, and do it at most once. Do you think that'd fly and keep
everyone happy?
Neil.