Update to 0.1.6a. There is no documentation included on the changes, but a

cursory inspection suggests that they are mostly build related, and some minor
bug fixes to the platform-dependent code.
This commit is contained in:
mycroft 2002-08-19 19:07:19 +00:00
parent 489a8cec3f
commit cddd6cc3cd
5 changed files with 13 additions and 124 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.6 2002/05/08 17:43:40 drochner Exp $
# $NetBSD: Makefile,v 1.7 2002/08/19 19:07:19 mycroft Exp $
#
DISTNAME= libusb-0.1.5
PKGREVISION=1
DISTNAME= libusb-0.1.6a
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libusb/}

View file

@ -1,9 +1,9 @@
@comment $NetBSD: PLIST,v 1.3 2002/02/07 07:31:48 martti Exp $
@comment $NetBSD: PLIST,v 1.4 2002/08/19 19:07:19 mycroft Exp $
bin/libusb-config
include/usb.h
lib/libusb-0.1.so
lib/libusb-0.1.so.5
lib/libusb-0.1.so.5.0
lib/libusb-0.1.so.5.1
lib/libusb.a
lib/libusb.la
lib/libusb.so

View file

@ -1,6 +1,5 @@
$NetBSD: distinfo,v 1.6 2002/03/03 15:23:10 veego Exp $
$NetBSD: distinfo,v 1.7 2002/08/19 19:07:19 mycroft Exp $
SHA1 (libusb-0.1.5.tar.gz) = 519bb37993f01aefdc821cded229ca39e2112620
Size (libusb-0.1.5.tar.gz) = 186539 bytes
SHA1 (patch-ac) = 4e68ca416a75d54845bb0c19e17bd1c3d42ed252
SHA1 (patch-ad) = 8674eb850989ecaaa9306f6da5919e7b025b363a
SHA1 (libusb-0.1.6a.tar.gz) = 79ef093d70b5f4597a4227178ad00b6aa5ed49b0
Size (libusb-0.1.6a.tar.gz) = 180291 bytes
SHA1 (patch-ac) = cc92318e0979779f6ef03ee653bc94ee2b96a055

View file

@ -1,11 +1,11 @@
$NetBSD: patch-ac,v 1.1.1.1 2001/03/28 10:11:41 drochner Exp $
$NetBSD: patch-ac,v 1.2 2002/08/19 19:07:21 mycroft Exp $
--- libusb-config.in.orig Fri Feb 16 18:10:59 2001
+++ libusb-config.in Fri Feb 16 18:12:52 2001
--- libusb-config.in.orig Mon May 13 22:29:07 2002
+++ libusb-config.in Thu Jul 11 01:57:07 2002
@@ -75,5 +75,5 @@
echo $includes
fi
if test "$echo_libs" = "yes"; then
- echo -L@libdir@ -lusb
+ echo -L@libdir@ -Wl,-R@libdir@ -lusb
- echo -L@libdir@ -lusb @OSLIBS@
+ echo -L@libdir@ -Wl,-R@libdir@ -lusb @OSLIBS@
fi

View file

@ -1,109 +0,0 @@
$NetBSD: patch-ad,v 1.2 2002/03/03 15:22:28 veego Exp $
--- bsd.c.orig Thu Feb 7 07:43:25 2002
+++ bsd.c Sun Mar 3 14:59:58 2002
@@ -37,6 +37,16 @@
#include <dev/usb/usb.h>
+#ifndef USB_STACK_VERSION
+#define uai_interface_index interface_index
+#define uai_alt_no alt_no
+#define ucr_request request
+#define ucr_data data
+#define ucr_flags flags
+#define udi_addr addr
+#define udi_devnames devnames
+#endif
+
#include "usbi.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -151,8 +161,8 @@
if (dev->interface < 0)
USB_ERROR(-EINVAL);
- intf.interface_index = dev->interface;
- intf.alt_no = alternate;
+ intf.uai_interface_index = dev->interface;
+ intf.uai_alt_no = alternate;
ret = ioctl(dev->fd, USB_SET_ALTINTERFACE, &intf);
if (ret < 0)
@@ -182,6 +192,11 @@
#else
snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->device->filename, ep);
#endif
+ /* Try to open it O_RDWR first for those devices which have in and out
+ * endpoints with the same address (eg 0x02 and 0x82)
+ */
+ fd = open(buf, O_RDWR);
+ if (fd < 0 && errno == ENXIO)
fd = open(buf, mode);
if (fd < 0)
USB_ERROR_STR(fd, "can't open %s for bulk read: %s\n",
@@ -284,14 +299,14 @@
fprintf(stderr, "usb_control_msg: %d %d %d %d %p %d %d\n",
requesttype, request, value, index, bytes, size, timeout);
- req.request.bmRequestType = requesttype;
- req.request.bRequest = request;
- USETW(req.request.wValue, value);
- USETW(req.request.wIndex, index);
- USETW(req.request.wLength, size);
+ req.ucr_request.bmRequestType = requesttype;
+ req.ucr_request.bRequest = request;
+ USETW(req.ucr_request.wValue, value);
+ USETW(req.ucr_request.wIndex, index);
+ USETW(req.ucr_request.wLength, size);
- req.data = bytes;
- req.flags = 0;
+ req.ucr_data = bytes;
+ req.ucr_flags = 0;
ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout);
if (ret < 0)
@@ -303,7 +318,7 @@
USB_ERROR_STR(ret, "error sending control message: %s",
strerror(errno));
- return UGETW(req.request.wLength);
+ return UGETW(req.ucr_request.wLength);
}
int usb_find_devices_on_bus(struct usb_bus *bus)
@@ -321,20 +336,20 @@
struct usb_device *dev;
char buf[20];
- di.addr = device;
+ di.udi_addr = device;
if (ioctl(cfd, USB_DEVICEINFO, &di) < 0)
continue;
/* There's a device; is it one we should mess with? */
- if (strncmp(di.devnames[0], "ugen", 4) != 0)
+ if (strncmp(di.udi_devnames[0], "ugen", 4) != 0)
/* best not to play with things we don't understand */
continue;
#if __FreeBSD__
- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.devnames[0]);
+ snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]);
#else
- snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.devnames[0]);
+ snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.udi_devnames[0]);
#endif
/* Don't re-add it if we were called multiple times */
@@ -364,7 +379,7 @@
* This seemed easier than having 2 variables...
*/
#if __NetBSD__
- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.devnames[0]);
+ snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]);
#endif
strncpy(dev->filename, buf, sizeof(dev->filename) - 1);