[CRT] Move __INTRIN_INLINE to mingw32.h to be available everywhere

Also use __attribute__((artificial)) for clang, too.
This commit is contained in:
Timo Kreuzer 2020-01-09 20:16:43 +01:00
parent 84512b7abd
commit c34c5e29f0
2 changed files with 12 additions and 17 deletions

View file

@ -244,6 +244,18 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */
#endif
#endif /* DECLSPEC_HOTPATCH */
#ifndef __INTRIN_INLINE
# define __INTRIN_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__,artificial))
#endif
#ifndef HAS_BUILTIN
# ifdef __clang__
# define HAS_BUILTIN(x) __has_builtin(x)
# else
# define HAS_BUILTIN(x) 0
# endif
#endif
#ifdef __cplusplus
# define __mingw_ovr inline __cdecl
#elif defined (__GNUC__)

View file

@ -30,23 +30,6 @@
#ifndef RC_INVOKED
#ifndef __INTRIN_INLINE
# ifdef __clang__
# define __ATTRIBUTE_ARTIFICIAL
# else
# define __ATTRIBUTE_ARTIFICIAL __attribute__((artificial))
# endif
# define __INTRIN_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) __ATTRIBUTE_ARTIFICIAL
#endif
#ifndef HAS_BUILTIN
# ifdef __clang__
# define HAS_BUILTIN(x) __has_builtin(x)
# else
# define HAS_BUILTIN(x) 0
# endif
#endif
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#ifdef _WIN64