OSDN Git Service

mesa: fpclassify is available on OpenSolaris.
authorVinson Lee <vlee@vmware.com>
Wed, 18 Aug 2010 21:36:08 +0000 (14:36 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 18 Aug 2010 21:36:08 +0000 (14:36 -0700)
There is no explicit predefined macro to distinguish between OpenSolaris
and Solaris. This patch assumes that the difference is in the compilers.
OpenSolaris uses GCC and not the Sun Studio compiler. Assume that the
availability of fpclassify is due to GCC.

This patch was not tested on Solaris. It would break the build on
Solaris with GCC if GCC on Solaris does not have fpclassify.

src/mesa/main/querymatrix.c

index 32aaa79..36236eb 100644 (file)
@@ -72,7 +72,8 @@ fpclassify(double x)
 
 #elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
      defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
-     (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__)
+     (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \
+     (defined(__sun) && defined(__GNUC__))
 
 /* fpclassify is available. */