summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-07-07 22:47:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-07-07 22:47:49 +0900
commitce6c05600af11f540302145ff4b6988a5a37518a (patch)
tree59ae21e6be92d631377ba1c62244661f08c1587b /include
parent718a9ceb6ee16d5581d99ea6b66624ad98782a32 (diff)
downloadmruby-ce6c05600af11f540302145ff4b6988a5a37518a.tar.gz
mruby-ce6c05600af11f540302145ff4b6988a5a37518a.zip
Add fallback definitions of `DBL_EPSILPN` and `LDBL_EPSILON`; fix #3733
This is a workaround for mingw-w64 (5.3.1) bug.
Diffstat (limited to 'include')
-rw-r--r--include/mruby.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 9ffe37a2e..592ab1f04 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -65,6 +65,13 @@
#include "mrbconf.h"
+#ifndef DBL_EPSILON
+#define DBL_EPSILON ((double)2.22044604925031308085e-16L)
+#endif
+#ifndef LDBL_EPSILON
+#define LDBL_EPSILON (1.08420217248550443401e-19L)
+#endif
+
#ifdef MRB_USE_FLOAT
#define MRB_FLOAT_EPSILON FLT_EPSILON
#else