Module: wine Branch: master Commit: 26175489ba7a3f41bd6955e4877a7d6890b9f5cf URL: http://source.winehq.org/git/wine.git/?a=commit;h=26175489ba7a3f41bd6955e487...
Author: Matteo Bruni mbruni@codeweavers.com Date: Fri Jun 9 21:19:36 2017 +0200
d3dx9/tests: Fix compilation when the NAN macro is not available.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3dx9_36/tests/effect.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 6ec07a2..20da3c6 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -31,6 +31,16 @@ static inline float __port_infinity(void) #define INFINITY __port_infinity() #endif /* INFINITY */
+#ifndef NAN +static float get_nan(void) +{ + DWORD nan = 0x7fc00000; + + return *(float *)&nan; +} +#define NAN get_nan() +#endif + #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
/* helper functions */ @@ -4751,7 +4761,7 @@ static const DWORD test_effect_preshader_ops_blob[] = static void test_effect_preshader_ops(IDirect3DDevice9 *device) { static D3DLIGHT9 light; - static const struct + const struct { const char *mnem; unsigned int expected_result[4];