* 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
+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.
Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
* class.c (build_vbase_path): Propagate the result type properly.
#ifdef HAVE_STRING_H
#include <string.h>
#ifdef HAVE_STRING_H
#include <string.h>
-#else
-extern char * rindex ();
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
extern char * getenv ();
#endif
#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));
static tree repo_get_id PROTO((tree));
static char *save_string PROTO((char *, int));
- p = (char *) rindex (filename, '/');
+ p = rindex (filename, '/');
- p = (char *) rindex (s, '/');
- p = (char *) rindex (p, '.');
if (! p)
p = s + strlen (s);
if (! p)
p = s + strlen (s);
#ifdef HAVE_STRING_H
#include <string.h>
#ifdef HAVE_STRING_H
#include <string.h>
-#else
-extern char *index ();
-extern char *rindex ();
+extern char *rindex ();
+
/* The character(s) used to join a directory specification (obtained with
getwd or equivalent) with a non-absolute file name. */
/* The character(s) used to join a directory specification (obtained with
getwd or equivalent) with a non-absolute file name. */
#ifdef XREF_FILE_NAME
XREF_FILE_NAME (xref_name, file);
#else
#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);
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);
++t;
*t++ = '.';
strcpy (t, s);