summaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 86b227a9bd1..06207dda135 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -20,28 +20,11 @@ You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdio.h>
-#include <ctype.h>
#include "config.h"
+#include "system.h"
#include "hash.h"
#include "demangle.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
#define MAX_ITERATIONS 17
/* Obstack allocation and deallocation routines. */
@@ -49,12 +32,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define obstack_chunk_free free
extern char * xmalloc PARAMS((unsigned));
-#ifdef NEED_DECLARATION_FREE
-extern void free ();
-#endif
-#ifdef NEED_DECLARATION_GETENV
-extern char * getenv ();
-#endif
/* Defined in collect2.c. */
extern int vflag, debug;
@@ -306,10 +283,10 @@ static char *
frob_extension (s, ext)
char *s, *ext;
{
- char *p = (char *) rindex (s, '/');
+ char *p = rindex (s, '/');
if (! p)
p = s;
- p = (char *) rindex (p, '.');
+ p = rindex (p, '.');
if (! p)
p = s + strlen (s);
@@ -575,7 +552,7 @@ scan_linker_output (fname)
/* Try a mangled name in `quotes'. */
{
demangled *dem = 0;
- p = (char *) index (q+1, '`');
+ p = index (q+1, '`');
q = 0;
#define MUL "multiple definition of "
@@ -586,7 +563,7 @@ scan_linker_output (fname)
char *beg = p - sizeof (MUL) + 1;
*p = 0;
if (!strcmp (beg, MUL) || !strcmp (beg, UND))
- p++, q = (char *) index (p, '\'');
+ p++, q = index (p, '\'');
}
if (q)
*q = 0, dem = demangled_hash_lookup (p, false);