[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/src/Attic/debug.c,v [branch-1_4]
From: |
Eric Blake |
Subject: |
Changes to m4/src/Attic/debug.c,v [branch-1_4] |
Date: |
Fri, 18 Aug 2006 23:11:38 +0000 |
CVSROOT: /sources/m4
Module name: m4
Branch: branch-1_4
Changes by: Eric Blake <ericb> 06/08/18 23:11:37
Index: src/debug.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/debug.c,v
retrieving revision 1.1.1.1.2.7
retrieving revision 1.1.1.1.2.8
diff -u -b -r1.1.1.1.2.7 -r1.1.1.1.2.8
--- src/debug.c 8 Aug 2006 23:17:44 -0000 1.1.1.1.2.7
+++ src/debug.c 18 Aug 2006 23:11:36 -0000 1.1.1.1.2.8
@@ -21,13 +21,8 @@
#include "m4.h"
-#include <sys/stat.h>
-
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include <sys/stat.h>
/* File for debugging output. */
FILE *debug = NULL;
@@ -203,6 +198,9 @@
if (fp == NULL)
return FALSE;
+ if (set_cloexec_flag (fileno (fp), true) != 0)
+ M4ERROR ((warning_status, errno,
+ "Warning: cannot protect debug file across forks"));
debug_set_file (fp);
}
return TRUE;
@@ -237,17 +235,9 @@
| left quote) and %r (optional right quote). |
`---------------------------------------------------------------------*/
-#ifdef __STDC__
static void
trace_format (const char *fmt, ...)
-#else
-static void
-trace_format (...)
-#endif
{
-#ifndef __STDC__
- const char *fmt;
-#endif
va_list args;
char ch;
@@ -257,12 +247,7 @@
int slen;
int maxlen;
-#ifdef __STDC__
va_start (args, fmt);
-#else
- va_start (args);
- fmt = va_arg (args, const char *);
-#endif
while (TRUE)
{