aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-26 07:51:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-26 07:51:46 +0000
commitc2257734e34b0077719fa2b7ff62aaefc20614e9 (patch)
treec8da727469114b267faf2a44f060673385cb52d3 /util.c
parentcf5cf236d727e56e4558f5e30366130413574863 (diff)
downloadruby-c2257734e34b0077719fa2b7ff62aaefc20614e9.tar.gz
* util.c (ruby_strtod): clear errno at the top of our own
impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 1 insertions, 2 deletions
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++)