---
 src/gallium/auxiliary/util/u_math.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_math.h 
b/src/gallium/auxiliary/util/u_math.h
index 56bd185..5814421 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -391,6 +391,18 @@ unsigned ffs( unsigned u )
 
 #endif /* FFS_DEFINED */
 
+#ifndef FFSL_DEFINED
+#define FFSL_DEFINED 1
+
+#ifdef _MSC_VER
+/* With MSVC, int and long are the same type even on 64-bit */
+#define ffsl ffs
+#else
+#define ffsl(x) ((sizeof(long) == sizeof(int)) ? ffs(x) : ffsll(x))
+#endif
+
+#endif /* FFSL_DEFINED */
+
 /**
  * Find first bit set in long long.  Least significant bit is 1.
  * Return 0 if no bits set.
-- 
2.4.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to