Matteo Bruni : d3dx9/tests: Fix compilation when the NAN macro is not available.

Alexandre Julliard julliard at winehq.org
Mon Jun 12 16:10:39 CDT 2017


Module: wine
Branch: master
Commit: 26175489ba7a3f41bd6955e4877a7d6890b9f5cf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=26175489ba7a3f41bd6955e4877a7d6890b9f5cf

Author: Matteo Bruni <mbruni at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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];




More information about the wine-cvs mailing list