On Fri, Apr 15, 2016 at 6:06 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > From: Emil Velikov <emil.veli...@collabora.com> > > The __i386__ and __x86-64__ macros are gcc/clang specific, thus one does > not need the __GNUC__ at the top. > > Additionally, having _M_IX86 and _M_X64 in the same block (and even use > __attribute__(foo)) is wrong as those are set by MSVC. > > If at some point we do start building with the Sun/Oracle compiler we > might need to add the __i386 and __x86-64 and explicit checks for > __attribute__(foo) as the latter is not something that exists there. > > Cc: Christian Schmidbauer <ch.schmidba...@gmail.com> > Cc: Axel Davy <axel.d...@ens.fr> > Signed-off-by: Emil Velikov <emil.veli...@collabora.com> > --- > include/D3D9/d3d9types.h | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/include/D3D9/d3d9types.h b/include/D3D9/d3d9types.h > index dce5533..bcce061 100644 > --- a/include/D3D9/d3d9types.h > +++ b/include/D3D9/d3d9types.h > @@ -178,15 +178,13 @@ typedef struct _RGNDATA { > #undef WINAPI > #endif /* WINAPI*/ > > -#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__ */ > +#if defined(__x86_64__) && !defined(__ILP32__) > + #define WINAPI __attribute__((ms_abi)) > +#elif defined(__i386__) > + #define WINAPI __attribute__((__stdcall__)) > +#elif defined(_M_IX86) /* MSVC specific, do we even use it ? */ > + #define WINAPI
for correctness, it should be __stdcall as MSVC defaults to C calling convention. GraÅžvydas _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev