Skip to content

Commit a307667

Browse files
committed
previous commit removed a little bit too much
1 parent ef07da5 commit a307667

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tommath.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ typedef uint64_t mp_word;
9393
# endif
9494
#endif
9595

96+
/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
97+
#ifndef DIGIT_BIT
98+
# define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
99+
#endif
100+
96101
#define MP_DIGIT_BIT DIGIT_BIT
97102
#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
98103
#define MP_DIGIT_MAX MP_MASK

0 commit comments

Comments
 (0)