Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 603B81A9213 for ; Tue, 7 Jul 2020 10:40:48 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id E13F084DA1; Tue, 7 Jul 2020 10:40:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6494D84D9E for ; Tue, 7 Jul 2020 10:40:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id YylZppSiJhrf for ; Tue, 7 Jul 2020 10:40:46 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id AC6F384D8D for ; Tue, 7 Jul 2020 10:40:46 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 9F25FFB28; Tue, 7 Jul 2020 10:40:46 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 7 Jul 2020 10:40:46 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-9] src/usr.bin/m4 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200707104046.9F25FFB28@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Tue Jul 7 10:40:46 UTC 2020 Modified Files: src/usr.bin/m4 [netbsd-9]: extern.h m4.1 main.c trace.c Log Message: Pull up following revision(s) (requested by uwe in ticket #981): usr.bin/m4/m4.1: revision 1.28 usr.bin/m4/m4.1: revision 1.29 usr.bin/m4/extern.h: revision 1.20 usr.bin/m4/main.c: revision 1.49 usr.bin/m4/m4.1: revision 1.30 usr.bin/m4/trace.c: revision 1.9 usr.bin/m4/main.c: revision 1.50 Try not to lose error output with --error-output. Try to avoid the trap we set up ourselves while avoiding freopen(3). When exit flushes and closes open streams it may close sfp first and when it comes about to flush and close stderr, the descriptor is already gone and we lose any buffered error output. This actually happens on some hosts, breaking --trace output used by autoconf. Fix --error-output to be more like GNU m4. GNU m4 --error-output is the same as -o despite the name. It does NOT affect warnings, error messages, and 'errprint' output so drop the misguided bit of code that tried to freopen stderr without closing it on failure. Drop -e (which was our local invention) and make merge --error-output with -o so that both set traceout. Make trace_file() preserve the old traceout on error and return error status so that the caller can emit appropriate warning. Do not yet support disabling tracing with an empty name, the rest of the code is not ready, we don't do -o positionally and we don't have `debugfile'. Fix --error-output to be more like GNU m4. It's a long version of -o. Bump date for previous. Use a date that is actually a real date. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.18.1 src/usr.bin/m4/extern.h cvs rdiff -u -r1.27 -r1.27.18.1 src/usr.bin/m4/m4.1 cvs rdiff -u -r1.48 -r1.48.2.1 src/usr.bin/m4/main.c cvs rdiff -u -r1.8 -r1.8.34.1 src/usr.bin/m4/trace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.