reopen 346460 retitle 346460 evdev driver broken on big-endian machines tags 346460 + patch thanks
This bug is not fixed, it still is in 6.9.0.dfsg.1-4. I had same time to look into the problem: The current evdev driver doesn't work on big-endian machines. Here's patch that fixes that by using the macros from Vojtech Pavlik's evtest.c. Juergen --- orig/xorg-x11-6.9.0.dfsg.1/xc/programs/Xserver/hw/xfree86/input/evdev/evdev.c 2005-12-29 03:35:09.000000000 +0100 +++ xorg-x11-6.9.0.dfsg.1/xc/programs/Xserver/hw/xfree86/input/evdev/evdev.c 2006-01-18 19:31:46.000000000 +0100 @@ -199,7 +199,11 @@ xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy); } -#define TestBit(bit, array) (array[(bit) / 8] & (1 << ((bit) % 8))) +#define BITS_PER_LONG (sizeof(long) * 8) +#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +#define OFF(x) ((x)%BITS_PER_LONG) +#define LONG(x) ((x)/BITS_PER_LONG) +#define TestBit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) static void EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl) @@ -565,8 +569,8 @@ static int EvdevProbe(InputInfoPtr pInfo) { - char key_bitmask[(KEY_MAX + 7) / 8]; - char rel_bitmask[(REL_MAX + 7) / 8]; + unsigned long key_bitmask[NBITS(KEY_MAX)]; + unsigned long rel_bitmask[NBITS(KEY_MAX)]; int i, has_axes, has_buttons, has_keys; EvdevPtr pEvdev = pInfo->private; = -- Juergen Kreileder, Blackdown Java-Linux Team http://blog.blackdown.de/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]