This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: basename () fix
- To: dj at redhat dot com (DJ Delorie)
- Subject: Re: cpplib: basename () fix
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 5 Mar 2001 17:40:17 -0500 (EST)
- Cc: gcc-patches at gcc dot gnu dot org, neil at daikokuya dot demon dot co dot uk
> > 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.
That would be fine.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)