From 448f0b8befb2f3c6ae2a5f59a5d39dce6841398f Mon Sep 17 00:00:00 2001 From: biller23 Date: Sat, 13 Jul 2019 10:53:25 +0000 Subject: [PATCH] Fix alignment macros for btScalar.h As of the merged #2278, but for btScalar.h --- src/LinearMath/btScalar.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index ba49d6700..c09085ebd 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -63,7 +63,12 @@ inline int btGetVersion() #endif #ifdef _WIN32 - #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) + #if defined(__GNUC__) // it should handle both MINGW and CYGWIN + #define SIMD_FORCE_INLINE __inline__ __attribute__((always_inline)) + #define ATTRIBUTE_ALIGNED16(a) a __attribute__((aligned(16))) + #define ATTRIBUTE_ALIGNED64(a) a __attribute__((aligned(64))) + #define ATTRIBUTE_ALIGNED128(a) a __attribute__((aligned(128))) + #elif ( defined(_MSC_VER) && _MSC_VER < 1300 ) #define SIMD_FORCE_INLINE inline #define ATTRIBUTE_ALIGNED16(a) a #define ATTRIBUTE_ALIGNED64(a) a