-
Notifications
You must be signed in to change notification settings - Fork 16
/
icu-wii.patch
161 lines (145 loc) · 4.97 KB
/
icu-wii.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
diff -Naur icu-native/source/common/putilimp.h icu/source/common/putilimp.h
--- icu-native/source/common/putilimp.h 2017-02-03 23:12:43.468839423 +0100
+++ icu/source/common/putilimp.h 2017-02-03 23:12:24.501980770 +0100
@@ -103,6 +103,7 @@
# define U_NL_LANGINFO_CODESET CODESET
#endif
+#if 0
#ifdef U_TZSET
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
@@ -147,6 +148,7 @@
#else
# define U_TZNAME tzname
#endif
+#endif
#ifdef U_HAVE_MMAP
/* Use the predefined value. */
diff -Naur icu-native/source/common/umutex.cpp icu/source/common/umutex.cpp
--- icu-native/source/common/umutex.cpp 2017-02-03 23:12:43.468839423 +0100
+++ icu/source/common/umutex.cpp 2017-02-03 23:12:24.501980770 +0100
@@ -183,7 +183,7 @@
//
//-------------------------------------------------------------------------------------------
-# include <pthread.h>
+//# include <pthread.h>
// Each UMutex consists of a pthread_mutex_t.
// All are statically initialized and ready for use.
@@ -194,7 +194,7 @@
if (mutex == NULL) {
mutex = &globalMutex;
}
- int sysErr = pthread_mutex_lock(&mutex->fMutex);
+ int sysErr = 0;//pthread_mutex_lock(&mutex->fMutex);
(void)sysErr; // Suppress unused variable warnings.
U_ASSERT(sysErr == 0);
}
@@ -206,7 +206,7 @@
if (mutex == NULL) {
mutex = &globalMutex;
}
- int sysErr = pthread_mutex_unlock(&mutex->fMutex);
+ int sysErr = 0;//pthread_mutex_unlock(&mutex->fMutex);
(void)sysErr; // Suppress unused variable warnings.
U_ASSERT(sysErr == 0);
}
@@ -217,21 +217,21 @@
if (mutex == NULL) {
mutex = &globalMutex;
}
- int sysErr = pthread_cond_wait(&cond->fCondition, &mutex->fMutex);
+ int sysErr = 0;//pthread_cond_wait(&cond->fCondition, &mutex->fMutex);
(void)sysErr;
U_ASSERT(sysErr == 0);
}
U_CAPI void U_EXPORT2
umtx_condBroadcast(UConditionVar *cond) {
- int sysErr = pthread_cond_broadcast(&cond->fCondition);
+ int sysErr = 0;//pthread_cond_broadcast(&cond->fCondition);
(void)sysErr;
U_ASSERT(sysErr == 0);
}
U_CAPI void U_EXPORT2
umtx_condSignal(UConditionVar *cond) {
- int sysErr = pthread_cond_signal(&cond->fCondition);
+ int sysErr = 0;//pthread_cond_signal(&cond->fCondition);
(void)sysErr;
U_ASSERT(sysErr == 0);
}
@@ -240,8 +240,8 @@
U_NAMESPACE_BEGIN
-static pthread_mutex_t initMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t initCondition = PTHREAD_COND_INITIALIZER;
+//static pthread_mutex_t initMutex = PTHREAD_MUTEX_INITIALIZER;
+//static pthread_cond_t initCondition = PTHREAD_COND_INITIALIZER;
// This function is called when a test of a UInitOnce::fState reveals that
@@ -254,19 +254,19 @@
//
U_COMMON_API UBool U_EXPORT2
umtx_initImplPreInit(UInitOnce &uio) {
- pthread_mutex_lock(&initMutex);
+ //pthread_mutex_lock(&initMutex);
int32_t state = uio.fState;
if (state == 0) {
umtx_storeRelease(uio.fState, 1);
- pthread_mutex_unlock(&initMutex);
+ //pthread_mutex_unlock(&initMutex);
return TRUE; // Caller will next call the init function.
} else {
while (uio.fState == 1) {
// Another thread is currently running the initialization.
// Wait until it completes.
- pthread_cond_wait(&initCondition, &initMutex);
+ //pthread_cond_wait(&initCondition, &initMutex);
}
- pthread_mutex_unlock(&initMutex);
+ //pthread_mutex_unlock(&initMutex);
U_ASSERT(uio.fState == 2);
return FALSE;
}
@@ -282,10 +282,10 @@
U_COMMON_API void U_EXPORT2
umtx_initImplPostInit(UInitOnce &uio) {
- pthread_mutex_lock(&initMutex);
+ //pthread_mutex_lock(&initMutex);
umtx_storeRelease(uio.fState, 2);
- pthread_cond_broadcast(&initCondition);
- pthread_mutex_unlock(&initMutex);
+ //pthread_cond_broadcast(&initCondition);
+ //pthread_mutex_unlock(&initMutex);
}
U_NAMESPACE_END
diff -Naur icu-native/source/common/umutex.h icu/source/common/umutex.h
--- icu-native/source/common/umutex.h 2017-02-03 23:12:43.465506055 +0100
+++ icu/source/common/umutex.h 2017-02-03 23:12:24.501980770 +0100
@@ -369,7 +369,12 @@
* POSIX platform
*/
-#include <pthread.h>
+//#include <pthread.h>
+
+#define PTHREAD_MUTEX_INITIALIZER 0
+#define PTHREAD_COND_INITIALIZER 0
+typedef uint32_t pthread_mutex_t;
+typedef uint32_t pthread_cond_t;
struct UMutex {
pthread_mutex_t fMutex;
diff -Naur icu-native/source/i18n/digitlst.cpp icu/source/i18n/digitlst.cpp
--- icu-native/source/i18n/digitlst.cpp 2017-02-03 23:12:43.458839321 +0100
+++ icu/source/i18n/digitlst.cpp 2017-02-03 23:20:49.026494913 +0100
@@ -50,6 +50,7 @@
#include <stdio.h>
#include <limits>
+#if 0
#if !defined(U_USE_STRTOD_L)
# if U_PLATFORM_USES_ONLY_WIN32_API
# define U_USE_STRTOD_L 1
@@ -59,6 +60,9 @@
# define U_USE_STRTOD_L 0
# endif
#endif
+#endif
+
+#define U_USE_STRTOD_L 0
#if U_USE_STRTOD_L && !U_PLATFORM_USES_ONLY_WIN32_API
# if U_PLATFORM == U_PF_CYGWIN