This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13333] [cygwin] fstream tell/seek bug with DOS-format text files
- From: "dannysmith at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Dec 2003 19:23:53 -0000
- Subject: [Bug libstdc++/13333] [cygwin] fstream tell/seek bug with DOS-format text files
- References: <20031206104213.13333.sgm@objexx.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dannysmith at gcc dot gnu dot org 2003-12-06 19:23 -------
There is a way to fix this for a mingw build of libstdc++: Replace the io
model currently used (basic_file_stdio) with a 'basic_file_win32' model.
That would probably mean using win32 api file io calls directly (these do not
distinguish between binary and text) and handling the '/r/n' <-> '/n'
translation ouselves.
Guess what. Nobody has volunteered to do this. I had a start once but it
gradually slid down the priority list.
One thing you can do to make binary mode the default for file opens is to
add the file mingw/lib/binmode.o to your list of objects when linking.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13333