summaryrefslogtreecommitdiff
path: root/Source/cmFileLockWin32.cxx
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2014-12-05 17:18:11 +0300
committerBrad King <brad.king@kitware.com>2014-12-05 12:59:37 -0500
commit97841dad2ba5a79acb0b22db9a01ae45f7b2e80b (patch)
treea549030bf27c8d94e42fbbd35e723ff56206c07b /Source/cmFileLockWin32.cxx
parent356f7cf4457271ee85a71face453ea9579f05da3 (diff)
downloadcmake-97841dad2ba5a79acb0b22db9a01ae45f7b2e80b.tar.gz
file: Use 'long' to represent the parsed LOCK TIMEOUT value
Convert the StringToInt helper into a StringToLong helper with a 'long' result type. This will make the helper more useful to other callers that want to use strtol. While at it, also check errno after calling strtol in case the conversion fails with a range error.
Diffstat (limited to 'Source/cmFileLockWin32.cxx')
-rw-r--r--Source/cmFileLockWin32.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFileLockWin32.cxx b/Source/cmFileLockWin32.cxx
index 17231eaa92..469168985f 100644
--- a/Source/cmFileLockWin32.cxx
+++ b/Source/cmFileLockWin32.cxx
@@ -86,7 +86,7 @@ cmFileLockResult cmFileLock::LockWithoutTimeout()
}
}
-cmFileLockResult cmFileLock::LockWithTimeout(unsigned seconds)
+cmFileLockResult cmFileLock::LockWithTimeout(unsigned long seconds)
{
const DWORD flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY;
while (true)