From: José Fonseca Date: Fri, 19 Jul 2013 23:31:18 +0000 (+0100) Subject: util/u_math: Define NAN/INFINITY macros for MSVC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b844c8e039b18a665ce2e80da0e4000708a16362;p=mesa.git util/u_math: Define NAN/INFINITY macros for MSVC. Untested. But should hopefully fix the build. --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index bc3948875a9..702d4e9d403 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -48,6 +48,7 @@ extern "C" { #include +#include #include #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 */