Avoid fighting with Solaris headers over isnormal()
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Mon, 16 Feb 2015 00:16:15 +0000 (16:16 -0800)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Wed, 18 Feb 2015 02:16:33 +0000 (18:16 -0800)
When compiling in C99 or C++11 modes, Solaris defines isnormal() as
a macro via <math.h>, which causes the function definition to become
too mangled to compile.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glsl/ir_constant_expression.cpp

index 1e8b3a3ccedbd609038743892fa804259ee96373..864cb80de74561d95701c0257d69dc1e13d9a195 100644 (file)
@@ -44,7 +44,7 @@ static int isnormal(double x)
 {
    return _fpclass(x) == _FPCLASS_NN || _fpclass(x) == _FPCLASS_PN;
 }
-#elif defined(__SUNPRO_CC)
+#elif defined(__SUNPRO_CC) && !defined(isnormal)
 #include <ieeefp.h>
 static int isnormal(double x)
 {