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: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: VAX PATCH: remove FILE_NAME_NONDIRECTORY
- From: Lars Brinkhoff <lars dot spam at nocrew dot org>
- Date: 21 Feb 2001 22:14:45 +0100
- Cc: zackw at stanford dot edu (Zack Weinberg), dave dot anglin at nrc dot ca, gcc-patches at gcc dot gnu dot org
- Organization: nocrew
- References: <200102212037.PAA00752@hiauly1.hia.nrc.ca>
"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.
--
http://lars.nocrew.org/