fix build on vs2013-vs2015

This commit is contained in:
Yasuhiro Matsumoto
2016-12-08 15:38:19 +09:00
parent 0d38ede33b
commit eda6c1dc05
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -357,7 +357,11 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
while (width++) {
val /= 2;
}
#if defined(_ISOC99_SOURCE)
val = trunc(val);
#else
val = val > 0 ? floor(val) : ceil(val);
#endif
if (val == 0 && mrb_float(x) < 0) {
return mrb_fixnum_value(-1);
}