mirror of
https://github.com/lz4/lz4.git
synced 2026-10-24 01:48:57 +03:00
Prototype, not intended for a PR as is. - lz4frame.c (Win32) : _WIN32_WINNT raised to 0x0600 (condition variables) when lower, instead of only when undefined : <_mingw.h>, included by standard headers, defines it to 0x502 on older mingw-w64, where CONDITION_VARIABLE was then undeclared. A higher user-defined value is preserved. - lib/Makefile : the pthread probe runs within a private temporary directory (mktemp -d), instead of a fixed have_pthread.c in the source tree : concurrent invocations no longer collide (35 / 320 concurrent probes wrongly reported no threads, producing liblz4.so without multi-threading), and read-only source trees are supported. The build message mentions "(threads not detected)" when the probe fails. - make install, as zstd : installs the libraries already built (lib, lib-mt, lib-nomt), and only builds them, with current settings, when absent : `make lib-mt && make install` now installs the multi-threaded libraries. liblz4.pc declares -pthread (Libs.private) when the installed liblz4.a requires it, deduced from its symbols (nm) ; when they can't be listed, whenever threads are available. Root Makefile : install is ordered after lib goals of the same command line (make -j all install, make -j lib-mt install), instead of always rebuilding lib. - lib/README.md documents it. Validated : full tests MT / no-MT, ASAN+UBSAN, TSAN, make test, wine, build policies, Windows DLL through lib/Makefile (imports CreateThread), mingw with _WIN32_WINNT=0x0502, 10 install scenarios + test_install.sh, concurrent and read-only probes.
8.5 KiB
8.5 KiB