Fix minGW compatibility issue with zu format specifier.

Define TOR_PRIuSZ as minGW compiler doesn't support zu format specifier for
size_t type.

Fixes #24861 on ac9eebd.

Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
This commit is contained in:
Fernando Fernandez Mancera
2018-01-12 17:44:30 +01:00
parent c8c258a433
commit 06368e5310
3 changed files with 22 additions and 4 deletions
+10
View File
@@ -348,6 +348,16 @@ typedef uint32_t uintptr_t;
#endif /* (SIZEOF_SIZE_T == 4) || ... */
#endif /* !defined(SIZE_MAX) */
#ifdef _WIN32
# ifdef _WIN64
# define TOR_PRIuSZ PRIu64
# else
# define TOR_PRIuSZ PRIu32
# endif
#else
# define TOR_PRIuSZ "zu"
#endif
#ifndef SSIZE_MAX
#if (SIZEOF_SIZE_T == 4)
#define SSIZE_MAX INT32_MAX