1999-09-07 01:49:18 -04:00
|
|
|
/* Get common system includes and various definitions and declarations based
|
|
|
|
on autoconf macros.
|
2002-01-08 13:16:25 -05:00
|
|
|
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
1998-02-12 19:22:24 -05:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 10:35:51 -04:00
|
|
|
This file is part of GCC.
|
1999-01-06 15:51:20 -05:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 10:35:51 -04:00
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free
|
|
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
|
|
version.
|
1999-01-06 15:51:20 -05:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 10:35:51 -04:00
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
for more details.
|
1999-01-06 15:51:20 -05:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 10:35:51 -04:00
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA. */
|
1998-02-12 19:22:24 -05:00
|
|
|
|
1999-09-07 01:49:18 -04:00
|
|
|
|
2001-05-25 21:31:47 -04:00
|
|
|
#ifndef GCC_SYSTEM_H
|
|
|
|
#define GCC_SYSTEM_H
|
1998-02-12 19:22:24 -05:00
|
|
|
|
2000-02-18 07:26:50 -05:00
|
|
|
/* This is the location of the online document giving information how
|
|
|
|
to report bugs. If you change this string, also check for strings
|
|
|
|
not under control of the preprocessor. */
|
|
|
|
#define GCCBUGURL "<URL:http://www.gnu.org/software/gcc/bugs.html>"
|
|
|
|
|
2001-10-09 10:03:13 -04:00
|
|
|
/* We must include stdarg.h/varargs.h before stdio.h. */
|
gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish it from the macro...
* gansidecl.h: Prepend a "G" to the macro wrapping this file
(to distinguish it from the macro wrapping ansidecl.h.)
Include libiberty's ansidecl.h. Remove all redundant definitions.
Define the PROTO() style macros in terms of the PARAMS() ones.
* calls.c (emit_library_call): Switch on ANSI_PROTOTYPES, not
__STDC__, when deciding whether to use ANSI variable args.
(emit_library_call_value): Likewise.
* cccp.c (error): Likewise.
(warning): Likewise.
(error_with_line): Likewise.
(warning_with_line): Likewise.
(pedwarn): Likewise.
(pedwarn_with_line): Likewise.
(pedwarn_with_file_and_line): Likewise.
(fatal): Likewise.
* cexp.y (error): Likewise.
(pedwarn): Likewise.
(warning): Likewise.
* collect2.c (fatal_perror): Likewise.
(fatal): Likewise.
(error): Likewise.
* combine.c (gen_rtx_combine): Likewise.
* cpperror.c (cpp_message): Likewise.
(cpp_fatal): Likewise.
* cpplib.c (cpp_error): Likewise.
(cpp_warning): Likewise.
(cpp_pedwarn): Likewise.
(cpp_error_with_line): Likewise.
(cpp_warning_with_line): Likewise.
(cpp_pedwarn_with_line): Likewise.
(cpp_pedwarn_with_file_and_line): Likewise.
* cpplib.h: Don't define PARAMS() macro.
* demangle.h: Likewise.
* doprint.c (checkit): Switch on ANSI_PROTOTYPES, not __STDC__,
when deciding whether to use ANSI variable args.
* emit-rtl.c (gen_rtx): Likewise.
(gen_rtvec): Likewise.
* final.c (asm_fprintf): Likewise.
* fix-header.c (cpp_message): Likewise.
(fatal): Likewise.
(cpp_fatal): Likewise.
* gcc.c (concat): Likewise.
(fatal): Likewise.
(error): Likewise.
* genattr.c (fatal): Likewise.
* genattrtab.c (attr_rtx): Likewise.
(attr_printf): Likewise.
(fatal): Likewise.
* gencodes.c (fatal): Likewise.
* genconfig.c (fatal): Likewise.
* genemit.c (fatal): Likewise.
* genextract.c (fatal): Likewise.
* genflags.c (fatal): Likewise.
* genopinit.c (fatal): Likewise.
* genoutput.c (fatal): Likewise.
(error): Likewise.
* genpeep.c (fatal): Likewise.
* genrecog.c (fatal): Likewise.
* halfpic.h: Switch on ANSI_PROTOTYPES, not __STDC__, when
deciding whether to declare `tree_node' and `rtx_def'.
* hash.h: Don't define stuff we get from gansidecl.h.
* mips-tfile.c: Likewise. Define __proto() in terms of PARAMS().
(fatal): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding
whether to use ANSI variable args.
(error): Likewise.
* prefix.c (concat): Likewise.
* scan.h: Likewise.
* system.h: Likewise.
* toplev.c (error_with_file_and_line): Likewise.
(error_with_decl): Likewise.
(error_for_asm): Likewise.
(error): Likewise.
(fatal): Likewise.
(warning_with_file_and_line): Likewise.
(warning_with_decl): Likewise.
(warning_for_asm): Likewise.
(warning): Likewise.
(pedwarn): Likewise.
(pedwarn_with_decl): Likewise.
(pedwarn_with_file_and_line): Likewise.
(sorry): Likewise.
(really_sorry): Likewise.
* toplev.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding
whether to declare `tree_node' and `rtx_def'.
* tree.c (build): Switch on ANSI_PROTOTYPES, not __STDC__, when
deciding whether to use ANSI variable args.
(build_nt): Likewise.
(build_parse_node): Likewise.
From-SVN: r23577
1998-11-08 10:10:24 -05:00
|
|
|
#ifdef ANSI_PROTOTYPES
|
1998-08-26 04:11:47 -04:00
|
|
|
#include <stdarg.h>
|
|
|
|
#else
|
|
|
|
#include <varargs.h>
|
|
|
|
#endif
|
|
|
|
|
2000-04-22 14:41:05 -04:00
|
|
|
#ifndef va_copy
|
|
|
|
# ifdef __va_copy
|
|
|
|
# define va_copy(d,s) __va_copy((d),(s))
|
|
|
|
# else
|
|
|
|
# define va_copy(d,s) ((d) = (s))
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
xm-lynx.h, [...]: Do not define TRUE or FALSE.
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h,
config/a29k/xm-unix.h, config/alpha/xm-alpha.h,
config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h,
config/clipper/xm-clix.h, config/convex/xm-convex.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
config/h8300/xm-h8300.h, config/i370/xm-i370.h,
config/i370/xm-linux.h, config/i370/xm-mvs.h,
config/i370/xm-oe.h, config/i386/xm-aix.h,
config/i386/xm-i386.h, config/i386/xm-osf.h,
config/i860/xm-i860.h, config/i960/xm-i960.h,
config/ia64/xm-ia64.h, config/m32r/xm-m32r.h,
config/m68k/xm-m68k.h, config/m88k/xm-m88k.h,
config/mcore/xm-mcore.h, config/mips/xm-mips.h,
config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h,
config/ns32k/xm-ns32k.h, config/pa/xm-linux.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/pj/xm-pj.h, config/romp/xm-romp.h,
config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
config/v850/xm-v850.h, config/vax/xm-vax.h,
config/vax/xm-vms.h, config/we32k/xm-we32k.h:
Do not define TRUE or FALSE.
* config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made
empty by above change.
* config.gcc: Remove references to these files.
* configure.in: Detect stdbool.h.
* configure, config.in: Regenerate.
* system.h: Include stddef.h here if available. Set
HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. Then
set up a sensible boolean type at the very end.
* combine.c, cse.c, expr.c, fold-const.c, gensupport.c,
f/com.c, config/mcore/mcore.c:
Rename variables named 'true' and/or 'false'.
* hash.h: Delete 'boolean' typedef and related #undefs.
* f/proj.h: Delete 'bool' type. Don't include stddef.h here.
* function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c,
java/class.c, java/decl.c, java/java-tree.h:
Replace all uses of 'boolean' with 'bool'.
From-SVN: r40176
2001-03-01 20:51:02 -05:00
|
|
|
#ifdef HAVE_STDDEF_H
|
|
|
|
# include <stddef.h>
|
|
|
|
#endif
|
|
|
|
|
1998-02-12 19:22:24 -05:00
|
|
|
#include <stdio.h>
|
1998-06-30 02:11:43 -04:00
|
|
|
|
|
|
|
/* Define a generic NULL if one hasn't already been defined. */
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
|
|
|
|
1998-12-07 18:40:19 -05:00
|
|
|
/* The compiler is not a multi-threaded application and therefore we
|
2001-09-28 03:00:27 -04:00
|
|
|
do not have to use the locking functions. In fact, using the locking
|
|
|
|
functions can cause the compiler to be significantly slower under
|
|
|
|
I/O bound conditions (such as -g -O0 on very large source files).
|
1999-03-18 19:47:41 -05:00
|
|
|
|
2001-09-28 03:00:27 -04:00
|
|
|
HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the stdio
|
2000-05-23 13:42:19 -04:00
|
|
|
code is multi-thread safe by default. If it is set to 0, then do
|
|
|
|
not worry about using the _unlocked functions.
|
1999-03-18 19:47:41 -05:00
|
|
|
|
2001-09-28 03:00:27 -04:00
|
|
|
fputs_unlocked, fwrite_unlocked, and fprintf_unlocked are
|
|
|
|
extensions and need to be prototyped by hand (since we do not
|
|
|
|
define _GNU_SOURCE). */
|
1999-03-18 19:47:41 -05:00
|
|
|
|
2001-09-28 03:00:27 -04:00
|
|
|
#if defined HAVE_DECL_PUTC_UNLOCKED && HAVE_DECL_PUTC_UNLOCKED
|
|
|
|
|
|
|
|
# ifdef HAVE_PUTC_UNLOCKED
|
|
|
|
# undef putc
|
|
|
|
# define putc(C, Stream) putc_unlocked (C, Stream)
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_FPUTC_UNLOCKED
|
|
|
|
# undef fputc
|
|
|
|
# define fputc(C, Stream) fputc_unlocked (C, Stream)
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef HAVE_FPUTS_UNLOCKED
|
|
|
|
# undef fputs
|
|
|
|
# define fputs(String, Stream) fputs_unlocked (String, Stream)
|
|
|
|
# if defined (HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
|
2000-01-17 10:47:29 -05:00
|
|
|
extern int fputs_unlocked PARAMS ((const char *, FILE *));
|
2001-09-28 03:00:27 -04:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifdef HAVE_FWRITE_UNLOCKED
|
|
|
|
# undef fwrite
|
|
|
|
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
|
|
|
|
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
|
|
|
|
extern int fwrite_unlocked PARAMS ((const PTR, size_t, size_t, FILE *));
|
|
|
|
# endif
|
1999-03-18 19:47:41 -05:00
|
|
|
# endif
|
2001-09-28 03:00:27 -04:00
|
|
|
# ifdef HAVE_FPRINTF_UNLOCKED
|
|
|
|
# undef fprintf
|
|
|
|
/* We can't use a function-like macro here because we don't know if
|
|
|
|
we have varargs macros. */
|
|
|
|
# define fprintf fprintf_unlocked
|
|
|
|
# if defined (HAVE_DECL_FPRINTF_UNLOCKED) && !HAVE_DECL_FPRINTF_UNLOCKED
|
|
|
|
extern int fprintf_unlocked PARAMS ((FILE *, const char *, ...));
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
1998-12-07 18:40:19 -05:00
|
|
|
#endif
|
|
|
|
|
safe-ctype.h: New file.
include:
* safe-ctype.h: New file.
libiberty:
* safe-ctype.c: New file.
* Makefile.in (CFILES): Add safe-ctype.c.
(REQUIRED_OFILES): Add safe-ctype.o.
* argv.c: Define ISBLANK and use it, not isspace.
* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use
uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c)
before calling TOLOWER(c)/TOUPPER(c).
gcc:
* Makefile.in (HOST_RTL): Add safe-ctype.o.
(safe-ctype.o): New rule.
* system.h: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros.
* cpphash.h: Zap IStable and related macros. Define is_* in
terms of safe-ctype.h macros.
* cppinit.c: Delete the IStable and all related code.
* tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and
is_space arrays. Delete initialize_char_syntax. Change all
references to the above arrays to use macros instead.
* tradcpp.h: Define is_idchar, is_idstart, is_space, and
is_nvspace in terms of safe_ctype.h's macros.
* tradcif.y: is_idchar, is_idstart are macros not arrays.
* config/i370/i370.c, config/winnt/dirent.c,
config/winnt/fixinc-nt.c, config/winnt/ld.c:
Use uppercase ctype macros. If we included ctype.h,
include safe-ctype.h instead.
* fixinc/fixfixes.c: Use uppercase ctype macros. Don't test
ISLOWER(c) before calling TOUPPER(c).
* fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk.
* fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x).
gcc/ch:
* lex.c: Don't bother checking whether ISUPPER(c) before
calling TOLOWER(c). Don't bother checking whether isascii(c)
before testing ISSPACE(c); ISSPACE(c) includes '\n'.
gcc/f:
* Make-lang.in: Link f/fini with safe-ctype.o.
* bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c).
* com.c: Use TOUPPER, not ffesrc_toupper.
* fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c).
* intrin.c: Don't test IN_CTYPE_DOMAIN(c).
* src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their
initializing code; use TOUPPER and TOLOWER instead of
ffesrc_toupper and ffesrc_tolower.
* src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_.
Don't define ffesrc_toupper or ffesrc_tolower.
gcc/java:
* jvgenmain.c: Use ISPRINT not isascii.
From-SVN: r38124
2000-12-07 22:00:26 -05:00
|
|
|
/* There are an extraordinary number of issues with <ctype.h>.
|
|
|
|
The last straw is that it varies with the locale. Use libiberty's
|
|
|
|
replacement instead. */
|
|
|
|
#include <safe-ctype.h>
|
1998-02-12 19:22:24 -05:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
1999-09-07 01:49:18 -04:00
|
|
|
|
1998-02-12 19:22:24 -05:00
|
|
|
#include <errno.h>
|
|
|
|
|
2001-04-12 11:36:24 -04:00
|
|
|
#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
1998-02-12 19:22:24 -05:00
|
|
|
extern int errno;
|
|
|
|
#endif
|
|
|
|
|
1998-09-03 02:52:00 -04:00
|
|
|
#ifdef STRING_WITH_STRINGS
|
1998-02-12 19:22:24 -05:00
|
|
|
# include <string.h>
|
1998-09-03 02:52:00 -04:00
|
|
|
# include <strings.h>
|
1998-02-12 19:22:24 -05:00
|
|
|
#else
|
1998-09-03 02:52:00 -04:00
|
|
|
# ifdef HAVE_STRING_H
|
|
|
|
# include <string.h>
|
|
|
|
# else
|
|
|
|
# ifdef HAVE_STRINGS_H
|
|
|
|
# include <strings.h>
|
|
|
|
# endif
|
1998-02-12 19:22:24 -05:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
#endif
|
|
|
|
|
configure.in: Kill tm.h.
* configure.in: Kill tm.h. Include the files in the $tm_file
list in all three of config.h, hconfig.h, tconfig.h, after the
relevant set of xm_files. Put TARGET_CPU_DEFAULT in all
three, include insn-codes.h in all three (#ifndef GENERATOR_FILE).
* configure: Regenerate.
* Makefile.in (clean): Don't delete tm.h.
* system.h: If SUCCESS_EXIT_CODE and FATAL_EXIT_CODE are not
defined, set them from EXIT_SUCCESS and EXIT_FAILURE. If
those are not defined, set SEC and FEC to 0 and 1.
* gcc.texi: Update to match.
* crtstuff.c: Include tconfig.h, not auto-host.h and tm.h.
* config/fp-bit.c, config/m68k/aux-crt2.asm,
config/m68k/aux-crtn.asm, config/m68k/aux-mcount.c:
Include tconfig.h, not tm.h.
* config/xm-lynx.h, config/xm-std32.h,
config/a29k/xm-a29k.h, config/a29k/xm-unix.h,
config/alpha/xm-alpha.h, config/arc/xm-arc.h,
config/avr/xm-avr.h, config/c4x/xm-c4x.h,
config/clipper/xm-clix.h, config/convex/xm-convex.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
config/h8300/xm-h8300.h, config/i370/xm-linux.h,
config/i386/xm-i386.h, config/i860/xm-i860.h,
config/i960/xm-i960.h, config/ia64/xm-ia64.h,
config/m32r/xm-m32r.h, config/m68hc11/xm-m68hc11.h,
config/m88k/xm-m88k.h, config/mcore/xm-mcore.h,
config/mips/xm-mips.h, config/mn10200/xm-mn10200.h,
config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h,
config/pa/xm-linux.h, config/pa/xm-pa.h,
config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h,
config/pa/xm-papro.h, config/pdp11/xm-pdp11.h,
config/pj/xm-pj.h, config/romp/xm-romp.h,
config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
config/v850/xm-v850.h, config/vax/xm-vax.h,
config/we32k/xm-we32k.h:
Don't include tm.h.
Don't define SUCCESS_EXIT_CODE or FATAL_EXIT_CODE.
* config/i370/xm-i370.h, config/i370/xm-mvs.h,
config/i370/xm-oe.h: Don't include tm.h. Don't define
SUCCESS_EXIT_CODE.
* config/vax/xm-vms.h: Don't include tm.h.
* config/xm-lynx.h, config/avr/xm-avr.h,
config/fr30/xm-fr30.h, config/pdp11/xm-pdp11.h,
Delete; made empty by above changes.
* config/i386/xm-lynx.h, config/m68k/xm-lynx.h,
config/rs6000/xm-lynx.h, config/sparc/xm-lynx.h:
Don't include config/xm-lynx.h or tm.h.
* config/xm-gnu.h: Don't include fcntl.h.
* config/sparc/xm-lynx.h: Don't include sys/types.h and
sys/wait.h.
* config/clipper/xm-clix.h, config/vax/xm-vax.h: Don't define isinf.
From-SVN: r40199
2001-03-02 22:32:55 -05:00
|
|
|
/* If we don't have an overriding definition, set SUCCESS_EXIT_CODE and
|
|
|
|
FATAL_EXIT_CODE to EXIT_SUCCESS and EXIT_FAILURE respectively,
|
|
|
|
or 0 and 1 if those macros are not defined. */
|
|
|
|
#ifndef SUCCESS_EXIT_CODE
|
|
|
|
# ifdef EXIT_SUCCESS
|
|
|
|
# define SUCCESS_EXIT_CODE EXIT_SUCCESS
|
|
|
|
# else
|
|
|
|
# define SUCCESS_EXIT_CODE 0
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FATAL_EXIT_CODE
|
|
|
|
# ifdef EXIT_FAILURE
|
|
|
|
# define FATAL_EXIT_CODE EXIT_FAILURE
|
|
|
|
# else
|
|
|
|
# define FATAL_EXIT_CODE 1
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
1998-02-12 19:22:24 -05:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
|
|
# include <sys/param.h>
|
2001-12-28 13:17:54 -05:00
|
|
|
/* We use this identifier later and it appears in some vendor param.h's. */
|
2001-12-21 15:54:21 -05:00
|
|
|
# undef PREFETCH
|
1998-02-12 19:22:24 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_LIMITS_H
|
|
|
|
# include <limits.h>
|
|
|
|
#endif
|
|
|
|
|
aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, [...]): New.
* aclocal.m4 (gcc_AC_COMPILE_CHECK_SIZEOF, gcc_AC_C_CHAR_BIT,
gcc_AC_C_LONG_LONG): New.
* configure.in: Use them. Probe the size of short, int, long,
and long long/__int64 if we have them. Move all the AC_C_*
checks together, except gcc_AC_C_CHAR_BIT which has to go
after AC_CHECK_HEADERS(limits.h).
Take hwint.h out of host_xm_file and build_xm_file.
* hwint.h: Unconditionally define HOST_BITS_PER_CHAR,
HOST_BITS_PER_SHORT, HOST_BITS_PER_INT, HOST_BITS_PER_LONG,
and HOST_BITS_PER_LONGLONG in terms of SIZEOF_* and CHAR_BIT.
Move the HOST_WIDEST_INT setup logic here from system.h.
Provide HOST_WIDEST_INT even if HOST_BITS_PER_LONGLONG is not
defined.
* system.h: Include hwint.h after limits.h. HOST_WIDEST_INT
is now handled by hwint.h.
* config/alpha/xm-alpha-interix.h, config/alpha/xm-vms.h,
config/c4x/xm-c4x.h, config/i370/xm-oe.h,
config/ia64/xm-ia64.h: Don't define any of:
HOST_BITS_PER_LONG, HOST_BITS_PER_CHAR, HOST_BITS_PER_SHORT,
HOST_BITS_PER_LONGLONG.
* config/alpha/xm-alpha.h, config/dsp16xx/xm-dsp16xx.h,
config/h8300/xm-h8300.h, config/mips/iris6.h,
config/mn10200/xm-mn10200.h, config/pa/xm-pa64hpux.h,
config/sparc/xm-sp64.h: Delete.
* config.gcc: Remove references to deleted files.
* config/arm/xm-arm.h, config/mips/xm-mips.h: Don't define
HOST_FLOAT_FORMAT to IEEE_FLOAT_FORMAT.
* config/i370/xm-linux.h: Clarify floating-point situation in
a comment.
From-SVN: r40446
2001-03-13 19:58:32 -05:00
|
|
|
/* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
|
|
|
|
#include "hwint.h"
|
1999-02-12 01:32:36 -05:00
|
|
|
|
2001-10-21 15:44:08 -04:00
|
|
|
/* A macro to determine whether a VALUE lies inclusively within a
|
|
|
|
certain range without evaluating the VALUE more than once. This
|
|
|
|
macro won't warn if the VALUE is unsigned and the LOWER bound is
|
|
|
|
zero, as it would e.g. with "VALUE >= 0 && ...". Note the LOWER
|
|
|
|
bound *is* evaluated twice, and LOWER must not be greater than
|
|
|
|
UPPER. However the bounds themselves can be either positive or
|
|
|
|
negative. */
|
|
|
|
#define IN_RANGE(VALUE, LOWER, UPPER) \
|
|
|
|
((unsigned HOST_WIDE_INT)((VALUE) - (LOWER)) <= ((UPPER) - (LOWER)))
|
|
|
|
|
2000-05-27 18:05:01 -04:00
|
|
|
/* Infrastructure for defining missing _MAX and _MIN macros. Note that
|
|
|
|
macros defined with these cannot be used in #if. */
|
|
|
|
|
|
|
|
/* The extra casts work around common compiler bugs. */
|
|
|
|
#define INTTYPE_SIGNED(t) (! ((t) 0 < (t) -1))
|
|
|
|
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
|
|
|
|
It is necessary at least when t == time_t. */
|
|
|
|
#define INTTYPE_MINIMUM(t) ((t) (INTTYPE_SIGNED (t) \
|
|
|
|
? ~ (t) 0 << (sizeof(t) * CHAR_BIT - 1) : (t) 0))
|
|
|
|
#define INTTYPE_MAXIMUM(t) ((t) (~ (t) 0 - INTTYPE_MINIMUM (t)))
|
|
|
|
|
|
|
|
/* Use that infrastructure to provide a few constants. */
|
|
|
|
#ifndef UCHAR_MAX
|
|
|
|
# define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char)
|
|
|
|
#endif
|
|
|
|
|
1998-02-12 19:22:24 -05:00
|
|
|
#ifdef TIME_WITH_SYS_TIME
|
|
|
|
# include <sys/time.h>
|
|
|
|
# include <time.h>
|
|
|
|
#else
|
|
|
|
# if HAVE_SYS_TIME_H
|
1998-05-06 03:58:27 -04:00
|
|
|
# include <sys/time.h>
|
1998-02-12 19:22:24 -05:00
|
|
|
# else
|
1998-05-06 03:58:27 -04:00
|
|
|
# ifdef HAVE_TIME_H
|
|
|
|
# include <time.h>
|
|
|
|
# endif
|
|
|
|
# endif
|
1998-02-12 19:22:24 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_FCNTL_H
|
|
|
|
# include <fcntl.h>
|
|
|
|
#else
|
1998-05-06 03:58:27 -04:00
|
|
|
# ifdef HAVE_SYS_FILE_H
|
|
|
|
# include <sys/file.h>
|
|
|
|
# endif
|
1998-02-12 19:22:24 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SEEK_SET
|
|
|
|
# define SEEK_SET 0
|
|
|
|
# define SEEK_CUR 1
|
|
|
|
# define SEEK_END 2
|
|
|
|
#endif
|
|
|
|
#ifndef F_OK
|
|
|
|
# define F_OK 0
|
|
|
|
# define X_OK 1
|
|
|
|
# define W_OK 2
|
|
|
|
# define R_OK 4
|
|
|
|
#endif
|
1998-05-06 03:58:27 -04:00
|
|
|
#ifndef O_RDONLY
|
|
|
|
# define O_RDONLY 0
|
|
|
|
#endif
|
|
|
|
#ifndef O_WRONLY
|
|
|
|
# define O_WRONLY 1
|
|
|
|
#endif
|
1998-02-12 19:22:24 -05:00
|
|
|
|
1998-12-16 04:34:57 -05:00
|
|
|
/* Some systems define these in, e.g., param.h. We undefine these names
|
|
|
|
here to avoid the warnings. We prefer to use our definitions since we
|
|
|
|
know they are correct. */
|
|
|
|
|
|
|
|
#undef MIN
|
|
|
|
#undef MAX
|
|
|
|
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
|
|
|
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
|
|
|
|
|
2000-01-02 14:38:36 -05:00
|
|
|
/* Returns the least number N such that N * Y >= X. */
|
|
|
|
#define CEIL(x,y) (((x) + (y) - 1) / (y))
|
|
|
|
|
1998-11-19 05:13:46 -05:00
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WIFSIGNALED
|
|
|
|
#define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f)
|
|
|
|
#endif
|
|
|
|
#ifndef WTERMSIG
|
|
|
|
#define WTERMSIG(S) ((S) & 0x7f)
|
|
|
|
#endif
|
|
|
|
#ifndef WIFEXITED
|
|
|
|
#define WIFEXITED(S) (((S) & 0xff) == 0)
|
|
|
|
#endif
|
|
|
|
#ifndef WEXITSTATUS
|
|
|
|
#define WEXITSTATUS(S) (((S) & 0xff00) >> 8)
|
|
|
|
#endif
|
1999-06-21 01:21:34 -04:00
|
|
|
#ifndef WSTOPSIG
|
|
|
|
#define WSTOPSIG WEXITSTATUS
|
|
|
|
#endif
|
1998-11-19 05:13:46 -05:00
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
/* The HAVE_DECL_* macros are three-state, undefined, 0 or 1. If they
|
|
|
|
are defined to 0 then we must provide the relevant declaration
|
|
|
|
here. These checks will be in the undefined state while configure
|
|
|
|
is running so be careful to test "defined (HAVE_DECL_*)". */
|
1998-02-12 19:22:24 -05:00
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern double atof PARAMS ((const char *));
|
1998-05-06 04:36:04 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_ATOL) && !HAVE_DECL_ATOL
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern long atol PARAMS ((const char *));
|
1998-05-06 04:36:04 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_FREE) && !HAVE_DECL_FREE
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern void free PARAMS ((PTR));
|
1998-02-12 19:22:24 -05:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_GETCWD) && !HAVE_DECL_GETCWD
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern char *getcwd PARAMS ((char *, size_t));
|
1998-06-28 02:09:57 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_GETENV) && !HAVE_DECL_GETENV
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern char *getenv PARAMS ((const char *));
|
1998-02-15 15:36:23 -05:00
|
|
|
#endif
|
|
|
|
|
2000-10-20 15:17:41 -04:00
|
|
|
#if defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT
|
2000-12-22 07:27:36 -05:00
|
|
|
extern int getopt PARAMS ((int, char * const *, const char *));
|
2000-10-20 15:17:41 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_GETWD) && !HAVE_DECL_GETWD
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern char *getwd PARAMS ((char *));
|
1998-06-28 02:09:57 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_SBRK) && !HAVE_DECL_SBRK
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern PTR sbrk PARAMS ((int));
|
1998-05-06 04:36:04 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_STRSTR) && !HAVE_DECL_STRSTR
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern char *strstr PARAMS ((const char *, const char *));
|
1999-06-24 17:48:29 -04:00
|
|
|
#endif
|
|
|
|
|
1999-09-07 01:49:18 -04:00
|
|
|
#ifdef HAVE_MALLOC_H
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern PTR malloc PARAMS ((size_t));
|
1999-09-07 01:49:18 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_CALLOC) && !HAVE_DECL_CALLOC
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern PTR calloc PARAMS ((size_t, size_t));
|
1999-09-07 01:49:18 -04:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_REALLOC) && !HAVE_DECL_REALLOC
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern PTR realloc PARAMS ((PTR, size_t));
|
1999-09-07 01:49:18 -04:00
|
|
|
#endif
|
|
|
|
|
1999-12-27 10:39:39 -05:00
|
|
|
/* If the system doesn't provide strsignal, we get it defined in
|
2001-10-09 10:03:13 -04:00
|
|
|
libiberty but no declaration is supplied. */
|
2000-09-25 18:54:04 -04:00
|
|
|
#ifndef HAVE_STRSIGNAL
|
1999-12-27 10:39:39 -05:00
|
|
|
# ifndef strsignal
|
|
|
|
extern const char *strsignal PARAMS ((int));
|
1998-09-13 02:17:31 -04:00
|
|
|
# endif
|
1999-12-27 10:39:39 -05:00
|
|
|
#endif
|
1998-09-13 02:17:31 -04:00
|
|
|
|
1998-06-30 07:10:55 -04:00
|
|
|
#ifdef HAVE_GETRLIMIT
|
2000-05-23 13:42:19 -04:00
|
|
|
# if defined (HAVE_DECL_GETRLIMIT) && !HAVE_DECL_GETRLIMIT
|
1998-06-30 07:10:55 -04:00
|
|
|
# ifndef getrlimit
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
# ifdef ANSI_PROTOTYPES
|
|
|
|
struct rlimit;
|
|
|
|
# endif
|
|
|
|
extern int getrlimit PARAMS ((int, struct rlimit *));
|
1998-06-30 07:10:55 -04:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SETRLIMIT
|
2000-05-23 13:42:19 -04:00
|
|
|
# if defined (HAVE_DECL_SETRLIMIT) && !HAVE_DECL_SETRLIMIT
|
1998-06-30 07:10:55 -04:00
|
|
|
# ifndef setrlimit
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
# ifdef ANSI_PROTOTYPES
|
|
|
|
struct rlimit;
|
|
|
|
# endif
|
|
|
|
extern int setrlimit PARAMS ((int, const struct rlimit *));
|
1998-06-30 07:10:55 -04:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
1998-05-09 21:27:49 -04:00
|
|
|
/* HAVE_VOLATILE only refers to the stage1 compiler. We also check
|
2001-10-09 10:03:13 -04:00
|
|
|
__STDC__ and assume gcc sets it and has volatile in stage >=2. */
|
1998-05-09 21:27:49 -04:00
|
|
|
#if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile)
|
|
|
|
#define volatile
|
|
|
|
#endif
|
|
|
|
|
2000-05-23 13:42:19 -04:00
|
|
|
#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
|
system.h (bcopy, [...]): Add prototype arguments.
* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
strerror, getrlimit, setrlimit, abort): Add prototype arguments.
From-SVN: r31139
1999-12-30 08:48:51 -05:00
|
|
|
extern void abort PARAMS ((void));
|
system.h: Always prototype abort.
1999-04-16 22:44 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* system.h: Always prototype abort. Prototype fatal. Define
abort to call fatal, not fprintf/exit. Define a stub macro
for trim_filename.
* toplev.c: Define DIR_SEPARATOR. (trim_filename): New
function.
* toplev.h: Prototype trim_filename, and #undef system.h's stub.
* gcc.c, genattr.c, genattrtab.c, gencodes.c, genconfig.c,
genemit.c, genextract.c, genflags.c, genopinit.c, genoutput.c,
genpeep.c, genrecog.c: Make fatal non-static.
* gcov.c, gengenrtl.c, protoize.c: #undef abort after
including system.h.
* config/i386/dgux.h, config/m68k/xm-amix.h: Remove stale code
relating to abort.
From-SVN: r26511
1999-04-16 15:52:44 -04:00
|
|
|
#endif
|
1998-05-12 03:36:02 -04:00
|
|
|
|
2000-08-18 13:35:58 -04:00
|
|
|
/* 1 if we have C99 designated initializers. */
|
2000-11-20 22:02:09 -05:00
|
|
|
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
|
2000-08-18 13:35:58 -04:00
|
|
|
#define HAVE_DESIGNATED_INITIALIZERS \
|
|
|
|
((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
|
2000-11-20 22:02:09 -05:00
|
|
|
#endif
|
2000-08-18 13:35:58 -04:00
|
|
|
|
xm-lynx.h, [...]: Do not define TRUE or FALSE.
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h,
config/a29k/xm-unix.h, config/alpha/xm-alpha.h,
config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h,
config/clipper/xm-clix.h, config/convex/xm-convex.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
config/h8300/xm-h8300.h, config/i370/xm-i370.h,
config/i370/xm-linux.h, config/i370/xm-mvs.h,
config/i370/xm-oe.h, config/i386/xm-aix.h,
config/i386/xm-i386.h, config/i386/xm-osf.h,
config/i860/xm-i860.h, config/i960/xm-i960.h,
config/ia64/xm-ia64.h, config/m32r/xm-m32r.h,
config/m68k/xm-m68k.h, config/m88k/xm-m88k.h,
config/mcore/xm-mcore.h, config/mips/xm-mips.h,
config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h,
config/ns32k/xm-ns32k.h, config/pa/xm-linux.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/pj/xm-pj.h, config/romp/xm-romp.h,
config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
config/v850/xm-v850.h, config/vax/xm-vax.h,
config/vax/xm-vms.h, config/we32k/xm-we32k.h:
Do not define TRUE or FALSE.
* config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made
empty by above change.
* config.gcc: Remove references to these files.
* configure.in: Detect stdbool.h.
* configure, config.in: Regenerate.
* system.h: Include stddef.h here if available. Set
HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. Then
set up a sensible boolean type at the very end.
* combine.c, cse.c, expr.c, fold-const.c, gensupport.c,
f/com.c, config/mcore/mcore.c:
Rename variables named 'true' and/or 'false'.
* hash.h: Delete 'boolean' typedef and related #undefs.
* f/proj.h: Delete 'bool' type. Don't include stddef.h here.
* function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c,
java/class.c, java/decl.c, java/java-tree.h:
Replace all uses of 'boolean' with 'bool'.
From-SVN: r40176
2001-03-01 20:51:02 -05:00
|
|
|
/* 1 if we have _Bool. */
|
|
|
|
#ifndef HAVE__BOOL
|
|
|
|
# define HAVE__BOOL \
|
|
|
|
((GCC_VERSION >= 3000) || (__STDC_VERSION__ >= 199901L))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1998-11-23 11:39:37 -05:00
|
|
|
#if HAVE_SYS_STAT_H
|
|
|
|
# include <sys/stat.h>
|
|
|
|
#endif
|
1998-11-23 04:20:35 -05:00
|
|
|
|
|
|
|
/* Test if something is a normal file. */
|
|
|
|
#ifndef S_ISREG
|
|
|
|
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Test if something is a directory. */
|
|
|
|
#ifndef S_ISDIR
|
|
|
|
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
|
|
|
#endif
|
|
|
|
|
1999-02-09 08:48:34 -05:00
|
|
|
/* Test if something is a character special file. */
|
|
|
|
#ifndef S_ISCHR
|
|
|
|
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
|
|
|
#endif
|
|
|
|
|
2000-05-05 12:27:45 -04:00
|
|
|
/* Test if something is a block special file. */
|
|
|
|
#ifndef S_ISBLK
|
|
|
|
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
|
|
|
#endif
|
|
|
|
|
1999-02-09 08:48:34 -05:00
|
|
|
/* Test if something is a socket. */
|
|
|
|
#ifndef S_ISSOCK
|
|
|
|
# ifdef S_IFSOCK
|
|
|
|
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
|
|
|
# else
|
|
|
|
# define S_ISSOCK(m) 0
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Test if something is a FIFO. */
|
|
|
|
#ifndef S_ISFIFO
|
|
|
|
# ifdef S_IFIFO
|
|
|
|
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
|
|
|
# else
|
|
|
|
# define S_ISFIFO(m) 0
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Approximate O_NONBLOCK. */
|
|
|
|
#ifndef O_NONBLOCK
|
|
|
|
#define O_NONBLOCK O_NDELAY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Approximate O_NOCTTY. */
|
|
|
|
#ifndef O_NOCTTY
|
|
|
|
#define O_NOCTTY 0
|
|
|
|
#endif
|
|
|
|
|
1999-03-24 18:35:34 -05:00
|
|
|
/* Define well known filenos if the system does not define them. */
|
|
|
|
#ifndef STDIN_FILENO
|
|
|
|
# define STDIN_FILENO 0
|
|
|
|
#endif
|
|
|
|
#ifndef STDOUT_FILENO
|
|
|
|
# define STDOUT_FILENO 1
|
|
|
|
#endif
|
1999-03-30 19:40:29 -05:00
|
|
|
#ifndef STDERR_FILENO
|
1999-03-24 18:35:34 -05:00
|
|
|
# define STDERR_FILENO 2
|
|
|
|
#endif
|
|
|
|
|
2001-10-09 10:03:13 -04:00
|
|
|
/* Some systems have mkdir that takes a single argument. */
|
1999-04-14 21:50:52 -04:00
|
|
|
#ifdef MKDIR_TAKES_ONE_ARG
|
|
|
|
# define mkdir(a,b) mkdir(a)
|
|
|
|
#endif
|
|
|
|
|
1999-09-21 18:31:29 -04:00
|
|
|
/* Provide a way to print an address via printf. */
|
|
|
|
#ifndef HOST_PTR_PRINTF
|
|
|
|
# ifdef HAVE_PRINTF_PTR
|
|
|
|
# define HOST_PTR_PRINTF "%p"
|
|
|
|
# else
|
|
|
|
# define HOST_PTR_PRINTF \
|
|
|
|
(sizeof (int) == sizeof (char *) ? "%x" \
|
|
|
|
: sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
|
|
|
|
# endif
|
|
|
|
#endif /* ! HOST_PTR_PRINTF */
|
|
|
|
|
2000-01-06 19:16:51 -05:00
|
|
|
/* By default, colon separates directories in a path. */
|
|
|
|
#ifndef PATH_SEPARATOR
|
|
|
|
#define PATH_SEPARATOR ':'
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DIR_SEPARATOR
|
|
|
|
#define DIR_SEPARATOR '/'
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Define IS_DIR_SEPARATOR. */
|
|
|
|
#ifndef DIR_SEPARATOR_2
|
2000-11-28 09:58:08 -05:00
|
|
|
# define IS_DIR_SEPARATOR(CH) ((CH) == DIR_SEPARATOR)
|
2000-01-06 19:16:51 -05:00
|
|
|
#else /* DIR_SEPARATOR_2 */
|
2000-11-28 09:58:08 -05:00
|
|
|
# define IS_DIR_SEPARATOR(CH) \
|
|
|
|
(((CH) == DIR_SEPARATOR) || ((CH) == DIR_SEPARATOR_2))
|
2000-01-06 19:16:51 -05:00
|
|
|
#endif /* DIR_SEPARATOR_2 */
|
|
|
|
|
2000-11-28 09:58:08 -05:00
|
|
|
/* Say how to test for an absolute pathname. On Unix systems, this is if
|
|
|
|
it starts with a leading slash or a '$', the latter meaning the value of
|
|
|
|
an environment variable is to be used. On machien with DOS-based
|
|
|
|
file systems, it is also absolute if it starts with a drive identifier. */
|
|
|
|
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
|
|
|
#define IS_ABSOLUTE_PATHNAME(STR) \
|
|
|
|
(IS_DIR_SEPARATOR ((STR)[0]) || (STR)[0] == '$' \
|
|
|
|
|| ((STR)[0] != '\0' && (STR)[1] == ':' && IS_DIR_SEPARATOR ((STR)[2])))
|
|
|
|
#else
|
|
|
|
#define IS_ABSOLUTE_PATHNAME(STR) \
|
|
|
|
(IS_DIR_SEPARATOR ((STR)[0]) || (STR)[0] == '$')
|
|
|
|
#endif
|
|
|
|
|
2001-10-09 10:03:13 -04:00
|
|
|
/* Get libiberty declarations. */
|
1998-11-27 05:09:17 -05:00
|
|
|
#include "libiberty.h"
|
2001-03-27 10:31:46 -05:00
|
|
|
#include "symcat.h"
|
1998-11-27 05:09:17 -05:00
|
|
|
|
2000-08-21 14:01:51 -04:00
|
|
|
/* Provide a default for the HOST_BIT_BUCKET.
|
|
|
|
This suffices for POSIX-like hosts. */
|
|
|
|
|
|
|
|
#ifndef HOST_BIT_BUCKET
|
|
|
|
#define HOST_BIT_BUCKET "/dev/null"
|
|
|
|
#endif
|
|
|
|
|
configure.in: Move check for unsigned enumerated bitfields to macro in aclocal.m4.
* configure.in: Move check for unsigned enumerated bitfields
to macro in aclocal.m4. Disable it for now.
* configure, config.in: Regenerate.
* system.h: Don't do anything with ONLY_INT_FIELDS. Use the
unsigned-int form of ENUM_BITFIELD() unless being compiled by GCC.
* varasm.c (struct rtx_const): Use ENUM_BITFIELD(). Move enum
kind above its first use.
* config/xm-interix.h, config/alpha/xm-alpha.h,
config/i370/xm-linux.h, config/i386/xm-beos.h,
config/i386/xm-mingw32.h, config/mips/xm-mips.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/rs6000/xm-beos.h, config/rs6000/xm-sysv4.h,
Don't define ONLY_INT_FIELDS under any circumstances.
* config/pa/xm-pa.h: Don't define __BSD_NET2__.
* config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/sparc/xm-sysv4.h: Delete - now identical with some
other xm header.
* config.gcc (hppa targets): Replace xm-pahpux.h and
xm-papro.h with implicit xm-pa.h.
(sparc targets): Replace xm-sysv4.h with implicit or explicit
xm-sparc.h.
From-SVN: r40399
2001-03-12 01:31:41 -05:00
|
|
|
/* Be conservative and only use enum bitfields with GCC.
|
|
|
|
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
2000-04-18 15:42:30 -04:00
|
|
|
|
configure.in: Move check for unsigned enumerated bitfields to macro in aclocal.m4.
* configure.in: Move check for unsigned enumerated bitfields
to macro in aclocal.m4. Disable it for now.
* configure, config.in: Regenerate.
* system.h: Don't do anything with ONLY_INT_FIELDS. Use the
unsigned-int form of ENUM_BITFIELD() unless being compiled by GCC.
* varasm.c (struct rtx_const): Use ENUM_BITFIELD(). Move enum
kind above its first use.
* config/xm-interix.h, config/alpha/xm-alpha.h,
config/i370/xm-linux.h, config/i386/xm-beos.h,
config/i386/xm-mingw32.h, config/mips/xm-mips.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/rs6000/xm-beos.h, config/rs6000/xm-sysv4.h,
Don't define ONLY_INT_FIELDS under any circumstances.
* config/pa/xm-pa.h: Don't define __BSD_NET2__.
* config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/sparc/xm-sysv4.h: Delete - now identical with some
other xm header.
* config.gcc (hppa targets): Replace xm-pahpux.h and
xm-papro.h with implicit xm-pa.h.
(sparc targets): Replace xm-sysv4.h with implicit or explicit
xm-sparc.h.
From-SVN: r40399
2001-03-12 01:31:41 -05:00
|
|
|
#if (GCC_VERSION > 2000)
|
2000-04-18 15:42:30 -04:00
|
|
|
#define ENUM_BITFIELD(TYPE) enum TYPE
|
|
|
|
#else
|
|
|
|
#define ENUM_BITFIELD(TYPE) unsigned int
|
|
|
|
#endif
|
|
|
|
|
2000-05-17 11:21:11 -04:00
|
|
|
#ifndef offsetof
|
|
|
|
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
|
|
|
#endif
|
2000-04-18 15:42:30 -04:00
|
|
|
|
2000-07-07 10:29:03 -04:00
|
|
|
/* Traditional C cannot initialize union members of structs. Provide
|
|
|
|
a macro which expands appropriately to handle it. This only works
|
ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,
ChangeLog.5, ChangeLog, ChangeLog.lib, FSFChangeLog.10, ONEWS,
c-common.c, caller-save.c, cfg.c, cfgcleanup.c, cfgrtl.c,
collect2.c, df.h, diagnostic.h, final.c, gcse.c, gthr.h,
haifa-sched.c, jump.c, local-alloc.c, profile.c, protoize.c,
regmove.c, reload1.c, rtlanal.c, sched-vis.c, ssa.c, stmt.c,
system.h, toplev.c: Fix spelling errors.
From-SVN: r46580
2001-10-28 07:42:06 -05:00
|
|
|
if you intend to initialize the union member to zero since it relies
|
2000-07-07 10:29:03 -04:00
|
|
|
on default initialization to zero in the traditional C case. */
|
|
|
|
#ifdef __STDC__
|
|
|
|
#define UNION_INIT_ZERO , {0}
|
|
|
|
#else
|
|
|
|
#define UNION_INIT_ZERO
|
|
|
|
#endif
|
|
|
|
|
2000-07-21 03:10:36 -04:00
|
|
|
/* Various error reporting routines want to use __FUNCTION__. */
|
|
|
|
#if (GCC_VERSION < 2007)
|
2000-07-22 10:12:38 -04:00
|
|
|
#ifndef __FUNCTION__
|
2000-07-21 03:10:36 -04:00
|
|
|
#define __FUNCTION__ "?"
|
2000-07-22 10:12:38 -04:00
|
|
|
#endif /* ! __FUNCTION__ */
|
2000-07-21 03:10:36 -04:00
|
|
|
#endif
|
|
|
|
|
2001-09-10 18:34:03 -04:00
|
|
|
/* __builtin_expect(A, B) evaluates to A, but notifies the compiler that
|
|
|
|
the most likely value of A is B. This feature was added at some point
|
|
|
|
between 2.95 and 3.0. Let's use 3.0 as the lower bound for now. */
|
|
|
|
#if (GCC_VERSION < 3000)
|
|
|
|
#define __builtin_expect(a, b) (a)
|
|
|
|
#endif
|
|
|
|
|
xm-lynx.h, [...]: Do not define TRUE or FALSE.
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h,
config/a29k/xm-unix.h, config/alpha/xm-alpha.h,
config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h,
config/clipper/xm-clix.h, config/convex/xm-convex.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
config/h8300/xm-h8300.h, config/i370/xm-i370.h,
config/i370/xm-linux.h, config/i370/xm-mvs.h,
config/i370/xm-oe.h, config/i386/xm-aix.h,
config/i386/xm-i386.h, config/i386/xm-osf.h,
config/i860/xm-i860.h, config/i960/xm-i960.h,
config/ia64/xm-ia64.h, config/m32r/xm-m32r.h,
config/m68k/xm-m68k.h, config/m88k/xm-m88k.h,
config/mcore/xm-mcore.h, config/mips/xm-mips.h,
config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h,
config/ns32k/xm-ns32k.h, config/pa/xm-linux.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/pj/xm-pj.h, config/romp/xm-romp.h,
config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
config/v850/xm-v850.h, config/vax/xm-vax.h,
config/vax/xm-vms.h, config/we32k/xm-we32k.h:
Do not define TRUE or FALSE.
* config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made
empty by above change.
* config.gcc: Remove references to these files.
* configure.in: Detect stdbool.h.
* configure, config.in: Regenerate.
* system.h: Include stddef.h here if available. Set
HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. Then
set up a sensible boolean type at the very end.
* combine.c, cse.c, expr.c, fold-const.c, gensupport.c,
f/com.c, config/mcore/mcore.c:
Rename variables named 'true' and/or 'false'.
* hash.h: Delete 'boolean' typedef and related #undefs.
* f/proj.h: Delete 'bool' type. Don't include stddef.h here.
* function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c,
java/class.c, java/decl.c, java/java-tree.h:
Replace all uses of 'boolean' with 'bool'.
From-SVN: r40176
2001-03-01 20:51:02 -05:00
|
|
|
/* Provide some sort of boolean type. We use stdbool.h if it's
|
system.h: Forward-declare struct rtx_def, struct rtvec_def, and union tree_node.
* system.h: Forward-declare struct rtx_def, struct rtvec_def,
and union tree_node. Typedef rtx, rtvec, and tree. Fix comment.
* rtl.h: Don't forward-declare union tree_node here. Don't
typedef rtx or rtvec here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
* tree.h: Don't forward-declare struct rtx_def here. Don't
typedef tree here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
From-SVN: r44980
2001-08-17 16:29:21 -04:00
|
|
|
available. This must be after all inclusion of system headers,
|
|
|
|
as some of them will mess us up. */
|
xm-lynx.h, [...]: Do not define TRUE or FALSE.
* config/xm-lynx.h, config/xm-std32.h, config/a29k/xm-a29k.h,
config/a29k/xm-unix.h, config/alpha/xm-alpha.h,
config/arc/xm-arc.h, config/arm/xm-arm.h, config/c4x/xm-c4x.h,
config/clipper/xm-clix.h, config/convex/xm-convex.h,
config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
config/elxsi/xm-elxsi.h, config/fr30/xm-fr30.h,
config/h8300/xm-h8300.h, config/i370/xm-i370.h,
config/i370/xm-linux.h, config/i370/xm-mvs.h,
config/i370/xm-oe.h, config/i386/xm-aix.h,
config/i386/xm-i386.h, config/i386/xm-osf.h,
config/i860/xm-i860.h, config/i960/xm-i960.h,
config/ia64/xm-ia64.h, config/m32r/xm-m32r.h,
config/m68k/xm-m68k.h, config/m88k/xm-m88k.h,
config/mcore/xm-mcore.h, config/mips/xm-mips.h,
config/mn10200/xm-mn10200.h, config/mn10300/xm-mn10300.h,
config/ns32k/xm-ns32k.h, config/pa/xm-linux.h,
config/pa/xm-pa.h, config/pa/xm-pa64hpux.h,
config/pa/xm-pahpux.h, config/pa/xm-papro.h,
config/pj/xm-pj.h, config/romp/xm-romp.h,
config/rs6000/xm-beos.h, config/rs6000/xm-rs6000.h,
config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
config/sparc/xm-sparc.h, config/sparc/xm-sysv4.h,
config/v850/xm-v850.h, config/vax/xm-vax.h,
config/vax/xm-vms.h, config/we32k/xm-we32k.h:
Do not define TRUE or FALSE.
* config/i386/xm-aix.h, config/i386/xm-osf.h: Delete; made
empty by above change.
* config.gcc: Remove references to these files.
* configure.in: Detect stdbool.h.
* configure, config.in: Regenerate.
* system.h: Include stddef.h here if available. Set
HAVE__BOOL based on GCC_VERSION and __STDC_VERSION__. Then
set up a sensible boolean type at the very end.
* combine.c, cse.c, expr.c, fold-const.c, gensupport.c,
f/com.c, config/mcore/mcore.c:
Rename variables named 'true' and/or 'false'.
* hash.h: Delete 'boolean' typedef and related #undefs.
* f/proj.h: Delete 'bool' type. Don't include stddef.h here.
* function.c, ggc-common.c, hash.h, hash.c, tlink.c, cp/decl.c,
java/class.c, java/decl.c, java/java-tree.h:
Replace all uses of 'boolean' with 'bool'.
From-SVN: r40176
2001-03-01 20:51:02 -05:00
|
|
|
#undef bool
|
|
|
|
#undef true
|
|
|
|
#undef false
|
|
|
|
#undef TRUE
|
|
|
|
#undef FALSE
|
|
|
|
|
|
|
|
#ifdef HAVE_STDBOOL_H
|
|
|
|
# include <stdbool.h>
|
|
|
|
#else
|
|
|
|
# if !HAVE__BOOL
|
|
|
|
typedef char _Bool;
|
|
|
|
# endif
|
|
|
|
# define bool _Bool
|
|
|
|
# define true 1
|
|
|
|
# define false 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define TRUE true
|
|
|
|
#define FALSE false
|
|
|
|
|
server.c (load_data, run_shell): Use xmalloc, xrealloc & xcalloc in lieu of malloc, realloc & calloc.
* fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc &
xcalloc in lieu of malloc, realloc & calloc.
* gencheck.c (xmalloc): Use really_call_malloc, not malloc.
* gengenrtl.c (xmalloc): Likewise.
* gensupport.c (xcalloc, xrealloc, xmalloc): Use the
really_call_* memory allocation routines.
* stmt.c (check_for_full_enumeration_handling): Use
really_call_calloc, not calloc.
* system.h (really_call_malloc, really_call_calloc,
really_call_realloc): Define.
(malloc, realloc, calloc, strdup, bzero, bcmp, rindex): Poison.
f:
* fini.c (main): Use really_call_malloc, not malloc.
From-SVN: r40360
2001-03-09 23:20:03 -05:00
|
|
|
/* As the last action in this file, we poison the identifiers that
|
|
|
|
shouldn't be used. Note, luckily gcc-3.0's token-based integrated
|
|
|
|
preprocessor won't trip on poisoned identifiers that arrive from
|
|
|
|
the expansion of macros. E.g. #define strrchr rindex, won't error
|
|
|
|
if rindex is poisoned after this directive is issued and later on
|
|
|
|
strrchr is called.
|
|
|
|
|
|
|
|
Note: We define bypass macros for the few cases where we really
|
|
|
|
want to use the libc memory allocation routines. Otherwise we
|
|
|
|
insist you use the "x" versions from libiberty. */
|
|
|
|
|
|
|
|
#define really_call_malloc malloc
|
|
|
|
#define really_call_calloc calloc
|
|
|
|
#define really_call_realloc realloc
|
|
|
|
|
|
|
|
#if (GCC_VERSION >= 3000)
|
|
|
|
|
2001-03-13 14:55:18 -05:00
|
|
|
/* Note autoconf checks for prototype declarations and includes
|
|
|
|
system.h while doing so. Only poison these tokens if actually
|
|
|
|
compiling gcc, so that the autoconf declaration tests for malloc
|
|
|
|
etc don't spuriously fail. */
|
|
|
|
#ifdef IN_GCC
|
2001-03-10 17:35:01 -05:00
|
|
|
#undef malloc
|
|
|
|
#undef realloc
|
|
|
|
#undef calloc
|
|
|
|
#undef strdup
|
server.c (load_data, run_shell): Use xmalloc, xrealloc & xcalloc in lieu of malloc, realloc & calloc.
* fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc &
xcalloc in lieu of malloc, realloc & calloc.
* gencheck.c (xmalloc): Use really_call_malloc, not malloc.
* gengenrtl.c (xmalloc): Likewise.
* gensupport.c (xcalloc, xrealloc, xmalloc): Use the
really_call_* memory allocation routines.
* stmt.c (check_for_full_enumeration_handling): Use
really_call_calloc, not calloc.
* system.h (really_call_malloc, really_call_calloc,
really_call_realloc): Define.
(malloc, realloc, calloc, strdup, bzero, bcmp, rindex): Poison.
f:
* fini.c (main): Use really_call_malloc, not malloc.
From-SVN: r40360
2001-03-09 23:20:03 -05:00
|
|
|
#pragma GCC poison malloc realloc calloc strdup
|
2001-10-15 16:10:13 -04:00
|
|
|
|
|
|
|
/* Old target macros that have moved to the target hooks structure. */
|
|
|
|
#pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \
|
|
|
|
FUNCTION_PROLOGUE FUNCTION_EPILOGUE \
|
|
|
|
FUNCTION_END_PROLOGUE FUNCTION_BEGIN_EPILOGUE \
|
|
|
|
DECL_MACHINE_ATTRIBUTES COMP_TYPE_ATTRIBUTES INSERT_ATTRIBUTES \
|
|
|
|
VALID_MACHINE_DECL_ATTRIBUTE VALID_MACHINE_TYPE_ATTRIBUTE \
|
|
|
|
SET_DEFAULT_TYPE_ATTRIBUTES SET_DEFAULT_DECL_ATTRIBUTES \
|
|
|
|
MERGE_MACHINE_TYPE_ATTRIBUTES MERGE_MACHINE_DECL_ATTRIBUTES \
|
2001-11-19 06:28:52 -05:00
|
|
|
MD_INIT_BUILTINS MD_EXPAND_BUILTIN ASM_OUTPUT_CONSTRUCTOR \
|
|
|
|
ASM_OUTPUT_DESTRUCTOR
|
|
|
|
|
|
|
|
/* And other obsolete target macros. */
|
2002-01-08 13:16:25 -05:00
|
|
|
#pragma GCC poison INT_ASM_OP ASM_OUTPUT_EH_REGION_BEG \
|
|
|
|
ASM_OUTPUT_EH_REGION_END ASM_OUTPUT_LABELREF_AS_INT \
|
|
|
|
DOESNT_NEED_UNWINDER EH_TABLE_LOOKUP OBJC_SELECTORS_WITHOUT_LABELS \
|
tm.texi (EASY_DIV_EXPR, [...]): Remove documentation of obsolete macros.
* doc/tm.texi (EASY_DIV_EXPR, IMPLICIT_FIX_EXPR,
LONGJMP_RESTORE_FROM_STACK, MAX_INT_TYPE_SIZE): Remove
documentation of obsolete macros.
* system.h: Poison these macros.
* config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h,
config/arc/arc.h, config/arm/arm.h, config/avr/avr.h,
config/c4x/c4x.h, config/clipper/clipper.h,
config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h,
config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h,
config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/i386.h, config/i860/i860.h, config/i960/i960.h,
config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h,
config/mn10300/mn10300.h, config/ns32k/ns32k.h, config/pa/pa.h,
config/pdp11/pdp11.h, config/pj/pj.h, config/romp/romp.h,
config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h,
config/sparc/sparc.h, config/stormy16/stormy16.h,
config/v850/v850.h, config/vax/vax.h, config/we32k/we32k.h: Remove
definitions and commented out definitions of obsolete macros.
* config/mips/iris5.h (MAX_WCHAR_TYPE_SIZE): Don't define in terms
of MAX_INT_TYPE_SIZE.
From-SVN: r48665
2002-01-08 17:51:46 -05:00
|
|
|
OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR \
|
|
|
|
LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE
|
2001-11-19 06:28:52 -05:00
|
|
|
|
2001-03-13 14:55:18 -05:00
|
|
|
#endif /* IN_GCC */
|
server.c (load_data, run_shell): Use xmalloc, xrealloc & xcalloc in lieu of malloc, realloc & calloc.
* fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc &
xcalloc in lieu of malloc, realloc & calloc.
* gencheck.c (xmalloc): Use really_call_malloc, not malloc.
* gengenrtl.c (xmalloc): Likewise.
* gensupport.c (xcalloc, xrealloc, xmalloc): Use the
really_call_* memory allocation routines.
* stmt.c (check_for_full_enumeration_handling): Use
really_call_calloc, not calloc.
* system.h (really_call_malloc, really_call_calloc,
really_call_realloc): Define.
(malloc, realloc, calloc, strdup, bzero, bcmp, rindex): Poison.
f:
* fini.c (main): Use really_call_malloc, not malloc.
From-SVN: r40360
2001-03-09 23:20:03 -05:00
|
|
|
|
2001-03-27 23:05:46 -05:00
|
|
|
/* Note: not all uses of the `index' token (e.g. variable names and
|
|
|
|
structure members) have been eliminated. */
|
|
|
|
#undef bcopy
|
2001-03-10 17:35:01 -05:00
|
|
|
#undef bzero
|
|
|
|
#undef bcmp
|
|
|
|
#undef rindex
|
2001-03-27 23:05:46 -05:00
|
|
|
#pragma GCC poison bcopy bzero bcmp rindex
|
server.c (load_data, run_shell): Use xmalloc, xrealloc & xcalloc in lieu of malloc, realloc & calloc.
* fixinc/server.c (load_data, run_shell): Use xmalloc, xrealloc &
xcalloc in lieu of malloc, realloc & calloc.
* gencheck.c (xmalloc): Use really_call_malloc, not malloc.
* gengenrtl.c (xmalloc): Likewise.
* gensupport.c (xcalloc, xrealloc, xmalloc): Use the
really_call_* memory allocation routines.
* stmt.c (check_for_full_enumeration_handling): Use
really_call_calloc, not calloc.
* system.h (really_call_malloc, really_call_calloc,
really_call_realloc): Define.
(malloc, realloc, calloc, strdup, bzero, bcmp, rindex): Poison.
f:
* fini.c (main): Use really_call_malloc, not malloc.
From-SVN: r40360
2001-03-09 23:20:03 -05:00
|
|
|
|
|
|
|
#endif /* GCC >= 3.0 */
|
|
|
|
|
2001-05-25 21:31:47 -04:00
|
|
|
#endif /* ! GCC_SYSTEM_H */
|