kill varargs, restore build with gcc3

This commit is contained in:
espie 2004-01-04 18:04:28 +00:00
parent 53c6135c1b
commit 4f9c93dbff
2 changed files with 66 additions and 10 deletions

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_config_i386_i386_c,v 1.1.1.1 2002/02/23 12:30:18 naddy Exp $
--- language/modula3/m3compiler/m3cc/gcc/config/i386/i386.c.orig Thu Feb 6 22:32:29 1997
+++ language/modula3/m3compiler/m3cc/gcc/config/i386/i386.c Fri Sep 7 17:49:46 2001
$OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_config_i386_i386_c,v 1.2 2004/01/04 18:04:28 espie Exp $
--- language/modula3/m3compiler/m3cc/gcc/config/i386/i386.c.orig 2000-11-24 22:21:19.000000000 +0100
+++ language/modula3/m3compiler/m3cc/gcc/config/i386/i386.c 2004-01-04 18:27:05.000000000 +0100
@@ -1785,7 +1785,7 @@ function_prologue (file, size)
xops[1] = pic_label_rtx;
@ -43,16 +43,16 @@ $OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_config_i386_i386_c,v 1.1.1.
gen_rtx (CONST_INT, Pmode, CODE_LABEL_NUMBER (xops[1]))));
}
}
@@ -2805,6 +2813,12 @@ print_operand (file, x, code)
case '*':
if (USE_STAR)
@@ -2807,6 +2815,12 @@ print_operand (file, x, code)
putc ('*', file);
+ return;
+
return;
+ case '_':
+#ifdef YES_UNDERSCORES
+ putc ('_', file);
+#endif
return;
+ return;
+
case 'L':
PUT_OP_SIZE (code, 'l', file);
return;

View File

@ -0,0 +1,56 @@
$OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_m3_c,v 1.1 2004/01/04 18:04:28 espie Exp $
--- language/modula3/m3compiler/m3cc/gcc/m3.c.orig 2004-01-04 18:28:26.000000000 +0100
+++ language/modula3/m3compiler/m3cc/gcc/m3.c 2004-01-04 18:30:48.000000000 +0100
@@ -27,7 +27,7 @@
-#include <varargs.h>
+#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
@@ -991,21 +991,16 @@ static int current_dbg_type_count1;
static int current_dbg_type_count2;
static int current_dbg_type_count3;
-static void debug_tag (kind, id, va_alist)
- char kind;
- char *id;
- va_dcl
+static void debug_tag(char kind, char *id, const char *fmt, ...)
{
va_list args;
- char *fmt;
- va_start (args);
+ va_start (args, fmt);
current_dbg_type_tag [0] = 'M';
current_dbg_type_tag [1] = kind;
current_dbg_type_tag [2] = '_';
memcpy (current_dbg_type_tag + 3, id, UID_SIZE);
- fmt = va_arg (args, char *);
vsprintf (current_dbg_type_tag + UID_SIZE + 3, fmt, args);
va_end (args);
}
@@ -1031,17 +1026,13 @@ static void debug_field (name)
#define debug_field_id debug_field
-static void debug_field_fmt (id, va_alist)
- char *id;
- va_dcl
+static void debug_field_fmt (char *id, const char *fmt, ...)
{
va_list args;
char name [100];
- char *fmt;
memcpy (name, id, UID_SIZE);
- va_start (args);
- fmt = va_arg (args, char *);
+ va_start (args, fmt);
vsprintf (name + UID_SIZE, fmt, args);
va_end (args);