aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 707a349f0..97d264fd8 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -62,6 +62,16 @@ size_t strlcat(char *dst, const char *src, size_t siz);
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
+#ifdef MS_WINDOWS
+#define U64_PRINTF_ARG(a) (a)
+#define U64_SCANF_ARG(a) (a)
+#dfeine U64_FORMAT "%I64u"
+#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"
+#endif
+
int tor_snprintf(char *str, size_t size, const char *format, ...)
CHECK_PRINTF(3,4);
int tor_vsnprintf(char *str, size_t size, const char *format, va_list args);