cpplib: basename () fix

DJ Delorie dj@redhat.com
Mon Mar 5 14:21:00 GMT 2001


> You obviously can't but if the test fails for ANY reason the basename
> routine gets built.

> This all started with an attempt to replace the procedure
> file_name_nondirectory currently in toplev.c with "basename".  The
> XPG variant is not appropriate for OSes such as VMS or DOS.  On the
> otherhand, the name-within-directory variant of basename found in
> glibc and libiberty isn't a bad fit.  It is also more suited to what
> is needed in gcc as far as I can tell.  The XPG variant is very unix
> centric in terms of the definition of pathnames, separator characters
> etc.  Thus, I wouldn't promote the replacement of the libiberty
> version with the XPG version.

It sounds like you're advocating having some other function, which
isn't called basename, that does what basename used to do (before XPG)
but does it in a way that gcc can use it safely, that we always use.



More information about the Gcc-patches mailing list