projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f59cb67
)
util/u_math: Define NAN/INFINITY macros for MSVC.
author
José Fonseca
<jfonseca@vmware.com>
Fri, 19 Jul 2013 23:31:18 +0000
(
00:31
+0100)
committer
José Fonseca
<jfonseca@vmware.com>
Fri, 19 Jul 2013 23:31:18 +0000
(
00:31
+0100)
Untested. But should hopefully fix the build.
src/gallium/auxiliary/util/u_math.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_math.h
b/src/gallium/auxiliary/util/u_math.h
index bc3948875a9b5f68076873ccf4cf476d742c9d94..702d4e9d403470d92904e2075355435e06e26d82 100644
(file)
--- 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 */