PATCH: Avoid excessive flushing on lower-layer handle
Loren James Rittle
Tue Apr 23 14:57:00 GMT 2002
In article <firstname.lastname@example.org>,
Jason Merrill <email@example.com> writes:
>> + else
>> + _M_file.sync();
> Shouldn't this be unconditional? i.e. drop the "else"?
If we change the behavior of _M_really_overflow and callers of
_M_really_overflow, then it should be unconditional.
>> ! else if (!_M_file.sync())
> Why do we need an fflush here at all?
Because callers of _M_really_overflow(eof) expect to learn of flush
>> If the user must now flush to switch modes, this should always be a safe
> My patch didn't change that; that will be a later, trunk-only patch. But I
> think your change is still safe.
Based on your questions, you seem to desire the more extensive patch
to change callers of _M_really_overflow().
I will post it for comment.
More information about the Libstdc++