Files
packages/libs/icu/patches/010-max_align_t.patch
Hirokazu MORIKAWA 018fcf3ccd icu: bump to 73.1
Description:
It updates to CLDR 43 locale data with various additions and corrections.
ICU 73 improves Japanese and Korean short-text line breaking, reduces C++ memory use in date formatting, and promotes the Java person name formatter from tech preview to draft.
ICU 73 and CLDR 43 are minor releases, mostly focused on bug fixes and small enhancements. (The fall CLDR/ICU releases will update to Unicode 15.1 which is planned for September.)
ICU 73 updates to the time zone data version 2023c (2023-mar). Note that pre-1970 data for a number of time zones has been removed, as has been the case in the upstream tzdata release since 2021b.

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2023-04-21 11:34:15 +08:00

61 lines
2.5 KiB
Diff

--- a/common/uarrsort.cpp
+++ b/common/uarrsort.cpp
@@ -37,7 +37,7 @@ enum {
};
static constexpr int32_t sizeInMaxAlignTs(int32_t sizeInBytes) {
- return (sizeInBytes + sizeof(std::max_align_t) - 1) / sizeof(std::max_align_t);
+ return (sizeInBytes + sizeof(max_align_t) - 1) / sizeof(max_align_t);
}
/* UComparator convenience implementations ---------------------------------- */
@@ -141,7 +141,7 @@ static void
insertionSort(char *array, int32_t length, int32_t itemSize,
UComparator *cmp, const void *context, UErrorCode *pErrorCode) {
- icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
+ icu::MaybeStackArray<max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
if (sizeInMaxAlignTs(itemSize) > v.getCapacity() &&
v.resize(sizeInMaxAlignTs(itemSize)) == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
@@ -235,7 +235,7 @@ static void
quickSort(char *array, int32_t length, int32_t itemSize,
UComparator *cmp, const void *context, UErrorCode *pErrorCode) {
/* allocate two intermediate item variables (x and w) */
- icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
+ icu::MaybeStackArray<max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
if(sizeInMaxAlignTs(itemSize)*2 > xw.getCapacity() &&
xw.resize(sizeInMaxAlignTs(itemSize) * 2) == nullptr) {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR;
--- a/common/utext.cpp
+++ b/common/utext.cpp
@@ -572,7 +572,7 @@ enum {
struct ExtendedUText {
UText ut;
- std::max_align_t extension;
+ max_align_t extension;
};
static const UText emptyText = UTEXT_INITIALIZER;
@@ -587,7 +587,7 @@ utext_setup(UText *ut, int32_t extraSpac
// We need to heap-allocate storage for the new UText
int32_t spaceRequired = sizeof(UText);
if (extraSpace > 0) {
- spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(std::max_align_t);
+ spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(max_align_t);
}
ut = (UText *)uprv_malloc(spaceRequired);
if (ut == nullptr) {
--- a/tools/toolutil/toolutil.cpp
+++ b/tools/toolutil/toolutil.cpp
@@ -267,7 +267,7 @@ struct UToolMemory {
char name[64];
int32_t capacity, maxCapacity, size, idx;
void *array;
- alignas(std::max_align_t) char staticArray[1];
+ alignas(max_align_t) char staticArray[1];
};
U_CAPI UToolMemory * U_EXPORT2