Commit Graph

1889 Commits

Author SHA1 Message Date
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
Lasse Collin c775ba1602 Build: Fix --disable-threads breaking the building of shared libs.
This is broken in the releases 5.2.6 to 5.4.2. A workaround
for these releases is to pass EGREP='grep -E' as an argument
to configure in addition to --disable-threads.

The problem appeared when m4/ax_pthread.m4 was updated in
the commit 6629ed929c which
introduced the use of AC_EGREP_CPP. AC_EGREP_CPP calls
AC_REQUIRE([AC_PROG_EGREP]) to set the shell variable EGREP
but this was only executed if POSIX threads were enabled.
Libtool code also has AC_REQUIRE([AC_PROG_EGREP]) but Autoconf
omits it as AC_PROG_EGREP has already been required earlier.
Thus, if not using POSIX threads, the shell variable EGREP
would be undefined in the Libtool code in configure.

ax_pthread.m4 is fine. The bug was in configure.ac which called
AX_PTHREAD conditionally in an incorrect way. Using AS_CASE
ensures that all AC_REQUIREs get always run.

Thanks to Frank Busse for reporting the bug.
Fixes: https://github.com/tukaani-project/xz/issues/45
2023-03-21 14:14:35 +02:00
Lasse Collin 0673c9ec98 liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h.
Thanks to Christian Hesse for reporting the issue.
Fixes: https://github.com/tukaani-project/xz/issues/44
2023-03-19 22:46:26 +02:00
Jia Tan 6ca8046ecb Bump version and soname for 5.4.2. 2023-03-18 23:22:06 +08:00
Jia Tan ce4f246600 Add NEWS for 5.4.2. 2023-03-18 22:24:08 +08:00
Lasse Collin 3634fe3307 Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3. 2023-03-18 22:02:45 +08:00
Lasse Collin 97679d25ce Change a few HTTP URLs to HTTPS.
The xz man page timestamp was intentionally left unchanged.
2023-03-18 22:02:40 +08:00
Jia Tan 01a67e89a5 CMake: Fix typo in a comment. 2023-03-18 00:41:09 +08:00