aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/libio/genops.c
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2000-08-09 07:33:39 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2000-08-09 07:33:39 +0000
commit8901ac210e5857b0a957f1bcee9906e0fb8fa707 (patch)
tree810fd814c4d1fcc52243e90ea7ac6ac2416bdda2 /libstdc++-v3/libio/genops.c
parent5c614849364bcaa926bf2017a69ac6569a14dfa0 (diff)
downloadgcc-8901ac210e5857b0a957f1bcee9906e0fb8fa707.zip
gcc-8901ac210e5857b0a957f1bcee9906e0fb8fa707.tar.gz
gcc-8901ac210e5857b0a957f1bcee9906e0fb8fa707.tar.bz2
[multiple changes]
2000-08-09 Benjamin Kosnik <bkoz@purist.soma.redhat.com> Preliminary wchar_t implementation, with trivial encodings. * docs/configopts.html: Add bits about canonical configure option checking. * testsuite/27_io/iostream_objects.cc: Replace this file (which has newly-declared-illegal mixing of wide/narrow stdstreams) with... * testsuite/27_io/narrow_stream_objects.cc: New file. * testsuite/27_io/wide_stream_objects.cc: New file. * bits/fstream.tcc (underflow): Temporarily hack a solution together that writes from the external file to the internal buffers. This removes codecvt from the loop, and is incorrect. (_M_really_overflow): Same here. * testsuite/21_strings/inserters_extractors.cc (test05): Tweaks. 2000-08-08 Benjamin Kosnik <bkoz@cygnus.com> Ulrich Drepper <drepper@cygnus.com> * config/c_io_libio.h: Tweak. * config/c_io_libio_codecvt.c: New file. * libio/Makefile.am: Add c_codecvt.c. * libio/Makefile.in: Regenerate. * libio/genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the stream is not orientated. * acinclude.m4: Add config/c_io_libio_codecvt.c dummy file, until encoding gets fleshed out. * bits/basic_file.h: Add specialization declarations. * config/c_io_libio.cc: Add specializations for pbackfail, uflow. * config/c_io_libio.h: Add __c_wfile_type. * bits/basic_file.h: Add _M_wfile. * config/c_io_libio.cc (__basic_file<char>): Initialize the streams without setting the orientation of the underlying FILE to either wide or narrow. (__basic_file<wchar_t>)): Enable tricky wchar_t io bits. From-SVN: r35584
Diffstat (limited to 'libstdc++-v3/libio/genops.c')
-rw-r--r--libstdc++-v3/libio/genops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/libio/genops.c b/libstdc++-v3/libio/genops.c
index 281bab0..5d8f520 100644
--- a/libstdc++-v3/libio/genops.c
+++ b/libstdc++-v3/libio/genops.c
@@ -783,7 +783,9 @@ _IO_unbuffer_write ()
for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
if (! (fp->_flags & _IO_UNBUFFERED)
&& (! (fp->_flags & _IO_NO_WRITES)
- || (fp->_flags & _IO_IS_APPENDING)))
+ || (fp->_flags & _IO_IS_APPENDING))
+ /* Iff stream is un-orientated, it wasn't used. */
+ && fp->_mode != 0)
_IO_SETBUF (fp, NULL, 0);
}