diff options
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/repo.c | 12 | ||||
-rw-r--r-- | gcc/cp/xref.c | 9 |
3 files changed, 18 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c1ea91b..06808f5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com> + + * repo.c (rindex): Add decl unconditionally. + (get_base_filename, open_repo_file): Don't cast rindex. + * xref.c (rindex): Add decl unconditionally. + (index): Remove unused decl. + (open_xref_file): Don't cast rindex. + Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com> * class.c (build_vbase_path): Propagate the result type properly. diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index e029f90..d18730c 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -34,15 +34,15 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_STRING_H #include <string.h> -#else -extern char * rindex (); #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #else extern char * getenv (); #endif -extern char * getpwd PROTO((void)); + +extern char *rindex (); +extern char *getpwd PROTO((void)); static tree repo_get_id PROTO((tree)); static char *save_string PROTO((char *, int)); @@ -277,7 +277,7 @@ get_base_filename (filename) return NULL; } - p = (char *) rindex (filename, '/'); + p = rindex (filename, '/'); if (p) return p+1; else @@ -294,10 +294,10 @@ open_repo_file (filename) if (s == NULL) return; - p = (char *) rindex (s, '/'); + p = rindex (s, '/'); if (! p) p = s; - p = (char *) rindex (p, '.'); + p = rindex (p, '.'); if (! p) p = s + strlen (s); diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c index b579588..6269f17 100644 --- a/gcc/cp/xref.c +++ b/gcc/cp/xref.c @@ -40,11 +40,10 @@ extern char *getpwd PROTO((void)); #ifdef HAVE_STRING_H #include <string.h> -#else -extern char *index (); -extern char *rindex (); #endif +extern char *rindex (); + /* The character(s) used to join a directory specification (obtained with getwd or equivalent) with a non-absolute file name. */ @@ -813,14 +812,14 @@ open_xref_file(file) #ifdef XREF_FILE_NAME XREF_FILE_NAME (xref_name, file); #else - s = (char *) rindex (file, '/'); + s = rindex (file, '/'); if (s == NULL) sprintf (xref_name, ".%s.gxref", file); else { ++s; strcpy (xref_name, file); - t = (char *) rindex (xref_name, '/'); + t = rindex (xref_name, '/'); ++t; *t++ = '.'; strcpy (t, s); |