--- /dev/null
+#
+# Copyright (C) 2006-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libusb
+PKG_VERSION:=0.1.12
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/libusb
+PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+PKG_INSTALL=1
+
+define Package/libusb
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A library for accessing Linux USB devices
+ URL:=http://libusb.sourceforge.net/
+endef
+
+define Package/libusbpp
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A C++ library for accessing Linux USB devices
+ URL:=http://libusb.sourceforge.net/
+ DEPENDS:=$(CXX_DEPENDS) +libusb
+endef
+
+define Build/Configure
+ $(call Build/Configure/Default, \
+ --enable-shared \
+ --enable-static \
+ )
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/bin
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
+ $(2)/bin/
+ $(SED) \
+ 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
+ $(2)/bin/libusb-config
+
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/include/usb.h \
+ $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
+ $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libusb/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libusb.so* \
+ $(PKG_INSTALL_DIR)/usr/lib/libusb-*.so* \
+ $(1)/usr/lib/
+endef
+
+define Package/libusbpp/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libusbpp.so* \
+ $(PKG_INSTALL_DIR)/usr/lib/libusbpp-*.so* \
+ $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libusb))
+$(eval $(call BuildPackage,libusbpp))
--- /dev/null
+
+---
+ usb.h.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/usb.h.in
++++ b/usb.h.in
+@@ -66,14 +66,14 @@
+ struct usb_descriptor_header {
+ u_int8_t bLength;
+ u_int8_t bDescriptorType;
+-};
++} __attribute__ ((packed));
+
+ /* String descriptor */
+ struct usb_string_descriptor {
+ u_int8_t bLength;
+ u_int8_t bDescriptorType;
+ u_int16_t wData[1];
+-};
++} __attribute__ ((packed));
+
+ /* HID descriptor */
+ struct usb_hid_descriptor {
+@@ -85,7 +85,7 @@
+ /* u_int8_t bReportDescriptorType; */
+ /* u_int16_t wDescriptorLength; */
+ /* ... */
+-};
++} __attribute__ ((packed));
+
+ /* Endpoint descriptor */
+ #define USB_MAXENDPOINTS 32
+@@ -172,7 +172,7 @@
+ u_int8_t iProduct;
+ u_int8_t iSerialNumber;
+ u_int8_t bNumConfigurations;
+-};
++} __attribute__ ((packed));
+
+ struct usb_ctrl_setup {
+ u_int8_t bRequestType;
+@@ -180,7 +180,7 @@
+ u_int16_t wValue;
+ u_int16_t wIndex;
+ u_int16_t wLength;
+-};
++} __attribute__ ((packed));
+
+ /*
+ * Standard requests
+
--- /dev/null
+
+---
+ usb.h.in | 118 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 60 insertions(+), 58 deletions(-)
+
+--- a/usb.h.in
++++ b/usb.h.in
+@@ -13,8 +13,10 @@
+
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <limits.h>
+
++#include <sys/param.h>
+ #include <dirent.h>
+
+ /*
+@@ -64,40 +66,40 @@
+
+ /* All standard descriptors have these 2 fields in common */
+ struct usb_descriptor_header {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
++ uint8_t bLength;
++ uint8_t bDescriptorType;
+ } __attribute__ ((packed));
+
+ /* String descriptor */
+ struct usb_string_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int16_t wData[1];
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint16_t wData[1];
+ } __attribute__ ((packed));
+
+ /* HID descriptor */
+ struct usb_hid_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int16_t bcdHID;
+- u_int8_t bCountryCode;
+- u_int8_t bNumDescriptors;
+- /* u_int8_t bReportDescriptorType; */
+- /* u_int16_t wDescriptorLength; */
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint16_t bcdHID;
++ uint8_t bCountryCode;
++ uint8_t bNumDescriptors;
++ /* uint8_t bReportDescriptorType; */
++ /* uint16_t wDescriptorLength; */
+ /* ... */
+ } __attribute__ ((packed));
+
+ /* Endpoint descriptor */
+ #define USB_MAXENDPOINTS 32
+ struct usb_endpoint_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int8_t bEndpointAddress;
+- u_int8_t bmAttributes;
+- u_int16_t wMaxPacketSize;
+- u_int8_t bInterval;
+- u_int8_t bRefresh;
+- u_int8_t bSynchAddress;
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint8_t bEndpointAddress;
++ uint8_t bmAttributes;
++ uint16_t wMaxPacketSize;
++ uint8_t bInterval;
++ uint8_t bRefresh;
++ uint8_t bSynchAddress;
+
+ unsigned char *extra; /* Extra descriptors */
+ int extralen;
+@@ -115,15 +117,15 @@
+ /* Interface descriptor */
+ #define USB_MAXINTERFACES 32
+ struct usb_interface_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int8_t bInterfaceNumber;
+- u_int8_t bAlternateSetting;
+- u_int8_t bNumEndpoints;
+- u_int8_t bInterfaceClass;
+- u_int8_t bInterfaceSubClass;
+- u_int8_t bInterfaceProtocol;
+- u_int8_t iInterface;
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint8_t bInterfaceNumber;
++ uint8_t bAlternateSetting;
++ uint8_t bNumEndpoints;
++ uint8_t bInterfaceClass;
++ uint8_t bInterfaceSubClass;
++ uint8_t bInterfaceProtocol;
++ uint8_t iInterface;
+
+ struct usb_endpoint_descriptor *endpoint;
+
+@@ -141,14 +143,14 @@
+ /* Configuration descriptor information.. */
+ #define USB_MAXCONFIG 8
+ struct usb_config_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int16_t wTotalLength;
+- u_int8_t bNumInterfaces;
+- u_int8_t bConfigurationValue;
+- u_int8_t iConfiguration;
+- u_int8_t bmAttributes;
+- u_int8_t MaxPower;
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint16_t wTotalLength;
++ uint8_t bNumInterfaces;
++ uint8_t bConfigurationValue;
++ uint8_t iConfiguration;
++ uint8_t bmAttributes;
++ uint8_t MaxPower;
+
+ struct usb_interface *interface;
+
+@@ -158,28 +160,28 @@
+
+ /* Device descriptor */
+ struct usb_device_descriptor {
+- u_int8_t bLength;
+- u_int8_t bDescriptorType;
+- u_int16_t bcdUSB;
+- u_int8_t bDeviceClass;
+- u_int8_t bDeviceSubClass;
+- u_int8_t bDeviceProtocol;
+- u_int8_t bMaxPacketSize0;
+- u_int16_t idVendor;
+- u_int16_t idProduct;
+- u_int16_t bcdDevice;
+- u_int8_t iManufacturer;
+- u_int8_t iProduct;
+- u_int8_t iSerialNumber;
+- u_int8_t bNumConfigurations;
++ uint8_t bLength;
++ uint8_t bDescriptorType;
++ uint16_t bcdUSB;
++ uint8_t bDeviceClass;
++ uint8_t bDeviceSubClass;
++ uint8_t bDeviceProtocol;
++ uint8_t bMaxPacketSize0;
++ uint16_t idVendor;
++ uint16_t idProduct;
++ uint16_t bcdDevice;
++ uint8_t iManufacturer;
++ uint8_t iProduct;
++ uint8_t iSerialNumber;
++ uint8_t bNumConfigurations;
+ } __attribute__ ((packed));
+
+ struct usb_ctrl_setup {
+- u_int8_t bRequestType;
+- u_int8_t bRequest;
+- u_int16_t wValue;
+- u_int16_t wIndex;
+- u_int16_t wLength;
++ uint8_t bRequestType;
++ uint8_t bRequest;
++ uint16_t wValue;
++ uint16_t wIndex;
++ uint16_t wLength;
+ } __attribute__ ((packed));
+
+ /*
+@@ -250,7 +252,7 @@
+
+ void *dev; /* Darwin support */
+
+- u_int8_t devnum;
++ uint8_t devnum;
+
+ unsigned char num_children;
+ struct usb_device **children;
+@@ -262,7 +264,7 @@
+ char dirname[PATH_MAX + 1];
+
+ struct usb_device *devices;
+- u_int32_t location;
++ uint32_t location;
+
+ struct usb_device *root_dev;
+ };
+
--- /dev/null
+--- libusb-0.1.12/Makefile.in.old 2007-01-04 16:36:50.000000000 -0700
++++ libusb-0.1.12/Makefile.in 2007-01-04 16:42:55.000000000 -0700
+@@ -17,7 +17,7 @@
+
+
+
+-SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
++SOURCES = $(libusb_la_SOURCES)
+
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+@@ -73,8 +73,8 @@
+ am_libusb_la_OBJECTS = usb.lo error.lo descriptors.lo $(am__objects_1)
+ libusb_la_OBJECTS = $(am_libusb_la_OBJECTS)
+ libusbpp_la_LIBADD =
+-am_libusbpp_la_OBJECTS = usbpp.lo
+-libusbpp_la_OBJECTS = $(am_libusbpp_la_OBJECTS)
++am_libusbpp_la_OBJECTS =
++libusbpp_la_OBJECTS =
+ binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+ SCRIPTS = $(bin_SCRIPTS)
+ DEFAULT_INCLUDES =
+@@ -82,8 +82,7 @@
+ am__depfiles_maybe = depfiles
+ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bsd.Plo ./$(DEPDIR)/darwin.Plo \
+ @AMDEP_TRUE@ ./$(DEPDIR)/descriptors.Plo ./$(DEPDIR)/error.Plo \
+-@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo \
+-@AMDEP_TRUE@ ./$(DEPDIR)/usbpp.Plo
++@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+@@ -100,8 +99,8 @@
+ CXXLD = $(CXX)
+ CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+-SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
+-DIST_SOURCES = $(am__libusb_la_SOURCES_DIST) $(libusbpp_la_SOURCES)
++SOURCES = $(libusb_la_SOURCES)
++DIST_SOURCES = $(am__libusb_la_SOURCES_DIST)
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+@@ -256,7 +255,7 @@
+ # require automake 1.4
+ # gnu strictness chokes on README being autogenerated
+ AUTOMAKE_OPTIONS = 1.4 foreign
+-SUBDIRS = . tests doc
++SUBDIRS = .
+ AM_CFLAGS = -Werror $(AM_CFLAGS_EXT)
+ configincludedir = $(pkglibdir)/include
+ bin_SCRIPTS = libusb-config
+@@ -265,7 +264,7 @@
+ apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
+
+ EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
+-lib_LTLIBRARIES = libusb.la libusbpp.la
++lib_LTLIBRARIES = libusb.la
+ pkgconfig_DATA = libusb.pc
+ @BSD_API_FALSE@@DARWIN_API_FALSE@@LINUX_API_FALSE@OS_SUPPORT =
+ @BSD_API_FALSE@@DARWIN_API_TRUE@@LINUX_API_FALSE@OS_SUPPORT = darwin.c
+@@ -278,25 +277,19 @@
+ AM_CPPFLAGS = -I.
+ AM_CXXFLAGS =
+ libusb_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT)
+-libusbpp_la_SOURCES = usbpp.cpp usbpp.h
++libusbpp_la_SOURCES =
+ libusbpp_la_DEPENDENCIES = libusb.la
+
+ # Do not add usb.h to *_SOURCES, regardless of dependencies.
+ # It would be added to the dist tarball, which it shouldn't be.
+ nodist_include_HEADERS = usb.h
+-include_HEADERS = usbpp.h
++include_HEADERS =
+ libusb_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) \
+ -export-dynamic \
+ $(LDADDS) $(PREBIND_FLAGS)
+
+-libusbpp_la_LDFLAGS = \
+- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+- -release $(LT_RELEASE) \
+- -export-dynamic \
+- $(LDADDS) -lusb $(PREBIND_FLAGSPP)
+-
+ all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+@@ -395,8 +388,6 @@
+ done
+ libusb.la: $(libusb_la_OBJECTS) $(libusb_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libusb_la_LDFLAGS) $(libusb_la_OBJECTS) $(libusb_la_LIBADD) $(LIBS)
+-libusbpp.la: $(libusbpp_la_OBJECTS) $(libusbpp_la_DEPENDENCIES)
+- $(CXXLINK) -rpath $(libdir) $(libusbpp_la_LDFLAGS) $(libusbpp_la_OBJECTS) $(libusbpp_la_LIBADD) $(LIBS)
+ install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+@@ -429,7 +420,6 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb.Plo@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usbpp.Plo@am__quote@
+
+ .c.o:
+ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
--- /dev/null
+--- a/configure.in
++++ b/configure.in
+@@ -149,6 +149,7 @@ if test "x$enable_debug" = "xyes"; then
+ fi
+
+ # Checks for programs.
++AC_PROG_CXX
+ AC_LANG_CPLUSPLUS
+ AC_PROG_CC
+ AM_PROG_CC_C_O
--- /dev/null
+--- a/Makefile.am 2006-03-04 03:52:46.000000000 +0100
++++ b/Makefile.am 2011-02-03 12:59:22.261341559 +0100
+@@ -4,7 +4,7 @@
+ # gnu strictness chokes on README being autogenerated
+ AUTOMAKE_OPTIONS = 1.4 foreign
+
+-SUBDIRS = . tests doc
++SUBDIRS = .
+
+ AM_CFLAGS = -Werror
+
+++ /dev/null
-#
-# Copyright (C) 2006-2008 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libusb
-PKG_VERSION:=0.1.12
-PKG_RELEASE:=3
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/libusb
-PKG_MD5SUM:=caf182cbc7565dac0fd72155919672e6
-PKG_FIXUP:=autoreconf
-
-include $(INCLUDE_DIR)/uclibc++.mk
-include $(INCLUDE_DIR)/package.mk
-
-PKG_INSTALL=1
-
-define Package/libusb
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=A library for accessing Linux USB devices
- URL:=http://libusb.sourceforge.net/
-endef
-
-define Package/libusbpp
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=A C++ library for accessing Linux USB devices
- URL:=http://libusb.sourceforge.net/
- DEPENDS:=$(CXX_DEPENDS) +libusb
-endef
-
-define Build/Configure
- $(call Build/Configure/Default, \
- --enable-shared \
- --enable-static \
- )
-endef
-
-TARGET_CFLAGS += $(FPIC)
-
-define Build/InstallDev
- $(INSTALL_DIR) $(2)/bin
- $(INSTALL_BIN) \
- $(PKG_INSTALL_DIR)/usr/bin/libusb-config \
- $(2)/bin/
- $(SED) \
- 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
- $(2)/bin/libusb-config
-
- $(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/include/usb.h \
- $(1)/usr/include/
-
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libusb*.{la,so*,a} \
- $(1)/usr/lib/
-
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(INSTALL_DATA) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc \
- $(1)/usr/lib/pkgconfig/
-endef
-
-define Package/libusb/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libusb.so* \
- $(PKG_INSTALL_DIR)/usr/lib/libusb-*.so* \
- $(1)/usr/lib/
-endef
-
-define Package/libusbpp/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/libusbpp.so* \
- $(PKG_INSTALL_DIR)/usr/lib/libusbpp-*.so* \
- $(1)/usr/lib/
-endef
-
-$(eval $(call BuildPackage,libusb))
-$(eval $(call BuildPackage,libusbpp))
+++ /dev/null
-
----
- usb.h.in | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/usb.h.in
-+++ b/usb.h.in
-@@ -66,14 +66,14 @@
- struct usb_descriptor_header {
- u_int8_t bLength;
- u_int8_t bDescriptorType;
--};
-+} __attribute__ ((packed));
-
- /* String descriptor */
- struct usb_string_descriptor {
- u_int8_t bLength;
- u_int8_t bDescriptorType;
- u_int16_t wData[1];
--};
-+} __attribute__ ((packed));
-
- /* HID descriptor */
- struct usb_hid_descriptor {
-@@ -85,7 +85,7 @@
- /* u_int8_t bReportDescriptorType; */
- /* u_int16_t wDescriptorLength; */
- /* ... */
--};
-+} __attribute__ ((packed));
-
- /* Endpoint descriptor */
- #define USB_MAXENDPOINTS 32
-@@ -172,7 +172,7 @@
- u_int8_t iProduct;
- u_int8_t iSerialNumber;
- u_int8_t bNumConfigurations;
--};
-+} __attribute__ ((packed));
-
- struct usb_ctrl_setup {
- u_int8_t bRequestType;
-@@ -180,7 +180,7 @@
- u_int16_t wValue;
- u_int16_t wIndex;
- u_int16_t wLength;
--};
-+} __attribute__ ((packed));
-
- /*
- * Standard requests
-
+++ /dev/null
-
----
- usb.h.in | 118 ++++++++++++++++++++++++++++++++-------------------------------
- 1 file changed, 60 insertions(+), 58 deletions(-)
-
---- a/usb.h.in
-+++ b/usb.h.in
-@@ -13,8 +13,10 @@
-
- #include <unistd.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <limits.h>
-
-+#include <sys/param.h>
- #include <dirent.h>
-
- /*
-@@ -64,40 +66,40 @@
-
- /* All standard descriptors have these 2 fields in common */
- struct usb_descriptor_header {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
- } __attribute__ ((packed));
-
- /* String descriptor */
- struct usb_string_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int16_t wData[1];
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint16_t wData[1];
- } __attribute__ ((packed));
-
- /* HID descriptor */
- struct usb_hid_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int16_t bcdHID;
-- u_int8_t bCountryCode;
-- u_int8_t bNumDescriptors;
-- /* u_int8_t bReportDescriptorType; */
-- /* u_int16_t wDescriptorLength; */
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint16_t bcdHID;
-+ uint8_t bCountryCode;
-+ uint8_t bNumDescriptors;
-+ /* uint8_t bReportDescriptorType; */
-+ /* uint16_t wDescriptorLength; */
- /* ... */
- } __attribute__ ((packed));
-
- /* Endpoint descriptor */
- #define USB_MAXENDPOINTS 32
- struct usb_endpoint_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int8_t bEndpointAddress;
-- u_int8_t bmAttributes;
-- u_int16_t wMaxPacketSize;
-- u_int8_t bInterval;
-- u_int8_t bRefresh;
-- u_int8_t bSynchAddress;
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint8_t bEndpointAddress;
-+ uint8_t bmAttributes;
-+ uint16_t wMaxPacketSize;
-+ uint8_t bInterval;
-+ uint8_t bRefresh;
-+ uint8_t bSynchAddress;
-
- unsigned char *extra; /* Extra descriptors */
- int extralen;
-@@ -115,15 +117,15 @@
- /* Interface descriptor */
- #define USB_MAXINTERFACES 32
- struct usb_interface_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int8_t bInterfaceNumber;
-- u_int8_t bAlternateSetting;
-- u_int8_t bNumEndpoints;
-- u_int8_t bInterfaceClass;
-- u_int8_t bInterfaceSubClass;
-- u_int8_t bInterfaceProtocol;
-- u_int8_t iInterface;
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint8_t bInterfaceNumber;
-+ uint8_t bAlternateSetting;
-+ uint8_t bNumEndpoints;
-+ uint8_t bInterfaceClass;
-+ uint8_t bInterfaceSubClass;
-+ uint8_t bInterfaceProtocol;
-+ uint8_t iInterface;
-
- struct usb_endpoint_descriptor *endpoint;
-
-@@ -141,14 +143,14 @@
- /* Configuration descriptor information.. */
- #define USB_MAXCONFIG 8
- struct usb_config_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int16_t wTotalLength;
-- u_int8_t bNumInterfaces;
-- u_int8_t bConfigurationValue;
-- u_int8_t iConfiguration;
-- u_int8_t bmAttributes;
-- u_int8_t MaxPower;
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint16_t wTotalLength;
-+ uint8_t bNumInterfaces;
-+ uint8_t bConfigurationValue;
-+ uint8_t iConfiguration;
-+ uint8_t bmAttributes;
-+ uint8_t MaxPower;
-
- struct usb_interface *interface;
-
-@@ -158,28 +160,28 @@
-
- /* Device descriptor */
- struct usb_device_descriptor {
-- u_int8_t bLength;
-- u_int8_t bDescriptorType;
-- u_int16_t bcdUSB;
-- u_int8_t bDeviceClass;
-- u_int8_t bDeviceSubClass;
-- u_int8_t bDeviceProtocol;
-- u_int8_t bMaxPacketSize0;
-- u_int16_t idVendor;
-- u_int16_t idProduct;
-- u_int16_t bcdDevice;
-- u_int8_t iManufacturer;
-- u_int8_t iProduct;
-- u_int8_t iSerialNumber;
-- u_int8_t bNumConfigurations;
-+ uint8_t bLength;
-+ uint8_t bDescriptorType;
-+ uint16_t bcdUSB;
-+ uint8_t bDeviceClass;
-+ uint8_t bDeviceSubClass;
-+ uint8_t bDeviceProtocol;
-+ uint8_t bMaxPacketSize0;
-+ uint16_t idVendor;
-+ uint16_t idProduct;
-+ uint16_t bcdDevice;
-+ uint8_t iManufacturer;
-+ uint8_t iProduct;
-+ uint8_t iSerialNumber;
-+ uint8_t bNumConfigurations;
- } __attribute__ ((packed));
-
- struct usb_ctrl_setup {
-- u_int8_t bRequestType;
-- u_int8_t bRequest;
-- u_int16_t wValue;
-- u_int16_t wIndex;
-- u_int16_t wLength;
-+ uint8_t bRequestType;
-+ uint8_t bRequest;
-+ uint16_t wValue;
-+ uint16_t wIndex;
-+ uint16_t wLength;
- } __attribute__ ((packed));
-
- /*
-@@ -250,7 +252,7 @@
-
- void *dev; /* Darwin support */
-
-- u_int8_t devnum;
-+ uint8_t devnum;
-
- unsigned char num_children;
- struct usb_device **children;
-@@ -262,7 +264,7 @@
- char dirname[PATH_MAX + 1];
-
- struct usb_device *devices;
-- u_int32_t location;
-+ uint32_t location;
-
- struct usb_device *root_dev;
- };
-
+++ /dev/null
---- libusb-0.1.12/Makefile.in.old 2007-01-04 16:36:50.000000000 -0700
-+++ libusb-0.1.12/Makefile.in 2007-01-04 16:42:55.000000000 -0700
-@@ -17,7 +17,7 @@
-
-
-
--SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
-+SOURCES = $(libusb_la_SOURCES)
-
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
-@@ -73,8 +73,8 @@
- am_libusb_la_OBJECTS = usb.lo error.lo descriptors.lo $(am__objects_1)
- libusb_la_OBJECTS = $(am_libusb_la_OBJECTS)
- libusbpp_la_LIBADD =
--am_libusbpp_la_OBJECTS = usbpp.lo
--libusbpp_la_OBJECTS = $(am_libusbpp_la_OBJECTS)
-+am_libusbpp_la_OBJECTS =
-+libusbpp_la_OBJECTS =
- binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
- SCRIPTS = $(bin_SCRIPTS)
- DEFAULT_INCLUDES =
-@@ -82,8 +82,7 @@
- am__depfiles_maybe = depfiles
- @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bsd.Plo ./$(DEPDIR)/darwin.Plo \
- @AMDEP_TRUE@ ./$(DEPDIR)/descriptors.Plo ./$(DEPDIR)/error.Plo \
--@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo \
--@AMDEP_TRUE@ ./$(DEPDIR)/usbpp.Plo
-+@AMDEP_TRUE@ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/usb.Plo
- COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
-@@ -100,8 +99,8 @@
- CXXLD = $(CXX)
- CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
--SOURCES = $(libusb_la_SOURCES) $(libusbpp_la_SOURCES)
--DIST_SOURCES = $(am__libusb_la_SOURCES_DIST) $(libusbpp_la_SOURCES)
-+SOURCES = $(libusb_la_SOURCES)
-+DIST_SOURCES = $(am__libusb_la_SOURCES_DIST)
- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
-@@ -256,7 +255,7 @@
- # require automake 1.4
- # gnu strictness chokes on README being autogenerated
- AUTOMAKE_OPTIONS = 1.4 foreign
--SUBDIRS = . tests doc
-+SUBDIRS = .
- AM_CFLAGS = -Werror $(AM_CFLAGS_EXT)
- configincludedir = $(pkglibdir)/include
- bin_SCRIPTS = libusb-config
-@@ -265,7 +264,7 @@
- apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
-
- EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
--lib_LTLIBRARIES = libusb.la libusbpp.la
-+lib_LTLIBRARIES = libusb.la
- pkgconfig_DATA = libusb.pc
- @BSD_API_FALSE@@DARWIN_API_FALSE@@LINUX_API_FALSE@OS_SUPPORT =
- @BSD_API_FALSE@@DARWIN_API_TRUE@@LINUX_API_FALSE@OS_SUPPORT = darwin.c
-@@ -278,25 +277,19 @@
- AM_CPPFLAGS = -I.
- AM_CXXFLAGS =
- libusb_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT)
--libusbpp_la_SOURCES = usbpp.cpp usbpp.h
-+libusbpp_la_SOURCES =
- libusbpp_la_DEPENDENCIES = libusb.la
-
- # Do not add usb.h to *_SOURCES, regardless of dependencies.
- # It would be added to the dist tarball, which it shouldn't be.
- nodist_include_HEADERS = usb.h
--include_HEADERS = usbpp.h
-+include_HEADERS =
- libusb_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE) \
- -export-dynamic \
- $(LDADDS) $(PREBIND_FLAGS)
-
--libusbpp_la_LDFLAGS = \
-- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-- -release $(LT_RELEASE) \
-- -export-dynamic \
-- $(LDADDS) -lusb $(PREBIND_FLAGSPP)
--
- all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-@@ -395,8 +388,6 @@
- done
- libusb.la: $(libusb_la_OBJECTS) $(libusb_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libusb_la_LDFLAGS) $(libusb_la_OBJECTS) $(libusb_la_LIBADD) $(LIBS)
--libusbpp.la: $(libusbpp_la_OBJECTS) $(libusbpp_la_DEPENDENCIES)
-- $(CXXLINK) -rpath $(libdir) $(libusbpp_la_LDFLAGS) $(libusbpp_la_OBJECTS) $(libusbpp_la_LIBADD) $(LIBS)
- install-binSCRIPTS: $(bin_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-@@ -429,7 +420,6 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usb.Plo@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usbpp.Plo@am__quote@
-
- .c.o:
- @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+++ /dev/null
---- a/configure.in
-+++ b/configure.in
-@@ -149,6 +149,7 @@ if test "x$enable_debug" = "xyes"; then
- fi
-
- # Checks for programs.
-+AC_PROG_CXX
- AC_LANG_CPLUSPLUS
- AC_PROG_CC
- AM_PROG_CC_C_O
+++ /dev/null
---- a/Makefile.am 2006-03-04 03:52:46.000000000 +0100
-+++ b/Makefile.am 2011-02-03 12:59:22.261341559 +0100
-@@ -4,7 +4,7 @@
- # gnu strictness chokes on README being autogenerated
- AUTOMAKE_OPTIONS = 1.4 foreign
-
--SUBDIRS = . tests doc
-+SUBDIRS = .
-
- AM_CFLAGS = -Werror
-