This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Strange stream behaviour
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: Strange stream behaviour
- From: Roman Belenov <rbelenov at yandex dot ru>
- Date: 08 Oct 2001 18:24:04 +0400
- References: <uy9morg36.fsf@yandex.ru>
It seems that the problem can be fixed by defining
_GLIBCPP_AVOID_FSEEK for cygwin (at least my example works fine after
rebuilding libstdc++ with this macro defined); without it text mode
streams work incorrectly since in cygwin (and IMHO in most other
systems with nontrivial end-of-line conversions for text files)
seeking is guaranteed to work properly only for binary streams (it is
said explicitly in cygwin docs; MSDN has such statement for
Microsoft's runtime, so I guess Mingw port has similar problems). I'm
not sure whether this is enough to make high-level input work
correctly - it seems that seek is avoided only while reading one
character at a time; IMHO it must be avoided in all operations based
on sequental reading.
--
With regards, Roman.