Hi,
On 2013-01-13 14:33, Matthias Janke wrote:
Beeing lazy is one motivaton for the patch. The other one is that
compiling an application is differnt from linking. When you link
libusb is proxied by libftdi, since libftdi is linked against libusb,
so on the linker cmd line there is only -lftdi1. So you don't care
about
libusb/x at all. But when you compile you have to include libusb
explicitly even if you don't use it in your application. This
breaks abstraction layers.
IMHO it would be better to not include <libusb.h> at all when compiling
your application (unless the application needs it directly).
The attached patch removes said include from the exposed header ftdi.h
and instead includes libusb.h in the libftdi sources where needed -
ftdi.h itself did not need the declarations from libusb.h.
(Caveat: Only compile-tested, and only on Linux)
Cheers
Anders
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
0001-Don-t-include-libusb.h-from-ftdi.h.patch
Description: Text Data
|