diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-30 10:08:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-30 10:08:36 (GMT) |
commit | 722cda78a9012db2d8dfb39c6137846757be3e15 (patch) | |
tree | c70fb8ab89db616f6f3242145cf9f2e512b3a840 /libtommath | |
parent | e06dc8eb8d0fa3a16b57f4288e608dba5c97b454 (diff) | |
download | tcl-722cda78a9012db2d8dfb39c6137846757be3e15.zip tcl-722cda78a9012db2d8dfb39c6137846757be3e15.tar.gz tcl-722cda78a9012db2d8dfb39c6137846757be3e15.tar.bz2 |
VC++ 6.0 doesn't know the uLL number postfix
Diffstat (limited to 'libtommath')
-rw-r--r-- | libtommath/bn_mp_ilogb.c | 4 | ||||
-rw-r--r-- | libtommath/bn_mp_set_double.c | 2 | ||||
-rw-r--r-- | libtommath/tommath.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libtommath/bn_mp_ilogb.c b/libtommath/bn_mp_ilogb.c index b584c43..7252779 100644 --- a/libtommath/bn_mp_ilogb.c +++ b/libtommath/bn_mp_ilogb.c @@ -6,7 +6,7 @@ /* Compute log_{base}(a) */ static mp_word s_pow(mp_word base, mp_word exponent) { - mp_word result = 1uLL; + mp_word result = 1; while (exponent != 0u) { if ((exponent & 1u) == 1u) { result *= base; @@ -20,7 +20,7 @@ static mp_word s_pow(mp_word base, mp_word exponent) static mp_digit s_digit_ilogb(mp_digit base, mp_digit n) { - mp_word bracket_low = 1uLL, bracket_mid, bracket_high, N; + mp_word bracket_low = 1, bracket_mid, bracket_high, N; mp_digit ret, high = 1uL, low = 0uL, mid; if (n < base) { diff --git a/libtommath/bn_mp_set_double.c b/libtommath/bn_mp_set_double.c index 55be7b6..fea5691 100644 --- a/libtommath/bn_mp_set_double.c +++ b/libtommath/bn_mp_set_double.c @@ -16,7 +16,7 @@ mp_err mp_set_double(mp_int *a, double b) cast.dbl = b; exp = (int)((unsigned)(cast.bits >> 52) & 0x7FFu); - frac = (cast.bits & ((1uLL << 52) - 1uLL)) | (1uLL << 52); + frac = (cast.bits & ((1uLL << 52) - 1)) | (1uLL << 52); if (exp == 0x7FF) { /* +-inf, NaN */ return MP_VAL; diff --git a/libtommath/tommath.h b/libtommath/tommath.h index 443e6df..1cff07d 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -172,7 +172,7 @@ TOOM_SQR_CUTOFF; #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ -#define PRIVATE_MP_WARRAY (int)(1uLL << (((CHAR_BIT * sizeof(private_mp_word)) - (2 * MP_DIGIT_BIT)) + 1)) +#define PRIVATE_MP_WARRAY (int)(1 << (((CHAR_BIT * (int)sizeof(private_mp_word)) - (2 * MP_DIGIT_BIT)) + 1)) #define MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") PRIVATE_MP_WARRAY) #if defined(__GNUC__) && __GNUC__ >= 4 |