Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:
kbd.c: In function ‘KbdPreInit’:
kbd.c:160:32: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
earlier argument and not in the later argument [-Wcalloc-transposed-args]
160 | if (!(pKbd = calloc(sizeof(KbdDevRec), 1))) {
| ^~~~~~~~~
kbd.c:160:32: note: earlier argument should specify number of elements,
later size of each element
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard/-/merge_requests/14>
It's needed for the definitions of the KIO* ioctls used in this file,
but is currently being indirectly included via xf86_OSlib.h.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Clears autoconf warnings:
configure.ac:38: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:38: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:38: the top level
configure.ac:51: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:51: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:51: the top level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Needed to avoid "Failed to unpack image" errors in the container-prep
job since FreeBSD 13.0 images are no longer available for download
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
You almost certainly want to be using libinput or evdev on Linux
systems, and the Linux code is arguably under the GPL, which is a fine
license in general but not for X.org. Delete the Linux support so people
stop using it.
We didn't use SIGIO input for keyboard processing, but we can use
threaded input.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fixes Solaris Studio 12.4 compiler error:
"sun_kbd.c", line 512: redeclaration must have the same or more restrictive linker scoping: xf86OSKbdPreInit
cc: acomp failed for sun_kbd.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This way if the ioctl fails we don't set any unintended LEDs, but really this
patch is more to silence valgrind:
==7129== Conditional jump or move depends on uninitialised value(s)
==7129== at 0x8DF99A1: GetKbdLeds (lnx_kbd.c:79)
==7129== by 0x8DF8853: InitKBD (kbd.c:291)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
When support for inet keys was added to the keyboard driver
back in the early 2000 none of the developers thought of
Japanese 106 key keybards which have two extra keys generating
the scan codes 0x79 and 0x7d.
So for keys prefixed with the scan code 0x60 which were not
remapped to anything else the line:
*scanCode += 0x78;
was added.
Thus keys generating the scan codes 0xe0 0x01 and 0xe0 0x03
will overlap with the Henkan and Muhenkan keys on Japanese
keyboards.
A workaround was introduced to xkeyboard-config which makes
sure the keycodes 0x79 and 0x7d provide the Henkan and Muhenkan
keysyms. As a consequence users might loose some multimedia keys
on Japanese keyboards.
A different solution would be to either remap keycodes 0x79
and 0x7d or keycodes 0xe0 0x01 and 0xe0 0x03 into the range of
unused (X-)keycodes above 0xfb.
There are downsides with either solution: the legacy keyboard
driver and the xkb files would have to be fixed in sync. Otherwise
Japanese users would loose their Henkan and Muhenkan keys (in
the first case) or some multimedia keys would get lost.
The present patch does the latter which seems to be cleaner codewise.
Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When using /dev/wskbd* we need to close the device when VT switching
out of X, and open it again when switching back.
>From Michael Lorenz <macallan@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>