freebsd-ports/lang/pm3-base/files/patch-m3.c.diff
Edwin Groothuis fc665b1884 Unbreak port: lang/pm3-base
Unbreak pm3-base:
	* extend files/patch-l1 and files/patch-l2 to match gethostname(3)
	  prototype on 5.x and above
	* add patch for language/modula3/m3compiler/m3cc/gcc/m3.c to make it use
	  stdarg.h instead of varargs.h

PR:		ports/85038
Submitted by:	Vasil Dimov <vd@datamax.bg>
2005-10-16 06:15:36 +00:00

48 lines
1.1 KiB
Diff

--- language/modula3/m3compiler/m3cc/gcc/m3.c.orig Wed Aug 17 12:34:10 2005
+++ language/modula3/m3compiler/m3cc/gcc/m3.c Wed Aug 17 12:52:49 2005
@@ -27,7 +27,7 @@
-#include <varargs.h>
+#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
@@ -991,15 +991,12 @@
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, ...)
{
va_list args;
char *fmt;
- va_start (args);
+ va_start (args, id);
current_dbg_type_tag [0] = 'M';
current_dbg_type_tag [1] = kind;
current_dbg_type_tag [2] = '_';
@@ -1031,16 +1028,14 @@
#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, ...)
{
va_list args;
char name [100];
char *fmt;
memcpy (name, id, UID_SIZE);
- va_start (args);
+ va_start (args, id);
fmt = va_arg (args, char *);
vsprintf (name + UID_SIZE, fmt, args);
va_end (args);