Commit Graph

1139 Commits

Author SHA1 Message Date
Lasse Collin b0bc3e0385 Build: Don't omit lzma_cputhreads() unless using --disable-threads.
Previously it was omitted if encoders were disabled
with --disable-encoders. It didn't make sense and
it also broke the build.
2015-11-03 17:41:54 +02:00
Lasse Collin c6bf438ab3 liblzma: Fix a build failure related to external SHA-256 support.
If an appropriate header and structure were found by configure,
but a library with a usable SHA-256 functions wasn't, the build
failed.
2015-11-02 18:16:51 +02:00
Lasse Collin e18adc56f2 xz: Always close the file before trying to delete it.
unlink() can return EBUSY in errno for open files on some
operating systems and file systems.
2015-11-02 15:19:10 +02:00
Lasse Collin 282e768a14 Update THANKS. 2015-10-12 21:08:42 +03:00
Lasse Collin 372e402713 Tests: Add tests for the two bugs fixed in index.c. 2015-10-12 21:07:41 +03:00
Lasse Collin 21515d79d7 liblzma: Fix lzma_index_dup() for empty Streams.
Stream Flags and Stream Padding weren't copied from
empty Streams.
2015-10-12 20:45:15 +03:00
Lasse Collin 09f395b6b3 liblzma: Add a note to index.c for those using static analyzers. 2015-10-12 20:31:44 +03:00
Lasse Collin 3bf857edfe liblzma: Fix a memory leak in error path of lzma_index_dup().
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.
2015-10-12 20:29:09 +03:00
Lasse Collin 7f05803979 Update NEWS for 5.2.2. 2015-09-29 13:57:28 +03:00
Hauke Henningsen 397fcc0946 Update German translation, mostly wrt orthography
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-08-27 21:28:37 +03:00
Lasse Collin cbc9e39bae Build: Minor Cygwin cleanup.
Some tests used "cygwin*" and some used "cygwin". I changed
them all to use "cygwin". Shouldn't affect anything in practice.
2015-08-11 13:23:04 +03:00
Lasse Collin bcacd8ce7a Build: Support building of MSYS2 binaries. 2015-08-11 13:21:52 +03:00
Lasse Collin 0275a5398c Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
src/liblzma/common/common.h uses it to set __declspec(dllexport)
for the API symbols.

Thanks to Adam Walling.
2015-08-09 21:06:26 +03:00
Lasse Collin a74525cf9b Windows: Omit unneeded header files from MSVC project files. 2015-08-09 21:02:20 +03:00
Lasse Collin fbbb295a91 liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer. 2015-07-12 20:48:19 +03:00
Lasse Collin 713dbe5c23 Update THANKS. 2015-06-19 20:38:55 +03:00
Lasse Collin 3a5d755d05 Windows: Update the docs. 2015-06-19 20:21:30 +03:00
Lasse Collin b0798c6aa6 Windows: Add MSVC project files for building liblzma.
Thanks to Adam Walling for creating these files.
2015-06-19 17:25:31 +03:00
Andre Noll 9b02a4ffda Fix typo in German translation.
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-06-10 21:01:09 +03:00
Lasse Collin c7f4041f6b Tests: Fix a memory leak in test_bcj_exact_size.
Thanks to Cristian Rodríguez.
2015-05-13 20:57:55 +03:00
Lasse Collin 17b29d4f0a Fix NEWS about threading in 5.2.0.
Thanks to Andy Hochhaus.
2015-05-12 18:08:24 +03:00
Lasse Collin 49c26920d6 xz: Document that threaded decompression hasn't been implemented yet. 2015-05-11 21:26:16 +03:00
Lasse Collin 5b2458cb24 Update THANKS. 2015-04-20 20:20:38 +03:00
Lasse Collin 6bd0349c58 Revert "xz: Use pipe2() if available."
This reverts commit 7a11c4a8e5.
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-04-20 20:17:48 +03:00
Lasse Collin fc0df0f8db xz: Fix the Capsicum rights on user_abort_pipe. 2015-04-01 14:45:25 +03:00
Lasse Collin 57393615b3 Update THANKS. 2015-03-31 22:20:11 +03:00
Lasse Collin 1238381143 xz: Add support for sandboxing with Capsicum.
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.
2015-03-31 22:19:34 +03:00
Lasse Collin 29a087fb5a Fix bugs and otherwise improve ax_check_capsicum.m4.
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.
2015-03-31 21:12:30 +03:00
Lasse Collin 6e845c6a3e Add m4/ax_check_capsicum.m4 for detecting Capsicum support.
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.
2015-03-31 19:20:24 +03:00
Lasse Collin 3717885f9e Bump version to 5.3.0alpha and soname to 5.3.99.
The idea of 99 is that it looks a bit weird in this context.
For new features there's no API/ABI stability in devel versions.
2015-03-30 22:44:02 +03:00
Lasse Collin eccd8155e1 Update THANKS. 2015-03-29 22:14:47 +03:00
Lasse Collin 25263fd9e7 Fix the detection of installed RAM on QNX.
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-29 22:13:48 +03:00
Lasse Collin 4c544d2410 Fix CPU core count detection on QNX.
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-27 22:39:07 +02:00
Lasse Collin e0ea6737b0 xz: size_t/uint32_t cleanup in options.c. 2015-03-07 22:05:57 +02:00
Lasse Collin 8bcca29a65 xz: Fix a comment and silence a warning in message.c. 2015-03-07 22:04:23 +02:00
Lasse Collin f243f5f44c liblzma: Silence more uint32_t vs. size_t warnings. 2015-03-07 22:01:00 +02:00
Lasse Collin 7f0a4c50f4 xz: Make arg_count an unsigned int to silence a warning.
Actually the value of arg_count cannot exceed INT_MAX
but it's nicer as an unsigned int.
2015-03-07 19:54:00 +02:00
Lasse Collin f6ec468015 liblzma: Fix a warning in index.c. 2015-03-07 19:33:17 +02:00
Lasse Collin a24518971c Build: Fix a CR+LF problem when running autoreconf -fi on OS/2. 2015-02-26 20:46:14 +02:00
Lasse Collin dec11497a7 Bump version and soname for 5.2.1. 2015-02-26 16:53:44 +02:00
Lasse Collin 29e39c7997 Update NEWS for 5.2.1. 2015-02-26 13:01:09 +02:00
Lasse Collin 7a11c4a8e5 xz: Use pipe2() if available. 2015-02-22 19:38:48 +02:00
Lasse Collin 117d962685 liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.
The bug was added in the commit
f48fce093b and thus
affected 5.1.4beta and 5.2.0. Luckily the bug cannot
cause data corruption or other nasty things.
2015-02-21 23:40:26 +02:00
Lasse Collin ae984e31c1 xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick.
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-21 23:00:19 +02:00
Lasse Collin 2205bb5853 Update THANKS. 2015-02-10 15:29:34 +02:00
Lasse Collin d935b0cdf3 tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.
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-10 15:28:30 +02:00
Lasse Collin eb61bc58c2 xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.
Thanks to Rui Paulo for the fix.
2015-02-09 22:08:37 +02:00
Lasse Collin b9a5b6b7a2 Add a few casts to tuklib_integer.h to silence possible warnings.
I heard that Visual Studio 2013 gave warnings without the casts.

Thanks to Gabi Davar.
2015-02-03 21:45:53 +02:00
Lasse Collin c45757135f liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. 2015-01-26 21:24:39 +02:00
Lasse Collin 3c500174ed Update THANKS. 2015-01-26 20:40:16 +02:00