File xf86-input-magellan.diff of Package xorg-x11-driver-input

commit 9684bf570cbd1b4ce75f8f85d70368daf20c66b4
Author: Paulo César Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Thu May 1 12:10:37 2008 +0930

    Minor compile warning fix. #15153
    
    NEED_XF86_TYPES is defined in xorg/include/xorg/xorg-server.h.
    
    Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
    
    X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=15153>

diff --git a/src/magellan.c b/src/magellan.c
index b27d595..fedb01b 100644
--- a/src/magellan.c
+++ b/src/magellan.c
@@ -45,7 +45,9 @@
 
 #include <misc.h>
 #include <xf86.h>
-#define NEED_XF86_TYPES
+#ifndef NEED_XF86_TYPES
+#define NEED_XF86_TYPES 1
+#endif
 #include <xf86_OSproc.h>
 #include <xf86Xinput.h>
 #include <xisb.h>
commit ec60776f5adb8215cb5e4d90958b4cb723006363
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Mon May 26 22:10:28 2008 +0930

    Check for XINPUT ABI 3.

diff --git a/src/magellan.c b/src/magellan.c
index fedb01b..0a84ea7 100644
--- a/src/magellan.c
+++ b/src/magellan.c
@@ -122,7 +122,9 @@ static const char *reqSymbols[] = {
         "xf86CollectInputOptions",
         "xf86ErrorFVerb",
         "xf86FindOptionValue",
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
         "xf86GetMotionEvents",
+#endif
         "xf86GetVerbosity",
         "xf86MotionHistoryAllocate",
         "xf86NameCmp",
@@ -366,7 +368,10 @@ DeviceInit (DeviceIntPtr dev)
       return !Success;
     }
 
-  if (InitValuatorClassDeviceStruct (dev, 6, xf86GetMotionEvents,
+  if (InitValuatorClassDeviceStruct (dev, 6,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+				     xf86GetMotionEvents,
+#endif
 				     pInfo->history_size, Absolute) == FALSE)
     {
       ErrorF ("Unable to allocate MAGELLAN ValuatorClassDeviceStruct\n");
openSUSE Build Service is sponsored by