diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-05 16:37:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-05 16:37:52 (GMT) |
commit | d010f7c3480b092d396c73d872da43257192a475 (patch) | |
tree | 48d45e13e9c79b85aeddc76a32ca49ce48a9e961 /libtommath/tommath.h | |
parent | c848a8872a27a167d3eba3391874be66feb637c5 (diff) | |
download | tcl-d010f7c3480b092d396c73d872da43257192a475.zip tcl-d010f7c3480b092d396c73d872da43257192a475.tar.gz tcl-d010f7c3480b092d396c73d872da43257192a475.tar.bz2 |
More WIP: All makefile builds appear to work fine, makefile.vc build still to be done.
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r-- | libtommath/tommath.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h index 41d07fd..7bb89e5 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -202,7 +202,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 @@ -252,11 +252,15 @@ TOOM_SQR_CUTOFF; #define SIGN(m) (MP_DEPRECATED_PRAGMA("SIGN macro is deprecated, use z->sign instead") (m)->sign) /* the infamous mp_int structure */ -typedef struct { +#ifndef MP_INT_DECLARED +#define MP_INT_DECLARED +typedef struct mp_int mp_int; +#endif +struct mp_int { int used, alloc; mp_sign sign; mp_digit *dp; -} mp_int; +}; /* callback for mp_prime_random, should fill dst with random bytes and return how many read [upto len] */ typedef int private_mp_prime_callback(unsigned char *dst, int len, void *dat); |