diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-01 16:01:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-01 16:01:04 -0700 |
commit | 00c2e03551a61ca76bdb303f1c007845f8a6dbd6 (patch) | |
tree | 51a3fb38eff156561441960606533fd0c1be71df /system/lib/libcxx/iostream.cpp | |
parent | 36600f34ef0ec2cf75165be3753567e256f514db (diff) | |
parent | 2787d1f7d01afb598ed56c4d52dab876e0a34a74 (diff) |
Merge pull request #1009 from waywardmonkeys/another-libcxx-update1.3.6
Another libcxx update
Diffstat (limited to 'system/lib/libcxx/iostream.cpp')
-rw-r--r-- | system/lib/libcxx/iostream.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/system/lib/libcxx/iostream.cpp b/system/lib/libcxx/iostream.cpp index f5b959b4..7fc71df4 100644 --- a/system/lib/libcxx/iostream.cpp +++ b/system/lib/libcxx/iostream.cpp @@ -13,6 +13,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +static mbstate_t state_types[6] = {}; + _ALIGNAS_TYPE (__stdinbuf<char> ) static char __cin [sizeof(__stdinbuf <char>)]; _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)]; _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)]; @@ -33,17 +35,17 @@ ios_base::Init __start_std_streams; ios_base::Init::Init() { - istream* cin_ptr = ::new(cin) istream(::new(__cin) __stdinbuf <char>(stdin) ); - ostream* cout_ptr = ::new(cout) ostream(::new(__cout) __stdoutbuf<char>(stdout)); - ostream* cerr_ptr = ::new(cerr) ostream(::new(__cerr) __stdoutbuf<char>(stderr)); + istream* cin_ptr = ::new(cin) istream(::new(__cin) __stdinbuf <char>(stdin, state_types+0) ); + ostream* cout_ptr = ::new(cout) ostream(::new(__cout) __stdoutbuf<char>(stdout, state_types+1)); + ostream* cerr_ptr = ::new(cerr) ostream(::new(__cerr) __stdoutbuf<char>(stderr, state_types+2)); ::new(clog) ostream(cerr_ptr->rdbuf()); cin_ptr->tie(cout_ptr); _VSTD::unitbuf(*cerr_ptr); cerr_ptr->tie(cout_ptr); - wistream* wcin_ptr = ::new(wcin) wistream(::new(__wcin) __stdinbuf <wchar_t>(stdin) ); - wostream* wcout_ptr = ::new(wcout) wostream(::new(__wcout) __stdoutbuf<wchar_t>(stdout)); - wostream* wcerr_ptr = ::new(wcerr) wostream(::new(__wcerr) __stdoutbuf<wchar_t>(stderr)); + wistream* wcin_ptr = ::new(wcin) wistream(::new(__wcin) __stdinbuf <wchar_t>(stdin, state_types+3) ); + wostream* wcout_ptr = ::new(wcout) wostream(::new(__wcout) __stdoutbuf<wchar_t>(stdout, state_types+4)); + wostream* wcerr_ptr = ::new(wcerr) wostream(::new(__wcerr) __stdoutbuf<wchar_t>(stderr, state_types+5)); ::new(wclog) wostream(wcerr_ptr->rdbuf()); wcin_ptr->tie(wcout_ptr); _VSTD::unitbuf(*wcerr_ptr); |