From: Mumit Khan Date: Fri, 23 Jan 1998 18:35:06 +0000 (+0000) Subject: lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. X-Git-Tag: releases/libf2c-0.5.21~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab535daca9214d040042550cd2f565dfa3497423;p=thirdparty%2Fgcc.git lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. (file_name_nondirectory): Use. From-SVN: r17461 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5d5ccf9cfa0c..38b4afd361da 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 23 18:34:37 1998 Mumit Khan + + * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. + (file_name_nondirectory): Use. + Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij * pt.c (coerce_template_parms): Don't access elements of ARGLIST diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 1114a631e5c1..a74e0fd259cd 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -73,6 +73,10 @@ extern int errno; /* needed for VAX. */ #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free +#ifndef DIR_SEPARATOR +#define DIR_SEPARATOR '/' +#endif + extern struct obstack permanent_obstack; extern struct obstack *current_obstack, *saveable_obstack; @@ -104,7 +108,7 @@ char * file_name_nondirectory (x) char *x; { - char *tmp = (char *) rindex (x, '/'); + char *tmp = (char *) rindex (x, DIR_SEPARATOR); if (tmp) return (char *) (tmp + 1); else