This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: VAX PATCH: remove FILE_NAME_NONDIRECTORY
- To: lars dot spam at nocrew dot org (Lars Brinkhoff)
- Subject: Re: VAX PATCH: remove FILE_NAME_NONDIRECTORY
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 21 Feb 2001 16:21:00 -0500 (EST)
- Cc: zackw at stanford dot edu, dave dot anglin at nrc dot ca, gcc-patches at gcc dot gnu dot org
> "John David Anglin" <dave@hiauly1.hia.nrc.ca> writes:
> > {
> > +#ifdef FILE_NAME_NONDIRECTORY
> > + return FILE_NAME_NONDIRECTORY (x);
> > +#else
> > char *tmp = (char *) strrchr (x, '/');
> > if (DIR_SEPARATOR != '/' && ! tmp)
> > tmp = (char *) strrchr (x, DIR_SEPARATOR);
> > @@ -1738,6 +1741,7 @@
> > return (char *) (tmp + 1);
> > else
> > return (char *) x;
> > +#endif
> > }
>
> I also suspect file_name_nondirectory should use the IS_DIR_SEPARATOR
> macro instead of DIR_SEPARATOR.
I take back my comment about the return value. I think we should use
basename.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)