A random sample of linux machines I have access to suggests that versions
of linux/input.h that define the structure also have EVIOCSABS defined but I
wouldn't guarantee that's fool proof either (but it might be a better test
than LINUX_VERSION_CODE).


I've checked a little more and EVIOCSABS appeared very shortly before
input_absinfo
around 2.5.27-2.5.30 so I reckon testing for EVIOCSABS is at least as good
as testing for 2.6.0, especially since that doesn't work on Fedora Core 3.

There's a proposed patch below.

Mark
Index: inputdrivers/linux_input/linux_input.c
===================================================================
RCS file: /cvs/directfb/DirectFB/inputdrivers/linux_input/linux_input.c,v
retrieving revision 1.58
diff -u -r1.58 linux_input.c
--- inputdrivers/linux_input/linux_input.c	10 Jan 2007 01:57:37 -0000	1.58
+++ inputdrivers/linux_input/linux_input.c	5 Feb 2007 17:00:20 -0000
@@ -110,7 +110,7 @@
 #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
 
 /* compat for 2.4.x kernel - just a compile fix */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#ifndef EVIOCSABS
 struct input_absinfo {
         __s32 value;
         __s32 minimum;
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to