Commit 5730710c authored by Clinton Stimpson's avatar Clinton Stimpson Committed by Brad King

Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.

Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
parent 7fb2b806
......@@ -11,8 +11,8 @@
============================================================================*/
#include <cmsys/SystemTools.hxx>
#include <cmsys/Process.h>
#include <cmsys/ios/fstream>
#include <cmsys/ios/iostream>
#include <cmsys/FStream.hxx>
#include <CoreFoundation/CoreFoundation.h>
......@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
{
//if ( cmsys::SystemTools::FileExists(
cmsys_stl::string cwd = cmsys::SystemTools::GetCurrentWorkingDirectory();
cmsys_ios::ofstream ofs("/tmp/output.txt");
cmsys::ofstream ofs("/tmp/output.txt");
CFStringRef fileName;
CFBundleRef appBundle;
......
......@@ -24,6 +24,7 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Directory.hxx>
#include <cmsys/Encoding.hxx>
#include <cmsys/FStream.hxx>
#include <rpc.h> // for GUID generation
......@@ -56,7 +57,7 @@ bool cmCPackWIXGenerator::RunWiXCommand(const std::string& command)
bool status = cmSystemTools::RunSingleCommand(command.c_str(), &output,
&returnValue, 0, cmSystemTools::OUTPUT_NONE);
std::ofstream logFile(logFileName.c_str(), std::ios::app);
cmsys::ofstream logFile(logFileName.c_str(), std::ios::app);
logFile << command << std::endl;
logFile << output;
logFile.close();
......@@ -838,7 +839,7 @@ bool cmCPackWIXGenerator::CreateLicenseFile()
{
cmWIXRichTextFormatWriter rtfWriter(licenseDestinationFilename);
std::ifstream licenseSource(licenseSourceFilename.c_str());
cmsys::ifstream licenseSource(licenseSourceFilename.c_str());
std::string line;
while(std::getline(licenseSource, line))
......
......@@ -13,7 +13,7 @@
#ifndef cmWIXRichTextFormatWriter_h
#define cmWIXRichTextFormatWriter_h
#include <fstream>
#include <cmsys/FStream.hxx>
/** \class cmWIXRichtTextFormatWriter
* \brief Helper class to generate Rich Text Format (RTF) documents
......@@ -46,7 +46,7 @@ private:
void EmitInvalidCodepoint(int c);
std::ofstream File;
cmsys::ofstream File;
};
#endif
......@@ -15,7 +15,7 @@
#include <vector>
#include <string>
#include <fstream>
#include <cmsys/FStream.hxx>
#include <CPack/cmCPackLog.h>
......@@ -60,7 +60,7 @@ private:
cmCPackLog* Logger;
std::ofstream File;
cmsys::ofstream File;
State State;
......
......@@ -803,7 +803,7 @@ static int put_arobj(CF *cfp, struct stat *sb)
static int ar_append(const char* archive,const std::vector<std::string>& files)
{
int eval = 0;
FILE* aFile = fopen(archive, "wb+");
FILE* aFile = cmSystemTools::Fopen(archive, "wb+");
if (aFile!=NULL) {
fwrite(ARMAG, SARMAG, 1, aFile);
if (fseek(aFile, 0, SEEK_END) != -1) {
......@@ -814,7 +814,7 @@ static int ar_append(const char* archive,const std::vector<std::string>& files)
for(std::vector<std::string>::const_iterator fileIt = files.begin();
fileIt!=files.end(); ++fileIt) {
const char* filename = fileIt->c_str();
FILE* file = fopen(filename, "rb");
FILE* file = cmSystemTools::Fopen(filename, "rb");
if (file == NULL) {
eval = -1;
continue;
......
......@@ -16,6 +16,7 @@
#include "cmGeneratedFileStream.h"
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>
static const char* SLAHeader =
"data 'LPic' (5000) {\n"
......@@ -422,7 +423,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::string sla_r = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
sla_r += "/sla.r";
std::ifstream ifs;
cmsys::ifstream ifs;
ifs.open(cpack_license_file.c_str());
if(ifs.is_open())
{
......
......@@ -23,6 +23,7 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/FStream.hxx>
#include <algorithm>
#if defined(__HAIKU__)
......@@ -152,7 +153,7 @@ int cmCPackGenerator::PrepareNames()
<< descFileName << "]" << std::endl);
return 0;
}
std::ifstream ifs(descFileName);
cmsys::ifstream ifs(descFileName);
if ( !ifs )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
......
......@@ -22,6 +22,7 @@
#include <cmsys/SystemTools.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/FStream.hxx>
//----------------------------------------------------------------------
cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator()
......@@ -467,7 +468,7 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
return 0;
}
std::ifstream ifs(versionFile.c_str());
cmsys::ifstream ifs(versionFile.c_str());
if ( !ifs )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
......@@ -716,7 +717,7 @@ GenerateComponentPackage(const char *packageFile,
// X packages, which work on Mac OS X 10.3 and newer.
std::string descriptionFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
descriptionFile += '/' + component.Name + "-Description.plist";
std::ofstream out(descriptionFile.c_str());
cmsys::ofstream out(descriptionFile.c_str());
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl
<< "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\""
<< "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" << std::endl
......
......@@ -20,6 +20,7 @@
#include "cmCPackLog.h"
#include <cmsys/ios/sstream>
#include <cmsys/FStream.hxx>
#include <sys/types.h>
#include <sys/stat.h>
......@@ -91,7 +92,7 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
std::string inLicFile = this->GetOption("CPACK_RESOURCE_FILE_LICENSE");
std::string line;
std::ifstream ilfs(inLicFile.c_str());
cmsys::ifstream ilfs(inLicFile.c_str());
std::string licenseText;
while ( cmSystemTools::GetLineFromStream(ilfs, line) )
{
......@@ -104,7 +105,7 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
// Create the header
std::string inFile = this->GetOption("CPACK_STGZ_HEADER_FILE");
std::ifstream ifs(inFile.c_str());
cmsys::ifstream ifs(inFile.c_str());
std::string packageHeaderText;
while ( cmSystemTools::GetLineFromStream(ifs, line) )
{
......
......@@ -24,6 +24,7 @@
//#include <cmsys/RegularExpression.hxx>
#include <cmsys/Process.h>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
// used for sleep
#ifdef _WIN32
......@@ -751,7 +752,7 @@ void cmCTestBuildHandler::GenerateXMLFooter(std::ostream& os,
void cmCTestBuildHandler::GenerateXMLLaunchedFragment(std::ostream& os,
const char* fname)
{
std::ifstream fin(fname, std::ios::in | std::ios::binary);
cmsys::ifstream fin(fname, std::ios::in | std::ios::binary);
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
......@@ -885,7 +886,7 @@ cmCTestBuildHandler::LaunchHelper
//----------------------------------------------------------------------
int cmCTestBuildHandler::RunMakeCommand(const char* command,
int* retVal, const char* dir, int timeout, std::ofstream& ofs)
int* retVal, const char* dir, int timeout, std::ostream& ofs)
{
// First generate the command and arguments
std::vector<cmStdString> args = cmSystemTools::ParseArguments(command);
......@@ -1049,7 +1050,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
//----------------------------------------------------------------------
void cmCTestBuildHandler::ProcessBuffer(const char* data, int length,
size_t& tick, size_t tick_len, std::ofstream& ofs,
size_t& tick, size_t tick_len, std::ostream& ofs,
t_BuildProcessingQueueType* queue)
{
const std::string::size_type tick_line_len = 50;
......
......@@ -54,7 +54,7 @@ private:
// and retVal is return value or exception.
int RunMakeCommand(const char* command,
int* retVal, const char* dir, int timeout,
std::ofstream& ofs);
std::ostream& ofs);
enum {
b_REGULAR_LINE,
......@@ -113,7 +113,7 @@ private:
typedef std::deque<char> t_BuildProcessingQueueType;
void ProcessBuffer(const char* data, int length, size_t& tick,
size_t tick_len, std::ofstream& ofs, t_BuildProcessingQueueType* queue);
size_t tick_len, std::ostream& ofs, t_BuildProcessingQueueType* queue);
int ProcessSingleLine(const char* data);
t_BuildProcessingQueueType BuildProcessingQueue;
......
......@@ -16,6 +16,7 @@
#include "cmXMLSafe.h"
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>
//----------------------------------------------------------------------------
cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log): cmCTestVC(ct, log)
......@@ -231,7 +232,7 @@ std::string cmCTestCVS::ComputeBranchFlag(std::string const& dir)
// Lookup the branch in the tag file, if any.
std::string tagLine;
std::ifstream tagStream(tagFile.c_str());
cmsys::ifstream tagStream(tagFile.c_str());
if(tagStream && cmSystemTools::GetLineFromStream(tagStream, tagLine) &&
tagLine.size() > 1 && tagLine[0] == 'T')
{
......
......@@ -26,6 +26,7 @@
#include <cmsys/Glob.hxx>
#include <cmsys/stl/iterator>
#include <cmsys/stl/algorithm>
#include <cmsys/FStream.hxx>
#include <stdlib.h>
#include <math.h>
......@@ -511,7 +512,7 @@ int cmCTestCoverageHandler::ProcessHandler()
<< "\" FullPath=\"" << cmXMLSafe(shortFileName) << "\">\n"
<< "\t\t<Report>" << std::endl;
std::ifstream ifs(fullFileName.c_str());
cmsys::ifstream ifs(fullFileName.c_str());
if ( !ifs)
{
cmOStringStream ostr;
......@@ -600,7 +601,7 @@ int cmCTestCoverageHandler::ProcessHandler()
<< "\" FullPath=\"" << cmXMLSafe(*i) << "\">\n"
<< "\t\t<Report>" << std::endl;
std::ifstream ifs(fullPath.c_str());
cmsys::ifstream ifs(fullPath.c_str());
if (!ifs)
{
cmOStringStream ostr;
......@@ -1158,7 +1159,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " in gcovFile: "
<< gcovFile << std::endl);
std::ifstream ifile(gcovFile.c_str());
cmsys::ifstream ifile(gcovFile.c_str());
if ( ! ifile )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
......@@ -1370,7 +1371,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
= &cont->TotalCoverage[actualSourceFile];
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" in file: " << fileIt->c_str() << std::endl);
std::ifstream ifile(fileIt->c_str());
cmsys::ifstream ifile(fileIt->c_str());
if ( ! ifile )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
......@@ -1530,7 +1531,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
"covbr output in " << outputFile
<< std::endl);
// open the output file
std::ifstream fin(outputFile.c_str());
cmsys::ifstream fin(outputFile.c_str());
if(!fin)
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
......@@ -1743,7 +1744,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
std::vector<std::string> coveredFiles;
std::vector<std::string> coveredFilesFullPath;
// Read and parse the summary output file
std::ifstream fin(outputFile.c_str());
cmsys::ifstream fin(outputFile.c_str());
if(!fin)
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
......@@ -2012,7 +2013,7 @@ void cmCTestCoverageHandler::LoadLabels()
fileList += "/TargetDirectories.txt";
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" target directory list [" << fileList << "]\n");
std::ifstream finList(fileList.c_str());
cmsys::ifstream finList(fileList.c_str());
std::string line;
while(cmSystemTools::GetLineFromStream(finList, line))
{
......@@ -2026,7 +2027,7 @@ void cmCTestCoverageHandler::LoadLabels(const char* dir)
LabelSet& dirLabels = this->TargetDirs[dir];
std::string fname = dir;
fname += "/Labels.txt";
std::ifstream fin(fname.c_str());
cmsys::ifstream fin(fname.c_str());
if(!fin)
{
return;
......@@ -2080,7 +2081,7 @@ void cmCTestCoverageHandler::LoadLabels(const char* dir)
}
//----------------------------------------------------------------------
void cmCTestCoverageHandler::WriteXMLLabels(std::ofstream& os,
void cmCTestCoverageHandler::WriteXMLLabels(std::ostream& os,
std::string const& source)
{
LabelMapType::const_iterator li = this->SourceLabels.find(source);
......
......@@ -132,7 +132,7 @@ private:
// Label reading and writing methods.
void LoadLabels();
void LoadLabels(const char* dir);
void WriteXMLLabels(std::ofstream& os, std::string const& source);
void WriteXMLLabels(std::ostream& os, std::string const& source);
// Label-based filtering.
std::set<int> LabelFilter;
......
......@@ -18,6 +18,7 @@
#include <cmsys/RegularExpression.hxx>
#include <cmsys/ios/sstream>
#include <cmsys/Process.h>
#include <cmsys/FStream.hxx>
#include <sys/types.h>
#include <time.h>
......@@ -200,7 +201,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
std::string sha1;
{
std::string fetch_head = this->FindGitDir() + "/FETCH_HEAD";
std::ifstream fin(fetch_head.c_str(), std::ios::in | std::ios::binary);
cmsys::ifstream fin(fetch_head.c_str(), std::ios::in | std::ios::binary);
if(!fin)
{
this->Log << "Unable to open " << fetch_head << "\n";
......
......@@ -19,6 +19,7 @@
#include <cmsys/MD5.h>
#include <cmsys/Process.h>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>
//----------------------------------------------------------------------------
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
......@@ -171,7 +172,7 @@ void cmCTestLaunch::HandleRealArg(const char* arg)
// Expand response file arguments.
if(arg[0] == '@' && cmSystemTools::FileExists(arg+1))
{
std::ifstream fin(arg+1);
cmsys::ifstream fin(arg+1);
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
......@@ -241,8 +242,8 @@ void cmCTestLaunch::RunChild()
cmsysProcess* cp = this->Process;
cmsysProcess_SetCommand(cp, this->RealArgV);
std::ofstream fout;
std::ofstream ferr;
cmsys::ofstream fout;
cmsys::ofstream ferr;
if(this->Passthru)
{
// In passthru mode we just share the output pipes.
......@@ -330,7 +331,7 @@ void cmCTestLaunch::LoadLabels()
cmSystemTools::ConvertToUnixSlashes(source);
// Load the labels file.
std::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
if(!fin) { return; }
bool inTarget = true;
bool inSource = false;
......@@ -579,7 +580,7 @@ void cmCTestLaunch::WriteXMLLabels(std::ostream& fxml)
void cmCTestLaunch::DumpFileToXML(std::ostream& fxml,
std::string const& fname)
{
std::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
std::string line;
const char* sep = "";
......@@ -652,7 +653,7 @@ cmCTestLaunch
fname += "Custom";
fname += purpose;
fname += ".txt";
std::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
std::string line;
cmsys::RegularExpression rex;
while(cmSystemTools::GetLineFromStream(fin, line))
......@@ -671,7 +672,7 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
// Look for log file lines matching warning expressions but not
// suppression expressions.
std::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
......
......@@ -18,6 +18,7 @@
#include <cmsys/Process.h>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/Base64.h>
#include <cmsys/FStream.hxx>
#include "cmMakefile.h"
#include "cmXMLSafe.h"
......@@ -929,7 +930,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
}
// put a scope around this to close ifs so the file can be removed
{
std::ifstream ifs(ofile.c_str());
cmsys::ifstream ifs(ofile.c_str());
if ( !ifs )
{
std::string log = "Cannot read memory tester output file: " + ofile;
......@@ -984,7 +985,7 @@ cmCTestMemCheckHandler::appendMemTesterOutput(cmCTestTestResult& res,
{
return;
}
std::ifstream ifs(ofile.c_str());
cmsys::ifstream ifs(ofile.c_str());
if ( !ifs )
{
std::string log = "Cannot read memory tester output file: " + ofile;
......
......@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <stack>
#include <float.h>
#include <cmsys/FStream.hxx>
class TestComparator
{
......@@ -325,7 +326,7 @@ void cmCTestMultiProcessHandler::UpdateCostData()
if(cmSystemTools::FileExists(fname.c_str()))
{
std::ifstream fin;
cmsys::ifstream fin;
fin.open(fname.c_str());
std::string line;
......@@ -384,7 +385,7 @@ void cmCTestMultiProcessHandler::ReadCostData()
if(cmSystemTools::FileExists(fname.c_str(), true))
{
std::ifstream fin;
cmsys::ifstream fin;
fin.open(fname.c_str());
std::string line;
while(std::getline(fin, line))
......@@ -721,7 +722,7 @@ void cmCTestMultiProcessHandler::CheckResume()
<< "----------------------------------------------------------"
<< std::endl;
std::ifstream fin;
cmsys::ifstream fin;
fin.open(fname.c_str());
std::string line;
while(std::getline(fin, line))
......
......@@ -235,7 +235,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix,
return false;
}
ftpfile = ::fopen(local_file.c_str(), "rb");
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
*this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
<< upload_as.c_str() << std::endl;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
......@@ -476,7 +476,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
return false;
}
ftpfile = ::fopen(local_file.c_str(), "rb");
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
<< local_file.c_str() << " to "
<< upload_as.c_str() << " Size: " << st.st_size << std::endl);
......@@ -566,7 +566,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
<< count << std::endl);
::fclose(ftpfile);
ftpfile = ::fopen(local_file.c_str(), "rb");
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile);
chunk.clear();
......@@ -998,7 +998,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
return false;
}
size_t fileSize = static_cast<size_t>(st.st_size);
FILE* fp = fopen(local_file.c_str(), "rb");
FILE* fp = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
if ( !fp )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot open file: "
......
......@@ -21,6 +21,7 @@
#include <cmsys/RegularExpression.hxx>
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx>
#include "cmMakefile.h"
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
......@@ -931,7 +932,7 @@ void cmCTestTestHandler::UpdateMaxTestNameWidth()
bool cmCTestTestHandler::GetValue(const char* tag,
int& value,
std::ifstream& fin)
std::istream& fin)
{
std::string line;
bool ret = true;
......@@ -953,7 +954,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
bool cmCTestTestHandler::GetValue(const char* tag,
double& value,
std::ifstream& fin)
std::istream& fin)
{
std::string line;
cmSystemTools::GetLineFromStream(fin, line);
......@@ -975,7 +976,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
bool cmCTestTestHandler::GetValue(const char* tag,
bool& value,
std::ifstream& fin)
std::istream& fin)
{
std::string line;
cmSystemTools::GetLineFromStream(fin, line);
......@@ -1007,7 +1008,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
bool cmCTestTestHandler::GetValue(const char* tag,
size_t& value,
std::ifstream& fin)
std::istream& fin)
{
std::string line;
cmSystemTools::GetLineFromStream(fin, line);
......@@ -1029,7 +1030,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
bool cmCTestTestHandler::GetValue(const char* tag,
std::string& value,
std::ifstream& fin)
std::istream& fin)
{
std::string line;
cmSystemTools::GetLineFromStream(fin, line);
......@@ -1798,7 +1799,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
}
// parse the list of tests to rerun from LastTestsFailed.log
std::ifstream ifs(lastTestsFailedLog.c_str());
cmsys::ifstream ifs(lastTestsFailedLog.c_str());
if ( ifs )
{
std::string line;
......@@ -1964,7 +1965,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
}
else
{
std::ifstream ifs(filename.c_str(), std::ios::in
cmsys::ifstream ifs(filename.c_str(), std::ios::in
#ifdef _WIN32
| std::ios::binary
#endif
......@@ -2054,7 +2055,7 @@ void cmCTestTestHandler::SetTestsToRunInformation(const char* in)
// string
if(cmSystemTools::FileExists(in))
{
std::ifstream fin(in);
cmsys::ifstream fin(in);
unsigned long filelen = cmSystemTools::FileLength(in);
char* buff = new char[filelen+1];
fin.getline(buff, filelen);
......
......@@ -227,19 +227,19 @@ private:
bool GetValue(const char* tag,
std::string& value,
std::ifstream& fin);
std::istream& fin);
bool GetValue(const char* tag,
int& value,
std::ifstream& fin);
std::istream& fin);
bool GetValue(const char* tag,
size_t& value,
std::ifstream& fin);
std::istream& fin);
bool GetValue(const char* tag,
bool& value,
std::ifstream& fin);
std::istream& fin);
bool GetValue(const char* tag,
double& value,
std::ifstream& fin);
std::istream& fin);
/**
* Find the executable for a test
*/
......
......@@ -5,6 +5,7 @@
#include "cmParseCacheCoverage.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/FStream.hxx>
cmParseCacheCoverage::cmParseCacheCoverage(
......@@ -106,7 +107,7 @@ bool cmParseCacheCoverage::SplitString(std::vector<std::string>& args,
bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
{
std::ifstream in(file);
cmsys::ifstream in(file);
if(!in)
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
......
......@@ -5,6 +5,7 @@
#include "cmParseGTMCoverage.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/FStream.hxx>
cmParseGTMCoverage::cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont,
......@@ -48,7 +49,7 @@ bool cmParseGTMCoverage::LoadCoverageData(const char* d)
bool cmParseGTMCoverage::ReadMCovFile(const char* file)
{
std::ifstream in(file);
cmsys::ifstream in(file);
if(!in)
{
return false;
......@@ -127,7 +128,7 @@ bool cmParseGTMCoverage::FindFunctionInMumpsFile(std::string const& filepath,
std::string const& function,
int& lineoffset)
{
std::ifstream in(filepath.c_str());
cmsys::ifstream in(filepath.c_str());
if(!in)
{
return false;
......
......@@ -5,6 +5,7 @@
#include "cmParseGTMCoverage.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/FStream.hxx>
cmParseMumpsCoverage::cmParseMumpsCoverage(
......@@ -23,7 +24,7 @@ bool cmParseMumpsCoverage::ReadCoverageFile(const char* file)
// Read the gtm_coverage.mcov file, that has two lines of data:
// packages:/full/path/to/Vista/Packages
// coverage_dir:/full/path/to/dir/with/*.mcov
std::ifstream in(file);
cmsys::ifstream in(file);
if(!in)
{