diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-03-20 14:58:42 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-03-20 14:58:42 +0000 |
commit | 670ee920976dbb37076758547de92cabf017843d (patch) | |
tree | d54887798fa85070a1ff0f7331e43ef538f2f78e /gcc/collect2.c | |
parent | 1107c4b3ddb1932630ca4372701cf246192cf82e (diff) | |
download | gcc-670ee920976dbb37076758547de92cabf017843d.zip gcc-670ee920976dbb37076758547de92cabf017843d.tar.gz gcc-670ee920976dbb37076758547de92cabf017843d.tar.bz2 |
Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
on system.h.
* alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
xcoffout.c: Include system.h. Organize include ordering so
that stdarg/varargs comes before other system headers. Remove
spurious casts of functions assured of a prototype in system.h.
From-SVN: r18726
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 89feaa4..1a26e5b 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -26,40 +26,16 @@ Boston, MA 02111-1307, USA. */ /* Build tables of static constructors and destructors and run ld. */ #include "config.h" -#include <sys/types.h> -#include <stdio.h> -#include <ctype.h> -#include <errno.h> +#include "system.h" #include <signal.h> -#include <sys/file.h> #include <sys/stat.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 COLLECT #include "demangle.h" #include "obstack.h" #include "gansidecl.h" -#ifndef errno -extern int errno; -#endif - #ifndef HAVE_STRERROR extern char *sys_errlist[]; extern int sys_nerr; @@ -75,12 +51,6 @@ char *strerror(); #define vfork fork #endif -#ifndef R_OK -#define R_OK 4 -#define W_OK 2 -#define X_OK 1 -#endif - #ifndef WIFSIGNALED #define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f) #endif @@ -272,7 +242,6 @@ char * temporary_firstobj; /* Defined in the automatically-generated underscore.c. */ extern int prepends_underscore; -extern char *getenv (); extern char *mktemp (); extern FILE *fdopen (); @@ -337,17 +306,6 @@ static int ignore_library PROTO((char *)); char *xcalloc (); char *xmalloc (); -#ifdef NEED_DECLARATION_INDEX -extern char *index (); -#endif - -#ifdef NEED_DECLARATION_RINDEX -extern char *rindex (); -#endif - -#ifdef NEED_DECLARATION_FREE -extern void free (); -#endif #ifdef NO_DUP2 int @@ -1028,8 +986,8 @@ main (argc, argv) and a new one is installed (rare, but we should handle it). ??? Hopefully references to COLLECT_NAME can be removed at some point. */ - collect_name = (char *) getenv ("COLLECT_NAME"); - collect_names = (char *) getenv ("COLLECT_NAMES"); + collect_name = getenv ("COLLECT_NAME"); + collect_names = getenv ("COLLECT_NAMES"); p = (char *) xmalloc (strlen ("COLLECT_NAMES=") + (collect_name ? strlen (collect_name) + 1 : 0) @@ -1055,7 +1013,7 @@ main (argc, argv) sprintf (p, "COLLECT_NAME=%s", argv[0]); putenv (p); - p = (char *) getenv ("COLLECT_GCC_OPTIONS"); + p = getenv ("COLLECT_GCC_OPTIONS"); while (p && *p) { char *q = extract_string (&p); @@ -1272,7 +1230,7 @@ main (argc, argv) AIX support needs to know if -shared has been specified before parsing commandline arguments. */ - p = (char *) getenv ("COLLECT_GCC_OPTIONS"); + p = getenv ("COLLECT_GCC_OPTIONS"); while (p && *p) { char *q = extract_string (&p); |