[cmake-commits] david.cole committed cmDependsFortranParser.cxx 1.10
1.11
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Oct 4 14:47:13 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9595
Modified Files:
cmDependsFortranParser.cxx
Log Message:
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...
Index: cmDependsFortranParser.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortranParser.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmDependsFortranParser.cxx 4 Oct 2007 13:49:13 -0000 1.10
+++ cmDependsFortranParser.cxx 4 Oct 2007 18:47:11 -0000 1.11
@@ -183,7 +183,7 @@
#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 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. */
More information about the Cmake-commits
mailing list