From 02e76897eb57d71cdef3e414b691604b217b07ba Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 7 Apr 2017 18:26:45 +0000 Subject: [PATCH] ICU-12786 dont call Win32 tz functions on cygwin (patch) X-SVN-Rev: 40007 --- icu4c/source/common/wintz.cpp | 4 ++-- icu4c/source/common/wintz.h | 4 ++-- icu4c/source/i18n/datefmt.cpp | 2 +- icu4c/source/i18n/windtfmt.cpp | 4 ++-- icu4c/source/i18n/windtfmt.h | 4 ++-- icu4c/source/i18n/wintzimpl.cpp | 2 +- icu4c/source/i18n/wintzimpl.h | 4 ++-- icu4c/source/test/intltest/dtfmttst.cpp | 4 ++-- icu4c/source/test/intltest/uobjtest.cpp | 4 +--- icu4c/source/test/intltest/windttst.cpp | 4 ++-- icu4c/source/test/intltest/windttst.h | 4 ++-- 11 files changed, 19 insertions(+), 21 deletions(-) diff --git a/icu4c/source/common/wintz.cpp b/icu4c/source/common/wintz.cpp index 34276eb7388..10e69ca59dd 100644 --- a/icu4c/source/common/wintz.cpp +++ b/icu4c/source/common/wintz.cpp @@ -15,7 +15,7 @@ // This file contains only desktop Windows behavior // Windows UWP calls Windows::Globalization directly, so this isn't needed there. -#if U_PLATFORM_HAS_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) +#if U_PLATFORM_USES_ONLY_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) #include "wintz.h" #include "cmemory.h" @@ -381,4 +381,4 @@ uprv_detectWindowsTimeZone() return icuid; } -#endif /* U_PLATFORM_HAS_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) */ +#endif /* U_PLATFORM_USES_ONLY_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) */ diff --git a/icu4c/source/common/wintz.h b/icu4c/source/common/wintz.h index 69da7f397c3..7be30eb4470 100644 --- a/icu4c/source/common/wintz.h +++ b/icu4c/source/common/wintz.h @@ -18,7 +18,7 @@ // This file contains only desktop windows behavior // Windows UWP calls Windows::Globalization directly, so this isn't needed there. -#if U_PLATFORM_HAS_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) +#if U_PLATFORM_USES_ONLY_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) /** * \file @@ -33,6 +33,6 @@ U_CDECL_END U_CFUNC const char* U_EXPORT2 uprv_detectWindowsTimeZone(); -#endif /* U_PLATFORM_HAS_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) */ +#endif /* U_PLATFORM_USES_ONLY_WIN32_API && (U_PLATFORM_HAS_WINUWP_API == 0) */ #endif /* __WINTZ */ diff --git a/icu4c/source/i18n/datefmt.cpp b/icu4c/source/i18n/datefmt.cpp index 7dc753f1411..3e879be4447 100644 --- a/icu4c/source/i18n/datefmt.cpp +++ b/icu4c/source/i18n/datefmt.cpp @@ -498,7 +498,7 @@ DateFormat* U_EXPORT2 DateFormat::create(EStyle timeStyle, EStyle dateStyle, const Locale& locale) { UErrorCode status = U_ZERO_ERROR; -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API char buffer[8]; int32_t count = locale.getKeywordValue("compat", buffer, sizeof(buffer), status); diff --git a/icu4c/source/i18n/windtfmt.cpp b/icu4c/source/i18n/windtfmt.cpp index d0599ab5147..be5f384c2c6 100644 --- a/icu4c/source/i18n/windtfmt.cpp +++ b/icu4c/source/i18n/windtfmt.cpp @@ -13,7 +13,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API #if !UCONFIG_NO_FORMATTING @@ -403,5 +403,5 @@ U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ -#endif // U_PLATFORM_HAS_WIN32_API +#endif // U_PLATFORM_USES_ONLY_WIN32_API diff --git a/icu4c/source/i18n/windtfmt.h b/icu4c/source/i18n/windtfmt.h index 6d72a38e0cd..33069058fb2 100644 --- a/icu4c/source/i18n/windtfmt.h +++ b/icu4c/source/i18n/windtfmt.h @@ -16,7 +16,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API #if !UCONFIG_NO_FORMATTING @@ -134,6 +134,6 @@ U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ -#endif // U_PLATFORM_HAS_WIN32_API +#endif // U_PLATFORM_USES_ONLY_WIN32_API #endif // __WINDTFMT diff --git a/icu4c/source/i18n/wintzimpl.cpp b/icu4c/source/i18n/wintzimpl.cpp index 5a29f29a77a..7a87d1c4f59 100644 --- a/icu4c/source/i18n/wintzimpl.cpp +++ b/icu4c/source/i18n/wintzimpl.cpp @@ -13,7 +13,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API && !UCONFIG_NO_FORMATTING +#if U_PLATFORM_USES_ONLY_WIN32_API && !UCONFIG_NO_FORMATTING #include "wintzimpl.h" diff --git a/icu4c/source/i18n/wintzimpl.h b/icu4c/source/i18n/wintzimpl.h index 2fb0434a705..772ea95bc52 100644 --- a/icu4c/source/i18n/wintzimpl.h +++ b/icu4c/source/i18n/wintzimpl.h @@ -16,7 +16,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API /** * \file * \brief C API: Utilities for dealing w/ Windows time zones. @@ -34,6 +34,6 @@ U_CAPI UBool U_EXPORT2 uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length); -#endif /* U_PLATFORM_HAS_WIN32_API */ +#endif /* U_PLATFORM_USES_ONLY_WIN32_API */ #endif /* __WINTZIMPL */ diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index 3f5584a5f12..ba0929f2ddf 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -25,7 +25,7 @@ #include "caltest.h" // for fieldName #include // for sprintf -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API #include "windttst.h" #endif @@ -2374,7 +2374,7 @@ void DateFormatTest::TestZTimeZoneParsing(void) { void DateFormatTest::TestHost(void) { -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API Win32DateTimeTest::testLocales(this); #endif } diff --git a/icu4c/source/test/intltest/uobjtest.cpp b/icu4c/source/test/intltest/uobjtest.cpp index 988606c88df..b1d6738e1d3 100644 --- a/icu4c/source/test/intltest/uobjtest.cpp +++ b/icu4c/source/test/intltest/uobjtest.cpp @@ -384,13 +384,11 @@ void UObjectTest::testIDs() TESTCLASSID_FACTORY(IndianCalendar, Calendar::createInstance(Locale("@calendar=indian"), status)); TESTCLASSID_FACTORY(ChineseCalendar, Calendar::createInstance(Locale("@calendar=chinese"), status)); TESTCLASSID_FACTORY(TaiwanCalendar, Calendar::createInstance(Locale("@calendar=roc"), status)); -#if U_PLATFORM_HAS_WIN32_API - TESTCLASSID_FACTORY(Win32DateFormat, DateFormat::createDateInstance(DateFormat::kFull, Locale("@compat=host"))); #if U_PLATFORM_USES_ONLY_WIN32_API + TESTCLASSID_FACTORY(Win32DateFormat, DateFormat::createDateInstance(DateFormat::kFull, Locale("@compat=host"))); TESTCLASSID_FACTORY(Win32NumberFormat, NumberFormat::createInstance(Locale("@compat=host"), status)); #endif #endif -#endif #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO /* TESTCLASSID_ABSTRACT(BreakIterator); No staticID! */ diff --git a/icu4c/source/test/intltest/windttst.cpp b/icu4c/source/test/intltest/windttst.cpp index 80769e73421..942e70fb060 100644 --- a/icu4c/source/test/intltest/windttst.cpp +++ b/icu4c/source/test/intltest/windttst.cpp @@ -13,7 +13,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API #if !UCONFIG_NO_FORMATTING @@ -193,4 +193,4 @@ void Win32DateTimeTest::testLocales(TestLog *log) #endif /* #if !UCONFIG_NO_FORMATTING */ -#endif /* U_PLATFORM_HAS_WIN32_API */ +#endif /* U_PLATFORM_USES_ONLY_WIN32_API */ diff --git a/icu4c/source/test/intltest/windttst.h b/icu4c/source/test/intltest/windttst.h index 0c26c147ee7..ffa71644ac0 100644 --- a/icu4c/source/test/intltest/windttst.h +++ b/icu4c/source/test/intltest/windttst.h @@ -16,7 +16,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_HAS_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API #if !UCONFIG_NO_FORMATTING @@ -38,6 +38,6 @@ private: #endif /* #if !UCONFIG_NO_FORMATTING */ -#endif // U_PLATFORM_HAS_WIN32_API +#endif // U_PLATFORM_USES_ONLY_WIN32_API #endif // __WINDTTST