aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-02-16 20:21:37 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-02-16 20:21:37 -0700
commit6793548868749ac7638000182fe9b730179b2b82 (patch)
treeaad447cc154861cb480568f5677b0cf66eb06fe3 /src
parent58c13aa949a571f4605ae1392cfd1e086fb820a7 (diff)
downloadzig-6793548868749ac7638000182fe9b730179b2b82.tar.gz
zig-6793548868749ac7638000182fe9b730179b2b82.zip
fix 64 bit integer printing for mingw
in order to do this I had to turn off -pedantic
Diffstat (limited to 'src')
-rw-r--r--src/bignum.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bignum.cpp b/src/bignum.cpp
index e98cce7436..3eaf3ac359 100644
--- a/src/bignum.cpp
+++ b/src/bignum.cpp
@@ -9,6 +9,7 @@
#include <assert.h>
#include <math.h>
+#include <inttypes.h>
static void bignum_normalize(BigNum *bn) {
assert(bn->kind == BigNumKindInt);
@@ -264,7 +265,8 @@ Buf *bignum_to_buf(BigNum *bn) {
return buf_sprintf("%f", bn->data.x_float);
} else {
const char *neg = bn->is_negative ? "-" : "";
- return buf_sprintf("%s%llu", neg, bn->data.x_uint);
+ uintmax_t value = bn->data.x_uint;
+ return buf_sprintf("%s%" PRIuMAX, neg, value);
}
}