summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-03-23 00:22:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-03-23 00:22:26 +0900
commit7d0612528e564ac07bb0435004fe04c46af295a2 (patch)
treeeb75c035d0f4669ed5713cf8d1492607a614fbdc /include
parent2b0baec32a6bfe72a18199cc864c43d07575b14b (diff)
parent30b0100e6cffe12d09e497f609b174d819d04014 (diff)
downloadmruby-7d0612528e564ac07bb0435004fe04c46af295a2.tar.gz
mruby-7d0612528e564ac07bb0435004fe04c46af295a2.zip
Merge pull request #3139 from cremno/fix-vs2010-build
deprecate and fix VS2010/2012 build
Diffstat (limited to 'include')
-rw-r--r--include/mruby/value.h14
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;