Module Name: src Committed By: rillig Date: Mon Dec 21 02:09:34 UTC 2020
Modified Files: src/usr.bin/make: parse.c Log Message: make(1): fix garbled output for failed shell command (since 2020-12-20) Passing a struct as printf argument for the %s conversion doesn't work. On NetBSD-8.0-x86_64, the output looks normal, but on SunOS-5.9, the output is garbled, containing bytes 0xFF and 0xFE. This bug had been introduced in parse.c 1.507 from 2020-12-20 14:52:16. Thanks to sjg for finding this bug so quickly. To generate a diff of this commit: cvs rdiff -u -r1.508 -r1.509 src/usr.bin/make/parse.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/make/parse.c diff -u src/usr.bin/make/parse.c:1.508 src/usr.bin/make/parse.c:1.509 --- src/usr.bin/make/parse.c:1.508 Sun Dec 20 18:23:24 2020 +++ src/usr.bin/make/parse.c Mon Dec 21 02:09:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -117,7 +117,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $"); /* types and constants */ @@ -1980,7 +1980,7 @@ VarAssign_EvalShell(const char *name, co *out_avalue = FStr_InitOwn(cmdOut); if (errfmt != NULL) - Parse_Error(PARSE_WARNING, errfmt, cmd); + Parse_Error(PARSE_WARNING, errfmt, cmd.str); FStr_Done(&cmd); }