On Fri, Feb 06, 2015 at 08:11:51AM -0700, Brian Paul wrote: > On 02/06/2015 04:38 AM, Jonathan Gray wrote: > >OpenBSD has ffs in libc but does not have ffsll so use the compiler > >builtin. PIPE_OS_BSD isn't suitable here as FreeBSD has ffsll in libc. > > > >Signed-off-by: Jonathan Gray <j...@jsg.id.au> > >--- > > src/gallium/auxiliary/util/u_math.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > >diff --git a/src/gallium/auxiliary/util/u_math.h > >b/src/gallium/auxiliary/util/u_math.h > >index 5db5b66..ec282f3 100644 > >--- a/src/gallium/auxiliary/util/u_math.h > >+++ b/src/gallium/auxiliary/util/u_math.h > >@@ -531,6 +531,8 @@ unsigned ffs( unsigned u ) > > #elif defined(__MINGW32__) || defined(PIPE_OS_ANDROID) > > #define ffs __builtin_ffs > > #define ffsll __builtin_ffsll > >+#elif defined(__OpenBSD__) > >+#define ffsll __builtin_ffsll > > #endif > > > > #endif /* FFS_DEFINED */ > > > > Or maybe > > #elif defined(PIPE_OS_OPENBSD) && defined(PIPE_CC_GCC) > > Assuming you're talking about gcc.
Well clang tends to have the same builtins as gcc. Though clang defines __GNUC__ and it seems clang would be picked up as PIPE_CC_GCC currently and there is no PIPE_CC_CLANG. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev