summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--object.c1
-rw-r--r--util.c3
3 files changed, 3 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c7567f128b..a2c338ce8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/object.c b/object.c
index dca59471ce..c1c60714e2 100644
--- a/object.c
+++ b/object.c
@@ -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();
diff --git a/util.c b/util.c
index fc8874c942..55c7e567f6 100644
--- a/util.c
+++ b/util.c
@@ -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++)