summaryrefslogtreecommitdiff
path: root/pkg/kbd/patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-17 09:27:44 -0700
committerMichael Forney <mforney@mforney.org>2019-07-17 09:27:44 -0700
commit650a6bdd3b0f8e5b1db7505dde784b238679d2c2 (patch)
treee2dc69f14c065d13109b016514350145eb83a770 /pkg/kbd/patch
parentc8080a9accdd084b26bfd29954883b8f8eb9f04a (diff)
kbd: Update to 2.1.0
Diffstat (limited to 'pkg/kbd/patch')
-rw-r--r--pkg/kbd/patch/0001-Avoid-pointer-arithmetic-on-void.patch61
-rw-r--r--pkg/kbd/patch/0002-Avoid-duplicate-external-definitions-of-progname.patch62
2 files changed, 0 insertions, 123 deletions
diff --git a/pkg/kbd/patch/0001-Avoid-pointer-arithmetic-on-void.patch b/pkg/kbd/patch/0001-Avoid-pointer-arithmetic-on-void.patch
deleted file mode 100644
index 2b843e8d..00000000
--- a/pkg/kbd/patch/0001-Avoid-pointer-arithmetic-on-void.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 36ab4890a83ec2347dc1955dd8cc40095e497890 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Tue, 12 Mar 2019 16:45:54 -0700
-Subject: [PATCH] Avoid pointer arithmetic on `void *`
-
-Standard C requires that the pointer operand to the + operator be to a
-complete object type[0], so use a `char *` instead.
-
-[0] http://port70.net/~nsz/c/c11/n1570.html#6.5.6p2
----
- src/libkeymap/array.c | 6 +++---
- src/libkeymap/keymap/array.h | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/libkeymap/array.c b/src/libkeymap/array.c
-index 076c1de..ec175df 100644
---- a/src/libkeymap/array.c
-+++ b/src/libkeymap/array.c
-@@ -54,7 +54,7 @@ int lk_array_exists(struct lk_array *a, unsigned int i)
- return 0;
- }
-
-- s = (char *)(a->array + (a->memb * i));
-+ s = a->array + (a->memb * i);
-
- for (k = 0; k < a->memb; k++) {
- if (s[k] != 0)
-@@ -80,7 +80,7 @@ lk_array_get_ptr(struct lk_array *a, unsigned int i)
- if (!a || i >= a->total) {
- return NULL;
- }
-- ptr = a->array;
-+ ptr = (void **)a->array;
- return *(ptr + i);
- }
-
-@@ -91,7 +91,7 @@ array_resize(struct lk_array *a, unsigned int i)
- return -EINVAL;
-
- if (i >= a->total) {
-- void *tmp = realloc(a->array, a->memb * (i + 1));
-+ char *tmp = realloc(a->array, a->memb * (i + 1));
- if (!tmp)
- return -ENOMEM;
-
-diff --git a/src/libkeymap/keymap/array.h b/src/libkeymap/keymap/array.h
-index 9894af1..caac6fb 100644
---- a/src/libkeymap/keymap/array.h
-+++ b/src/libkeymap/keymap/array.h
-@@ -6,7 +6,7 @@
- * @details The array is designed to store an arbitrary number of similar items.
- */
- struct lk_array {
-- void *array; /**< Data pointer. */
-+ char *array; /**< Data pointer. */
- size_t memb; /**< One element size. */
- size_t count; /**< Number of elements. */
- size_t total; /**< Total number of allocated elements. */
---
-2.20.1
-
diff --git a/pkg/kbd/patch/0002-Avoid-duplicate-external-definitions-of-progname.patch b/pkg/kbd/patch/0002-Avoid-duplicate-external-definitions-of-progname.patch
deleted file mode 100644
index d1653b88..00000000
--- a/pkg/kbd/patch/0002-Avoid-duplicate-external-definitions-of-progname.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 474ee8777d5fd011ec61bd66d42c95c6d99499f9 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Thu, 30 May 2019 21:37:42 -0700
-Subject: [PATCH] Avoid duplicate external definitions of progname
-
----
- src/Makefile.am | 5 +++--
- src/version.c | 5 +++++
- src/version.h | 2 +-
- 3 files changed, 9 insertions(+), 3 deletions(-)
- create mode 100644 src/version.c
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index d4e0583..1d80cf8 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -39,7 +39,8 @@ EXTRA_DIST = \
- libcommon_a_SOURCES = \
- getfd.c getfd.h \
- xmalloc.c xmalloc.h \
-- kbd_error.c kbd_error.h
-+ kbd_error.c kbd_error.h \
-+ version.c version.h
-
- libfont_a_SOURCES = \
- psf.h psffontop.c psffontop.h \
-@@ -48,7 +49,7 @@ libfont_a_SOURCES = \
- loadunimap.c loadunimap.h \
- kdfontop.c kdfontop.h
-
--ALL_S = nls.h paths.h version.h kbd.h
-+ALL_S = nls.h paths.h kbd.h
-
- chvt_SOURCES = $(ALL_S) chvt.c
- clrunimap_SOURCES = $(ALL_S) clrunimap.c
-diff --git a/src/version.c b/src/version.c
-new file mode 100644
-index 0000000..29b5161
---- /dev/null
-+++ b/src/version.c
-@@ -0,0 +1,5 @@
-+#include "config.h"
-+
-+#include "version.h"
-+
-+char *progname;
-diff --git a/src/version.h b/src/version.h
-index 31d1435..4daf24c 100644
---- a/src/version.h
-+++ b/src/version.h
-@@ -5,7 +5,7 @@
- #include <string.h>
- #include <stdlib.h>
-
--char *progname;
-+extern char *progname;
-
- static inline void
- set_progname(char *name)
---
-2.20.1
-