summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortranParser.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-10-04 18:47:11 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-10-04 18:47:11 (GMT)
commite6912431c8ddb9c903d8c1e6d7fa18f96971122b (patch)
treefeea229386a6c78b9badd56070323c6d287e88ba /Source/cmDependsFortranParser.cxx
parenta6553725688900ed6137889b98591e955335029d (diff)
downloadCMake-e6912431c8ddb9c903d8c1e6d7fa18f96971122b.zip
CMake-e6912431c8ddb9c903d8c1e6d7fa18f96971122b.tar.gz
CMake-e6912431c8ddb9c903d8c1e6d7fa18f96971122b.tar.bz2
COMP: Get it to compile on Borland 5.5, too. Including stl headers here does not work, because with Borland 5.5 stl headers pull in windef.h which typedefs WORD which is in the fortran tokens list...
Diffstat (limited to 'Source/cmDependsFortranParser.cxx')
-rw-r--r--Source/cmDependsFortranParser.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx
index 67c278d..12caea4 100644
--- a/Source/cmDependsFortranParser.cxx
+++ b/Source/cmDependsFortranParser.cxx
@@ -183,7 +183,7 @@ Modify cmDependsFortranParser.cxx:
#define cmDependsFortranParser_cxx
#include "cmDependsFortranParser.h" /* Interface to parser object. */
#include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
-#include "cmSystemTools.h"
+#include <ctype.h> // for tolower
/* Configure the parser to use a lexer object. */
#define YYPARSE_PARAM yyscanner
@@ -205,8 +205,19 @@ static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
static bool cmDependsFortranParserIsKeyword(const char* word,
const char* keyword)
{
- return (strlen(word) == strlen(keyword) &&
- cmSystemTools::LowerCase(word) == keyword);
+ size_t len = strlen(word);
+ if (len != strlen(keyword))
+ {
+ return false;
+ }
+ for (size_t i = 0; i < len; ++i)
+ {
+ if (tolower(word[i]) != tolower(keyword[i]))
+ {
+ return false;
+ }
+ }
+ return true;
}
/* Disable some warnings in the generated code. */