diff options
Diffstat (limited to 'sal/rtl/math.cxx')
-rw-r--r-- | sal/rtl/math.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index 099cd3d60578..981009aa036c 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -19,7 +19,6 @@ #include <rtl/math.h> -#include <config_global.h> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <rtl/alloc.h> @@ -43,10 +42,6 @@ #include <dtoa.h> -#if !HAVE_GCC_BUILTIN_FFS && !defined _WIN32 - #include <strings.h> -#endif - static int const n10Count = 16; static double const n10s[2][n10Count] = { { 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, @@ -183,14 +178,12 @@ bool isRepresentableInteger(double fAbsValue) // Returns 1-based index of least significant bit in a number, or zero if number is zero int findFirstSetBit(unsigned n) { -#if HAVE_GCC_BUILTIN_FFS - return __builtin_ffs(n); -#elif defined _WIN32 +#if defined _WIN32 unsigned long pos; unsigned char bNonZero = _BitScanForward(&pos, n); return (bNonZero == 0) ? 0 : pos + 1; #else - return ffs(n); + return __builtin_ffs(n); #endif } |