summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-13 20:23:24 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-13 20:23:24 +0000
commit96989be3bc50b6c1465b0f1ebc67c335197c6e3e (patch)
tree5c6375ffd155ffda61591e362de9cc3f2e79f3df /toke.c
parenta8be16862b9dea9c8922a18387c36d2042cc8334 (diff)
downloadperl-96989be3bc50b6c1465b0f1ebc67c335197c6e3e.tar.gz
don't check for errno after Atof() (atof() doesn't set errno, and
where Atof() is actually strto[l]d(), some platforms seem to want to set errno randomly) p4raw-id: //depot/perl@5707
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index 817747630c..dcb44541e8 100644
--- a/toke.c
+++ b/toke.c
@@ -6983,9 +6983,9 @@ Perl_scan_num(pTHX_ char *start)
UV uv;
errno = 0;
if (*PL_tokenbuf == '-')
- iv = Atol(PL_tokenbuf);
+ iv = Strtol(PL_tokenbuf, (char**)NULL, 10);
else
- uv = Atoul(PL_tokenbuf);
+ uv = Strtoul(PL_tokenbuf, (char**)NULL, 10);
if (errno)
floatit = TRUE; /* probably just too large */
else if (*PL_tokenbuf == '-')
@@ -6994,14 +6994,9 @@ Perl_scan_num(pTHX_ char *start)
sv_setuv(sv, uv);
}
if (floatit) {
- char *tp;
- errno = 0;
value = Atof(PL_tokenbuf);
- if (errno)
- Perl_die(aTHX_ "unparseable float");
- else
- sv_setnv(sv, value);
- }
+ sv_setnv(sv, value);
+ }
#endif
if ( floatit ? (PL_hints & HINT_NEW_FLOAT) :
(PL_hints & HINT_NEW_INTEGER) )