1999-09-07 07:49:18 +02:00
|
|
|
/* Get common system includes and various definitions and declarations based
|
|
|
|
on autoconf macros.
|
2003-01-20 11:23:41 +01:00
|
|
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
1998-02-13 01:22:24 +01: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 16:35:51 +02:00
|
|
|
This file is part of GCC.
|
1999-01-06 21:51:20 +01: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 16:35:51 +02: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 21:51:20 +01: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 16:35:51 +02: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 21:51:20 +01: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 16:35:51 +02: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-13 01:22:24 +01:00
|
|
|
|
1999-09-07 07:49:18 +02:00
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
#ifndef GCC_SYSTEM_H
|
|
|
|
#define GCC_SYSTEM_H
|
1998-02-13 01:22:24 +01:00
|
|
|
|
2003-06-16 20:24:08 +02:00
|
|
|
/* We must include stdarg.h before stdio.h. */
|
1998-08-26 10:11:47 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2000-04-22 20:41:05 +02: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-02 02:51:02 +01:00
|
|
|
#ifdef HAVE_STDDEF_H
|
|
|
|
# include <stddef.h>
|
|
|
|
#endif
|
|
|
|
|
1998-02-13 01:22:24 +01:00
|
|
|
#include <stdio.h>
|
1998-06-30 08:11:43 +02:00
|
|
|
|
|
|
|
/* Define a generic NULL if one hasn't already been defined. */
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
|
|
|
|
1998-12-08 00:40:19 +01:00
|
|
|
/* The compiler is not a multi-threaded application and therefore we
|
2001-09-28 09:00:27 +02: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-19 01:47:41 +01:00
|
|
|
|
2001-09-28 09:00:27 +02:00
|
|
|
HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the stdio
|
2000-05-23 19:42:19 +02:00
|
|
|
code is multi-thread safe by default. If it is set to 0, then do
|
|
|
|
not worry about using the _unlocked functions.
|
2003-05-31 20:45:31 +02:00
|
|
|
|
2001-09-28 09:00:27 +02: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-19 01:47:41 +01:00
|
|
|
|
2001-09-28 09:00:27 +02: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
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int fputs_unlocked (const char *, FILE *);
|
2001-09-28 09:00:27 +02: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
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int fwrite_unlocked (const void *, size_t, size_t, FILE *);
|
2001-09-28 09:00:27 +02:00
|
|
|
# endif
|
1999-03-19 01:47:41 +01:00
|
|
|
# endif
|
2001-09-28 09:00:27 +02: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
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int fprintf_unlocked (FILE *, const char *, ...);
|
2001-09-28 09:00:27 +02:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
1998-12-08 00:40:19 +01:00
|
|
|
#endif
|
|
|
|
|
2003-05-31 20:45:31 +02:00
|
|
|
/* ??? Glibc's fwrite/fread_unlocked macros cause
|
2003-01-22 02:02:51 +01:00
|
|
|
"warning: signed and unsigned type in conditional expression". */
|
|
|
|
#undef fread_unlocked
|
|
|
|
#undef fwrite_unlocked
|
|
|
|
|
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-08 04:00:26 +01: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-13 01:22:24 +01:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
1999-09-07 07:49:18 +02:00
|
|
|
|
1998-02-13 01:22:24 +01:00
|
|
|
#include <errno.h>
|
|
|
|
|
2001-04-12 17:36:24 +02:00
|
|
|
#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
|
1998-02-13 01:22:24 +01:00
|
|
|
extern int errno;
|
|
|
|
#endif
|
|
|
|
|
2003-01-21 03:44:37 +01:00
|
|
|
/* Some of glibc's string inlines cause warnings. Plus we'd rather
|
|
|
|
rely on (and therefore test) GCC's string builtins. */
|
|
|
|
#define __NO_STRING_INLINES
|
|
|
|
|
1998-09-03 08:52:00 +02:00
|
|
|
#ifdef STRING_WITH_STRINGS
|
1998-02-13 01:22:24 +01:00
|
|
|
# include <string.h>
|
1998-09-03 08:52:00 +02:00
|
|
|
# include <strings.h>
|
1998-02-13 01:22:24 +01:00
|
|
|
#else
|
1998-09-03 08:52:00 +02:00
|
|
|
# ifdef HAVE_STRING_H
|
|
|
|
# include <string.h>
|
|
|
|
# else
|
|
|
|
# ifdef HAVE_STRINGS_H
|
|
|
|
# include <strings.h>
|
|
|
|
# endif
|
1998-02-13 01:22:24 +01: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-03 04:32:55 +01: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-13 01:22:24 +01:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
|
|
# include <sys/param.h>
|
2001-12-28 19:17:54 +01:00
|
|
|
/* We use this identifier later and it appears in some vendor param.h's. */
|
2001-12-21 21:54:21 +01:00
|
|
|
# undef PREFETCH
|
1998-02-13 01:22:24 +01: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-14 01:58:32 +01:00
|
|
|
/* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */
|
|
|
|
#include "hwint.h"
|
1999-02-12 07:32:36 +01:00
|
|
|
|
2001-10-21 21:44:08 +02: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) \
|
2002-01-22 15:33:35 +01:00
|
|
|
((unsigned HOST_WIDE_INT) ((VALUE) - (LOWER)) <= ((UPPER) - (LOWER)))
|
2001-10-21 21:44:08 +02:00
|
|
|
|
2000-05-28 00:05:01 +02: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-13 01:22:24 +01:00
|
|
|
#ifdef TIME_WITH_SYS_TIME
|
|
|
|
# include <sys/time.h>
|
|
|
|
# include <time.h>
|
|
|
|
#else
|
|
|
|
# if HAVE_SYS_TIME_H
|
1998-05-06 09:58:27 +02:00
|
|
|
# include <sys/time.h>
|
1998-02-13 01:22:24 +01:00
|
|
|
# else
|
1998-05-06 09:58:27 +02:00
|
|
|
# ifdef HAVE_TIME_H
|
|
|
|
# include <time.h>
|
|
|
|
# endif
|
|
|
|
# endif
|
1998-02-13 01:22:24 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_FCNTL_H
|
|
|
|
# include <fcntl.h>
|
|
|
|
#else
|
1998-05-06 09:58:27 +02:00
|
|
|
# ifdef HAVE_SYS_FILE_H
|
|
|
|
# include <sys/file.h>
|
|
|
|
# endif
|
1998-02-13 01:22:24 +01: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 09:58:27 +02:00
|
|
|
#ifndef O_RDONLY
|
|
|
|
# define O_RDONLY 0
|
|
|
|
#endif
|
|
|
|
#ifndef O_WRONLY
|
|
|
|
# define O_WRONLY 1
|
|
|
|
#endif
|
1998-02-13 01:22:24 +01:00
|
|
|
|
1998-12-16 10:34:57 +01: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 20:38:36 +01:00
|
|
|
/* Returns the least number N such that N * Y >= X. */
|
|
|
|
#define CEIL(x,y) (((x) + (y) - 1) / (y))
|
|
|
|
|
1998-11-19 11:13:46 +01: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 07:21:34 +02:00
|
|
|
#ifndef WSTOPSIG
|
|
|
|
#define WSTOPSIG WEXITSTATUS
|
|
|
|
#endif
|
2003-03-30 21:01:58 +02:00
|
|
|
#ifndef WCOREDUMP
|
|
|
|
#define WCOREDUMP(S) ((S) & WCOREFLG)
|
|
|
|
#endif
|
|
|
|
#ifndef WCOREFLG
|
|
|
|
#define WCOREFLG 0200
|
|
|
|
#endif
|
1998-11-19 11:13:46 +01:00
|
|
|
|
2000-05-23 19:42:19 +02: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-13 01:22:24 +01:00
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
|
2003-06-16 20:24:08 +02:00
|
|
|
extern double atof (const char *);
|
1998-05-06 10:36:04 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_ATOL) && !HAVE_DECL_ATOL
|
2003-06-16 20:24:08 +02:00
|
|
|
extern long atol (const char *);
|
1998-05-06 10:36:04 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_FREE) && !HAVE_DECL_FREE
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void free (void *);
|
1998-02-13 01:22:24 +01:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_GETCWD) && !HAVE_DECL_GETCWD
|
2003-06-16 20:24:08 +02:00
|
|
|
extern char *getcwd (char *, size_t);
|
1998-06-28 08:09:57 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_GETENV) && !HAVE_DECL_GETENV
|
2003-06-16 20:24:08 +02:00
|
|
|
extern char *getenv (const char *);
|
1998-02-15 21:36:23 +01:00
|
|
|
#endif
|
|
|
|
|
2000-10-20 21:17:41 +02:00
|
|
|
#if defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int getopt (int, char * const *, const char *);
|
2000-10-20 21:17:41 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_GETWD) && !HAVE_DECL_GETWD
|
2003-06-16 20:24:08 +02:00
|
|
|
extern char *getwd (char *);
|
1998-06-28 08:09:57 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_SBRK) && !HAVE_DECL_SBRK
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void *sbrk (int);
|
1998-05-06 10:36:04 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_STRSTR) && !HAVE_DECL_STRSTR
|
2003-06-16 20:24:08 +02:00
|
|
|
extern char *strstr (const char *, const char *);
|
1999-06-24 23:48:29 +02:00
|
|
|
#endif
|
|
|
|
|
1999-09-07 07:49:18 +02:00
|
|
|
#ifdef HAVE_MALLOC_H
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void *malloc (size_t);
|
1999-09-07 07:49:18 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_CALLOC) && !HAVE_DECL_CALLOC
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void *calloc (size_t, size_t);
|
1999-09-07 07:49:18 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_REALLOC) && !HAVE_DECL_REALLOC
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void *realloc (void *, size_t);
|
1999-09-07 07:49:18 +02:00
|
|
|
#endif
|
|
|
|
|
1999-12-27 16:39:39 +01:00
|
|
|
/* If the system doesn't provide strsignal, we get it defined in
|
2001-10-09 16:03:13 +02:00
|
|
|
libiberty but no declaration is supplied. */
|
2003-01-20 11:23:41 +01:00
|
|
|
#if !defined (HAVE_STRSIGNAL) \
|
|
|
|
|| (defined (HAVE_DECL_STRSIGNAL) && !HAVE_DECL_STRSIGNAL)
|
1999-12-27 16:39:39 +01:00
|
|
|
# ifndef strsignal
|
2003-06-16 20:24:08 +02:00
|
|
|
extern const char *strsignal (int);
|
1998-09-13 08:17:31 +02:00
|
|
|
# endif
|
1999-12-27 16:39:39 +01:00
|
|
|
#endif
|
1998-09-13 08:17:31 +02:00
|
|
|
|
1998-06-30 13:10:55 +02:00
|
|
|
#ifdef HAVE_GETRLIMIT
|
2000-05-23 19:42:19 +02:00
|
|
|
# if defined (HAVE_DECL_GETRLIMIT) && !HAVE_DECL_GETRLIMIT
|
1998-06-30 13:10:55 +02: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 14:48:51 +01:00
|
|
|
struct rlimit;
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int getrlimit (int, struct rlimit *);
|
1998-06-30 13:10:55 +02:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SETRLIMIT
|
2000-05-23 19:42:19 +02:00
|
|
|
# if defined (HAVE_DECL_SETRLIMIT) && !HAVE_DECL_SETRLIMIT
|
1998-06-30 13:10:55 +02: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 14:48:51 +01:00
|
|
|
struct rlimit;
|
2003-06-16 20:24:08 +02:00
|
|
|
extern int setrlimit (int, const struct rlimit *);
|
1998-06-30 13:10:55 +02:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2000-05-23 19:42:19 +02:00
|
|
|
#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
|
2003-06-16 20:24:08 +02:00
|
|
|
extern void abort (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 21:52:44 +02:00
|
|
|
#endif
|
1998-05-12 09:36:02 +02:00
|
|
|
|
2003-10-16 20:05:57 +02:00
|
|
|
#if defined (HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF
|
|
|
|
extern int snprintf (char *, size_t, const char *, ...);
|
|
|
|
#endif
|
|
|
|
|
2000-08-18 19:35:58 +02:00
|
|
|
/* 1 if we have C99 designated initializers. */
|
2000-11-21 04:02:09 +01:00
|
|
|
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
|
2000-08-18 19:35:58 +02:00
|
|
|
#define HAVE_DESIGNATED_INITIALIZERS \
|
|
|
|
((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
|
2000-11-21 04:02:09 +01:00
|
|
|
#endif
|
2000-08-18 19:35:58 +02: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-02 02:51:02 +01:00
|
|
|
/* 1 if we have _Bool. */
|
|
|
|
#ifndef HAVE__BOOL
|
|
|
|
# define HAVE__BOOL \
|
|
|
|
((GCC_VERSION >= 3000) || (__STDC_VERSION__ >= 199901L))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1998-11-23 17:39:37 +01:00
|
|
|
#if HAVE_SYS_STAT_H
|
|
|
|
# include <sys/stat.h>
|
|
|
|
#endif
|
1998-11-23 10:20:35 +01: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 14:48:34 +01: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 18:27:45 +02: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 14:48:34 +01: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-25 00:35:34 +01: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-31 02:40:29 +02:00
|
|
|
#ifndef STDERR_FILENO
|
1999-03-25 00:35:34 +01:00
|
|
|
# define STDERR_FILENO 2
|
|
|
|
#endif
|
|
|
|
|
2001-10-09 16:03:13 +02:00
|
|
|
/* Some systems have mkdir that takes a single argument. */
|
1999-04-15 03:50:52 +02:00
|
|
|
#ifdef MKDIR_TAKES_ONE_ARG
|
|
|
|
# define mkdir(a,b) mkdir(a)
|
|
|
|
#endif
|
|
|
|
|
1999-09-22 00:31:29 +02:00
|
|
|
/* Provide a way to print an address via printf. */
|
|
|
|
#ifndef HOST_PTR_PRINTF
|
|
|
|
# ifdef HAVE_PRINTF_PTR
|
|
|
|
# define HOST_PTR_PRINTF "%p"
|
2003-07-08 02:35:52 +02:00
|
|
|
# elif SIZEOF_INT == SIZEOF_VOID_P
|
|
|
|
# define HOST_PTR_PRINTF "%x"
|
|
|
|
# elif SIZEOF_LONG == SIZEOF_VOID_P
|
|
|
|
# define HOST_PTR_PRINTF "%lx"
|
1999-09-22 00:31:29 +02:00
|
|
|
# else
|
2003-07-08 02:35:52 +02:00
|
|
|
# define HOST_PTR_PRINTF "%llx"
|
1999-09-22 00:31:29 +02:00
|
|
|
# endif
|
|
|
|
#endif /* ! HOST_PTR_PRINTF */
|
|
|
|
|
2000-01-07 01:16:51 +01:00
|
|
|
/* By default, colon separates directories in a path. */
|
|
|
|
#ifndef PATH_SEPARATOR
|
|
|
|
#define PATH_SEPARATOR ':'
|
|
|
|
#endif
|
|
|
|
|
system.h: Include filenames.h.
* system.h: Include filenames.h.
(IS_DIR_SEPARATOR, IS_ABSOLUTE_PATHNAME): Don't define.
(DIR_SEPARATOR, DIR_SEPARATOR_2): If not already defined,
define based on HAVE_DOS_BASED_FILE_SYSTEM.
* config/i386/xm-cygwin.h, config/i386/xm-djgpp.h
* config/i386/xm-mingw32.h: Don't define
HAVE_DOS_BASED_FILE_SYSTEM,
DIR_SEPARATOR, or DIR_SEPARATOR_2.
* doc/hostconfig.texi: Update to match.
* cppfiles.c, gcc.c, gensupport.c, protoize.c,
config/i386/cygwin.h:
Use IS_ABSOLUTE_PATH throughout.
* gcc.c (DIR_UP): Delete, unused.
* protoize.c (IS_SAME_PATH): Define in terms of
FILENAME_CMP.
(is_abspath): Delete.
java:
* jcf-path.c: Don't default-define PATH_SEPARATOR nor
DIR_SEPARATOR.
Use FILENAME_CMP.
* jcf-write.c: Don't default-define DIR_SEPARATOR.
* jcf.h: Delete COMPARE_FILENAMES definition.
From-SVN: r68863
2003-07-03 06:24:01 +02:00
|
|
|
/* Filename handling macros. */
|
|
|
|
#include "filenames.h"
|
|
|
|
|
|
|
|
/* These should be phased out in favor of IS_DIR_SEPARATOR, where possible. */
|
2000-01-07 01:16:51 +01:00
|
|
|
#ifndef DIR_SEPARATOR
|
system.h: Include filenames.h.
* system.h: Include filenames.h.
(IS_DIR_SEPARATOR, IS_ABSOLUTE_PATHNAME): Don't define.
(DIR_SEPARATOR, DIR_SEPARATOR_2): If not already defined,
define based on HAVE_DOS_BASED_FILE_SYSTEM.
* config/i386/xm-cygwin.h, config/i386/xm-djgpp.h
* config/i386/xm-mingw32.h: Don't define
HAVE_DOS_BASED_FILE_SYSTEM,
DIR_SEPARATOR, or DIR_SEPARATOR_2.
* doc/hostconfig.texi: Update to match.
* cppfiles.c, gcc.c, gensupport.c, protoize.c,
config/i386/cygwin.h:
Use IS_ABSOLUTE_PATH throughout.
* gcc.c (DIR_UP): Delete, unused.
* protoize.c (IS_SAME_PATH): Define in terms of
FILENAME_CMP.
(is_abspath): Delete.
java:
* jcf-path.c: Don't default-define PATH_SEPARATOR nor
DIR_SEPARATOR.
Use FILENAME_CMP.
* jcf-write.c: Don't default-define DIR_SEPARATOR.
* jcf.h: Delete COMPARE_FILENAMES definition.
From-SVN: r68863
2003-07-03 06:24:01 +02:00
|
|
|
# define DIR_SEPARATOR '/'
|
|
|
|
# ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
|
|
|
# define DIR_SEPARATOR_2 '\\'
|
|
|
|
# endif
|
2000-11-28 15:58:08 +01:00
|
|
|
#endif
|
|
|
|
|
2001-10-09 16:03:13 +02:00
|
|
|
/* Get libiberty declarations. */
|
1998-11-27 11:09:17 +01:00
|
|
|
#include "libiberty.h"
|
|
|
|
|
2000-08-21 20:01:51 +02: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
|
|
|
|
|
gengtype-lex.l (IWORD): Add CHAR_BITFIELD.
gcc:
* gengtype-lex.l (IWORD): Add CHAR_BITFIELD.
* system.h (CHAR_BITFIELD): New.
cp:
* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
DEF_ASSN_OPERATOR): Delete spurious semi-colon.
* rtti.c (dfs_class_hint_mark): Likewise.
* decl.c (push_local_name, push_class_level_binding,
maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
functions returning void.
* decl2.c (add_using_namespace): Likewise.
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Cast argument of %p specifier to void*.
* ptree.c (cxx_print_decl): Likewise.
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK,
VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
* decl.c (set_current_binding_level): New macro. Use throughout
when setting the current binding level.
* cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
in enum.
* method.c (mangling_flags): Likewise.
* cp-tree.h (lang_type_header): Add __extension__ and use
CHAR_BITFIELD for members.
From-SVN: r65201
2003-04-03 17:42:16 +02:00
|
|
|
/* Be conservative and only use enum bitfields with GCC. Likewise for
|
|
|
|
char bitfields.
|
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 07:31:41 +01:00
|
|
|
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
2000-04-18 21:42:30 +02: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 07:31:41 +01:00
|
|
|
#if (GCC_VERSION > 2000)
|
2003-12-18 22:03:24 +01:00
|
|
|
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
|
|
|
|
#define CHAR_BITFIELD __extension__ unsigned char
|
2000-04-18 21:42:30 +02:00
|
|
|
#else
|
|
|
|
#define ENUM_BITFIELD(TYPE) unsigned int
|
gengtype-lex.l (IWORD): Add CHAR_BITFIELD.
gcc:
* gengtype-lex.l (IWORD): Add CHAR_BITFIELD.
* system.h (CHAR_BITFIELD): New.
cp:
* operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
DEF_ASSN_OPERATOR): Delete spurious semi-colon.
* rtti.c (dfs_class_hint_mark): Likewise.
* decl.c (push_local_name, push_class_level_binding,
maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
functions returning void.
* decl2.c (add_using_namespace): Likewise.
* decl.c (print_binding_level, print_other_binding_stack,
print_binding_stack): Cast argument of %p specifier to void*.
* ptree.c (cxx_print_decl): Likewise.
* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
VAR_FUNCTION_OR_PARM_DECL_CHECK,
VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
* decl.c (set_current_binding_level): New macro. Use throughout
when setting the current binding level.
* cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
in enum.
* method.c (mangling_flags): Likewise.
* cp-tree.h (lang_type_header): Add __extension__ and use
CHAR_BITFIELD for members.
From-SVN: r65201
2003-04-03 17:42:16 +02:00
|
|
|
#define CHAR_BITFIELD unsigned int
|
2000-04-18 21:42:30 +02:00
|
|
|
#endif
|
|
|
|
|
2000-05-17 17:21:11 +02:00
|
|
|
#ifndef offsetof
|
2002-01-22 15:33:35 +01:00
|
|
|
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
|
2000-05-17 17:21:11 +02:00
|
|
|
#endif
|
2000-04-18 21:42:30 +02:00
|
|
|
|
2000-07-21 09:10:36 +02:00
|
|
|
/* Various error reporting routines want to use __FUNCTION__. */
|
|
|
|
#if (GCC_VERSION < 2007)
|
2000-07-22 16:12:38 +02:00
|
|
|
#ifndef __FUNCTION__
|
2000-07-21 09:10:36 +02:00
|
|
|
#define __FUNCTION__ "?"
|
2000-07-22 16:12:38 +02:00
|
|
|
#endif /* ! __FUNCTION__ */
|
2000-07-21 09:10:36 +02:00
|
|
|
#endif
|
|
|
|
|
2001-09-11 00:34:03 +02: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-02 02:51:02 +01: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 22:29:21 +02: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-02 02:51:02 +01: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-10 05:20:03 +01: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
|
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
#if defined(FLEX_SCANNER) || defined(YYBISON)
|
|
|
|
/* Flex and bison use malloc and realloc. Yuk. Note that this means
|
2003-01-18 23:32:06 +01:00
|
|
|
really_call_* cannot be used in a .l or .y file. */
|
2002-12-16 19:23:00 +01:00
|
|
|
#define malloc xmalloc
|
|
|
|
#define realloc xrealloc
|
|
|
|
#endif
|
|
|
|
|
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-10 05:20:03 +01:00
|
|
|
#if (GCC_VERSION >= 3000)
|
|
|
|
|
2001-03-13 20:55:18 +01: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 23:35:01 +01:00
|
|
|
#undef calloc
|
|
|
|
#undef strdup
|
2002-06-04 09:11:05 +02:00
|
|
|
#pragma GCC poison calloc strdup
|
|
|
|
|
2002-12-16 19:23:00 +01:00
|
|
|
#if !defined(FLEX_SCANNER) && !defined(YYBISON)
|
2002-06-04 09:11:05 +02:00
|
|
|
#undef malloc
|
|
|
|
#undef realloc
|
|
|
|
#pragma GCC poison malloc realloc
|
|
|
|
#endif
|
2001-10-15 22:10:13 +02: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 12:28:52 +01:00
|
|
|
MD_INIT_BUILTINS MD_EXPAND_BUILTIN ASM_OUTPUT_CONSTRUCTOR \
|
c-common.c (c_common_init): Set options->unsigned_wchar.
* c-common.c (c_common_init): Set options->unsigned_wchar.
* cppinit.c (cpp_create_reader): Default unsigned_wchar,
group target dependencies.
(init_builtins, cpp_handle_option): Update.
* cpplex.c (cpp_interpret_charconst): Update.
* cpplib.h (struct cpp_options): Add unsigned_wchar, rename
signed_char to unsigned_char, group target dependencies.
* defaults.h (WCHAR_UNSIGNED): Remove.
* system.h (WCHAR_UNSIGNED, MAX_CHAR_TYPE_SIZE): Poison.
config:
* freebsd.h, interix.h, alpha/freebsd.h, arm/freebsd.h,
i386/386bsd.h, i386/beos-elf.h, i386/bsd386.h, i386/cygwin.h,
i386/djgpp.h, i386/freebsd-aout.h, i386/i386-interix.h,
i386/win32.h, ia64/freebsd.h, mips/netbsd.h, rs6000/freebsd.h,
sh/elf.h, sh/sh.h, sparc/freebsd.h: Remove WCHAR_UNSIGNED.
doc:
* tm.texi: Remove MAX_CHAR_TYPE_SIZE.
From-SVN: r53271
2002-05-07 23:07:24 +02:00
|
|
|
ASM_OUTPUT_DESTRUCTOR SIGNED_CHAR_SPEC MAX_CHAR_TYPE_SIZE \
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
WCHAR_UNSIGNED UNIQUE_SECTION SELECT_SECTION SELECT_RTX_SECTION \
|
target.h (gcc_target.asm_out): Merge output_mi_thunk and output_mi_vcall_thunk into a single hook.
gcc/
* target.h (gcc_target.asm_out): Merge output_mi_thunk and
output_mi_vcall_thunk into a single hook. Add can_output_mi_thunk.
* target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(TARGET_ASM_OUT): Update.
* hooks.c (hook_bool_tree_hwi_hwi_tree_false): New.
(hook_bool_tree_hwi_hwi_tree_true): New.
(default_can_output_mi_thunk_no_vcall): New.
* hooks.h: Declare them.
* system.h (ASM_OUTPUT_MI_THUNK): Poison.
* config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter.
* config/arm/arm.c, config/cris/cris.c, config/frv/frv.c,
config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c,
config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c,
config/stormy16/stormy16.c: Similarly.
* config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code.
Handle 64-bit properly. Streamline.
(x86_output_mi_vcall_thunk): Remove.
(x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit.
(x86_can_output_mi_thunk): New.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from
output_mi_thunk; make static; always use function_section.
(TARGET_ASM_OUTPUT_MI_THUNK): New.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
(rs6000_ra_ever_killed): Test no_new_pseudos not
targetm.asm_out.output_mi_thunk in conjunction with thunks.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove.
* config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call
xcoffout_declare_function when using rs6000_output_mi_thunk.
* config/s390/s390.c (s390_output_mi_thunk): Rename from
s390_output_mi_vcall_thunk.
(TARGET_ASM_OUTPUT_MI_THUNK): Remove.
(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
* config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset.
(TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
* config/vax/vax-protos.h: Update.
* config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove.
gcc/cp/
* method.c (use_thunk): Always compute vcall_value; assert that
it is not zero. Use can_output_mi_thunk; use output_mi_thunk
for vcall thunks as well.
From-SVN: r58424
2002-10-23 01:05:28 +02:00
|
|
|
ENCODE_SECTION_INFO STRIP_NAME_ENCODING ASM_GLOBALIZE_LABEL \
|
target.h (targetm.address_cost): New.
* target.h (targetm.address_cost): New.
* target-def.h (TARGET_ADDRESS_COST): New.
(TARGET_RTX_COSTS): Uncomment. Oops.
* cse.c (address_cost): Use new target hook.
(default_address_cost): New.
* output.h (default_address_cost): Declare.
* hooks.c (hook_int_rtx_0): New.
* hooks.h (hook_int_rtx_0): Declare.
* loop.c (combine_givs_p): Remove if 0 code.
* system.h (ADDRESS_COST): Poison.
* config/alpha/alpha.c, config/alpha/alpha.h, config/d30v/d30v.c,
config/d30v/d30v.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.h,
config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sparc/sparc.c,
config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h
(TARGET_ADDRESS_COST): Define as hook_int_rtx_0.
(ADDRESS_COST): Remove.
* config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c,
config/dsp16xx/dsp16xx.h, config/i386/i386-protos.h,
config/i386/i386.c, config/i386/i386.h, config/i960/i960-protos.h,
config/i960/i960.c, config/i960/i960.h, config/ip2k/ip2k-protos.h,
config/ip2k/ip2k.c, config/ip2k/ip2k.h, config/mips/mips-protos.h,
config/mips/mips.c, config/mips/mips.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/ns32k/ns32k-protos.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa-protos.h,
config/pa/pa.c, config/pa/pa.h, config/s390/s390-protos.h,
config/s390/s390.c, config/s390/s390.h, config/vax/vax-protos.h,
config/vax/vax.c, config/vax/vax.h
(foo_address_cost): Make static.
(TARGET_ADDRESS_COST): New.
(ADDRESS_COST): Remove.
* config/arm/arm.h, config/arm/arm.c, config/m88k/m88k.h,
config/m88k/m88k.c, config/romp/romp.h, config/romp/romp.c,
config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h
(ADDRESS_COST): Move code ...
(foo_address_cost): ... here.
(TARGET_ADDRESS_COST): New.
* config/m32r/m32r.c (m32r_address_cost): Remove.
* config/m32r/m32r-protos.h: Update.
* config/mmix/mmix.c (mmix_address_cost): Remove.
* config/mmix/mmix-protos.h: Update.
* config/mn10300/mn10300.c (mn10300_address_cost_1): Rename from
mn10300_address_cost; move unsig allocation ...
(mn10300_address_cost): ... here.
(TARGET_ADDRESS_COST): New.
* config/mn10300/mn10300-protos.h: Update.
* config/mn10300/mn10300.h (ADDRESS_COST): Remove.
From-SVN: r61988
2003-01-28 19:08:56 +01:00
|
|
|
ASM_OUTPUT_MI_THUNK CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS \
|
2003-08-01 23:51:13 +02:00
|
|
|
ADDRESS_COST MACHINE_DEPENDENT_REORG ASM_FILE_START ASM_FILE_END \
|
2003-10-02 19:22:57 +02:00
|
|
|
ASM_SIMPLIFY_DWARF_ADDR INIT_TARGET_OPTABS INIT_SUBTARGET_OPTABS \
|
|
|
|
INIT_GOFAST_OPTABS MULSI3_LIBCALL MULDI3_LIBCALL DIVSI3_LIBCALL \
|
|
|
|
DIVDI3_LIBCALL UDIVSI3_LIBCALL UDIVDI3_LIBCALL MODSI3_LIBCALL \
|
2003-12-18 04:29:04 +01:00
|
|
|
MODDI3_LIBCALL UMODSI3_LIBCALL UMODDI3_LIBCALL BUILD_VA_LIST_TYPE \
|
|
|
|
PRETEND_OUTGOING_VARARGS_NAMED
|
2001-11-19 12:28:52 +01:00
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
/* Other obsolete target macros, or macros that used to be in target
|
2002-01-15 21:20:24 +01:00
|
|
|
headers and were not used, and may be obsolete or may never have
|
|
|
|
been used. */
|
2003-05-17 23:59:25 +02:00
|
|
|
#pragma GCC poison INT_ASM_OP ASM_OUTPUT_EH_REGION_BEG CPP_PREDEFINES \
|
2003-07-20 18:29:57 +02:00
|
|
|
ASM_OUTPUT_EH_REGION_END ASM_OUTPUT_LABELREF_AS_INT SMALL_STACK \
|
2002-01-08 19:16:25 +01:00
|
|
|
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 23:51:46 +01:00
|
|
|
OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR \
|
2002-01-15 21:20:24 +01:00
|
|
|
LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC \
|
2002-01-16 03:37:37 +01:00
|
|
|
STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE \
|
c-common.c, [...]: Delete code implementing -traditional mode.
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h,
cppmacro.c, objc/lang-specs.h, objc/objc-act.c,
builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c,
gcc.c, toplev.c: Delete code implementing -traditional mode.
* ada/misc.c, ch/ch-tree.h, ch/decl.c, cp/decl2.c, f/com.c,
f/lex.c, f/top.c, java/builtins.c, java/decl.c: Delete
traditional-mode-related code copied from the C front end
but not used, or used only to permit the compiler to link.
* doc/bugreport.texi, doc/cpp.texi, doc/extend.texi,
doc/invoke.texi, doc/standards.texi, doc/trouble.texi:
Document removal of -traditional mode for compilation, and
remove documentation only relevant to that mode.
* config/nextstep.h, config/ptx4.h, config/svr4.h,
config/convex/convex.h, config/d30v/d30v.h,
config/i386/dgux.h, config/i386/osf1elf.h,
config/i386/osfelf.h, config/i386/osfrose.h,
config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h,
config/m68k/hp310.h, config/m88k/dgux.h,
config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/m88k/openbsd.h,
config/mips/abi64.h, config/mips/osfrose.h,
config/mips/svr4-5.h, config/mips/svr4-t.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
config/stormy16/stormy16.h: Remove all references to
-traditional from target specs. Delete all mention of the
no-longer-necessary TRADITIONAL_RETURN_FLOAT macro. Also
delete a couple of commented-out definitions of
DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring
to -traditional.
* system.h: Poison TRADITIONAL_RETURN_FLOAT.
* doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro.
* testsuite/gcc.c-torture/execute/920730-1t.c,
testsuite/gcc.c-torture/execute/920730-1t.x,
testsuite/gcc.dg/ext-glob.c: Delete test cases, only relevant
to -traditional.
From-SVN: r50110
2002-02-27 19:48:07 +01:00
|
|
|
SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH \
|
c-parse.in (MODIFIED_WCHAR_TYPE): New macro.
* c-parse.in (MODIFIED_WCHAR_TYPE): New macro.
(c_common_nodes_and_builtins): Use it.
(builtin_define_with_value): New function.
(cb_register_builtins): Define __SIZE_TYPE__,
__PTRDIFF_TYPE__, __WCHAR_TYPE__, and __WINT_TYPE__ here,
using builtin_define_with_value. Use consistent notation when
defining __GXX_WEAK__.
(WCHAR_TYPE_SIZE): Don't redefine.
(combine_strings): Don't use WCHAR_TYPE_SIZE.
* cppdefault.h: Don't provide defaults for SIZE_TYPE,
PTRDIFF_TYPE, WCHAR_TYPE, or WINT_TYPE.
* cppinit.c (builtin_array): Remove entries for __SIZE_TYPE__ etc.
* tradcpp.c (initialize_builtins): Likewise.
* gcc.c (cpp_unique_options): Don't muck with __WCHAR_TYPE__.
* c-lex.h (builtin_define_with_value): Prototype.
* system.h: Poison NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_WCHAR_TYPE,
NO_BUILTIN_PTRDIFF_TYPE, and NO_BUILTIN_WINT_TYPE.
* doc/tm.texi: Remove mention of NO_BUILTIN_SIZE_TYPE etc.
* config/avr/avr.h, config/h8300/h8300.h, config/i386/i386.h,
config/ia64/ia64.h, config/mips/dec-osf1.h, config/mips/iris6.h,
config/mips/linux.h, config/mips/mips.h, config/mips/netbsd.h,
config/mips/osfrose.h, config/mips/sni-svr4.h, config/rs6000/aix51.h,
config/s390/linux.h, config/sh/sh.h, config/sh/sh64.h,
config/sparc/linux64.h, config/sparc/netbsd-elf.h,
config/sparc/sol2-bi.h, config/sparc/sparc.h:
Do not define NO_BUILTIN_SIZE_TYPE etc. Remove all references
to __SIZE_TYPE__ etc from all spec strings. When this makes
extra specs empty, delete them.
From-SVN: r53472
2002-05-15 07:30:01 +02:00
|
|
|
TRADITIONAL_RETURN_FLOAT NO_BUILTIN_SIZE_TYPE \
|
system.h (BLOCK_PROFILER, [...]): Poison.
* system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE,
FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT,
MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison.
* toplev.c (display_help): Kill -a -ax help.
* config/1750a/1750a.h, config/alpha/alpha.h,
config/clipper/clipper.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i960/i960.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/vax/vax.h, config/we32k/we32k.h:
(FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Kill.
* libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill.
* config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill.
* config/i386/i386-protos.h (ix86_output_block_profiler): Kill.
(ix86_output_function_block_profiler): Kill.
* config/m68hc11/m68hc11.c (m68hc11_block_profiler): Kill.
(m68hc11_function_block_profiler): Kill.
* config/m68hc11/m68hc11-protos.h: Update.
* config/m88k/m88k.c (output_block_profiler): Kill.
(output_function_block_profiler): Kill.
* config/m88k/m88k-protos.h: Update.
From-SVN: r53617
2002-05-19 10:31:53 +02:00
|
|
|
NO_BUILTIN_PTRDIFF_TYPE NO_BUILTIN_WCHAR_TYPE NO_BUILTIN_WINT_TYPE \
|
|
|
|
BLOCK_PROFILER BLOCK_PROFILER_CODE FUNCTION_BLOCK_PROFILER \
|
|
|
|
FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE \
|
2002-07-23 23:58:57 +02:00
|
|
|
MACHINE_STATE_RESTORE SCCS_DIRECTIVE SECTION_ASM_OP \
|
2003-05-31 01:14:41 +02:00
|
|
|
ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL ASM_OUTPUT_INTERNAL_LABEL \
|
2003-06-01 21:44:22 +02:00
|
|
|
OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA ROUND_TYPE_SIZE \
|
2003-06-04 07:21:41 +02:00
|
|
|
ROUND_TYPE_SIZE_UNIT CONST_SECTION_ASM_OP CRT_GET_RFIB_TEXT \
|
|
|
|
DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
|
|
|
|
DBX_WORKING_DIRECTORY INSN_CACHE_DEPTH INSN_CACHE_SIZE \
|
2003-06-07 20:50:54 +02:00
|
|
|
INSN_CACHE_LINE_WIDTH INIT_SECTION_PREAMBLE NEED_ATEXIT ON_EXIT \
|
2003-08-23 20:03:06 +02:00
|
|
|
EXIT_BODY OBJECT_FORMAT_ROSE MULTIBYTE_CHARS MAP_CHARACTER \
|
2003-12-18 06:50:43 +01:00
|
|
|
LIBGCC_NEEDS_DOUBLE FINAL_PRESCAN_LABEL DEFAULT_CALLER_SAVES \
|
2003-12-20 02:40:41 +01:00
|
|
|
LOAD_ARGS_REVERSED MAX_INTEGER_COMPUTATION_MODE
|
2001-11-19 12:28:52 +01:00
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
/* Hooks that are no longer used. */
|
|
|
|
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
|
2003-08-04 22:44:20 +02:00
|
|
|
LANG_HOOKS_MARK_TREE LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES
|
2002-06-04 09:11:05 +02:00
|
|
|
|
2003-06-18 02:45:03 +02:00
|
|
|
/* Libiberty macros that are no longer used in GCC. */
|
|
|
|
#undef ANSI_PROTOTYPES
|
|
|
|
#undef PTR_CONST
|
|
|
|
#undef LONG_DOUBLE
|
|
|
|
#undef VPARAMS
|
|
|
|
#undef VA_OPEN
|
|
|
|
#undef VA_FIXEDARG
|
|
|
|
#undef VA_CLOSE
|
|
|
|
#undef VA_START
|
|
|
|
#pragma GCC poison ANSI_PROTOTYPES PTR_CONST LONG_DOUBLE VPARAMS VA_OPEN \
|
|
|
|
VA_FIXEDARG VA_CLOSE VA_START
|
2001-03-13 20:55:18 +01: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-10 05:20:03 +01:00
|
|
|
|
2001-03-28 06:05:46 +02:00
|
|
|
/* Note: not all uses of the `index' token (e.g. variable names and
|
|
|
|
structure members) have been eliminated. */
|
|
|
|
#undef bcopy
|
2001-03-10 23:35:01 +01:00
|
|
|
#undef bzero
|
|
|
|
#undef bcmp
|
|
|
|
#undef rindex
|
2001-03-28 06:05:46 +02: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-10 05:20:03 +01:00
|
|
|
|
|
|
|
#endif /* GCC >= 3.0 */
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
#endif /* ! GCC_SYSTEM_H */
|