mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
raw_fd_ostream: Don't change STDERR to O_BINARY, or w*printf() (in assert()) would barf wide chars after llvm::errs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f9f10e3f95
commit
25ca9f9ef1
@ -469,9 +469,10 @@ raw_fd_ostream::raw_fd_ostream(int fd, bool shouldClose, bool unbuffered)
|
||||
: raw_ostream(unbuffered), FD(fd),
|
||||
ShouldClose(shouldClose), Error(false), UseAtomicWrites(false) {
|
||||
#ifdef O_BINARY
|
||||
// Setting STDOUT and STDERR to binary mode is necessary in Win32
|
||||
// Setting STDOUT to binary mode is necessary in Win32
|
||||
// to avoid undesirable linefeed conversion.
|
||||
if (fd == STDOUT_FILENO || fd == STDERR_FILENO)
|
||||
// Don't touch STDERR, or w*printf() (in assert()) would barf wide chars.
|
||||
if (fd == STDOUT_FILENO)
|
||||
setmode(fd, O_BINARY);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user