mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00:00
[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4f7e3109e
commit
a03a80f3ce
@ -421,21 +421,21 @@ static int Wait(void *&Data, const Path &path,
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
error_code ChangeStdinToBinary(){
|
||||
error_code sys::ChangeStdinToBinary(){
|
||||
int result = _setmode( _fileno(stdin), _O_BINARY );
|
||||
if (result == -1)
|
||||
return error_code(errno, generic_category());
|
||||
return make_error_code(errc::success);
|
||||
}
|
||||
|
||||
error_code ChangeStdoutToBinary(){
|
||||
error_code sys::ChangeStdoutToBinary(){
|
||||
int result = _setmode( _fileno(stdout), _O_BINARY );
|
||||
if (result == -1)
|
||||
return error_code(errno, generic_category());
|
||||
return make_error_code(errc::success);
|
||||
}
|
||||
|
||||
error_code ChangeStderrToBinary(){
|
||||
error_code sys::ChangeStderrToBinary(){
|
||||
int result = _setmode( _fileno(stderr), _O_BINARY );
|
||||
if (result == -1)
|
||||
return error_code(errno, generic_category());
|
||||
|
Loading…
x
Reference in New Issue
Block a user