Skip to content

Commit 2ae01b0

Browse files
committed
Fix Emscripten's locale
Before, the code was like https://github.com/emscripten-core/emscripten/blob/dc1abd514b1bade135a01a4453a9ff6def0793b6/system/lib/libcxx/include/__locale_dir/locale_base_api.h#L12-L30 But now they are divided into two parts, one using the new API and the other using old. See "Locale API reimplementation" above. https://github.com/llvm/llvm-project/blob/ec28b8f9cc7f2ac187d8a617a6d08d5e56f9120e/libcxx/include/__locale_dir/locale_base_api.h#L116-L138 This adds Emscripten in the beginning of the "old" API list. (This has to be the beginning; see #23414)
1 parent 9912236 commit 2ae01b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/lib/libcxx/include/__locale_dir/locale_base_api.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
// (by providing global non-reserved names) and the new API. As we move individual platforms
128128
// towards the new way of defining the locale base API, this should disappear since each platform
129129
// will define those directly.
130-
# if defined(_AIX) || defined(__MVS__)
130+
# if defined(__EMSCRIPTEN__)
131+
# include <xlocale.h>
132+
# elif defined(_AIX) || defined(__MVS__)
131133
# include <__locale_dir/locale_base_api/ibm.h>
132134
# elif defined(__ANDROID__)
133135
# include <__locale_dir/locale_base_api/android.h>

0 commit comments

Comments
 (0)