aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMumit Khan <khan@xraylith.wisc.edu>1998-02-03 19:57:57 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-02-03 14:57:57 -0500
commite95d117b78072a7e064c18ed9abc1441881a2c9b (patch)
tree84f7f5419368cb392cb58ad30d136ee73739f552 /gcc
parent309ca998ba0caf81d49fb4974fb1dcebae6f24c9 (diff)
downloadgcc-e95d117b78072a7e064c18ed9abc1441881a2c9b.zip
gcc-e95d117b78072a7e064c18ed9abc1441881a2c9b.tar.gz
gcc-e95d117b78072a7e064c18ed9abc1441881a2c9b.tar.bz2
* lex.c (file_name_nondirectory): Also check for '/'.
From-SVN: r17634
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/lex.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4e33900..6b2147b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 2960d24..550ca34 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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