Commit graph

107 commits

Author SHA1 Message Date
Elango Cheran
6153f2ef85 ICU-22774 Fix URL typo in error message 2024-10-17 09:38:26 -07:00
Fredrik Roubert
0bf8a95309 ICU-22793 Remove superfluous return value typecasts to UBool. 2024-09-19 17:11:38 +02:00
Fredrik Roubert
0178a07a26 ICU-22793 Clang-Tidy: google-readability-casting
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/google/readability-casting.html
2024-07-04 22:32:12 +02:00
Fredrik Roubert
564c92d666 ICU-22721 Delete obsolete __STRICT_ANSI__ workaround for MinGW.
This was originally added in the year 2004 for ICU-3854 but is no longer
needed with contemporary versions of MinGW where it instead as of GCC 14
causes this problem:

__STRICT_ANSI__ seems to have been undefined; this is not supported.
2024-05-10 16:11:21 -07:00
Fredrik Roubert
6ad78a08c7 ICU-22621 Clang-Tidy: readability-redundant-control-flow
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/redundant-control-flow.html
2024-03-19 15:55:56 +01:00
Fredrik Roubert
5401c12018 ICU-22621 Clang-Tidy: modernize-use-nullptr
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize/use-nullptr.html
2024-03-15 14:31:54 +01:00
Frank Yung-Fong Tang
ca631eaa26 ICU-22541 Fix MacOS 14 default timezone issue
See #2669
2023-10-12 17:16:05 -07:00
Markus Scherer
b6dcc95d3c ICU-21833 remove redundant void parameter lists
See #2351
2023-03-02 09:31:57 -08:00
Rob De Reycke
e8bc04d5df ICU-21386 uprv_tzname() should find the correct Olson ID when /etc/localtime is a "double" link
See #2323
2023-02-25 16:48:43 -05:00
Fredrik Roubert
2de88f9d9c ICU-21833 Replace UChar with char16_t in all C++ code. 2023-02-06 19:27:44 +01:00
Fredrik Roubert
2e0d30cfcf ICU-21833 Replace NULL with nullptr in all C++ code. 2023-02-03 20:20:38 +01:00
Frank Tang
de0a28644b ICU-22251 Move sprintf to snprintf.
See #2291
2023-01-25 23:23:29 -08:00
Fredrik Roubert
030fa1a479 ICU-21148 Consistently use standard lowercase true/false everywhere.
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
2022-09-07 20:56:33 +02:00
Andy Heninger
85705f04e0 ICU-21960 C++20 Warnings from ATOMIC_VAR_INIT
Remove the ICU macros ATOMIC_INT32_T_INITIALIZER and U_INITONCE_INITIALIZER,
which made use of C++ ATOMIC_VAR_INIT, which has been removed from C++20.

With modern C++ features being available, these macros no longer served
any real need.
2022-05-17 15:45:06 -07:00
Bernhard Messerklinger
43276e8c34 ICU-21429 Allow timezones with max 2 digits at the end to 2021-09-17 15:26:06 -04:00
luz paz
73eca0a9c9 ICU-21580 Fix typos in icu4c/
Found via `codespell -q 3 -L ans,anumber,atleast,ba,bre,hace,nd,nin,ois,rsource,som,sur,tht -S icu4c/source/data/zone,icu4c/source/data/lang`
ICU-21580 Fix source (related) typos
ICU-21580 Revert extraneous auto-encoding
ICU-21580 Re-add previous reverted fix without auto-encoding
2021-07-19 13:22:38 -05:00
Mojca Miklavec
05b20c1ccb ICU-21513 check if TARGET_OS_SIMULATOR has been defined
clang 11 throws an error when using undefined variables starting with
TARGET_OS_, and TARGET_OS_SIMULATOR is missing in earlier versions
of macOS, so the code would not compile without an additional guard.

See also ICU-13440.
2021-03-31 10:49:30 -07:00
yumaoka
d80f7bbd0e ICU-21498 Improve comment in uprv_tzname 2021-03-08 09:13:55 -08:00
Hugo van der Merwe
a08ac00c67 ICU-21304 Update old userguide links to unicode-org.github.io 2020-10-01 01:28:05 +02:00
Markus Scherer
18c4a69f80 ICU-9961 replace U_DRAFT/U_STABLE/U_INTERNAL with U_CAPI 2020-09-10 11:23:44 -07:00
Makoto Kato
c9037ca8d3 ICU-11992 uprv_tzname doesn't return valid time zone on Android 2020-07-06 10:11:20 -07:00
Diego Barrios Romero
de0306daaa ICU-21170 Fix function prototypes 2020-06-25 15:31:11 -07:00
Andrew Paprocki
cd41cba82a ICU-20895 ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR
Adds `ICU_TIMEZONE_FILES_DIR_PREFIX_ENV_VAR`, similar to
`ICU_DATA_DIR_PREFIX_ENV_VAR`, that specifies an environment variable
to retrieve and prepend to the ICU time zone data file path.
2020-02-12 12:45:12 -05: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
Andy Heninger
afa9b9b48e ICU-20588 UMutex, add cleanup of underlying mutexes, and simplify usage model 2019-05-24 13:24:59 -07:00
Andy Heninger
b772241b52 ICU-20520 UMutex refactoring.
- 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
2019-05-07 13:50:49 -07:00
Steven R. Loomis
075cefb2e2 ICU-20575 fix broken default locale mapping for C.UTF-8
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)
2019-04-25 14:59:32 -07:00
Peter Edberg
2849784108 ICU-13440 replace obsolete TARGET_IPHONE_SIMULATOR conditional 2019-03-13 18:39:20 -07:00
Jeff Genovy
1e86849408 ICU-20491 ICU4C u_getDataDirectory on Windows shouldn't set path to current directory by default.
This change was introduced by the following commit e9946ec98e.

However, there's really no reason why the Windows UWP version should require the icudtl.dat file
to be in the same directory as the icuuc.dll file.
2019-03-13 13:25:33 -07:00
Andy Heninger
bc4bb89af2 ICU-20488 mutex static constructor fixes.
Remove the dependencies from the ICU library code on static constructors
that were introduced by using std::mutex and condition variables. The
mutexes are lazily initialized by embedding them as local static variables
in getter functions, and relying on the C++ compiler/runtime to do thread
safe initialization of them.
2019-03-12 09:52:16 -07:00
Jeff Genovy
1188394d74 ICU-13820 ICU4C should use "Etc/Unknown" zone when host TZ detection fails.
Update API docs comments to clarify what is returned in failure cases.
2019-02-21 10:49:00 -08:00
Semun Lee
bdad79b622 ICU-20345 Skip ahead some files in searchForTZFile
Change-Id: I61042ca66f86457768e8fc0315137051013d2820
Signed-off-by: Semun Lee <semun.lee@samsung.com>
2019-02-20 21:09:46 -05:00
Markus Scherer
1afef30549 ICU-20187 drop support for long-obsolete locale ID variants 2019-02-14 12:27:42 -08:00
Jeff Genovy
25380f6f81 ICU-20352 Remove unneeded UWP includes for WRL and Windows.Globalization.h from putil.cpp 2019-01-16 14:28:09 -08:00
kbrow1i
7d99ba4e57 ICU-20191 Don't use Win32 APIs on Cygwin (#185)
This was fixed in earlier commits (see, for example, ICU-12786), but
the problem was reintroduced in commits f8ba68e and fcb82cb.
2018-10-04 14:10:00 -07:00
pedberg-icu
b56178412f
ICU-20075 For POSIX, increase correctedPOSIXLocale size for localeID expansion with @ (#112) 2018-09-27 14:27:40 -07:00
Jeff Genovy
4214b4aa2a
ICU-13687 ICU4C Enable Windows UWP version to use TZ update/override files. (#31)
Enable the Windows UWP version of ICU4C to use TZ update/override files (.res files) for out-of-band timezone data updates. Also use the *W version of the Windows APIs to avoid code-page conversion.
2018-09-27 14:27:39 -07:00
William Zhao
fcb82cb744
ICU-20103 Using GetLocaleInfoEx to get user default locale instead of using language for UWP app. (#86)
This pull request is to remove COM dependency in ICU, so that ICU does not need to care about if the caller is a UWP or not.
2018-09-27 14:27:39 -07:00
William Zhao
f8ba68ee1f
ICU-13842 Use GetDynamicTimeZoneInformation instead of Windows registry access in wintz.cpp (#55)
Use GetDynamicTimeZoneInformation instead of accessing the Windows registries so that it does not rely on COM in wintz. So that UWP apps could also use this code.
2018-09-27 14:27:38 -07:00
Shane Carr
afda6f1378 ICU-13634 Removing stray #include added in r41136.
X-SVN-Rev: 41199
2018-04-05 21:55:29 +00:00
Shane Carr
23d76d8863 ICU-13634 Adding integer overflow logic to ICU4C number pipeline in places where it is in ICU4J.
X-SVN-Rev: 41136
2018-03-23 00:56:16 +00:00
Peter Edberg
4727aef32b ICU-12770 Update/fix comments about TZDEFAULT target on various systems
X-SVN-Rev: 40659
2017-10-31 03:36:22 +00:00
Jungshik Shin
050e62025a ICU-13192 gCorrectedPOSIXLocaleis changed to const char*
X-SVN-Rev: 40627
2017-10-23 23:01:58 +00:00
Peter Edberg
419011d783 ICU-12770 Fix comment about TZZONEINFO path on different systems
X-SVN-Rev: 40432
2017-09-19 06:28:29 +00:00
Peter Edberg
5b966cdeba ICU-12770 Just check for /zoneinfo/ instead of full platform-specific TZZONEINFO; also fixes #13291
X-SVN-Rev: 40427
2017-09-18 23:24:34 +00:00
Andy Heninger
425f9eb00f ICU-13275 clear a clang warning introduced with the other warning fixes.
X-SVN-Rev: 40300
2017-07-31 17:41:42 +00:00
William Zhao
d847a21238 ICU-13275 Merge warning cleanup fixes into trunk
X-SVN-Rev: 40283
2017-07-22 01:11:59 +00:00
Jeff Genovy
7c841c6bb2 ICU-13278 Fix ifdefs for U_ENABLE_DYLOAD for Windows and UWP.
X-SVN-Rev: 40281
2017-07-21 00:48:43 +00:00
William Zhao
3da97c910d ICU-13275 Revert the previous changes to the trunk.
X-SVN-Rev: 40262
2017-07-13 23:26:06 +00:00
William Zhao
11a9b11c56 ICU-13275
This commit fixes compiler warnings when building at /W2.

1. Fix cast warnings for the two files.
2. Fix unreferenced variable warning for the two files.

X-SVN-Rev: 40261
2017-07-13 22:49:57 +00:00