mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
This commit is contained in:
committed by
Brad King
parent
356f7cf445
commit
97841dad2b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user