MSYS2-packages/autoconf2.69/0003-autotest-remove-cr-from-prog-stdout-stderr.patch
Christoph Reiter ffe62232cc Add back a autoconf2.69 package
Useful for rebuilding configure files when upstream only supports 2.69
2021-12-27 17:15:07 +01:00

33 lines
1.3 KiB
Diff

diff -urN autoconf-2.69.orig/lib/autotest/general.m4 autoconf-2.69/lib/autotest/general.m4
--- autoconf-2.69.orig/lib/autotest/general.m4 2014-08-05 00:03:28.681954400 +0100
+++ autoconf-2.69/lib/autotest/general.m4 2014-08-05 00:21:04.944082600 +0100
@@ -2149,6 +2149,19 @@
m4_define([AT_DIFF_STDOUT()],
[at_fn_diff_devnull "$at_stdout" || at_failed=:])
+# Adapted from:
+# https://lists.gnu.org/archive/html/libtool-commit/2009-01/msg00012.html
+# Removed the host_os check (this is either harmful or it isn't let's not
+# hedge our bets - when cross-compiling build_os could be mingw* and that
+# would failed the host_os test anyway) and also the optional RESULT-FILE
+# AT_UNIFY_NL(FILE)
+# -----------------------------------
+# Ensure (text) FILE has predictable line endings.
+# Convert in-place.
+m4_define([AT_UNIFY_NL],
+[tr -d '\015' < $1 > $1.t
+mv -f $1.t $1])
+
# _AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
# -------------------------------------------------
@@ -2192,6 +2205,8 @@
) >>"$at_stdout" 2>>"$at_stderr" AS_MESSAGE_LOG_FD>&-
at_status=$? at_failed=false
$at_check_filter
+AT_UNIFY_NL([$at_stderr])
+AT_UNIFY_NL([$at_stdout])
m4_ifdef([AT_DIFF_STDERR($4)], [m4_indir([AT_DIFF_STDERR($4)])],
[echo >>"$at_stderr"; AS_ECHO([["$4"]]) | \
$at_diff - "$at_stderr" || at_failed=:])