Fix some checks when using ICU DLL from Windows 10

This commit is contained in:
Frederik Seiffert 2022-02-18 17:00:14 +01:00 committed by Frederik Seiffert
parent 7187cab003
commit b6740f0f6c
3 changed files with 4 additions and 3 deletions

View file

@ -447,7 +447,8 @@ do \
options: (NSUInteger) opts
{
#if GS_USE_ICU == 1 && (U_ICU_VERSION_MAJOR_NUM > 4 \
|| (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8))
|| (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8) \
|| defined(HAVE_ICU_H))
NSDateComponents *comps = nil;
UErrorCode err = U_ZERO_ERROR;

View file

@ -946,7 +946,7 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
pat = malloc(sizeof(UChar) * patLength);
[self->_dateFormat getCharacters: pat];
}
#if U_ICU_VERSION_MAJOR_NUM >= 50
#if U_ICU_VERSION_MAJOR_NUM >= 50 || defined(HAVE_ICU_H)
timeStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_timeStyle);
dateStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_dateStyle);
#else

View file

@ -38,7 +38,7 @@
* won't work because libicu internally renames all entry points with some cpp
* magic.
*/
#if (U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4))
#if U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4) || defined(HAVE_ICU_H)
#define HAVE_UREGEX_OPENUTEXT 1
#endif