Strange stream behaviour
Roman Belenov
rbelenov@yandex.ru
Mon Oct 8 07:26:00 GMT 2001
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.
More information about the Libstdc++
mailing list