auto-import xorg-x11-drv-evdev-1.1.2-1 on branch devel from

xorg-x11-drv-evdev-1.1.2-1.src.rpm
This commit is contained in:
Adam Jackson 2006-06-05 19:32:04 +00:00
parent 66660ecde8
commit a9ceb79d0f
4 changed files with 367 additions and 8 deletions

View File

@ -1 +1 @@
xf86-input-evdev-1.1.0.tar.bz2
xf86-input-evdev-1.1.2.tar.bz2

View File

@ -0,0 +1,356 @@
Index: ChangeLog
diff -u ChangeLog:1.26 ChangeLog:1.29
--- ChangeLog:1.26 Sun Apr 30 21:39:08 2006
+++ ChangeLog Fri Jun 2 19:39:51 2006
@@ -1,3 +1,47 @@
+2006-06-02 Adam Jackson <ajax@freedesktop.org>
+
+ * src/evdev_axes.c:
+ Fix an obvious bogon to avoid crashing on absolute axis setup.
+
+2006-05-15 Zephaniah E. Hull,,, <warp@aehallh.com>
+
+ * src/evdev.h:
+ Hopefully fix the bitops stuff to actually _work_.
+
+2006-05-14 Zephaniah E. Hull <warp@aehallh.com>
+
+ * man/evdev.man:
+ Tweak credits and references.
+ * src/evdev.c: (EvdevParseBits), (EvdevParseBitOption),
+ (EvdevCorePreInit):
+ Change the longs to unsigned longs in the bitfields.
+
+ Cleanup our includes.
+ * src/evdev.h:
+ Stop pulling in asm/types.h and asm/bitops.h.
+
+ Conditionally define the stuff that used to come from
+ the above, including our own test_bit, set_bit and clear_bit.
+
+ Change the longs to unsigned longs in the bitfields.
+ * src/evdev_axes.c: (EvdevAxisAbsNew), (EvdevAxisRelNew):
+ Change the longs to unsigned longs in the bitfields.
+
+ Use the bitop defines in evdev.h properly.
+ * src/evdev_brain.c: (MatchAll), (MatchNot), (MatchAny):
+ Change the longs to unsigned longs in the bitfields.
+ * src/evdev_btn.c: (EvdevBtnNew):
+ Change the longs to unsigned longs in the bitfields.
+
+ Use the bitop defines in evdev.h properly.
+ * src/evdev_key.c: (EvdevKeyNew):
+ Change the longs to unsigned longs in the bitfields.
+
+ Use the bitop defines in evdev.h properly.
+ * src/inotify-syscalls.h:
+ Add HPPA/HPPA64 entries. (Thanks to Fabio M. Di Nitto
+ <fabbione@ubuntu.com>)
+
2006-04-30 Zephaniah E. Hull <warp@aehallh.com>
* configure.ac:
Index: man/evdev.man
diff -u man/evdev.man:1.3 man/evdev.man:1.4
--- man/evdev.man:1.3 Thu Mar 16 13:05:04 2006
+++ man/evdev.man Sun May 14 11:55:50 2006
@@ -312,16 +312,11 @@
.BI "Option \*qXkbOptions\*q \*q" options \*q
specifies the XKB keyboard option components. These can be used to
enhance the keyboard behaviour. Default: not set.
-.PP
-Some other XKB-related options are available, but they are incompatible
-with the ones listed above and are not recommended, so they are not
-documented here.
-.TP 7
+.PP
.SH AUTHORS
-Kristian Høgsberg.
-.fi
Zephaniah E. Hull.
+.fi
+Kristian Høgsberg.
.SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__),
-README.mouse.
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
Index: src/evdev.c
diff -u src/evdev.c:1.18 src/evdev.c:1.19
--- src/evdev.c:1.18 Sun Apr 9 00:41:42 2006
+++ src/evdev.c Sun May 14 11:55:50 2006
@@ -61,8 +61,6 @@
#include <X11/XF86keysym.h>
#include <X11/extensions/XIproto.h>
-#include <string.h>
-
#include "evdev.h"
#include <xf86.h>
@@ -328,7 +326,7 @@
}
static void
-EvdevParseBits (char *in, long *out, int len)
+EvdevParseBits (char *in, unsigned long *out, int len)
{
unsigned long v[2];
int n, i, max_bits = len * BITS_PER_LONG;
@@ -351,7 +349,7 @@
}
static void
-EvdevParseBitOption (char *opt, long *all, long *not, long *any, int len)
+EvdevParseBitOption (char *opt, unsigned long *all, unsigned long *not, unsigned long *any, int len)
{
char *cur, *next;
@@ -395,7 +393,7 @@
EvdevParseBitOption (tmp, pEvdev->all_bits.field, \
pEvdev->not_bits.field, \
pEvdev->any_bits.field, \
- sizeof(pEvdev->not_bits.field) / sizeof (long)); \
+ sizeof(pEvdev->not_bits.field) / sizeof (unsigned long)); \
free (tmp); \
}
bitoption(ev);
Index: src/evdev.h
diff -u src/evdev.h:1.5 src/evdev.h:1.7
--- src/evdev.h:1.5 Fri Apr 14 07:01:37 2006
+++ src/evdev.h Mon May 15 22:47:23 2006
@@ -72,20 +72,29 @@
#include <stdarg.h>
#include <xf86Xinput.h>
-#define BITS_PER_LONG (sizeof(long) * 8)
+#ifndef BITS_PER_LONG
+#define BITS_PER_LONG (sizeof(unsigned long) * 8)
+#endif
+
#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
-#define OFF(x) ((x)%BITS_PER_LONG)
#define LONG(x) ((x)/BITS_PER_LONG)
-#define BIT(x) (1UL<<((x)%BITS_PER_LONG))
-#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
+#define MASK(x) (1UL << ((x) & (BITS_PER_LONG - 1)))
+
+#ifndef test_bit
+#define test_bit(bit, array) (!!(array[LONG(bit)] & MASK(bit)))
+#endif
+#ifndef set_bit
+#define set_bit(bit, array) (array[LONG(bit)] |= MASK(bit))
+#endif
+#ifndef clear_bit
+#define clear_bit(bit, array) (array[LONG(bit)] &= ~MASK(bit))
+#endif
/* 2.4 compatibility */
#ifndef EVIOCGSW
#include <sys/time.h>
#include <sys/ioctl.h>
-#include <asm/types.h>
-#include <asm/bitops.h>
#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */
@@ -128,14 +137,14 @@
#define EVDEV_MAXBUTTONS 96
typedef struct {
- long ev[NBITS(EV_MAX)];
- long key[NBITS(KEY_MAX)];
- long rel[NBITS(REL_MAX)];
- long abs[NBITS(ABS_MAX)];
- long msc[NBITS(MSC_MAX)];
- long led[NBITS(LED_MAX)];
- long snd[NBITS(SND_MAX)];
- long ff[NBITS(FF_MAX)];
+ unsigned long ev[NBITS(EV_MAX)];
+ unsigned long key[NBITS(KEY_MAX)];
+ unsigned long rel[NBITS(REL_MAX)];
+ unsigned long abs[NBITS(ABS_MAX)];
+ unsigned long msc[NBITS(MSC_MAX)];
+ unsigned long led[NBITS(LED_MAX)];
+ unsigned long snd[NBITS(SND_MAX)];
+ unsigned long ff[NBITS(FF_MAX)];
} evdevBitsRec, *evdevBitsPtr;
typedef struct {
Index: src/evdev_axes.c
diff -u src/evdev_axes.c:1.3 src/evdev_axes.c:1.5
--- src/evdev_axes.c:1.3 Fri Apr 14 07:01:37 2006
+++ src/evdev_axes.c Fri Jun 2 19:39:52 2006
@@ -49,14 +49,6 @@
#include <xf86_OSproc.h>
-#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
-
-#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 char *rel_axis_names[] = {
"X",
"Y",
@@ -328,7 +320,7 @@
real_axes = 0;
for (i = 0; i < ABS_MAX; i++)
- if (TestBit (i, pEvdev->bits.abs))
+ if (test_bit (i, pEvdev->bits.abs))
real_axes++;
if (!real_axes)
@@ -344,7 +336,7 @@
pInfo->conversion_proc = EvdevConvert;
for (i = 0, j = 0; i < ABS_MAX; i++) {
- if (!TestBit (i, pEvdev->bits.abs))
+ if (!test_bit (i, pEvdev->bits.abs))
continue;
snprintf(option, sizeof(option), "%sAbsoluteAxisMap", abs_axis_names[i]);
@@ -389,11 +381,11 @@
xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
}
- if (TestBit (ABS_X, pEvdev->bits.abs) && TestBit (ABS_Y, pEvdev->bits.abs))
+ if (test_bit (ABS_X, pEvdev->bits.abs) && test_bit (ABS_Y, pEvdev->bits.abs))
k = xf86SetIntOption(pInfo->options, "AbsoluteScreen", 0);
else
k = xf86SetIntOption(pInfo->options, "AbsoluteScreen", -1);
- if (k < screenInfo.numScreens) {
+ if (k < screenInfo.numScreens && k >= 0) {
state->abs->screen = k;
xf86Msg(X_CONFIG, "%s: AbsoluteScreen: %d.\n", pInfo->name, k);
} else {
@@ -417,7 +409,7 @@
real_axes = 0;
for (i = 0; i < REL_MAX; i++)
- if (TestBit (i, pEvdev->bits.rel))
+ if (test_bit (i, pEvdev->bits.rel))
real_axes++;
if (!real_axes && (!state->abs || state->abs->axes < 2))
@@ -434,7 +426,7 @@
pInfo->conversion_proc = EvdevConvert;
for (i = 0, j = 0; i < REL_MAX; i++) {
- if (!TestBit (i, pEvdev->bits.rel))
+ if (!test_bit (i, pEvdev->bits.rel))
continue;
snprintf(option, sizeof(option), "%sRelativeAxisMap", rel_axis_names[i]);
Index: src/evdev_brain.c
diff -u src/evdev_brain.c:1.8 src/evdev_brain.c:1.9
--- src/evdev_brain.c:1.8 Sun Apr 30 21:39:08 2006
+++ src/evdev_brain.c Sun May 14 11:55:50 2006
@@ -86,7 +86,7 @@
} evdevDevInfoRec, *evdevDevInfoPtr;
static Bool
-MatchAll (long *dev, long *match, int len)
+MatchAll (unsigned long *dev, unsigned long *match, int len)
{
int i;
@@ -98,7 +98,7 @@
}
static Bool
-MatchNot (long *dev, long *match, int len)
+MatchNot (unsigned long *dev, unsigned long *match, int len)
{
int i;
@@ -110,7 +110,7 @@
}
static Bool
-MatchAny (long *dev, long *match, int len)
+MatchAny (unsigned long *dev, unsigned long *match, int len)
{
int i, found = 0;
Index: src/evdev_btn.c
diff -u src/evdev_btn.c:1.7 src/evdev_btn.c:1.8
--- src/evdev_btn.c:1.7 Fri Apr 14 07:01:37 2006
+++ src/evdev_btn.c Sun May 14 11:55:50 2006
@@ -51,15 +51,6 @@
#include <xf86Module.h>
-
-#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
-
-#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)
-
void
EvdevBtnPostFakeClicks(InputInfoPtr pInfo, int button, int count)
{
@@ -186,7 +177,7 @@
state->btn = Xcalloc (sizeof (evdevBtnRec));
for (i = BTN_MISC; i < (KEY_OK - 1); i++)
- if (TestBit (i, pEvdev->bits.key)) {
+ if (test_bit (i, pEvdev->bits.key)) {
bit = i;
if ((bit >= BTN_MOUSE) && (bit < BTN_JOYSTICK)) {
bit -= BTN_MOUSE - BTN_MISC;
Index: src/evdev_key.c
diff -u src/evdev_key.c:1.8 src/evdev_key.c:1.9
--- src/evdev_key.c:1.8 Sat Apr 8 17:23:06 2006
+++ src/evdev_key.c Sun May 14 11:55:50 2006
@@ -81,11 +81,6 @@
#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
-#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)
#define MIN_KEYCODE 8
#define GLYPHS_PER_KEY 2
@@ -356,13 +351,13 @@
int i, keys = 0;
for (i = 0; i <= KEY_UNKNOWN; i++)
- if (TestBit (i, pEvdev->bits.key)) {
+ if (test_bit (i, pEvdev->bits.key)) {
keys = 1;
break;
}
if (!keys)
for (i = KEY_OK; i <= KEY_MAX; i++)
- if (TestBit (i, pEvdev->bits.key)) {
+ if (test_bit (i, pEvdev->bits.key)) {
keys = 1;
break;
}
Index: src/inotify-syscalls.h
diff -u src/inotify-syscalls.h:1.1 src/inotify-syscalls.h:1.2
--- src/inotify-syscalls.h:1.1 Sat Apr 8 21:55:17 2006
+++ src/inotify-syscalls.h Sun May 14 11:55:50 2006
@@ -39,6 +39,10 @@
# define __NR_inotify_init 290
# define __NR_inotify_add_watch 291
# define __NR_inotify_rm_watch 292
+#elif defined (__hppa__) || defined (__hppa64__)
+# define __NR_inotify_init 269
+# define __NR_inotify_add_watch 270
+# define __NR_inotify_rm_watch 271
#else
# error "Unsupported architecture!"
#endif

View File

@ -1 +1 @@
227cf66bcfea90982ee0b947d2475d1d xf86-input-evdev-1.1.0.tar.bz2
2932a39f080bae68bbcdc11fc125d990 xf86-input-evdev-1.1.2.tar.bz2

View File

@ -6,8 +6,8 @@
Summary: Xorg X11 evdev input driver
Name: xorg-x11-drv-evdev
Version: 1.1.0
Release: 3
Version: 1.1.2
Release: 1
URL: http://www.x.org
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2
License: MIT/X11
@ -17,18 +17,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86} x86_64 ia64 ppc alpha sparc sparc64
BuildRequires: pkgconfig
BuildRequires: xorg-x11-server-sdk >= 1.0.99.901
BuildRequires: xorg-x11-server-sdk >= 1.1.0
Requires: xorg-x11-server-Xorg >= 1.0.99.901
Requires: xorg-x11-server-Xorg >= 1.1.0
Patch0: evdev-1.1.0-ia64-build-fix.patch
Patch0: evdev-1.1.2-cvs-20060605.patch
%description
X.Org X11 evdev input driver.
%prep
%setup -q -n %{tarball}-%{version}
%patch0 -p0 -b .ia64-build-fix
%patch0 -p0 -b .cvs-20060605
%build
%configure --disable-static
@ -55,6 +55,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/evdev.4*
%changelog
* Mon Jun 05 2006 Adam Jackson <ajackson@redhat.com> 1.1.2-1
- Update to 1.1.2 + CVS fixes.
* Mon Apr 10 2006 Adam Jackson <ajackson@redhat.com> 1.1.0-3
- Work around header pollution on ia64, re-add to arch list.