This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/13333] [cygwin] fstream tell/seek bug with DOS-format text files


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]