mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 05:55:35 +00:00
ICU-12786 dont call Win32 tz functions on cygwin (patch)
X-SVN-Rev: 40007
This commit is contained in:
parent
42f7039818
commit
02e76897eb
11 changed files with 19 additions and 21 deletions
|
@ -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) */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "caltest.h" // for fieldName
|
||||
#include <stdio.h> // 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
|
||||
}
|
||||
|
|
|
@ -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! */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue