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 <hverb...@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 > > >