From: Gurusamy Sarathy Date: Mon, 13 Mar 2000 20:23:24 +0000 (+0000) Subject: don't check for errno after Atof() (atof() doesn't set errno, and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96989be3bc50b6c1465b0f1ebc67c335197c6e3e;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/toke.c b/toke.c index 8177476..dcb4454 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) )