> The port itself is very simple, but the fallout to have ports picking
> <linux/input.h> is somehow important.
>
> If possible, I would like to have a bulk build with wayland/input-event-codes
> installed, in order to see if the presence of linux/input.h header makes
> problems or not.
The bulk finished with pulseaudio knocking out a good chunk of the tree:
Elapsed time=1 day 10:43:34
I=10642 B=133 Q=0 T=513 F=1 !=83
E=games/bzflag graphics/gimp/stable audio/pulseaudio
$ grep -R 'linux/input\.h' .
./x11/xkbcommon.log:Has header "linux/input.h" : NO
./x11/gtk+3.log:checking for linux/input.h... yes
./x11/gtk+4.log:Has header "linux/input.h" : YES
./x11/x11vnc.log:checking linux/input.h usability... yes
./x11/x11vnc.log:checking linux/input.h presence... yes
./x11/x11vnc.log:checking for linux/input.h... yes
./audio/pulseaudio.log:Has header "linux/input.h" : YES
./graphics/gimp/stable.log:checking for linux/input.h... yes
./games/bzflag.log:checking linux/input.h usability... yes
./games/bzflag.log:checking linux/input.h presence... yes
./games/bzflag.log:checking for linux/input.h... yes
./misc/brltty.log:checking linux/input.h usability... no
./misc/brltty.log:checking linux/input.h presence... no
./misc/brltty.log:checking for linux/input.h... no
./sysutils/consolekit.log:checking linux/input.h usability... yes
./sysutils/consolekit.log:checking linux/input.h presence... yes
./sysutils/consolekit.log:checking for linux/input.h... yes
$
games/bzflags:
depbase=`echo EvdevJoystick.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;
/usr/bin/libtool --tag=disable-static --tag=CXX --silent --mode=compile c++
-std=gnu++11 -DHAVE_CONFIG_H -I.
-I/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform -I../../include
-DINSTALL_DATA_DIR=\"/usr/local/share/bzflag\" -I/usr/local/include/SDL2
-I/usr/X11R6/include -D_REENTRANT
-I/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/include -I/usr/X11R6/include
-I/usr/local/include -fexpensive-optimizations -O2 -pipe -MT EvdevJoystick.lo
-MD -MP -MF $depbase.Tpo -c -o EvdevJoystick.lo
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx && mv -f
$depbase.Tpo $depbase.Plo
c++: warning: optimization flag '-fexpensive-optimizations' is not supported
[-Wignored-optimization-argument]
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:39:34:
error: unknown type name '__u32'
return 1 & (((const volatile __u32 *) addr)[nr >> 5] >> (nr & 31));
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:75:5:
warning: deleting pointer to incomplete type 'struct ff_effect' may cause
undefined behavior [-Wdelete-incomplete]
delete ff_rumble;
^ ~~~~~~~~~
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.h:126:12:
note: forward declaration of 'ff_effect'
struct ff_effect* ff_rumble;
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:125:23:
error: use of undeclared identifier 'EVIOCGNAME'
if (ioctl(fd, EVIOCGNAME(sizeof(jsname)-1), jsname) < 0)
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:152:19:
error: use of undeclared identifier 'EVIOCGBIT'
if (ioctl(fd, EVIOCGBIT(0, sizeof(info.evbit)), info.evbit) < 0)
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:154:19:
error: use of undeclared identifier 'EVIOCGBIT'
if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(info.keybit)), info.keybit) < 0)
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:156:19:
error: use of undeclared identifier 'EVIOCGBIT'
if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(info.absbit)), info.absbit) < 0)
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:167:23:
error: use of undeclared identifier 'EVIOCGABS'
if (ioctl(fd, EVIOCGABS(axis + ABS_X), &info.axis_info[axis]) < 0)
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:258:24:
error: variable has incomplete type 'struct input_event'
struct input_event ev;
^
/tmp/pobj/bzflag-2.4.22/bzflag-2.4.22/src/platform/EvdevJoystick.cxx:258:12:
note: forward declaration of 'input_event'
struct input_event ev;
^
1 warning and 7 errors generated.
graphics/gimp/stable
controller-linux-input.c:398:3: warning: implicit declaration of function
'ioctl' is invalid in C99 [-Wimplicit-function-declaration]
ioctl (fd, EVIOCGBIT (0, EV_MAX), evbit);
^
controller-linux-input.c:398:14: warning: implicit declaration of function
'EVIOCGBIT' is invalid in C99 [-Wimplicit-function-declaration]
ioctl (fd, EVIOCGBIT (0, EV_MAX), evbit);
^
controller-linux-input.c:467:34: error: variable has incomplete type 'struct
input_absinfo'
struct input_absinfo absinfo;
^
controller-linux-input.c:467:20: note: forward declaration of 'struct
input_absinfo'
struct input_absinfo absinfo;
^
controller-linux-input.c:472:24: warning: implicit declaration of function
'EVIOCGABS' is invalid in C99 [-Wimplicit-function-declaration]
ioctl (fd, EVIOCGABS (i), &absinfo);
^
controller-linux-input.c:542:15: warning: implicit declaration of function
'ioctl' is invalid in C99 [-Wimplicit-function-declaration]
if (ioctl (fd, EVIOCGNAME (sizeof (name)), name) >= 0 &&
^
controller-linux-input.c:542:26: warning: implicit declaration of function
'EVIOCGNAME' is invalid in C99 [-Wimplicit-function-declaration]
if (ioctl (fd, EVIOCGNAME (sizeof (name)), name) >= 0 &&
^
controller-linux-input.c:603:25: error: variable has incomplete type 'struct
input_event'
struct input_event ev;
^
controller-linux-input.c:603:10: note: forward declaration of 'struct
input_event'
struct input_event ev;
^
controller-linux-input.c:608:37: error: invalid application of 'sizeof' to an
incomplete type 'struct input_event'
sizeof (struct input_event), &n_bytes,
^ ~~~~~~~~~~~~~~~~~~~~
controller-linux-input.c:603:10: note: forward declaration of 'struct
input_event'
struct input_event ev;
^
controller-linux-input.c:644:18: error: invalid application of 'sizeof' to an
incomplete type 'struct input_event'
if (n_bytes == sizeof (struct input_event))
^ ~~~~~~~~~~~~~~~~~~~~
controller-linux-input.c:603:10: note: forward declaration of 'struct
input_event'
struct input_event ev;
^
5 warnings and 4 errors generated.
audio/pulseaudio:
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:80:28: error: variable has
incomplete type 'struct input_event'
struct input_event ev;
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:80:16: note: forward
declaration of 'struct input_event'
struct input_event ev;
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:158:21: error: variable has
incomplete type 'struct input_id'
struct input_id input_id;
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:158:12: note: forward
declaration of 'struct input_id'
struct input_id input_id;
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:195:9: warning: implicit
declaration of function 'ioctl' is invalid in C99
[-Wimplicit-function-declaration]
if (ioctl(u->fd, EVIOCGVERSION, &version) < 0) {
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:195:22: error: use of
undeclared identifier 'EVIOCGVERSION'
if (ioctl(u->fd, EVIOCGVERSION, &version) < 0) {
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:202:22: error: use of
undeclared identifier 'EVIOCGID'
if (ioctl(u->fd, EVIOCGID, &input_id)) {
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:211:22: warning: implicit
declaration of function 'EVIOCGNAME' is invalid in C99
[-Wimplicit-function-declaration]
if (ioctl(u->fd, EVIOCGNAME(sizeof(name)), name) < 0) {
^
../pulseaudio-16.1/src/modules/module-mmkbd-evdev.c:219:22: warning: implicit
declaration of function 'EVIOCGBIT' is invalid in C99
[-Wimplicit-function-declaration]
if (ioctl(u->fd, EVIOCGBIT(0, EV_MAX), evtype_bitmask) < 0) {
^
3 warnings and 4 errors generated.