summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmDependsFortran.cxx4
-rw-r--r--Source/cmDocumentation.cxx2
-rw-r--r--Source/cmFileCommand.cxx4
-rw-r--r--Source/cmGeneratedFileStream.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Tests/AliasTarget/commandgenerator.cpp3
-rw-r--r--Tests/AliasTarget/targetgenerator.cpp3
8 files changed, 10 insertions, 12 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index a20fb9819f..bbda688839 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -633,8 +633,8 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
cmsys::ifstream finModFile(modFile, std::ios::in | std::ios::binary);
cmsys::ifstream finStampFile(stampFile, std::ios::in | std::ios::binary);
#else
- cmsys::ifstream finModFile(modFile, std::ios::in);
- cmsys::ifstream finStampFile(stampFile, std::ios::in);
+ cmsys::ifstream finModFile(modFile);
+ cmsys::ifstream finStampFile(stampFile);
#endif
if (!finModFile || !finStampFile) {
// At least one of the files does not exist. The modules differ.
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 68a84887fa..413dacd629 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -140,7 +140,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
cmsys::ofstream* fout = 0;
std::ostream* s = &os;
if (!i->Filename.empty()) {
- fout = new cmsys::ofstream(i->Filename.c_str(), std::ios::out);
+ fout = new cmsys::ofstream(i->Filename.c_str());
if (fout) {
s = fout;
} else {
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4e72f36138..6abc238586 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -257,7 +257,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
fileName.c_str(), std::ios::in |
(hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in));
#else
- cmsys::ifstream file(fileName.c_str(), std::ios::in);
+ cmsys::ifstream file(fileName.c_str());
#endif
if (!file) {
@@ -526,7 +526,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
#if defined(_WIN32) || defined(__CYGWIN__)
cmsys::ifstream fin(fileName.c_str(), std::ios::in | std::ios::binary);
#else
- cmsys::ifstream fin(fileName.c_str(), std::ios::in);
+ cmsys::ifstream fin(fileName.c_str());
#endif
if (!fin) {
std::ostringstream e;
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index dee174b7f7..c35a1bcd0f 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -56,7 +56,7 @@ cmGeneratedFileStream& cmGeneratedFileStream::Open(const char* name,
this->Stream::open(this->TempName.c_str(),
std::ios::out | std::ios::binary);
} else {
- this->Stream::open(this->TempName.c_str(), std::ios::out);
+ this->Stream::open(this->TempName.c_str());
}
// Check if the file opened.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index aef3f44b31..536c5d286c 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2571,7 +2571,7 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile,
#if defined(_WIN32) || defined(__CYGWIN__)
cmsys::ifstream fin(pfile.c_str(), std::ios::in | std::ios::binary);
#else
- cmsys::ifstream fin(pfile.c_str(), std::ios::in);
+ cmsys::ifstream fin(pfile.c_str());
#endif
if (!fin) {
return;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index e404fa3183..db0072a471 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2094,7 +2094,7 @@ static bool cmakeCheckStampFile(const char* stampName)
#if defined(_WIN32) || defined(__CYGWIN__)
cmsys::ifstream fin(stampDepends.c_str(), std::ios::in | std::ios::binary);
#else
- cmsys::ifstream fin(stampDepends.c_str(), std::ios::in);
+ cmsys::ifstream fin(stampDepends.c_str());
#endif
if (!fin) {
// The stamp dependencies file cannot be read. Just assume the
diff --git a/Tests/AliasTarget/commandgenerator.cpp b/Tests/AliasTarget/commandgenerator.cpp
index aaab014f9d..c4d80a19f5 100644
--- a/Tests/AliasTarget/commandgenerator.cpp
+++ b/Tests/AliasTarget/commandgenerator.cpp
@@ -5,8 +5,7 @@
int main(int argc, char** argv)
{
- std::fstream fout;
- fout.open("commandoutput.h", std::ios::out);
+ std::ofstream fout("commandoutput.h");
if (!fout)
return 1;
fout << "#define COMMANDOUTPUT_DEFINE\n";
diff --git a/Tests/AliasTarget/targetgenerator.cpp b/Tests/AliasTarget/targetgenerator.cpp
index b3e6ee22cf..4de479230e 100644
--- a/Tests/AliasTarget/targetgenerator.cpp
+++ b/Tests/AliasTarget/targetgenerator.cpp
@@ -3,8 +3,7 @@
int main(int argc, char** argv)
{
- std::fstream fout;
- fout.open("targetoutput.h", std::ios::out);
+ std::ofstream fout("targetoutput.h");
if (!fout)
return 1;
fout << "#define TARGETOUTPUT_DEFINE\n";