diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-11-10 16:50:39 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-11-10 16:50:39 +0100 |
commit | 29520adf7d46186470718cbd7d277db6c85ac0be (patch) | |
tree | 364d6c4afe9d005e2b9beb0b1aea88274f12379d | |
parent | 9ff5780962762f262b82544d98f77e7e3a7b3fab (diff) | |
download | gcc-29520adf7d46186470718cbd7d277db6c85ac0be.zip gcc-29520adf7d46186470718cbd7d277db6c85ac0be.tar.gz gcc-29520adf7d46186470718cbd7d277db6c85ac0be.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/config/locale/gnu/c_locale.cc | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e0ee343..bf13f59 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2006-11-10 Jakub Jelinek <jakub@redhat.com> + + * config/locale/gnu/c_locale.cc (__convert_to_v): Prefer + strtold_l over __strtold_l if available. + 2006-11-07 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/29722 diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc index 8a42638..37db702 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 |