@@ -1,5 +1,5 @@
/* $OpenBSD: main.c,v 1.77 2009/10/14 17:19:47 sthen Exp $ */
-/* $NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $ */
+/* $NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
#include "nbtool_config.h"
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $");
#include <assert.h>
#include <signal.h>
#include <getopt.h>
@@ -325,6 +325,11 @@
}
#ifdef REDIRECT
+ /*
+ * This is meant only for debugging; it makes all output
+ * go to a known file, even if the command line options
+ * send it elsewhere. It should not be turned of in production code.
+ */
if (freopen("/tmp/m4", "w+", stderr) == NULL)
err(EXIT_FAILURE, "Can't redirect errors to `%s'",
"/tmp/m4");