Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: sync stdout and stderr when compil...
details: https://anonhg.NetBSD.org/src/rev/ea8505dc5001
branches: trunk
changeset: 984339:ea8505dc5001
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 04 05:49:20 2021 +0000
description:
lint: sync stdout and stderr when compiled in debug mode
If lint is compiled with -DDEBUG, its debug output goes to stdout, no
matter whether the option -d is given or not.
diffstat:
usr.bin/xlint/lint1/main1.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r d8c2eb4dd508 -r ea8505dc5001 usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c Sun Jul 04 01:28:54 2021 +0000
+++ b/usr.bin/xlint/lint1/main1.c Sun Jul 04 05:49:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main1.c,v 1.48 2021/07/03 21:27:48 rillig Exp $ */
+/* $NetBSD: main1.c,v 1.49 2021/07/04 05:49:20 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main1.c,v 1.48 2021/07/03 21:27:48 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.49 2021/07/04 05:49:20 rillig Exp $");
#endif
#include <sys/types.h>
@@ -254,6 +254,9 @@
/* initialize output */
outopen(argv[1]);
+#ifdef DEBUG
+ setvbuf(stdout, NULL, _IONBF, 0);
+#endif
if (dflag)
setvbuf(stdout, NULL, _IONBF, 0);
#ifdef YYDEBUG
Home |
Main Index |
Thread Index |
Old Index