Commit Graph

21846 Commits

Author SHA1 Message Date
Robin Leroy
4f72eea026 ICU-20831 Make *fCapitalizationBrkIter const, eliminating a data race in SimpleDateFormat::format. 2019-09-25 16:30:15 -07:00
Adam Sitnik
1f4a77cbc1 ICU-20832 use uint32_t instead of uint16_t to avoid overflows for very long strings 2019-09-25 14:20:56 -07:00
Fredrik Roubert
e5529933b2 ICU-20819 Correct placement of parentheses in preprocessor macro.
The purpose of the FIELD_NAME_STR() macro is to create a string literal
by using the # preprocessing operator and then skip the first 5 chars of
this string by using the +5 pointer arithmetic. This is all intentional,
but if the parentheses are misplaced the compiler might think that this
is a mistake, a failed string concatenation (-Wstring-plus-int).
2019-09-25 08:06:29 -07:00
Markus Scherer
5f443972ec ICU-20814 new tool for checking API tags vs. ifdef guards; add FORCE guards, and move some guards, to make this work 2019-09-23 17:04:53 -07:00
Peter Edberg
6d14ff6e1f ICU-20796 integrate CLDR release-36-alpha3 2019-09-20 16:08:49 -07:00
Yoshito Umaoka
a5e2945eb0 ICU-20823 ICU time zone data update for 2019c 2019-09-16 23:03:45 -04:00
Shane Carr
1d40b8f5e8 ICU-20811 Add fields required for locale inheritance to additive mode. 2019-09-13 15:38:38 -07:00
Peter Edberg
c4ea7681ee ICU-20796 BRS 65 update C API guard macros (manual version) (#827) 2019-09-13 10:56:25 -07:00
Jeff Genovy
5464f3482f ICU-20804 OOM not handled in selectForMask 2019-09-11 18:15:39 -07:00
Peter Edberg
c98e90c670 ICU-20396 add RelativeDateTimeFormatter test for af 2019-09-11 17:32:06 -07:00
Peter Edberg
7814980f51 ICU-20749 add ອາແມນ to laodict.txt 2019-09-11 14:46:40 -07:00
Steven R. Loomis
417254f66a ICU-20795 ICU4C 65.1 API promotion - locid.h
- fixup some functions in locid.h that were incorrectly guarded as draft
- Error was in:
   - 5a3ea669aa
   - https://github.com/unicode-org/icu/pull/808
2019-09-10 11:31:54 -07:00
Steven R. Loomis
5a3ea669aa ICU-20795 ICU4C 65.1 API promotion draft
- includes new APIChangeReport.md
- the 'simplification' section is no longer new
- uses tools from [ICU-20162] #807

Includes non-promotion fixes:
- utrace.h: UTRACE_UDATA_BUNDLE
2019-09-09 21:41:04 -07:00
Peter Edberg
84d16d8c6c ICU-20795 BRS 65 update urename.h 2019-09-09 10:45:06 -07:00
Peter Edberg
e25796f6e5 ICU-20801 integrate CLDR release-36-alpha2, update MeasureUnits (#809) 2019-09-06 14:07:36 -07:00
Jeff Genovy
f82e4c4401 ICU-20795 BRS65 ICU4C Samples: case sample should use DLL runtime to prevent assertion failures. 2019-09-06 13:44:14 -07:00
gnrunge
66b8b4c8ce ICU-20795 BRS test without data task: Adds a status check after PluralRules
instance creation. Test causes segmentation fault later if instance creation
fails.
2019-09-06 11:32:48 -07:00
gnrunge
5e3f472c67 ICU-20795 BRS test without data task: Adds a status check after Locale instance
creation. Test causes segmentation fault if it tries to continue beyond failed
instance creation.
segmentation fault if instance creation fails
2019-09-06 09:43:30 -07:00
Markus Scherer
611a659d4c ICU-20795 add LocaleMatcher to API docs index 2019-09-05 14:15:59 -07:00
Jeff Genovy
b851c53b91 ICU-20807 BRS65: Environment test failure in cintltst-timezone
The test fails for "America/Argentina/ComodRivadavia", which has length
of 32, the same as the buffer. The results in the string being not
terminated with a NUL.

This increases the buffer size used by the test, and also checks for the
string not terminated warning.
2019-09-05 14:12:57 -07:00
Steven R. Loomis
ddadc9427b ICU-13745 fix undefined behavior: GregorianCalendar::setGregorianChange()
- Julian days outside of INT32_MIN..INT32_MAX are normalized
- Add a test case
2019-09-04 23:20:31 +02:00
Jeff Genovy
d89c4909f8 ICU-20802 Need to use LocalMemory in uloc_openKeywordList, not LocalPointer 2019-08-31 00:30:12 -07:00
Markus Scherer
616b3c5647 ICU-13647 fix SearchIterator docs sample: getMatchedLength() not getMatchLength() 2019-08-30 23:12:29 -07:00
Markus Scherer
e9285d9675 ICU-20518 update u_isbase() reference to Unicode Standard Base character 2019-08-30 17:06:33 -07:00
Jeff Genovy
973a96785e ICU-20802 OOM not handled in uloc_openKeywordList.
Also change to use LocalPointer and nullptr instead of NULL.
2019-08-30 16:35:26 -07:00
Markus Scherer
c4f68c3790 ICU-13649 UnicodeString docs: mention std::string clear() to make remove() easier to find 2019-08-30 16:24:10 -07:00
Jeff Genovy
543495da74 ICU-20368 OOM not handled in NumberFormatterImpl::macrosToMicroGenerator 2019-08-30 16:00:06 -07:00
Peter Edberg
0801dd0bdd ICU-20577 Restore C MeasureFormat ability to adopt non-decimal number formatter (#789) 2019-08-30 15:53:05 -07:00
Markus Scherer
7237fc58b4 ICU-12086 ICU-12165 Currency.getName() param isChoiceFormat can be null, make it so, document, use null in library code 2019-08-30 14:47:19 -07:00
Victor Chang
6ff43608d2 ICU-20589 Fix EraRulesTest#testAPIs failure on 1 May 2019 2019-08-30 17:21:25 -04:00
Peter Edberg
f46b567ba3 ICU-20701 Add more PluralRules tests for locales with keywords 2019-08-30 10:06:21 -07:00
Daniel Ju
cfe093e945 ICU-20795 BRS65RC Update version numbers and readme files, regenerate JARs 2019-08-30 17:58:24 +02:00
Peter Edberg
62914d1f07 ICU-20620 cap UNUM_MAX_FRACTION_DIGITS setting at 999 2019-08-29 16:12:09 -07:00
Frank Tang
eeb759063b ICU-20799 delete calendarToAdopt upon error
ICU-20799 add unit tests

ICU-20799 initialize error and add comments.
2019-08-29 15:49:37 -07:00
Jeff Genovy
c28505caaa ICU-20555 Fix Windows build failures with long paths: Use PowerShell when command length exceeds CMD's limit. 2019-08-29 12:22:56 -07:00
Jeff Genovy
b702db31df ICU-20680 Add comments about UPRV_UNREACHABLE to u_UCharsToChars and CEIBuffer::get[Previous]. 2019-08-28 17:22:15 -07:00
Jeff Genovy
ed99298431 ICU-20794 Fix typo in ucurr.h 2019-08-28 13:24:48 -07:00
Jeff Genovy
1573018e5e ICU-20789 Clean-up the VS "clean" target for the Makedata project. 2019-08-28 12:32:42 -07:00
Peter Edberg
141884a85c ICU-20680 revert use of UPRV_UNREACHABLE in places actually reached in production code 2019-08-27 23:23:36 -07:00
Jeff Genovy
4b6eb7236a ICU-20782 Enable Windows icucheck.bat script for ARM/ARM64. 2019-08-27 18:29:12 -07:00
Jeff Genovy
f7abe8c1c1 ICU-20782 Add support for cross-compiling Windows ARM/ARM64 data DLL from the x64 bits. 2019-08-26 22:50:31 -07:00
Jeff Genovy
408752ec49 ICU-20782 Enable Windows desktop ARM and ARM64 builds of ICU4C.
This enables "classic" desktop builds of ICU4C for both ARM (32-bit)
and ARM64 (64-bit) on Windows.

All but the two samples "cal" and "date" in the "allinone" project now
have ARM and ARM64 project configurations, and build for Windows Desktop
ARM/ARM64.

Note: In order to build the ARM/ARM64 data DLL, you need to first build
x64/Release, as the ARM/ARM build uses the x64 bits in order to be able
to cross-compile for ARM/ARM64. This allows for completely building
ARM/ARM64 binaries using only x64 hardware.

The ARM/ARM64 builds require using a newer version of the Windows SDK
than 8.1, so they have a separate WindowsTargetPlatformVersion which
uses Windows 10 SDK version 10.0.16299.0 (aka RS3), which is the first
version of the Windows SDK to support building ARM64 desktop applications.

In addition this also greatly cleans-up the ICU4C ".vcxproj" files, in
order to remove redundant parts, fix inconsistencies, and make them more
readable. This introduces two new variables in the shared `*.props`
files: `IcuBinOutputDir` and `IcuLibOutputDir` in order to further
reduce the amount of duplicated lines in the individual ".vcxproj"
files themselves.
2019-08-26 22:50:31 -07:00
Jose Dapena Paz
407442dec7 ICU-20784 Do not override clang compiler internal builtins
In the case several internal builtins defined by clang were not available,
ICU was replacing them by a stub implementation. But that was breaking
detection of availability of same methods in other parts of Chromium
(specifically in base/location.h).

Instead of that, this change creates ICU specific macros that will
map to those builtins when available, or to stub implementation if
not.

I.e. for the case of __has_builtin, previous implementation was
defining __has_builtin(x) as 0 in case it was not declared. With
new implementation, there is a macro UPRV_HAS_BUILTIN that maps
to __has_builtin if available, or 0 if not.
2019-08-26 09:14:01 -07:00
Markus Scherer
d3315d98ef ICU-20783 use C++ covariant return types 2019-08-23 11:45:36 -07:00
Markus Scherer
f02b496494 ICU-20783 C++ covariant return types: clone(), freeze() & friends 2019-08-22 16:24:41 -07:00
Markus Scherer
deec7ef683 ICU-20646 make Edits::copyErrorTo() const 2019-08-22 13:25:01 -07:00
Filip Filmar
0a01b29005 ICU-20776 Checks for nullness in UMutex::lock()
Adds `U_ASSERT` check before using `m->lock()` to make allocation issues
more apparent at least in debug builds.

There is probably quite a few places like this, but let's try fixing
broken windows.
2019-08-21 11:21:24 -07:00
Jeff Genovy
c5ad4664f9 ICU-20768 Remove fixed DLL base addresses when building Windows DLLs.
Remove redundant FixedBaseAddress entries from the vcxproj files.
Make the pkgdata -b option a no-op, and output a message to the user.
2019-08-20 15:37:15 -07:00
Andy Heninger
327087150f ICU-20618 Regex nested lookaround expressions, clean up active match region handling. 2019-08-19 13:31:34 -07:00
Andy Heninger
5f837abd40 ICU-13533 Fix address sanitizer failures found with no-data ICU testing. 2019-08-19 13:29:32 -07:00
Markus Scherer
41c24b6c00 ICU-9695 port LocaleMatcher to C++ 2019-08-19 10:41:35 -07:00
Fredrik Roubert
b4b2378931 ICU-20601 Wrap ICU test compound macros in do { } while.
This does the same for the ICU test code as was done for the
public ICU API in commit 480bec3ea6.
2019-08-15 22:01:42 +02:00
Fredrik Roubert
4fb47b12a7 ICU-20601 Wrap ICU implementation compound macros in do { } while.
This does the same for the ICU implementation code as was done for the
public ICU API in commit 480bec3ea6.
2019-08-15 20:48:50 +02:00
Fredrik Roubert
480bec3ea6 ICU-20601 Wrap public ICU API compound macros in do { } while.
This is the normal way of making compound macros behave like statements
and allowing macro invocations that look like function calls to work
just like if they were function calls.

Before ICU 65, function-like, multi-statement ICU macros were just
defined as series of statements wrapped in { } blocks and the caller
could choose to either treat them as if they were actual functions and
end the invocation with a trailing ; creating an empty statement after
the block or else omit this trailing ; using the knowledge that the
macro would expand to { }.

To continue supporting code that depends on that old behaviour, on being
able to omit the trailing ; when invoking one of these macros, the new
surrounding do { } while is done through preprocessor defines that can
easily be overridden at compile time, when needed.
2019-08-15 19:17:25 +02:00
Fredrik Roubert
d8f14e22df ICU-20758 Add a StringPiece constructor for any string view type.
Using the C++ SFINAE (substitution failure is not an error) technique,
it's possible to provide an icu::StringPiece constructor that accepts
any string view type that might be available in the current compilation
unit, without adding any additional dependencies or configuration flags
to ICU.
2019-08-15 13:36:09 +02:00
Fredrik Roubert
c78d9fa137 ICU-20601 Add missing semicolons.
These are the same changes for the C++ code as was done for the C code
by commit aa60d4292e.
2019-08-15 12:30:21 +02:00
Fredrik Roubert
5d6d29b76a ICU-20601 Remove superfluous semicolons (-Wextra-semi-stmt).
These are the same changes for the C++ code as was done for the C code
by commit 17606e0345.
2019-08-15 12:30:21 +02:00
Shane Carr
1d2861bb0c ICU-20627 Adding getAvailableLocalesByType, ICU4C and ICU4J. 2019-08-14 20:45:27 -07:00
Jeff Genovy
9a3f15c2b3 ICU-20759 Add ucal_getDefaultTimeZone C API for host OS timezone detection. 2019-08-14 18:27:04 -07:00
Shane Carr
5e7ff44f91 ICU-20517 Removing dead code in rbnf.cpp 2019-08-14 17:49:52 -07:00
Shane Carr
3879315738 ICU-13596 Clarifying error code type in numfmt.h parse() 2019-08-14 17:49:04 -07:00
Shane Carr
4785f55622 ICU-20562 Adding toDecimalNumber method to C++ FormattedNumber. 2019-08-14 16:59:09 -07:00
Shane Carr
4e07b85279 ICU-20422 Redefining U_NO_THROW to U_NOEXCEPT 2019-08-14 10:32:48 -07:00
Nikita Iashchenko
89a618de70 ICU-20771 Fix incorrect documentation tag for DateTimePatternGenerator 2019-08-14 10:27:20 -07:00
Shane Carr
2b3e3e3ce6 ICU-20524 Adding variables for relative file replacement directory.
Also fixes some bugs with file replacement.
2019-08-14 00:25:26 -07:00
Jeff Genovy
d1293c50cb ICU-20712 Add support for building Windows UWP ARM/ARM64 data DLLs.
This also changes the pkgdata tool command line options to decouple the
ARM/ARM64 flags from the UWP flag, and adds a generic architecture
option (-a) for passing in the value of the linker "/MACHINE:" argument
on the command line. (Ex: -a ARM64).

Additionally this change also adds another option to pkgdata (-b) to 
set /DYNAMICBASE on the data DLL, which is required for the ARM64 builds.

Both of these changes also work towards future work in order to enable
full ARM64 desktop builds without UWP.

This change also removes a number of ifdefs/forks in the ICU code based
on U_PLATFORM_HAS_WINUWP_API, and changes them to use ICU_DATA_DIR_WINDOWS
instead. This is needed to unblock the usage of the data DLL in the
UWP scenario, but also helps to further reduce the divergence of the UWP
projects from regular Windows builds.

Related tickets:
  ICU4C: Remove fixed DLL base addresses when building Windows DLLs
  https://unicode-org.atlassian.net/browse/ICU-20768

  Add support to generate ICU data DLL for Windows arm64
  https://unicode-org.atlassian.net/browse/ICU-20670
2019-08-13 17:03:33 -07:00
Shane Carr
2390ce569e ICU-20685 Improving docs for UErrorCode. 2019-08-13 16:01:48 -07:00
Shane Carr
d983221543 ICU-20764 Allow top-level include and exclude in data filter rules. 2019-08-13 15:12:32 -07:00
Shane Carr
035eead0e8 ICU-20423 Removing deprecated method toNumberFormatter() 2019-08-13 13:06:52 -07:00
Shane Carr
f4fc9d06c2 ICU-20394 Changing DecimalFormatFields to not allocate as many objects 2019-08-13 13:06:20 -07:00
Shane Carr
513b0c20b0 ICU-13743 Adding number permutation test.
Adds a test suite in C++ and Java to test many permutations of options in NumberFormatter.
2019-08-12 23:34:51 -07:00
Shane Carr
b4d41b0561 ICU-20737 Removing Python dependency on distutils.
Deletes tstfiles.mk and merges the list into BUILDRULES.py
2019-08-12 15:12:48 -07:00
Shane Carr
afab3f992c ICU-13780 Removing DecimalFormat_ICU58 (finally). 2019-08-12 14:59:45 -07:00
Markus Scherer
527ff9f7ac ICU-20735 simpler state saving for C++ string tries 2019-08-12 14:49:10 -07:00
Jeff Genovy
8646872f68 ICU-20757 Fix typos in utrans.h header file. 2019-08-09 17:43:31 -07:00
Fredrik Roubert
aa60d4292e ICU-20601 Add missing semicolons.
The way these macros currently are defined, the code compiles also
without the final semicolons. But for consistency and in order to allow
the macro definitions to be updated also these macro invocations should
have final semicolons just like in the rest of this code base.
2019-08-09 14:38:52 +02:00
Fredrik Roubert
17606e0345 ICU-20601 Remove superfluous semicolons (-Wextra-semi-stmt). 2019-08-09 14:38:52 +02:00
Rohan Palaniappan
185fbba5a2 ICU-20747 Modify common_uwp to use onecore.lib instead of onecoreuap.lib 2019-08-07 17:06:13 -07:00
Jeff Genovy
e72290c45e ICU-13764 Add separate CI build that treats warnings as errors with clang.
This adds a separate CI build that enables -Werror for clang.

This also fixes all of the -Wall -Wextra warnings in the tests, and all the
-Wextra-semi warnings as well.
2019-07-30 22:10:02 -07:00
Andy Heninger
3ac2da2044 ICU-20048 Remove use of std::align() for compat with g++ 4.9. 2019-07-30 11:19:53 -07:00
Steven R. Loomis
fc487bf32b ICU-20493 Warn on global/static c’tors
- add -Wglobal-constructors to clang (only for libs)
- Note: ignore 'runstatedir' flap in configure
2019-07-26 15:16:13 -07:00
Andy Heninger
f793ad55e9 ICU-20729 Remove obsolete U_HAVE_STD_ATOMICS and similar @internal macros. 2019-07-24 16:37:40 -07:00
Jeff Genovy
16f2ba2180 ICU-20721 Fix typo in API docs about unumf_openForSkeletonAndLocale. 2019-07-24 11:52:19 -07:00
Shane Carr
1ef18dc761 ICU-20708 Fixing edge cases with negative infinity and NaN. 2019-07-23 15:03:49 -07:00
Jeff Genovy
69fb255169 ICU-20712 Add support for building ICU4C UWP with ARM64, add ARM32/ARM64 to CI.
This change adds support for building the ICU4C UWP projects for ARM64.
Additionally it adds CI builds for ARM32 and ARM64.

Co-Authored-By: Daniel Ju <daju@microsoft.com>
2019-07-23 13:29:36 -07:00
Jeff Genovy
b2170e4773 ICU-20718 Fix failing MSYS2 build due to current path confusion.
The Azure DevOps VM images that are used in the CI builds recently
updated the version of MSYS that is installed, which is causing the
MSYS builds to fail. It seems that this new version has issues with
using the shell cmd method in the makefiles to obtain the current path.

However, we can avoid this entirely by using the cygpath utility, which
also avoids the overhead of launching a new cmd instance just to get
the path. Unfortunately, it seems that older versions of MSYS don't
have this utility program included by default, though versions of 
MSYS 2 and up do have it included by default.

We can continue using the old approach for the older versions and use
the cygpath approach for new versions.
2019-07-22 17:04:06 -07:00
Shane Carr
bbf8c10e0d ICU-20716 Fixing some buffer overruns in genccode 2019-07-19 17:17:16 -07:00
Jeff Genovy
2cd213ac3b ICU-20689 Fix race condition in UMutex code, leading to random crashes. 2019-07-16 10:41:21 -07:00
Victor Chang
d56f291178 ICU-20659 Fix DTD link in XML data files
- http://www.unicode.org/repos/cldr/trunk/common/dtd/ldml.dtd returns
  HTTP 302 error and redirects to an html page, not a dtd content
  apparently.
- Clone the dtd files from CLDR release-35-1
  https://raw.githubusercontent.com/unicode-org/cldr/release-35-1/common/dtd/ldml.dtd
2019-07-11 09:19:29 -07:00
Shane Carr
a72b628a5d ICU-20593 Data slicing: allow more characters in res filter rules. 2019-07-09 18:27:10 -05:00
Shane Carr
77ca774840 ICU-20593 Various updates to resource tracing. 2019-07-09 15:40:01 -05:00
Shane Carr
e1b5f85e4a ICU-20593 Data slicing: Fix mixed file and resource filter. 2019-07-09 15:38:29 -05:00
yumaoka
33080a9072 ICU-20692 tzdata2019b update 2019-07-08 08:42:47 +09:00
Andy Heninger
6f0627b5d8 ICU-20672 Compiler Warning Cleanup. 2019-07-01 16:42:01 -07:00
Andy Heninger
5a23d83fa2 ICU-20650 Memory alignment of buffers used by sort functions. 2019-07-01 13:18:25 -07:00
Andy Heninger
0367d4c135 ICU-20048 remove uses of UAlignedMemory, replace with native C++11 constructs.
Also update the Travis CI configuration to use newer compilers, and the
dependency checker to be happy with the newer clang compiler.
2019-06-28 13:35:17 -07:00
Andy Heninger
fa240d49cc ICU-13637 Break Iterator Rule Updates for Indic Grapheme Clusters. 2019-06-27 17:17:26 -07:00
Norbert Runge
c43455749b ICU-20652 Corrects calculation of byte sequence length to prevent buffer
overflow.

ICU-20652 Add parenthesis, improve readability.
2019-06-27 17:11:40 -07:00
Norbert Runge
6e5755a2a8 ICU-20652 Adds two fuzzer target for collation (compare() and
RulebasedCollator().

ICU-20652 Adds test/fuzzer/Makefile (auto-generated upon ICU4C configuration)
to .gitignore.

ICU-20652 In response to PR#693 review, corrects allocation size of char16_t
buffer.
While at it, adds generated files to .gitignore.
2019-06-25 13:01:41 -07:00
Shane F. Carr
48df66704c ICU-20666 Adding insert/appendChar16 to FormattedStringBuilder. 2019-06-25 06:24:20 +05:30