This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]