From 5a4f9ca495ef7c76faaf055fdb8b88572afaad7d Mon Sep 17 00:00:00 2001 From: biller23 Date: Mon, 3 Jun 2019 10:10:54 +0000 Subject: [PATCH] Fix GCC alignement macros on Windows --- src/Bullet3Common/b3Scalar.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Bullet3Common/b3Scalar.h b/src/Bullet3Common/b3Scalar.h index 0db5eb6f4..c843c1dd2 100644 --- a/src/Bullet3Common/b3Scalar.h +++ b/src/Bullet3Common/b3Scalar.h @@ -40,8 +40,12 @@ inline int b3GetVersion() #ifdef _WIN32 -#if defined(__MINGW32__) || defined(__CYGWIN__) || (defined(_MSC_VER) && _MSC_VER < 1300) - +#if defined(__GNUC__) // it should handle both MINGW and CYGWIN +#define B3_FORCE_INLINE __inline__ __attribute__((always_inline)) +#define B3_ATTRIBUTE_ALIGNED16(a) a __attribute__((aligned(16))) +#define B3_ATTRIBUTE_ALIGNED64(a) a __attribute__((aligned(64))) +#define B3_ATTRIBUTE_ALIGNED128(a) a __attribute__((aligned(128))) +#elif ( defined(_MSC_VER) && _MSC_VER < 1300 ) #define B3_FORCE_INLINE inline #define B3_ATTRIBUTE_ALIGNED16(a) a #define B3_ATTRIBUTE_ALIGNED64(a) a