Files
build-linux-system-from-scr…/package/readline/0001-Fix-build-with-non-wchar-toolchains.patch
Chen Wang e5121ac531 Step4: enhanced shell with bash.
Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
2026-03-06 14:21:35 +08:00

43 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
Date: Sat, 5 Jul 2025 07:48:20 +0200
Subject: [PATCH] Fix build with non-wchar toolchains
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit a7f5650e6549e1b5c4e2e1fa30eee19de6bcbe7a added two functions to
mbutil.c but forgot to add defines for HANDLE_MULTIBYTE causing build
errors with toolchains without wchar support:
../mbutil.c: In function _rl_mb_strcaseeqn:
../mbutil.c:594:3: error: unknown type name mbstate_t
Upstream: https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00002.html
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
mbutil.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mbutil.c b/mbutil.c
index 5243fd7..c15f3aa 100644
--- a/mbutil.c
+++ b/mbutil.c
@@ -584,6 +584,7 @@ _rl_find_prev_mbchar (const char *string, int seed, int flags)
#endif
}
+#if defined (HANDLE_MULTIBYTE)
/* Compare the first N characters of S1 and S2 without regard to case. If
FLAGS&1, apply the mapping specified by completion-map-case and make
`-' and `_' equivalent. Returns 1 if the strings are equal. */
@@ -658,3 +659,4 @@ _rl_mb_charcasecmp (const char *s1, mbstate_t *ps1, const char *s2, mbstate_t *p
return 1;
return (wc1 == wc2);
}
+#endif /* HANDLE_MULTIBYTE */
--
2.39.5