mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-03 01:10:24 +08:00
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>
This commit is contained in:
parent
358fd42aab
commit
9bf91fa360
@ -5834,6 +5834,9 @@ AC_LANG_SAVE
|
||||
AC_MSG_CHECKING([whether nl_langinfo_l is defined in <langinfo.h>])
|
||||
AC_TRY_COMPILE([
|
||||
#include <locale.h>
|
||||
#if __has_include(<xlocale.h>)
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
#include <langinfo.h>
|
||||
],[
|
||||
locale_t loc = newlocale(LC_ALL_MASK, "", (locale_t)0);
|
||||
|
3
libstdc++-v3/configure
vendored
3
libstdc++-v3/configure
vendored
@ -54533,6 +54533,9 @@ $as_echo_n "checking whether nl_langinfo_l is defined in <langinfo.h>... " >&6;
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <locale.h>
|
||||
#if __has_include(<xlocale.h>)
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
#include <langinfo.h>
|
||||
|
||||
int
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user