Skip to content

Commit

Permalink
fix VS2010/2012 build
Browse files Browse the repository at this point in the history
They don't have <inttypes.h>, only <stdint.h>.
  • Loading branch information
cremno committed Mar 22, 2016
1 parent bfc7b2e commit 30b0100
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion include/mruby/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 30b0100

Please sign in to comment.