in */test/main.c.
Use a copy of ap for second calling vfprintf().
SVN-Revision: 1755
static void
vlogprintf(const char *fmt, va_list ap)
{
+#ifdef va_copy
+ va_list lfap;
+ va_copy(lfap, ap);
+#endif
if (log_console)
vfprintf(stdout, fmt, ap);
if (logfile != NULL)
+#ifdef va_copy
+ vfprintf(logfile, fmt, lfap);
+ va_end(lfap);
+#else
vfprintf(logfile, fmt, ap);
+#endif
}
static void
static void
vlogprintf(const char *fmt, va_list ap)
{
+#ifdef va_copy
+ va_list lfap;
+ va_copy(lfap, ap);
+#endif
if (log_console)
vfprintf(stdout, fmt, ap);
if (logfile != NULL)
+#ifdef va_copy
+ vfprintf(logfile, fmt, lfap);
+ va_end(lfap);
+#else
vfprintf(logfile, fmt, ap);
+#endif
}
static void
static void
vlogprintf(const char *fmt, va_list ap)
{
+#ifdef va_copy
+ va_list lfap;
+ va_copy(lfap, ap);
+#endif
if (log_console)
vfprintf(stdout, fmt, ap);
if (logfile != NULL)
+#ifdef va_copy
+ vfprintf(logfile, fmt, lfap);
+ va_end(lfap);
+#else
vfprintf(logfile, fmt, ap);
+#endif
}
static void