]> git.pld-linux.org Git - packages/tigervnc.git/blob - xorg112.patch
- fix building with xserver 1.13
[packages/tigervnc.git] / xorg112.patch
1 --- tigervnc-1.2.0/unix/xserver/hw/vnc/vncExtInit.cc~   2011-11-07 13:51:34.000000000 +0100
2 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/vncExtInit.cc    2012-03-23 14:06:29.207547404 +0100
3 @@ -449,10 +449,9 @@
4        ev.window = cur->window;
5        ev.time = GetTimeInMillis();
6        if (cur->client->swapped) {
7 -        int n;
8 -        swaps(&ev.sequenceNumber, n);
9 -        swapl(&ev.window, n);
10 -        swapl(&ev.time, n);
11 +        swaps(&ev.sequenceNumber);
12 +        swapl(&ev.window);
13 +        swapl(&ev.time);
14        }
15        WriteToClient(cur->client, sizeof(xVncExtClientCutTextNotifyEvent),
16                      (char *)&ev);
17 @@ -495,9 +494,8 @@
18        ev.sequenceNumber = cur->client->sequence;
19        ev.window = cur->window;
20        if (cur->client->swapped) {
21 -        int n;
22 -        swaps(&ev.sequenceNumber, n);
23 -        swapl(&ev.window, n);
24 +        swaps(&ev.sequenceNumber);
25 +        swapl(&ev.window);
26        }
27        WriteToClient(cur->client, sizeof(xVncExtQueryConnectNotifyEvent),
28                      (char *)&ev);
29 @@ -538,10 +536,9 @@
30        ev.window = cur->window;
31        ev.selection = selection;
32        if (cur->client->swapped) {
33 -        int n;
34 -        swaps(&ev.sequenceNumber, n);
35 -        swapl(&ev.window, n);
36 -        swapl(&ev.selection, n);
37 +        swaps(&ev.sequenceNumber);
38 +        swapl(&ev.window);
39 +        swapl(&ev.selection);
40        }
41        WriteToClient(cur->client, sizeof(xVncExtSelectionChangeNotifyEvent),
42                      (char *)&ev);
43 @@ -562,7 +559,6 @@
44    param.buf[stuff->paramLen] = 0;
45  
46    xVncExtSetParamReply rep;
47 -  int n;
48    rep.type = X_Reply;
49    rep.length = 0;
50    rep.success = 0;
51 @@ -603,8 +599,8 @@
52  
53  deny:
54    if (client->swapped) {
55 -    swaps(&rep.sequenceNumber, n);
56 -    swapl(&rep.length, n);
57 +    swaps(&rep.sequenceNumber);
58 +    swapl(&rep.length);
59    }
60    WriteToClient(client, sizeof(xVncExtSetParamReply), (char *)&rep);
61    return (client->noClientException);
62 @@ -612,9 +608,8 @@
63  
64  static int SProcVncExtSetParam(ClientPtr client)
65  {
66 -  register char n;
67    REQUEST(xVncExtSetParamReq);
68 -  swaps(&stuff->length, n);
69 +  swaps(&stuff->length);
70    REQUEST_AT_LEAST_SIZE(xVncExtSetParamReq);
71    return ProcVncExtSetParam(client);
72  }
73 @@ -628,7 +623,6 @@
74    param.buf[stuff->paramLen] = 0;
75  
76    xVncExtGetParamReply rep;
77 -  int n;
78    rep.type = X_Reply;
79    rep.sequenceNumber = client->sequence;
80    rep.success = 0;
81 @@ -646,9 +640,9 @@
82    rep.length = (len + 3) >> 2;
83    rep.valueLen = len;
84    if (client->swapped) {
85 -    swaps(&rep.sequenceNumber, n);
86 -    swapl(&rep.length, n);
87 -    swaps(&rep.valueLen, n);
88 +    swaps(&rep.sequenceNumber);
89 +    swapl(&rep.length);
90 +    swaps(&rep.valueLen);
91    }
92    WriteToClient(client, sizeof(xVncExtGetParamReply), (char *)&rep);
93    if (value)
94 @@ -659,9 +653,8 @@
95  
96  static int SProcVncExtGetParam(ClientPtr client)
97  {
98 -  register char n;
99    REQUEST(xVncExtGetParamReq);
100 -  swaps(&stuff->length, n);
101 +  swaps(&stuff->length);
102    REQUEST_AT_LEAST_SIZE(xVncExtGetParamReq);
103    return ProcVncExtGetParam(client);
104  }
105 @@ -675,7 +668,6 @@
106    param.buf[stuff->paramLen] = 0;
107  
108    xVncExtGetParamDescReply rep;
109 -  int n;
110    rep.type = X_Reply;
111    rep.sequenceNumber = client->sequence;
112    rep.success = 0;
113 @@ -690,9 +682,9 @@
114    rep.length = (len + 3) >> 2;
115    rep.descLen = len;
116    if (client->swapped) {
117 -    swaps(&rep.sequenceNumber, n);
118 -    swapl(&rep.length, n);
119 -    swaps(&rep.descLen, n);
120 +    swaps(&rep.sequenceNumber);
121 +    swapl(&rep.length);
122 +    swaps(&rep.descLen);
123    }
124    WriteToClient(client, sizeof(xVncExtGetParamDescReply), (char *)&rep);
125    if (desc)
126 @@ -702,9 +694,8 @@
127  
128  static int SProcVncExtGetParamDesc(ClientPtr client)
129  {
130 -  register char n;
131    REQUEST(xVncExtGetParamDescReq);
132 -  swaps(&stuff->length, n);
133 +  swaps(&stuff->length);
134    REQUEST_AT_LEAST_SIZE(xVncExtGetParamDescReq);
135    return ProcVncExtGetParamDesc(client);
136  }
137 @@ -715,7 +706,6 @@
138    REQUEST_SIZE_MATCH(xVncExtListParamsReq);
139  
140    xVncExtListParamsReply rep;
141 -  int n;
142    rep.type = X_Reply;
143    rep.sequenceNumber = client->sequence;
144  
145 @@ -731,9 +721,9 @@
146    rep.length = (len + 3) >> 2;
147    rep.nParams = nParams;
148    if (client->swapped) {
149 -    swaps(&rep.sequenceNumber, n);
150 -    swapl(&rep.length, n);
151 -    swaps(&rep.nParams, n);
152 +    swaps(&rep.sequenceNumber);
153 +    swapl(&rep.length);
154 +    swaps(&rep.nParams);
155    }
156    WriteToClient(client, sizeof(xVncExtListParamsReply), (char *)&rep);
157    rdr::U8* data = new rdr::U8[len];
158 @@ -753,9 +743,8 @@
159  
160  static int SProcVncExtListParams(ClientPtr client)
161  {
162 -  register char n;
163    REQUEST(xVncExtListParamsReq);
164 -  swaps(&stuff->length, n);
165 +  swaps(&stuff->length);
166    REQUEST_SIZE_MATCH(xVncExtListParamsReq);
167    return ProcVncExtListParams(client);
168  }
169 @@ -778,11 +767,10 @@
170  
171  static int SProcVncExtSetServerCutText(ClientPtr client)
172  {
173 -  register char n;
174    REQUEST(xVncExtSetServerCutTextReq);
175 -  swaps(&stuff->length, n);
176 +  swaps(&stuff->length);
177    REQUEST_AT_LEAST_SIZE(xVncExtSetServerCutTextReq);
178 -  swapl(&stuff->textLen, n);
179 +  swapl(&stuff->textLen);
180    return ProcVncExtSetServerCutText(client);
181  }
182  
183 @@ -792,15 +780,14 @@
184    REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq);
185  
186    xVncExtGetClientCutTextReply rep;
187 -  int n;
188    rep.type = X_Reply;
189    rep.length = (clientCutTextLen + 3) >> 2;
190    rep.sequenceNumber = client->sequence;
191    rep.textLen = clientCutTextLen;
192    if (client->swapped) {
193 -    swaps(&rep.sequenceNumber, n);
194 -    swapl(&rep.length, n);
195 -    swapl(&rep.textLen, n);
196 +    swaps(&rep.sequenceNumber);
197 +    swapl(&rep.length);
198 +    swapl(&rep.textLen);
199    }
200    WriteToClient(client, sizeof(xVncExtGetClientCutTextReply), (char *)&rep);
201    if (clientCutText)
202 @@ -810,9 +797,8 @@
203  
204  static int SProcVncExtGetClientCutText(ClientPtr client)
205  {
206 -  register char n;
207    REQUEST(xVncExtGetClientCutTextReq);
208 -  swaps(&stuff->length, n);
209 +  swaps(&stuff->length);
210    REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq);
211    return ProcVncExtGetClientCutText(client);
212  }
213 @@ -842,12 +828,11 @@
214  
215  static int SProcVncExtSelectInput(ClientPtr client)
216  {
217 -  register char n;
218    REQUEST(xVncExtSelectInputReq);
219 -  swaps(&stuff->length, n);
220 +  swaps(&stuff->length);
221    REQUEST_SIZE_MATCH(xVncExtSelectInputReq);
222 -  swapl(&stuff->window, n);
223 -  swapl(&stuff->mask, n);
224 +  swapl(&stuff->window);
225 +  swapl(&stuff->mask);
226    return ProcVncExtSelectInput(client);
227  }
228  
229 @@ -893,9 +878,8 @@
230    rep.length = 0;
231    rep.sequenceNumber = client->sequence;
232    if (client->swapped) {
233 -    int n;
234 -    swaps(&rep.sequenceNumber, n);
235 -    swapl(&rep.length, n);
236 +    swaps(&rep.sequenceNumber);
237 +    swapl(&rep.length);
238    }
239    WriteToClient(client, sizeof(xVncExtConnectReply), (char *)&rep);
240    return (client->noClientException);
241 @@ -903,9 +887,8 @@
242  
243  static int SProcVncExtConnect(ClientPtr client)
244  {
245 -  register char n;
246    REQUEST(xVncExtConnectReq);
247 -  swaps(&stuff->length, n);
248 +  swaps(&stuff->length);
249    REQUEST_AT_LEAST_SIZE(xVncExtConnectReq);
250    return ProcVncExtConnect(client);
251  }
252 @@ -925,7 +908,6 @@
253      qcTimeout = 0;
254  
255    xVncExtGetQueryConnectReply rep;
256 -  int n;
257    rep.type = X_Reply;
258    rep.sequenceNumber = client->sequence;
259    rep.timeout = qcTimeout;
260 @@ -934,11 +916,11 @@
261    rep.opaqueId = (CARD32)(long)queryConnectId;
262    rep.length = (rep.userLen + rep.addrLen + 3) >> 2;
263    if (client->swapped) {
264 -    swaps(&rep.sequenceNumber, n);
265 -    swapl(&rep.userLen, n);
266 -    swapl(&rep.addrLen, n);
267 -    swapl(&rep.timeout, n);
268 -    swapl(&rep.opaqueId, n);
269 +    swaps(&rep.sequenceNumber);
270 +    swapl(&rep.userLen);
271 +    swapl(&rep.addrLen);
272 +    swapl(&rep.timeout);
273 +    swapl(&rep.opaqueId);
274    }
275    WriteToClient(client, sizeof(xVncExtGetQueryConnectReply), (char *)&rep);
276    if (qcTimeout)
277 @@ -950,9 +932,8 @@
278  
279  static int SProcVncExtGetQueryConnect(ClientPtr client)
280  {
281 -  register char n;
282    REQUEST(xVncExtGetQueryConnectReq);
283 -  swaps(&stuff->length, n);
284 +  swaps(&stuff->length);
285    REQUEST_SIZE_MATCH(xVncExtGetQueryConnectReq);
286    return ProcVncExtGetQueryConnect(client);
287  }
288 @@ -977,10 +958,9 @@
289  
290  static int SProcVncExtApproveConnect(ClientPtr client)
291  {
292 -  register char n;
293    REQUEST(xVncExtApproveConnectReq);
294 -  swaps(&stuff->length, n);
295 -  swapl(&stuff->opaqueId, n);
296 +  swaps(&stuff->length);
297 +  swapl(&stuff->opaqueId);
298    REQUEST_SIZE_MATCH(xVncExtApproveConnectReq);
299    return ProcVncExtApproveConnect(client);
300  }
301 --- tigervnc-1.2.0/unix/xserver/hw/vnc/xorg-version.h~  2012-03-23 13:48:15.281937484 +0100
302 +++ tigervnc-1.2.0/unix/xserver/hw/vnc/xorg-version.h   2012-03-23 14:08:49.217553722 +0100
303 @@ -38,6 +38,8 @@
304  #define XORG 110
305  #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
306  #define XORG 111
307 +#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (12 * 100000) + (99 * 1000))
308 +#define XORG 112
309  #else
310  #error "X.Org newer than 1.10 is not supported"
311  #endif
This page took 0.047484 seconds and 3 git commands to generate.