Browse Source

define ltc_mp_digit as 'unsigned long' resp 'unsigned long long' for x32

This fixes #306
Steffen Jaeckel 8 years ago
parent
commit
caed025f8a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/headers/tomcrypt_cfg.h

+ 3 - 3
src/headers/tomcrypt_cfg.h

@@ -219,10 +219,10 @@ LTC_EXPORT int   LTC_CALL XSTRCMP(const char *s1, const char *s2);
    #endif
    #endif
 #endif
 #endif
 
 
-#ifdef ENDIAN_64BITWORD
-typedef ulong64 ltc_mp_digit;
+#if defined(ENDIAN_64BITWORD) && (defined(__ILP32__) || defined(_ILP32))
+typedef unsigned long long ltc_mp_digit;
 #else
 #else
-typedef ulong32 ltc_mp_digit;
+typedef unsigned long ltc_mp_digit;
 #endif
 #endif
 
 
 /* No asm is a quick way to disable anything "not portable" */
 /* No asm is a quick way to disable anything "not portable" */