|
|
@@ -18,8 +18,6 @@
|
|
|
|
|
|
#include <cm3p/uv.h>
|
|
|
|
|
|
-#include "cm_fileno.hxx"
|
|
|
-
|
|
|
#include "cmArgumentParser.h"
|
|
|
#include "cmExecutionStatus.h"
|
|
|
#include "cmList.h"
|
|
|
@@ -184,11 +182,10 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
|
|
inputFile.reset(cmsys::SystemTools::Fopen(inputFilename, "rb"));
|
|
|
if (inputFile) {
|
|
|
builder.SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT,
|
|
|
- cm_fileno(inputFile.get()));
|
|
|
+ inputFile.get());
|
|
|
}
|
|
|
} else {
|
|
|
- builder.SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT,
|
|
|
- cm_fileno(stdin));
|
|
|
+ builder.SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT, stdin);
|
|
|
}
|
|
|
|
|
|
std::unique_ptr<FILE, int (*)(FILE*)> outputFile(nullptr, fclose);
|
|
|
@@ -196,7 +193,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
|
|
outputFile.reset(cmsys::SystemTools::Fopen(outputFilename, "wb"));
|
|
|
if (outputFile) {
|
|
|
builder.SetExternalStream(cmUVProcessChainBuilder::Stream_OUTPUT,
|
|
|
- cm_fileno(outputFile.get()));
|
|
|
+ outputFile.get());
|
|
|
}
|
|
|
} else {
|
|
|
if (arguments.OutputVariable == arguments.ErrorVariable &&
|
|
|
@@ -212,13 +209,13 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args,
|
|
|
if (errorFilename == outputFilename) {
|
|
|
if (outputFile) {
|
|
|
builder.SetExternalStream(cmUVProcessChainBuilder::Stream_ERROR,
|
|
|
- cm_fileno(outputFile.get()));
|
|
|
+ outputFile.get());
|
|
|
}
|
|
|
} else {
|
|
|
errorFile.reset(cmsys::SystemTools::Fopen(errorFilename, "wb"));
|
|
|
if (errorFile) {
|
|
|
builder.SetExternalStream(cmUVProcessChainBuilder::Stream_ERROR,
|
|
|
- cm_fileno(errorFile.get()));
|
|
|
+ errorFile.get());
|
|
|
}
|
|
|
}
|
|
|
} else if (arguments.ErrorVariable.empty() ||
|