Hi Eric, On HP-UX 11.11 and 11.31 I see this test failure:
test-strtod.c:588: assertion failed and when this one is fixed: test-strtod.c:652: assertion failed The reason is that the system's strtod function, when parsing infinity or nan, clobbers errno. (In fact, the test in m4/strtod.m4 fails with exit code 120 = 64 | 32 | 16 | 8.) This fixes it for me. OK to commit? 2010-12-31 Bruno Haible <[email protected]> strtod: Restore errno when successfully parsing Infinity or NaN. * lib/strtod.c (strtod): After successfully parsing an Infinity or NaN, restore the original errno. --- lib/strtod.c.orig Sat Jan 1 02:53:15 2011 +++ lib/strtod.c Sat Jan 1 02:53:02 2011 @@ -303,6 +303,7 @@ && c_tolower (s[4]) == 'y') s += 5; num = HUGE_VAL; + errno = saved_errno; } else if (c_tolower (*s) == 'n' && c_tolower (s[1]) == 'a' @@ -325,6 +326,7 @@ to interpreting n-char-sequence as a hexadecimal number. */ if (s != end) num = NAN; + errno = saved_errno; } else {
