@@ -55,29 +55,29 @@ extern "C" {
5555 */
5656#ifdef MP_8BIT
5757typedef uint8_t mp_digit ;
58- typedef uint16_t mp_word ;
58+ typedef uint16_t private_mp_word ;
5959# define MP_SIZEOF_MP_DIGIT 1
6060# ifdef MP_DIGIT_BIT
6161# error You must not define MP_DIGIT_BIT when using MP_8BIT
6262# endif
6363#elif defined(MP_16BIT )
6464typedef uint16_t mp_digit ;
65- typedef uint32_t mp_word ;
65+ typedef uint32_t private_mp_word ;
6666# define MP_SIZEOF_MP_DIGIT 2
6767# ifdef MP_DIGIT_BIT
6868# error You must not define MP_DIGIT_BIT when using MP_16BIT
6969# endif
7070#elif defined(MP_64BIT )
7171/* for GCC only on supported platforms */
7272typedef uint64_t mp_digit ;
73- typedef unsigned long mp_word __attribute__((mode (TI )));
73+ typedef unsigned long private_mp_word __attribute__((mode (TI )));
7474# define MP_DIGIT_BIT 60
7575#else
7676/* this is the default case, 28-bit digits */
7777
7878/* this is to make porting into LibTomCrypt easier :-) */
7979typedef uint32_t mp_digit ;
80- typedef uint64_t mp_word ;
80+ typedef uint64_t private_mp_word ;
8181
8282# ifdef MP_31BIT
8383/* this is an extension that uses 31-bit digits */
@@ -89,6 +89,9 @@ typedef uint64_t mp_word;
8989# endif
9090#endif
9191
92+ /* mp_word is a private type */
93+ #define mp_word MP_DEPRECATED_PRAGMA("mp_word has been made private") private_mp_word
94+
9295/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
9396#ifndef MP_DIGIT_BIT
9497# define MP_DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
@@ -172,7 +175,7 @@ TOOM_SQR_CUTOFF;
172175#endif
173176
174177/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
175- #define PRIVATE_MP_WARRAY (1uLL << (((CHAR_BIT * sizeof(mp_word )) - (2 * MP_DIGIT_BIT)) + 1))
178+ #define PRIVATE_MP_WARRAY (1uLL << (((CHAR_BIT * sizeof(private_mp_word )) - (2 * MP_DIGIT_BIT)) + 1))
176179#define MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") PRIVATE_MP_WARRAY)
177180
178181#if defined(__GNUC__ ) && __GNUC__ >= 4
0 commit comments