From 2acb2200b547f89a6f8e745c65ebd49300012cc6 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 7 Jul 2010 22:08:30 +0200 Subject: additions to compile on 32-bit machines. --- libtommath/tommath.h | 9 +++++++-- 1 file 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; -- cgit