Browse Source
Merge pull request #1 from liukun/master
support macOS
master
JOSEPH NICHOLAS R. ALCANTARA
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
33 additions and
4 deletions
-
binding.gyp
-
crypto/common.h
-
crypto/equihash.cpp
-
serialize.h
|
|
@ -48,7 +48,14 @@ |
|
|
|
"-lsodium" |
|
|
|
] |
|
|
|
}, |
|
|
|
'conditions': [ |
|
|
|
['OS=="mac"', { |
|
|
|
'xcode_settings': { |
|
|
|
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' |
|
|
|
} |
|
|
|
}] |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -9,7 +9,28 @@ |
|
|
|
#include <assert.h> |
|
|
|
|
|
|
|
#include "sodium.h" |
|
|
|
#include <endian.h> |
|
|
|
|
|
|
|
#ifndef __APPLE__ |
|
|
|
#include <endian.h> |
|
|
|
#else |
|
|
|
#include <machine/endian.h> |
|
|
|
#include <libkern/OSByteOrder.h> |
|
|
|
|
|
|
|
#define htobe16(x) OSSwapHostToBigInt16(x) |
|
|
|
#define htole16(x) OSSwapHostToLittleInt16(x) |
|
|
|
#define be16toh(x) OSSwapBigToHostInt16(x) |
|
|
|
#define le16toh(x) OSSwapLittleToHostInt16(x) |
|
|
|
|
|
|
|
#define htobe32(x) OSSwapHostToBigInt32(x) |
|
|
|
#define htole32(x) OSSwapHostToLittleInt32(x) |
|
|
|
#define be32toh(x) OSSwapBigToHostInt32(x) |
|
|
|
#define le32toh(x) OSSwapLittleToHostInt32(x) |
|
|
|
|
|
|
|
#define htobe64(x) OSSwapHostToBigInt64(x) |
|
|
|
#define htole64(x) OSSwapHostToLittleInt64(x) |
|
|
|
#define be64toh(x) OSSwapBigToHostInt64(x) |
|
|
|
#define le64toh(x) OSSwapLittleToHostInt64(x) |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(NDEBUG) |
|
|
|
# error "Zcash cannot be compiled without assertions." |
|
|
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
#include "config/bitcoin-config.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
#include <endian.h> |
|
|
|
#include "crypto/common.h" |
|
|
|
#include "crypto/equihash.h" |
|
|
|
#include <algorithm> |
|
|
|
#include <iostream> |
|
|
|
|
|
@ -6,7 +6,6 @@ |
|
|
|
#ifndef BITCOIN_SERIALIZE_H |
|
|
|
#define BITCOIN_SERIALIZE_H |
|
|
|
|
|
|
|
#include <endian.h> |
|
|
|
#include <algorithm> |
|
|
|
#include <assert.h> |
|
|
|
#include <ios> |
|
|
@ -23,6 +22,8 @@ |
|
|
|
#include <boost/array.hpp> |
|
|
|
#include <boost/optional.hpp> |
|
|
|
|
|
|
|
#include "crypto/common.h" |
|
|
|
|
|
|
|
class CScript; |
|
|
|
|
|
|
|
static const unsigned int MAX_SIZE = 0x02000000; |
|
|
|