diff options
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index c516f8d651..f578c128f8 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -123,15 +123,19 @@ size_t strlcpy(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2)); #ifdef _MSC_VER #define U64_PRINTF_ARG(a) (a) #define U64_SCANF_ARG(a) (a) -#define U64_FORMAT "%I64u" #define U64_LITERAL(n) (n ## ui64) #else #define U64_PRINTF_ARG(a) ((long long unsigned int)(a)) #define U64_SCANF_ARG(a) ((long long unsigned int*)(a)) -#define U64_FORMAT "%llu" #define U64_LITERAL(n) (n ## llu) #endif +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__) +#define U64_FORMAT "%I64u" +#else +#define U64_FORMAT "%llu" +#endif + /** Represents an mmaped file. Allocated via tor_mmap_file; freed with * tor_munmap_file. */ typedef struct tor_mmap_t { |