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: neil at daikokuya dot demon dot co dot uk (Neil Booth)
- Subject: Re: [dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Fri, 30 Mar 2001 12:52:59 -0500 (EST)
- Cc: zackw at stanford dot edu, gcc-bugs at gcc dot gnu dot org
> 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.
As far as I can tell, the algorithm is totally wrong for VMS. I would
suggest not simplifying VMS pathnames. There is some info on the portability
of lstat in Jim Meyering's fileutils package. See lib/xstat.in.
> 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?
That looks like an excellent solution.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)