gallium/util: Add ULL suffix to large constants.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 2 Jul 2012 11:08:01 +0000 (12:08 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 2 Jul 2012 11:12:42 +0000 (12:12 +0100)
As suggested by Andy Furniss: it looks like some old gcc versions
require it.

src/gallium/auxiliary/util/u_math.h

index 724b136b57f798bd65025401fee49fef8891507a..f35c35ffe47c704fe83fa740780d22613e424a2a 100644 (file)
@@ -382,7 +382,7 @@ util_is_double_inf_or_nan(double x)
 {
    union di tmp;
    tmp.d = x;
-   return (tmp.ui & 0x7ff0000000000000) == 0x7ff0000000000000;
+   return (tmp.ui & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL;
 }
 
 
@@ -391,7 +391,7 @@ util_is_double_nan(double x)
 {
    union di tmp;
    tmp.d = x;
-   return (tmp.ui & 0x7fffffffffffffff) > 0x7ff0000000000000;
+   return (tmp.ui & 0x7fffffffffffffffULL) > 0x7ff0000000000000ULL;
 }
 
 
@@ -400,7 +400,7 @@ util_double_inf_sign(double x)
 {
    union di tmp;
    tmp.d = x;
-   if ((tmp.ui & 0x7fffffffffffffff) != 0x7ff0000000000000) {
+   if ((tmp.ui & 0x7fffffffffffffffULL) != 0x7ff0000000000000ULL) {
       return 0;
    }