Magellan Linux

Contents of /trunk/xf86-input-evdev/patches/xf86-input-evdev-1.1.2-CVS-20060520.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 355 - (show annotations) (download)
Mon Sep 10 11:14:53 2007 UTC (16 years, 7 months ago) by niro
File size: 11768 byte(s)
compilation fixes

1 Index: ChangeLog
2 ===================================================================
3 RCS file: /cvs/xorg/driver/xf86-input-evdev/ChangeLog,v
4 retrieving revision 1.26
5 retrieving revision 1.28
6 diff -u -B -r1.26 -r1.28
7 --- ChangeLog 30 Apr 2006 21:39:08 -0000 1.26
8 +++ ChangeLog 15 May 2006 22:47:23 -0000 1.28
9 @@ -1,3 +1,42 @@
10 +2006-05-15 Zephaniah E. Hull,,, <warp@aehallh.com>
11 +
12 + * src/evdev.h:
13 + Hopefully fix the bitops stuff to actually _work_.
14 +
15 +2006-05-14 Zephaniah E. Hull <warp@aehallh.com>
16 +
17 + * man/evdev.man:
18 + Tweak credits and references.
19 + * src/evdev.c: (EvdevParseBits), (EvdevParseBitOption),
20 + (EvdevCorePreInit):
21 + Change the longs to unsigned longs in the bitfields.
22 +
23 + Cleanup our includes.
24 + * src/evdev.h:
25 + Stop pulling in asm/types.h and asm/bitops.h.
26 +
27 + Conditionally define the stuff that used to come from
28 + the above, including our own test_bit, set_bit and clear_bit.
29 +
30 + Change the longs to unsigned longs in the bitfields.
31 + * src/evdev_axes.c: (EvdevAxisAbsNew), (EvdevAxisRelNew):
32 + Change the longs to unsigned longs in the bitfields.
33 +
34 + Use the bitop defines in evdev.h properly.
35 + * src/evdev_brain.c: (MatchAll), (MatchNot), (MatchAny):
36 + Change the longs to unsigned longs in the bitfields.
37 + * src/evdev_btn.c: (EvdevBtnNew):
38 + Change the longs to unsigned longs in the bitfields.
39 +
40 + Use the bitop defines in evdev.h properly.
41 + * src/evdev_key.c: (EvdevKeyNew):
42 + Change the longs to unsigned longs in the bitfields.
43 +
44 + Use the bitop defines in evdev.h properly.
45 + * src/inotify-syscalls.h:
46 + Add HPPA/HPPA64 entries. (Thanks to Fabio M. Di Nitto
47 + <fabbione@ubuntu.com>)
48 +
49 2006-04-30 Zephaniah E. Hull <warp@aehallh.com>
50
51 * configure.ac:
52 Index: man/evdev.man
53 ===================================================================
54 RCS file: /cvs/xorg/driver/xf86-input-evdev/man/evdev.man,v
55 retrieving revision 1.3
56 retrieving revision 1.4
57 diff -u -B -r1.3 -r1.4
58 --- man/evdev.man 16 Mar 2006 13:05:04 -0000 1.3
59 +++ man/evdev.man 14 May 2006 11:55:50 -0000 1.4
60 @@ -312,16 +312,11 @@
61 .BI "Option \*qXkbOptions\*q \*q" options \*q
62 specifies the XKB keyboard option components. These can be used to
63 enhance the keyboard behaviour. Default: not set.
64 -.PP
65 -Some other XKB-related options are available, but they are incompatible
66 -with the ones listed above and are not recommended, so they are not
67 -documented here.
68
69 -.TP 7
70 +.PP
71 .SH AUTHORS
72 -Kristian Høgsberg.
73 -.fi
74 Zephaniah E. Hull.
75 +.fi
76 +Kristian Høgsberg.
77 .SH "SEE ALSO"
78 -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__),
79 -README.mouse.
80 +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
81 Index: src/evdev.c
82 ===================================================================
83 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev.c,v
84 retrieving revision 1.18
85 retrieving revision 1.19
86 diff -u -B -r1.18 -r1.19
87 --- src/evdev.c 9 Apr 2006 00:41:42 -0000 1.18
88 +++ src/evdev.c 14 May 2006 11:55:50 -0000 1.19
89 @@ -61,8 +61,6 @@
90 #include <X11/XF86keysym.h>
91 #include <X11/extensions/XIproto.h>
92
93 -#include <string.h>
94 -
95 #include "evdev.h"
96
97 #include <xf86.h>
98 @@ -328,7 +326,7 @@
99 }
100
101 static void
102 -EvdevParseBits (char *in, long *out, int len)
103 +EvdevParseBits (char *in, unsigned long *out, int len)
104 {
105 unsigned long v[2];
106 int n, i, max_bits = len * BITS_PER_LONG;
107 @@ -351,7 +349,7 @@
108 }
109
110 static void
111 -EvdevParseBitOption (char *opt, long *all, long *not, long *any, int len)
112 +EvdevParseBitOption (char *opt, unsigned long *all, unsigned long *not, unsigned long *any, int len)
113 {
114 char *cur, *next;
115
116 @@ -395,7 +393,7 @@
117 EvdevParseBitOption (tmp, pEvdev->all_bits.field, \
118 pEvdev->not_bits.field, \
119 pEvdev->any_bits.field, \
120 - sizeof(pEvdev->not_bits.field) / sizeof (long)); \
121 + sizeof(pEvdev->not_bits.field) / sizeof (unsigned long)); \
122 free (tmp); \
123 }
124 bitoption(ev);
125 Index: src/evdev.h
126 ===================================================================
127 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev.h,v
128 retrieving revision 1.5
129 retrieving revision 1.7
130 diff -u -B -r1.5 -r1.7
131 --- src/evdev.h 14 Apr 2006 07:01:37 -0000 1.5
132 +++ src/evdev.h 15 May 2006 22:47:23 -0000 1.7
133 @@ -72,20 +72,29 @@
134 #include <stdarg.h>
135 #include <xf86Xinput.h>
136
137 -#define BITS_PER_LONG (sizeof(long) * 8)
138 +#ifndef BITS_PER_LONG
139 +#define BITS_PER_LONG (sizeof(unsigned long) * 8)
140 +#endif
141 +
142 #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
143 -#define OFF(x) ((x)%BITS_PER_LONG)
144 #define LONG(x) ((x)/BITS_PER_LONG)
145 -#define BIT(x) (1UL<<((x)%BITS_PER_LONG))
146 -#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
147 +#define MASK(x) (1UL << ((x) & (BITS_PER_LONG - 1)))
148 +
149 +#ifndef test_bit
150 +#define test_bit(bit, array) (!!(array[LONG(bit)] & MASK(bit)))
151 +#endif
152 +#ifndef set_bit
153 +#define set_bit(bit, array) (array[LONG(bit)] |= MASK(bit))
154 +#endif
155 +#ifndef clear_bit
156 +#define clear_bit(bit, array) (array[LONG(bit)] &= ~MASK(bit))
157 +#endif
158
159 /* 2.4 compatibility */
160 #ifndef EVIOCGSW
161
162 #include <sys/time.h>
163 #include <sys/ioctl.h>
164 -#include <asm/types.h>
165 -#include <asm/bitops.h>
166
167 #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */
168
169 @@ -128,14 +137,14 @@
170 #define EVDEV_MAXBUTTONS 96
171
172 typedef struct {
173 - long ev[NBITS(EV_MAX)];
174 - long key[NBITS(KEY_MAX)];
175 - long rel[NBITS(REL_MAX)];
176 - long abs[NBITS(ABS_MAX)];
177 - long msc[NBITS(MSC_MAX)];
178 - long led[NBITS(LED_MAX)];
179 - long snd[NBITS(SND_MAX)];
180 - long ff[NBITS(FF_MAX)];
181 + unsigned long ev[NBITS(EV_MAX)];
182 + unsigned long key[NBITS(KEY_MAX)];
183 + unsigned long rel[NBITS(REL_MAX)];
184 + unsigned long abs[NBITS(ABS_MAX)];
185 + unsigned long msc[NBITS(MSC_MAX)];
186 + unsigned long led[NBITS(LED_MAX)];
187 + unsigned long snd[NBITS(SND_MAX)];
188 + unsigned long ff[NBITS(FF_MAX)];
189 } evdevBitsRec, *evdevBitsPtr;
190
191 typedef struct {
192 Index: src/evdev_axes.c
193 ===================================================================
194 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev_axes.c,v
195 retrieving revision 1.3
196 retrieving revision 1.4
197 diff -u -B -r1.3 -r1.4
198 --- src/evdev_axes.c 14 Apr 2006 07:01:37 -0000 1.3
199 +++ src/evdev_axes.c 14 May 2006 11:55:50 -0000 1.4
200 @@ -49,14 +49,6 @@
201
202 #include <xf86_OSproc.h>
203
204 -#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
205 -
206 -#define BITS_PER_LONG (sizeof(long) * 8)
207 -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
208 -#define OFF(x) ((x)%BITS_PER_LONG)
209 -#define LONG(x) ((x)/BITS_PER_LONG)
210 -#define TestBit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
211 -
212 static char *rel_axis_names[] = {
213 "X",
214 "Y",
215 @@ -328,7 +320,7 @@
216
217 real_axes = 0;
218 for (i = 0; i < ABS_MAX; i++)
219 - if (TestBit (i, pEvdev->bits.abs))
220 + if (test_bit (i, pEvdev->bits.abs))
221 real_axes++;
222
223 if (!real_axes)
224 @@ -344,7 +336,7 @@
225 pInfo->conversion_proc = EvdevConvert;
226
227 for (i = 0, j = 0; i < ABS_MAX; i++) {
228 - if (!TestBit (i, pEvdev->bits.abs))
229 + if (!test_bit (i, pEvdev->bits.abs))
230 continue;
231
232 snprintf(option, sizeof(option), "%sAbsoluteAxisMap", abs_axis_names[i]);
233 @@ -389,7 +381,7 @@
234 xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
235 }
236
237 - if (TestBit (ABS_X, pEvdev->bits.abs) && TestBit (ABS_Y, pEvdev->bits.abs))
238 + if (test_bit (ABS_X, pEvdev->bits.abs) && test_bit (ABS_Y, pEvdev->bits.abs))
239 k = xf86SetIntOption(pInfo->options, "AbsoluteScreen", 0);
240 else
241 k = xf86SetIntOption(pInfo->options, "AbsoluteScreen", -1);
242 @@ -417,7 +409,7 @@
243
244 real_axes = 0;
245 for (i = 0; i < REL_MAX; i++)
246 - if (TestBit (i, pEvdev->bits.rel))
247 + if (test_bit (i, pEvdev->bits.rel))
248 real_axes++;
249
250 if (!real_axes && (!state->abs || state->abs->axes < 2))
251 @@ -434,7 +426,7 @@
252 pInfo->conversion_proc = EvdevConvert;
253
254 for (i = 0, j = 0; i < REL_MAX; i++) {
255 - if (!TestBit (i, pEvdev->bits.rel))
256 + if (!test_bit (i, pEvdev->bits.rel))
257 continue;
258
259 snprintf(option, sizeof(option), "%sRelativeAxisMap", rel_axis_names[i]);
260 Index: src/evdev_brain.c
261 ===================================================================
262 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev_brain.c,v
263 retrieving revision 1.8
264 retrieving revision 1.9
265 diff -u -B -r1.8 -r1.9
266 --- src/evdev_brain.c 30 Apr 2006 21:39:08 -0000 1.8
267 +++ src/evdev_brain.c 14 May 2006 11:55:50 -0000 1.9
268 @@ -86,7 +86,7 @@
269 } evdevDevInfoRec, *evdevDevInfoPtr;
270
271 static Bool
272 -MatchAll (long *dev, long *match, int len)
273 +MatchAll (unsigned long *dev, unsigned long *match, int len)
274 {
275 int i;
276
277 @@ -98,7 +98,7 @@
278 }
279
280 static Bool
281 -MatchNot (long *dev, long *match, int len)
282 +MatchNot (unsigned long *dev, unsigned long *match, int len)
283 {
284 int i;
285
286 @@ -110,7 +110,7 @@
287 }
288
289 static Bool
290 -MatchAny (long *dev, long *match, int len)
291 +MatchAny (unsigned long *dev, unsigned long *match, int len)
292 {
293 int i, found = 0;
294
295 Index: src/evdev_btn.c
296 ===================================================================
297 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev_btn.c,v
298 retrieving revision 1.7
299 retrieving revision 1.8
300 diff -u -B -r1.7 -r1.8
301 --- src/evdev_btn.c 14 Apr 2006 07:01:37 -0000 1.7
302 +++ src/evdev_btn.c 14 May 2006 11:55:50 -0000 1.8
303 @@ -51,15 +51,6 @@
304
305 #include <xf86Module.h>
306
307 -
308 -#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
309 -
310 -#define BITS_PER_LONG (sizeof(long) * 8)
311 -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
312 -#define OFF(x) ((x)%BITS_PER_LONG)
313 -#define LONG(x) ((x)/BITS_PER_LONG)
314 -#define TestBit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
315 -
316 void
317 EvdevBtnPostFakeClicks(InputInfoPtr pInfo, int button, int count)
318 {
319 @@ -186,7 +177,7 @@
320 state->btn = Xcalloc (sizeof (evdevBtnRec));
321
322 for (i = BTN_MISC; i < (KEY_OK - 1); i++)
323 - if (TestBit (i, pEvdev->bits.key)) {
324 + if (test_bit (i, pEvdev->bits.key)) {
325 bit = i;
326 if ((bit >= BTN_MOUSE) && (bit < BTN_JOYSTICK)) {
327 bit -= BTN_MOUSE - BTN_MISC;
328 Index: src/evdev_key.c
329 ===================================================================
330 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/evdev_key.c,v
331 retrieving revision 1.8
332 retrieving revision 1.9
333 diff -u -B -r1.8 -r1.9
334 --- src/evdev_key.c 8 Apr 2006 17:23:06 -0000 1.8
335 +++ src/evdev_key.c 14 May 2006 11:55:50 -0000 1.9
336 @@ -81,11 +81,6 @@
337
338
339 #define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
340 -#define BITS_PER_LONG (sizeof(long) * 8)
341 -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
342 -#define OFF(x) ((x)%BITS_PER_LONG)
343 -#define LONG(x) ((x)/BITS_PER_LONG)
344 -#define TestBit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
345
346 #define MIN_KEYCODE 8
347 #define GLYPHS_PER_KEY 2
348 @@ -356,13 +351,13 @@
349 int i, keys = 0;
350
351 for (i = 0; i <= KEY_UNKNOWN; i++)
352 - if (TestBit (i, pEvdev->bits.key)) {
353 + if (test_bit (i, pEvdev->bits.key)) {
354 keys = 1;
355 break;
356 }
357 if (!keys)
358 for (i = KEY_OK; i <= KEY_MAX; i++)
359 - if (TestBit (i, pEvdev->bits.key)) {
360 + if (test_bit (i, pEvdev->bits.key)) {
361 keys = 1;
362 break;
363 }
364 Index: src/inotify-syscalls.h
365 ===================================================================
366 RCS file: /cvs/xorg/driver/xf86-input-evdev/src/inotify-syscalls.h,v
367 retrieving revision 1.1
368 retrieving revision 1.2
369 diff -u -B -r1.1 -r1.2
370 --- src/inotify-syscalls.h 8 Apr 2006 21:55:17 -0000 1.1
371 +++ src/inotify-syscalls.h 14 May 2006 11:55:50 -0000 1.2
372 @@ -39,6 +39,10 @@
373 # define __NR_inotify_init 290
374 # define __NR_inotify_add_watch 291
375 # define __NR_inotify_rm_watch 292
376 +#elif defined (__hppa__) || defined (__hppa64__)
377 +# define __NR_inotify_init 269
378 +# define __NR_inotify_add_watch 270
379 +# define __NR_inotify_rm_watch 271
380 #else
381 # error "Unsupported architecture!"
382 #endif