1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
Commit graph

1896 commits

Author SHA1 Message Date
Lasse Collin
b406828a6d liblzma: Tweak #if condition in memcmplen.h.
Maybe ICC always #defines _MSC_VER on Windows but now
it's very clear which code will get used.
2023-07-18 14:03:08 +03:00
Lasse Collin
ef4a07ad94 liblzma: Omit unnecessary parenthesis in a preprocessor directive. 2023-07-18 14:03:08 +03:00
Jia Tan
64ee0caaea 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.
2023-07-18 14:03:08 +03:00
Jia Tan
ba17705764 Docs: Add a new section to INSTALL for Tests.
The new Tests section describes basic information about the tests, how
to run them, and important details when cross compiling. We have had a
few questions about how to compile the tests without running them, so
hopefully this information will help others with the same question in the
future.

Fixes: https://github.com/tukaani-project/xz/issues/54
2023-07-18 13:28:51 +03:00
Jia Tan
0745b900fa Docs: Update README.
This adds an entry to "Other implementations of the .xz format" for
XZ for Java.
2023-07-18 13:28:51 +03:00
Jia Tan
c972d44103 xz: Fix typo in man page.
The Memory limit information section described three output
columns when it actually has six. This was reworded to
"multiple" to make it more future proof.
2023-07-18 13:27:46 +03:00
Jia Tan
6e21f1b4e2 Tests: Improve feature testing for skipping.
Fixed a bug where test_compress_* would all fail if arm64 or armthumb
filters were enabled for compression but arm was disabled. Since the
grep tests only checked for "define HAVE_ENCODER_ARM", this would match
on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB.

Now the config.h feature test requires " 1" at the end to prevent the
prefix problem. have_feature() was also updated for this even though
there were known current bugs affecting it. This is just in case future
features have a similar prefix problem.
2023-07-18 13:26:48 +03:00
Jia Tan
26c37d290c Translations: Update the Chinese (traditional) translation. 2023-07-18 13:26:48 +03:00
Jia Tan
2ec65181e2 Translations: Update the Vietnamese translation. 2023-07-18 13:26:48 +03:00
Jia Tan
c44c7e7590 Tests: Fix memory leaks in test_index.
Several tests were missing calls to lzma_index_end() to clean up the
lzma_index structs. The memory leaks were discovered by using
-fsanitize=address with GCC.
2023-07-18 13:26:48 +03:00
Jia Tan
b9499c94fc Tests: Fix memory leaks in test_block_header.
test_block_header was not properly freeing the filter options between
calls to lzma_block_header_decode(). The memory leaks were discovered by
using -fsanitize=address with GCC.
2023-07-18 13:26:48 +03:00
Jia Tan
1155471651 liblzma: Prevent uninitialzed warning in mt stream encoder.
This change only impacts the compiler warning since it was impossible
for the wait_abs struct in stream_encode_mt() to be used before it was
initialized since mythread_condtime_set() will always be called before
mythread_cond_timedwait().

Since the mythread.h code is different between the POSIX and
Windows versions, this warning was only present on Windows builds.

Thanks to Arthur S for reporting the warning and providing an initial
patch.
2023-07-18 13:20:16 +03:00
Jia Tan
62dd1c9bf0 Update THANKS. 2023-07-18 13:03:12 +03:00
Benjamin Buch
d04eb78ab3 CMake: Protects against double find_package
Boost iostream uses `find_package` in quiet mode and then again uses
`find_package` with required. This second call triggers a
`add_library cannot create imported target "LibLZMA::LibLZMA"
because another target with the same name already exists.`

This can simply be fixed by skipping the alias part on secondary
`find_package` runs.
2023-07-18 13:02:02 +03:00
Jia Tan
12ea1fb297 Translations: Update the Esperanto translation. 2023-07-18 12:59:10 +03:00
Jia Tan
a4d45c07c1 Translations: Update the Croatian translation. 2023-07-18 12:59:10 +03:00
Jia Tan
f51b7bcea6 Translations: Update the Chinese (simplified) translation. 2023-07-18 12:59:10 +03:00
Jia Tan
d5b81c19a7 Translations: Update German translation of man pages. 2023-07-18 12:59:10 +03:00
Jia Tan
36860a3e30 Translations: Update the German translation. 2023-07-18 12:59:10 +03:00
Jia Tan
f05641ef0d Translations: Update the Croatian translation. 2023-07-18 12:59:10 +03:00
Jia Tan
b852f6f11d Translations: Update Korean translation of man pages. 2023-07-18 12:59:10 +03:00
Jia Tan
fdcb78fb6f Translations: Update the Korean translation. 2023-07-18 12:59:10 +03:00
Jia Tan
9e39cebe3c Translations: Update the Spanish translation. 2023-07-18 12:59:10 +03:00
Jia Tan
7a578d1d82 Translations: Update the Romanian translation. 2023-07-18 12:59:10 +03:00
Jia Tan
362320fea5 Translations: Update Romanian translation of man pages. 2023-07-18 12:59:10 +03:00
Jia Tan
29c5a870be Translations: Update Ukrainian translation of man pages. 2023-07-18 12:59:10 +03:00
Jia Tan
5ee5757277 Translations: Update the Ukrainian translation. 2023-07-18 12:59:10 +03:00
Jia Tan
dfc257bdb2 Translations: Update the Polish translation. 2023-07-18 12:59:10 +03:00
Jia Tan
f6df4c4ab7 Translations: Update the Swedish translation. 2023-07-18 12:59:10 +03:00
Jia Tan
25da22e052 Translations: Update the Esperanto translation. 2023-07-18 12:59:09 +03:00
Jia Tan
4f57a9c991 liblzma: Adds lzma_nothrow to MicroLZMA API functions.
None of the liblzma functions may throw an exception, so this
attribute should be applied to all liblzma API functions.
2023-07-18 12:48:53 +03:00
Jia Tan
238b4e5458 Translations: Update the Croatian translation. 2023-05-04 22:23:01 +08:00
Jia Tan
0cee63c3c6 Bump version and soname for 5.4.3. 2023-05-04 22:02:29 +08:00
Jia Tan
01f937ea9a Add NEWS for 5.4.3. 2023-05-04 22:02:29 +08:00
Lasse Collin
e9b9ea9531 tuklib_integer.h: Fix a recent copypaste error in Clang detection.
Wrong line was changed in 7062348bf3.
Also, this has >= instead of == since ints larger than 32 bits would
work too even if not relevant in practice.
2023-05-03 22:55:54 +03:00
Jia Tan
be6e39a862 Update THANKS. 2023-04-25 20:19:37 +08:00
Jia Tan
9e343a46cf Windows: Include <intrin.h> when needed.
Legacy Windows did not need to #include <intrin.h> to use the MSVC
intrinsics. Newer versions likely just issue a warning, but the MSVC
documentation says to include the header file for the intrinsics we use.

GCC and Clang can "pretend" to be MSVC on Windows, so extra checks are
needed in tuklib_integer.h to only include <intrin.h> when it will is
actually needed.
2023-04-25 20:19:32 +08:00
Jia Tan
12321a9390 tuklib_integer: Use __builtin_clz() with Clang.
Clang has support for __builtin_clz(), but previously Clang would
fallback to either the MSVC intrinsic or the regular C code. This was
discovered due to a bug where a new version of Clang required the
<intrin.h> header file in order to use the MSVC intrinsics.

Thanks to Anton Kochkov for notifying us about the bug.
2023-04-25 20:19:28 +08:00
Lasse Collin
d1f0e01c39 liblzma: Update project maintainers in lzma.h.
AUTHORS was updated earlier, lzma.h was simply forgotten.
2023-04-25 20:19:21 +08:00
Jia Tan
8204c5d130 liblzma: Cleans up old commented out code. 2023-04-25 20:19:10 +08:00
Jia Tan
32980d1562 CMake: Update liblzma-config.cmake generation.
Now that the threading is configurable, the liblzma CMake package only
needs the threading library when using POSIX threads.
2023-04-25 20:18:55 +08:00
Jia Tan
023907faa9 CMake: Allows setting thread method.
The thread method is now configurable for the CMake build. It matches
the Autotools build by allowing ON (pick the best threading method),
OFF (no threading), posix, win95, and vista. If both Windows and
posix threading are both available, then ON will choose Windows
threading. Windows threading will also not use:

target_link_libraries(liblzma Threads::Threads)

since on systems like MinGW-w64 it would link the posix threads
without purpose.
2023-04-25 20:18:45 +08:00
Jia Tan
ba176d77cb CMake: Only build xzdec if decoders are enabled. 2023-04-25 20:18:31 +08:00
Jia Tan
c99d697df8 Build: Removes redundant check for LZMA1 filter support. 2023-04-25 20:18:18 +08:00
Lasse Collin
54a2fd8c85 CMake: Bump maximum policy version to 3.26.
It adds only one new policy related to FOLDERS which we don't use.
This makes it clear that the code is compatible with the policies
up to 3.26.
2023-04-25 20:18:08 +08:00
Jia Tan
622d0fdc02 CMake: Conditionally build xz list.* files if decoders are enabled. 2023-04-25 20:18:00 +08:00
Jia Tan
3e2dc523c5 CMake: Allow configuring features as cache variables.
This allows users to change the features they build either in
CMakeCache.txt or by using a CMake GUI. The sources built for
liblzma are affected by this too, so only the necessary files
will be compiled.
2023-04-25 20:17:49 +08:00
Lasse Collin
0c053f9733 Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69.
It's obsolete in Autoconf >= 2.70 and just an alias for AC_PROG_CC
but Autoconf 2.69 requires AC_PROG_CC_C99 to get a C99 compiler.
2023-03-21 14:14:35 +02:00
Lasse Collin
915d4f6058 Build: configure.ac: Use AS_IF and AS_CASE where required.
This makes no functional difference in the generated configure
(at least with the Autotools versions I have installed) but this
change might prevent future bugs like the one that was just
fixed in the commit 5a5bd7f871.
2023-03-21 14:14:35 +02:00
Lasse Collin
b848c03958 Update THANKS. 2023-03-21 14:14:35 +02:00