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:
Yukihiro "Matz" Matsumoto
2012-09-10 23:00:30 -07:00
+4 -1
View File
@@ -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 = "...") : \