[PATCH vkd3d 9/9] include: Avoid redefining ARRAY_SIZE().
31 Jan
2019
31 Jan
'19
10:29 a.m.
From: Józef Kucia <jkucia(a)codeweavers.com> winnt.h from Wine defines ARRAY_SIZE() when __WINESRC__ is defined. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- include/private/vkd3d_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index d942acf2b74b..1129f1e3001a 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -22,7 +22,9 @@ #include "config.h" #include "vkd3d_windows.h" -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +#ifndef ARRAY_SIZE +# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +#endif #define DIV_ROUND_UP(a, b) ((a) % (b) == 0 ? (a) / (b) : (a) / (b) + 1) -- 2.19.2
2509
Age (days ago)
2509
Last active (days ago)
1 comments
2 participants
participants (2)
-
Henri Verbeet -
Józef Kucia