[PATCH 2/5] d3dx9/tests: Fix compilation when the NAN macro is not available.

Matteo Bruni mbruni at codeweavers.com
Fri Jun 9 14:19:36 CDT 2017


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
Should help with bug 43123.

 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 6ec07a2aee..20da3c653b 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];
-- 
2.13.0




More information about the wine-patches mailing list