[libc-commits] [libc] [libc] mbrtowc implementation (PR #144760)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Jun 20 09:49:36 PDT 2025


================
@@ -0,0 +1,22 @@
+//===-- Definition of macros from mbstate_t.h -----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_HDR_TYPES_MBSTATE_T_H
+#define LLVM_LIBC_HDR_TYPES_MBSTATE_T_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/mbstate_t.h"
+
+#else // Overlay mode
+
+#include "hdr/wchar_overlay.h"
----------------
michaelrj-google wrote:

it doesn't really make sense to overlay functions that need mbstate_t, since we don't know what another libc's version has. I'd recommend replacing this include with `#error "Cannot overlay mbstate_t`.

https://github.com/llvm/llvm-project/pull/144760


More information about the libc-commits mailing list