Fix up error codes for darwin port.
Make sure short transfers are allowed on BSD port.
Fix bug when finding new busses during usb_find_busses().
Added two new functions: usb_get_string() and usb_get_string_simple().
Documentation updates.
Added LICENSE file.
Various other cleanups.
Patch from seagull at aracnet.com:
Some time ago, I identified a problem with libusb under FreeBSD. The issue
is that the current implementation of bsd.c assumes that a particular
endpoint is unidirectional. If you write, for example, to endpoint 2,
you can't later on read from that same endpoint and visa-versa. Although
USB pipes are unidrectional, they can be "stacked" on the same endpoint.
Endpoint 2, for example, has two pipes: 0x02 and 0x82, with the high bit
representing the transfer direction of the pipe.
Since the BSD USB stack does not let you open two descriptors for the same
endpoint, and it does not let you close and reopen an endpoint in the middle
of a "session", I had originally proposed that the endpoint always be opened
O_RDWR so that bidirectional communication would be supported.
However, it was later pointed out that a device which really did only have a
unidrectional pipe on an endpoint would fail on ENXIO if you tried to open
it O_RDWR, so I went back to the drawing board and came up with a patch
for bsd.c which should solve the issue for both cases. What it does is
first attempt to open the endpoint O_RDWR. If that fails on ENXIO, then it
attempts to open the pipe in the direction appropriate for the operation
that you were committing.
This version of libusb is required by the soon-to-be-released gphoto2.
- Add support for MacOS X (Darwin)
- Fix endianess correctly where applicable on all OS'
- Return bytes written/read for control message (BSD)
- Tweak documentation build
- Fix bug when usb_find_devices was called multiple times (Linux)
- Fetch descriptors for all devices when we can and parse them
set FOO_CONFIG=${BUILDLINK_CONFIG_WRAPPER.foo} in both CONFIGURE_ENV and
MAKE_ENV. We remove the check for GNU_CONFIGURE because if a package
Makefile includes the buildlink.mk file, then it most likely wants to use
the config script wrappers as well. Change suggested by Hubert Feyrer
(hubertf) and Tomasz Luchowski (zuntum).