util/u_math: Define NAN/INFINITY macros for MSVC.

Untested. But should hopefully fix the build.
This commit is contained in:
José Fonseca 2013-07-20 00:31:18 +01:00
parent f59cb67376
commit b844c8e039

View file

@ -48,6 +48,7 @@ extern "C" {
#include <math.h>
#include <float.h>
#include <stdarg.h>
#ifdef PIPE_OS_UNIX
@ -133,6 +134,9 @@ roundf(float x)
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
}
#define INFINITY (DBL_MAX + DBL_MAX)
#define NAN (INFINITY - INFINITY)
#endif /* _MSC_VER */