[CRT] Fix intrinsics definition with clang

This commit is contained in:
Jérôme Gardou 2020-09-10 23:24:59 +02:00 committed by Jérôme Gardou
parent edc1f3ca56
commit f96e47db43
3 changed files with 84 additions and 45 deletions

View file

@ -30,13 +30,21 @@
#ifndef RC_INVOKED
#ifdef __clang__
#define __INTRIN_INLINE __forceinline
#define HAS_BUILTIN(x) __has_builtin(x)
#else
#define HAS_BUILTIN(x) 0
#define __ATTRIBUTE_ARTIFICIAL __attribute__((artificial))
#define __INTRIN_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) __ATTRIBUTE_ARTIFICIAL
#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