Bug 1824744 - Part 1: Update or remove ICU patches. r=platform-i18n-reviewers,gregtatum

Remove no longer needed backports for ICU-22198, ICU-22206, and CLDR-16399.

Update WASI patch to apply cleanly on ICU 73.

Differential Revision: https://phabricator.services.mozilla.com/D176263
This commit is contained in:
André Bargull 2023-05-25 20:40:42 +00:00
parent c5a24689b5
commit a1ca2d701e
5 changed files with 24 additions and 424 deletions

View File

@ -299,7 +299,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
#include "uhash.h"
#include "ucln_cmn.h"
static icu::UnifiedCache *gCache = NULL;
static icu::UnifiedCache *gCache = nullptr;
+#ifndef __wasi__
static std::mutex *gCacheMutex = nullptr;
static std::condition_variable *gInProgressValueAddedCond;
@ -328,7 +328,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
@@ -70,12 +76,14 @@ CacheKeyBase::~CacheKeyBase() {
static void U_CALLCONV cacheInit(UErrorCode &status) {
U_ASSERT(gCache == NULL);
U_ASSERT(gCache == nullptr);
ucln_common_registerCleanup(
UCLN_COMMON_UNIFIED_CACHE, unifiedcache_cleanup);
@ -337,7 +337,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
gInProgressValueAddedCond = STATIC_NEW(std::condition_variable);
+#endif
gCache = new UnifiedCache(status);
if (gCache == NULL) {
if (gCache == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
}
if (U_FAILURE(status)) {
@ -433,7 +433,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
std::lock_guard<std::mutex> lock(*gCacheMutex);
+#endif
const UHashElement *element = uhash_find(fHashtable, &key);
if (element != NULL && !_inProgress(element)) {
if (element != nullptr && !_inProgress(element)) {
_fetch(element, value, status);
return;
}
@ -441,7 +441,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
const CacheKeyBase &key,
const SharedObject *&value,
UErrorCode &status) const {
U_ASSERT(value == NULL);
U_ASSERT(value == nullptr);
U_ASSERT(status == U_ZERO_ERROR);
+#ifndef __wasi__
std::unique_lock<std::mutex> lock(*gCacheMutex);
@ -451,7 +451,7 @@ diff --git a/intl/icu/source/common/unifiedcache.cpp b/intl/icu/source/common/un
// If the hash table contains an inProgress placeholder entry for this key,
// this means that another thread is currently constructing the value object.
// Loop, waiting for that construction to complete.
while (element != NULL && _inProgress(element)) {
while (element != nullptr && _inProgress(element)) {
+#ifndef __wasi__
gInProgressValueAddedCond->wait(lock);
+#endif
@ -626,10 +626,11 @@ index 9ecd776..d094289 100644
/** Small object ownership warehouse for the formatter and parser */
DecimalFormatWarehouse warehouse;
diff --git a/intl/icu/source/i18n/numrange_fluent.cpp b/intl/icu/source/i18n/numrange_fluent.cpp
index f1060b3..66e12ee 100644
--- a/intl/icu/source/i18n/numrange_fluent.cpp
+++ b/intl/icu/source/i18n/numrange_fluent.cpp
@@ -240,29 +240,49 @@ LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(NFS<LNF>&& src) U_N
@@ -238,33 +238,53 @@ LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(LocalizedNumberRang
LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(NFS<LNF>&& src) noexcept
: NFS<LNF>(std::move(src)) {
// Steal the compiled formatter
LNF&& _src = static_cast<LNF&&>(src);
@ -655,7 +656,7 @@ index f1060b3..66e12ee 100644
return *this;
}
LocalizedNumberRangeFormatter& LocalizedNumberRangeFormatter::operator=(LNF&& src) U_NOEXCEPT {
LocalizedNumberRangeFormatter& LocalizedNumberRangeFormatter::operator=(LNF&& src) noexcept {
NFS<LNF>::operator=(static_cast<NFS<LNF>&&>(src));
// Steal the compiled formatter
+#ifndef __wasi__
@ -679,7 +680,11 @@ index f1060b3..66e12ee 100644
}
LocalizedNumberRangeFormatter::LocalizedNumberRangeFormatter(const RangeMacroProps& macros, const Locale& locale) {
@@ -346,7 +366,11 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
fMacros = macros;
fMacros.locale = locale;
@@ -344,11 +364,15 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
if (U_FAILURE(status)) {
return nullptr;
}
// First try to get the pre-computed formatter
@ -691,7 +696,11 @@ index f1060b3..66e12ee 100644
if (ptr != nullptr) {
return ptr;
}
@@ -365,6 +389,7 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
// Try computing the formatter on our own
@@ -364,18 +388,23 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
// Note: ptr starts as nullptr; during compare_exchange,
// it is set to what is actually stored in the atomic
// if another thread beat us to computing the formatter object.
auto* nonConstThis = const_cast<LocalizedNumberRangeFormatter*>(this);
@ -699,7 +708,8 @@ index f1060b3..66e12ee 100644
if (!nonConstThis->fAtomicFormatter.compare_exchange_strong(ptr, temp)) {
// Another thread beat us to computing the formatter
delete temp;
@@ -373,6 +398,10 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const {
return ptr;
} else {
// Our copy of the formatter got stored in the atomic
return temp;
}
@ -710,6 +720,8 @@ index f1060b3..66e12ee 100644
}
#endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/intl/icu/source/i18n/unicode/numberrangeformatter.h b/intl/icu/source/i18n/unicode/numberrangeformatter.h
index b9a4600..0ba2fa0 100644
--- a/intl/icu/source/i18n/unicode/numberrangeformatter.h

View File

@ -1,19 +0,0 @@
# https://github.com/unicode-org/icu/pull/2248
# https://github.com/unicode-org/icu/pull/2248.diff
#
# ICU bug: https://unicode-org.atlassian.net/browse/ICU-22198
diff --git a/intl/icu/source/common/uresbund.cpp b/intl/icu/source/common/uresbund.cpp
index 17c0177a05c..81fb90e1384 100644
--- a/intl/icu/source/common/uresbund.cpp
+++ b/intl/icu/source/common/uresbund.cpp
@@ -202,7 +202,8 @@ typedef enum UResOpenType UResOpenType;
*/
static bool getParentLocaleID(char *name, const char *origName, UResOpenType openType) {
// early out if the locale ID has a variant code or ends with _
- if (name[uprv_strlen(name) - 1] == '_' || hasVariant(name)) {
+ size_t nameLen = uprv_strlen(name);
+ if (!nameLen || name[nameLen - 1] == '_' || hasVariant(name)) {
return chopLocale(name);
}

View File

@ -1,351 +0,0 @@
# https://github.com/unicode-org/icu/pull/2255
# https://github.com/unicode-org/icu/pull/2255.diff
#
# ICU bug: https://unicode-org.atlassian.net/browse/ICU-22206
diff --git a/intl/icu/source/common/rbbiscan.cpp b/intl/icu/source/common/rbbiscan.cpp
index 8232bd94e47..87d31f8af40 100644
--- a/intl/icu/source/common/rbbiscan.cpp
+++ b/intl/icu/source/common/rbbiscan.cpp
@@ -918,7 +918,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) {
// Toggle quoting mode.
// Return either '(' or ')', because quotes cause a grouping of the quoted text.
fQuoteMode = !fQuoteMode;
- if (fQuoteMode == true) {
+ if (fQuoteMode) {
c.fChar = chLParen;
} else {
c.fChar = chRParen;
diff --git a/intl/icu/source/common/ucnvisci.cpp b/intl/icu/source/common/ucnvisci.cpp
index 4d747e1ff84..839f7ff9c62 100644
--- a/intl/icu/source/common/ucnvisci.cpp
+++ b/intl/icu/source/common/ucnvisci.cpp
@@ -1472,7 +1472,7 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo
if (targetUniChar != missingCharMarker) {
/* now save the targetUniChar for delayed write */
*toUnicodeStatus = (UChar) targetUniChar;
- if (data->resetToDefaultToUnicode==true) {
+ if (data->resetToDefaultToUnicode) {
data->currentDeltaToUnicode = data->defDeltaToUnicode;
data->currentMaskToUnicode = data->defMaskToUnicode;
data->resetToDefaultToUnicode=false;
diff --git a/intl/icu/source/common/udata.cpp b/intl/icu/source/common/udata.cpp
index 2bc74c97898..c5d0a9feb7b 100644
--- a/intl/icu/source/common/udata.cpp
+++ b/intl/icu/source/common/udata.cpp
@@ -568,7 +568,7 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode)
/* check for .dat files */
pathBasename = findBasename(pathBuffer.data());
- if(checkLastFour == true &&
+ if(checkLastFour &&
(pathLen>=4) &&
uprv_strncmp(pathBuffer.data() +(pathLen-4), suffix.data(), 4)==0 && /* suffix matches */
uprv_strncmp(findBasename(pathBuffer.data()), basename, basenameLen)==0 && /* base matches */
diff --git a/intl/icu/source/common/uidna.cpp b/intl/icu/source/common/uidna.cpp
index 1cbdeec3272..7135a166f21 100644
--- a/intl/icu/source/common/uidna.cpp
+++ b/intl/icu/source/common/uidna.cpp
@@ -287,7 +287,7 @@ _internal_toASCII(const UChar* src, int32_t srcLength,
failPos = j;
}
}
- if(useSTD3ASCIIRules == true){
+ if(useSTD3ASCIIRules){
// verify 3a and 3b
// 3(a) Verify the absence of non-LDH ASCII code points; that is, the
// absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
@@ -731,7 +731,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength,
remainingDestCapacity = 0;
}
- if(done == true){
+ if(done){
break;
}
@@ -829,7 +829,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
remainingDestCapacity = 0;
}
- if(done == true){
+ if(done){
break;
}
diff --git a/intl/icu/source/common/uresbund.cpp b/intl/icu/source/common/uresbund.cpp
index 17c0177a05c..c065387bdae 100644
--- a/intl/icu/source/common/uresbund.cpp
+++ b/intl/icu/source/common/uresbund.cpp
@@ -2448,7 +2448,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con
res = res_getTableItemByKey(&resB->getResData(), resB->fRes, &t, &key);
if(res == RES_BOGUS) {
key = inKey;
- if(resB->fHasFallback == true) {
+ if(resB->fHasFallback) {
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
/* check if resB->fResPath gives the right name here */
@@ -2503,7 +2503,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c
if(res == RES_BOGUS) {
key = inKey;
- if(resB->fHasFallback == true) {
+ if(resB->fHasFallback) {
dataEntry = getFallbackData(resB, &key, &res, status);
if(U_SUCCESS(*status)) {
switch (RES_GET_TYPE(res)) {
diff --git a/intl/icu/source/common/usprep.cpp b/intl/icu/source/common/usprep.cpp
index 50d16081d1d..8175dc7fa82 100644
--- a/intl/icu/source/common/usprep.cpp
+++ b/intl/icu/source/common/usprep.cpp
@@ -160,7 +160,7 @@ usprep_internal_flushCache(UBool noRefCount){
key = (UStringPrepKey *) e->key.pointer;
if ((noRefCount== false && profile->refCount == 0) ||
- noRefCount== true) {
+ noRefCount) {
deletedNum++;
uhash_removeElement(SHARED_DATA_HASHTABLE, e);
@@ -746,16 +746,16 @@ usprep_prepare( const UStringPrepProfile* profile,
}
}
}
- if(profile->checkBiDi == true){
+ if(profile->checkBiDi){
// satisfy 2
- if( leftToRight == true && rightToLeft == true){
+ if( leftToRight && rightToLeft){
*status = U_STRINGPREP_CHECK_BIDI_ERROR;
uprv_syntaxError(b2,(rtlPos>ltrPos) ? rtlPos : ltrPos, b2Len, parseError);
return 0;
}
//satisfy 3
- if( rightToLeft == true &&
+ if( rightToLeft &&
!((firstCharDir == U_RIGHT_TO_LEFT || firstCharDir == U_RIGHT_TO_LEFT_ARABIC) &&
(direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC))
){
diff --git a/intl/icu/source/common/utext.cpp b/intl/icu/source/common/utext.cpp
index 548e6a60f31..89e3d669f6e 100644
--- a/intl/icu/source/common/utext.cpp
+++ b/intl/icu/source/common/utext.cpp
@@ -223,7 +223,7 @@ utext_current32(UText *ut) {
trail = ut->chunkContents[ut->chunkOffset];
}
UBool r = ut->pFuncs->access(ut, nativePosition, false); // reverse iteration flag loads preceding chunk
- U_ASSERT(r==true);
+ U_ASSERT(r);
ut->chunkOffset = originalOffset;
if(!r) {
return U_SENTINEL;
diff --git a/intl/icu/source/i18n/calendar.cpp b/intl/icu/source/i18n/calendar.cpp
index f5a40e48395..5431d87bdd2 100644
--- a/intl/icu/source/i18n/calendar.cpp
+++ b/intl/icu/source/i18n/calendar.cpp
@@ -3510,7 +3510,7 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w
switch(bestField) {
case UCAL_WEEK_OF_YEAR:
if(woy == 1) {
- if(jan1InPrevYear == true) {
+ if(jan1InPrevYear) {
// the first week of January is in the previous year
// therefore WOY1 is always solidly within yearWoy
return yearWoy;
diff --git a/intl/icu/source/i18n/dcfmtsym.cpp b/intl/icu/source/i18n/dcfmtsym.cpp
index 5d06c189fbe..fa5920aaa50 100644
--- a/intl/icu/source/i18n/dcfmtsym.cpp
+++ b/intl/icu/source/i18n/dcfmtsym.cpp
@@ -329,11 +329,13 @@ struct CurrencySpacingSink : public ResourceSink {
// both beforeCurrency and afterCurrency were found in CLDR.
static const char* defaults[] = { "[:letter:]", "[:digit:]", " " };
if (!hasBeforeCurrency || !hasAfterCurrency) {
- for (UBool beforeCurrency = 0; beforeCurrency <= true; beforeCurrency++) {
- for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
- dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
- beforeCurrency, UnicodeString(defaults[pattern], -1, US_INV));
- }
+ for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
+ dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
+ false, UnicodeString(defaults[pattern], -1, US_INV));
+ }
+ for (int32_t pattern = 0; pattern < UNUM_CURRENCY_SPACING_COUNT; pattern++) {
+ dfs.setPatternForCurrencySpacing((UCurrencySpacing)pattern,
+ true, UnicodeString(defaults[pattern], -1, US_INV));
}
}
}
diff --git a/intl/icu/source/i18n/dtitvinf.cpp b/intl/icu/source/i18n/dtitvinf.cpp
index f5fb86ce581..0a30cf14419 100644
--- a/intl/icu/source/i18n/dtitvinf.cpp
+++ b/intl/icu/source/i18n/dtitvinf.cpp
@@ -504,7 +504,7 @@ DateIntervalInfo::setIntervalPatternInternally(const UnicodeString& skeleton,
}
patternsOfOneSkeleton[index] = intervalPattern;
- if ( emptyHash == true ) {
+ if ( emptyHash ) {
fIntervalPatterns->put(skeleton, patternsOfOneSkeleton, status);
}
}
@@ -748,7 +748,7 @@ U_CALLCONV dtitvinfHashTableValueComparator(UHashTok val1, UHashTok val2) {
const UnicodeString* pattern2 = (UnicodeString*)val2.pointer;
UBool ret = true;
int8_t i;
- for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret == true; ++i ) {
+ for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret ; ++i ) {
ret = (pattern1[i] == pattern2[i]);
}
return ret;
diff --git a/intl/icu/source/i18n/gregocal.cpp b/intl/icu/source/i18n/gregocal.cpp
index 882d25b4a2a..0e00127e314 100644
--- a/intl/icu/source/i18n/gregocal.cpp
+++ b/intl/icu/source/i18n/gregocal.cpp
@@ -487,7 +487,7 @@ int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField)
// The following check handles portions of the cutover year BEFORE the
// cutover itself happens.
//if ((fIsGregorian==true) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
- if ((fIsGregorian==true) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
+ if ((fIsGregorian) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */
#if defined (U_DEBUG_CAL)
fprintf(stderr, "%s:%d: jd [invert] %d\n",
__FILE__, __LINE__, jd);
diff --git a/intl/icu/source/i18n/regexcmp.cpp b/intl/icu/source/i18n/regexcmp.cpp
index 4b507002d63..adc8f700c7f 100644
--- a/intl/icu/source/i18n/regexcmp.cpp
+++ b/intl/icu/source/i18n/regexcmp.cpp
@@ -4065,7 +4065,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) {
if (c.fChar == (UChar32)-1) {
break; // End of Input
}
- if (c.fChar == chPound && fEOLComments == true) {
+ if (c.fChar == chPound && fEOLComments) {
// Start of a comment. Consume the rest of it, until EOF or a new line
for (;;) {
c.fChar = nextCharLL();
diff --git a/intl/icu/source/i18n/search.cpp b/intl/icu/source/i18n/search.cpp
index 56d9b744098..d55902bfa7b 100644
--- a/intl/icu/source/i18n/search.cpp
+++ b/intl/icu/source/i18n/search.cpp
@@ -81,10 +81,9 @@ USearchAttributeValue SearchIterator::getAttribute(
{
switch (attribute) {
case USEARCH_OVERLAP :
- return (m_search_->isOverlap == true ? USEARCH_ON : USEARCH_OFF);
+ return (m_search_->isOverlap ? USEARCH_ON : USEARCH_OFF);
case USEARCH_CANONICAL_MATCH :
- return (m_search_->isCanonicalMatch == true ? USEARCH_ON :
- USEARCH_OFF);
+ return (m_search_->isCanonicalMatch ? USEARCH_ON : USEARCH_OFF);
case USEARCH_ELEMENT_COMPARISON :
{
int16_t value = m_search_->elementComparisonType;
@@ -242,7 +241,7 @@ int32_t SearchIterator::next(UErrorCode &status)
int32_t matchindex = m_search_->matchedIndex;
int32_t matchlength = m_search_->matchedLength;
m_search_->reset = false;
- if (m_search_->isForwardSearching == true) {
+ if (m_search_->isForwardSearching) {
int32_t textlength = m_search_->textLength;
if (offset == textlength || matchindex == textlength ||
(matchindex != USEARCH_DONE &&
@@ -295,7 +294,7 @@ int32_t SearchIterator::previous(UErrorCode &status)
}
int32_t matchindex = m_search_->matchedIndex;
- if (m_search_->isForwardSearching == true) {
+ if (m_search_->isForwardSearching) {
// switching direction.
// if matchedIndex == USEARCH_DONE, it means that either a
// setOffset has been called or that next ran off the text
diff --git a/intl/icu/source/i18n/usearch.cpp b/intl/icu/source/i18n/usearch.cpp
index 0fecd709e74..39f76a1b985 100644
--- a/intl/icu/source/i18n/usearch.cpp
+++ b/intl/icu/source/i18n/usearch.cpp
@@ -819,11 +819,9 @@ U_CAPI USearchAttributeValue U_EXPORT2 usearch_getAttribute(
if (strsrch) {
switch (attribute) {
case USEARCH_OVERLAP :
- return (strsrch->search->isOverlap == true ? USEARCH_ON :
- USEARCH_OFF);
+ return (strsrch->search->isOverlap ? USEARCH_ON : USEARCH_OFF);
case USEARCH_CANONICAL_MATCH :
- return (strsrch->search->isCanonicalMatch == true ? USEARCH_ON :
- USEARCH_OFF);
+ return (strsrch->search->isCanonicalMatch ? USEARCH_ON : USEARCH_OFF);
case USEARCH_ELEMENT_COMPARISON :
{
int16_t value = strsrch->search->elementComparisonType;
@@ -1249,7 +1247,7 @@ U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
}
int32_t matchedindex = search->matchedIndex;
- if (search->isForwardSearching == true) {
+ if (search->isForwardSearching) {
// switching direction.
// if matchedIndex == USEARCH_DONE, it means that either a
// setOffset has been called or that next ran off the text
diff --git a/intl/icu/source/i18n/uspoof_conf.cpp b/intl/icu/source/i18n/uspoof_conf.cpp
index 5ecc59c12a8..376ac64e3ce 100644
--- a/intl/icu/source/i18n/uspoof_conf.cpp
+++ b/intl/icu/source/i18n/uspoof_conf.cpp
@@ -407,7 +407,7 @@ void ConfusabledataBuilder::build(const char * confusables, int32_t confusablesL
//
void ConfusabledataBuilder::outputData(UErrorCode &status) {
- U_ASSERT(fSpoofImpl->fSpoofData->fDataOwned == true);
+ U_ASSERT(fSpoofImpl->fSpoofData->fDataOwned);
// The Key Table
// While copying the keys to the runtime array,
diff --git a/intl/icu/source/io/uscanf_p.cpp b/intl/icu/source/io/uscanf_p.cpp
index 9b27e2ebf8d..26a790dd9b6 100644
--- a/intl/icu/source/io/uscanf_p.cpp
+++ b/intl/icu/source/io/uscanf_p.cpp
@@ -323,7 +323,7 @@ u_scanf_skip_leading_ws(UFILE *input,
UBool isNotEOF;
/* skip all leading ws in the input */
- while( ((isNotEOF = ufile_getch(input, &c)) == true) && (c == pad || u_isWhitespace(c)) )
+ while( ((isNotEOF = ufile_getch(input, &c))==(UBool)true) && (c == pad || u_isWhitespace(c)) )
{
count++;
}
@@ -357,7 +357,7 @@ u_scanf_skip_leading_positive_sign(UFILE *input,
if (U_SUCCESS(localStatus)) {
/* skip all leading ws in the input */
- while( ((isNotEOF = ufile_getch(input, &c)) == true) && (count < symbolLen && c == plusSymbol[count]) )
+ while( ((isNotEOF = ufile_getch(input, &c))==(UBool)true) && (count < symbolLen && c == plusSymbol[count]) )
{
count++;
}
@@ -868,7 +868,7 @@ u_scanf_string_handler(UFILE *input,
return -1;
while( (info->fWidth == -1 || count < info->fWidth)
- && ((isNotEOF = ufile_getch(input, &c)) == true)
+ && ((isNotEOF = ufile_getch(input, &c))==(UBool)true)
&& (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
{
@@ -959,7 +959,7 @@ u_scanf_ustring_handler(UFILE *input,
count = 0;
while( (info->fWidth == -1 || count < info->fWidth)
- && ((isNotEOF = ufile_getch(input, &c)) == true)
+ && ((isNotEOF = ufile_getch(input, &c))==(UBool)true)
&& (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
{
@@ -1262,7 +1262,7 @@ u_scanf_scanset_handler(UFILE *input,
/* grab characters one at a time and make sure they are in the scanset */
while(chLeft > 0) {
- if ( ((isNotEOF = ufile_getch32(input, &c)) == true) && uset_contains(scanset, c) ) {
+ if ( ((isNotEOF = ufile_getch32(input, &c))==(UBool)true) && uset_contains(scanset, c) ) {
readCharacter = true;
if (!info->fSkipArg) {
int32_t idx = 0;

View File

@ -1,39 +0,0 @@
# https://github.com/unicode-org/cldr/pull/2759
# https://github.com/unicode-org/cldr/pull/2759.diff
# https://github.com/unicode-org/icu/pull/2368
# https://github.com/unicode-org/icu/pull/2368.diff
#
# CLDR bug: https://unicode-org.atlassian.net/browse/CLDR-16399
diff --git a/intl/icu/source/data/locales/en_CA.txt b/intl/icu/source/data/locales/en_CA.txt
--- a/intl/icu/source/data/locales/en_CA.txt
+++ b/intl/icu/source/data/locales/en_CA.txt
@@ -226,20 +226,26 @@ en_CA{
"h:mm:ssa",
"h:mma",
"EEEE, MMMM d, y",
"MMMM d, y",
"MMM d, y",
- "M/d/yy",
+ "y-MM-dd",
"{1}, {0}",
"{1}, {0}",
"{1}, {0}",
"{1}, {0}",
"{1}, {0}",
}
availableFormats{
Ed{"E d"}
- MMdd{"MM/dd"}
+ GyMd{"y-MM-dd G"}
+ MEd{"E, MM-dd"}
+ MMdd{"MM-dd"}
+ Md{"MM-dd"}
+ yM{"y-MM"}
+ yMEd{"E, y-MM-dd"}
+ yMd{"y-MM-dd"}
}
dayPeriod{
format{
narrow{
afternoon1{"aft"}

View File

@ -58,9 +58,6 @@ for patch in \
bug-1636984-append-item-dayperiod-fractional-seconds.diff \
bug-1706949-wasi-workaround.diff \
bug-1790071-ICU-22132-standardize-vtzone-output.diff \
bug-1792775-ICU-22198.diff \
bug-1792775-ICU-22206.diff \
bug-1818103-CLDR-16399.diff \
; do
echo "Applying local patch $patch"
patch -d ${icu_dir}/../../ -p1 --no-backup-if-mismatch < ${icu_dir}/../icu-patches/$patch