diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-12-18 11:52:17 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-12-18 11:52:17 -0500 |
commit | d7bab388b818fc21dbb9111311e114ae33e11fff (patch) | |
tree | abbd0e59977691d8178e2eab58f72ee38ef30bde /gcc/gdbhooks.py | |
parent | 266d74647567e610cc6fd6fccb7db31081f538e2 (diff) | |
download | gcc-d7bab388b818fc21dbb9111311e114ae33e11fff.zip gcc-d7bab388b818fc21dbb9111311e114ae33e11fff.tar.gz gcc-d7bab388b818fc21dbb9111311e114ae33e11fff.tar.bz2 |
libstdc++: Fix build failure due to missing <langinfo.h> [PR98374]
This should fix a build failure on Windows which lacks <langinfo.h>,
from which we use nl_langinfo() to obtain the radix character of the
current locale. (We can't use the more portable localeconv() from
<clocale> to obtain the radix character of the current locale here
because it's not thread-safe, unfortunately.)
This change means that on Windows and other such platforms, we'll just
always assume the radix character used by printf is '.' when formatting
a long double through it.
libstdc++-v3/ChangeLog:
PR libstdc++/98374
* src/c++17/floating_to_chars.cc: Guard include of <langinfo.h>
with __has_include.
(__floating_to_chars_precision) [!defined(RADIXCHAR)]: Don't
attempt to obtain the radix character of the current locale,
just assume it's '.'.
Diffstat (limited to 'gcc/gdbhooks.py')
0 files changed, 0 insertions, 0 deletions