$OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_m3_c,v 1.1 2004/01/04 22:35:01 espie Exp $
--- language/modula3/m3compiler/m3cc/gcc/m3.c.orig	2000-05-31 19:43:07.000000000 +0200
+++ language/modula3/m3compiler/m3cc/gcc/m3.c	2004-01-04 22:48:02.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);
 
