]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: Prevent warning for MSYS2 Windows build.
authorJia Tan <jiat0218@gmail.com>
Wed, 28 Jun 2023 12:22:38 +0000 (20:22 +0800)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 7 May 2024 12:28:35 +0000 (15:28 +0300)
commiteede1df4afdbed8e5dde2ebbf699f7e23f0dd594
tree969ce96048ce42d858278a7338045d03654bd07e
parent5f9bf810441d37a1ab3626a67c9369ea27243915
liblzma: Prevent warning for MSYS2 Windows build.

In lzma_memcmplen(), the <intrin.h> header file is only included if
_MSC_VER and _M_X64 are both defined but _BitScanForward64() was
previously used if _M_X64 was defined. GCC for MSYS2 defines _M_X64 but
not _MSC_VER so _BitScanForward64() was used without including
<intrin.h>.

Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as
expected.

(cherry picked from commit 64ee0caaea06654b28afaee850fb187a11bf9cb2)
src/liblzma/common/memcmplen.h