Commit Graph

49 Commits

Author SHA1 Message Date
Jeff Genovy
eae698a61e
ICU-13712 ICU4C does not report OOM if it fails to memory map the data file(s) (#30)
ICU does not report Out-Of-Memory (OOM) if it fails to memory map the data file(s) when calling the various platform API(s) to do so.

When you are using ICU with memory-mapped data file(s), and ICU fails to map the data file due to being out-of-memory, it does not bubble this failure up to the API that was called. You will instead get back the error U_MISSING_RESOURCE_ERROR, rather than U_MEMORY_ALLOCATION_ERROR, which might be a bit surprising to the caller of the API. This can lead to the application thinking that there are no resources for "en_US" or "en" (or even "root").

This change modifies ICU4C so that it will report back U_MEMORY_ALLOCATION_ERROR if OOM happens when attempting to load the data files.
2018-09-27 14:27:39 -07:00
Daniel Ju
b13c951348
ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup (#53)
Cleaned up all of the MSVC W3 warnings and most of the W4 warnings in the common and i18n projects.
2018-09-27 14:27:38 -07:00
Andy Heninger
7d05feb7a6 ICU-13207 Fix some resource leaks.
X-SVN-Rev: 40167
2017-06-13 18:33:59 +00:00
Andy Heninger
242e02c388 ICU-12764 icu4c utf-8 source files, update Copyright notices.
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
Steven R. Loomis
29d7ab227d ICU-12752 merge from branch; z porting changes
X-SVN-Rev: 39385
2016-09-28 17:30:09 +00:00
Steven R. Loomis
5f2c294d1c ICU-12752 fix breakage from r39368 on windows.
X-SVN-Rev: 39374
2016-09-28 02:26:02 +00:00
Steven R. Loomis
6825277072 ICU-12752 commit some IBM z fixes. Library code building
X-SVN-Rev: 39368
2016-09-27 23:39:01 +00:00
Felipe Balbontín
eae3a7e3e6 ICU-12634 Remove ResourceTableSink and ures_getAllTableItems().
X-SVN-Rev: 39155
2016-09-07 19:22:41 +00:00
Felipe Balbontín
b17650f34a ICU-12634 Remove ResourceArraySink and ResourceTableSink.enter(), leave() and getOrCreateArraySink().
X-SVN-Rev: 38983
2016-07-19 18:37:37 +00:00
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126 ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f ICU-12564 Update copyright notice in ICU4C
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Markus Scherer
20b415ce31 ICU-12510 resource data enumeration: do not fail if parents up to root do not have the requested path
X-SVN-Rev: 38656
2016-04-27 22:14:29 +00:00
Markus Scherer
192500a361 ICU-12510 resource data enumeration: get array/table objects from ResourceValue, iterate with nested code & functions not by returning nested sinks; use this in DateTimePatternGenerator AllowedHourFormatsSink
X-SVN-Rev: 38655
2016-04-27 16:19:26 +00:00
Markus Scherer
a9c247a3cb ICU-12166 annotate intended switch case fallthroughs
X-SVN-Rev: 38447
2016-03-01 07:44:57 +00:00
Markus Scherer
d5877ebe4e ICU-11986 use prefix Resource for C++ classes, prefix UResource for C types
X-SVN-Rev: 38087
2015-11-18 00:18:28 +00:00
Markus Scherer
147ca53163 ICU-11986 enumerate most of the measurement unit formatting data, rather than lookup-with-fallback for each piece; adds necessary fallback on leaf level
X-SVN-Rev: 38082
2015-11-12 22:09:04 +00:00
Markus Scherer
36e5d9e75f ICU-11537 move shared resource bundle string values to pool.res, .res formatVersion 3; merge --integrate from dev branch, plus make toolutil/pkgitems.cpp set poolBundleStrings so that icupkg can check dependencies
X-SVN-Rev: 37731
2015-08-07 18:44:38 +00:00
Andy Heninger
f4740d75da ICU-11579 Fix signed integer overflow in uresbund.cpp
X-SVN-Rev: 37217
2015-03-11 20:43:07 +00:00
Steven R. Loomis
7e6c572256 ICU-10774 fix a knownissue: Collator::getAvailableLocales calculation.
Also, replace uhash_nextElement's parameter "-1" with UHASH_FIRST for clarity.
Also, improve service registration debugging code

X-SVN-Rev: 36836
2014-12-09 23:54:56 +00:00
Markus Scherer
326e9592dc ICU-10823 add ures_openNoDefault() and use it from collation data loader and BreakIterator; refactor ures_openXyz() for code sharing
X-SVN-Rev: 36806
2014-12-04 21:11:26 +00:00
Markus Scherer
725657cd3d ICU-10477 drop already-marginal support for ULOC_REQUESTED_LOCALE
X-SVN-Rev: 36252
2014-08-27 21:27:37 +00:00
Markus Scherer
2e958e2bab ICU-8082 private collation type: do not build binary and do not list as an available keyword value
X-SVN-Rev: 36011
2014-07-08 17:44:53 +00:00
Andy Heninger
d3f2a4ba93 ICU-10891 Fix buffer overflow problem in uresbund.cpp
X-SVN-Rev: 35699
2014-05-09 17:54:54 +00:00
Andy Heninger
f2f67fbaa8 ICU-10373 A few more namespace tweaks to fix the Windows build.
X-SVN-Rev: 34255
2013-09-10 03:44:20 +00:00
Andy Heninger
d4233dc050 ICU-10373 Fix ambiguous names build problem from previous namesapce change.
X-SVN-Rev: 34253
2013-09-10 00:46:27 +00:00
Markus Scherer
8f38199123 ICU-10365 fix namespace issue: icu::UInitOnce
X-SVN-Rev: 34252
2013-09-10 00:34:12 +00:00
Steven R. Loomis
86c481026c ICU-10373 fix -DU_USING_ICU_NAMESPACE=0 issues
X-SVN-Rev: 34251
2013-09-10 00:13:41 +00:00
Andy Heninger
fbdf95be0e ICU-10051 ures_cleanup tweaked for failing test.
X-SVN-Rev: 33789
2013-06-01 05:10:48 +00:00
Andy Heninger
ae87a3acc2 ICU-10051 Mutexes: introduce UInitOnce; remove UMTX_CHECK; replace all uses of UMTX_CHECK. All the directories this time.
X-SVN-Rev: 33788
2013-06-01 03:37:16 +00:00
Travis Keep
cfc87e0de2 ICU-9669 Fix bug in resbund.cpp
X-SVN-Rev: 33746
2013-05-23 21:47:38 +00:00
Markus Scherer
7a21b2513d ICU-9804 fix unused-variable warning, safer memory management
X-SVN-Rev: 33299
2013-02-22 02:06:45 +00:00
Travis Keep
623787fa35 ICU-9804 Fix ures_getByKeyWithFallback.
X-SVN-Rev: 32985
2012-12-18 00:53:54 +00:00
Travis Keep
eb81df537c ICU-9669 Roll back change 32889
X-SVN-Rev: 32890
2012-11-26 22:29:27 +00:00
Travis Keep
02197c648e ICU-9669 ures_getStringByKeyWithFallback() to work correctly when returning UChar* with embedded nulls.
X-SVN-Rev: 32889
2012-11-26 21:06:37 +00:00
Travis Keep
ab7f32d76e ICU-9669 Rollback changeset 32866.
X-SVN-Rev: 32867
2012-11-19 22:51:21 +00:00
Travis Keep
c86501fbf2 ICU-9669 Allow caller to pass NULL for len when calling ures_getStringByKeyWithFallback.
X-SVN-Rev: 32866
2012-11-19 18:19:51 +00:00
Andy Heninger
803ac8f33c ICU-9461 Mutex Implementation Rework, merge from devel branch.
X-SVN-Rev: 32530
2012-10-05 21:22:02 +00:00
Markus Scherer
2f6df5d520 ICU-9434 use static_cast<pointer type>(void *) not reinterpret_cast
X-SVN-Rev: 32119
2012-08-08 00:50:16 +00:00
Andy Heninger
dd423ee481 ICU-9310 inconsequential fix to uresbund.cpp
X-SVN-Rev: 31807
2012-05-10 00:45:44 +00:00
Andy Heninger
5b3a708915 ICU-8992 Compiler Warning cleanup for gcc 4.6.1
X-SVN-Rev: 31329
2012-02-06 19:57:08 +00:00
Yoshito Umaoka
e9503bdade ICU-8909 Fixed various warnings reported by a source code analysis tool.
X-SVN-Rev: 30958
2011-11-14 19:32:51 +00:00
John Emmons
921f531cb7 ICU-8821 Handle empty set markers in ures_getStringByKeyWithFallback()
X-SVN-Rev: 30679
2011-09-16 20:22:44 +00:00
Abhinav Gupta
f67841a40d ICU-8813 removed name from stack buffer in init_entry (uresbound.cpp)
X-SVN-Rev: 30664
2011-09-15 18:09:30 +00:00
Abhinav Gupta
728d95f8c9 ICU-8812 fixed init_entry overflow and TestSymbolsWithBadLocale test case
X-SVN-Rev: 30649
2011-09-13 19:14:32 +00:00
Abhinav Gupta
8981a441b2 ICU-8812 fixed overflow and inconsistency
X-SVN-Rev: 30646
2011-09-12 20:44:57 +00:00
Andy Heninger
b7608372a5 ICU-8595 Warning cleanup, UResType vs. int32_t
X-SVN-Rev: 30310
2011-07-10 23:22:00 +00:00
Andy Heninger
3cf524ee6a ICU-8595 Compiler warning fixes for UResType
X-SVN-Rev: 30295
2011-07-08 01:14:44 +00:00
Markus Scherer
41c8654d92 ICU-8601 replace C U_INLINE hack with C++ inline, and also rename a few other .c files to .cpp for future UMTX_CHECK replacement
X-SVN-Rev: 30148
2011-05-26 20:05:39 +00:00