Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/m4 Explain what REDIRECT is for.
details: https://anonhg.NetBSD.org/src/rev/61a8c68e69bc
branches: trunk
changeset: 813278:61a8c68e69bc
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 23 14:24:43 2016 +0000
description:
Explain what REDIRECT is for.
diffstat:
usr.bin/m4/main.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r cb1e4a48acb1 -r 61a8c68e69bc usr.bin/m4/main.c
--- a/usr.bin/m4/main.c Sat Jan 23 14:03:48 2016 +0000
+++ b/usr.bin/m4/main.c Sat Jan 23 14:24:43 2016 +0000
@@ -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");
Home |
Main Index |
Thread Index |
Old Index