ICU now uses namespaces. When trying to use the scrptrun.h header, the
header cannot compile stand-alone as it is inheriting from UObject which
is namespaced now. Add namespace macros to properly inherit.
ICU-20566 Add scrptrun to the extra high level Makefile
The scrptrun project was not being added to the extra portion of the ICU
build. Add it as a sub project so it can always be built.
ICU-20566 Properly namespace the ScriptRun test
The ScriptRun class is now namespaced. Update the test reference.
ICU-20566 Use int instead of void to compile
Clang will complain about having a void main without an int main to
invoke. Change void to int and return 0.
- Use STATIC_NEW for mutex creation, to avoid order-of-destruction problems
by avoiding destruction altogether, while avoiding memory leak reports.
- Remove UConditionVar, replace with direct use of std::condition_variable
Regression was in 1afef30549
PR #418 [ICU-20187]
- We dropped the mapping from "C" in uloc_canonicalize,
but then putil did not handle cases where a codepage was
set (such as C.UTF-8).
- Add an additional check in uprv_getDefaultLocaleID() for
locales that end up as "C" or "POSIX" after removing codepage
suffix.
- Also fix regression where aa@bb would become aa__BB__BB
(incorrectly doubled __BB)
Remove explicit extern "C++" scope.
Remove C++ macros in C mode.
Fix issues detected by make -C test/hdrtst.
Run test/hdrtest during CI to detect future breakage.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
This fixes a regression introduced by commit
b12a927c93 for issue ICU-13778.
The above commit improved the error checking in the
DateTimePatternGenerator class, adding checks for errors/failures
where there previously was none at all. This was done in order to
catch catastrophic errors like out-of-memory (OOM), and properly
report them to the caller, rather than ignoring/hiding these errors.
However, in doing so it exposed a case where the code was depending
on ignoring errors in order to fall-back to the Gregorian calendar
when the default ICU locale is set to root.
This restores the previous behavior, by allowing the error of
U_MISSING_RESOURCE_ERROR to fall-though and continue without
reporting back an error to the caller.
Note: This regression was technically introduced in ICU 63, and
also effects ICU 64 as well.