RFC: basic_filebuf supporting non-modal I/O without seekpos

David Krauss potswa@mac.com
Sun Sep 19 19:40:00 GMT 2010


On Sep 19, 2010, at 11:52 AM, Paolo Carlini wrote:

> On 09/19/2010 06:41 PM, Paolo Carlini wrote:
>> if seeks would become redundant in order to switch from reads to writes and viceversa, I expect that after your draft patch fixing 45628 would be just matter of *simplifying* _M_seek, that would be great. Is it correct?
>> 
> ... at least for the case that matters for mode switching that is, (0,
> cur), or it can be treated again as part of seekoff and hacing open mode
> in | out should not cause troubles anymore.

I don't really follow. I wouldn't fix 45628 any differently given this patch or not. I gave _M_get_ext_pos the by-reference __state argument specifically so these patches could be merged. I haven't considered changing _M_seek at all — I think that function is semantically clean. The patch I submitted for 45628 does bypass _M_seek and calls _M_file.seekoff(0, ios_base::cur) directly, if that's what you mean.

Having gotten more familiar with the code, I think I can make a slightly more elegant patch for 45628 (adjusting the __dummy_state variable), if you would like another submission. Hmm, looking at that patch, half of it seems to *require* the modality issue to be resolved. Should I resubmit after this patch is applied? What's the plan?

I don't understand the linker script issue, or really what .tcc files do at all. Do we have to add entries to the baseline_symbols.txt for every platform? What's the impact?

As for the changelog entry:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filebuf_nonmodal.clog
Type: application/octet-stream
Size: 435 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20100919/7ccc7403/attachment.obj>
-------------- next part --------------


	- D


More information about the Libstdc++ mailing list