Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 20:45:12 +0000
From:      Steve Wills <swills@FreeBSD.org>
To:        Andrey Chernov <ache@FreeBSD.org>
Cc:        svn-ports-head@FreeBSD.org, svn-ports-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: svn commit: r336721 - in head/net-p2p/litecoin: . files
Message-ID:  <20131217204509.GB65354@mouf.net>
In-Reply-To: <52B0B23A.90103@freebsd.org>
References:  <201312171310.rBHDA290070407@svn.freebsd.org> <52B0B23A.90103@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> > 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217204509.GB65354>