pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/zzuf



Module Name:    pkgsrc
Committed By:   joerg
Date:           Sun Apr  1 20:27:21 UTC 2018

Modified Files:
        pkgsrc/devel/zzuf: distinfo
Added Files:
        pkgsrc/devel/zzuf/patches: patch-src_util_md5.c

Log Message:
Prefer compiler endian macros if they exist.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/zzuf/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/zzuf/patches/patch-src_util_md5.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/zzuf/distinfo
diff -u pkgsrc/devel/zzuf/distinfo:1.4 pkgsrc/devel/zzuf/distinfo:1.5
--- pkgsrc/devel/zzuf/distinfo:1.4      Sun Apr 16 21:46:12 2017
+++ pkgsrc/devel/zzuf/distinfo  Sun Apr  1 20:27:20 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2017/04/16 21:46:12 khorben Exp $
+$NetBSD: distinfo,v 1.5 2018/04/01 20:27:20 joerg Exp $
 
 SHA1 (zzuf-0.15.tar.gz) = 21541d54cec64750c2dd3366a73832e6f5250833
 RMD160 (zzuf-0.15.tar.gz) = 12052a511a789d18ee3af3428f6e69e3492452a0
@@ -7,4 +7,5 @@ Size (zzuf-0.15.tar.gz) = 493559 bytes
 SHA1 (patch-config.h.in) = 517bc764b4b53b15e189fe39322341fe50af3ec8
 SHA1 (patch-configure) = e6797a1b4f90ebb41ea86e7d99241ca78b9b0ad9
 SHA1 (patch-configure.ac) = d236876a47c3df13b6a82dda5c941f7a314b1abc
+SHA1 (patch-src_util_md5.c) = 12c0068355fb8c3a63f329e5774aa0cebcad7b44
 SHA1 (patch-src_zzuf.c) = 28a1223a7a4d4a3d6a0320910b7c782ce202c8d0

Added files:

Index: pkgsrc/devel/zzuf/patches/patch-src_util_md5.c
diff -u /dev/null pkgsrc/devel/zzuf/patches/patch-src_util_md5.c:1.1
--- /dev/null   Sun Apr  1 20:27:21 2018
+++ pkgsrc/devel/zzuf/patches/patch-src_util_md5.c      Sun Apr  1 20:27:21 2018
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_util_md5.c,v 1.1 2018/04/01 20:27:21 joerg Exp $
+
+--- src/util/md5.c.orig        2018-03-31 17:41:34.690815147 +0000
++++ src/util/md5.c
+@@ -121,8 +121,18 @@ void zzuf_destroy_md5(uint8_t *digest, z
+ static void swapwords(uint32_t *buf, unsigned words)
+ {
+     /* XXX: no need to swap words on little endian machines */
++#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ - __ORDER_LITTLE_ENDIAN__ + 0 == 0)
++    return;
++#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ - __ORDER_BIG_ENDIAN__ + 0 == 0)
++    while (words > 0)
++    {
++        uint8_t *b = (uint8_t *)buf;
++        *buf++ = (uint32_t)b[3] << 24 | b[2] << 16 | b[1] << 8 | b[0];
++        words--;
++    }
++#else
+ #if defined HAVE_ENDIAN_H
+-    if (__BYTE_ORDER == __LITTLE_ENDIAN)
++    if (_BYTE_ORDER == _LITTLE_ENDIAN)
+         return;
+ #else
+     /* This is compile-time optimised with at least -O1 or -Os */
+@@ -137,6 +147,7 @@ static void swapwords(uint32_t *buf, uns
+         *buf++ = (uint32_t)b[3] << 24 | b[2] << 16 | b[1] << 8 | b[0];
+         words--;
+     }
++#endif
+ }
+ 
+ /* #define F1(x, y, z) (x & y | ~x & z) */



Home | Main Index | Thread Index | Old Index