From f8ba117cefe2e427f18d291a285b48e24d7a3d48 Mon Sep 17 00:00:00 2001 From: toddouska Date: Wed, 17 Apr 2013 17:26:33 -0700 Subject: [PATCH] cleanup 64/128bit type decls for big int libs --- cyassl/ctaocrypt/integer.h | 12 +----------- cyassl/ctaocrypt/tfm.h | 11 ++--------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/cyassl/ctaocrypt/integer.h b/cyassl/ctaocrypt/integer.h index fdad4773a..fb0ee4e9a 100644 --- a/cyassl/ctaocrypt/integer.h +++ b/cyassl/ctaocrypt/integer.h @@ -87,28 +87,18 @@ extern "C" { typedef unsigned int mp_word; #elif defined(MP_64BIT) /* for GCC only on supported platforms */ -#ifndef CRYPT - typedef unsigned long long ulong64; - typedef signed long long long64; -#endif - - typedef unsigned long mp_digit; + typedef unsigned long long mp_digit; /* 64 bit type, 128 uses mode(TI) */ typedef unsigned long mp_word __attribute__ ((mode(TI))); #define DIGIT_BIT 60 #else /* this is the default case, 28-bit digits */ - /* this is to make porting into LibTomCrypt easier :-) */ -#ifndef CRYPT #if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 ulong64; - typedef signed __int64 long64; #else typedef unsigned long long ulong64; - typedef signed long long long64; #endif -#endif typedef unsigned int mp_digit; /* long could be 64 now, changed TAO */ typedef ulong64 mp_word; diff --git a/cyassl/ctaocrypt/tfm.h b/cyassl/ctaocrypt/tfm.h index b42dfdeaf..2af778cc1 100644 --- a/cyassl/ctaocrypt/tfm.h +++ b/cyassl/ctaocrypt/tfm.h @@ -200,22 +200,15 @@ */ #if defined(FP_64BIT) /* for GCC only on supported platforms */ -#ifndef CRYPT - typedef unsigned long ulong64; -#endif - typedef ulong64 fp_digit; + typedef unsigned long long fp_digit; /* 64bit, 128 uses mode(TI) below */ 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__) typedef unsigned __int64 ulong64; - typedef signed __int64 long64; #else typedef unsigned long long ulong64; - typedef signed long long long64; #endif -#endif + #ifndef NO_64BIT typedef unsigned int fp_digit; typedef ulong64 fp_word;