@@ -276,6 +276,30 @@ private:
state_type __st_;
state_type __st_last_;
ios_base::openmode __om_;
+ // Used to track the currently used mode and track whether the output should
+ // be unbuffered.
+ // [filebuf.virtuals]/12
+ // If setbuf(0, 0) is called on a stream
@@ -294,7 +318,10 @@ private:
return nullptr;
__om_ = __mode;
+ __try_set_unbuffered_mode();
ldionne wrote:
Strange indentation.
https://github.com/llvm/llvm-project/pull/76629
___
@@ -276,6 +276,30 @@ private:
state_type __st_;
state_type __st_last_;
ios_base::openmode __om_;
+ // Used to track the currently used mode and track whether the output should
mordante wrote:
Review note: It might be possible to use other fields to
llvmbot wrote:
@llvm/pr-subscribers-libcxx
Author: Mark de Wever (mordante)
Changes
When calling setbuf(nullptr, 0) before performing file operations it should set
the file to unbuffered mode. Currently the code avoids buffering internally,
but the underlying stream still can buffer.
https://github.com/mordante created
https://github.com/llvm/llvm-project/pull/76629
When calling setbuf(nullptr, 0) before performing file operations it should set
the file to unbuffered mode. Currently the code avoids buffering internally,
but the underlying stream still can buffer.
This is