From 1f7cf9dc0b0128147337529ee345f9dbe9047326 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 3 Apr 2014 15:05:56 +0200 Subject: [PATCH] move typedefs from tomcrypt_macros.h to tomcrypt_cfg.h --- src/headers/tomcrypt_cfg.h | 18 ++++++++++++++++++ src/headers/tomcrypt_macros.h | 17 ----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/headers/tomcrypt_cfg.h b/src/headers/tomcrypt_cfg.h index d573580..82be01b 100644 --- a/src/headers/tomcrypt_cfg.h +++ b/src/headers/tomcrypt_cfg.h @@ -90,6 +90,24 @@ typedef unsigned int __attribute__((__may_alias__)) LTC_FAST_TYPE; #endif #endif /* LTC_FAST */ +/* fix for MSVC ...evil! */ +#ifdef _MSC_VER + #define CONST64(n) n ## ui64 + typedef unsigned __int64 ulong64; +#else + #define CONST64(n) n ## ULL + typedef unsigned long long ulong64; +#endif + +/* this is the "32-bit at least" data type + * Re-define it to suit your platform but it must be at least 32-bits + */ +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) + typedef unsigned ulong32; +#else + typedef unsigned long ulong32; +#endif + /* detect sparc and sparc64 */ #if defined(__sparc__) #define ENDIAN_BIG diff --git a/src/headers/tomcrypt_macros.h b/src/headers/tomcrypt_macros.h index d56764f..deea16c 100644 --- a/src/headers/tomcrypt_macros.h +++ b/src/headers/tomcrypt_macros.h @@ -1,20 +1,3 @@ -/* fix for MSVC ...evil! */ -#ifdef _MSC_VER - #define CONST64(n) n ## ui64 - typedef unsigned __int64 ulong64; -#else - #define CONST64(n) n ## ULL - typedef unsigned long long ulong64; -#endif - -/* this is the "32-bit at least" data type - * Re-define it to suit your platform but it must be at least 32-bits - */ -#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) - typedef unsigned ulong32; -#else - typedef unsigned long ulong32; -#endif /* ---- HELPER MACROS ---- */ #ifdef ENDIAN_NEUTRAL