summaryrefslogtreecommitdiffhomepage
path: root/src/state.c
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-01-13 23:24:57 +0900
committerKOBAYASHI Shuji <[email protected]>2019-01-13 23:24:57 +0900
commit0e04c46261eb9d5193f21d423f5d00f1910a460a (patch)
tree19d9c28bbe8e925b1b27986fbc376693dba5cd54 /src/state.c
parent9f081183d2351195c821fbe1520975ba000cafb5 (diff)
downloadmruby-0e04c46261eb9d5193f21d423f5d00f1910a460a.tar.gz
mruby-0e04c46261eb9d5193f21d423f5d00f1910a460a.zip
Use 2 digits exponent format for `printf` family on old MSVC
For conforming C standard.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c
index 5583a77e5..e678b37f3 100644
--- a/src/state.c
+++ b/src/state.c
@@ -41,6 +41,10 @@ mrb_open_core(mrb_allocf f, void *ud)
mrb_init_core(mrb);
+#if !defined(MRB_DISABLE_STDIO) && defined(_MSC_VER) && _MSC_VER < 1900
+ _set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
+
return mrb;
}