pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libusb libusb: revert previous patch. this code ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/db417df61aae
branches:  trunk
changeset: 399294:db417df61aae
user:      maya <maya%pkgsrc.org@localhost>
date:      Tue Aug 06 09:27:30 2019 +0000

description:
libusb: revert previous patch. this code is not doing unaligned access.

PR pkg/54441

diffstat:

 devel/libusb/Makefile                    |   4 ++--
 devel/libusb/distinfo                    |   3 +--
 devel/libusb/patches/patch-descriptors.c |  30 ------------------------------
 3 files changed, 3 insertions(+), 34 deletions(-)

diffs (61 lines):

diff -r fbc09c92cad4 -r db417df61aae devel/libusb/Makefile
--- a/devel/libusb/Makefile     Tue Aug 06 09:12:35 2019 +0000
+++ b/devel/libusb/Makefile     Tue Aug 06 09:27:30 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2019/08/06 09:12:10 maya Exp $
+# $NetBSD: Makefile,v 1.45 2019/08/06 09:27:30 maya Exp $
 
 DISTNAME=      libusb-0.1.12
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=libusb/}
 
diff -r fbc09c92cad4 -r db417df61aae devel/libusb/distinfo
--- a/devel/libusb/distinfo     Tue Aug 06 09:12:35 2019 +0000
+++ b/devel/libusb/distinfo     Tue Aug 06 09:27:30 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2019/08/06 09:12:10 maya Exp $
+$NetBSD: distinfo,v 1.29 2019/08/06 09:27:30 maya Exp $
 
 SHA1 (libusb-0.1.12.tar.gz) = 599a5168590f66bc6f1f9a299579fd8500614807
 RMD160 (libusb-0.1.12.tar.gz) = 63848df717e00fff67ab30ba86a85466370d4e8e
@@ -11,4 +11,3 @@
 SHA1 (patch-ae) = 49a01ebe66de4965f3611cf42db09703aa68c415
 SHA1 (patch-af) = e46e576a589fb65488011a41df95f744230c0c6c
 SHA1 (patch-darwin.c) = 20df5d5970bf86f6f4ada002ca16a3bccf5bb4ff
-SHA1 (patch-descriptors.c) = 14cc1b46f094585fcfbb2ba046b89c3eb5cf49f9
diff -r fbc09c92cad4 -r db417df61aae devel/libusb/patches/patch-descriptors.c
--- a/devel/libusb/patches/patch-descriptors.c  Tue Aug 06 09:12:35 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-$NetBSD: patch-descriptors.c,v 1.1 2019/08/06 09:12:10 maya Exp $
-
-Avoid unaligned access. This breaks clang.
-Improve consistency.
-
---- descriptors.c.orig 2006-03-04 02:52:46.000000000 +0000
-+++ descriptors.c
-@@ -39,17 +39,17 @@ int usb_parse_descriptor(unsigned char *
-   for (cp = description; *cp; cp++) {
-     switch (*cp) {
-     case 'b': /* 8-bit byte */
--      *dp++ = *sp++;
-+      memcpy(dp, sp, 1); sp += 1; dp += 1;
-       break;
-     case 'w': /* 16-bit word, convert from little endian to CPU */
--      w = (sp[1] << 8) | sp[0]; sp += 2;
-+      w = (sp[1] << 8) | sp[0];
-       dp += ((unsigned long)dp & 1);  /* Align to word boundary */
--      *((uint16_t *)dp) = w; dp += 2;
-+      memcpy(dp, &w, 2); sp += 2; dp += 2;
-       break;
-     case 'd': /* 32-bit dword, convert from little endian to CPU */
--      d = (sp[3] << 24) | (sp[2] << 16) | (sp[1] << 8) | sp[0]; sp += 4;
-+      d = (sp[3] << 24) | (sp[2] << 16) | (sp[1] << 8) | sp[0];
-       dp += ((unsigned long)dp & 2);  /* Align to dword boundary */
--      *((uint32_t *)dp) = d; dp += 4;
-+      memcpy(dp, &d, 4); sp += 4; dp += 4;
-       break;
-     /* These two characters are undocumented and just a hack for Linux */
-     case 'W': /* 16-bit word, keep CPU endianess */



Home | Main Index | Thread Index | Old Index