summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index a454aab97..d8fe56790 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2598,7 +2598,10 @@ mrb_cstr_to_dbl(mrb_state *mrb, const char * p, int badcheck)
double d;
// const char *ellipsis = "";
// int w;
-#define DBL_DIG 16
+#if !defined(DBL_DIG)
+ #define DBL_DIG 16
+#endif
+
enum {max_width = 20};
#define OutOfRange() (((w = end - p) > max_width) ? \
(w = max_width, ellipsis = "...") : \