summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath.h
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r--libtommath/tommath.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index a637605..f9845d8 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -63,8 +63,13 @@ extern "C" {
* At the very least a mp_digit must be able to hold 7 bits
* [any size beyond that is ok provided it doesn't overflow the data type]
*/
-#if BITS_PER_LONG <= 64
- /* this is the default case, 28-bit digits */
+#if BITS_PER_LONG <= 32
+
+ typedef uint16_t mp_digit;
+ typedef uint32_t mp_word;
+# define DIGIT_BIT 15
+
+#elif BITS_PER_LONG == 64
typedef uint32_t mp_digit;
typedef uint64_t mp_word;