harden the crlf vs lf tests even more; use binary mode explicitly on OS/2

This commit is contained in:
tg
2015-07-09 20:52:43 +00:00
parent dcd8b6389b
commit edf76ec8e6
10 changed files with 80 additions and 43 deletions

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.279 2015/07/09 20:20:42 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.280 2015/07/09 20:52:39 tg Exp $");
#if HAVE_KILLPG
/*
@ -3668,7 +3668,7 @@ c_cat(const char **wp)
fn = *wp++;
if (ksh_isdash(fn))
fd = STDIN_FILENO;
else if ((fd = open(fn, O_RDONLY | O_BINARY)) < 0) {
else if ((fd = binopen2(fn, O_RDONLY)) < 0) {
eno = errno;
bi_errorf("%s: %s", fn, cstrerror(eno));
rv = 1;