From 3ba414b2c4f599de1a3834b7074c3d47ff746341 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Aug 2020 16:24:50 -0700 Subject: [PATCH] Work around ksh93 bug that broke config.status MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Use ‘>&1’, which is a no-op, to work around a bug in ksh93 Version JM 93t+ 2010-03-05 as used in OpenIndiana. The bug causes ‘printf "foo"’ to mistakenly succeed in some cases even though the underlying ‘write’ syscall fails. The ‘>&1’ causes the printf to fail, as it should. --- lib/autoconf/status.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index d2ab8235..dd2cb407 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -880,7 +880,7 @@ m4_define([_AC_OUTPUT_HEADER], # if test x"$ac_file" != x-; then { - AS_ECHO(["/* $configure_input */"]) \ + AS_ECHO(["/* $configure_input */"]) >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || AC_MSG_ERROR([could not create $ac_file]) @@ -892,7 +892,7 @@ m4_define([_AC_OUTPUT_HEADER], || AC_MSG_ERROR([could not create $ac_file]) fi else - AS_ECHO(["/* $configure_input */"]) \ + AS_ECHO(["/* $configure_input */"]) >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || AC_MSG_ERROR([could not create -]) fi -- 2.47.2