* lex.c (file_name_nondirectory): Also check for '/'.

From-SVN: r17634
This commit is contained in:
Mumit Khan 1998-02-03 19:57:57 +00:00 committed by Jason Merrill
parent 309ca998ba
commit e95d117b78
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
* lex.c (file_name_nondirectory): Also check for '/'.
Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
* parse.y (primary): Deal with statement-expressions in

View File

@ -117,7 +117,9 @@ char *
file_name_nondirectory (x)
char *x;
{
char *tmp = (char *) rindex (x, DIR_SEPARATOR);
char *tmp = (char *) rindex (x, '/');
if (DIR_SEPARATOR != '/' && ! tmp)
tmp = (char *) rindex (x, DIR_SEPARATOR);
if (tmp)
return (char *) (tmp + 1);
else