Module Name: src Committed By: rillig Date: Sun Jul 4 05:49:20 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/usr.bin/xlint/lint1/main1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.48 src/usr.bin/xlint/lint1/main1.c:1.49 --- src/usr.bin/xlint/lint1/main1.c:1.48 Sat Jul 3 21:27:48 2021 +++ src/usr.bin/xlint/lint1/main1.c Sun Jul 4 05:49:20 2021 @@ -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 @@ main(int argc, char *argv[]) /* initialize output */ outopen(argv[1]); +#ifdef DEBUG + setvbuf(stdout, NULL, _IONBF, 0); +#endif if (dflag) setvbuf(stdout, NULL, _IONBF, 0); #ifdef YYDEBUG