[llvm-branch-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)

2024-02-27 Thread Louis Dionne via llvm-branch-commits
@@ -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

[llvm-branch-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)

2024-02-27 Thread Louis Dionne via llvm-branch-commits
@@ -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 ___

[llvm-branch-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)

2023-12-30 Thread Mark de Wever via llvm-branch-commits
@@ -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

[llvm-branch-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)

2023-12-30 Thread via llvm-branch-commits
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.

[llvm-branch-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)

2023-12-30 Thread Mark de Wever via llvm-branch-commits
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