summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristian Schmidbauer <ch.schmidbauer@gmail.com>2016-04-29 20:53:30 +0100
committerAxel Davy <axel.davy@ens.fr>2016-05-18 23:37:14 +0200
commitf5d6ed57022b7459bc0f63d9131528e47f4ec982 (patch)
treea2eb0ec0fd0e020e9153b6f494016f126956baf3 /include
parent243fd02858c1287667d9f8d0555a8e9520289f56 (diff)
downloadexternal_mesa3d-f5d6ed57022b7459bc0f63d9131528e47f4ec982.zip
external_mesa3d-f5d6ed57022b7459bc0f63d9131528e47f4ec982.tar.gz
external_mesa3d-f5d6ed57022b7459bc0f63d9131528e47f4ec982.tar.bz2
st/nine: Clean up WINAPI definition
As Emil pointed out, only gcc, clang and MSVC compatibility is required. Hence the check for GNUC can be skipped, as __i386__ and __x86_64__ are only defined for gcc/clang, not for MSVC. Remove the #undef which has been there for historic reasons, when wine dlls for nine have been built inside mesa. Instead use #ifndef in order to avoid redefining WINAPI from MSVC's headers. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Axel Davy <axel.davy@ens.fr>
Diffstat (limited to 'include')
-rw-r--r--include/D3D9/d3d9types.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/D3D9/d3d9types.h b/include/D3D9/d3d9types.h
index e0b8652..88f22b9 100644
--- a/include/D3D9/d3d9types.h
+++ b/include/D3D9/d3d9types.h
@@ -173,22 +173,16 @@ typedef struct _RGNDATA {
#define D3DPRESENTFLAG_RESTRICTED_CONTENT 0x00000400
#define D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER 0x00000800
-
-#ifdef WINAPI
-#undef WINAPI
-#endif /* WINAPI*/
-
-#ifdef __GNUC__
- #if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64)
+/* Windows calling convention */
+#ifndef WINAPI
+ #if defined(__x86_64__) && !defined(__ILP32__)
#define WINAPI __attribute__((ms_abi))
- #elif defined(__i386) || defined(_M_IX86)
+ #elif defined(__i386__)
#define WINAPI __attribute__((__stdcall__))
#else /* neither amd64 nor i386 */
#define WINAPI
#endif
-#else /* __GNUC__ */
- #define WINAPI
-#endif
+#endif /* WINAPI */
/* Implementation caps */
#define D3DPRESENT_BACK_BUFFERS_MAX 3