Simon Josefsson <simon <at> josefsson.org> writes:
>
> I noticed an EOL problem on mingw and pushed the fix below.
You beat me to it; I noticed the same, but didn't have quite as large a patch.
>
> -tmpfiles="t-xalloc-die.tmp"
> +tmpout=t-xalloc-die.tmp-stderr
> +tmperr=t-xalloc-die.tmp-stdout
> +tmpfiles="$tmpout $tmperr ${tmpout}2 ${tmperr}2"
Do we really need ${tmpout}2?
>
> -compare - t-xalloc-die.tmp <<\EOF || { (exit 1); exit 1; }
> +cat $tmperr | tr -d '\015' > ${tmperr}2
Useless use of cat. Also, check for errors. Try:
tr -d '\015' < $tmperr > ${tmperr}2 || { (exit 1); exit 1; }
> +cat $tmpout | tr -d '\015' > ${tmpout}2
> +compare - ${tmpout}2 <<\EOF || { (exit 1); exit 1; }
> +EOF
> +
Pointless. If we expect the file to be empty, then there are no carriage
returns to strip. It is better to collapse these lines into one:
test ! -s $tmpout || { (exit 1); exit 1; }
Hmm, I'm really starting to like the idea of a common init script, so we can
just do "Exit 1" instead of "{ (exit 1); exit 1; }".
--
Eric Blake