[libcxx-commits] [PATCH] D154514: [libc++] Fix incorrect length check in std::basic_filebuf

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 26 07:07:30 PDT 2023


ldionne marked 4 inline comments as done.
ldionne added a comment.

In D154514#4492506 <https://reviews.llvm.org/D154514#4492506>, @mstorsjo wrote:

> By default the streams are opened in text mode, and in text mode, if you output `\n`, it will actually write `\r\n` to the file. By opening all streams in binary mode, you bypass such translations; add `std::ios::binary` to the `open()` calls. With the attached suggested edits, the buffered_reads test seems to pass for me, I presume the corresponding change for the buffered_writes test fixes that too.

That's awesome, thanks so much for investigating! I'm updating the patch right now, hopefully CI should pass now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154514/new/

https://reviews.llvm.org/D154514



More information about the libcxx-commits mailing list