From 670ee920976dbb37076758547de92cabf017843d Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 20 Mar 1998 14:58:42 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 28 ++++++++ gcc/Makefile.in | 178 ++++++++++++++++++++++++---------------------- gcc/alias.c | 11 +-- gcc/bitmap.c | 10 +-- gcc/c-aux-info.c | 9 +-- gcc/c-common.c | 16 +---- gcc/c-decl.c | 6 +- gcc/c-iterate.c | 6 +- gcc/c-lang.c | 2 +- gcc/c-lex.c | 21 +----- gcc/c-pragma.c | 2 +- gcc/c-typeck.c | 22 +----- gcc/caller-save.c | 2 +- gcc/calls.c | 12 ++-- gcc/collect2.c | 52 ++------------ gcc/combine.c | 4 +- gcc/cse.c | 4 +- gcc/dbxout.c | 16 +---- gcc/dwarf2out.c | 12 +--- gcc/dwarfout.c | 33 +-------- gcc/emit-rtl.c | 2 +- gcc/except.c | 6 +- gcc/explow.c | 2 +- gcc/expmed.c | 2 +- gcc/expr.c | 2 +- gcc/final.c | 13 +--- gcc/flow.c | 3 +- gcc/function.c | 5 +- gcc/gcc.c | 13 ++-- gcc/getpwd.c | 23 +++--- gcc/global.c | 6 +- gcc/integrate.c | 6 +- gcc/jump.c | 2 +- gcc/local-alloc.c | 5 +- gcc/loop.c | 2 +- gcc/optabs.c | 3 +- gcc/pexecute.c | 6 +- gcc/prefix.c | 19 +---- gcc/print-rtl.c | 3 +- gcc/print-tree.c | 2 +- gcc/profile.c | 10 +-- gcc/real.c | 7 +- gcc/recog.c | 2 +- gcc/reg-stack.c | 2 +- gcc/regclass.c | 5 +- gcc/regmove.c | 4 +- gcc/reload.c | 2 +- gcc/reload1.c | 5 +- gcc/reorg.c | 2 +- gcc/rtl.c | 6 +- gcc/rtlanal.c | 2 +- gcc/sched.c | 5 +- gcc/sdbout.c | 2 +- gcc/stmt.c | 8 +-- gcc/stor-layout.c | 2 +- gcc/stupid.c | 6 +- gcc/tlink.c | 33 ++------- gcc/toplev.c | 37 +--------- gcc/tree.c | 24 ++----- gcc/unroll.c | 2 +- gcc/varasm.c | 7 +- gcc/xcoffout.c | 9 +-- 62 files changed, 228 insertions(+), 525 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d745315f29c3..a05afa8781c1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +Fri Mar 20 17:36:23 1998 Kaveh R. Ghazi + + * 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. + Fri Mar 20 11:19:40 1998 Stan Cox * reg-stack.c (pop_stack): Define. Pops any register on the diff --git a/gcc/Makefile.in b/gcc/Makefile.in index ec91439bbe24..b5e9c3f58cf7 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1238,16 +1238,19 @@ $(srcdir)/c-gperf.h: c-parse.gperf $(srcdir)/c-parse.gperf >tmp-gperf.h $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h -c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h -c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h -c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H) -c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-lex.h c-tree.h \ +c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \ + output.h +c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \ + output.h +c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) +c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \ $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h -c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h -c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h -c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \ +c-aux-info.o : c-aux-info.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h +c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h +c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(TREE_H) except.h function.h \ defaults.h c-pragma.h -c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h +c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \ + flags.h # To make a configuration always use collect2, set USE_COLLECT2 to ld. ld: collect2 @@ -1261,12 +1264,13 @@ collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \ cplus-dem.o underscore.o version.o choose-temp.o $(LIBS) -collect2.o : collect2.c $(CONFIG_H) gansidecl.h gstab.h obstack.h $(DEMANGLE_H) +collect2.o : collect2.c $(CONFIG_H) system.h gansidecl.h gstab.h obstack.h \ + $(DEMANGLE_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \ -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'` -tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) +tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h hash.o: hash.c hash.h cplus-dem.o: cplus-dem.c $(DEMANGLE_H) @@ -1287,7 +1291,7 @@ stamp-under: $(GCC_PASSES) # A file used by all variants of C. -c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h +c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h # Language-independent files. @@ -1297,7 +1301,7 @@ DRIVER_DEFINES = \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \ -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" -gcc.o: gcc.c $(CONFIG_H) gansidecl.h system.h multilib.h Makefile \ +gcc.o: gcc.c $(CONFIG_H) system.h gansidecl.h multilib.h Makefile \ $(lang_specs_files) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(DRIVER_DEFINES) \ @@ -1308,124 +1312,126 @@ dumpvers: dumpvers.c version.o: version.c obstack.o: obstack.c $(CONFIG_H) choose-temp.o: choose-temp.c $(CONFIG_H) gansidecl.h -pexecute.o: pexecute.c $(CONFIG_H) gansidecl.h -prefix.o: prefix.c $(CONFIG_H) gansidecl.h Makefile +pexecute.o: pexecute.c $(CONFIG_H) system.h gansidecl.h +prefix.o: prefix.c $(CONFIG_H) system.h gansidecl.h Makefile $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DPREFIX=\"$(prefix)\" \ -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'` convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h -tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h -print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) -stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h -fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h system.h -toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) \ +tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h +print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) +stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h +fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h +toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \ flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \ $(lang_options_files) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \ -DTARGET_NAME=\"$(target_alias)\" \ -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'` -rtl.o : rtl.c $(CONFIG_H) $(RTL_H) +rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) -print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H) -rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H) +print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) +rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H) -varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \ - defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \ - output.h c-pragma.h -function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ - insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ - $(RECOG_H) output.h -stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ +varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \ + function.h defaults.h insn-codes.h expr.h hard-reg-set.h regs.h \ + xcoffout.h output.h c-pragma.h +function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ + function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \ + insn-config.h $(RECOG_H) output.h +stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \ insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \ loop.h $(RECOG_H) -except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ - insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ - $(RECOG_H) output.h except.h -expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \ - insn-flags.h insn-codes.h expr.h insn-config.h $(RECOG_H) output.h \ +except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ + function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \ + insn-config.h $(RECOG_H) output.h except.h +expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \ + regs.h insn-flags.h insn-codes.h expr.h insn-config.h $(RECOG_H) output.h \ typeclass.h hard-reg-set.h -calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \ - insn-flags.h regs.h -expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ +calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h expr.h \ + insn-codes.h insn-flags.h regs.h +expmed.o : expmed.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) real.h -explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \ - insn-config.h expr.h $(RECOG_H) insn-flags.h insn-codes.h -optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ +explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ + hard-reg-set.h insn-config.h expr.h $(RECOG_H) insn-flags.h insn-codes.h +optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) reload.h -dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \ +dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h regs.h \ insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h -sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \ +sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \ function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \ insn-config.h obstack.h xcoffout.h c-pragma.h -dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \ - insn-config.h reload.h output.h defaults.h -dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \ - insn-config.h insn-codes.h reload.h output.h defaults.h hard-reg-set.h \ - regs.h expr.h -xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h -emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h except.h \ - function.h regs.h insn-config.h insn-codes.h $(RECOG_H) real.h expr.h \ - obstack.h hard-reg-set.h -real.o : real.c $(CONFIG_H) $(TREE_H) -getpwd.o : getpwd.c $(CONFIG_H) - -integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \ - insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \ - output.h $(RECOG_H) except.h - -jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \ +dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \ + flags.h insn-config.h reload.h output.h defaults.h +dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \ + flags.h insn-config.h insn-codes.h reload.h output.h defaults.h \ + hard-reg-set.h regs.h expr.h +xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \ + flags.h +emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ + except.h function.h regs.h insn-config.h insn-codes.h $(RECOG_H) real.h \ + expr.h obstack.h hard-reg-set.h +real.o : real.c $(CONFIG_H) system.h $(TREE_H) +getpwd.o : getpwd.c $(CONFIG_H) system.h + +integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ + integrate.h insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h \ + function.h output.h $(RECOG_H) except.h + +jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \ insn-config.h insn-codes.h insn-flags.h $(RECOG_H) expr.h real.h except.h -stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h +stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h -cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \ - insn-config.h insn-codes.h $(RECOG_H) expr.h -profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \ - $(TREE_H) output.h regs.h -loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \ +cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h \ + real.h insn-config.h insn-codes.h $(RECOG_H) expr.h +profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \ + gcov-io.h $(TREE_H) output.h regs.h +loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \ insn-flags.h insn-codes.h regs.h hard-reg-set.h $(RECOG_H) expr.h real.h -unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \ +unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h insn-codes.h \ integrate.h regs.h $(RECOG_H) flags.h expr.h loop.h -flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \ +flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \ $(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h -combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \ +combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \ insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \ $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h -regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \ +regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \ $(BASIC_BLOCK_H) regs.h insn-config.h $(RECOG_H) reload.h real.h -local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \ - regs.h hard-reg-set.h insn-config.h $(RECOG_H) output.h -bitmap.o : bitmap.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) regs.h -global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \ +local-alloc.o : local-alloc.c $(CONFIG_H) system.h $(RTL_H) flags.h \ + $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h $(RECOG_H) output.h +bitmap.o : bitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) \ + regs.h +global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h \ $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h -reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\ +reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h expr.h\ reload.h $(RECOG_H) hard-reg-set.h insn-config.h insn-codes.h regs.h real.h -reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \ +reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h expr.h \ reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \ $(BASIC_BLOCK_H) $(RECOG_H) output.h -caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \ +caller-save.o : caller-save.c $(CONFIG_H) system.h $(RTL_H) flags.h \ regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) \ reload.h expr.h -reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \ +reorg.o : reorg.c $(CONFIG_H) system.h $(RTL_H) conditions.h hard-reg-set.h \ $(BASIC_BLOCK_H) regs.h insn-config.h insn-codes.h insn-attr.h \ insn-flags.h $(RECOG_H) flags.h output.h expr.h -alias.o : alias.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \ +alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \ insn-codes.h -regmove.o : regmove.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \ - recog.h output.h reload.h regs.h hard-reg-set.h flags.h expr.h insn-flags.h -$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) $(RTL_H) \ - $(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h \ - insn-attr.h system.h -final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \ +regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \ + insn-codes.h recog.h output.h reload.h regs.h hard-reg-set.h flags.h \ + expr.h insn-flags.h +$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \ + $(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h insn-attr.h +final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h regs.h \ $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \ hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h -recog.o : recog.c $(CONFIG_H) $(RTL_H) \ +recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \ regs.h $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \ insn-flags.h insn-codes.h real.h -reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \ +reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \ regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \ diff --git a/gcc/alias.c b/gcc/alias.c index 78e0c7a7e4e8..9f7537d40450 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -20,16 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif +#include "system.h" #include "rtl.h" #include "expr.h" #include "regs.h" diff --git a/gcc/bitmap.c b/gcc/bitmap.c index 6456708fe45a..cefbf798283f 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -19,21 +19,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "flags.h" #include "obstack.h" #include "regs.h" #include "basic-block.h" -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef NEED_DECLARATION_FREE -extern void free PROTO((void *)); -#endif - /* Obstack to allocate bitmap elements from. */ static struct obstack bitmap_obstack; static int bitmap_obstack_init = FALSE; diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index a252153e6f8d..2f2f8c213ba5 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -22,14 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#ifdef HAVE_STRING_H -# include -#else -# ifdef HAVE_STRINGS_H -# include -#endif -#endif +#include "system.h" #include "flags.h" #include "tree.h" #include "c-tree.h" diff --git a/gcc/c-common.c b/gcc/c-common.c index ef5f6910bbfd..952306e1a20d 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -19,26 +19,12 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "c-lex.h" #include "c-tree.h" #include "flags.h" #include "obstack.h" -#include - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - #ifndef WCHAR_TYPE_SIZE #ifdef INT_TYPE_SIZE diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 35a2357544c3..bf5d3ac60804 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -27,17 +27,13 @@ Boston, MA 02111-1307, USA. */ line numbers. For example, the CONST_DECLs for enum values. */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "flags.h" #include "output.h" #include "c-tree.h" #include "c-lex.h" -#ifdef HAVE_STDLIB_H -#include -#endif - /* In grokdeclarator, distinguish syntactic contexts of declarators. */ enum decl_context { NORMAL, /* Ordinary declaration */ diff --git a/gcc/c-iterate.c b/gcc/c-iterate.c index f8dec10b98b3..de6fd116873b 100644 --- a/gcc/c-iterate.c +++ b/gcc/c-iterate.c @@ -1,5 +1,5 @@ /* Build expressions with type checking for C compiler. - Copyright (C) 1987, 88, 89, 92, 93, 1996 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92, 93, 96, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ both their declarations and the expansion of statements using them. */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "c-tree.h" #include "flags.h" @@ -255,6 +255,8 @@ collect_iterators (exp, list) break; case RTL_EXPR: return list; + default: + break; } for (i = 0; i < num_args; i++) diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 19d742ab134e..4b4a6840e35c 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */ #include "config.h" +#include "system.h" #include "tree.h" -#include #include "input.h" /* Each of the functions defined here diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 22e7e5f5c5c6..d32f7a833b19 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -19,20 +19,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" - -#include -#include +#include "system.h" #include -#if HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "rtl.h" #include "tree.h" @@ -43,8 +31,6 @@ Boston, MA 02111-1307, USA. */ #include "c-parse.h" #include "c-pragma.h" -#include - /* MULTIBYTE_CHARS support only works for native compilers. ??? Ideally what we want is to model widechar support after the current floating point support. */ @@ -53,14 +39,9 @@ Boston, MA 02111-1307, USA. */ #endif #ifdef MULTIBYTE_CHARS -#include #include #endif -#ifndef errno -extern int errno; -#endif - #if USE_CPPLIB #include "cpplib.h" cpp_reader parse_in; diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index a37aa98755f3..480daca02987 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "except.h" #include "function.h" diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 791968b29e86..ad2833ec1618 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -29,36 +29,16 @@ Boston, MA 02111-1307, USA. */ like a strange sort of assignment). */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "c-tree.h" #include "flags.h" #include "output.h" -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - /* Nonzero if we've already printed a "missing braces around initializer" message within this initializer. */ static int missing_braces_mentioned; -#ifdef NEED_DECLARATION_INDEX -extern char *index (); -#endif - -#ifdef NEED_DECLARATION_RINDEX -extern char *rindex (); -#endif - static tree qualify_type PROTO((tree, tree)); static int comp_target_types PROTO((tree, tree)); static int function_types_compatible_p PROTO((tree, tree)); diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 4053aa093d57..57dfbb8c91ef 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "insn-config.h" #include "flags.h" diff --git a/gcc/calls.c b/gcc/calls.c index 86dc28bcba63..bb9197a5f0e3 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -19,17 +19,17 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#include "rtl.h" -#include "tree.h" -#include "flags.h" -#include "expr.h" -#include "regs.h" #ifdef __STDC__ #include #else #include #endif +#include "system.h" +#include "rtl.h" +#include "tree.h" +#include "flags.h" +#include "expr.h" +#include "regs.h" #include "insn-flags.h" /* Decide whether a function's arguments should be processed diff --git a/gcc/collect2.c b/gcc/collect2.c index 89feaa4c1857..1a26e5bd3714 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 -#include -#include -#include +#include "system.h" #include -#include #include -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#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); diff --git a/gcc/combine.c b/gcc/combine.c index 6404787db2ea..8cb32dc67c69 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -81,8 +81,8 @@ Boston, MA 02111-1307, USA. */ #include #endif -/* Must precede rtl.h for FFS. */ -#include +/* stdio.h must precede rtl.h for FFS. */ +#include "system.h" #include "rtl.h" #include "flags.h" diff --git a/gcc/cse.c b/gcc/cse.c index b525dccdfec5..823c6f0afaca 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -/* Must precede rtl.h for FFS. */ -#include +/* stdio.h must precede rtl.h for FFS. */ +#include "system.h" #include "rtl.h" #include "regs.h" diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 0a158622fc86..dffbd1924527 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -68,17 +68,7 @@ Boston, MA 02111-1307, USA. */ For more on data type definitions, see `dbxout_type'. */ #include "config.h" - -#include -#include - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif +#include "system.h" #include "tree.h" #include "rtl.h" @@ -89,10 +79,6 @@ Boston, MA 02111-1307, USA. */ #include "defaults.h" #include "output.h" /* ASM_OUTPUT_SOURCE_LINE may refer to sdb functions. */ -#ifndef errno -extern int errno; -#endif - #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" #endif diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d46aa3a98eac..56d200402771 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -27,18 +27,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ information. */ #include "config.h" +#include "system.h" #include "defaults.h" -#include -#if HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "tree.h" #include "flags.h" #include "rtl.h" diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index c9fb09e95984..0f1e62bd28f9 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #ifdef DWARF_DEBUGGING_INFO -#include +#include "system.h" #include "dwarf.h" #include "tree.h" #include "flags.h" @@ -34,30 +34,11 @@ Boston, MA 02111-1307, USA. */ #include "defaults.h" #if defined(DWARF_TIMESTAMPS) -#if defined(POSIX) -#include -#else /* !defined(POSIX) */ -#include -#if defined(__STDC__) -extern time_t time (time_t *); -#else /* !defined(__STDC__) */ -extern time_t time (); -#endif /* !defined(__STDC__) */ +#if !defined(POSIX) +extern time_t time PROTO ((time_t *)); /* FIXME: use NEED_DECLARATION_TIME */ #endif /* !defined(POSIX) */ #endif /* defined(DWARF_TIMESTAMPS) */ -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - /* We cannot use in GCC source, since that would include GCC's assert.h, which may not be compatible with the host compiler. */ #undef assert @@ -69,14 +50,6 @@ extern time_t time (); extern char *getpwd (); -#ifdef NEED_DECLARATION_INDEX -extern char *index (); -#endif - -#ifdef NEED_DECLARATION_RINDEX -extern char *rindex (); -#endif - /* IMPORTANT NOTE: Please see the file README.DWARF for important details regarding the GNU implementation of Dwarf. */ diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 442c740b1159..e6c07aae1f25 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -35,12 +35,12 @@ Boston, MA 02111-1307, USA. */ is the kind of rtx's they make and what arguments they use. */ #include "config.h" -#include #ifdef __STDC__ #include #else #include #endif +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" diff --git a/gcc/except.c b/gcc/except.c index de538faaafcd..46795835b82c 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -390,7 +390,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "defaults.h" -#include +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" @@ -405,10 +405,6 @@ Boston, MA 02111-1307, USA. */ #include "recog.h" #include "output.h" -#ifdef HAVE_STDLIB_H -#include -#endif - /* One to use setjmp/longjmp method of generating code for exception handling. */ diff --git a/gcc/explow.c b/gcc/explow.c index 33d6e9d9d141..6b08946e687d 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" diff --git a/gcc/expmed.c b/gcc/expmed.c index f6da8acd48ad..fc04b376398b 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" diff --git a/gcc/expr.c b/gcc/expr.c index 178f4f1e1ad0..f1397c5ebac8 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "machmode.h" #include "rtl.h" #include "tree.h" diff --git a/gcc/final.c b/gcc/final.c index 07b589eeb3bf..74a6d15d7437 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -50,18 +50,7 @@ Boston, MA 02111-1307, USA. */ #else #include #endif -#include -#include -#if HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif +#include "system.h" #include "tree.h" #include "rtl.h" diff --git a/gcc/flow.c b/gcc/flow.c index 09dacf50deee..e5fe01058678 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -109,8 +109,7 @@ Boston, MA 02111-1307, USA. */ reg_n_calls_crosses and reg_basic_block. */ #include "config.h" -#include -#include +#include "system.h" #include "rtl.h" #include "basic-block.h" #include "insn-config.h" diff --git a/gcc/function.c b/gcc/function.c index ac4a4982fa13..062e631ed92d 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -39,10 +39,7 @@ Boston, MA 02111-1307, USA. */ then scans all the RTL instructions so far generated to correct them. */ #include "config.h" -#include -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" diff --git a/gcc/gcc.c b/gcc/gcc.c index c558de3beac0..ab376553a6e4 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -33,17 +33,16 @@ compilation is specified by a string called a "spec". */ #include "config.h" -#include "gansidecl.h" -#include "system.h" - -#include -#include #ifdef __STDC__ #include #else #include #endif +#include "system.h" +#include +#include +#include "gansidecl.h" #include "obstack.h" @@ -4416,7 +4415,7 @@ main (argc, argv) first_time = FALSE; obstack_grow (&collect_obstack, "'-", 2); q = switches[i].part1; - while ((p = (char *) index (q,'\''))) + while ((p = index (q,'\''))) { obstack_grow (&collect_obstack, q, p-q); obstack_grow (&collect_obstack, "'\\''", 4); @@ -4429,7 +4428,7 @@ main (argc, argv) { obstack_grow (&collect_obstack, " '", 2); q = *args; - while ((p = (char *) index (q,'\''))) + while ((p = index (q,'\''))) { obstack_grow (&collect_obstack, q, p-q); obstack_grow (&collect_obstack, "'\\''", 4); diff --git a/gcc/getpwd.c b/gcc/getpwd.c index e48b277b95ab..6830c164acf1 100644 --- a/gcc/getpwd.c +++ b/gcc/getpwd.c @@ -1,21 +1,14 @@ /* getpwd.c - get the working directory */ #include "config.h" - -#include -#include +#include "system.h" #include -#ifndef errno -extern int errno; -#endif - /* Virtually every UN*X system now in common use (except for pre-4.3-tahoe BSD systems) now provides getcwd as called for by POSIX. Allow for the few exceptions to the general rule here. */ #if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD) -#include extern char *getwd (); #define getcwd(buf,len) getwd(buf) #ifdef MAXPATHLEN @@ -29,10 +22,9 @@ extern char *getcwd (); #define GUESSPATHLEN 100 #endif /* (defined (USG) || defined (VMS)) */ -char *getenv (); char *xmalloc (); -#ifndef VMS +#if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN32__))) /* Get the working directory. Use the PWD environment variable if it's set correctly, since this is faster and gives more uniform answers @@ -80,7 +72,7 @@ getpwd () return p; } -#else /* VMS */ +#else /* VMS || _WIN32 && !__CYGWIN32__ */ #ifndef MAXPATHLEN #define MAXPATHLEN 255 @@ -91,8 +83,13 @@ getpwd () { static char *pwd = 0; - if (!pwd) pwd = getcwd (xmalloc (MAXPATHLEN+1), MAXPATHLEN+1); + if (!pwd) + pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1 +#ifdef VMS + , 0 +#endif + ); return pwd; } -#endif /* VMS */ +#endif /* VMS || _WIN32 && !__CYGWIN32__ */ diff --git a/gcc/global.c b/gcc/global.c index a97c27d662f6..0f8c143fcfbf 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -20,11 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include - -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "flags.h" diff --git a/gcc/integrate.c b/gcc/integrate.c index d31b3b3ed6e1..e6258b33b05b 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -21,11 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include - -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "tree.h" diff --git a/gcc/jump.c b/gcc/jump.c index 4b7a5f4d035d..e0d20a60caf2 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -52,7 +52,7 @@ Boston, MA 02111-1307, USA. */ from other passes as well. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "flags.h" #include "hard-reg-set.h" diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index cb126a4f7db7..cff332f5267d 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -60,10 +60,7 @@ Boston, MA 02111-1307, USA. */ here if their preferred class is likely to be used by spills. */ #include "config.h" -#include -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "flags.h" #include "basic-block.h" diff --git a/gcc/loop.c b/gcc/loop.c index 5e3039f18ff3..2a5033249864 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ while to do these things. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "obstack.h" #include "expr.h" diff --git a/gcc/optabs.c b/gcc/optabs.c index e8f10372d959..e69b4a1756e4 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "tree.h" #include "flags.h" @@ -30,7 +30,6 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "recog.h" #include "reload.h" -#include /* Each optab contains info on how this target machine can perform a particular operation diff --git a/gcc/pexecute.c b/gcc/pexecute.c index 38b5874f27c9..45a5a8e665e3 100644 --- a/gcc/pexecute.c +++ b/gcc/pexecute.c @@ -27,11 +27,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #endif -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif +#include "system.h" #ifdef IN_GCC #include "gansidecl.h" diff --git a/gcc/prefix.c b/gcc/prefix.c index 09f4f193c4e2..f270172e5fa4 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -64,29 +64,18 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include "gansidecl.h" #ifdef __STDC__ #include #else #include #endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - +#include "system.h" #ifdef _WIN32 #include #endif +#include "gansidecl.h" + static char *get_key_value PROTO((char *)); static char *translate_name PROTO((char *)); static char *concat PVPROTO((char *, ...)); @@ -97,8 +86,6 @@ static char *lookup_key PROTO((char *)); static HKEY reg_key = (HKEY) INVALID_HANDLE_VALUE; #endif -extern char *getenv (); - /* Given KEY, as above, return its value. */ static char * diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 8db02fe94a38..2bdc6122c8d9 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -20,8 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#include +#include "system.h" #include "rtl.h" diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 5b81bc5dd9f8..3d43d18b8a21 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -20,8 +20,8 @@ Boston, MA 02111-1307, USA. */ #include "config.h" +#include "system.h" #include "tree.h" -#include extern char *mode_name[]; diff --git a/gcc/profile.c b/gcc/profile.c index 5d319f470a3f..39a375ed54c2 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -41,14 +41,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ achieve this, see Dain Sample's UC Berkeley thesis. */ #include "config.h" -#include -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif +#include "system.h" #include "rtl.h" #include "flags.h" #include "insn-flags.h" @@ -60,7 +53,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "gcov-io.h" extern char * xmalloc (); -extern void free (); /* One of these is dynamically created whenever we identify an arc in the function. */ diff --git a/gcc/real.c b/gcc/real.c index afef6c14043e..29dcfcd4fa8a 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -21,14 +21,9 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#include +#include "system.h" #include "tree.h" -#ifndef errno -extern int errno; -#endif - /* To enable support of XFmode extended real floating point, define LONG_DOUBLE_TYPE_SIZE 96 in the tm.h file (m68k.h or i386.h). diff --git a/gcc/recog.c b/gcc/recog.c index 32daf793af74..ad9dff29d07b 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "insn-config.h" #include "insn-attr.h" diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index af94021e9cb0..3a2fe4301b14 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -158,7 +158,7 @@ Boston, MA 02111-1307, USA. */ */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "rtl.h" #include "insn-config.h" diff --git a/gcc/regclass.c b/gcc/regclass.c index e96420bcfea6..1114ba74cc80 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -24,10 +24,7 @@ Boston, MA 02111-1307, USA. */ and a function init_reg_sets to initialize the tables. */ #include "config.h" -#include -#if HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "hard-reg-set.h" #include "flags.h" diff --git a/gcc/regmove.c b/gcc/regmove.c index 3f85f7b0a25d..54a54b309a9b 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -30,8 +30,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #endif -/* Must precede rtl.h for FFS. */ -#include +/* stdio.h must precede rtl.h for FFS. */ +#include "system.h" #include "rtl.h" #include "insn-config.h" diff --git a/gcc/reload.c b/gcc/reload.c index b21eab7349bc..2783686fdb86 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -88,7 +88,7 @@ a register with any other reload. */ #define REG_OK_STRICT #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "insn-config.h" #include "insn-codes.h" diff --git a/gcc/reload1.c b/gcc/reload1.c index e843ceabe925..6b2720a11338 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -20,10 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "obstack.h" #include "insn-config.h" diff --git a/gcc/reorg.c b/gcc/reorg.c index f0bda909e9ef..d74ba1040a90 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -116,7 +116,7 @@ Boston, MA 02111-1307, USA. */ effect to the ARM, differing mostly in which insn is "in charge". */ #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "expr.h" #include "insn-config.h" diff --git a/gcc/rtl.c b/gcc/rtl.c index 1de50c21202b..4bed8c7221e3 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -20,11 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include -#include -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "real.h" diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 7a4fecdc59bb..ffd420e3c5aa 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "rtl.h" static int rtx_addr_can_trap_p PROTO((rtx)); diff --git a/gcc/sched.c b/gcc/sched.c index f2ee7edcae83..b539569dfb6e 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -118,10 +118,7 @@ Boston, MA 02111-1307, USA. */ beginning of basic blocks that have been scheduled. */ #include "config.h" -#include -#if HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "basic-block.h" #include "regs.h" diff --git a/gcc/sdbout.c b/gcc/sdbout.c index a18afe3fc81a..dcef9d8bd6cd 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -44,7 +44,7 @@ AT&T C compiler. From the example below I would conclude the following: #ifdef SDB_DEBUGGING_INFO -#include +#include "system.h" #include "tree.h" #include "rtl.h" #include "regs.h" diff --git a/gcc/stmt.c b/gcc/stmt.c index 6b370ba27566..207a4adde467 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -34,13 +34,7 @@ Boston, MA 02111-1307, USA. */ after parsing the then-clause. */ #include "config.h" - -#include -#include - -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "tree.h" diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 491af0ffcd19..3c940006bb09 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#include +#include "system.h" #include "tree.h" #include "flags.h" diff --git a/gcc/stupid.c b/gcc/stupid.c index 318b5b1a18ef..3af13a104b04 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -43,11 +43,7 @@ Boston, MA 02111-1307, USA. */ and assigned hard regs in priority order. */ #include "config.h" -#include - -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include "rtl.h" #include "hard-reg-set.h" diff --git a/gcc/tlink.c b/gcc/tlink.c index 86b227a9bd18..06207dda135c 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 -#include #include "config.h" +#include "system.h" #include "hash.h" #include "demangle.h" -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#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); diff --git a/gcc/toplev.c b/gcc/toplev.c index 70dddc24bd33..5fbf36dedba8 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -29,43 +29,12 @@ Boston, MA 02111-1307, USA. */ #else #include #endif -#include +#undef FLOAT /* This is for hpux. They should change hpux. */ +#undef FFS /* Some systems define this in param.h. */ +#include "system.h" #include #include -#include -#include #include -#undef FLOAT -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#if HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#undef FLOAT /* This is for hpux. They should change hpux. */ -#undef FFS /* Some systems define this in param.h. */ - -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -#endif -#endif #ifdef HAVE_SYS_RESOURCE_H # include diff --git a/gcc/tree.c b/gcc/tree.c index bf16d4c9f20c..53f2da5dae25 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -34,30 +34,18 @@ Boston, MA 02111-1307, USA. */ by all passes of the compiler. */ #include "config.h" +#ifdef __STDC__ +#include +#else +#include +#endif +#include "system.h" #include #include "flags.h" #include "tree.h" #include "except.h" #include "function.h" #include "obstack.h" -#ifdef __STDC__ -#include -#else -#include -#endif -#include - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef NEED_DECLARATION_FREE -extern void free PROTO((void *)); -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free diff --git a/gcc/unroll.c b/gcc/unroll.c index c9f3772f1568..2191e0c3f275 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -147,7 +147,7 @@ struct _factor { int factor, count; } factors[NUM_FACTORS] enum unroll_types { UNROLL_COMPLETELY, UNROLL_MODULO, UNROLL_NAIVE }; #include "config.h" -#include +#include "system.h" #include "rtl.h" #include "insn-config.h" #include "integrate.h" diff --git a/gcc/varasm.c b/gcc/varasm.c index c7783d039c88..42dca296f9ca 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -27,10 +27,7 @@ Boston, MA 02111-1307, USA. */ and are responsible for combining constants with the same value. */ #include "config.h" -#include -#ifdef HAVE_STDLIB_H -#include -#endif +#include "system.h" #include /* #include */ #include "rtl.h" @@ -52,8 +49,6 @@ Boston, MA 02111-1307, USA. */ #include "xcoffout.h" #endif -#include - #ifndef TRAMPOLINE_ALIGNMENT #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY #endif diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index 60f6b32758b9..90ed5e3da62f 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -1,5 +1,5 @@ /* Output xcoff-format symbol table information from GNU compiler. - Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -24,10 +24,8 @@ Boston, MA 02111-1307, USA. */ interface. Many functions are very similar to their counterparts in sdbout.c. */ -/* Include this first, because it may define MIN and MAX. */ -#include - #include "config.h" +#include "system.h" #include "tree.h" #include "rtl.h" #include "flags.h" @@ -113,6 +111,9 @@ char *xcoff_lastfile; #define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \ fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)) + +static void assign_type_number PROTO((tree, char *, int)); +static void xcoffout_block PROTO((tree, int, tree)); /* Support routines for XCOFF debugging info. */ -- 2.43.5