--- icu/source/common/udata.orig 2016-02-28 08:21:34.766455512 +0100 +++ icu/source/common/udata.cpp 2016-02-28 08:21:56.526493756 +0100 @@ -101,7 +101,7 @@ static UDataMemory *udata_findCachedData * that they really need, reducing the size of binaries that take advantage * of this. */ -static UDataMemory *gCommonICUDataArray[10] = { NULL }; // Access protected by icu global mutex. +static UDataMemory *gCommonICUDataArray[32] = { NULL }; // Access protected by icu global mutex. static u_atomic_int32_t gHaveTriedToLoadCommonData = ATOMIC_INT32_T_INITIALIZER(0); // See extendICUData(). @@ -114,7 +114,7 @@ static UDataFileAccess gDataFileAccess static UBool U_CALLCONV udata_cleanup(void) { - int32_t i; + uint32_t i; if (gCommonDataCache) { /* Delete the cache of user data mappings. */ uhash_close(gCommonDataCache); /* Table owns the contents, and will delete them. */ @@ -135,7 +135,7 @@ static UBool U_CALLCONV findCommonICUDataByName(const char *inBasename) { UBool found = FALSE; - int32_t i; + uint32_t i; UDataMemory *pData = udata_findCachedData(inBasename); if (pData == NULL) @@ -165,7 +165,7 @@ setCommonICUData(UDataMemory *pData, UErrorCode *pErr) { UDataMemory *newCommonData = UDataMemory_createNewInstance(pErr); - int32_t i; + uint32_t i; UBool didUpdate = FALSE; if (U_FAILURE(*pErr)) { return FALSE; @@ -318,7 +318,7 @@ static UDataMemory *udata_findCachedData static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UErrorCode *pErr) { DataCacheElement *newElement; const char *baseName; - int32_t nameLen; + uint32_t nameLen; UHashtable *htable; DataCacheElement *oldValue = NULL; UErrorCode subErr = U_ZERO_ERROR; @@ -343,7 +343,7 @@ static UDataMemory *udata_cacheDataItem( UDatamemory_assign(newElement->item, item); baseName = findBasename(path); - nameLen = (int32_t)uprv_strlen(baseName); + nameLen = (uint32_t)uprv_strlen(baseName); newElement->name = (char *)uprv_malloc(nameLen+1); if (newElement->name == NULL) { *pErr = U_MEMORY_ALLOCATION_ERROR; @@ -456,13 +456,13 @@ UDataPathIterator::UDataPathIterator(con /** Item **/ basename = findBasename(item); - basenameLen = (int32_t)uprv_strlen(basename); + basenameLen = (uint32_t)uprv_strlen(basename); /** Item path **/ if(basename == item) { nextPath = path; } else { - itemPath.append(item, (int32_t)(basename-item), *pErrorCode); + itemPath.append(item, (uint32_t)(basename-item), *pErrorCode); nextPath = itemPath.data(); } #ifdef UDATA_DEBUG @@ -519,16 +519,16 @@ const char *UDataPathIterator::next(UErr if(nextPath == itemPath.data()) { /* we were processing item's path. */ nextPath = path; /* start with regular path next tm. */ - pathLen = (int32_t)uprv_strlen(currentPath); + pathLen = (uint32_t)uprv_strlen(currentPath); } else { /* fix up next for next time */ nextPath = uprv_strchr(currentPath, U_PATH_SEP_CHAR); if(nextPath == NULL) { /* segment: entire path */ - pathLen = (int32_t)uprv_strlen(currentPath); + pathLen = (uint32_t)uprv_strlen(currentPath); } else { /* segment: until next segment */ - pathLen = (int32_t)(nextPath - currentPath); + pathLen = (uint32_t)(nextPath - currentPath); /* skip divider */ nextPath ++; } @@ -672,7 +672,7 @@ openCommonData(const char *path, if(gCommonICUDataArray[commonDataIndex] != NULL) { return gCommonICUDataArray[commonDataIndex]; } - int32_t i; + uint32_t i; for(i = 0; i < commonDataIndex; ++i) { if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) { /* The linked-in data is already in the list. */ @@ -1022,7 +1022,7 @@ static UDataMemory *doLoadFromCommonData UDataMemory *pEntryData; const DataHeader *pHeader; UDataMemory *pCommonData; - int32_t commonDataIndex; + uint32_t commonDataIndex; UBool checkedExtendedICUData = FALSE; /* try to get common data. The loop is for platforms such as the 390 that do * not initially load the full set of ICU data. If the lookup of an ICU data item @@ -1127,7 +1127,7 @@ doOpenChoice(const char *path, const cha const char *dataPath; - int32_t tocEntrySuffixIndex; + uint32_t tocEntrySuffixIndex; const char *tocEntryPathSuffix; UErrorCode subErrorCode=U_ZERO_ERROR; const char *treeChar; @@ -1191,7 +1191,7 @@ doOpenChoice(const char *path, const cha if(isICUData) { pkgName.append(U_ICUDATA_NAME, *pErrorCode); } else { - pkgName.append(path, (int32_t)(treeChar-path), *pErrorCode); + pkgName.append(path, (uint32_t)(treeChar-path), *pErrorCode); if (first == NULL) { /* This user data has no path, but there is a tree name.