From c6b1b8e2f106dcf55e329656d48a040ab0a7ab91 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 14 Jun 2014 17:39:10 +0200 Subject: [PATCH] fix ulong64 typedef that led to broken builds for several platforms x86_64-w64-mingw32 and 32Bit mode on 64Bit system x86_64-w64-mingw32-gcc 'gcc -m32' 'gcc -mx32' --- src/headers/tfm.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/headers/tfm.h b/src/headers/tfm.h index fede323..b72a740 100644 --- a/src/headers/tfm.h +++ b/src/headers/tfm.h @@ -245,12 +245,15 @@ #if defined(FP_64BIT) /* for GCC only on supported platforms */ #ifndef CRYPT - typedef unsigned long ulong64; -#endif + typedef unsigned long long ulong64; +#endif /* CRYPT */ + typedef ulong64 fp_digit; #define SIZEOF_FP_DIGIT 8 typedef unsigned long fp_word __attribute__ ((mode(TI))); + #else + /* this is to make porting into LibTomCrypt easier :-) */ #ifndef CRYPT #if defined(_MSC_VER) || defined(__BORLANDC__) @@ -259,12 +262,13 @@ #else typedef unsigned long long ulong64; typedef signed long long long64; - #endif -#endif + #endif /* defined(_MSC_VER) ... */ +#endif /* CRYPT */ + typedef unsigned long fp_digit; #define SIZEOF_FP_DIGIT 4 typedef ulong64 fp_word; -#endif +#endif /* FP_64BIT */ /* # of digits this is */ #define DIGIT_BIT ((CHAR_BIT) * SIZEOF_FP_DIGIT)