]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Work around ksh93 bug that broke config.status
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Aug 2020 23:24:50 +0000 (16:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Aug 2020 23:31:55 +0000 (16:31 -0700)
* 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

index d2ab823591936f6c22b9325e86a299d82f020d6f..dd2cb40795709ed2620457c3d7232b14c4cd8c63 100644 (file)
@@ -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