summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-11-21 06:52:06 +0000
committerXin LI <delphij@FreeBSD.org>2015-11-21 06:52:06 +0000
commit170a23caff3b126f7ca0a3ce1a412cbb050f2b25 (patch)
tree6fbbcbf4bb65ef3b7fdf7891461da1ba750ee58e
parentf4bb66fbc5dabc60ac06846b1913e0fff1d7a463 (diff)
downloadsrc-test-170a23caff3b126f7ca0a3ce1a412cbb050f2b25.tar.gz
src-test-170a23caff3b126f7ca0a3ce1a412cbb050f2b25.zip
Vendor import of xz-5.2.2 (trimmed).vendor/xz/5.2.2
Notes
Notes: svn path=/vendor/xz/dist/; revision=291123 svn path=/vendor/xz/5.2.2/; revision=291124; tag=vendor/xz/5.2.2
-rw-r--r--ChangeLog310
-rw-r--r--THANKS4
-rw-r--r--src/common/tuklib_physmem.c14
-rw-r--r--src/liblzma/api/lzma.h18
-rw-r--r--src/liblzma/api/lzma/version.h2
-rw-r--r--src/liblzma/common/index.c4
-rw-r--r--src/liblzma/lz/lz_encoder.c2
-rw-r--r--src/liblzma/lzma/lzma_encoder.c2
-rw-r--r--src/xz/args.h2
-rw-r--r--src/xz/file_io.c9
-rw-r--r--src/xz/main.c2
-rw-r--r--src/xz/message.c5
-rw-r--r--src/xz/options.c12
-rw-r--r--src/xz/xz.110
14 files changed, 367 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index f2c90b0bea47e..27d9ea4e51de3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,313 @@
+commit 9815cdf6987ef91a85493bfcfd1ce2aaf3b47a0a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-09-29 13:59:35 +0300
+
+ Bump version and soname for 5.2.2.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cbe0cec8476bdd0416c7ca9bc83895c9bea1cf78
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-09-29 13:57:28 +0300
+
+ Update NEWS for 5.2.2.
+
+ NEWS | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 49427ce7eececdd18bbd35dab23c81910d083e1c
+Author: Andre Noll <maan@tuebingen.mpg.de>
+Date: 2015-05-28 15:50:00 +0200
+
+ 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.
+
+ po/de.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 608d6f06c940e7f28c25de005e8b99bdff42d27c
+Author: Hauke Henningsen <sqrt@entless.org>
+Date: 2015-08-17 04:59:54 +0200
+
+ 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
+
+ po/de.po | 383 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 196 insertions(+), 187 deletions(-)
+
+commit c8988414e5b67b8ef2fe0ba7b1ccdd0ec73c60d3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-11 13:23:04 +0300
+
+ 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.
+
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 85a6dfed53477906bfe9a7c0123dd412e391cb48
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-11 13:21:52 +0300
+
+ Build: Support building of MSYS2 binaries.
+
+ configure.ac | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 77f270be8432df2e4516a0c48814b6976d6618c5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-09 21:06:26 +0300
+
+ 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.
+
+ windows/liblzma_dll.vcxproj | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8c975446c5903090a5a8493b5b96b71003056a88
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-09 21:02:20 +0300
+
+ Windows: Omit unneeded header files from MSVC project files.
+
+ windows/liblzma.vcxproj | 5 -----
+ windows/liblzma_dll.vcxproj | 5 -----
+ 2 files changed, 10 deletions(-)
+
+commit 119a00434954726ca58e4a578e6469f530fca30e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-07-12 20:48:19 +0300
+
+ liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.
+
+ src/liblzma/api/lzma.h | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+commit d4e7c557fcab353539c9481a8d95cb04bcb15c7c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 20:38:55 +0300
+
+ Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 98001740ca56c894a7bd32eb47e9857a8a7d878d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 20:21:30 +0300
+
+ Windows: Update the docs.
+
+ INSTALL | 29 ++++++----
+ windows/INSTALL-MSVC.txt | 47 +++++++++++++++
+ windows/INSTALL-MinGW.txt | 138 ++++++++++++++++++++++++++++++++++++++++++++
+ windows/INSTALL-Windows.txt | 138 --------------------------------------------
+ 4 files changed, 204 insertions(+), 148 deletions(-)
+
+commit 28195e4c877007cc760ecea1d17f740693d66873
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 17:25:31 +0300
+
+ Windows: Add MSVC project files for building liblzma.
+
+ Thanks to Adam Walling for creating these files.
+
+ windows/liblzma.vcxproj | 359 ++++++++++++++++++++++++++++++++++++++++
+ windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++
+ windows/xz_win.sln | 48 ++++++
+ 3 files changed, 795 insertions(+)
+
+commit 960440f3230dc628f6966d9f7614fc1b28baf44e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-13 20:57:55 +0300
+
+ Tests: Fix a memory leak in test_bcj_exact_size.
+
+ Thanks to Cristian Rodríguez.
+
+ tests/test_bcj_exact_size.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 68cd35acafbdcdf4e8ea8b5bb843c736939d6f8b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-12 18:08:24 +0300
+
+ Fix NEWS about threading in 5.2.0.
+
+ Thanks to Andy Hochhaus.
+
+ NEWS | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit ff96ed6d25786728356017a13baf8c14731b4f1e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-11 21:26:16 +0300
+
+ xz: Document that threaded decompression hasn't been implemented yet.
+
+ src/xz/xz.1 | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 00d37b64a64ea8597fd2422d5187afd761ab9531
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-04-20 20:20:29 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit db190a832c49ca3aed6d69cc992fa5583cae7b11
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-04-20 19:59:18 +0300
+
+ Revert "xz: Use pipe2() if available."
+
+ 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.
+
+ configure.ac | 4 ++--
+ src/xz/file_io.c | 9 +--------
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+commit eccd8155e107c5ada03d13e7730675cdf1a44ddc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-29 22:14:47 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 25263fd9e7a8a913395cb93d7c104cd48c2b4a00
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-29 22:13:48 +0300
+
+ 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.
+
+ m4/tuklib_physmem.m4 | 6 +++---
+ src/common/tuklib_physmem.c | 14 +++++++++++++-
+ 2 files changed, 16 insertions(+), 4 deletions(-)
+
+commit 4c544d2410903d38402221cb783ed85585b6a007
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-27 22:39:07 +0200
+
+ 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.
+
+ m4/tuklib_cpucores.m4 | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+commit e0ea6737b03e83ccaff4514d00e31bb926f8f0f3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:05:57 +0200
+
+ xz: size_t/uint32_t cleanup in options.c.
+
+ src/xz/options.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8bcca29a65335fd679c13814b70b35b68fa5daed
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:04:23 +0200
+
+ xz: Fix a comment and silence a warning in message.c.
+
+ src/xz/message.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit f243f5f44c6b19a7c289a0ec73a03ee08364cb5b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:01:00 +0200
+
+ liblzma: Silence more uint32_t vs. size_t warnings.
+
+ src/liblzma/lz/lz_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7f0a4c50f4a374c40acf4b86848f301ad1e82d34
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 19:54:00 +0200
+
+ 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.
+
+ src/xz/args.h | 2 +-
+ src/xz/main.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f6ec46801588b1be29c07c9db98558b521304002
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 19:33:17 +0200
+
+ liblzma: Fix a warning in index.c.
+
+ src/liblzma/common/index.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit a24518971cc621315af142dd3bb7614fab04ad27
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-26 20:46:14 +0200
+
+ Build: Fix a CR+LF problem when running autoreconf -fi on OS/2.
+
+ build-aux/version.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit dec11497a71518423b5ff0e759100cf8aadf6c7b
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2015-02-26 16:53:44 +0200
diff --git a/THANKS b/THANKS
index 05d20bdf34497..d9c62d4681354 100644
--- a/THANKS
+++ b/THANKS
@@ -21,6 +21,7 @@ has been important. :-) In alphabetical order:
- Milo Casagrande
- Marek Černocký
- Tomer Chachamu
+ - Gabi Davar
- Chris Donawa
- Andrew Dudman
- Markus Duft
@@ -29,6 +30,7 @@ has been important. :-) In alphabetical order:
- Gilles Espinasse
- Denis Excoffier
- Michael Felt
+ - Michael Fox
- Mike Frysinger
- Daniel Richard G.
- Bill Glessner
@@ -74,6 +76,7 @@ has been important. :-) In alphabetical order:
- Mikko Pouru
- Trần Ngọc Quân
- Pavel Raiskup
+ - Ole André Vadla Ravnås
- Robert Readman
- Bernhard Reutner-Fischer
- Eric S. Raymond
@@ -95,6 +98,7 @@ has been important. :-) In alphabetical order:
- Alexey Tourbin
- Patrick J. Volkerding
- Martin Väth
+ - Adam Walling
- Christian Weisgerber
- Bert Wesarg
- Fredrik Wikstrom
diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c
index 3cc7d12a171f4..cd2437d8c7d59 100644
--- a/src/common/tuklib_physmem.c
+++ b/src/common/tuklib_physmem.c
@@ -37,7 +37,10 @@
# define __USE_INLINE__
# include <proto/exec.h>
-// AIX
+#elif defined(__QNX__)
+# include <sys/syspage.h>
+# include <string.h>
+
#elif defined(TUKLIB_PHYSMEM_AIX)
# include <sys/systemcfg.h>
@@ -126,6 +129,15 @@ tuklib_physmem(void)
#elif defined(AMIGA) || defined(__AROS__)
ret = AvailMem(MEMF_TOTAL);
+#elif defined(__QNX__)
+ const struct asinfo_entry *entries = SYSPAGE_ENTRY(asinfo);
+ size_t count = SYSPAGE_ENTRY_SIZE(asinfo) / sizeof(struct asinfo_entry);
+ const char *strings = SYSPAGE_ENTRY(strings)->data;
+
+ for (size_t i = 0; i < count; ++i)
+ if (strcmp(strings + entries[i].name, "ram") == 0)
+ ret += entries[i].end - entries[i].start + 1;
+
#elif defined(TUKLIB_PHYSMEM_AIX)
ret = _system_configuration.physmem;
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
index 72c51b2411c30..ce675a7887164 100644
--- a/src/liblzma/api/lzma.h
+++ b/src/liblzma/api/lzma.h
@@ -82,12 +82,20 @@
# if !defined(UINT32_C) || !defined(UINT64_C) \
|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
/*
- * MSVC has no C99 support, and thus it cannot be used to
- * compile liblzma. The liblzma API has to still be usable
- * from MSVC, so we need to define the required standard
- * integer types here.
+ * MSVC versions older than 2013 have no C99 support, and
+ * thus they cannot be used to compile liblzma. Using an
+ * existing liblzma.dll with old MSVC can work though(*),
+ * but we need to define the required standard integer
+ * types here in a MSVC-specific way.
+ *
+ * (*) If you do this, the existing liblzma.dll probably uses
+ * a different runtime library than your MSVC-built
+ * application. Mixing runtimes is generally bad, but
+ * in this case it should work as long as you avoid
+ * the few rarely-needed liblzma functions that allocate
+ * memory and expect the caller to free it using free().
*/
-# if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
diff --git a/src/liblzma/api/lzma/version.h b/src/liblzma/api/lzma/version.h
index 9682155a3a039..8bdc7f0b6e769 100644
--- a/src/liblzma/api/lzma/version.h
+++ b/src/liblzma/api/lzma/version.h
@@ -22,7 +22,7 @@
*/
#define LZMA_VERSION_MAJOR 5
#define LZMA_VERSION_MINOR 2
-#define LZMA_VERSION_PATCH 1
+#define LZMA_VERSION_PATCH 2
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
#ifndef LZMA_VERSION_COMMIT
diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c
index 11f45f4009ea7..e897646c0291e 100644
--- a/src/liblzma/common/index.c
+++ b/src/liblzma/common/index.c
@@ -339,7 +339,7 @@ index_tree_locate(const index_tree *tree, lzma_vli target)
/// Allocate and initialize a new Stream using the given base offsets.
static index_stream *
index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
- lzma_vli stream_number, lzma_vli block_number_base,
+ uint32_t stream_number, lzma_vli block_number_base,
const lzma_allocator *allocator)
{
index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
@@ -1008,6 +1008,8 @@ iter_set_info(lzma_index_iter *iter)
iter->internal[ITER_GROUP].p = NULL;
}
+ // NOTE: lzma_index_iter.stream.number is lzma_vli but we use uint32_t
+ // internally.
iter->stream.number = stream->number;
iter->stream.block_count = stream->record_count;
iter->stream.compressed_offset = stream->node.compressed_base;
diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c
index 01dfc06f3eca7..48bc487d68537 100644
--- a/src/liblzma/lz/lz_encoder.c
+++ b/src/liblzma/lz/lz_encoder.c
@@ -139,7 +139,7 @@ fill_window(lzma_coder *coder, const lzma_allocator *allocator,
&& coder->mf.read_pos < coder->mf.read_limit) {
// Match finder may update coder->pending and expects it to
// start from zero, so use a temporary variable.
- const size_t pending = coder->mf.pending;
+ const uint32_t pending = coder->mf.pending;
coder->mf.pending = 0;
// Rewind read_pos so that the match finder can hash
diff --git a/src/liblzma/lzma/lzma_encoder.c b/src/liblzma/lzma/lzma_encoder.c
index 31cb4f044829f..4c5f99c3823db 100644
--- a/src/liblzma/lzma/lzma_encoder.c
+++ b/src/liblzma/lzma/lzma_encoder.c
@@ -464,7 +464,7 @@ length_encoder_reset(lzma_length_encoder *lencoder,
bittree_reset(lencoder->high, LEN_HIGH_BITS);
if (!fast_mode)
- for (size_t pos_state = 0; pos_state < num_pos_states;
+ for (uint32_t pos_state = 0; pos_state < num_pos_states;
++pos_state)
length_update_prices(lencoder, pos_state);
diff --git a/src/xz/args.h b/src/xz/args.h
index 1defad12e0dd5..46a8e8edfc978 100644
--- a/src/xz/args.h
+++ b/src/xz/args.h
@@ -15,7 +15,7 @@ typedef struct {
char **arg_names;
/// Number of filenames from command line
- size_t arg_count;
+ unsigned int arg_count;
/// Name of the file from which to read filenames. This is NULL
/// if --files or --files0 was not used.
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index 20f512a25a997..9bd515ddc8944 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -82,13 +82,7 @@ io_init(void)
// we are root.
warn_fchown = geteuid() == 0;
- // Create a pipe for the self-pipe trick. If pipe2() is available,
- // we can avoid the fcntl() calls.
-# ifdef HAVE_PIPE2
- if (pipe2(user_abort_pipe, O_NONBLOCK))
- message_fatal(_("Error creating a pipe: %s"),
- strerror(errno));
-# else
+ // Create a pipe for the self-pipe trick.
if (pipe(user_abort_pipe))
message_fatal(_("Error creating a pipe: %s"),
strerror(errno));
@@ -101,7 +95,6 @@ io_init(void)
message_fatal(_("Error creating a pipe: %s"),
strerror(errno));
}
-# endif
#endif
#ifdef __DJGPP__
diff --git a/src/xz/main.c b/src/xz/main.c
index a8f0683a47bd4..5608229d54c5a 100644
--- a/src/xz/main.c
+++ b/src/xz/main.c
@@ -212,7 +212,7 @@ main(int argc, char **argv)
// Process the files given on the command line. Note that if no names
// were given, args_parse() gave us a fake "-" filename.
- for (size_t i = 0; i < args.arg_count && !user_abort; ++i) {
+ for (unsigned i = 0; i < args.arg_count && !user_abort; ++i) {
if (strcmp("-", args.arg_names[i]) == 0) {
// Processing from stdin to stdout. Check that we
// aren't writing compressed data to a terminal or
diff --git a/src/xz/message.c b/src/xz/message.c
index 8a31b00ed89c5..f88c1231e7d5d 100644
--- a/src/xz/message.c
+++ b/src/xz/message.c
@@ -381,7 +381,7 @@ progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
}
-/// Make a string indicating elapsed or remaining time. The format is either
+/// Make a string indicating elapsed time. The format is either
/// M:SS or H:MM:SS depending on if the time is an hour or more.
static const char *
progress_time(uint64_t mseconds)
@@ -389,7 +389,8 @@ progress_time(uint64_t mseconds)
// 9999 hours = 416 days
static char buf[sizeof("9999:59:59")];
- uint32_t seconds = mseconds / 1000;
+ // 32-bit variable is enough for elapsed time (136 years).
+ uint32_t seconds = (uint32_t)(mseconds / 1000);
// Don't show anything if the time is zero or ridiculously big.
if (seconds == 0 || seconds > ((9999 * 60) + 59) * 60 + 59)
diff --git a/src/xz/options.c b/src/xz/options.c
index f9c7ab9e8535b..de05364ba1b03 100644
--- a/src/xz/options.c
+++ b/src/xz/options.c
@@ -59,7 +59,7 @@ typedef struct {
static void
parse_options(const char *str, const option_map *opts,
void (*set)(void *filter_options,
- uint32_t key, uint64_t value, const char *valuestr),
+ unsigned key, uint64_t value, const char *valuestr),
void *filter_options)
{
if (str == NULL || str[0] == '\0')
@@ -87,7 +87,7 @@ parse_options(const char *str, const option_map *opts,
"pairs separated with commas"), str);
// Look for the option name from the option map.
- size_t i = 0;
+ unsigned i = 0;
while (true) {
if (opts[i].name == NULL)
message_fatal(_("%s: Invalid option name"),
@@ -103,7 +103,7 @@ parse_options(const char *str, const option_map *opts,
if (opts[i].map != NULL) {
// value is a string which we should map
// to an integer.
- size_t j;
+ unsigned j;
for (j = 0; opts[i].map[j].name != NULL; ++j) {
if (strcmp(opts[i].map[j].name, value) == 0)
break;
@@ -149,7 +149,7 @@ enum {
static void
-set_delta(void *options, uint32_t key, uint64_t value,
+set_delta(void *options, unsigned key, uint64_t value,
const char *valuestr lzma_attribute((__unused__)))
{
lzma_options_delta *opt = options;
@@ -193,7 +193,7 @@ enum {
static void
-set_bcj(void *options, uint32_t key, uint64_t value,
+set_bcj(void *options, unsigned key, uint64_t value,
const char *valuestr lzma_attribute((__unused__)))
{
lzma_options_bcj *opt = options;
@@ -249,7 +249,7 @@ error_lzma_preset(const char *valuestr)
static void
-set_lzma(void *options, uint32_t key, uint64_t value, const char *valuestr)
+set_lzma(void *options, unsigned key, uint64_t value, const char *valuestr)
{
lzma_options_lzma *opt = options;
diff --git a/src/xz/xz.1 b/src/xz/xz.1
index 75aead3d04393..bc5514d534d08 100644
--- a/src/xz/xz.1
+++ b/src/xz/xz.1
@@ -5,7 +5,7 @@
.\" This file has been put into the public domain.
.\" You can do whatever you want with this file.
.\"
-.TH XZ 1 "2014-12-16" "Tukaani" "XZ Utils"
+.TH XZ 1 "2015-05-11" "Tukaani" "XZ Utils"
.
.SH NAME
xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
@@ -1055,6 +1055,14 @@ The default block size depends on the compression level and
can be overriden with the
.BI \-\-block\-size= size
option.
+.IP ""
+Threaded decompression hasn't been implemented yet.
+It will only work on files that contain multiple blocks
+with size information in block headers.
+All files compressed in multi-threaded mode meet this condition,
+but files compressed in single-threaded mode don't even if
+.BI \-\-block\-size= size
+is used.
.
.SS "Custom compressor filter chains"
A custom filter chain allows specifying