[PATCH] basic_filebuf: 45628 + non-modal I/O
David Krauss
potswa@mac.com
Wed Sep 22 00:42:00 GMT 2010
Per request, here is a combined patch making std::filebuf::seekoff not required between reads and writes (or vice versa), and also not to flush if it is called (the exception being when writing with active conversion).
Testcases included. Paolo, I lost track of your note to duplicate 4.cc and I modified it instead… is that OK? Also, I extended the 45628.cc submitted to the PR into two separate cases, for direct and codecvt buffering, each covering read and write states.
That turned up a bug in std::codecvt<__gnu_test::pod_uchar>, so I fixed it.
Finally, I deleted two testcases which do nothing except check that reading and writing can't be mixed without seekoff. Note that both remaining testcases for sync are questionable. In 9182-1.cc, sync is not specified to throw so the verified behavior is surprising and likely noncompliant. In 1057.cc, xsputn only calls overflow due to a series of coincidences, so the test is not truly passed.
Checked against trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 45628_nonmodal.log
Type: application/octet-stream
Size: 1307 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20100922/c8b42af8/attachment.obj>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 45628_nonmodal.patch
Type: application/octet-stream
Size: 18890 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20100922/c8b42af8/attachment-0001.obj>
-------------- next part --------------
More information about the Libstdc++
mailing list