summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-01-04 05:47:13 (GMT)
committerBrad King <brad.king@kitware.com>2014-01-07 14:27:44 (GMT)
commit5730710c86e5b844c48e17e9001647ae0aa841a3 (patch)
tree95f04b085aab74156bbbd39089541c6ec586b89c /Source/cmDependsFortran.cxx
parent7fb2b806626b9af791d7372d2ff82b2cf1503237 (diff)
downloadCMake-5730710c86e5b844c48e17e9001647ae0aa841a3.zip
CMake-5730710c86e5b844c48e17e9001647ae0aa841a3.tar.gz
CMake-5730710c86e5b844c48e17e9001647ae0aa841a3.tar.bz2
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.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index e41e5ea..d5472a1 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -17,7 +17,7 @@
#include "cmGeneratedFileStream.h"
#include "cmDependsFortranParser.h" /* Interface to parser object. */
-
+#include <cmsys/FStream.hxx>
#include <assert.h>
#include <stack>
@@ -356,7 +356,7 @@ void cmDependsFortran::LocateModules()
{
std::string targetDir = cmSystemTools::GetFilenamePath(*i);
std::string fname = targetDir + "/fortran.internal";
- std::ifstream fin(fname.c_str());
+ cmsys::ifstream fin(fname.c_str());
if(fin)
{
this->MatchRemoteModules(fin, targetDir.c_str());
@@ -700,7 +700,7 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
// is later used for longer sequences it should be re-written using an
// efficient string search algorithm such as Boyer-Moore.
static
-bool cmDependsFortranStreamContainsSequence(std::ifstream& ifs,
+bool cmDependsFortranStreamContainsSequence(std::istream& ifs,
const char* seq, int len)
{
assert(len > 0);
@@ -733,8 +733,8 @@ bool cmDependsFortranStreamContainsSequence(std::ifstream& ifs,
//----------------------------------------------------------------------------
// Helper function to compare the remaining content in two streams.
-static bool cmDependsFortranStreamsDiffer(std::ifstream& ifs1,
- std::ifstream& ifs2)
+static bool cmDependsFortranStreamsDiffer(std::istream& ifs1,
+ std::istream& ifs2)
{
// Compare the remaining content.
for(;;)
@@ -799,11 +799,11 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
}
#if defined(_WIN32) || defined(__CYGWIN__)
- std::ifstream finModFile(modFile, std::ios::in | std::ios::binary);
- std::ifstream finStampFile(stampFile, std::ios::in | std::ios::binary);
+ cmsys::ifstream finModFile(modFile, std::ios::in | std::ios::binary);
+ cmsys::ifstream finStampFile(stampFile, std::ios::in | std::ios::binary);
#else
- std::ifstream finModFile(modFile, std::ios::in);
- std::ifstream finStampFile(stampFile, std::ios::in);
+ cmsys::ifstream finModFile(modFile, std::ios::in);
+ cmsys::ifstream finStampFile(stampFile, std::ios::in);
#endif
if(!finModFile || !finStampFile)
{
@@ -944,7 +944,7 @@ bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
{
// Open the new file and push it onto the stack. Save the old
// buffer with it on the stack.
- if(FILE* file = fopen(fname, "rb"))
+ if(FILE* file = cmsys::SystemTools::Fopen(fname, "rb"))
{
YY_BUFFER_STATE current =
cmDependsFortranLexer_GetCurrentBuffer(parser->Scanner);