summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-time/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-07-13 00:09:31 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-07-13 00:09:31 +0900
commit70e99d6b5725451c1d3fa8554e1195e22f1db44a (patch)
tree44a4ef5f5c160c7c0296283e16a5260a96293275 /mrbgems/mruby-time/src
parent7fa9321c18b3f0525ba8c75b02768ec27f534efc (diff)
downloadmruby-70e99d6b5725451c1d3fa8554e1195e22f1db44a.tar.gz
mruby-70e99d6b5725451c1d3fa8554e1195e22f1db44a.zip
Define `round()` only on WIN32 platform; fix #3741
Diffstat (limited to 'mrbgems/mruby-time/src')
-rw-r--r--mrbgems/mruby-time/src/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c
index 33755f570..bd72d3bbd 100644
--- a/mrbgems/mruby-time/src/time.c
+++ b/mrbgems/mruby-time/src/time.c
@@ -18,7 +18,7 @@
#define NDIV(x,y) (-(-((x)+1)/(y))-1)
-#if _MSC_VER < 1800
+#if defined(_MSC_VER) && _MSC_VER < 1800
double round(double x) {
if (x >= 0.0) {
return (double)((int)(x + 0.5));