From owner-svn-ports-all@FreeBSD.ORG Tue Dec 17 20:45:22 2013 Return-Path: Delivered-To: svn-ports-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFC83D58; Tue, 17 Dec 2013 20:45:22 +0000 (UTC) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9538819F0; Tue, 17 Dec 2013 20:45:22 +0000 (UTC) Received: from mouf.net (swills@mouf [199.48.129.64]) by mouf.net (8.14.5/8.14.5) with ESMTP id rBHKjCRT071491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Dec 2013 20:45:17 GMT (envelope-from swills@mouf.net) Received: (from swills@localhost) by mouf.net (8.14.5/8.14.5/Submit) id rBHKjCha071490; Tue, 17 Dec 2013 20:45:12 GMT (envelope-from swills) Date: Tue, 17 Dec 2013 20:45:12 +0000 From: Steve Wills To: Andrey Chernov Subject: Re: svn commit: r336721 - in head/net-p2p/litecoin: . files Message-ID: <20131217204509.GB65354@mouf.net> References: <201312171310.rBHDA290070407@svn.freebsd.org> <52B0B23A.90103@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52B0B23A.90103@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Tue, 17 Dec 2013 20:45:17 +0000 (UTC) X-Spam-Status: No, score=0.0 required=4.5 tests=none autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mouf.net X-Virus-Scanned: clamav-milter 0.97.8 at mouf.net X-Virus-Status: Clean Cc: svn-ports-head@FreeBSD.org, svn-ports-all@FreeBSD.org, ports-committers@FreeBSD.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2013 20:45:23 -0000 On Wed, Dec 18, 2013 at 12:21:14AM +0400, Andrey Chernov wrote: > On 17.12.2013 17:10, Steve Wills wrote: > > Author: swills > > Date: Tue Dec 17 13:10:02 2013 > > New Revision: 336721 > > URL: http://svnweb.freebsd.org/changeset/ports/336721 > > > > Log: > > - Update to 0.8.6.1 > > > > Added: > > head/net-p2p/litecoin/files/extra-patch-endian (contents, props changed) > > Why you decide to add the same functions as in > /usr/include/sys/endian.h > instead of just including it? I didn't, i added a patch which removes the redundant functions so that the compiler doesn't complain about redefinition. (But only for 10.x and newer, since it only seems necessary there.) Steve > > +-static inline uint32_t be32dec(const void *pp) > > +-{ > > +- const uint8_t *p = (uint8_t const *)pp; > > +- return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + > > +- ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); > > +-} > > +- > > +-static inline void be32enc(void *pp, uint32_t x) > > +-{ > > +- uint8_t *p = (uint8_t *)pp; > > +- p[3] = x & 0xff; > > +- p[2] = (x >> 8) & 0xff; > > +- p[1] = (x >> 16) & 0xff; > > +- p[0] = (x >> 24) & 0xff; > > +-} > > +- > > + typedef struct HMAC_SHA256Context { > > + SHA256_CTX ictx; > > + SHA256_CTX octx; > > +--- src/scrypt.h.orig 2013-12-09 15:26:17.343282984 +0000 > > ++++ src/scrypt.h 2013-12-09 15:45:11.032205545 +0000 > > +@@ -17,19 +17,4 @@ > > + PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, > > + size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen); > > + > > +-static inline uint32_t le32dec(const void *pp) > > +-{ > > +- const uint8_t *p = (uint8_t const *)pp; > > +- return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + > > +- ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); > > +-} > > +- > > +-static inline void le32enc(void *pp, uint32_t x) > > +-{ > > +- uint8_t *p = (uint8_t *)pp; > > +- p[0] = x & 0xff; > > +- p[1] = (x >> 8) & 0xff; > > +- p[2] = (x >> 16) & 0xff; > > +- p[3] = (x >> 24) & 0xff; > > +-} > > + #endif > >