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>
This commit is contained in:
Jacek Caban 2020-04-23 15:40:44 +02:00 committed by Alexandre Julliard
parent 79664eb1cf
commit 1902eba2c6
2 changed files with 17 additions and 23 deletions

View File

@ -49,7 +49,7 @@
#endif #endif
#endif #endif
#ifndef __stdcall #if !defined(_MSC_VER) && !defined(__stdcall)
# ifdef __i386__ # ifdef __i386__
# ifdef __GNUC__ # ifdef __GNUC__
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
@ -57,8 +57,6 @@
# else # else
# define __stdcall __attribute__((__stdcall__)) # define __stdcall __attribute__((__stdcall__))
# endif # endif
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else # else
# error You need to define __stdcall for your compiler # error You need to define __stdcall for your compiler
# endif # endif
@ -77,7 +75,7 @@
# endif /* __i386__ */ # endif /* __i386__ */
#endif /* __stdcall */ #endif /* __stdcall */
#ifndef __cdecl #if !defined(_MSC_VER) && !defined(__cdecl)
# if defined(__i386__) && defined(__GNUC__) # if defined(__i386__) && defined(__GNUC__)
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
@ -94,8 +92,6 @@
# define __cdecl __attribute__((pcs("aapcs-vfp"))) # define __cdecl __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) # elif defined(__aarch64__) && defined (__GNUC__)
# define __cdecl __attribute__((ms_abi)) # define __cdecl __attribute__((ms_abi))
# elif !defined(_MSC_VER)
# define __cdecl
# endif # endif
#endif /* __cdecl */ #endif /* __cdecl */

View File

@ -50,7 +50,7 @@ extern "C" {
# endif # endif
#endif #endif
#ifndef __stdcall #if !defined(_MSC_VER) && !defined(__stdcall)
# ifdef __i386__ # ifdef __i386__
# ifdef __GNUC__ # ifdef __GNUC__
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
@ -58,8 +58,6 @@ extern "C" {
# else # else
# define __stdcall __attribute__((__stdcall__)) # define __stdcall __attribute__((__stdcall__))
# endif # endif
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else # else
# error You need to define __stdcall for your compiler # error You need to define __stdcall for your compiler
# endif # endif
@ -78,7 +76,7 @@ extern "C" {
# endif /* __i386__ */ # endif /* __i386__ */
#endif /* __stdcall */ #endif /* __stdcall */
#ifndef __cdecl #if !defined(_MSC_VER) && !defined(__cdecl)
# if defined(__i386__) && defined(__GNUC__) # if defined(__i386__) && defined(__GNUC__)
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
@ -100,10 +98,8 @@ extern "C" {
# endif # endif
#endif /* __cdecl */ #endif /* __cdecl */
#ifndef __fastcall #if !defined(_MSC_VER) && !defined(__fastcall)
# ifndef _MSC_VER
# define __fastcall __stdcall # define __fastcall __stdcall
# endif
#endif #endif
#ifndef __thiscall #ifndef __thiscall
@ -140,12 +136,7 @@ extern "C" {
#define __ONLY_IN_WINELIB(x) x #define __ONLY_IN_WINELIB(x) x
#endif #endif
#ifndef pascal #ifndef _MSC_VER
#define pascal __ONLY_IN_WINELIB(__stdcall)
#endif
#ifndef _pascal
#define _pascal __ONLY_IN_WINELIB(__stdcall)
#endif
#ifndef _stdcall #ifndef _stdcall
#define _stdcall __ONLY_IN_WINELIB(__stdcall) #define _stdcall __ONLY_IN_WINELIB(__stdcall)
#endif #endif
@ -155,16 +146,23 @@ extern "C" {
#ifndef __fastcall #ifndef __fastcall
#define __fastcall __ONLY_IN_WINELIB(__stdcall) #define __fastcall __ONLY_IN_WINELIB(__stdcall)
#endif #endif
#ifndef __export
#define __export __ONLY_IN_WINELIB(__stdcall)
#endif
#ifndef cdecl #ifndef cdecl
#define cdecl __ONLY_IN_WINELIB(__cdecl) #define cdecl __ONLY_IN_WINELIB(__cdecl)
#endif #endif
#ifndef _cdecl #ifndef _cdecl
#define _cdecl __ONLY_IN_WINELIB(__cdecl) #define _cdecl __ONLY_IN_WINELIB(__cdecl)
#endif #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 #ifndef near
#define near __ONLY_IN_WINELIB(/* nothing */) #define near __ONLY_IN_WINELIB(/* nothing */)
#endif #endif