diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | object.c | 1 | ||||
-rw-r--r-- | util.c | 3 |
3 files changed, 3 insertions, 5 deletions
@@ -66,8 +66,8 @@ Sun May 25 02:37:25 2008 Koichi Sasada <ko1@atdot.net> Sat May 24 22:32:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org> - * object.c (rb_cstr_to_dbl): should clear errno before calling - strtod(3). [ruby-dev:34834] + * util.c (ruby_strtod): clear errno at the top of our own + impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] Sat May 24 15:26:16 2008 Yusuke Endoh <mame@tsg.ne.jp> @@ -2045,7 +2045,6 @@ rb_cstr_to_dbl(const char *p, int badcheck) if (!p) return 0.0; q = p; while (ISSPACE(*p)) p++; - errno = 0; d = strtod(p, &end); if (errno == ERANGE) { OutOfRange(); @@ -1000,8 +1000,6 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem; #define IEEE_Arith #endif -#include "errno.h" - #ifdef Bad_float_h #ifdef IEEE_Arith @@ -2206,6 +2204,7 @@ ruby_strtod(const char *s00, char **se) const char *s2; #endif + errno = 0; sign = nz0 = nz = 0; dval(rv) = 0.; for (s = s00;;s++) |