Commit 206e8b14 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Update stdcall and cdecl definitions in crtdefs.h.

parent 77c313b8
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#ifndef __stdcall #ifndef __stdcall
# ifdef __i386__ # ifdef __i386__
# ifdef __GNUC__ # ifdef __GNUC__
# ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */ # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) # define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
# else # else
# define __stdcall __attribute__((__stdcall__)) # define __stdcall __attribute__((__stdcall__))
...@@ -55,21 +55,29 @@ ...@@ -55,21 +55,29 @@
# error You need to define __stdcall for your compiler # error You need to define __stdcall for your compiler
# endif # endif
# elif defined(__x86_64__) && defined (__GNUC__) # elif defined(__x86_64__) && defined (__GNUC__)
# define __stdcall __attribute__((ms_abi)) # if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3))
# else # define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__))
# else
# define __stdcall __attribute__((ms_abi))
# endif
# else /* __i386__ */
# define __stdcall # define __stdcall
# endif # endif /* __i386__ */
#endif /* __stdcall */ #endif /* __stdcall */
#ifndef __cdecl #ifndef __cdecl
# if defined(__i386__) && defined(__GNUC__) # if defined(__i386__) && defined(__GNUC__)
# ifdef __APPLE__ /* Mac OS X uses 16-byte aligned stack and not a 4-byte one */ # 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__))
# else # else
# define __cdecl __attribute__((__cdecl__)) # define __cdecl __attribute__((__cdecl__))
# endif # endif
# elif defined(__x86_64__) && defined (__GNUC__) # elif defined(__x86_64__) && defined (__GNUC__)
# define __cdecl __attribute__((ms_abi)) # if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3))
# define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__))
# else
# define __cdecl __attribute__((ms_abi))
# endif
# elif !defined(_MSC_VER) # elif !defined(_MSC_VER)
# define __cdecl # define __cdecl
# endif # endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment