mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-20 03:58:22 +02:00
st/nine: specify WINAPI only for i386 and amd64
Currently mesa fails building with the x32 abi as ms_abi is not defined
in such a case.
The patch uses ms_abi only for amd64 targets and stdcall only for i386
targets to be sure that those are defined.
This patch additionally checks for __GNUC__ to guarantee that
__attribute__ is available.
CC: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Schmidbauer <ch.schmidbauer@gmail.com>
Acked-by: Axel Davy <axel.davy@ens.fr>
(cherry picked from commit 2a529a8ac8)
This commit is contained in:
parent
50013e5db8
commit
c5f8a41710
1 changed files with 11 additions and 5 deletions
|
|
@ -178,11 +178,17 @@ typedef struct _RGNDATA {
|
|||
#undef WINAPI
|
||||
#endif /* WINAPI*/
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#define WINAPI __attribute__((ms_abi))
|
||||
#else /* x86_64 */
|
||||
#define WINAPI __attribute__((__stdcall__))
|
||||
#endif /* x86_64 */
|
||||
#ifdef __GNUC__
|
||||
#if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64)
|
||||
#define WINAPI __attribute__((ms_abi))
|
||||
#elif defined(__i386) || defined(_M_IX86)
|
||||
#define WINAPI __attribute__((__stdcall__))
|
||||
#else /* neither amd64 nor i386 */
|
||||
#define WINAPI
|
||||
#endif
|
||||
#else /* __GNUC__ */
|
||||
#define WINAPI
|
||||
#endif
|
||||
|
||||
/* Implementation caps */
|
||||
#define D3DPRESENT_BACK_BUFFERS_MAX 3
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue