From 5fd81ae9cb3c9aa699801ae753b91aec6f647d70 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:03:14 +0000 Subject: [PATCH] ulalaca: Don't redefine char16_t and char32_t On MacOS, stdint.h is provided by the compiler for C, and by the SDK for C++. OSX 14.4 appears to define char16_t and char32_t within stdint.h for C++. Defining them again results in: ``` ../common/arch.h:53:24: error: cannot combine with previous 'type-name' declaration specifier typedef uint_least16_t char16_t; ^ ../common/arch.h:53:1: warning: typedef requires a name [-Wmissing-declarations] typedef uint_least16_t char16_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../common/arch.h:54:24: error: cannot combine with previous 'type-name' declaration specifier typedef uint_least32_t char32_t; ^ ../common/arch.h:54:1: warning: typedef requires a name [-Wmissing-declarations] typedef uint_least32_t char32_t; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- common/arch.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/arch.h b/common/arch.h index f2a4fade..69bbcaee 100644 --- a/common/arch.h +++ b/common/arch.h @@ -49,6 +49,8 @@ typedef int bool_t; // Define Unicode character types #if defined(HAVE_UCHAR_H) #include +#elif defined (__APPLE__) && defined(__cplusplus) +// char16_t and char32_t are in stdint.h (C++ only) #elif defined(HAVE_STDINT_H) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t;