diff options
Diffstat (limited to 'source/blender/blenlib/BLI_compiler_compat.h')
-rw-r--r-- | source/blender/blenlib/BLI_compiler_compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h index 92928889c52..8edbc25bcbc 100644 --- a/source/blender/blenlib/BLI_compiler_compat.h +++ b/source/blender/blenlib/BLI_compiler_compat.h @@ -49,4 +49,16 @@ extern "C++" { } #endif +/* little macro so inline keyword works */ +#if defined(_MSC_VER) +# define BLI_INLINE static __forceinline +#else +# if (defined(__APPLE__) && defined(__ppc__)) +/* static inline __attribute__ here breaks osx ppc gcc42 build */ +# define BLI_INLINE static __attribute__((always_inline)) __attribute__((__unused__)) +# else +# define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__)) +# endif +#endif + #endif /* __BLI_COMPILER_COMPAT_H__ */ |