3798
|
1 |
--- a/configure.in Mon Sep 19 02:59:42 2011
|
|
2 |
+++ b/configure.in Mon Sep 19 03:00:51 2011
|
|
3 |
@@ -2198,6 +2198,7 @@
|
3659
|
4 |
# foo.c:6: warning: visibility attribute not supported in this configuration; ignored
|
|
5 |
# ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
|
|
6 |
have_visibility_hidden=no
|
|
7 |
+ sgen_supported=true
|
|
8 |
;;
|
|
9 |
cygwin*)
|
|
10 |
have_visibility_hidden=no
|
3798
|
11 |
@@ -2269,6 +2270,7 @@
|
3659
|
12 |
if test x"$AR" = xfalse; then
|
|
13 |
AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
|
|
14 |
fi
|
|
15 |
+ sgen_supported=true
|
|
16 |
;;
|
|
17 |
alpha*-*-linux* | alpha*-*-osf*)
|
|
18 |
TARGET=ALPHA;
|
3798
|
19 |
--- a/mono/metadata/sgen-archdep.h Mon Sep 19 03:01:52 2011
|
|
20 |
+++ b/mono/metadata/sgen-archdep.h Mon Sep 19 03:04:32 2011
|
|
21 |
@@ -213,6 +213,78 @@
|
3659
|
22 |
((a)[15] = (gpointer) (UCONTEXT_GREGS((ctx))) [15]); \
|
|
23 |
} while (0)
|
|
24 |
|
|
25 |
+#elif defined(__sparc__)
|
|
26 |
+
|
3798
|
27 |
+#define REDZONE_SIZE 0
|
3659
|
28 |
+
|
|
29 |
+/* Don't bother with %g0 (%r0), it's always hard-coded to zero */
|
3798
|
30 |
+#define ARCH_NUM_REGS 15
|
3659
|
31 |
+#ifdef __sparcv9
|
3798
|
32 |
+#define ARCH_STORE_REGS(ptr) \
|
|
33 |
+ __asm__ __volatile__( \
|
|
34 |
+ "st %%g1,[%0]\n\t" \
|
|
35 |
+ "st %%g2,[%0+0x08]\n\t" \
|
|
36 |
+ "st %%g3,[%0+0x10]\n\t" \
|
|
37 |
+ "st %%g4,[%0+0x18]\n\t" \
|
|
38 |
+ "st %%g5,[%0+0x20]\n\t" \
|
|
39 |
+ "st %%g6,[%0+0x28]\n\t" \
|
|
40 |
+ "st %%g7,[%0+0x30]\n\t" \
|
|
41 |
+ "st %%o0,[%0+0x38]\n\t" \
|
|
42 |
+ "st %%o1,[%0+0x40]\n\t" \
|
|
43 |
+ "st %%o2,[%0+0x48]\n\t" \
|
|
44 |
+ "st %%o3,[%0+0x50]\n\t" \
|
|
45 |
+ "st %%o4,[%0+0x58]\n\t" \
|
|
46 |
+ "st %%o5,[%0+0x60]\n\t" \
|
|
47 |
+ "st %%o6,[%0+0x68]\n\t" \
|
|
48 |
+ "st %%o7,[%0+0x70]\n\t" \
|
|
49 |
+ : \
|
|
50 |
+ : "r" (ptr) \
|
|
51 |
+ : "memory" \
|
|
52 |
+ )
|
3659
|
53 |
+#else
|
3798
|
54 |
+#define ARCH_STORE_REGS(ptr) \
|
|
55 |
+ __asm__ __volatile__( \
|
|
56 |
+ "st %%g1,[%0]\n\t" \
|
|
57 |
+ "st %%g2,[%0+0x04]\n\t" \
|
|
58 |
+ "st %%g3,[%0+0x08]\n\t" \
|
|
59 |
+ "st %%g4,[%0+0x0c]\n\t" \
|
|
60 |
+ "st %%g5,[%0+0x10]\n\t" \
|
|
61 |
+ "st %%g6,[%0+0x14]\n\t" \
|
|
62 |
+ "st %%g7,[%0+0x18]\n\t" \
|
|
63 |
+ "st %%o0,[%0+0x1c]\n\t" \
|
|
64 |
+ "st %%o1,[%0+0x20]\n\t" \
|
|
65 |
+ "st %%o2,[%0+0x24]\n\t" \
|
|
66 |
+ "st %%o3,[%0+0x28]\n\t" \
|
|
67 |
+ "st %%o4,[%0+0x2c]\n\t" \
|
|
68 |
+ "st %%o5,[%0+0x30]\n\t" \
|
|
69 |
+ "st %%o6,[%0+0x34]\n\t" \
|
|
70 |
+ "st %%o7,[%0+0x38]\n\t" \
|
|
71 |
+ : \
|
|
72 |
+ : "r" (ptr) \
|
|
73 |
+ : "memory" \
|
|
74 |
+ )
|
|
75 |
#endif
|
|
76 |
|
|
77 |
+#define ARCH_SIGCTX_SP(ctx) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_SP])
|
|
78 |
+#define ARCH_SIGCTX_IP(ctx) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_PC])
|
|
79 |
+#define ARCH_COPY_SIGCTX_REGS(a,ctx) do { \
|
|
80 |
+ (a)[0] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G1]); \
|
|
81 |
+ (a)[1] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G2]); \
|
|
82 |
+ (a)[2] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G3]); \
|
|
83 |
+ (a)[3] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G4]); \
|
|
84 |
+ (a)[4] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G5]); \
|
|
85 |
+ (a)[5] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G6]); \
|
|
86 |
+ (a)[6] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_G7]); \
|
|
87 |
+ (a)[7] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O0]); \
|
|
88 |
+ (a)[8] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O1]); \
|
|
89 |
+ (a)[9] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O2]); \
|
|
90 |
+ (a)[10] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O3]); \
|
|
91 |
+ (a)[11] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O4]); \
|
|
92 |
+ (a)[12] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O5]); \
|
|
93 |
+ (a)[13] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O6]); \
|
|
94 |
+ (a)[14] = (gpointer) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_O7]); \
|
|
95 |
+ } while (0)
|
|
96 |
+
|
3659
|
97 |
+#endif
|
|
98 |
+
|
|
99 |
#endif /* __MONO_SGENARCHDEP_H__ */
|
3798
|
100 |
--- a/mono/utils/mono-sigcontext.h Mon Sep 19 03:05:28 2011
|
|
101 |
+++ b/mono/utils/mono-sigcontext.h Mon Sep 19 03:06:21 2011
|
3659
|
102 |
@@ -67,6 +67,16 @@
|
|
103 |
#define UCONTEXT_REG_ESI(ctx) (((ucontext_t*)(ctx))->sc_esi)
|
|
104 |
#define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->sc_edi)
|
|
105 |
#define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->sc_eip)
|
|
106 |
+#elif defined(PLATFORM_SOLARIS)
|
3798
|
107 |
+ #define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EAX])
|
|
108 |
+ #define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EBX])
|
|
109 |
+ #define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [ECX])
|
|
110 |
+ #define UCONTEXT_REG_EDX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EDX])
|
|
111 |
+ #define UCONTEXT_REG_EBP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EBP])
|
|
112 |
+ #define UCONTEXT_REG_ESP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [ESP])
|
|
113 |
+ #define UCONTEXT_REG_ESI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [ESI])
|
|
114 |
+ #define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EDI])
|
|
115 |
+ #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EIP])
|
3659
|
116 |
#else
|
|
117 |
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [REG_EAX])
|
|
118 |
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [REG_EBX])
|
3798
|
119 |
--- a/configure Mon Sep 19 03:06:47 2011
|
|
120 |
+++ b/configure Mon Sep 19 03:07:30 2011
|
|
121 |
@@ -22898,6 +22898,7 @@
|
3659
|
122 |
# foo.c:6: warning: visibility attribute not supported in this configuration; ignored
|
|
123 |
# ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
|
|
124 |
have_visibility_hidden=no
|
|
125 |
+ sgen_supported=true
|
|
126 |
;;
|
|
127 |
cygwin*)
|
|
128 |
have_visibility_hidden=no
|
3798
|
129 |
@@ -23017,6 +23018,7 @@
|
|
130 |
if test x"$AR" = xfalse; then
|
|
131 |
as_fn_error $? "The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin." "$LINENO" 5
|
3659
|
132 |
fi
|
|
133 |
+ sgen_supported=true
|
|
134 |
;;
|
|
135 |
alpha*-*-linux* | alpha*-*-osf*)
|
|
136 |
TARGET=ALPHA;
|
3798
|
137 |
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs Mon Sep 19 03:11:00 2011
|
|
138 |
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs Mon Sep 19 03:19:04 2011
|
|
139 |
@@ -208,6 +208,8 @@
|
3659
|
140 |
XSetICFocus (xic);
|
|
141 |
}
|
|
142 |
|
|
143 |
+ private bool have_Xutf8ResetIC = true;
|
|
144 |
+
|
|
145 |
public void FocusOut (IntPtr window)
|
|
146 |
{
|
|
147 |
if (xim == IntPtr.Zero)
|
3798
|
148 |
@@ -216,7 +218,13 @@
|
3659
|
149 |
this.client_window = IntPtr.Zero;
|
|
150 |
IntPtr xic = GetXic (window);
|
|
151 |
if (xic != IntPtr.Zero) {
|
|
152 |
- Xutf8ResetIC (xic);
|
|
153 |
+ if (have_Xutf8ResetIC) {
|
|
154 |
+ try {
|
|
155 |
+ Xutf8ResetIC (xic);
|
|
156 |
+ } catch (EntryPointNotFoundException) {
|
|
157 |
+ have_Xutf8ResetIC = false;
|
|
158 |
+ }
|
|
159 |
+ }
|
|
160 |
XUnsetICFocus (xic);
|
|
161 |
}
|
|
162 |
}
|
3798
|
163 |
@@ -1173,6 +1181,8 @@
|
3659
|
164 |
}
|
|
165 |
}
|
|
166 |
|
|
167 |
+ private bool have_Xutf8LookupString = true;
|
|
168 |
+
|
|
169 |
private int LookupString (ref XEvent xevent, int len, out XKeySym keysym, out IntPtr status)
|
|
170 |
{
|
|
171 |
IntPtr keysym_res;
|
3798
|
172 |
@@ -1180,9 +1190,27 @@
|
3659
|
173 |
|
|
174 |
status = IntPtr.Zero;
|
|
175 |
IntPtr xic = GetXic (client_window);
|
|
176 |
- if (xic != IntPtr.Zero) {
|
|
177 |
+ if (xic != IntPtr.Zero && have_Xutf8LookupString) {
|
|
178 |
do {
|
|
179 |
- res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, 100, out keysym_res, out status);
|
|
180 |
+ try {
|
|
181 |
+ res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, 100, out keysym_res, out status);
|
|
182 |
+ } catch (EntryPointNotFoundException) {
|
|
183 |
+ have_Xutf8LookupString = false;
|
|
184 |
+
|
|
185 |
+ /* Duplicate of the non-xic clause */
|
|
186 |
+ do {
|
|
187 |
+ res = XLookupString (ref xevent, lookup_byte_buffer, 100, out keysym_res, out status);
|
|
188 |
+ if ((int) status != -1) // XLookupBufferOverflow
|
|
189 |
+ break;
|
|
190 |
+ lookup_byte_buffer = new byte [lookup_byte_buffer.Length << 1];
|
|
191 |
+ } while (true);
|
|
192 |
+ lookup_buffer.Length = 0;
|
|
193 |
+ string s2 = Encoding.ASCII.GetString (lookup_byte_buffer, 0, res);
|
|
194 |
+ lookup_buffer.Append (s2);
|
|
195 |
+ keysym = (XKeySym) keysym_res.ToInt32 ();
|
|
196 |
+ return res;
|
|
197 |
+ }
|
3798
|
198 |
+
|
3659
|
199 |
if ((int) status != -1) // XLookupBufferOverflow
|
|
200 |
break;
|
|
201 |
lookup_byte_buffer = new byte [lookup_byte_buffer.Length << 1];
|
3798
|
202 |
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs Mon Sep 19 03:19:48 2011
|
|
203 |
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs Mon Sep 19 03:23:16 2011
|
|
204 |
@@ -499,6 +499,12 @@
|
3659
|
205 |
|
|
206 |
wake = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
|
|
207 |
wake.Connect(listen.LocalEndPoint);
|
3798
|
208 |
+
|
3659
|
209 |
+ // Make this non-blocking, so it doesn't
|
|
210 |
+ // deadlock if too many wakes are sent
|
|
211 |
+ // before the wake_receive end is polled
|
|
212 |
+ wake.Blocking = false;
|
3798
|
213 |
+
|
3659
|
214 |
wake_receive = listen.Accept();
|
|
215 |
|
|
216 |
#if __MonoCS__
|
3798
|
217 |
@@ -1230,7 +1236,13 @@
|
3659
|
218 |
}
|
|
219 |
|
|
220 |
void WakeupMain () {
|
|
221 |
- wake.Send (new byte [] { 0xFF });
|
|
222 |
+ try {
|
|
223 |
+ wake.Send (new byte [] { 0xFF });
|
|
224 |
+ } catch (SocketException ex) {
|
|
225 |
+ if (ex.SocketErrorCode != SocketError.WouldBlock) {
|
|
226 |
+ throw;
|
|
227 |
+ }
|
|
228 |
+ }
|
|
229 |
}
|
|
230 |
|
|
231 |
XEventQueue ThreadQueue(Thread thread) {
|