summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-03-30 18:49:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-03-30 18:49:56 (GMT)
commit5a2668b326471874ca69357af831cdcf1575c621 (patch)
tree92f40c9de267766f0533df44212ec2df6415aa47 /Source
parent08b14163ee2cc9cced08d80b2c81b29c83072229 (diff)
downloadCMake-5a2668b326471874ca69357af831cdcf1575c621.zip
CMake-5a2668b326471874ca69357af831cdcf1575c621.tar.gz
CMake-5a2668b326471874ca69357af831cdcf1575c621.tar.bz2
ENH: add support for win64 for visual studio 2005 ide and nmake, also fix warnings produced by building for win64
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx2
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx6
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx2
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx4
-rw-r--r--Source/cmDependsJavaParserHelper.cxx4
-rw-r--r--Source/cmExecuteProcessCommand.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx10
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h1
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.cxx53
-rw-r--r--Source/cmGlobalVisualStudio8Win64Generator.h52
-rw-r--r--Source/cmIfCommand.cxx2
-rw-r--r--Source/cmListCommand.cxx18
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx9
-rw-r--r--Source/cmLocalVisualStudio7Generator.h2
-rw-r--r--Source/cmXMLParser.cxx4
-rw-r--r--Source/cmake.cxx3
-rw-r--r--Source/kwsys/CommandLineArguments.cxx4
-rw-r--r--Source/kwsys/Glob.cxx4
-rw-r--r--Source/kwsys/ProcessWin32.c2
-rw-r--r--Source/kwsys/Registry.cxx6
-rw-r--r--Source/kwsys/SystemTools.cxx6
-rw-r--r--Source/kwsys/hashtable.hxx.in2
-rw-r--r--Source/kwsys/testDynamicLoader.cxx3
25 files changed, 164 insertions, 43 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 10921ca..077872b 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -198,6 +198,8 @@ IF (WIN32)
cmGlobalVisualStudio7Generator.h
cmGlobalVisualStudio8Generator.cxx
cmGlobalVisualStudio8Generator.h
+ cmGlobalVisualStudio8Win64Generator.cxx
+ cmGlobalVisualStudio8Win64Generator.h
cmGlobalWatcomWMakeGenerator.cxx
cmLocalVisualStudio6Generator.cxx
cmLocalVisualStudio6Generator.h
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 25662cb..89420bf 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -38,7 +38,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
bool cmCTestHandlerCommand::InitialPass(
std::vector<std::string> const& args)
{
- if ( !this->ProcessArguments(args, this->Last, &*this->Arguments.begin(),
+ if ( !this->ProcessArguments(args, (unsigned int)this->Last, &*this->Arguments.begin(),
this->Values) )
{
return false;
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 51954ba..e9b6c09 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -211,9 +211,9 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
os << "\t</TestList>\n";
cmCTestLog(this->CTest, HANDLER_OUTPUT,
"-- Processing memory checking output: ");
- unsigned int total = this->TestResults.size();
- unsigned int step = total / 10;
- unsigned int current = 0;
+ size_t total = this->TestResults.size();
+ size_t step = total / 10;
+ size_t current = 0;
for ( cc = 0; cc < this->TestResults.size(); cc ++ )
{
cmCTestTestResult *result = &this->TestResults[cc];
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 2524f16..8d5effa 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -39,7 +39,7 @@ static size_t
cmCTestSubmitHandlerWriteMemoryCallback(void *ptr, size_t size, size_t nmemb,
void *data)
{
- register int realsize = size * nmemb;
+ register int realsize = (int)(size * nmemb);
cmCTestSubmitHandlerVectorOfChar *vec
= static_cast<cmCTestSubmitHandlerVectorOfChar*>(data);
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 31c4bc0..f24cab6 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -119,7 +119,7 @@ char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
{
return in1;
}
- int len = strlen(in1) + strlen(in2) + 1;
+ size_t len = strlen(in1) + strlen(in2) + 1;
char* out = new char [ len ];
strcpy(out, in1);
strcat(out, in2);
@@ -133,7 +133,7 @@ void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHe
pt->str = 0;
if ( len == 0 )
{
- len = strlen(str);
+ len = (int)strlen(str);
}
if ( len == 0 )
{
diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx
index f0fc0b5..b9d0775 100644
--- a/Source/cmDependsJavaParserHelper.cxx
+++ b/Source/cmDependsJavaParserHelper.cxx
@@ -143,7 +143,7 @@ void cmDependsJavaParserHelper::Print(const char* place, const char* str)
void cmDependsJavaParserHelper::CombineUnions(char** out, const char* in1, char** in2,
const char* sep)
{
- int len = 1;
+ size_t len = 1;
if ( in1 )
{
len += strlen(in1);
@@ -202,7 +202,7 @@ void cmDependsJavaParserHelper::AllocateParserType(cmDependsJavaParserHelper::Pa
pt->str = 0;
if ( len == 0 )
{
- len = strlen(str);
+ len = (int)strlen(str);
}
if ( len == 0 )
{
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 4090529..fec9070 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -32,7 +32,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args)
std::vector< std::vector<const char*> > cmds;
std::string arguments;
bool doing_command = false;
- unsigned int command_index = 0;
+ size_t command_index = 0;
bool output_quiet = false;
bool error_quiet = false;
std::string timeout_string;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7f2ba80..b8ae64b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1207,8 +1207,8 @@ void cmGlobalGenerator::SetupTests()
}
// Add run_test only if any tests are foun
- long total_tests = 0;
- unsigned int i;
+ size_t total_tests = 0;
+ size_t i;
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
total_tests += this->LocalGenerators[i]->GetMakefile()->GetTests()->size();
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index cbc7822..969999d 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -26,6 +26,7 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator()
{
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
+ this->PlatformName = "Win32";
}
@@ -206,7 +207,8 @@ cmGlobalVisualStudio8Generator
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
- fout << "\t\t" << *i << "|Win32 = " << *i << "|Win32\n";
+ fout << "\t\t" << *i << "|" << this->PlatformName << " = " << *i << "|"
+ << this->PlatformName << "\n";
}
fout << "\tEndGlobalSection\n";
}
@@ -221,10 +223,12 @@ cmGlobalVisualStudio8Generator
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
- fout << "\t\t{" << guid << "}." << *i << "|Win32.ActiveCfg = " << *i << "|Win32\n";
+ fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".ActiveCfg = "
+ << *i << "|" << this->PlatformName << "\n";
if (in_all_build)
{
- fout << "\t\t{" << guid << "}." << *i << "|Win32.Build.0 = " << *i << "|Win32\n";
+ fout << "\t\t{" << guid << "}." << *i << "|" << this->PlatformName << ".Build.0 = "
+ << *i << "|" << this->PlatformName << "\n";
}
}
}
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 8542b6f..c4992e0 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -55,5 +55,6 @@ protected:
virtual void WriteSolutionConfigurations(std::ostream& fout);
virtual void WriteProjectConfigurations(std::ostream& fout,
const char* name, bool in_all);
+ std::string PlatformName; // Win32 or x64
};
#endif
diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx
new file mode 100644
index 0000000..5408a0c
--- /dev/null
+++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx
@@ -0,0 +1,53 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#include "windows.h" // this must be first to define GetCurrentDirectory
+#include "cmGlobalVisualStudio8Win64Generator.h"
+#include "cmLocalVisualStudio7Generator.h"
+#include "cmMakefile.h"
+#include "cmake.h"
+
+
+
+cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
+{
+ this->PlatformName = "x64";
+}
+
+///! Create a local generator appropriate to this Global Generator
+cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator()
+{
+ cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
+ lg->SetVersion8();
+ lg->SetPlatformName(this->PlatformName.c_str());
+ lg->SetGlobalGenerator(this);
+ return lg;
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio8Win64Generator::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.name = this->GetName();
+ entry.brief = "Generates Visual Studio .NET 2005 Win64 project files.";
+ entry.full = "";
+}
+
+void cmGlobalVisualStudio8Win64Generator::EnableLanguage(std::vector<std::string>const & lang,
+ cmMakefile *mf)
+{
+ mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
+ cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf);
+}
diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h
new file mode 100644
index 0000000..dda7f18
--- /dev/null
+++ b/Source/cmGlobalVisualStudio8Win64Generator.h
@@ -0,0 +1,52 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmGlobalVisualStudio8Win64Generator_h
+#define cmGlobalVisualStudio8Win64Generator_h
+
+#include "cmGlobalVisualStudio8Generator.h"
+
+
+/** \class cmGlobalVisualStudio8Win64Generator
+ * \brief Write a Unix makefiles.
+ *
+ * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree
+ */
+class cmGlobalVisualStudio8Win64Generator : public cmGlobalVisualStudio8Generator
+{
+public:
+ cmGlobalVisualStudio8Win64Generator();
+ static cmGlobalGenerator* New() { return new cmGlobalVisualStudio8Win64Generator; }
+
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalVisualStudio8Win64Generator::GetActualName();}
+ static const char* GetActualName() {return "Visual Studio 8 2005 Win64";}
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ ///! create the correct local generator
+ virtual cmLocalGenerator *CreateLocalGenerator();
+
+ /**
+ * Try to determine system infomation such as shared library
+ * extension, pthreads, byte order etc.
+ */
+ virtual void EnableLanguage(std::vector<std::string>const& languages,
+ cmMakefile *);
+};
+#endif
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index bd608f8..b611796 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -278,7 +278,7 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args,
// is a variable defined
if (*arg == "DEFINED" && argP1 != newArgs.end())
{
- unsigned int argP1len = argP1->size();
+ size_t argP1len = argP1->size();
if(argP1len > 4 && argP1->substr(0, 4) == "ENV{" &&
argP1->operator[](argP1len-1) == '}')
{
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index a41b5e8..398c63e 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -145,12 +145,12 @@ bool cmListCommand::HandleGetCommand(std::vector<std::string> const& args)
{
value += ";";
}
- int nitem = varArgsExpanded.size();
+ size_t nitem = varArgsExpanded.size();
if ( item < 0 )
{
- item = nitem + item;
+ item = (int)nitem + item;
}
- if ( item < 0 || nitem <= item )
+ if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
@@ -213,12 +213,12 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args)
int item = atoi(args[2].c_str());
- int nitem = varArgsExpanded.size();
+ size_t nitem = varArgsExpanded.size();
if ( item < 0 )
{
- item = nitem + item;
+ item = (int)nitem + item;
}
- if ( item < 0 || nitem <= item )
+ if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
@@ -314,12 +314,12 @@ bool cmListCommand::HandleRemoveItemCommand(std::vector<std::string> const& args
for ( cc = 2; cc < args.size(); ++ cc )
{
int item = atoi(args[cc].c_str());
- int nitem = varArgsExpanded.size();
+ size_t nitem = varArgsExpanded.size();
if ( item < 0 )
{
- item = nitem + item;
+ item = (int)nitem + item;
}
- if ( item < 0 || nitem <= item )
+ if ( item < 0 || nitem <= (size_t)item )
{
cmOStringStream str;
str << "index: " << item << " out of range (-" << varArgsExpanded.size() << ", " << varArgsExpanded.size()-1 << ")";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 446f884..38b9700 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -25,6 +25,7 @@
cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator()
{
this->Version = 7;
+ this->PlatformName = "Win32";
}
cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator()
@@ -343,7 +344,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
mfcFlag = "0";
}
fout << "\t\t<Configuration\n"
- << "\t\t\tName=\"" << configName << "|Win32\"\n"
+ << "\t\t\tName=\"" << configName << "|" << this->PlatformName << "\"\n"
<< "\t\t\tOutputDirectory=\"" << configName << "\"\n";
// This is an internal type to Visual Studio, it seems that:
// 4 == static library
@@ -1043,7 +1044,7 @@ void cmLocalVisualStudio7Generator::WriteGroup(const cmSourceGroup *sg, cmTarget
i != configs->end(); ++i)
{
fout << "\t\t\t\t<FileConfiguration\n"
- << "\t\t\t\t\tName=\"" << *i << "|Win32\">\n"
+ << "\t\t\t\t\tName=\"" << *i << "|" << this->PlatformName << "\">\n"
<< "\t\t\t\t\t<Tool\n"
<< "\t\t\t\t\tName=\"" << aCompilerTool << "\"\n";
if(compileFlags.size())
@@ -1093,7 +1094,7 @@ WriteCustomRule(std::ostream& fout,
for(i = configs->begin(); i != configs->end(); ++i)
{
fout << "\t\t\t\t<FileConfiguration\n";
- fout << "\t\t\t\t\tName=\"" << *i << "|Win32\">\n";
+ fout << "\t\t\t\t\tName=\"" << *i << "|" << this->PlatformName << "\">\n";
if(compileFlags)
{
fout << "\t\t\t\t\t<Tool\n"
@@ -1270,7 +1271,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
<< "\tSccLocalPath=\"\"\n"
<< "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"
- << "\t\t<Platform\n\t\t\tName=\"Win32\"/>\n"
+ << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
<< "\t</Platforms>\n";
}
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index fadf7e7..387762b 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -62,6 +62,7 @@ public:
}
void SetVersion71() {this->Version = 71;}
void SetVersion8() {this->Version = 8;}
+ void SetPlatformName(const char* n) { this->PlatformName = n;}
virtual void ConfigureFinalPass();
private:
void FillFlagMapFromCommandFlags(std::map<cmStdString, cmStdString>& flagMap,
@@ -119,6 +120,7 @@ private:
std::string ExecutableOutputPath;
std::string ModuleDefinitionFile;
int Version;
+ std::string PlatformName; // Win32 or x64
};
#endif
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index bc3ed6c..58f3656 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -38,8 +38,8 @@ cmXMLParser::~cmXMLParser()
//----------------------------------------------------------------------------
int cmXMLParser::Parse(const char* string)
{
- return this->InitializeParser() &&
- this->ParseChunk(string, strlen(string)) &&
+ return (int)this->InitializeParser() &&
+ this->ParseChunk(string, (unsigned int)strlen(string)) &&
this->CleanupParser();
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 7ed09a9..1a0cfdc 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -49,6 +49,7 @@
# include "cmGlobalVisualStudio7Generator.h"
# include "cmGlobalVisualStudio71Generator.h"
# include "cmGlobalVisualStudio8Generator.h"
+# include "cmGlobalVisualStudio8Win64Generator.h"
# include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
# include "cmGlobalWatcomWMakeGenerator.h"
@@ -1675,6 +1676,8 @@ void cmake::AddDefaultGenerators()
&cmGlobalVisualStudio71Generator::New;
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =
&cmGlobalVisualStudio8Generator::New;
+ this->Generators[cmGlobalVisualStudio8Win64Generator::GetActualName()] =
+ &cmGlobalVisualStudio8Win64Generator::New;
this->Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] =
&cmGlobalBorlandMakefileGenerator::New;
this->Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] =
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index b84c9b7..b1ee992 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -513,7 +513,7 @@ const char* CommandLineArguments::GetArgv0()
//----------------------------------------------------------------------------
unsigned int CommandLineArguments::GetLastArgument()
{
- return this->Internals->LastArgument + 1;
+ return (unsigned int)this->Internals->LastArgument + 1;
}
//----------------------------------------------------------------------------
@@ -620,7 +620,7 @@ void CommandLineArguments::GenerateHelp()
str << buffer;
}
const char* ptr = this->Internals->Callbacks[mpit->first].Help;
- int len = strlen(ptr);
+ size_t len = strlen(ptr);
int cnt = 0;
while ( len > 0)
{
diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx
index b6765dd..f395126 100644
--- a/Source/kwsys/Glob.cxx
+++ b/Source/kwsys/Glob.cxx
@@ -338,7 +338,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
{
if ( cc > 0 && expr[cc] == '/' && expr[cc-1] != '\\' )
{
- last_slash = cc;
+ last_slash = (int)cc;
}
if ( cc > 0 &&
(expr[cc] == '[' || expr[cc] == '?' || expr[cc] == '*') &&
@@ -371,7 +371,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
}
}
- skip = cc + 1;
+ skip = int(cc + 1);
}
else
#endif
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index c368d27..97e5706 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -2141,7 +2141,7 @@ void kwsysProcessCleanup(kwsysProcess* cp, int error)
void kwsysProcessCleanErrorMessage(kwsysProcess* cp)
{
/* Remove trailing period and newline, if any. */
- int length = strlen(cp->ErrorMessage);
+ size_t length = strlen(cp->ErrorMessage);
if(cp->ErrorMessage[length-1] == '\n')
{
cp->ErrorMessage[length-1] = 0;
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index 43f69a6..b09898a 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -705,7 +705,7 @@ void RegistryHelper::SetSubKey(const char* sk)
char *RegistryHelper::Strip(char *str)
{
int cc;
- int len;
+ size_t len;
char *nstr;
if ( !str )
{
@@ -713,7 +713,7 @@ char *RegistryHelper::Strip(char *str)
}
len = strlen(str);
nstr = str;
- for( cc=0; cc<len; cc++ )
+ for( cc=0; cc<(int)len; cc++ )
{
if ( !isspace( *nstr ) )
{
@@ -721,7 +721,7 @@ char *RegistryHelper::Strip(char *str)
}
nstr ++;
}
- for( cc=(strlen(nstr)-1); cc>=0; cc-- )
+ for( cc=int(strlen(nstr)-1); cc>=0; cc-- )
{
if ( !isspace( nstr[cc] ) )
{
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 19c55a2..0e77dbe 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -1166,7 +1166,7 @@ int SystemTools::EstimateFormatLength(const char *format, va_list ap)
// Start with the length of the format string itself.
- int length = strlen(format);
+ size_t length = strlen(format);
// Increase the length for every argument in the format.
@@ -1219,7 +1219,7 @@ int SystemTools::EstimateFormatLength(const char *format, va_list ap)
}
}
- return length;
+ return (int)length;
}
kwsys_stl::string SystemTools::EscapeChars(
@@ -2581,7 +2581,7 @@ int OldWindowsGetLongPath(kwsys_stl::string const& shortPath,
{
longPath = shortPath;
}
- return longPath.size();
+ return (int)longPath.size();
}
diff --git a/Source/kwsys/hashtable.hxx.in b/Source/kwsys/hashtable.hxx.in
index ce5c7dd..889fe15 100644
--- a/Source/kwsys/hashtable.hxx.in
+++ b/Source/kwsys/hashtable.hxx.in
@@ -392,7 +392,7 @@ static const unsigned long _stl_prime_list[_stl_num_primes] =
1610612741ul, 3221225473ul, 4294967291ul
};
-inline unsigned long _stl_next_prime(unsigned long __n)
+inline size_t _stl_next_prime(size_t __n)
{
const unsigned long* __first = _stl_prime_list;
const unsigned long* __last = _stl_prime_list + (int)_stl_num_primes;
diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx
index 444f6d9..bd4fc22 100644
--- a/Source/kwsys/testDynamicLoader.cxx
+++ b/Source/kwsys/testDynamicLoader.cxx
@@ -86,6 +86,9 @@ int TestDynamicLoader(const char* libname, const char* symbol, int r1, int r2, i
int main(int argc, char *argv[])
{
+#if defined(_WIN32)
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
+#endif
int res;
if( argc == 3 )
{