mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-21 12:40:02 +00:00
ICU-13099 Merging the Cygwin build patches r40005(#12784), r40006(#12785), r40007(#12786), r40008(#12787), r40009(#12788), r40010(#12790), r40011 & r40012(#12795) to maint-59.
X-SVN-Rev: 40020
This commit is contained in:
parent
f7d269f8c9
commit
6e34ef1a8c
16 changed files with 45 additions and 43 deletions
|
@ -43,8 +43,24 @@
|
|||
// Must be before any other #includes.
|
||||
#include "uposixdefs.h"
|
||||
|
||||
/* include ICU headers */
|
||||
#include "unicode/utypes.h"
|
||||
// First, the platform type. Need this for U_PLATFORM.
|
||||
#include "unicode/platform.h"
|
||||
|
||||
#if U_PLATFORM == U_PF_MINGW && defined __STRICT_ANSI__
|
||||
/* tzset isn't defined in strict ANSI on MinGW. */
|
||||
#undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
#if !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* include the rest of the ICU headers */
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/ustring.h"
|
||||
#include "putilimp.h"
|
||||
|
@ -119,20 +135,6 @@ using namespace Microsoft::WRL::Wrappers;
|
|||
# include <sys/neutrino.h>
|
||||
#endif
|
||||
|
||||
#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__)
|
||||
/* tzset isn't defined in strict ANSI on Cygwin and MinGW. */
|
||||
#undef __STRICT_ANSI__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
#if !U_PLATFORM_USES_ONLY_WIN32_API
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Only include langinfo.h if we have a way to get the codeset. If we later
|
||||
* depend on more feature, we can test on U_HAVE_NL_LANGINFO.
|
||||
|
@ -666,7 +668,7 @@ uprv_timezone()
|
|||
/* Note that U_TZNAME does *not* have to be tzname, but if it is,
|
||||
some platforms need to have it declared here. */
|
||||
|
||||
#if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED || (U_PLATFORM == U_PF_CYGWIN && !U_PLATFORM_USES_ONLY_WIN32_API))
|
||||
#if defined(U_TZNAME) && (U_PLATFORM == U_PF_IRIX || U_PLATFORM_IS_DARWIN_BASED)
|
||||
/* RS6000 and others reject char **tzname. */
|
||||
extern U_IMPORT char *U_TZNAME[];
|
||||
#endif
|
||||
|
|
|
@ -87,7 +87,7 @@ typedef size_t uintptr_t;
|
|||
|
||||
#ifdef U_HAVE_NL_LANGINFO_CODESET
|
||||
/* Use the predefined value. */
|
||||
#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX
|
||||
#elif U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_ANDROID || U_PLATFORM == U_PF_QNX
|
||||
# define U_HAVE_NL_LANGINFO_CODESET 0
|
||||
#else
|
||||
# define U_HAVE_NL_LANGINFO_CODESET 1
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -210,4 +210,4 @@ void Win32DateTimeTest::testLocales(DateFormatTest *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
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if U_PLATFORM_HAS_WIN32_API
|
||||
#if U_PLATFORM_USES_ONLY_WIN32_API
|
||||
# define VC_EXTRALEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
|
@ -162,7 +162,7 @@ typedef struct UTimer UTimer;
|
|||
typedef void FuntionToBeTimed(void* param);
|
||||
|
||||
|
||||
#if U_PLATFORM_HAS_WIN32_API
|
||||
#if U_PLATFORM_USES_ONLY_WIN32_API
|
||||
|
||||
struct UTimer{
|
||||
LARGE_INTEGER start;
|
||||
|
|
|
@ -283,7 +283,7 @@ writeAssemblyCode(const char *filename, const char *destdir, const char *optEntr
|
|||
uprv_strcpy(outFilePath, bufferStr);
|
||||
}
|
||||
|
||||
#ifdef WINDOWS_WITH_GNUC
|
||||
#if defined WINDOWS_WITH_GNUC && U_PLATFORM != U_PF_CYGWIN
|
||||
/* Need to fix the file seperator character when using MinGW. */
|
||||
swapFileSepChar(outFilePath, U_FILE_SEP_CHAR, '/');
|
||||
#endif
|
||||
|
|
|
@ -351,8 +351,10 @@ int32_t udbg_enumByName(UDebugEnumType type, const char *value) {
|
|||
*/
|
||||
U_CAPI const char *udbg_getPlatform(void)
|
||||
{
|
||||
#if U_PLATFORM_HAS_WIN32_API
|
||||
#if U_PLATFORM_USES_ONLY_WIN32_API
|
||||
return "Windows";
|
||||
#elif U_PLATFORM == U_PF_CYGWIN
|
||||
return "Cygwin";
|
||||
#elif U_PLATFORM == U_PF_UNKNOWN
|
||||
return "unknown";
|
||||
#elif U_PLATFORM == U_PF_DARWIN
|
||||
|
|
Loading…
Add table
Reference in a new issue