diff options
| author | cremno <[email protected]> | 2016-03-22 11:46:49 +0100 |
|---|---|---|
| committer | cremno <[email protected]> | 2016-03-22 11:46:49 +0100 |
| commit | 30b0100e6cffe12d09e497f609b174d819d04014 (patch) | |
| tree | eb75c035d0f4669ed5713cf8d1492607a614fbdc /include | |
| parent | bfc7b2e30fe2d35ffddf56ea7ccff178cc9b7e9b (diff) | |
| download | mruby-30b0100e6cffe12d09e497f609b174d819d04014.tar.gz mruby-30b0100e6cffe12d09e497f609b174d819d04014.zip | |
fix VS2010/2012 build
They don't have <inttypes.h>, only <stdint.h>.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/value.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h index 0eac19df9..4330b9441 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -22,7 +22,19 @@ struct mrb_state; # error "You can't define MRB_INT16 and MRB_INT64 at the same time." #endif -#include <inttypes.h> +#if defined _MSC_VER && _MSC_VER < 1800 +# define PRIo64 "llo" +# define PRId64 "lld" +# define PRIx64 "llx" +# define PRIo16 "ho" +# define PRId16 "hd" +# define PRIx16 "hx" +# define PRIo32 "o" +# define PRId32 "d" +# define PRIx32 "x" +#else +# include <inttypes.h> +#endif #if defined(MRB_INT64) typedef int64_t mrb_int; |
