From b2499de3de776a10e05bf670e511b403d3d7059f Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Fri, 25 Jul 2025 10:52:28 -0400 Subject: [PATCH] contrib: Apply RTEMS changes to utf8proc No modifications to this it is what we have been carrying. --- contrib/cpukit/utf8proc/utf8proc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/cpukit/utf8proc/utf8proc.c b/contrib/cpukit/utf8proc/utf8proc.c index 520760790c..29d43386c1 100644 --- a/contrib/cpukit/utf8proc/utf8proc.c +++ b/contrib/cpukit/utf8proc/utf8proc.c @@ -39,7 +39,7 @@ */ -#include "utf8proc.h" +#include #include "utf8proc_data.c" @@ -145,8 +145,13 @@ ssize_t utf8proc_iterate( (uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1; break; case 4: +#if defined(__rtems__) + uc = (((int32_t)str[0] & 0x07) << 18) + (((int32_t)str[1] & 0x3F) << 12) + + (((int32_t)str[2] & 0x3F) << 6) + (str[3] & 0x3F); +#else uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12) + ((str[2] & 0x3F) << 6) + (str[3] & 0x3F); +#endif if (uc < 0x10000 || uc >= 0x110000) uc = -1; break; }