diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-12-03 14:00:06 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-12-03 14:00:06 +0100 |
commit | b14df297fa72a9c40a6548b11e70185877abe0de (patch) | |
tree | 9bcbdd0de87f33039cfc57e9be659bf79dc0b208 /include | |
parent | 3896aa43ffe5d4e55f42065529ecaa8fdb39ed04 (diff) | |
download | libssh-b14df297fa72a9c40a6548b11e70185877abe0de.tar.gz libssh-b14df297fa72a9c40a6548b11e70185877abe0de.tar.xz libssh-b14df297fa72a9c40a6548b11e70185877abe0de.zip |
BUG 97: Fix strtoull() detection on serveral platforms.
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/priv.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 4e51e0fd..89df493d 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 <stdio.h> @@ -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) |