diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-04 16:28:02 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-04 16:28:02 +0900 |
| commit | ea80e8285247992fc4308621571eed9a0e215184 (patch) | |
| tree | 4fb483d7d65372558052cdc4baf378ac104e4116 /include | |
| parent | db7b01c0b360b2909b14dbd399ee5a3eb2fce0c5 (diff) | |
| parent | 0fa3668e917c45409acd56ba624db24d95699895 (diff) | |
| download | mruby-ea80e8285247992fc4308621571eed9a0e215184.tar.gz mruby-ea80e8285247992fc4308621571eed9a0e215184.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/value.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h index e2c9223e9..30c39c5f2 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -31,7 +31,7 @@ struct mrb_state; # define MRB_INT_MIN (INT32_MIN>>MRB_FIXNUM_SHIFT) # define MRB_INT_MAX (INT32_MAX>>MRB_FIXNUM_SHIFT) #endif - + #ifdef MRB_USE_FLOAT typedef float mrb_float; # define mrb_float_to_str(buf, i) sprintf(buf, "%.7e", i) @@ -47,7 +47,11 @@ struct mrb_state; # define inline __inline # endif # if _MSC_VER < 1900 -# define snprintf _snprintf +# include <stdarg.h> +MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg); +MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...); +# define vsnprintf(s, n, format, arg) mrb_msvc_vsnprintf(s, n, format, arg) +# define snprintf(s, n, format, ...) mrb_msvc_snprintf(s, n, format, __VA_ARGS__) # endif # if _MSC_VER < 1800 # include <float.h> |
