cmake: Check for _strtoui64() on Windows.
Этот коммит содержится в:
родитель
dbf3cdecda
Коммит
8ff6a7a850
@ -103,6 +103,8 @@ check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
|||||||
check_function_exists(snprintf HAVE_SNPRINTF)
|
check_function_exists(snprintf HAVE_SNPRINTF)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
check_function_exists(_strtoui64 HAVE__STRTOUI64)
|
||||||
|
|
||||||
check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S)
|
check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S)
|
||||||
check_function_exists(_vsnprintf HAVE__VSNPRINTF)
|
check_function_exists(_vsnprintf HAVE__VSNPRINTF)
|
||||||
check_function_exists(_snprintf HAVE__SNPRINTF)
|
check_function_exists(_snprintf HAVE__SNPRINTF)
|
||||||
|
@ -106,6 +106,9 @@
|
|||||||
/* Define to 1 if you have the `__strtoull' function. */
|
/* Define to 1 if you have the `__strtoull' function. */
|
||||||
#cmakedefine HAVE___STRTOULL 1
|
#cmakedefine HAVE___STRTOULL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `_strtoui64' function. */
|
||||||
|
#cmakedefine HAVE__STRTOUI64 1
|
||||||
|
|
||||||
/*************************** LIBRARIES ***************************/
|
/*************************** LIBRARIES ***************************/
|
||||||
|
|
||||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||||
|
@ -31,6 +31,18 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRTOULL)
|
||||||
|
# if defined(HAVE___STRTOULL)
|
||||||
|
# define strtoull __strtoull
|
||||||
|
# elif defined(HAVE__STRTOUI64)
|
||||||
|
# define strtoull _strtoui64
|
||||||
|
# elif defined(__hpux) && defined(__LP64__)
|
||||||
|
# define strtoull strtoul
|
||||||
|
# else
|
||||||
|
# error "no strtoull function found"
|
||||||
|
# endif
|
||||||
|
#endif /* !defined(HAVE_STRTOULL) */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
/* Imitate define of inttypes.h */
|
/* Imitate define of inttypes.h */
|
||||||
@ -46,16 +58,6 @@
|
|||||||
# 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>
|
||||||
|
|
||||||
@ -65,9 +67,6 @@
|
|||||||
|
|
||||||
# define strcasecmp _stricmp
|
# define strcasecmp _stricmp
|
||||||
# define strncasecmp _strnicmp
|
# define strncasecmp _strnicmp
|
||||||
# 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)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user