This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: unbuffered input


On Wed, May 22, 2002 at 01:50:47AM +0200, David Rasmussen wrote:
> So, will I have to file a problem report? When do you think this will be 
> fixed, and more importantly, is there some sort of quick fix, either a 
> workaround, or maybe a patch that will actually make the buffer work 
> correctly?

PRs are good in any case, both to provide a record of what happens, and
to make certain we don't forget to fix anything.

There is no quick fix that I can think of.  The problem is in the 'if'
conditions being tested in the std::basic_filebuf::setbuf() function,
in bits/fstream.tcc, line 460-ish.  We want to take the first branch,
instead we take neither branch.  The call to is_open should be replaced.

There is no has_this_buffer_done_any_IO_yet function, but if there were,
that's what should be called instead.  I haven't looked any further.

If you file the PR, you get the added bonus of being instantly notified
as soon as it's fixed.  :-)

Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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