Skip to content

Commit

Permalink
Define std::strtoull for MSVC compiler.
Browse files Browse the repository at this point in the history
This function is used in Oracle backend.
  • Loading branch information
mloskot committed Feb 22, 2013
1 parent cf56ee4 commit d10d85f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/core/soci-platform.h
Expand Up @@ -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

Expand Down

0 comments on commit d10d85f

Please sign in to comment.