diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-16 20:21:37 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-16 20:21:37 -0700 |
| commit | 6793548868749ac7638000182fe9b730179b2b82 (patch) | |
| tree | aad447cc154861cb480568f5677b0cf66eb06fe3 /src | |
| parent | 58c13aa949a571f4605ae1392cfd1e086fb820a7 (diff) | |
| download | zig-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.cpp | 4 |
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); } } |
