use "I64u" instead of PRIu64 on Windows

This commit is contained in:
Tilka 2012-05-11 16:45:07 +02:00
parent 53b3087735
commit 274f17bce0
2 changed files with 4 additions and 3 deletions

View File

@ -89,12 +89,13 @@
#define HAVE_GETRLIMIT
#endif
/* printf and size_t support */
/* printf support for size_t and uint64_t */
#if defined(WIN32)
/* Windows uses %Iu for size_t */
#define PRINTF_SIZE_T "%Iu"
#define PRINTF_UINT64_T "%I64u"
#else
#define PRINTF_SIZE_T "%zu"
#define PRINTF_UINT64_T ("%" PRIu64)
#endif
#ifdef SSL_SUPPORT

View File

@ -315,7 +315,7 @@ const char* uhub_ulltoa(uint64_t val)
{
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;
}