#elif defined(_MSC_VER)
# define __CRT_INLINE __inline
#elif defined(__GNUC__)
-# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
+# if defined(__clang__) || ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
# define __CRT_INLINE extern inline __attribute__((__always_inline__,__gnu_inline__))
# else
# define __CRT_INLINE extern __inline__ __attribute__((__always_inline__))
# endif
# define __ptr32
# define __ptr64
-# define __forceinline extern __inline __attribute((always_inline))
+# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
+# define __forceinline extern inline __attribute__((__always_inline__,__gnu_inline__))
+# else
+# define __forceinline extern __inline__ __attribute__((__always_inline__))
+# endif
#endif
#ifdef __cplusplus
#define _DECLSPEC_INTRIN_TYPE
#endif
+/* Define to a function attribute for Microsoft hotpatch assembly prefix. */
+#ifndef DECLSPEC_HOTPATCH
+#if defined(_MSC_VER) || defined(__clang__)
+/* FIXME: http://llvm.org/bugs/show_bug.cgi?id=20888 */
+#define DECLSPEC_HOTPATCH
+#else
+#define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__))
+#endif
+#endif /* DECLSPEC_HOTPATCH */
+
#include "_mingw_mac.h"
#endif /* !_INC_MINGW */