[PATCH] D100130: [SystemZ][z/OS][Windows] Add new functions that set Text/Binary mode for Stdin and Stdout based on OpenFlags

Jonathan Crowther via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 11:37:57 PDT 2021


Jonathan.Crowther added inline comments.


================
Comment at: llvm/lib/Support/MemoryBuffer.cpp:514-515
   // FIXME: That isn't necessarily true, we should try to mmap stdin and
   // fallback if it fails.
-  sys::ChangeStdinToBinary();
+  sys::ChangeStdinMode(sys::fs::OF_Text);
 
----------------
This will no longer call `_setmode(_fileno(stdin), _O_BINARY);` on Windows. Is that expected?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100130



More information about the llvm-commits mailing list