summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-07-09 14:57:29 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-07-09 14:57:29 +0900
commit39dd1822446d02f21887bf043e34ac6cf0133b6f (patch)
tree5828b7681b3fc1b9c6b1fc92b735717fde87ecb7
parent40252169fc9762f222106f116f2bcc510b038bf9 (diff)
parent1167fd1ae440aa2b2b3d2cee5cb5a266d83f46e8 (diff)
downloadmruby-39dd1822446d02f21887bf043e34ac6cf0133b6f.tar.gz
mruby-39dd1822446d02f21887bf043e34ac6cf0133b6f.zip
Merge pull request #2880 from mattn/llround
implement llround. some platform (ex: mingw32) doesn't have llround.
-rw-r--r--mrbgems/mruby-time/src/time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c
index 081e84c1c..c18ac7568 100644
--- a/mrbgems/mruby-time/src/time.c
+++ b/mrbgems/mruby-time/src/time.c
@@ -11,6 +11,10 @@
#include "mruby/class.h"
#include "mruby/data.h"
+#if !defined(__MINGW64__) && defined(_WIN32)
+# define llround(x) round(x)
+#endif
+
#if defined(__MINGW64__) || defined(__MINGW32__)
# include <sys/time.h>
#endif