From 3ad39e9878310e5317ee73c9b353c1e2c1c5c4ee Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sat, 11 Jul 2026 22:48:30 +0800 Subject: lib: establish Zircon libc++ and KTL foundation --- lib/ktl/include/wchar.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/ktl/include/wchar.h (limited to 'lib/ktl/include/wchar.h') diff --git a/lib/ktl/include/wchar.h b/lib/ktl/include/wchar.h new file mode 100644 index 0000000..b3f2ccb --- /dev/null +++ b/lib/ktl/include/wchar.h @@ -0,0 +1,23 @@ +// Copyright 2023 The Fuchsia Authors +// +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file or at +// https://opensource.org/licenses/MIT + +#ifndef ZIRCON_KERNEL_LIB_KTL_INCLUDE_WCHAR_H_ +#define ZIRCON_KERNEL_LIB_KTL_INCLUDE_WCHAR_H_ + +// This file is included by and the like that are used from other +// libc++ headers that are wrapped by ktl. This file exists to preempt those +// inclusions so that libc++'s wrapper header won't be used, since +// it's not compatible with the kernel environment. However, other libc++ +// headers also use `#include_next ` to get to "the system libc" +// version of the header. To satisfy those, include-after/wchar.h provides the +// actual declarations needed from the standard C API. So this +// header just defers to that one, but must exist separately in this directory +// so that it preempt's libc++'s wrapper. This can't itself use #include_next +// because that would reach libc++'s wrapper before the include-after file. + +#include "../include-after/wchar.h" + +#endif // ZIRCON_KERNEL_LIB_KTL_INCLUDE_WCHAR_H_ -- cgit v1.2.3