diff options
Diffstat (limited to 'contrib/gcc/gencodes.c')
-rw-r--r-- | contrib/gcc/gencodes.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/contrib/gcc/gencodes.c b/contrib/gcc/gencodes.c index 8baf3b8..a3aa1fe 100644 --- a/contrib/gcc/gencodes.c +++ b/contrib/gcc/gencodes.c @@ -22,8 +22,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> #include "hconfig.h" +#ifdef __STDC__ +#include <stdarg.h> +#else +#include <varargs.h> +#endif +#include "system.h" #include "rtl.h" #include "obstack.h" @@ -33,15 +38,17 @@ struct obstack *rtl_obstack = &obstack; #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -extern void free (); -extern rtx read_rtx (); +char *xmalloc PROTO((unsigned)); +static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; +void fancy_abort PROTO((void)); -char *xmalloc (); -static void fatal (); -void fancy_abort (); +/* Define this so we can link with print-rtl.o to get debug_rtx function. */ +char **insn_name_ptr = 0; static int insn_code_number; +static void gen_insn PROTO((rtx)); + static void gen_insn (insn) rtx insn; @@ -77,11 +84,22 @@ xrealloc (ptr, size) } static void -fatal (s, a1, a2) - char *s; +fatal VPROTO ((char *format, ...)) { +#ifndef __STDC__ + char *format; +#endif + va_list ap; + + VA_START (ap, format); + +#ifndef __STDC__ + format = va_arg (ap, char *); +#endif + fprintf (stderr, "gencodes: "); - fprintf (stderr, s, a1, a2); + vfprintf (stderr, format, ap); + va_end (ap); fprintf (stderr, "\n"); exit (FATAL_EXIT_CODE); } |