diff --git a/src/core/soci-platform.h b/src/core/soci-platform.h index cc2af3447..57028b606 100644 --- a/src/core/soci-platform.h +++ b/src/core/soci-platform.h @@ -22,18 +22,25 @@ #define HAVE_SNPRINTF 1 #define snprintf _snprintf -// Define if you have the strtoll variants. +// Define if you have the strtoll and strtoull variants. #if _MSC_VER >= 1300 # define HAVE_STRTOLL 1 +# define HAVE_STRTOULL 1 namespace std { inline long long strtoll(char const* str, char** str_end, int base) { return _strtoi64(str, str_end, base); } + + inline unsigned long long strtoull(char const* str, char** str_end, int base) + { + return _strtoui64(str, str_end, base); + } } #else # undef HAVE_STRTOLL -# error "Visual C++ versions prior 1300 don't support strtoi64" +# undef HAVE_STRTOULL +# error "Visual C++ versions prior 1300 don't support _strtoi64 and _strtoui64" #endif // _MSC_VER >= 1300 #endif // _MSC_VER