| ... | ... | @@ -24,6 +24,9 @@ |
| 24 | 24 | # include <wchar.h> |
| 25 | 25 | # include <wctype.h> |
| 26 | 26 | #endif |
| 27 | #if defined(_LIBCPP_BUILDING_LIBRARY) |
| 28 | # include <langinfo.h> |
| 29 | #endif |
| 27 | 30 | |
| 28 | 31 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 29 | 32 | # pragma GCC system_header |
| ... | ... | @@ -74,6 +77,10 @@ inline __lconv_t* __localeconv(__locale_t& __loc) { |
| 74 | 77 | __locale_guard __current(__loc); |
| 75 | 78 | return ::localeconv(); |
| 76 | 79 | } |
| 80 | |
| 81 | inline _LIBCPP_HIDE_FROM_ABI const char* __get_locale_encoding(__locale_t __loc) { |
| 82 | return ::nl_langinfo_l(CODESET, __loc); |
| 83 | } |
| 77 | 84 | #endif // _LIBCPP_BUILDING_LIBRARY |
| 78 | 85 | |
| 79 | 86 | // |