diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-12-21 22:33:19 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-12-21 22:33:19 +0100 |
commit | bde280b9a4da2652716c8ffdeed9ebfa4461cc70 (patch) | |
tree | f2d96b0c74da35b701513a629817c7e944798827 /src/bignum.h | |
parent | 21d9f36781604e4ca9fc35dc65265593423b73e9 (diff) |
Revert "Use standard C99 (and Qt) types for 64-bit integers"
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
Diffstat (limited to 'src/bignum.h')
-rw-r--r-- | src/bignum.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bignum.h b/src/bignum.h index baa9cb55da..135eade679 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -5,8 +5,6 @@ #ifndef BITCOIN_BIGNUM_H #define BITCOIN_BIGNUM_H -#include <stdint.h> - #include <stdexcept> #include <vector> #include <openssl/bn.h> @@ -83,12 +81,12 @@ public: CBigNum(short n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } CBigNum(int n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } CBigNum(long n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } - CBigNum(int64_t n) { BN_init(this); setint64(n); } + CBigNum(int64 n) { BN_init(this); setint64(n); } CBigNum(unsigned char n) { BN_init(this); setulong(n); } CBigNum(unsigned short n) { BN_init(this); setulong(n); } CBigNum(unsigned int n) { BN_init(this); setulong(n); } CBigNum(unsigned long n) { BN_init(this); setulong(n); } - CBigNum(uint64_t n) { BN_init(this); setuint64(n); } + CBigNum(uint64 n) { BN_init(this); setuint64(n); } explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); } explicit CBigNum(const std::vector<unsigned char>& vch) @@ -122,12 +120,12 @@ public: return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n); } - void setint64(int64_t n) + void setint64(int64 n) { unsigned char pch[sizeof(n) + 6]; unsigned char* p = pch + 4; bool fNegative = false; - if (n < (int64_t)0) + if (n < (int64)0) { n = -n; fNegative = true; @@ -157,7 +155,7 @@ public: BN_mpi2bn(pch, p - pch, this); } - void setuint64(uint64_t n) + void setuint64(uint64 n) { unsigned char pch[sizeof(n) + 6]; unsigned char* p = pch + 4; |