diff -r 000000000000 -r 6474c204b198 memory/jemalloc/src/include/msvc_compat/strings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/memory/jemalloc/src/include/msvc_compat/strings.h Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,23 @@ +#ifndef strings_h +#define strings_h + +/* MSVC doesn't define ffs/ffsl. This dummy strings.h header is provided + * for both */ +#include +#pragma intrinsic(_BitScanForward) +static __forceinline int ffsl(long x) +{ + unsigned long i; + + if (_BitScanForward(&i, x)) + return (i + 1); + return (0); +} + +static __forceinline int ffs(int x) +{ + + return (ffsl(x)); +} + +#endif