glsl: Define isnormal for Oracle Solaris Studio.
authorVinson Lee <vlee@freedesktop.org>
Fri, 4 Oct 2013 18:24:03 +0000 (11:24 -0700)
committerVinson Lee <vlee@freedesktop.org>
Fri, 4 Oct 2013 22:37:33 +0000 (15:37 -0700)
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@freedesktop.org>
src/glsl/ir_constant_expression.cpp

index 12641e5df10936e6e23364f0c2699bd20b4bcd2a..0efd1d5b3af9ad112cc13e65ea0f561c53724df0 100644 (file)
@@ -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)