aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-11DOS: Update instructions in dos/INSTALL.txt.Lasse Collin1-30/+29
2020-03-11DOS: Update config.h.Lasse Collin1-0/+8
The added defines assume GCC >= 4.8.
2020-03-11Translations: Add hu, zh_CN, and zh_TW.Lasse Collin4-0/+2907
I made a few white space changes to these without getting them approved by the translation teams. (I tried to contact the hu and zh_TW teams but didn't succeed. I didn't contact the zh_CN team.)
2020-03-11Translations: Update vi.po to match the file from the TP.Lasse Collin1-228/+179
The translated strings haven't been updated but word wrapping is different.
2020-03-11Translations: Add fi and pt_BR, and update de, fr, it, and pl.Lasse Collin7-746/+2697
The German translation isn't identical to the file in the Translation Project but the changes (white space changes only) were approved by the translator Mario Blättermann.
2020-03-11Update THANKS.Lasse Collin1-0/+1
2020-03-11Build: Add very limited experimental CMake support.Lasse Collin7-0/+1174
This version matches CMake files in the master branch (commit 265daa873c0d871f5f23f9b56e133a6f20045a0a) except that this omits two source files that aren't in v5.2 and in the beginning of CMakeLists.txt the first paragraph in the comment is slightly different to point out possible issues in building shared liblzma.
2020-03-11Build: Add support for --no-po4a option to autogen.sh.Lasse Collin1-1/+10
Normally, if po4a isn't available, autogen.sh will return with non-zero exit status. The option --no-po4a can be useful when one knows that po4a isn't available but wants autogen.sh to still return with zero exit status.
2020-03-11Update m4/.gitignore.Lasse Collin1-0/+1
2020-03-11liblzma: Remove unneeded <sys/types.h> from fastpos_tablegen.c.Lasse Collin1-1/+0
This file only generates fastpos_table.c. It isn't built as a part of liblzma.
2020-03-11Use defined(__GNUC__) before __GNUC__ in preprocessor lines.Lasse Collin2-3/+5
This should silence the equivalent of -Wundef in compilers that don't define __GNUC__.
2020-03-11liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA.Lasse Collin1-6/+10
This gives a tiny encoder speed improvement. This could have been done in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but it was forgotten.
2020-03-11Build: Add visibility.m4 from gnulib.Lasse Collin2-1/+77
Appears that this file used to get included as a side effect of gettext. After the change to gettext version requirements this file no longer got copied to the package and so the build was broken.
2020-03-11xz: Silence a warning when sig_atomic_t is long int.Lasse Collin1-1/+1
It can be true at least on z/OS.
2020-03-11xz: Avoid unneeded access of a volatile variable.Lasse Collin1-1/+1
2020-03-11tuklib_integer.m4: Optimize the check order.Lasse Collin1-27/+29
The __builtin byteswapping is the preferred one so check for it first.
2020-03-11tuklib_exit: Add missing header.Lasse Collin1-0/+1
strerror() needs <string.h> which happened to be included via tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H was defined. This wasn't tested without config.h before so it had worked fine.
2020-03-11sysdefs.h: Omit the conditionals around string.h and limits.h.Lasse Collin1-6/+2
string.h is used unconditionally elsewhere in the project and configure has always stopped if limits.h is missing, so these headers must have been always available even on the weirdest systems.
2020-03-11Build: Bump Autoconf and Libtool version requirements.Lasse Collin1-2/+2
There is no specific reason for this other than blocking the most ancient versions. These are still old: Autoconf 2.69 (2012) Automake 1.12 (2012) gettext 0.19.6 (2015) Libtool 2.4 (2010)
2020-03-11Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6.Lasse Collin1-1/+5
This bumps the version requirement from 0.19 (from 2014) to 0.19.6 (2015). Using only the old AM_GNU_GETTEXT_VERSION results in old gettext infrastructure being placed in the package. By using both macros we get the latest gettext files while the other programs in the Autotools family can still see the old macro.
2020-03-11Translations: Add German translation of the man pages.Lasse Collin2-1/+5533
Thanks to Mario Blättermann.
2020-03-11Build: Add support for translated man pages using po4a.Lasse Collin8-45/+197
The dependency on po4a is optional. It's never required to install the translated man pages when xz is built from a release tarball. If po4a is missing when building from xz.git, the translated man pages won't be generated but otherwise the build will work normally. The translations are only updated automatically by autogen.sh and by "make mydist". This makes it easy to keep po4a as an optional dependency and ensures that I won't forget to put updated translations to a release tarball. The translated man pages aren't installed if --disable-nls is used. The installation of translated man pages abuses Automake internals by calling "install-man" with redefined dist_man_MANS and man_MANS. This makes the hairy script code slightly less hairy. If it breaks some day, this code needs to be fixed; don't blame Automake developers. Also, this adds more quotes to the existing shell script code in the Makefile.am "-hook"s.
2020-02-06Update THANKS (sync with the master branch).Lasse Collin1-0/+3
2020-02-06Update tests/.gitignore.Lasse Collin1-0/+4
2020-02-06Update m4/.gitignore.Lasse Collin1-0/+1
2020-02-06Update THANKS.Lasse Collin1-0/+1
2020-02-05xz: Comment out annoying sandboxing messages.Lasse Collin1-3/+7
2020-02-05Build: Workaround a POSIX shell detection problem on Solaris.Lasse Collin1-0/+10
I don't know if the problem is in gnulib's gl_POSIX_SHELL macro or if xzgrep does something that isn't in POSIX. The workaround adds a special case for Solaris: if /usr/xpg4/bin/sh exists and gl_cv_posix_shell wasn't overriden on the configure command line, use that shell for xzgrep and other scripts. That shell is known to work and exists on most Solaris systems.
2020-02-05Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin1-119/+279
2020-02-05xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz.Lasse Collin2-2/+51
See the code comment for reasoning. It's far from perfect but hopefully good enough for certain cases while hopefully doing nothing bad in other situations. At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference on how xz scales down the number of threads. The limit has to be a few MiB below 4096 MiB because otherwise things like "xz --lzma2=dict=500MiB" won't scale down the dict size enough and xz cannot allocate enough memory. With "ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had to be no more than 4085 MiB. Some safety margin is good though. This is hack but it should be useful when running 32-bit xz on a 64-bit kernel that gives full 4 GiB address space to xz. Hopefully this is enough to solve this: https://bugzilla.redhat.com/show_bug.cgi?id=1196786 FreeBSD has a patch that limits the result in tuklib_physmem() to SIZE_MAX on 32-bit systems. While I think it's not the way to do it, the results on --memlimit-compress have been good. This commit should achieve practically identical results for compression while leaving decompression and tuklib_physmem() and thus lzma_physmem() unaffected.
2020-02-05xz: Set the --flush-timeout deadline when the first input byte arrives.Lasse Collin3-7/+6
xz --flush-timeout=2000, old version: 1. xz is started. The next flush will happen after two seconds. 2. No input for one second. 3. A burst of a few kilobytes of input. 4. No input for one second. 5. Two seconds have passed and flushing starts. The first second counted towards the flush-timeout even though there was no pending data. This can cause flushing to occur more often than needed. xz --flush-timeout=2000, after this commit: 1. xz is started. 2. No input for one second. 3. A burst of a few kilobytes of input. The next flush will happen after two seconds counted from the time when the first bytes of the burst were read. 4. No input for one second. 5. No input for another second. 6. Two seconds have passed and flushing starts.
2020-02-05xz: Move flush_needed from mytime.h to file_pair struct in file_io.h.Lasse Collin5-9/+7
2020-02-05xz: coder.c: Make writing output a separate function.Lasse Collin1-13/+17
The same code sequence repeats so it's nicer as a separate function. Note that in one case there was no test for opt_mode != MODE_TEST, but that was only because that condition would always be true, so this commit doesn't change the behavior there.
2020-02-05xz: Fix semi-busy-waiting in xz --flush-timeout.Lasse Collin3-4/+19
When input blocked, xz --flush-timeout=1 would wake up every millisecond and initiate flushing which would have nothing to flush and thus would just waste CPU time. The fix disables the timeout when no input has been seen since the previous flush.
2020-02-05xz: Refactor io_read() a bit.Lasse Collin1-9/+8
2020-02-05xz: Update a comment in file_io.h.Lasse Collin1-1/+4
2020-02-05xz: Move the setting of flush_needed in file_io.c to a nicer location.Lasse Collin1-4/+2
2020-02-05xz: Enable Capsicum sandboxing by default if available.Lasse Collin2-10/+4
It has been enabled in FreeBSD for a while and reported to work fine. Thanks to Xin Li.
2019-12-31Rename unaligned_read32ne to read32ne, and similarly for the others.Lasse Collin15-62/+54
2019-12-31Rename read32ne to aligned_read32ne, and similarly for the others.Lasse Collin3-32/+32
Using the aligned methods requires more care to ensure that the address really is aligned, so it's nicer if the aligned methods are prefixed. The next commit will remove the unaligned_ prefix from the unaligned methods which in liblzma are used in more places than the aligned ones.
2019-12-31Revise tuklib_integer.h and .m4.Lasse Collin2-217/+314
Add a configure option --enable-unsafe-type-punning to get the old non-conforming memory access methods. It can be useful with old compilers or in some other less typical situations but shouldn't normally be used. Omit the packed struct trick for unaligned access. While it's best in some cases, this is simpler. If the memcpy trick doesn't work, one can request unsafe type punning from configure. Because CRC32/CRC64 code needs fast aligned reads, if no very safe way to do it is found, type punning is used as a fallback. This sucks but since it currently works in practice, it seems to be the least bad option. It's never needed with GCC >= 4.7 or Clang >= 3.6 since these support __builtin_assume_aligned and thus fast aligned access can be done with the memcpy trick. Other things: - Support GCC/Clang __builtin_bswapXX - Cleaner bswap fallback macros - Minor cleanups
2019-12-31Tests: Hopefully fix test_check.c to work on EBCDIC systems.Lasse Collin1-2/+7
Thanks to Daniel Richard G.
2019-12-31Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris.Lasse Collin6-8/+65
This adds a configure option --enable-path-for-scripts=PREFIX which defaults to empty except on Solaris it is /usr/xpg4/bin to make POSIX grep and others available. The Solaris case had been documented in INSTALL with a manual fix but it's better to do this automatically since it is needed on most Solaris systems anyway. Thanks to Daniel Richard G.
2019-12-31Fix comment typos in tuklib_mbstr* files.Lasse Collin3-3/+3
2019-12-31Add missing include to tuklib_mbstr_width.c.Lasse Collin1-0/+1
It didn't matter in XZ Utils because sysdefs.h includes string.h anyway.
2019-12-31liblzma: Fix a buggy comment.Lasse Collin1-1/+1
2019-12-31configure.ac: Fix a typo in a comment.Lasse Collin1-1/+1
2019-12-31Tests: Silence warnings from clang -Wassign-enum.Lasse Collin2-2/+3
Also changed 999 to 99 so it fits even if lzma_check happened to be 8 bits wide.
2019-12-31liblzma: Add a comment.Lasse Collin1-1/+1
2019-12-31liblzma: Silence clang -Wmissing-variable-declarations.Lasse Collin2-0/+6
2019-12-31xz: Silence a warning from clang -Wsign-conversion in main.c.Lasse Collin1-1/+1
2019-12-31liblzma: Remove incorrect uses of lzma_attribute((__unused__)).Lasse Collin3-6/+3
Caught by clang -Wused-but-marked-unused.
2019-12-31Tests: Silence a warning from -Wsign-conversion.Lasse Collin1-4/+4
2019-12-31xz: Fix an integer overflow with 32-bit off_t.Lasse Collin1-2/+9
Or any off_t which isn't very big (like signed 64 bit integer that most system have). A small off_t could overflow if the file being decompressed had long enough run of zero bytes, which would result in corrupt output.
2019-12-31Tests: Remove a duplicate branch from tests/tests.h.Lasse Collin1-7/+2
The duplication was introduced about eleven years ago and should have been cleaned up back then already. This was caught by -Wduplicated-branches.
2019-12-31tuklib_mbstr_width: Fix a warning from -Wsign-conversion.Lasse Collin1-1/+1
2019-12-31xz: Fix some of the warnings from -Wsign-conversion.Lasse Collin7-13/+14
2019-12-31tuklib_cpucores: Silence warnings from -Wsign-conversion.Lasse Collin1-5/+5
2019-12-31xzdec: Fix warnings from -Wsign-conversion.Lasse Collin1-1/+1
2019-12-31liblzma: Fix warnings from -Wsign-conversion.Lasse Collin11-29/+31
Also, more parentheses were added to the literal_subcoder macro in lzma_comon.h (better style but no functional change in the current usage).
2019-12-31tuklib_integer: Silence warnings from -Wsign-conversion.Lasse Collin1-3/+3
2019-12-31tuklib_integer: Fix usage of conv macros.Lasse Collin1-4/+8
Use a temporary variable instead of e.g. conv32le(unaligned_read32ne(buf)) because the macro can evaluate its argument multiple times.
2019-12-31Update THANKS.Lasse Collin1-0/+1
2019-12-31liblzma: Fix comments.Lasse Collin6-7/+7
Thanks to Bruce Stark.
2019-12-31liblzma: Fix one more unaligned read to use unaligned_read16ne().Lasse Collin1-1/+1
2019-12-31Update THANKS.Lasse Collin1-0/+1
2019-12-31liblzma: memcmplen: Use ctz32() from tuklib_integer.h.Lasse Collin1-9/+1
The same compiler-specific #ifdefs are already in tuklib_integer.h
2019-12-31tuklib_integer: Cleanup MSVC-specific code.Lasse Collin1-11/+9
2019-12-31liblzma: Use unaligned_readXXne functions instead of type punning.Lasse Collin2-7/+7
Now gcc -fsanitize=undefined should be clean. Thanks to Jeffrey Walton.
2019-12-31tuklib_integer: Improve unaligned memory access.Lasse Collin1-12/+168
Now memcpy() or GNU C packed structs for unaligned access instead of type punning. See the comment in this commit for details. Avoiding type punning with unaligned access is needed to silence gcc -fsanitize=undefined. New functions: unaliged_readXXne and unaligned_writeXXne where XX is 16, 32, or 64.
2019-07-13liblzma: Avoid memcpy(NULL, foo, 0) because it is undefined behavior.Lasse Collin3-5/+23
I should have always known this but I didn't. Here is an example as a reminder to myself: int mycopy(void *dest, void *src, size_t n) { memcpy(dest, src, n); return dest == NULL; } In the example, a compiler may assume that dest != NULL because passing NULL to memcpy() would be undefined behavior. Testing with GCC 8.2.1, mycopy(NULL, NULL, 0) returns 1 with -O0 and -O1. With -O2 the return value is 0 because the compiler infers that dest cannot be NULL because it was already used with memcpy() and thus the test for NULL gets optimized out. In liblzma, if a null-pointer was passed to memcpy(), there were no checks for NULL *after* the memcpy() call, so I cautiously suspect that it shouldn't have caused bad behavior in practice, but it's hard to be sure, and the problematic cases had to be fixed anyway. Thanks to Jeffrey Walton.
2019-07-13Update THANKS.Lasse Collin1-0/+1
2019-07-13xz: Update xz man page date.Lasse Collin1-1/+1
2019-07-13spellingAntoine Cœur19-21/+21
2019-07-13README: Update translation instructions.Lasse Collin1-19/+13
XZ Utils is now part of the Translation Project <https://translationproject.org/>.
2019-07-13Update THANKS.Lasse Collin1-0/+1
2019-07-13xz: Fix a crash in progress indicator when in passthru mode.Lasse Collin3-7/+25
"xz -dcfv not_an_xz_file" crashed (all four options are required to trigger it). It caused xz to call lzma_get_progress(&strm, ...) when no coder was initialized in strm. In this situation strm.internal is NULL which leads to a crash in lzma_get_progress(). The bug was introduced when xz started using lzma_get_progress() to get progress info for multi-threaded compression, so the bug is present in versions 5.1.3alpha and higher. Thanks to Filip Palian <Filip.Palian@pjwstk.edu.pl> for the bug report.
2019-07-13xz: Update man page timestamp.Lasse Collin1-1/+1
2019-07-13'have have' typosPavel Raiskup2-2/+2
2019-07-13xzless: Rename unused variables to silence static analysers.Lasse Collin1-1/+1
In this particular case I don't see this affecting readability of the code. Thanks to Pavel Raiskup.
2019-07-13liblzma: Remove an always-true condition from lzma_index_cat().Lasse Collin1-2/+2
This should help static analysis tools to see that newg isn't leaked. Thanks to Pavel Raiskup.
2019-07-13liblzma: Improve lzma_properties_decode() API documentation.Lasse Collin1-3/+4
2019-05-01Update THANKS.Lasse Collin1-0/+1
2019-05-01Windows: Update VS version in windows/vs2019/config.h.Lasse Collin1-1/+1
2019-05-01Windows: Upgrade solution itselfJulien Marrec1-2/+5
2019-05-01Windows: Upgrade solution with VS2019Julien Marrec2-14/+16
2019-05-01Windows: Duplicate windows/vs2017 before upgradingJulien Marrec4-0/+933
2019-05-01Windows/VS2017: Omit WindowsTargetPlatformVersion from project files.Lasse Collin3-2/+4
I understood that if a WTPV is specified, it's often wrong because different VS installations have different SDK version installed. Omitting the WTPV tag makes VS2017 default to Windows SDK 8.1 which often is also missing, so in any case people may need to specify the WTPV before building. But some day in the future a missing WTPV tag will start to default to the latest installed SDK which sounds reasonable: https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html Thanks to "dom".
2018-04-29Bump version and soname for 5.2.4.larhzu/v5.2.4Lasse Collin2-2/+2
2018-04-29extra/scanlzma: Fix compiler warnings.Lasse Collin1-1/+5
2018-04-29Add NEWS for 5.2.4.Lasse Collin1-0/+27
2018-03-28Update THANKS.Lasse Collin1-0/+2
2018-03-28nothrow: use noexcept for C++11 and newerBen Boeckel1-1/+5
In C++11, the `throw()` specifier is deprecated and `noexcept` is preffered instead.
2018-03-28liblzma: Remove incorrect #ifdef from range_common.h.Lasse Collin1-3/+1
In most cases it was harmless but it could affect some custom build systems. Thanks to Pippijn van Steenhoven.
2018-03-28Update THANKS.Lasse Collin1-0/+1
2018-03-28tuklib_integer: New Intel C compiler needs immintrin.h.Lasse Collin1-0/+11
Thanks to Melanie Blower (Intel) for the patch.
2018-03-28Update THANKS.Lasse Collin1-0/+1
2018-03-28Windows: Fix paths in VS project files.Lasse Collin4-36/+36
Some paths use slashes instead of backslashes as directory separators... now it should work (I tested VS2013 version).
2018-03-28Windows: Add project files for VS2017.Lasse Collin4-0/+935
These files match the v5.2 branch (no file info decoder).
2018-03-28Windows: Move VS2013 files into windows/vs2013 directory.Lasse Collin4-279/+279
2018-03-28Fix or hide warnings from GCC 7's -Wimplicit-fallthrough.Lasse Collin2-0/+8
2018-03-28Docs: Fix a typo in a comment in doc/examples/02_decompress.c.Alexey Tourbin1-1/+1
2018-03-28xz: Fix "xz --list --robot missing_or_bad_file.xz".Lasse Collin1-2/+6
It ended up printing an uninitialized char-array when trying to print the check names (column 7) on the "totals" line. This also changes the column 12 (minimum xz version) to 50000002 (xz 5.0.0) instead of 0 when there are no valid input files. Thanks to kidmin for the bug report.
2018-03-28Build: Omit pre-5.0.0 entries from the generated ChangeLog.Lasse Collin1-1/+2
It makes ChangeLog significantly smaller.
2018-03-28Update the Git repository URL to HTTPS in ChangeLog.Lasse Collin1-1/+1
2018-03-28Update the home page URLs to HTTPS.Lasse Collin10-14/+14
2017-03-30xz: Use POSIX_FADV_RANDOM for in "xz --list" mode.Lasse Collin1-2/+8
xz --list is random access so POSIX_FADV_SEQUENTIAL was clearly wrong.
2017-03-30liblzma: Fix lzma_memlimit_set(strm, 0).Lasse Collin3-3/+13
The 0 got treated specially in a buggy way and as a result the function did nothing. The API doc said that 0 was supposed to return LZMA_PROG_ERROR but it didn't. Now 0 is treated as if 1 had been specified. This is done because 0 is already used to indicate an error from lzma_memlimit_get() and lzma_memusage(). In addition, lzma_memlimit_set() no longer checks that the new limit is at least LZMA_MEMUSAGE_BASE. It's counter-productive for the Index decoder and was actually needed only by the auto decoder. Auto decoder has now been modified to check for LZMA_MEMUSAGE_BASE.
2017-03-30liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder.Lasse Collin4-16/+20
2017-03-30liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().Lasse Collin2-9/+13
It returned LZMA_PROG_ERROR, which was done to avoid zero as the limit (because it's a special value elsewhere), but using LZMA_PROG_ERROR is simply inconvenient and can cause bugs. The fix/workaround is to treat 0 as if it were 1 byte. It's effectively the same thing. The only weird consequence is that then lzma_memlimit_get() will return 1 even when 0 was specified as the limit. This fixes a very rare corner case in xz --list where a specific memory usage limit and a multi-stream file could print the error message "Internal error (bug)" instead of saying that the memory usage limit is too low.
2016-12-30Bump version and soname for 5.2.3.larhzu/v5.2.3Lasse Collin2-2/+2
2016-12-30Update NEWS for 5.2.3.Lasse Collin1-0/+39
2016-12-30xz: Fix the Capsicum rights on user_abort_pipe.Lasse Collin1-1/+5
2016-12-28Mention potential sandboxing bugs in INSTALL.Lasse Collin1-1/+4
2016-12-28liblzma: Avoid multiple definitions of lzma_coder structures.Lasse Collin35-423/+532
Only one definition was visible in a translation unit. It avoided a few casts and temp variables but seems that this hack doesn't work with link-time optimizations in compilers as it's not C99/C11 compliant. Fixes: http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
2016-12-26Document --enable-sandbox configure option in INSTALL.Lasse Collin1-0/+25
2016-12-26xz: Add support for sandboxing with Capsicum (disabled by default).Lasse Collin6-1/+151
In the v5.2 branch this feature is considered experimental and thus disabled by default. The sandboxing is used conditionally as described in main.c. This isn't optimal but it was much easier to implement than a full sandboxing solution and it still covers the most common use cases where xz is writing to standard output. This should have practically no effect on performance even with small files as fork() isn't needed. C and locale libraries can open files as needed. This has been fine in the past, but it's a problem with things like Capsicum. io_sandbox_enter() tries to ensure that various locale-related files have been loaded before cap_enter() is called, but it's possible that there are other similar problems which haven't been seen yet. Currently Capsicum is available on FreeBSD 10 and later and there is a port to Linux too. Thanks to Loganaden Velvindron for help.
2016-12-26Fix bugs and otherwise improve ax_check_capsicum.m4.Lasse Collin1-52/+51
AU_ALIAS was removed because the new version is incompatible with the old version. It no longer checks for <sys/capability.h> separately. It's enough to test for it as part of AC_CHECK_DECL. The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded. HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough. It no longer does a useless search for the Capsicum library if the header wasn't found. Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying the argument omitted the default action but the given action wasn't used instead. AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum support is found. Previously it was part of the default ACTION-IF-FOUND which a custom action would override. Now the default action only prepends ${CAPSICUM_LIB} to LIBS. The documentation was updated. Since there as no serial number, "#serial 2" was added.
2016-12-26Add m4/ax_check_capsicum.m4 for detecting Capsicum support.Lasse Collin1-0/+86
The file was loaded from this web page: https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4 Thanks to Loganaden Velvindron for pointing it out for me.
2016-12-26liblzma: Fix a memory leak in error path of lzma_index_dup().Lasse Collin1-9/+9
lzma_index_dup() calls index_dup_stream() which, in case of an error, calls index_stream_end() to free memory allocated by index_stream_init(). However, it illogically didn't actually free the memory. To make it logical, the tree handling code was modified a bit in addition to changing index_stream_end(). Thanks to Evan Nemerson for the bug report.
2016-12-26Update THANKS.Lasse Collin1-0/+1
2016-12-26tuklib_cpucores: Add support for sched_getaffinity().Lasse Collin2-1/+38
It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity() gives the number of cores available to the process instead of the total number of cores online. As a side effect, this commit fixes a bug on GNU/kFreeBSD where configure would detect the FreeBSD-specific cpuset_getaffinity() but it wouldn't actually work because on GNU/kFreeBSD it requires using -lfreebsd-glue when linking. Now the glibc-specific function will be used instead. Thanks to Sebastian Andrzej Siewior for the original patch and testing.
2016-06-30xz: Fix copying of timestamps on Windows.Lasse Collin2-1/+19
xz used to call utime() on Windows, but its result gets lost on close(). Using _futime() seems to work. Thanks to Martok for reporting the bug: http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html
2016-06-28xz: Silence warnings from -Wlogical-op.Lasse Collin1-2/+10
Thanks to Evan Nemerson.
2016-06-28Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am.Lasse Collin1-1/+1
Thanks to Christian Kujau.
2016-06-28Build: Bump GNU Gettext version requirement to 0.19.Lasse Collin1-1/+1
It silences a few warnings and most people probably have 0.19 even on stable distributions. Thanks to Christian Kujau.
2016-06-28liblzma: Disable external SHA-256 by default.Lasse Collin3-49/+79
This is the sane thing to do. The conflict with OpenSSL on some OSes and especially that the OS-provided versions can be significantly slower makes it clear that it was a mistake to have the external SHA-256 support enabled by default. Those who want it can now pass --enable-external-sha256 to configure. INSTALL was updated with notes about OSes where this can be a bad idea. The SHA-256 detection code in configure.ac had some bugs that could lead to a build failure in some situations. These were fixed, although it doesn't matter that much now that the external SHA-256 is disabled by default. MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init in libc instead of libutil. Support for the libutil version was removed.
2016-06-28Update THANKS.Lasse Collin1-0/+1
2016-06-28Build: Avoid SHA256_Init on FreeBSD and MINIX 3.Lasse Collin1-6/+21
On FreeBSD 10 and older, SHA256_Init from libmd conflicts with libcrypto from OpenSSL. The OpenSSL version has different sizeof(SHA256_CTX) and it can cause weird problems if wrong SHA256_Init gets used. Looking at the source, MINIX 3 seems to have a similar issue but I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too. NetBSD has SHA256_Init in libc and they had a similar problem, but they already fixed it in 2009. Thanks to Jim Wilcoxson for the bug report that helped in finding the problem.
2016-06-28tuklib_physmem: Hopefully silence a warning on Windows.Lasse Collin1-1/+2
2016-06-28Update THANKS.Lasse Collin1-0/+1
2016-06-28liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma.Lasse Collin1-0/+4
When optimizing, GCC can reorder code so that an uninitialized value gets used in a comparison, which makes Valgrind unhappy. It doesn't happen when compiled with -O0, which I tend to use when running Valgrind. Thanks to Rich Prohaska. I remember this being mentioned long ago by someone else but nothing was done back then.
2016-06-28liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c.Lasse Collin2-2/+2
It would be too annoying to update other build systems just because of this.
2016-06-28Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built.Lasse Collin1-0/+3
They all need decoder support and if that isn't available, there's no point trying to build them.
2016-06-28Build: Simplify $enable_{encoders,decoders} usage a bit.Lasse Collin1-2/+4
2016-06-28Windows/MSVC: Update config.h.Lasse Collin1-0/+6
2016-06-28DOS: Update config.h.Lasse Collin1-0/+6
2016-06-28xz: Make xz buildable even when encoders or decoders are disabled.Lasse Collin6-13/+62
The patch is quite long but it's mostly about adding new #ifdefs to omit code when encoders or decoders have been disabled. This adds two new #defines to config.h: HAVE_ENCODERS and HAVE_DECODERS.
2016-06-28Build: Build LZMA1/2 presets also when only decoder is wanted.Lasse Collin2-2/+7
People shouldn't rely on the presets when decoding raw streams, but xz uses the presets as the starting point for raw decoder options anyway. lzma_encocder_presets.c was renamed to lzma_presets.c to make it clear it's not used solely by the encoder code.
2016-06-28Build: Fix configure to handle LZMA1 dependency with LZMA2.Lasse Collin1-5/+0
Now it gives an error if LZMA1 encoder/decoder is missing when LZMA2 encoder/decoder was requested. Even better would be LZMA2 implicitly enabling LZMA1 but it would need more code.
2016-06-28Build: Don't omit lzma_cputhreads() unless using --disable-threads.Lasse Collin1-1/+4
Previously it was omitted if encoders were disabled with --disable-encoders. It didn't make sense and it also broke the build.
2016-06-28liblzma: Fix a build failure related to external SHA-256 support.Lasse Collin1-9/+23
If an appropriate header and structure were found by configure, but a library with a usable SHA-256 functions wasn't, the build failed.
2016-06-28xz: Always close the file before trying to delete it.Lasse Collin1-13/+12
unlink() can return EBUSY in errno for open files on some operating systems and file systems.
2016-06-28Update THANKS.Lasse Collin1-0/+1
2016-06-28Tests: Add tests for the two bugs fixed in index.c.Lasse Collin1-0/+30
2016-06-28liblzma: Fix lzma_index_dup() for empty Streams.Lasse Collin1-5/+6
Stream Flags and Stream Padding weren't copied from empty Streams.
2016-06-28liblzma: Add a note to index.c for those using static analyzers.Lasse Collin1-0/+3
2015-09-29Bump version and soname for 5.2.2.larhzu/v5.2.2Lasse Collin2-2/+2
2015-09-29Update NEWS for 5.2.2.Lasse Collin1-0/+18
2015-09-28Fix typo in German translation.Andre Noll1-1/+1
As pointed out by Robert Pollak, there's a typo in the German translation of the compression preset option (-0 ... -9) help text. "The compressor" translates to "der Komprimierer", and the genitive form is "des Komprimierers". The old word makes no sense at all.
2015-09-25Update German translation, mostly wrt orthographyHauke Henningsen1-187/+196
Provide an update of the German translation. * A lot of compound words were previously written with spaces, while German orthography is relatively clear in that the components should not be separated. * When referring to the actual process of (de)compression rather than the concept, replace “(De-)Kompression” with “(De-)Komprimierung”. Previously, both forms were used in this context and are now used in a manner consistent with “Komprimierung” being more likely to refer to a process. * Consistently translate “standard input”/“output” * Use “Zeichen” instead of false friend “Charakter” for “character” * Insert commas around relative clauses (as required in German) * Some other minor corrections * Capitalize “ß” as “ẞ” * Consistently start option descriptions in --help with capital letters Acked-By: Andre Noll <maan@tuebingen.mpg.de> * Update after msgmerge
2015-09-25Build: Minor Cygwin cleanup.Lasse Collin1-3/+3
Some tests used "cygwin*" and some used "cygwin". I changed them all to use "cygwin". Shouldn't affect anything in practice.
2015-09-25Build: Support building of MSYS2 binaries.Lasse Collin1-5/+11
2015-09-25Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.Lasse Collin1-6/+6
src/liblzma/common/common.h uses it to set __declspec(dllexport) for the API symbols. Thanks to Adam Walling.
2015-09-25Windows: Omit unneeded header files from MSVC project files.Lasse Collin2-10/+0
2015-09-25liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.Lasse Collin1-5/+13
2015-09-25Update THANKS.Lasse Collin1-0/+2
2015-09-25Windows: Update the docs.Lasse Collin3-11/+67
2015-09-25Windows: Add MSVC project files for building liblzma.Lasse Collin3-0/+795
Thanks to Adam Walling for creating these files.
2015-05-13Tests: Fix a memory leak in test_bcj_exact_size.Lasse Collin1-0/+1
Thanks to Cristian Rodríguez.
2015-05-12Fix NEWS about threading in 5.2.0.Lasse Collin1-1/+2
Thanks to Andy Hochhaus.
2015-05-11xz: Document that threaded decompression hasn't been implemented yet.Lasse Collin1-1/+9
2015-04-20Update THANKS.Lasse Collin1-0/+1
2015-04-20Revert "xz: Use pipe2() if available."Lasse Collin2-10/+3
This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd. It is a problem when libc has pipe2() but the kernel is too old to have pipe2() and thus pipe2() fails. In xz it's pointless to have a fallback for non-functioning pipe2(); it's better to avoid pipe2() completely. Thanks to Michael Fox for the bug report.
2015-03-29Update THANKS.Lasse Collin1-0/+1
2015-03-29Fix the detection of installed RAM on QNX.Lasse Collin2-4/+16
The earlier version compiled but didn't actually work since sysconf(_SC_PHYS_PAGES) always fails (or so I was told). Thanks to Ole André Vadla Ravnås for the patch and testing.
2015-03-27Fix CPU core count detection on QNX.Lasse Collin1-4/+11
It tried to use sysctl() on QNX but - it broke the build because sysctl() needs -lsocket on QNX; - sysctl() doesn't work for detecting the core count on QNX even if it compiled. sysconf() works. An alternative would have been to use QNX-specific SYSPAGE_ENTRY(num_cpu) from <sys/syspage.h>. Thanks to Ole André Vadla Ravnås.
2015-03-07xz: size_t/uint32_t cleanup in options.c.Lasse Collin1-6/+6
2015-03-07xz: Fix a comment and silence a warning in message.c.Lasse Collin1-2/+3
2015-03-07liblzma: Silence more uint32_t vs. size_t warnings.Lasse Collin2-2/+2
2015-03-07xz: Make arg_count an unsigned int to silence a warning.Lasse Collin2-2/+2
Actually the value of arg_count cannot exceed INT_MAX but it's nicer as an unsigned int.
2015-03-07liblzma: Fix a warning in index.c.Lasse Collin1-1/+3
2015-02-26Build: Fix a CR+LF problem when running autoreconf -fi on OS/2.Lasse Collin1-1/+1
2015-02-26Bump version and soname for 5.2.1.larhzu/v5.2.1Lasse Collin2-2/+2
2015-02-26Update NEWS for 5.2.1.Lasse Collin1-0/+14
2015-02-22xz: Use pipe2() if available.Lasse Collin2-3/+10
2015-02-21liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.Lasse Collin1-1/+1
The bug was added in the commit f48fce093b07aeda95c18850f5e086d9f2383380 and thus affected 5.1.4beta and 5.2.0. Luckily the bug cannot cause data corruption or other nasty things.
2015-02-21xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick.Lasse Collin1-5/+11
Now it reads the old flags instead of blindly setting O_NONBLOCK. The old code may have worked correctly, but this is better.
2015-02-10Update THANKS.Lasse Collin1-0/+1
2015-02-10tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.Lasse Collin2-1/+40
In FreeBSD, cpuset_getaffinity() is the preferred way to get the number of available cores. Thanks to Rui Paulo for the patch. I edited it slightly, but hopefully I didn't break anything.
2015-02-09xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.Lasse Collin1-1/+6
Thanks to Rui Paulo for the fix.
2015-02-03Add a few casts to tuklib_integer.h to silence possible warnings.Lasse Collin1-12/+12
I heard that Visual Studio 2013 gave warnings without the casts. Thanks to Gabi Davar.
2015-01-26liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method.Lasse Collin1-5/+10
2015-01-26Update THANKS.Lasse Collin1-0/+1
2015-01-26liblzma: Silence harmless Valgrind errors.Lasse Collin1-0/+6
Thanks to Torsten Rupp for reporting this. I had forgotten to run Valgrind before the 5.2.0 release.
2015-01-09xz: Fix comments.Lasse Collin1-4/+8
2015-01-09Update THANKS.Lasse Collin1-0/+1
2015-01-09xz: Don't fail if stdout doesn't support O_NONBLOCK.Lasse Collin1-21/+15
This is similar to the case with stdin. Thanks to Brad Smith for the bug report and testing on OpenBSD.
2015-01-07xz: Fix a memory leak in DOS-specific code.Lasse Collin1-0/+2
2015-01-07xz: Don't fail if stdin doesn't support O_NONBLOCK.Lasse Collin1-11/+7
It's a problem at least on OpenBSD which doesn't support O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's a problem on other OSes too since this behavior is allowed in POSIX-1.2008. The code relying on this behavior was committed in June 2013 and included in 5.1.3alpha released on 2013-10-26. Clearly the development releases only get limited testing.
2015-01-06Tests: Don't hide unexpected error messages in test_files.sh.Lasse Collin1-2/+2
Hiding them makes no sense since normally there's no error when testing the "good" files. With "bad" files errors are expected and then it makes sense to keep the messages hidden.
2014-12-30Update Solaris notes in INSTALL.Lasse Collin1-0/+4
Mention the possible "make check" failure on Solaris in the Solaris-specific section of INSTALL. It was already in section 4.5 but it is better mention it in the OS-specific section too.
2014-12-26Build: POSIX shell isn't required if scripts are disabled.Lasse Collin2-2/+3
2014-12-21DOS: Update Makefile.larhzu/v5.2.0Lasse Collin1-0/+1
2014-12-21Windows: Fix bin_i486 to bin_i686 in build.bash.Lasse Collin1-1/+1
2014-12-21Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c.Lasse Collin1-4/+26
2014-12-21Docs: Update docs/examples/00_README.txt.Lasse Collin1-0/+4
2014-12-21Bump version and soname for 5.2.0.Lasse Collin3-5/+5
I know that soname != app version, but I skip AGE=1 in -version-info to make the soname match the liblzma version anyway. It doesn't hurt anything as long as it doesn't conflict with library versioning rules.
2014-12-21Avoid variable-length arrays in the debug programs.Lasse Collin2-2/+4
2014-12-21Build: Include 04_compress_easy_mt.c in the tarball.Lasse Collin1-0/+1