|
@ -171,9 +171,10 @@ extern int zsinflate(void *out, int cap, const void *in, int size); |
|
|
|
|
|
|
|
|
static int |
|
|
static int |
|
|
sinfl_bsr(unsigned n) { |
|
|
sinfl_bsr(unsigned n) { |
|
|
#if defined(_MSC_VER) && !defined(__clang__) |
|
|
|
|
|
_BitScanReverse(&n, n); |
|
|
|
|
|
return n; |
|
|
|
|
|
|
|
|
#ifdef _MSC_VER |
|
|
|
|
|
unsigned long r = 0; |
|
|
|
|
|
_BitScanReverse(&r, n); |
|
|
|
|
|
return int(r); |
|
|
#else // defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) |
|
|
#else // defined(__GNUC__) || defined(__clang__) || defined(__TINYC__) |
|
|
return 31 - __builtin_clz(n); |
|
|
return 31 - __builtin_clz(n); |
|
|
#endif |
|
|
#endif |
|
|