On Thu, 2 Jan 2014, Stefan Dösinger wrote: [...]
--- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -4800,7 +4800,7 @@ static void test_create_skin_info(void)
[...]
exp_weights[1] = 0.0f / 0.0f; /* NAN */
exp_weights[1] = NAN;
This patch breaks the compilation on Solaris because it does not define NAN (except in math_c99.h but we cannot use that, see below).
But independently from that I think it's wrong because one should be able to compile the conformance tests on Windows. This means we cannot use things like config.h or port.h and should only use stuff that's defined in Windows headers. But as far as I can tell the Windows SDK does not define NAN. There is a definition of NAN in the CRT xmath.h header but Wine does not have that header and we're obviously not including it here.
So one solution would be to revert the patch. Another would be to copy wine/port.h's __port_nan() definition. Yet another might be to add xmath.h and a dependency on msvcrt.dll. But maybe there's a better way still?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-03 20:39, schrieb Francois Gouget:
But independently from that I think it's wrong because one should be able to compile the conformance tests on Windows.
The purpose of this patch was to be able to compile the tests in msvc. But there may be some quirks in the build setup, see below.
So one solution would be to revert the patch. Another would be to copy wine/port.h's __port_nan() definition. Yet another might be to add xmath.h and a dependency on msvcrt.dll. But maybe there's a better way still?
NAN was available, and I assumed that I got the one from port.h. Admittedly I didn't check where exactly it came from. Maybe msvc 2013 added a NAN definition.
My msvc build setup is a bit quirky. I wanted to avoid needing a full mingw setup, so I ended up (over time, adding one detail after another) cloning a part of the Wine build system as a msvc project. I'll boot Windows and see where the NAN comes from exactly.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-03 22:15, schrieb Stefan Dösinger:
NAN was available, and I assumed that I got the one from port.h. Admittedly I didn't check where exactly it came from. Maybe msvc 2013 added a NAN definition.
I got the NAN definition from the system math.h, which is included unconditionally by d3dx9math.h, which is included by d3dx9.h, which is included by the test. NAN is defined as INFINITY * 0.0.
So I guess a NAN definition was introduced in the Windows headers at some point.