diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-13 00:09:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-13 00:09:31 +0900 |
| commit | 70e99d6b5725451c1d3fa8554e1195e22f1db44a (patch) | |
| tree | 44a4ef5f5c160c7c0296283e16a5260a96293275 | |
| parent | 7fa9321c18b3f0525ba8c75b02768ec27f534efc (diff) | |
| download | mruby-70e99d6b5725451c1d3fa8554e1195e22f1db44a.tar.gz mruby-70e99d6b5725451c1d3fa8554e1195e22f1db44a.zip | |
Define `round()` only on WIN32 platform; fix #3741
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 2 |
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)); |
