use "I64u" instead of PRIu64 on Windows
This commit is contained in:
parent
53b3087735
commit
274f17bce0
|
@ -89,12 +89,13 @@
|
||||||
#define HAVE_GETRLIMIT
|
#define HAVE_GETRLIMIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* printf and size_t support */
|
/* printf support for size_t and uint64_t */
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
/* Windows uses %Iu for size_t */
|
|
||||||
#define PRINTF_SIZE_T "%Iu"
|
#define PRINTF_SIZE_T "%Iu"
|
||||||
|
#define PRINTF_UINT64_T "%I64u"
|
||||||
#else
|
#else
|
||||||
#define PRINTF_SIZE_T "%zu"
|
#define PRINTF_SIZE_T "%zu"
|
||||||
|
#define PRINTF_UINT64_T ("%" PRIu64)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SSL_SUPPORT
|
#ifdef SSL_SUPPORT
|
||||||
|
|
|
@ -315,7 +315,7 @@ const char* uhub_ulltoa(uint64_t val)
|
||||||
{
|
{
|
||||||
static char buf[22];
|
static char buf[22];
|
||||||
|
|
||||||
return snprintf(buf, sizeof(buf), "%"PRIu64, val) < 0 ? NULL : buf;
|
return snprintf(buf, sizeof(buf), PRINTF_UINT64_T, val) < 0 ? NULL : buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue