1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/cad/mars/files/patch-05
Oliver Lehmann a3db16f20d fix patchfile
Noted By:	chris
2004-01-23 18:23:56 +00:00

41 lines
848 B
Plaintext

--- sim/log.c.orig Wed Oct 7 04:52:51 1992
+++ sim/log.c Tue Dec 9 19:59:48 2003
@@ -23,7 +23,7 @@
#include "packet.h"
#include "event.h"
#include "log.h"
-#include <varargs.h>
+#include <stdarg.h>
#ifdef DEBUG
extern Log debug_log;
@@ -59,13 +59,7 @@
/* Debugging log-- writes name of component along with message */
/*VARARGS4*/
/*dbg_write(l, level, c, format, args)*/
-dbg_write(l, level, c, format, va_alist)
- Log l;
- int level;
- Component *c;
- char *format;
- va_dcl
-
+dbg_write(Log l, int level, Component *c, char *format, ... )
{
va_list p;
@@ -79,8 +73,12 @@
}
/* Add the time */
fprintf(l, "%d ", ev_now());
- va_start(p);
+ va_start(p, format);
+#ifdef __FreeBSD__
+ vfprintf(l, format, p);
+#else
_doprnt(format, p, l);
+#endif
va_end(p);
fputs("\n\0", l);
fflush(l);