diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2025-06-04 06:51:24 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2025-06-04 06:51:24 +0000 |
commit | 5baf43483caeb86c42128d7ce0feeae825da671a (patch) | |
tree | 2f431e508bf6db96c6f09fa7ac908ce02a7fdffe /lang/gnu-apl/files/patch-src_Quad__CR.cc | |
parent | security/vuxml: Add Chromium vulnerability (diff) |
lang/gnu-apl: try to unbreak the port's build on recent -CURRENT
The base template for std::char_traits<> has been removed in LLVM 19;
specializations are only provided for char, wchar_t, char8_t, char16_t,
and char32_t. This had severely impacted GNU APL which derived its
UTF8 and UCS string classes from std::basic_string<>. The author had
made several attempts to convert these classes to use std::vector<>
instead. Carefully cherry-pick required changes so these fixes could
be applied on top of version 1.8 as trunk had diverged significantly.
Obtained from: upstream (SVN revisions 1823, 1831, and 1837)
Reported by: pkg-fallout
Diffstat (limited to 'lang/gnu-apl/files/patch-src_Quad__CR.cc')
-rw-r--r-- | lang/gnu-apl/files/patch-src_Quad__CR.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lang/gnu-apl/files/patch-src_Quad__CR.cc b/lang/gnu-apl/files/patch-src_Quad__CR.cc new file mode 100644 index 000000000000..27a38ea92961 --- /dev/null +++ b/lang/gnu-apl/files/patch-src_Quad__CR.cc @@ -0,0 +1,27 @@ +--- src/Quad_CR.cc.orig 2019-06-23 12:39:20 UTC ++++ src/Quad_CR.cc +@@ -1041,17 +1041,15 @@ Value_P Z(utf, LOC); + Value_P + Quad_CR::do_CR19(const Value & B) + { +-UTF8_string utf(B); +- for (size_t l = 0; l < utf.size();) +- { +- int len = 0; +- const Unicode uni = UTF8_string::toUni(&utf[l], len, false); +- if (uni == Invalid_Unicode) DOMAIN_ERROR; ++ if (B.get_rank() > 1) RANK_ERROR; ++const ShapeItem len_B = B.element_count(); + +- l += len; +- } ++UTF8 bytes_utf[len_B + 10]; ++ loop(b, len_B) bytes_utf[b] = B.get_ravel(b).get_byte_value(); ++ bytes_utf[len_B] = 0; + +-UCS_string ucs(utf); ++const UTF8_string utf(bytes_utf, len_B); ++const UCS_string ucs(utf); + Value_P Z(ucs, LOC); + return Z; + } |