Mesa (master): glsl: Define isnormal for Oracle Solaris Studio.

Vinson Lee vlee at kemper.freedesktop.org
Fri Oct 4 22:52:43 UTC 2013


Module: Mesa
Branch: master
Commit: 1349766612709a4bc15eac0780178fb01e5d18bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1349766612709a4bc15eac0780178fb01e5d18bc

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Fri Oct  4 11:24:03 2013 -0700

glsl: Define isnormal for Oracle Solaris Studio.

This patch fixes this Oracle Solaris Studio build error.

"../../src/glsl/ir_constant_expression.cpp", line 1398: Error: The function "isnormal" must have a prototype.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>

---

 src/glsl/ir_constant_expression.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 12641e5..0efd1d5 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -45,6 +45,12 @@ static int isnormal(double x)
 {
    return _fpclass(x) == _FPCLASS_NN || _fpclass(x) == _FPCLASS_PN;
 }
+#elif defined(__SUNPRO_CC)
+#include <ieeefp.h>
+static int isnormal(double x)
+{
+   return fpclass(x) == FP_NORMAL;
+}
 #endif
 
 #if defined(_MSC_VER)




More information about the mesa-commit mailing list