diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-01-30 14:28:09 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-01-31 09:42:39 +0000 |
commit | 9bf91fa360156476bce9899394f81b1e875593f4 (patch) | |
tree | 6f21cb8944d132d6879901c0619dd10f36540954 /libstdc++-v3/src | |
parent | 358fd42aabec56e471ed3c8e6f3dccbc305ff6f7 (diff) | |
download | gcc-9bf91fa360156476bce9899394f81b1e875593f4.zip gcc-9bf91fa360156476bce9899394f81b1e875593f4.tar.gz gcc-9bf91fa360156476bce9899394f81b1e875593f4.tar.bz2 |
libstdc++: Enable std::text_encoding for darwin and FreeBSD
The <xlocale.h> header is needed for newlocale and locale_t on these
targets.
libstdc++-v3/ChangeLog:
* acinclude.m4 (GLIBCXX_CHECK_TEXT_ENCODING): Use <xlocale.h> if
needed for newlocale.
* configure: Regenerate.
* src/c++26/text_encoding.cc: Use <xlocale.h>.
Reviewed-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++26/text_encoding.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/src/c++26/text_encoding.cc b/libstdc++-v3/src/c++26/text_encoding.cc index 33c6c07..b9a50ef 100644 --- a/libstdc++-v3/src/c++26/text_encoding.cc +++ b/libstdc++-v3/src/c++26/text_encoding.cc @@ -27,6 +27,9 @@ #ifdef _GLIBCXX_USE_NL_LANGINFO_L #include <locale.h> +#if __has_include(<xlocale.h>) +# include <xlocale.h> +#endif #include <langinfo.h> #if __CHAR_BIT__ == 8 |