[PATCH 0/1] MR6522: include: Use __has_declspec_attribute in corecrt.h.
To keep it in sync with winnt.h. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6522
From: Jacek Caban <jacek(a)codeweavers.com> To keep it in sync with winnt.h. --- include/msvcrt/corecrt.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 945d8ac4055..b3d9aa0992c 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -86,6 +86,14 @@ #define __has_attribute(x) 0 #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(_MSC_VER) && !defined(__MINGW32__) # undef __stdcall # ifdef __i386__ @@ -132,7 +140,7 @@ #endif #ifndef DECLSPEC_NORETURN -# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS) +# if __has_declspec_attribute(noreturn) && !defined(MIDL_PASS) # define DECLSPEC_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define DECLSPEC_NORETURN __attribute__((noreturn)) @@ -142,7 +150,7 @@ #endif #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))) @@ -154,7 +162,7 @@ #ifndef _ACRTIMP # ifdef _CRTIMP # define _ACRTIMP _CRTIMP -# elif defined(_MSC_VER) +# elif __has_declspec_attribute(dllimport) # define _ACRTIMP __declspec(dllimport) # elif defined(__MINGW32__) || defined(__CYGWIN__) # define _ACRTIMP __attribute__((dllimport)) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6522
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148483 Your paranoid android. === debian11b (64 bit WoW report) === user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00000000005300E6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
There's also some in sys/stat.h (which could probably go away as it includes corecrt.h), basestd.h and specstrings.h -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6522#note_82521
This merge request was approved by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6522
participants (4)
-
Jacek Caban -
Jacek Caban (@jacek) -
Marvin -
Rémi Bernon