+2008-10-27 Eric Blake <ebb9@byu.net>
+
+ Use read, rather than `cat`, for safe one-line files.
+ * lib/autotest/general.m4 (AT_CLEANUP): Avoid a fork, since it is
+ known that the file has only one line and no \.
+ * lib/autoconf/general.m4 (_AC_COMPUTE_INT_RUN): Likewise.
+
2008-10-27 Paolo Bonzini <bonzini@gnu.org>
* lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE,
# [IF-FAILURE])
# -----------------------------------------------------------------
# Store the evaluation of the integer EXPRESSION in VARIABLE.
+#
+# AC_LANG_INT_SAVE intentionally does not end the file in a newline, so
+# we must add one to make it a text file before passing it to read.
m4_define([_AC_COMPUTE_INT_RUN],
[_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
- [AS_VAR_SET([$2], [`cat conftest.val`]); $4], [$5])
+ [echo >>conftest.val; read $2 <conftest.val; $4], [$5])
rm -f conftest.val
])# _AC_COMPUTE_INT_RUN
[ac_retval=0], [ac_retval=1])
else
_AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4],
- [ac_retval=0], [ac_retval=1])
+ [ac_retval=0], [ac_retval=1])
fi
AS_LINENO_POP
return $ac_retval
$at_traceoff
$at_times_p && times >"$at_times_file"
) AS_MESSAGE_LOG_FD>&1 2>&1 | eval $at_tee_pipe
-at_status=`cat "$at_status_file"`
+read at_status <"$at_status_file"
[#AT_STOP_]AT_ordinal
m4_divert_pop([TEST_GROUPS])dnl Back to KILL.
])# AT_CLEANUP