diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-09 06:08:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-09 06:08:24 +0000 |
commit | 115eb4595cea72226ec8acd357e7c403e2c4b04a (patch) | |
tree | c050f1ee16f730fc7dbc89586e09b33a23196485 /sprintf.c | |
parent | 9b64dfe3b8f0343ebf97ae80d3a4ec3f4bd115b3 (diff) |
990209
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -13,6 +13,10 @@ #include "ruby.h" #include <ctype.h> +#ifndef atof +double strtod(); +#endif + #ifdef USE_CWGUSI static void fmt_setup(); #else @@ -570,7 +574,7 @@ rb_f_sprintf(argc, argv) fval = rb_big2dbl(val); break; case T_STRING: - fval = atof(RSTRING(val)->ptr); + fval = strtod(RSTRING(val)->ptr, 0); break; default: Check_Type(val, T_FLOAT); |