summaryrefslogtreecommitdiff
path: root/src/cc-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cc-compat.h')
-rw-r--r--src/cc-compat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cc-compat.h b/src/cc-compat.h
index 8aaa8bb5a..7ade561f3 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -48,6 +48,11 @@
/* Define the printf format specifer to use for size_t output */
#if defined(_MSC_VER) || defined(__MINGW32__)
+/* Visual Studio 2012 and prior lack PRId64 entirely */
+# ifndef PRId64
+# define PRId64 "I64d"
+# endif
+
/* The first block is needed to avoid warnings on MingW amd64 */
# if (SIZE_MAX == ULLONG_MAX)
# define PRIuZ "I64u"