fix typedef of LTC_FAST_TYPE on x86_64

This commit is contained in:
Steffen Jaeckel 2014-04-03 22:22:01 +02:00
parent 68bfdd0fac
commit ffeb70b48a

View File

@ -82,14 +82,6 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
#define LTC_FAST #define LTC_FAST
#endif #endif
#ifdef LTC_FAST
#if __GNUC__ < 4 /* if the compiler does not support gnu extensions, i.e. its neither clang nor gcc */
#error the LTC_FAST hack is only available on compilers that support __attribute__((may_alias)) - disable it for your compiler, and dont worry, it won`t buy you much anyway
#else
typedef unsigned int __attribute__((__may_alias__)) LTC_FAST_TYPE;
#endif
#endif /* LTC_FAST */
/* fix for MSVC ...evil! */ /* fix for MSVC ...evil! */
#ifdef _MSC_VER #ifdef _MSC_VER
#define CONST64(n) n ## ui64 #define CONST64(n) n ## ui64
@ -108,6 +100,18 @@ typedef unsigned int __attribute__((__may_alias__)) LTC_FAST_TYPE;
typedef unsigned long ulong32; typedef unsigned long ulong32;
#endif #endif
#ifdef LTC_FAST
#if __GNUC__ < 4 /* if the compiler does not support gnu extensions, i.e. its neither clang nor gcc */
#error the LTC_FAST hack is only available on compilers that support __attribute__((may_alias)) - disable it for your compiler, and dont worry, it won`t buy you much anyway
#else
#ifdef ENDIAN_64BITWORD
typedef ulong64 __attribute__((__may_alias__)) LTC_FAST_TYPE;
#else
typedef ulong32 __attribute__((__may_alias__)) LTC_FAST_TYPE;
#endif
#endif
#endif /* LTC_FAST */
/* detect sparc and sparc64 */ /* detect sparc and sparc64 */
#if defined(__sparc__) #if defined(__sparc__)
#define ENDIAN_BIG #define ENDIAN_BIG