mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #463 from emboss/define_dbl_dig_conditionally
Define DBL_DIG only if it wasn't previously defined
This commit is contained in:
+4
-1
@@ -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 = "...") : \
|
||||
|
||||
Reference in New Issue
Block a user