Add llvm::Program::ChangeStderrToBinary().
llvm-svn: 94743
This commit is contained in:
parent
9f4ea22c88
commit
1051937c21
|
@ -120,10 +120,12 @@ namespace sys {
|
||||||
/// @brief Construct a Program by finding it by name.
|
/// @brief Construct a Program by finding it by name.
|
||||||
static Path FindProgramByName(const std::string& name);
|
static Path FindProgramByName(const std::string& name);
|
||||||
|
|
||||||
// These methods change the specified standard stream (stdin or stdout) to
|
// These methods change the specified standard stream (stdin,
|
||||||
// binary mode. They return true if an error occurred
|
// stdout, or stderr) to binary mode. They return true if an error
|
||||||
|
// occurred
|
||||||
static bool ChangeStdinToBinary();
|
static bool ChangeStdinToBinary();
|
||||||
static bool ChangeStdoutToBinary();
|
static bool ChangeStdoutToBinary();
|
||||||
|
static bool ChangeStderrToBinary();
|
||||||
|
|
||||||
/// A convenience function equivalent to Program prg; prg.Execute(..);
|
/// A convenience function equivalent to Program prg; prg.Execute(..);
|
||||||
/// prg.Wait(..);
|
/// prg.Wait(..);
|
||||||
|
|
|
@ -323,4 +323,9 @@ bool Program::ChangeStdoutToBinary(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Program::ChangeStderrToBinary(){
|
||||||
|
// Do nothing, as Unix doesn't differentiate between text and binary.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,4 +379,9 @@ bool Program::ChangeStdoutToBinary(){
|
||||||
return result == -1;
|
return result == -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Program::ChangeStderrToBinary(){
|
||||||
|
int result = _setmode( _fileno(stderr), _O_BINARY );
|
||||||
|
return result == -1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue