Fix get-data-txt-importcases.sh test on Mingw. fc11-i386-build24 lenny-x64-build45 sid-i386-build92
authorBen Pfaff <blp@gnu.org>
Sat, 17 Oct 2009 23:46:21 +0000 (16:46 -0700)
committerBen Pfaff <blp@gnu.org>
Sat, 17 Oct 2009 23:46:21 +0000 (16:46 -0700)
commitb9f77673d45b465987304c76d80b29fba893a93a
treee382af9c273e8ddcf955fbaa1f94526b7303d742
parent47ccfee48be2d073a32f0c5f7c21bc8ae55f195c
Fix get-data-txt-importcases.sh test on Mingw.

On Mingw, ftell() and ftello() are unreliable when used on text files with
plain LF line endings:
    http://article.gmane.org/gmane.comp.gnu.m4.bugs/2224

This made the get-data-txt-importcases.sh test fail, because
dfm_get_percent_read() that it depends upon to determine the percentage of
the file that has been read uses ftello().  The solution is to always open
the text file as a binary file.  According to my audit of the ways that
the text file is read, this should not cause other problems.  In
particular, ds_read_line() handles both LF and CR-LF line endings.  But it
cannot handle negative effects on Unix platforms anyway, since they do not
distinguish text and binary modes.
src/language/data-io/data-reader.c