tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: hid.h fallout in third party code
On Sat, Jul 14, 2018 at 03:39:20PM +0000, coypu%sdf.org@localhost wrote:
> hi folks,
>
> in
> https://github.com/NetBSD/src/commit/a9e749a2e2d0044b947401ce80790a5788fad76e#diff-9353912fc541114002b043446f11751e
> bouyer had moved many definitions out of usbhid.h.
>
> This is a user-visible header and appears in third party packages, which
> now need even more ifdefs, and those need to be versioned too, which is
> extra ugly.
I already fixed some packages, it was not that ugly.
>
> example of third party code using it:
> https://sourceforge.net/p/vice-emu/code/HEAD/tree/tags/v3.2/vice/src/arch/unix/joy_usb.c#l72
>
> How about this following diff, to retain the same visiblity for
> the definitions?
>
> I needed HUP_GENERIC_DESKTOP.
>
> Index: dev/usb/usbhid.h
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/usb/usbhid.h,v
> retrieving revision 1.17
> diff -u -r1.17 usbhid.h
> --- dev/usb/usbhid.h 10 Dec 2017 17:03:07 -0000 1.17
> +++ dev/usb/usbhid.h 14 Jul 2018 15:35:39 -0000
> @@ -35,6 +35,8 @@
> #ifndef _DEV_USB_USBHID_H_
> #define _DEV_USB_USBHID_H_
>
> +#include <dev/hid/hid.h>
> +
> #define UR_GET_HID_DESCRIPTOR 0x06
> #define UDESC_HID 0x21
> #define UDESC_REPORT 0x22
Fine with me, but then you'd need to remove the extra include in other
source files
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index