251 lines
7.7 KiB
Diff
251 lines
7.7 KiB
Diff
diff -Naur icu-orig/source/common/putilimp.h icu-cygwin/source/common/putilimp.h
|
|
--- icu-orig/source/common/putilimp.h 2013-05-24 00:02:12.000000000 +0400
|
|
+++ icu-cygwin/source/common/putilimp.h 2014-02-03 10:14:23.334200000 +0400
|
|
@@ -142,7 +142,7 @@
|
|
|
|
#ifdef U_HAVE_MMAP
|
|
/* Use the predefined value. */
|
|
-#elif U_PLATFORM_HAS_WIN32_API
|
|
+#elif U_PLATFORM_USES_ONLY_WIN32_API
|
|
# define U_HAVE_MMAP 0
|
|
#else
|
|
# define U_HAVE_MMAP 1
|
|
@@ -165,7 +165,7 @@
|
|
*/
|
|
#ifdef U_HAVE_DIRENT_H
|
|
/* Use the predefined value. */
|
|
-#elif U_PLATFORM_HAS_WIN32_API
|
|
+#elif U_PLATFORM_USES_ONLY_WIN32_API
|
|
# define U_HAVE_DIRENT_H 0
|
|
#else
|
|
# define U_HAVE_DIRENT_H 1
|
|
diff -Naur icu-orig/source/common/umutex.cpp icu-cygwin/source/common/umutex.cpp
|
|
--- icu-orig/source/common/umutex.cpp 2013-05-24 00:02:08.000000000 +0400
|
|
+++ icu-cygwin/source/common/umutex.cpp 2014-02-03 10:14:23.334200000 +0400
|
|
@@ -27,7 +27,7 @@
|
|
* platform independent set of mutex operations. For internal ICU use only.
|
|
*/
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
/* Prefer native Windows APIs even if POSIX is implemented (i.e., on Cygwin). */
|
|
# undef POSIX
|
|
#elif U_PLATFORM_IMPLEMENTS_POSIX
|
|
@@ -40,7 +40,7 @@
|
|
# include <pthread.h> /* must be first, so that we get the multithread versions of things. */
|
|
#endif /* POSIX */
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
# define WIN32_LEAN_AND_MEAN
|
|
# define VC_EXTRALEAN
|
|
# define NOUSER
|
|
@@ -53,7 +53,7 @@
|
|
#include "umutex.h"
|
|
#include "cmemory.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
#define SYNC_COMPARE_AND_SWAP(dest, oldval, newval) \
|
|
InterlockedCompareExchangePointer(dest, newval, oldval)
|
|
|
|
@@ -205,7 +205,7 @@
|
|
}
|
|
}
|
|
|
|
-#elif U_PLATFORM_HAS_WIN32_API
|
|
+#elif U_PLATFORM_USES_ONLY_WIN32_API
|
|
//
|
|
// Windows implementation of UMutex.
|
|
//
|
|
@@ -386,7 +386,7 @@
|
|
if (pIncFn) {
|
|
retVal = (*pIncFn)(gIncDecContext, p);
|
|
} else {
|
|
- #if U_PLATFORM_HAS_WIN32_API
|
|
+ #if U_PLATFORM_USES_ONLY_WIN32_API
|
|
retVal = InterlockedIncrement((LONG*)p);
|
|
#elif defined(USE_MAC_OS_ATOMIC_INCREMENT)
|
|
retVal = OSAtomicIncrement32Barrier(p);
|
|
@@ -410,7 +410,7 @@
|
|
if (pDecFn) {
|
|
retVal = (*pDecFn)(gIncDecContext, p);
|
|
} else {
|
|
- #if U_PLATFORM_HAS_WIN32_API
|
|
+ #if U_PLATFORM_USES_ONLY_WIN32_API
|
|
retVal = InterlockedDecrement((LONG*)p);
|
|
#elif defined(USE_MAC_OS_ATOMIC_INCREMENT)
|
|
retVal = OSAtomicDecrement32Barrier(p);
|
|
diff -Naur icu-orig/source/common/umutex.h icu-cygwin/source/common/umutex.h
|
|
--- icu-orig/source/common/umutex.h 2013-05-24 00:02:02.000000000 +0400
|
|
+++ icu-cygwin/source/common/umutex.h 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -28,7 +28,7 @@
|
|
#endif
|
|
|
|
/* For CRITICAL_SECTION */
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
#if 0
|
|
/* TODO(andy): Why doesn't windows.h compile in all files? It does in some.
|
|
* The intent was to include windows.h here, and have struct UMutex
|
|
@@ -149,7 +149,7 @@
|
|
*/
|
|
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
/* U_INIT_ONCE mimics the windows API INIT_ONCE, which exists on Windows Vista and newer.
|
|
* When ICU no longer needs to support older Windows platforms (XP) that do not have
|
|
@@ -196,7 +196,7 @@
|
|
|
|
#endif
|
|
|
|
-#if (U_PLATFORM != U_PF_CYGWIN && U_PLATFORM != U_PF_MINGW) || defined(CYGWINMSVC)
|
|
+#if (U_PLATFORM != U_PF_MINGW) || defined(CYGWINMSVC)
|
|
typedef struct UMutex UMutex;
|
|
#endif
|
|
|
|
diff -Naur icu-orig/source/common/wintz.c icu-cygwin/source/common/wintz.c
|
|
--- icu-orig/source/common/wintz.c 2013-05-24 00:02:04.000000000 +0400
|
|
+++ icu-cygwin/source/common/wintz.c 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -11,7 +11,7 @@
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#include "wintz.h"
|
|
#include "cmemory.h"
|
|
@@ -368,4 +368,4 @@
|
|
return icuid;
|
|
}
|
|
|
|
-#endif /* U_PLATFORM_HAS_WIN32_API */
|
|
+#endif /* U_PLATFORM_USES_ONLY_WIN32_API */
|
|
diff -Naur icu-orig/source/common/wintz.h icu-cygwin/source/common/wintz.h
|
|
--- icu-orig/source/common/wintz.h 2013-05-24 00:02:04.000000000 +0400
|
|
+++ icu-cygwin/source/common/wintz.h 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -14,7 +14,7 @@
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
/**
|
|
* \file
|
|
@@ -29,6 +29,6 @@
|
|
U_CFUNC const char* U_EXPORT2
|
|
uprv_detectWindowsTimeZone();
|
|
|
|
-#endif /* U_PLATFORM_HAS_WIN32_API */
|
|
+#endif /* U_PLATFORM_USES_ONLY_WIN32_API */
|
|
|
|
#endif /* __WINTZ */
|
|
diff -Naur icu-orig/source/i18n/datefmt.cpp icu-cygwin/source/i18n/datefmt.cpp
|
|
--- icu-orig/source/i18n/datefmt.cpp 2013-05-24 00:01:40.000000000 +0400
|
|
+++ icu-cygwin/source/i18n/datefmt.cpp 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -349,7 +349,7 @@
|
|
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 -Naur icu-orig/source/i18n/windtfmt.cpp icu-cygwin/source/i18n/windtfmt.cpp
|
|
--- icu-orig/source/i18n/windtfmt.cpp 2013-05-24 00:01:40.000000000 +0400
|
|
+++ icu-cygwin/source/i18n/windtfmt.cpp 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -11,7 +11,7 @@
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
@@ -318,5 +318,5 @@
|
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
|
|
|
-#endif // U_PLATFORM_HAS_WIN32_API
|
|
+#endif // U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
diff -Naur icu-orig/source/i18n/windtfmt.h icu-cygwin/source/i18n/windtfmt.h
|
|
--- icu-orig/source/i18n/windtfmt.h 2013-05-24 00:01:38.000000000 +0400
|
|
+++ icu-cygwin/source/i18n/windtfmt.h 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -14,7 +14,7 @@
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
@@ -135,6 +135,6 @@
|
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
|
|
|
-#endif // U_PLATFORM_HAS_WIN32_API
|
|
+#endif // U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#endif // __WINDTFMT
|
|
diff -Naur icu-orig/source/i18n/wintzimpl.cpp icu-cygwin/source/i18n/wintzimpl.cpp
|
|
--- icu-orig/source/i18n/wintzimpl.cpp 2013-05-24 00:01:42.000000000 +0400
|
|
+++ icu-cygwin/source/i18n/wintzimpl.cpp 2014-02-03 10:14:23.349800000 +0400
|
|
@@ -11,7 +11,7 @@
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#include "wintzimpl.h"
|
|
|
|
diff -Naur icu-orig/source/i18n/wintzimpl.h icu-cygwin/source/i18n/wintzimpl.h
|
|
--- icu-orig/source/i18n/wintzimpl.h 2013-05-24 00:01:38.000000000 +0400
|
|
+++ icu-cygwin/source/i18n/wintzimpl.h 2014-02-03 10:14:23.365400000 +0400
|
|
@@ -14,7 +14,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.
|
|
@@ -32,6 +32,6 @@
|
|
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 -Naur icu-orig/source/tools/ctestfw/unicode/utimer.h icu-cygwin/source/tools/ctestfw/unicode/utimer.h
|
|
--- icu-orig/source/tools/ctestfw/unicode/utimer.h 2013-05-24 00:02:12.000000000 +0400
|
|
+++ icu-cygwin/source/tools/ctestfw/unicode/utimer.h 2014-02-03 10:14:23.365400000 +0400
|
|
@@ -10,7 +10,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>
|
|
@@ -160,7 +160,7 @@
|
|
typedef void FuntionToBeTimed(void* param);
|
|
|
|
|
|
-#if U_PLATFORM_HAS_WIN32_API
|
|
+#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
struct UTimer{
|
|
LARGE_INTEGER start;
|