mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
BUG 97: Fix strtoull() detection on serveral platforms.
This commit is contained in:
@@ -139,6 +139,8 @@ if (UNIX)
|
|||||||
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
|
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
|
||||||
check_function_exists(ntohll HAVE_NTOHLL)
|
check_function_exists(ntohll HAVE_NTOHLL)
|
||||||
check_function_exists(htonll HAVE_HTONLL)
|
check_function_exists(htonll HAVE_HTONLL)
|
||||||
|
check_function_exists(strtoull HAVE_STRTOULL)
|
||||||
|
check_function_exists(__strtoull HAVE___STRTOULL)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries")
|
set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries")
|
||||||
|
@@ -100,6 +100,12 @@
|
|||||||
/* Define to 1 if you have the `htonll' function. */
|
/* Define to 1 if you have the `htonll' function. */
|
||||||
#cmakedefine HAVE_HTONLL 1
|
#cmakedefine HAVE_HTONLL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtoull' function. */
|
||||||
|
#cmakedefine HAVE_STRTOULL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `__strtoull' function. */
|
||||||
|
#cmakedefine HAVE___STRTOULL 1
|
||||||
|
|
||||||
/*************************** LIBRARIES ***************************/
|
/*************************** LIBRARIES ***************************/
|
||||||
|
|
||||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||||
|
@@ -47,6 +47,16 @@
|
|||||||
# endif /* __WORDSIZE */
|
# endif /* __WORDSIZE */
|
||||||
# endif /* PRIu64 */
|
# 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
|
# ifdef _MSC_VER
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|
||||||
@@ -56,7 +66,9 @@
|
|||||||
|
|
||||||
# define strcasecmp _stricmp
|
# define strcasecmp _stricmp
|
||||||
# define strncasecmp _strnicmp
|
# 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 isblank(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r')
|
||||||
|
|
||||||
# define usleep(X) Sleep(((X)+1000)/1000)
|
# define usleep(X) Sleep(((X)+1000)/1000)
|
||||||
|
Reference in New Issue
Block a user