strtod: work around IRIX 6.5 bug
authorEric Blake <eblake@redhat.com>
Thu, 2 Sep 2010 03:34:44 +0000 (21:34 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 8 Sep 2010 17:38:58 +0000 (11:38 -0600)
commit74faf641ba38dfc7d53b2d5b55cdf779ada920e6
treea0444d10b81fba1057eb86f858d9b5e9f87858ec
parent7b854ba12ccca6d68981f96c0f21ded6a962372e
strtod: work around IRIX 6.5 bug

IRIX mis-parses "1e 1" as 10.0 and "" instead of 1.0 and "e 1".
Because the original parse may differ from the reparse in terms
of whether the value overflows, we have to do an errno dance.

* lib/strtod.c (strtod): Reparse number on shorter string if
exponent parse was invalid.
* tests/test-strtod.c (main): Add check for "0x1p 2".
Reported by Tom G. Christensen.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/strtod.c
tests/test-strtod.c