Skip to content

Commit

Permalink
Fix building on MSVC
Browse files Browse the repository at this point in the history
Revert change to __builtin_ctzl function made in cloudflare@c9479d1
  • Loading branch information
qbnu authored and vkrasnov committed Mar 27, 2023
1 parent 4e4e4c4 commit 0f1ac81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deflate.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ extern const uint8_t ZLIB_INTERNAL _dist_code[];
int __inline __builtin_ctzl(unsigned long mask)
{
unsigned long index ;

return _BitScanForward(&index, mask) == 0 ? 32 : ((int)index) ;
}
#else
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
Expand Down

0 comments on commit 0f1ac81

Please sign in to comment.