previous commit removed a little bit too much
diff --git a/tommath.h b/tommath.h
index e5cee9b..692433b 100644
--- a/tommath.h
+++ b/tommath.h
@@ -93,6 +93,11 @@ typedef uint64_t mp_word;
# endif
#endif
+/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
+#ifndef DIGIT_BIT
+# define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
+#endif
+
#define MP_DIGIT_BIT DIGIT_BIT
#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
#define MP_DIGIT_MAX MP_MASK