Date: Wed, 18 Dec 2013 00:21:14 +0400 From: Andrey Chernov <ache@freebsd.org> To: Steve Wills <swills@FreeBSD.org>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r336721 - in head/net-p2p/litecoin: . files Message-ID: <52B0B23A.90103@freebsd.org> In-Reply-To: <201312171310.rBHDA290070407@svn.freebsd.org> References: <201312171310.rBHDA290070407@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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? > +-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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52B0B23A.90103>