Commit Graph

30798 Commits

Author SHA1 Message Date
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
552b01f611 ICU-20606 Add 32-bit Windows binaries to CI for Distrelease. 2019-08-28 12:34:25 -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
David Beaumont
2528d0bec1 ICU-20693 New LDML to ICU tooling.
See #721
2019-08-27 10:28:01 -07:00
Jeff Genovy
97516f58b1 ICU-20782 Extend CI build timeout for Windows ARM/ARM64. 2019-08-26 22:50:31 -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
Victor Chang
7942b58b81 ICU-20623 Add java compability parse mode into DecimalFormat
This internal parse mode is introduced for Android libcore.
2019-08-15 23:45:27 -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
Jeff Genovy
ca6480832e ICU-20766 Fix failing TravisCI build for ICU4J due to missing ANT. 2019-08-08 18:13:20 -07: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