aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/repo.c
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@lisa.cygnus.com>1997-11-03 23:20:24 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1997-11-03 18:20:24 -0500
commita8a63732c4f3ee7af0543a1790f9076363205213 (patch)
tree185c5d57a3e384b7c593ae5da958e3d5996f7dd9 /gcc/cp/repo.c
parent08bb4b3b2cfdd4cf3c7621df2ec9933041a1bbde (diff)
downloadgcc-a8a63732c4f3ee7af0543a1790f9076363205213.zip
gcc-a8a63732c4f3ee7af0543a1790f9076363205213.tar.gz
gcc-a8a63732c4f3ee7af0543a1790f9076363205213.tar.bz2
repo.c (rindex): Add decl unconditionally.
* 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. fix potential problems with 64-bit compilers and casting an int up to a char* From-SVN: r16306
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r--gcc/cp/repo.c12
1 files changed, 6 insertions, 6 deletions
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);