Use %I64d format for printing long longs on Windows
authorPetri Lehtinen <petri@digip.org>
Tue, 1 Nov 2011 17:41:25 +0000 (19:41 +0200)
committerPetri Lehtinen <petri@digip.org>
Tue, 1 Nov 2011 18:49:28 +0000 (20:49 +0200)
Fixes GH-38.

src/jansson.h

index 55c03d7..405c840 100644 (file)
@@ -53,7 +53,11 @@ typedef struct {
 } json_t;
 
 #if JSON_INTEGER_IS_LONG_LONG
+#ifdef _WIN32
+#define JSON_INTEGER_FORMAT "I64d"
+#else
 #define JSON_INTEGER_FORMAT "lld"
+#endif
 typedef long long json_int_t;
 #else
 #define JSON_INTEGER_FORMAT "ld"