mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
* gnu/packages/icu4c.scm (icu4c-78): New variable. * gnu/local.mk (dist_patch_DATA): Add icu4c patches. * gnu/packages/patches/icu4c-78-double-conversion.patch: New file. * gnu/packages/patches/icu4c-bug-1706949-wasi-workaround.patch: New file. * gnu/packages/patches/icu4c-bug-1790071-ICU-22132-standardize-vtzone-output.patch: New file. * gnu/packages/patches/icu4c-bug-1856290-ICU-20548-dateinterval-timezone.patch: New file. * gnu/packages/patches/icu4c-bug-1954138-dtitvfmt-adopt-calendar.patch: New file. * gnu/packages/patches/icu4c-bug-1972781-chinese-based-calendar.patch: New file. * gnu/packages/patches/icu4c-bug-2000225-ICU-23264-increase-measure-unit-capacity.patch: New file. * gnu/packages/patches/icu4c-bug-2002735-ICU-23277-coptic-single-era.patch: New file. * gnu/packages/patches/icu4c-suppress-warnings.patch: New file.
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
# Increase measure unit capacity for ICU 78.
|
|
#
|
|
# ICU bug: https://unicode-org.atlassian.net/browse/ICU-23264
|
|
|
|
diff --git a/source/i18n/number_skeletons.cpp b/source/i18n/number_skeletons.cpp
|
|
--- a/source/i18n/number_skeletons.cpp
|
|
+++ b/source/i18n/number_skeletons.cpp
|
|
@@ -1067,18 +1067,17 @@ void blueprint_helpers::parseMeasureUnit
|
|
}
|
|
|
|
// Need to do char <-> char16_t conversion...
|
|
CharString type;
|
|
SKELETON_UCHAR_TO_CHAR(type, stemString, 0, firstHyphen, status);
|
|
CharString subType;
|
|
SKELETON_UCHAR_TO_CHAR(subType, stemString, firstHyphen + 1, stemString.length(), status);
|
|
|
|
- // Note: the largest type as of this writing (Aug 2020) is "volume", which has 33 units.
|
|
- static constexpr int32_t CAPACITY = 40;
|
|
+ static constexpr int32_t CAPACITY = 50;
|
|
MeasureUnit units[CAPACITY];
|
|
UErrorCode localStatus = U_ZERO_ERROR;
|
|
int32_t numUnits = MeasureUnit::getAvailable(type.data(), units, CAPACITY, localStatus);
|
|
if (U_FAILURE(localStatus)) {
|
|
// More than 30 units in this type?
|
|
status = U_INTERNAL_PROGRAM_ERROR;
|
|
return;
|
|
}
|