[INCLUDES]
[reactos.git] / reactos / include / crt / _mingw.h
index 7d22fde..203ac56 100644 (file)
@@ -56,7 +56,7 @@
 #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__))
@@ -163,18 +163,20 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case.  */
 //#endif
 
 #ifdef __GNUC__
-#ifndef __clang__
 #define __int8 char
 #define __int16 short
 #define __int32 int
 #define __int64 long long
-#endif
 #ifdef _WIN64
    typedef int __int128 __attribute__ ((mode (TI)));
 # 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
@@ -213,6 +215,16 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case.  */
 #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 */