aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/bitscan.c4
-rw-r--r--src/util/bitscan.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/util/bitscan.c b/src/util/bitscan.c
index ceca59eba98..7858291bf63 100644
--- a/src/util/bitscan.c
+++ b/src/util/bitscan.c
@@ -32,7 +32,7 @@
#elif defined(_MSC_VER) && (_M_IX86 || _M_ARM || _M_AMD64 || _M_IA64)
#else
int
-ffs(unsigned i)
+ffs(int i)
{
int bit = 0;
if (!i)
@@ -63,7 +63,7 @@ ffs(unsigned i)
#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM || _M_IA64)
#else
int
-ffsll(uint64_t val)
+ffsll(long long int val)
{
int bit;
diff --git a/src/util/bitscan.h b/src/util/bitscan.h
index 32e027165cc..7a605e0370f 100644
--- a/src/util/bitscan.h
+++ b/src/util/bitscan.h
@@ -52,7 +52,7 @@ extern "C" {
#define ffs __builtin_ffs
#elif defined(_MSC_VER) && (_M_IX86 || _M_ARM || _M_AMD64 || _M_IA64)
static inline
-int ffs(unsigned i)
+int ffs(int i)
{
unsigned long index;
if (_BitScanForward(&index, i))
@@ -62,14 +62,14 @@ int ffs(unsigned i)
}
#else
extern
-int ffs(unsigned i);
+int ffs(int i);
#endif
#ifdef HAVE___BUILTIN_FFSLL
#define ffsll __builtin_ffsll
#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM || _M_IA64)
static inline int
-ffsll(uint64_t i)
+ffsll(long long int i)
{
unsigned long index;
if (_BitScanForward64(&index, i))
@@ -79,7 +79,7 @@ ffsll(uint64_t i)
}
#else
extern int
-ffsll(uint64_t val);
+ffsll(long long int val);
#endif