On 11.01.2012 14:50, Brian Paul wrote:
Call ffs() and ffsll() everywhere. Define our own ffs(), ffsll() functions when the platform doesn't have them. --- src/mesa/main/imports.c | 11 ++++++-----
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 2469e42..b3d56db 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -458,7 +458,7 @@ _mesa_inv_sqrtf(float n) * Find the first bit set in a word. */ int -_mesa_ffs(int32_t i) +ffs(int i) { #if (defined(_WIN32) ) || defined(__IBMC__) || defined(__IBMCPP__)
This seems like a bad idea... infinite recursion. ffs calls itself if it's non-gnuc and !WIN && !IBM. This is why I changed everything to call _mesa_ffs. Otherwise it does seem to work ok under Haiku as we don't fall into that trap. Thanks! -- Alex _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev