svn commit: r336721 - in head/net-p2p/litecoin: . files
Steve Wills
swills at FreeBSD.org
Tue Dec 17 20:45:23 UTC 2013
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
> >
More information about the svn-ports-all
mailing list