summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-08-02 16:24:50 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-08-02 16:31:55 -0700
commit3ba414b2c4f599de1a3834b7074c3d47ff746341 (patch)
tree85cd35a93ebfc45abe13c3ce122bd6f35e987168
parent4178160225ba4337687c24870f0e1af93bb5822f (diff)
downloadautoconf-3ba414b2c4f599de1a3834b7074c3d47ff746341.tar.gz
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.
-rw-r--r--lib/autoconf/status.m44
1 files 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