From: Jacek Caban jacek@codeweavers.com
--- include/basetsd.h | 10 +++++++++- include/winnt.h | 8 -------- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/basetsd.h b/include/basetsd.h index c16d55422bb..eb12478dc71 100644 --- a/include/basetsd.h +++ b/include/basetsd.h @@ -65,9 +65,17 @@ extern "C" { # endif #endif /* !defined(_MSC_VER) */
+#ifndef __has_declspec_attribute +# if defined(_MSC_VER) +# define __has_declspec_attribute(x) 1 +# else +# define __has_declspec_attribute(x) 0 +# endif +#endif + /* FIXME: DECLSPEC_ALIGN should be declared only in winnt.h, but we need it here too */ #ifndef DECLSPEC_ALIGN -# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS) +# if __has_declspec_attribute(align) && !defined(MIDL_PASS) # define DECLSPEC_ALIGN(x) __declspec(align(x)) # elif defined(__GNUC__) # define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) diff --git a/include/winnt.h b/include/winnt.h index b03a92a9a7f..f7570433f17 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -42,14 +42,6 @@ extern "C" { #endif
-#ifndef __has_declspec_attribute -# if defined(_MSC_VER) -# define __has_declspec_attribute(x) 1 -# else -# define __has_declspec_attribute(x) 0 -# endif -#endif - #if defined(_NTSYSTEM_) || defined(WINE_UNIX_LIB) #define NTSYSAPI DECLSPEC_EXPORT #else