From 2554204b615001d14af9125d9953e02fe7a0a262 Mon Sep 17 00:00:00 2001 From: Marcell Leleszi Date: Wed, 3 Dec 2025 18:24:45 +0000 Subject: [PATCH 1/2] Add cmake flag for configuring wctype implementation used --- libc/config/config.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc/config/config.json b/libc/config/config.json index cfbe9a43948ea..a7844e4fe2dd1 100644 --- a/libc/config/config.json +++ b/libc/config/config.json @@ -130,5 +130,11 @@ "value": true, "doc": "Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior." } + }, + "wctype": { + "LIBC_CONF_WCTYPE_MODE": { + "value": "LIBC_WCTYPE_MODE_ASCII", + "doc": "The implementation used for wctype, acceptable values are LIBC_WCTYPE_MODE_ASCII and LIBC_WCTYPE_MODE_UTF8." + } } } From e01265420e2df90eb3abf4b031e6fb2ae7243fa3 Mon Sep 17 00:00:00 2001 From: Marcell Leleszi Date: Thu, 4 Dec 2025 06:16:11 +0000 Subject: [PATCH 2/2] Generate docs --- libc/docs/configure.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/docs/configure.rst b/libc/docs/configure.rst index e23fc824ce7c8..362e293a4b714 100644 --- a/libc/docs/configure.rst +++ b/libc/docs/configure.rst @@ -64,3 +64,5 @@ to learn about the defaults for your platform and target. - ``LIBC_CONF_THREAD_MODE``: The implementation used for Mutex, acceptable values are LIBC_THREAD_MODE_PLATFORM, LIBC_THREAD_MODE_SINGLE, and LIBC_THREAD_MODE_EXTERNAL. * **"time" options** - ``LIBC_CONF_TIME_64BIT``: Force the size of time_t to 64 bits, even on platforms where compatibility considerations would otherwise make it 32-bit. +* **"wctype" options** + - ``LIBC_CONF_WCTYPE_MODE``: The implementation used for wctype, acceptable values are LIBC_WCTYPE_MODE_ASCII and LIBC_WCTYPE_MODE_UTF8.