[dave@hiauly1.hia.nrc.ca: Incorrect file name simplication]

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Mar 30 09:53:00 GMT 2001


> 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)



More information about the Gcc-bugs mailing list