diff options
| author | Michael Forney <mforney@mforney.org> | 2020-02-01 00:41:40 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-02-01 01:37:46 -0800 |
| commit | 595772a0510324bb67d7fe21ccbece97a844659a (patch) | |
| tree | 441348c1cf3f806a036d6ed5e73339be1ee06ccf /pkg | |
| parent | c678bb18e0ec6eacdd693dae3110924f327f23a2 (diff) | |
mtdev: Update to 1.1.6
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/mtdev/patch/0001-Avoid-__builtin_ffs.patch (renamed from pkg/mtdev/patch/0002-Avoid-__builtin_ffs.patch) | 8 | ||||
| -rw-r--r-- | pkg/mtdev/patch/0001-Use-a-macro-for-nlongs-so-it-can-be-used-in-constant.patch | 55 | ||||
| m--------- | pkg/mtdev/src | 0 | ||||
| -rw-r--r-- | pkg/mtdev/ver | 2 |
4 files changed, 5 insertions, 60 deletions
diff --git a/pkg/mtdev/patch/0002-Avoid-__builtin_ffs.patch b/pkg/mtdev/patch/0001-Avoid-__builtin_ffs.patch index 37a14ae7..749bda56 100644 --- a/pkg/mtdev/patch/0002-Avoid-__builtin_ffs.patch +++ b/pkg/mtdev/patch/0001-Avoid-__builtin_ffs.patch @@ -1,4 +1,4 @@ -From 365d628a9c944989cab0bfa6ae39d1df0ec5a905 Mon Sep 17 00:00:00 2001 +From 09e21bb5d6714687705dc8f2d00a09b3ff3b2436 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Fri, 7 Jun 2019 11:55:26 -0700 Subject: [PATCH] Avoid __builtin_ffs @@ -27,10 +27,10 @@ index 80a3d6e..3c77f48 100644 /* robust system ioctl calls */ #define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) diff --git a/src/core.c b/src/core.c -index 87ef420..f5b6272 100644 +index 0d91c0b..20ce0c6 100644 --- a/src/core.c +++ b/src/core.c -@@ -298,7 +298,7 @@ static void apply_typeA_changes(struct mtdev_state *state, +@@ -304,7 +304,7 @@ static void apply_typeA_changes(struct mtdev_state *state, break; } if (id != MT_ID_NULL) { @@ -40,5 +40,5 @@ index 87ef420..f5b6272 100644 SETBIT(used, slot); CLEARBIT(unused, slot); -- -2.20.1 +2.25.0 diff --git a/pkg/mtdev/patch/0001-Use-a-macro-for-nlongs-so-it-can-be-used-in-constant.patch b/pkg/mtdev/patch/0001-Use-a-macro-for-nlongs-so-it-can-be-used-in-constant.patch deleted file mode 100644 index 4e3f53ec..00000000 --- a/pkg/mtdev/patch/0001-Use-a-macro-for-nlongs-so-it-can-be-used-in-constant.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 43c6faf96712324bea4121157d292b84a86b0d45 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Fri, 7 Jun 2019 10:36:05 -0700 -Subject: [PATCH] Use a macro for `nlongs` so it can be used in constant - expression - -This way, it can be used to specify the `absbits` array size (in -`mtdev_configure`) without making it a VLA. - -VLAs are an optional feature in C11, and in this case we can determine -the array size statically. - -This also matches the macros used in libevdev and libinput. - -Signed-off-by: Michael Forney <mforney@mforney.org> ---- - src/caps.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/src/caps.c b/src/caps.c -index 2e6b0d4..b493425 100644 ---- a/src/caps.c -+++ b/src/caps.c -@@ -32,16 +32,12 @@ static const int SN_COORD = 250; /* coordinate signal-to-noise ratio */ - static const int SN_WIDTH = 100; /* width signal-to-noise ratio */ - static const int SN_ORIENT = 10; /* orientation signal-to-noise ratio */ - --static const int bits_per_long = 8 * sizeof(long); -- --static inline int nlongs(int nbit) --{ -- return (nbit + bits_per_long - 1) / bits_per_long; --} -+#define LONG_BITS (sizeof(long) * 8) -+#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS) - - static inline int getbit(const unsigned long *map, int key) - { -- return (map[key / bits_per_long] >> (key % bits_per_long)) & 0x01; -+ return (map[key / LONG_BITS] >> (key % LONG_BITS)) & 0x01; - } - - static int getabs(struct input_absinfo *abs, int key, int fd) -@@ -106,7 +102,7 @@ int mtdev_set_slots(struct mtdev *dev, int fd) - - int mtdev_configure(struct mtdev *dev, int fd) - { -- unsigned long absbits[nlongs(ABS_MAX)]; -+ unsigned long absbits[NLONGS(ABS_MAX)]; - int rc, i; - - SYSCALL(rc = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbits)), absbits)); --- -2.20.1 - diff --git a/pkg/mtdev/src b/pkg/mtdev/src -Subproject 4381b78fea54de0e775bf54952b2f95e5a06c57 +Subproject 25d541d2b0b526eba58fee99ceac202acca6d4a diff --git a/pkg/mtdev/ver b/pkg/mtdev/ver index 9208c440..c875bb12 100644 --- a/pkg/mtdev/ver +++ b/pkg/mtdev/ver @@ -1 +1 @@ -1.1.5 r1 +1.1.6 r0 |
