Module: wine Branch: master Commit: 1902eba2c611ac738a95ecab1f2495da4bb5dd08 URL: https://source.winehq.org/git/wine.git/?a=commit;h=1902eba2c611ac738a95ecab1...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Apr 23 15:40:44 2020 +0200
include: Don't override keywords with macros on MSVC.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/msvcrt/corecrt.h | 8 ++------ include/windef.h | 32 +++++++++++++++----------------- 2 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 3532cbf501..bc93de023f 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -49,7 +49,7 @@ #endif #endif
-#ifndef __stdcall +#if !defined(_MSC_VER) && !defined(__stdcall) # ifdef __i386__ # ifdef __GNUC__ # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) @@ -57,8 +57,6 @@ # else # define __stdcall __attribute__((__stdcall__)) # endif -# elif defined(_MSC_VER) - /* Nothing needs to be done. __stdcall already exists */ # else # error You need to define __stdcall for your compiler # endif @@ -77,7 +75,7 @@ # endif /* __i386__ */ #endif /* __stdcall */
-#ifndef __cdecl +#if !defined(_MSC_VER) && !defined(__cdecl) # if defined(__i386__) && defined(__GNUC__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) @@ -94,8 +92,6 @@ # define __cdecl __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) # define __cdecl __attribute__((ms_abi)) -# elif !defined(_MSC_VER) -# define __cdecl # endif #endif /* __cdecl */
diff --git a/include/windef.h b/include/windef.h index 3c61cad4c5..689163accc 100644 --- a/include/windef.h +++ b/include/windef.h @@ -50,7 +50,7 @@ extern "C" { # endif #endif
-#ifndef __stdcall +#if !defined(_MSC_VER) && !defined(__stdcall) # ifdef __i386__ # ifdef __GNUC__ # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) @@ -58,8 +58,6 @@ extern "C" { # else # define __stdcall __attribute__((__stdcall__)) # endif -# elif defined(_MSC_VER) - /* Nothing needs to be done. __stdcall already exists */ # else # error You need to define __stdcall for your compiler # endif @@ -78,7 +76,7 @@ extern "C" { # endif /* __i386__ */ #endif /* __stdcall */
-#ifndef __cdecl +#if !defined(_MSC_VER) && !defined(__cdecl) # if defined(__i386__) && defined(__GNUC__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) @@ -100,10 +98,8 @@ extern "C" { # endif #endif /* __cdecl */
-#ifndef __fastcall -# ifndef _MSC_VER -# define __fastcall __stdcall -# endif +#if !defined(_MSC_VER) && !defined(__fastcall) +# define __fastcall __stdcall #endif
#ifndef __thiscall @@ -140,12 +136,7 @@ extern "C" { #define __ONLY_IN_WINELIB(x) x #endif
-#ifndef pascal -#define pascal __ONLY_IN_WINELIB(__stdcall) -#endif -#ifndef _pascal -#define _pascal __ONLY_IN_WINELIB(__stdcall) -#endif +#ifndef _MSC_VER #ifndef _stdcall #define _stdcall __ONLY_IN_WINELIB(__stdcall) #endif @@ -155,16 +146,23 @@ extern "C" { #ifndef __fastcall #define __fastcall __ONLY_IN_WINELIB(__stdcall) #endif -#ifndef __export -#define __export __ONLY_IN_WINELIB(__stdcall) -#endif #ifndef cdecl #define cdecl __ONLY_IN_WINELIB(__cdecl) #endif #ifndef _cdecl #define _cdecl __ONLY_IN_WINELIB(__cdecl) #endif +#endif /* _MSC_VER */
+#ifndef pascal +#define pascal __ONLY_IN_WINELIB(__stdcall) +#endif +#ifndef _pascal +#define _pascal __ONLY_IN_WINELIB(__stdcall) +#endif +#ifndef __export +#define __export __ONLY_IN_WINELIB(__stdcall) +#endif #ifndef near #define near __ONLY_IN_WINELIB(/* nothing */) #endif