Hello,
This patch stops wine from building on my system with following errors:
In file included from arb_program_shader.c:35:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) In file included from device.c:32:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) In file included from ati_fragment_shader.c:26:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) In file included from context.c:27:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) In file included from directx.c:26:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) In file included from gl_compat.c:26:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in wined3d_private.h: In function ‘float_24_to_32’: wined3d_private.h:225:21: error: ‘NAN’ undeclared (first use in this function) make[1]: *** [ati_fragment_shader.o] Error 1
Regards, Ruslan
On Wed, May 30, 2012 at 6:14 PM, Henri Verbeet hverbeet@codeweavers.com wrote:
dlls/wined3d/drawprim.c | 2 ++ dlls/wined3d/utils.c | 2 ++ dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 2e30175..c8944e5 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -25,6 +25,8 @@ */
#include "config.h" +#include "wine/port.h"
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index dc63d8b..f8f301a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -25,6 +25,8 @@ */
#include "config.h" +#include "wine/port.h"
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 096fe60..6632f6e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -200,7 +200,7 @@ static inline float float_16_to_32(const unsigned short *in) { return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f)); } else { if(m == 0) return sgn / 0.0f; /* +INF / -INF */
- else return 0.0f / 0.0f; /* NAN */
- else return NAN;
} }
@@ -222,7 +222,7 @@ static inline float float_24_to_32(DWORD in) else { if (m == 0) return sgn / 0.0f; /* +INF / -INF */
- else return 0.0f / 0.0f; /* NAN */
- else return NAN;
} }
-- 1.7.3.4
On Mon, 4 Jun 2012, Ruslan Kabatsayev wrote:
Hello,
This patch stops wine from building on my system with following errors:
In file included from arb_program_shader.c:35:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in
I sent a patch that should fix this. Did I miss some bit?
commit 19ba80e7c2c9ef054ef5faa921616a5d43f6578d Author: Francois Gouget fgouget@free.fr Date: Fri Jun 1 16:56:21 2012 +0200
wined3d: We must include Wine's port.h before using NAN.
Oh, right, seems it wasn't there at the point when another patch broke the build, and I was bisecting it. Sorry for the noise.
On Tue, Jun 5, 2012 at 1:53 PM, Francois Gouget fgouget@free.fr wrote:
On Mon, 4 Jun 2012, Ruslan Kabatsayev wrote:
Hello,
This patch stops wine from building on my system with following errors:
In file included from arb_program_shader.c:35:0: wined3d_private.h: In function ‘float_16_to_32’: wined3d_private.h:203:21: error: ‘NAN’ undeclared (first use in this function) wined3d_private.h:203:21: note: each undeclared identifier is reported only once for each function it appears in
I sent a patch that should fix this. Did I miss some bit?
commit 19ba80e7c2c9ef054ef5faa921616a5d43f6578d Author: Francois Gouget fgouget@free.fr Date: Fri Jun 1 16:56:21 2012 +0200
wined3d: We must include Wine's port.h before using NAN.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Linux: Because rebooting is for adding new hardware