This is the mail archive of the gcc-patches@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: VAX PATCH: remove FILE_NAME_NONDIRECTORY


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


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