From: Jakub Jelinek Date: Fri, 10 Nov 2006 15:50:39 +0000 (+0100) Subject: c_locale.cc (__convert_to_v): Prefer strtold_l over __strtold_l if available. X-Git-Tag: releases/gcc-4.3.0~8553 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29520adf7d46186470718cbd7d277db6c85ac0be;p=thirdparty%2Fgcc.git c_locale.cc (__convert_to_v): Prefer strtold_l over __strtold_l if available. * config/locale/gnu/c_locale.cc (__convert_to_v): Prefer strtold_l over __strtold_l if available. From-SVN: r118654 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e0ee3438ad00..bf13f595b5ac 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2006-11-10 Jakub Jelinek + + * config/locale/gnu/c_locale.cc (__convert_to_v): Prefer + strtold_l over __strtold_l if available. + 2006-11-07 Benjamin Kosnik PR libstdc++/29722 diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc index 8a42638e0f28..37db702677a3 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.cc +++ b/libstdc++-v3/config/locale/gnu/c_locale.cc @@ -77,7 +77,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { char* __sanity; errno = 0; +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) + // Prefer strtold_l, as __strtold_l isn't prototyped in more recent + // glibc versions. + long double __ld = strtold_l(__s, &__sanity, __cloc); +#else long double __ld = __strtold_l(__s, &__sanity, __cloc); +#endif if (__sanity != __s && errno != ERANGE) __v = __ld; else