aboutsummaryrefslogtreecommitdiff
path: root/src/bignum.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bignum.h')
-rw-r--r--src/bignum.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bignum.h b/src/bignum.h
index 135eade679..baa9cb55da 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -5,6 +5,8 @@
#ifndef BITCOIN_BIGNUM_H
#define BITCOIN_BIGNUM_H
+#include <stdint.h>
+
#include <stdexcept>
#include <vector>
#include <openssl/bn.h>
@@ -81,12 +83,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 n) { BN_init(this); setint64(n); }
+ CBigNum(int64_t 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 n) { BN_init(this); setuint64(n); }
+ CBigNum(uint64_t n) { BN_init(this); setuint64(n); }
explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); }
explicit CBigNum(const std::vector<unsigned char>& vch)
@@ -120,12 +122,12 @@ public:
return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
}
- void setint64(int64 n)
+ void setint64(int64_t n)
{
unsigned char pch[sizeof(n) + 6];
unsigned char* p = pch + 4;
bool fNegative = false;
- if (n < (int64)0)
+ if (n < (int64_t)0)
{
n = -n;
fNegative = true;
@@ -155,7 +157,7 @@ public:
BN_mpi2bn(pch, p - pch, this);
}
- void setuint64(uint64 n)
+ void setuint64(uint64_t n)
{
unsigned char pch[sizeof(n) + 6];
unsigned char* p = pch + 4;