From: Paul Eggert Date: Sun, 2 Aug 2020 23:24:50 +0000 (-0700) Subject: Work around ksh93 bug that broke config.status X-Git-Tag: v2.69c~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba414b2c4f599de1a3834b7074c3d47ff746341;p=thirdparty%2Fautoconf.git Work around ksh93 bug that broke config.status * 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. --- 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