Module: Mesa Branch: master Commit: b844c8e039b18a665ce2e80da0e4000708a16362 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b844c8e039b18a665ce2e80da0e4000708a16362
Author: José Fonseca <[email protected]> Date: Sat Jul 20 00:31:18 2013 +0100 util/u_math: Define NAN/INFINITY macros for MSVC. Untested. But should hopefully fix the build. --- src/gallium/auxiliary/util/u_math.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index bc39488..702d4e9 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -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 */ _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
