Skip to content

Commit acdc25a

Browse files
authored
Avoid setting _LIBCPP_HAS_CATOPEN in libcxx. NFC. (#13741)
This is to avoid unnecessary calls to the message catalog functions, which are currently not supported within Emscripten. Note that since musl v1.1.24 these functions are supported, but this would then add a dependency on `__map_file` (which is currently no-op).
1 parent 5ec2ee1 commit acdc25a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/lib/libcxx/include/__config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ typedef unsigned int char32_t;
909909

910910
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
911911
// Most unix variants have catopen. These are the specific ones that don't.
912-
# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
912+
# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__) // XXX Emscripten catopen always returns -1
913913
# define _LIBCPP_HAS_CATOPEN 1
914914
# endif
915915
#endif

0 commit comments

Comments
 (0)