diff options
Diffstat (limited to 'gcc/genopinit.c')
-rw-r--r-- | gcc/genopinit.c | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 1d4c0a4b76f..1558c221329 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -1,5 +1,5 @@ /* Generate code to initialize optabs from machine description. - Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -19,11 +19,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> #include "hconfig.h" +#include "system.h" #include "rtl.h" #include "obstack.h" -#include <ctype.h> static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -31,11 +30,18 @@ struct obstack *rtl_obstack = &obstack; #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -extern void free (); + extern rtx read_rtx (); char *xmalloc (); -static void fatal (); + +#ifdef HAVE_VPRINTF +void fatal PVPROTO((char *, ...)); +#else +/* We must not provide any prototype here, even if ANSI C. */ +void fatal PROTO(()); +#endif + void fancy_abort (); /* Many parts of GCC use arrays that are indexed by machine mode and @@ -306,7 +312,30 @@ xrealloc (ptr, size) return result; } -static void +#ifdef HAVE_VPRINTF +void +fatal VPROTO((char *s, ...)) +{ +#ifndef ANSI_PROTOTYPES + char *s; +#endif + va_list ap; + + VA_START (ap, s); + +#ifndef ANSI_PROTOTYPES + s = va_arg (ap, char *); +#endif + + fprintf (stderr, "genopinit: "); + vfprintf (stderr, s, ap); + va_end (ap); + fprintf (stderr, "\n"); + exit (FATAL_EXIT_CODE); +} +#else /* not HAVE_VPRINTF */ + +void fatal (s, a1, a2) char *s; { @@ -315,6 +344,7 @@ fatal (s, a1, a2) fprintf (stderr, "\n"); exit (FATAL_EXIT_CODE); } +#endif /* not HAVE_VPRINTF */ /* More 'friendly' abort that prints the line and file. config.h can #define abort fancy_abort if you like that sort of thing. */ @@ -354,7 +384,7 @@ main (argc, argv) from the machine description file `md'. */\n\n"); printf ("#include \"config.h\"\n"); - printf ("#include <stdio.h>\n"); + printf ("#include \"system.h\"\n"); printf ("#include \"rtl.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"insn-flags.h\"\n"); |