From b14df297fa72a9c40a6548b11e70185877abe0de Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 3 Dec 2012 14:00:06 +0100 Subject: BUG 97: Fix strtoull() detection on serveral platforms. --- include/libssh/priv.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/libssh') diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 4e51e0f..89df493 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -47,6 +47,16 @@ # endif /* __WORDSIZE */ # endif /* PRIu64 */ +#if !defined(HAVE_STRTOULL) +# if defined(HAVE___STRTOULL) +# define strtoull __strtoull +# elif defined(__hpux) && defined(__LP64__) +# define strtoull strtoul +# else +# error "no strtoull function found" +# endif +#endif /* !defined(HAVE_STRTOULL) */ + # ifdef _MSC_VER # include @@ -56,7 +66,9 @@ # define strcasecmp _stricmp # define strncasecmp _strnicmp -# define strtoull _strtoui64 +# if !defined(HAVE_STRTOULL) +# define strtoull _strtoui64 +# endif # define isblank(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r') # define usleep(X) Sleep(((X)+1000)/1000) -- cgit