The bash-20101229 snapshot introduced an attempt to incorporate some patches that were previously used downstream by Cygwin with regards to managing scripts read with O_TEXT mode (where lseek() sees different offsets than the number of bytes read, because the system is converting physical '\r\n' into logical '\n'). But it introduced a typo, using O_TEXT where it meant to use B_TEXT, with the result that scripts read in text mode would seek to the wrong location.
Thanks to Jeff Downs for helping me find the typo. Signed-off-by: Eric Blake <ebl...@redhat.com> --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input.c b/input.c index 2a9ca26..308b87e 100644 --- a/input.c +++ b/input.c @@ -205,7 +205,7 @@ make_buffered_stream (fd, buffer, bufsize) if (bufsize == 1) bp->b_flag |= B_UNBUFF; if (O_TEXT && (fcntl (fd, F_GETFL) & O_TEXT) != 0) - bp->b_flag |= O_TEXT; + bp->b_flag |= B_TEXT; return (bp); } -- 2.4.3