Skip to content

Commit b71e3ed

Browse files
frobtechgnoliyil
authored andcommitted
[kernel][ktl] Update for upstream libc++ <cwchar> changes
This fixes the kernel's stubbed-out <cwchar> header to match the new internal API expected by recent upstream libc++ changes. Fixed: 117187 Change-Id: I132e8baa91d5b60a9a9d308b809c98c5b48c0788 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/774684 Reviewed-by: Haowei Wu <haowei@google.com> Fuchsia-Auto-Submit: Roland McGrath <mcgrathr@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
1 parent 829a733 commit b71e3ed

File tree

1 file changed

+17
-0
lines changed
  • zircon/kernel/lib/ktl/include

1 file changed

+17
-0
lines changed

zircon/kernel/lib/ktl/include/cwchar

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ using ::wmemcpy;
2020
using ::wmemmove;
2121
using ::wmemset;
2222

23+
// These are called by libc++ header code that should never be instantiated.
24+
25+
constexpr size_t __constexpr_wcslen(const wchar_t* str) {
26+
__builtin_abort();
27+
return 0;
28+
}
29+
30+
constexpr int __constexpr_wmemcmp(const wchar_t* lhs, const wchar_t* rhs, size_t count) {
31+
__builtin_abort();
32+
return -1;
33+
}
34+
35+
constexpr const wchar_t* __constexpr_wmemchr(const wchar_t* str, wchar_t wc, size_t count) {
36+
__builtin_abort();
37+
return nullptr;
38+
}
39+
2340
_LIBCPP_END_NAMESPACE_STD
2441

2542
#endif // ZIRCON_KERNEL_LIB_KTL_INCLUDE_CWCHAR

0 commit comments

Comments
 (0)