gregkh / usbutils

USB utilities for Linux, including lsusb
http://www.linux-usb.org
356 stars 202 forks source link

Build as much as possible on non-Linux #134

Closed tormodvolden closed 11 months ago

tormodvolden commented 2 years ago

Disables the Linux-only functionality (udev, sysfs lookups) but otherwise works fairly well on macOS and Windows (MinGW).

I have the suspicion that platform portability is not on the top of the list for usbutils (especially after version 007) but please consider this, or parts of it. Any review and comments are welcome.

This might get into for instance Homebrew https://github.com/Homebrew/homebrew-core/pull/89341, and would be great for cross-platform USB development (e.g. libusb debugging).

gregkh commented 2 years ago

Overall, this needs to be made much more maintainable if you want to do this. Put the #if stuff in .h files and not in the .c files to make this able to be maintained.

Also realize that almost no one will test this, so someone else is going to have to be responsible for handling any breakage or issues reported for that platform. I can't as I have no access to non-Linux systems, sorry.

gregkh commented 11 months ago

Closing due to lack of response.