summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
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/kwsys
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/kwsys')
-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
7 files changed, 15 insertions, 12 deletions
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 )
{