From e60d1db958400a7de46892b70c1a5cc1f192ec3d Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 1 Jul 2007 18:00:00 +0000 Subject: [PATCH] use binmode to fix on UWIN --- check.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/check.pl b/check.pl index 30dc69b..684db44 100644 --- a/check.pl +++ b/check.pl @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.pl,v 1.10 2007/02/13 12:59:03 tg Exp $ +# $MirOS: src/bin/mksh/check.pl,v 1.11 2007/07/01 18:00:00 tg Exp $ # $OpenBSD: th,v 1.12 2005/05/28 04:53:47 millert Exp $ #- # Example test: @@ -361,6 +361,7 @@ process_test_file print STDERR "$prog: can't open $file - $!\n"; return undef; } + binmode(IN); while (1) { $ret = &read_test($file, IN, *test); last if !defined $ret || !$ret; @@ -474,14 +475,17 @@ run_test print STDERR "$prog: couldn't open $ifile in child - $!\n"; kill('TERM', $$); } + binmode(STDIN); if (!open(STDOUT, "> $tempo")) { print STDERR "$prog: couldn't open $tempo in child - $!\n"; kill('TERM', $$); } + binmode(STDOUT); if (!open(STDERR, "> $tempe")) { print STDOUT "$prog: couldn't open $tempe in child - $!\n"; kill('TERM', $$); } + binmode(STDERR); if ($program_kludge) { @argv = split(' ', $test_prog); } else { @@ -661,6 +665,7 @@ write_file print STDERR "$prog: can't open $file - $!\n"; return undef; } + binmode(TEMP); print TEMP $str; if (!close(TEMP)) { print STDERR "$prog: error writing $file - $!\n"; @@ -681,6 +686,7 @@ check_output print STDERR "$prog:$name($what): couldn't open $file after running program - $!\n"; return undef; } + binmode(TEMP); while () { $got .= $_; }