diff --git a/tommath.h b/tommath.h index 8dd3bb34c..7714f987a 100644 --- a/tommath.h +++ b/tommath.h @@ -6,7 +6,6 @@ #include #include -#include #ifdef LTM_NO_FILE # warning LTM_NO_FILE has been deprecated, use MP_NO_FILE. @@ -199,10 +198,6 @@ TOOM_SQR_CUTOFF; # define MP_PREC (MP_DEPRECATED_PRAGMA("MP_PREC is an internal macro") PRIVATE_MP_PREC) #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 MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") PRIVATE_MP_WARRAY) - #if defined(__GNUC__) && __GNUC__ >= 4 # define MP_NULL_TERMINATED __attribute__((sentinel)) #else diff --git a/tommath_private.h b/tommath_private.h index 7c167a5d5..5ccb4e260 100644 --- a/tommath_private.h +++ b/tommath_private.h @@ -6,6 +6,7 @@ #include "tommath.h" #include "tommath_class.h" +#include /* * Private symbols @@ -163,9 +164,7 @@ typedef private_mp_word mp_word; #define MP_SIZEOF_BITS(type) ((size_t)CHAR_BIT * sizeof(type)) #define MP_MAXFAST (int)(1uL << (MP_SIZEOF_BITS(mp_word) - (2u * (size_t)MP_DIGIT_BIT))) -/* TODO: Remove PRIVATE_MP_WARRAY as soon as deprecated MP_WARRAY is removed from tommath.h */ -#undef MP_WARRAY -#define MP_WARRAY PRIVATE_MP_WARRAY +#define MP_WARRAY (1 << ((MP_SIZEOF_BITS(mp_word) - (2 * MP_DIGIT_BIT)) + 1)) /* TODO: Remove PRIVATE_MP_PREC as soon as deprecated MP_PREC is removed from tommath.h */ #ifdef PRIVATE_MP_PREC