nv50/ra: `isinf()` is in namespace `std` since C++11.
authorPierre Moreau <pierre.morrow@free.fr>
Fri, 18 Mar 2016 00:17:31 +0000 (01:17 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Wed, 13 Apr 2016 06:41:13 +0000 (07:41 +0100)
This fixes a compile error while building Nouveau with C++11 enabled (and
glibc >= 2.23). This happens if SWR is enabled, as it forces C++11.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
https://bugs.freedesktop.org/show_bug.cgi?id=94907

src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

index 500ab8915de7f3f222ace12c2fc4b096253fae50..1b595aec364c9e458592b1b1a12ae49e893fe0b8 100644 (file)
@@ -1327,7 +1327,11 @@ GCRA::simplify()
                bestScore = score;
             }
          }
+#if __cplusplus >= 201103L
+         if (std::isinf(bestScore)) {
+#else
          if (isinf(bestScore)) {
+#endif
             ERROR("no viable spill candidates left\n");
             break;
          }