# HG changeset patch # User Paul Eggert # Date 1361312404 28800 # Node ID 201622d6d12f686bdb453cc475fa5e903cf3ba32 # Parent e6a6fd004283badd7f69d02db7eb1560fb198865 strtod: support coreutils better * lib/strtod.c (underlying_strtod): Just invoke the underlying strtod. HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which disables the raw decl checks. This assumes there is an underlying strtod, but that's a safe assumption these days. diff -r e6a6fd004283 -r 201622d6d12f ChangeLog --- a/ChangeLog Tue Feb 19 13:04:35 2013 -0800 +++ b/ChangeLog Tue Feb 19 14:20:04 2013 -0800 @@ -1,5 +1,11 @@ 2013-02-19 Paul Eggert + strtod: support coreutils better + * lib/strtod.c (underlying_strtod): Just invoke the underlying strtod. + HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which + disables the raw decl checks. This assumes there is an underlying + strtod, but that's a safe assumption these days. + mountlist: port to HP NonStop Reported by Joachim Schmitz in . diff -r e6a6fd004283 -r 201622d6d12f lib/strtod.c --- a/lib/strtod.c Tue Feb 19 13:04:35 2013 -0800 +++ b/lib/strtod.c Tue Feb 19 14:20:04 2013 -0800 @@ -344,24 +344,11 @@ return negative ? -num : num; } -/* The "underlying" strtod implementation. This must be defined +/* The underlying strtod implementation. This must be defined after strtod because it #undefs strtod. */ static double underlying_strtod (const char *nptr, char **endptr) { - if (HAVE_RAW_DECL_STRTOD) - { - /* Prefer the native strtod if available. Usually it should - work and it should give more-accurate results than our - approximation. */ - #undef strtod - return strtod (nptr, endptr); - } - else - { - /* Approximate strtod well enough for this module. There's no - need to handle anything but finite unsigned decimal - numbers with nonnull ENDPTR. */ - return parse_number (nptr, 10, 10, 1, 'e', endptr); - } +#undef strtod + return strtod (nptr, endptr); }