diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2014-12-05 14:18:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-05 17:59:37 (GMT) |
commit | 97841dad2ba5a79acb0b22db9a01ae45f7b2e80b (patch) | |
tree | a549030bf27c8d94e42fbbd35e723ff56206c07b /Source/cmSystemTools.h | |
parent | 356f7cf4457271ee85a71face453ea9579f05da3 (diff) | |
download | CMake-97841dad2ba5a79acb0b22db9a01ae45f7b2e80b.zip CMake-97841dad2ba5a79acb0b22db9a01ae45f7b2e80b.tar.gz CMake-97841dad2ba5a79acb0b22db9a01ae45f7b2e80b.tar.bz2 |
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/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 763389b..d49af74 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -458,8 +458,8 @@ public: static std::vector<std::string> tokenize(const std::string& str, const std::string& sep); - /** Convert string to int. Expected that the whole string is an integer */ - static bool StringToInt(const char* str, int* value); + /** Convert string to long. Expected that the whole string is an integer */ + static bool StringToLong(const char* str, long* value); #ifdef _WIN32 struct WindowsFileRetry |