Browse files

Date: 2015-02-26 16:53:44 +0200

    Bump version and soname for 5.2.1.


Date:   2015-02-26 13:01:09 +0200

    Update NEWS for 5.2.1.


Date:   2015-02-22 19:38:48 +0200

    xz: Use pipe2() if available.


Date:   2015-02-21 23:40:26 +0200

    liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.

    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.


Date:   2015-02-21 23:00:19 +0200

    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.


Date:   2015-02-10 15:29:34 +0200

    Update THANKS.


Date:   2015-02-10 15:28:30 +0200

    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.


Date:   2015-02-09 22:08:37 +0200

    xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.

    Thanks to Rui Paulo for the fix.


Date:   2015-02-03 21:45:53 +0200

    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.


Date:   2015-01-26 21:24:39 +0200

    liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method.


Date:   2015-01-26 20:40:16 +0200

    Update THANKS.


Date:   2015-01-26 20:39:28 +0200

    liblzma: Silence harmless Valgrind errors.

    Thanks to Torsten Rupp for reporting this. I had
    forgotten to run Valgrind before the 5.2.0 release.


Date:   2015-01-09 21:50:19 +0200

    xz: Fix comments.


Date:   2015-01-09 21:35:06 +0200

    Update THANKS.


Date:   2015-01-09 21:34:06 +0200

    xz: Don't fail if stdout doesn't support O_NONBLOCK.

    This is similar to the case with stdin.

    Thanks to Brad Smith for the bug report and testing
    on OpenBSD.


Date:   2015-01-07 19:18:20 +0200

    xz: Fix a memory leak in DOS-specific code.


Date:   2015-01-07 19:08:06 +0200

    xz: Don't fail if stdin doesn't support O_NONBLOCK.

    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.


Date:   2015-01-06 20:30:15 +0200

    Tests: Don't hide unexpected error messages in test_files.sh.

    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.


Date:   2014-12-30 11:17:16 +0200

    Update Solaris notes in INSTALL.

    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.


Date:   2014-12-26 12:00:05 +0200

    Build: POSIX shell isn't required if scripts are disabled.


Date:   2014-12-21 20:48:37 +0200

    DOS: Update Makefile.


Date:   2014-12-21 19:50:38 +0200

    Windows: Fix bin_i486 to bin_i686 in build.bash.


Date:   2014-12-21 18:58:44 +0200

    Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c.


Date:   2014-12-21 18:56:44 +0200

    Docs: Update docs/examples/00_README.txt.


Date:   2014-12-21 18:11:17 +0200

    Bump version and soname for 5.2.0.

    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.


Date:   2014-12-21 18:05:03 +0200

    Avoid variable-length arrays in the debug programs.


Date:   2014-12-21 18:01:45 +0200

    Build: Include 04_compress_easy_mt.c in the tarball.


Date:   2014-12-21 18:00:38 +0200

    Fix build when --disable-threads is used.


Date:   2014-12-21 15:56:15 +0100

    po/fr: improve wording for help for --lzma1/--lzma2.


Date:   2014-12-21 15:55:48 +0100

    po/fr: missing line in translation of --extreme.


Date:   2014-12-21 14:32:33 +0200

    Update NEWS for 5.2.0.


Date:   2014-12-21 14:32:22 +0200

    Update NEWS for 5.0.8.


Date:   2014-12-21 14:07:54 +0200

    xz: Fix a comment.


Date:   2014-12-20 20:43:14 +0200

    Update INSTALL about the dependencies of the scripts.


Date:   2014-12-20 20:42:33 +0200

    Windows: Update build instructions.


Date:   2014-12-20 20:41:48 +0200

    Windows: Update the build script and README-Windows.txt.

    The 32-bit build is now for i686 or newer because the
    prebuilt MinGW-w64 toolchains include i686 code in the
    executables even if one uses -march=i486.

    The build script builds 32-bit SSE2 enabled version too.
    Run-time detection of SSE2 support would be nice (on any OS)
    but it's not implemented in XZ Utils yet.


Date:   2014-12-19 15:51:50 +0200

    Windows: Define TUKLIB_SYMBOL_PREFIX in config.h.

    It is to keep all symbols in the lzma_ namespace.


Date:   2014-12-16 21:00:09 +0200

    xz: Update the man page about --threads.


Date:   2014-12-16 20:57:43 +0200

    xz: Update the man page about --block-size.


Date:   2014-12-10 22:26:57 +0100

    po/fr: several more translation updates: reword and handle --ignore-check.


Date:   2014-12-10 22:23:01 +0100

    po/fr: yet another place where my email address had to be updated.


Date:   2014-12-10 22:22:20 +0100

    po/fr: fix several typos that have been around since the beginning.


Date:   2014-12-03 20:02:31 +0100

    po/fr: last batch of new translations for now.

    Four new error messages.


Date:   2014-12-03 20:01:32 +0100

    po/fr: translations for --threads, --block-size and --block-list.


Date:   2014-12-03 20:00:53 +0100

    po/fr: remove fuzzy marker for error messages that will be kept in English.

    The following is a copy of a comment inside fr.po:

    Note from translator on "file status flags".
    The following entry is kept un-translated on purpose. It is difficult to
    translate and should only happen in exceptional circumstances which means
    that translating would:
    - lose some of the meaning
    - make it more difficult to look up in search engines; it might happen one
    in
    a million times, if we dilute the error message in 20 languages, it will be
    almost impossible to find an explanation and support for the error.


Date:   2014-12-03 19:58:25 +0100

    po/fr: several minor updates and better wording.

    Meaning doesn't change at all: it's only for better wording and/or
    formatting of a few strings.


Date:   2014-12-03 19:56:12 +0100

    po/fr: update my email address and copyright years.


Date:   2014-11-26 10:08:26 +0100

    fr.po: commit file after only "update-po" so actual is readable.


Date:   2014-12-02 20:04:07 +0200

    liblzma: Document how lzma_mt.block_size affects memory usage.


Date:   2014-11-28 20:07:18 +0200

    Update INSTALL about a "make check" failure in test_scripts.sh.


Date:   2014-11-26 20:12:27 +0200

    Remove LZMA_UNSTABLE macro.


Date:   2014-11-26 20:10:33 +0200

    liblzma: Update lzma_stream_encoder_mt() API docs.


Date:   2014-11-25 12:32:05 +0200

    liblzma: Verify the filter chain in threaded encoder initialization.

    This way an invalid filter chain is detected at the Stream
    encoder initialization instead of delaying it to the first
    call to lzma_code() which triggers the initialization of
    the actual filter encoder(s).


Date:   2014-11-17 19:11:49 +0200

    Build: Update m4/ax_pthread.m4 from Autoconf Archive.


Date:   2014-11-17 18:52:21 +0200

    Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.


Date:   2014-11-17 18:43:19 +0200

    Build: Fix Autoconf warnings about escaped backquotes.

    Thanks to Daniel Richard G. for pointing out that it's
    good to sometimes run autoreconf -fi with -Wall.


Date:   2014-11-10 18:54:40 +0200

    xzdiff: Use mkdir if mktemp isn't available.


Date:   2014-11-10 18:45:01 +0200

    xzdiff: Create a temporary directory to hold a temporary file.

    This avoids the possibility of "File name too long" when
    creating a temp file when the input file name is very long.

    This also means that other users on the system can no longer
    see the input file names in /tmp (or whatever $TMPDIR is)
    since the temporary directory will have a generic name. This
    usually doesn't matter since on many systems one can see
    the arguments given to all processes anyway.

    The number X chars to mktemp where increased from 6 to 10.

    Note that with some shells temp files or dirs won't be used at all.


Date:   2014-11-10 15:38:47 +0200

    liblzma: Fix lzma_mt.preset in lzma_stream_encoder_mt_memusage().

    It read the filter chain from a wrong variable. This is a similar
    bug that was fixed in 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e.


Date:   2014-11-10 14:49:55 +0200

    Update THANKS.


Date:   2014-10-29 21:28:25 +0200

    Update .gitignore files.


Date:   2014-10-29 21:15:35 +0200

    Build: Prepare to support Automake's subdir-objects.

    Due to a bug in Automake, subdir-objects won't be enabled
    for now.

    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354

    Thanks to Daniel Richard G. for the original patches.


Date:   2014-10-24 20:09:29 +0300

    Translations: Update the Italian translation.

    Thanks to Milo Casagrande.


Date:   2014-10-18 18:51:45 +0300

    Translations: Update the Polish translation.

    Thanks to Jakub Bogusz.


Date:   2014-10-14 17:30:30 +0200

    l10n: de.po: Change translator email address.

    Although the old address is still working, the new one should
    be preferred. So this commit changes all three places in de.po
    accordingly.

    Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>


Date:   2014-10-14 17:30:29 +0200

    l10n: de.po: Update German translation

    Signed-off-by: Andre Noll <maan@systemlinux.org>


Date:   2014-10-14 17:30:28 +0200

    l10n: de.po: Fix typo: Schießen -> Schließen.

    That's a funny one since "schießen" means to shoot :)

    Signed-off-by: Andre Noll <maan@systemlinux.org>


Date:   2014-10-09 19:42:26 +0300

    Update THANKS.


Date:   2014-10-09 19:41:51 +0300

    Add support for AmigaOS/AROS to tuklib_physmem().

    Thanks to Fredrik Wikstrom.


Date:   2014-10-09 18:42:14 +0300

    xzgrep: Avoid passing both -q and -l to grep.

    The behavior of grep -ql varies:
      - GNU grep behaves like grep -q.
      - OpenBSD grep behaves like grep -l.

    POSIX doesn't make it 100 % clear what behavior is expected.
    Anyway, using both -q and -l at the same time makes no sense
    so both options simply should never be used at the same time.

    Thanks to Christian Weisgerber.


Date:   2014-09-25 09:22:45 +0700

    l10n: vi.po: Update Vietnamese translation

    Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>


Date:   2014-09-25 18:38:48 +0300

    Build: Detect supported compiler warning flags better.

    Clang and nowadays also GCC accept any -Wfoobar option
    but then may give a warning that an unknown warning option
    was specified. To avoid adding unsupported warning options,
    the options are now tested with -Werror.

    Thanks to Charles Diza.


Date:   2014-09-20 21:01:21 +0300

    Update NEWS for 5.0.7.


Date:   2014-09-20 19:42:56 +0300

    liblzma: Fix a portability problem in Makefile.am.

    POSIX supports $< only in inference rules (suffix rules).
    Using it elsewhere is a GNU make extension and doesn't
    work e.g. with OpenBSD make.

    Thanks to Christian Weisgerber for the patch.


Date:   2014-09-14 21:54:09 +0300

    Bump the version number to 5.1.4beta.


Date:   2014-09-14 21:50:13 +0300

    Update NEWS for 5.0.6 and 5.1.4beta.


Date:   2014-09-14 21:02:41 +0300

    Update TODO.


Date:   2014-08-05 22:32:36 +0300

    xz: Add --ignore-check.


Date:   2014-08-05 22:15:07 +0300

    liblzma: Add support for LZMA_IGNORE_CHECK.


Date:   2014-08-05 22:03:30 +0300

    liblzma: Add support for lzma_block.ignore_check.

    Note that this slightly changes how lzma_block_header_decode()
    has been documented. Earlier it said that the .version is set
    to the lowest required value, but now it says that the .version
    field is kept unchanged if possible. In practice this doesn't
    affect any old code, because before this commit the only
    possible .version was 0.


Date:   2014-08-04 19:25:58 +0300

    liblzma: Use lzma_memcmplen() in the BT3 match finder.

    I had missed this when writing the commit
    5db75054e900fa06ef5ade5f2c21dffdd5d16141.

    Thanks to Jun I Jin.


Date:   2014-08-04 00:25:44 +0300

    Update THANKS.


Date:   2014-08-03 21:32:25 +0300

    liblzma: SHA-256: Optimize the Maj macro slightly.

    The Maj macro is used where multiple things are added
    together, so making Maj a sum of two expressions allows
    some extra freedom for the compiler to schedule the
    instructions.

    I learned this trick from
    <http://www.hackersdelight.org/corres.txt>.


Date:   2014-08-03 21:08:12 +0300

    liblzma: SHA-256: Optimize the way rotations are done.

    This looks weird because the rotations become sequential,
    but it helps quite a bit on both 32-bit and 64-bit x86:

      - It requires fewer instructions on two-operand
        instruction sets like x86.

      - It requires one register less which matters especially
        on 32-bit x86.

    I hope this doesn't hurt other archs.

    I didn't invent this idea myself, but I don't remember where
    I saw it first.


Date:   2014-08-03 20:38:13 +0300

    liblzma: SHA-256: Remove the GCC #pragma that became unneeded.

    The unrolling in the previous commit should avoid the
    situation where a compiler may think that an uninitialized
    variable might be accessed.


Date:   2014-08-03 20:33:38 +0300

    liblzma: SHA-256: Unroll a little more.

    This way a branch isn't needed for each operation
    to choose between blk0 and blk2, and still the code
    doesn't grow as much as it would with full unrolling.


Date:   2014-08-03 19:56:43 +0300

    liblzma: SHA-256: Do the byteswapping without a temporary buffer.


Date:   2014-07-25 22:38:28 +0300

    liblzma: Use lzma_memcmplen() in normal mode of LZMA.

    Two locations were not changed yet because the simplest change
    assumes that the initial "len" may be greater than "limit".


Date:   2014-07-25 22:30:38 +0300

    liblzma: Simplify LZMA fast mode code by using memcmp().


Date:   2014-07-25 22:29:49 +0300

    liblzma: Use lzma_memcmplen() in fast mode of LZMA.


Date:   2014-07-25 21:16:23 +0300

    Update THANKS.


Date:   2014-07-25 21:15:07 +0300

    liblzma: Use lzma_memcmplen() in the match finders.

    This doesn't change the match finder output.


Date:   2014-07-25 20:57:20 +0300

    liblzma: Add lzma_memcmplen() for fast memory comparison.

    This commit just adds the function. Its uses will be in
    separate commits.

    This hasn't been tested much yet and it's perhaps a bit early
    to commit it but if there are bugs they should get found quite
    quickly.

    Thanks to Jun I Jin from Intel for help and for pointing out
    that string comparison needs to be optimized in liblzma.


Date:   2014-07-12 21:10:09 +0300

    Update THANKS.


Date:   2014-07-12 20:06:08 +0300

    Translations: Add Vietnamese translation.

    Thanks to Trần Ngọc Quân.


Date:   2014-06-29 20:54:14 +0300

    xz: Update the help message of a few options.

    Updated: --threads, --block-size, and --block-list
    Added: --flush-timeout


Date:   2014-06-18 22:07:06 +0300

    xz: Use lzma_cputhreads() instead of own copy of tuklib_cpucores().


Date:   2014-06-18 22:04:24 +0300

    liblzma: Add lzma_cputhreads().


Date:   2014-06-18 19:11:52 +0300

    xz: Check for filter chain compatibility for --flush-timeout.

    This avoids LZMA_PROG_ERROR from lzma_code() with filter chains
    that don't support LZMA_SYNC_FLUSH.


Date:   2014-06-13 19:21:54 +0300

    xzgrep: List xzgrep_expected_output in tests/Makefile.am.


Date:   2014-06-13 18:58:22 +0300

    xzgrep: Improve the test script.

    Now it should be close to the functionality of the original
    version by Pavel Raiskup.


Date:   2014-06-11 21:03:25 +0300

    xzgrep: Add a test for the previous fix.

    This is a simplified version of Pavel Raiskup's
    original patch.


Date:   2014-06-11 20:43:28 +0300

    xzgrep: exit 0 when at least one file matches.

    Mimic the original grep behavior and return exit_success when
    at least one xz compressed file matches given pattern.

    Original bugreport:
    https://bugzilla.redhat.com/show_bug.cgi?id=1108085

    Thanks to Pavel Raiskup for the patch.


Date:   2014-06-09 21:21:24 +0300

    xz: Force single-threaded mode when --flush-timeout is used.


Date:   2014-05-25 22:05:39 +0300

    Update THANKS.


Date:   2014-05-25 21:45:56 +0300

    liblzma: Use lzma_alloc_zero() in LZ encoder initialization.

    This avoids a memzero() call for a newly-allocated memory,
    which can be expensive when encoding small streams with
    an over-sized dictionary.

    To avoid using lzma_alloc_zero() for memory that doesn't
    need to be zeroed, lzma_mf.son is now allocated separately,
    which requires handling it separately in normalize() too.

    Thanks to Vincenzo Innocente for reporting the problem.


Date:   2014-05-25 19:25:57 +0300

    liblzma: Add the internal function lzma_alloc_zero().


Date:   2014-05-08 18:03:09 +0300

    xz: Fix uint64_t vs. size_t which broke 32-bit build.

    Thanks to Christian Hesse.


Date:   2014-05-04 11:09:11 +0300

    Docs: Update comments to refer to lzma/lzma12.h in example programs.


Date:   2014-05-04 11:07:17 +0300

    liblzma: Rename the private API header lzma/lzma.h to lzma/lzma12.h.

    It can be confusing that two header files have the same name.
    The public API file is still lzma.h.


Date:   2014-04-25 17:53:42 +0300

    Build: Fix the combination of --disable-xzdec --enable-lzmadec.

    In this case "make install" could fail if the man page directory
    didn't already exist at the destination. If it did exist, a
    dangling symlink was created there. Now the link is omitted
    instead. This isn't the best fix but it's better than the old
    behavior.


Date:   2014-04-25 17:44:26 +0300

    Build: Add --disable-doc to configure.


Date:   2014-04-24 18:06:24 +0300

    Update INSTALL.

    Add a note about failing "make check". The source of
    the problem should be fixed in libtool (if it really is
    a libtool bug and not mine) but I'm unable to spend time
    on that for now. Thanks to Nelson H. F. Beebe for reporting
    the issue.

    Add a note about a possible need to run "ldconfig" after
    "make install".


Date:   2014-04-09 17:26:10 +0300

    xz: Rename a variable to avoid a namespace collision on Solaris.

    I don't know the details but I have an impression that there's
    no problem in practice if using GCC since people have built xz
    with GCC (without patching xz), but renaming the variable cannot
    hurt either.

    Thanks to Mark Ashley.


Date:   2014-01-29 20:19:41 +0200

    Docs: Add example program for threaded encoding.

    I didn't add -DLZMA_UNSTABLE to Makefile so one has to
    specify it manually as long as LZMA_UNSTABLE is needed.


Date:   2014-01-29 20:13:51 +0200

    liblzma: Fix lzma_mt.preset not working with lzma_stream_encoder_mt().

    It read the filter chain from a wrong variable.


Date:   2014-01-20 11:20:40 +0200

    liblzma: Fix typo in a comment.


Date:   2014-01-12 19:38:43 +0200

    Windows: Add config.h for building liblzma with MSVC 2013.

    This is for building liblzma. Building xz tool too requires
    a little more work. Maybe it will be supported, but for most
    MSVC users it's enough to be able to build liblzma.

    C99 support in MSVC 2013 is almost usable which is a big
    improvement over earlier versions. It's "almost" because
    there's a dumb bug that breaks mixed declarations after
    an "if" statements unless the "if" statement uses braces:

    https://connect.microsoft.com/VisualStudio/feedback/details/808650/visual-studio-2013-c99-compiler-bug
    https://connect.microsoft.com/VisualStudio/feedback/details/808472/c99-support-of-mixed-declarations-and-statements-fails-with-certain-types-and-constructs

    Hopefully it will get fixed. Then liblzma should be
    compilable with MSVC 2013 without patching.


Date:   2014-01-12 17:41:14 +0200

    xz: Fix a comment.


Date:   2014-01-12 17:04:33 +0200

    Windows: Add MSVC defines for inline and restrict keywords.


Date:   2014-01-12 16:44:52 +0200

    liblzma: Avoid C99 compound literal arrays.

    MSVC 2013 doesn't like them. Maybe they aren't so good
    for readability either since many aren't used to them.


Date:   2014-01-12 12:50:30 +0200

    liblzma: Remove a useless C99ism from sha256.c.

    Unsurprisingly it makes no difference in compiled output.


Date:   2014-01-12 12:17:08 +0200

    xz: Fix use of wrong variable.

    Since the only call to suffix_set() uses optarg
    as the argument, fixing this bug doesn't change
    the behavior of the program.


Date:   2014-01-12 12:11:36 +0200

    Fix typos in comments.


Date:   2013-11-26 18:20:16 +0200

    Update THANKS.


Date:   2013-11-26 18:20:09 +0200

    liblzma: Document the need for block->check for lzma_block_header_decode().

    Thanks to Tomer Chachamu.


Date:   2013-11-12 16:38:57 +0200

    xz: Update the man page about --block-size and --block-list.


Date:   2013-11-12 16:30:53 +0200

    Update THANKS.


Date:   2013-11-12 16:29:48 +0200

    xz: Make --block-list and --block-size work together in single-threaded.

    Previously, --block-list and --block-size only worked together
    in threaded mode. Boundaries are specified by --block-list, but
    --block-size specifies the maximum size for a Block. Now this
    works in single-threaded mode too.

    Thanks to James M Leddy for the original patch.


Date:   2013-10-26 13:26:14 +0300

    Bump the version number to 5.1.3alpha.


Date:   2013-10-26 13:25:02 +0300

    Update NEWS for 5.1.3alpha.


Date:   2013-10-26 12:47:04 +0300

    Update TODO.


Date:   2013-10-25 22:41:28 +0300

    xz: Document behavior of --block-list with threads.

    This needs to be updated before 5.2.0.


Date:   2013-10-22 20:03:12 +0300

    xz: Document --flush-timeout=TIMEOUT on the man page.


Date:   2013-10-22 19:51:55 +0300

    xz: Take advantage of LZMA_FULL_BARRIER with --block-list.

    Now if --block-list is used in threaded mode, the encoder
    won't need to flush at each Block boundary specified via
    --block-list. This improves performance a lot, making
    threading helpful with --block-list.

    The flush timer was reset after LZMA_FULL_FLUSH but since
    LZMA_FULL_BARRIER doesn't flush, resetting the timer is
    no longer done.


Date:   2013-10-02 20:05:23 +0300

    liblzma: Support LZMA_FULL_FLUSH and _BARRIER in threaded encoder.

    Now --block-list=SIZES works with in the threaded mode too,
    although the performance is still bad due to the use of
    LZMA_FULL_FLUSH instead of the new LZMA_FULL_BARRIER.


Date:   2013-10-02 12:55:11 +0300

    liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.

    In the single-threaded encoder LZMA_FULL_BARRIER is simply
    an alias for LZMA_FULL_FLUSH.


Date:   2013-09-17 11:57:51 +0300

    liblzma: Add block_buffer_encoder.h into Makefile.inc.

    This should have been in b465da5988dd59ad98fda10c2e4ea13d0b9c73bc.


Date:   2013-09-17 11:55:38 +0300

    xz: Add a missing test for TUKLIB_DOSLIKE.


Date:   2013-09-17 11:52:28 +0300

    Add native threading support on Windows.

    Now liblzma only uses "mythread" functions and types
    which are defined in mythread.h matching the desired
    threading method.

    Before Windows Vista, there is no direct equivalent to
    pthread condition variables. Since this package doesn't
    use pthread_cond_broadcast(), pre-Vista threading can
    still be kept quite simple. The pre-Vista code doesn't
    use anything that wasn't already available in Windows 95,
    so the binaries should run even on Windows 95 if someone
    happens to care.


Date:   2013-09-11 14:40:35 +0300

    Build: Remove a comment about Automake 1.10 from configure.ac.

    The previous commit supports silent rules and that requires
    Automake 1.11.


Date:   2013-09-09 20:37:03 +0300

    Build: Create liblzma.pc in a src/liblzma/Makefile.am.

    Previously it was done in configure, but doing that goes
    against the Autoconf manual. Autoconf requires that it is
    possible to override e.g. prefix after running configure
    and that doesn't work correctly if liblzma.pc is created
    by configure.

    A potential downside of this change is that now e.g.
    libdir in liblzma.pc is a standalone string instead of
    being defined via ${prefix}, so if one overrides prefix
    when running pkg-config the libdir won't get the new value.
    I don't know if this matters in practice.

    Thanks to Vincent Torri.


Date:   2013-08-04 15:24:09 +0300

    Fix the previous commit which broke the build.

    Apparently I didn't even compile-test the previous commit.

    Thanks to Christian Hesse.


Date:   2013-08-03 13:52:58 +0300

    Windows: Add Windows support to tuklib_cpucores().

    It is used for Cygwin too. I'm not sure if that is
    a good or bad idea.

    Thanks to Vincent Torri.


Date:   2013-08-02 15:59:46 +0200

    macosx: separate liblzma package


Date:   2013-08-02 15:58:44 +0200

    macosx: set minimum to leopard


Date:   2011-08-07 13:13:30 +0200

    move configurables into variables


Date:   2013-07-15 14:08:41 +0300

    Update THANKS.


Date:   2013-07-15 14:08:02 +0300

    Build: Fix the detection of missing CRC32.

    Thanks to Vincent Torri.


Date:   2013-07-04 14:18:46 +0300

    xz: Add preliminary support for --flush-timeout=TIMEOUT.

    When --flush-timeout=TIMEOUT is used, xz will use
    LZMA_SYNC_FLUSH if read() would block and at least
    TIMEOUT milliseconds has elapsed since the previous flush.

    This can be useful in realtime-like use cases where the
    data is simultanously decompressed by another process
    (possibly on a different computer). If new uncompressed
    input data is produced slowly, without this option xz could
    buffer the data for a long time until it would become
    decompressible from the output.

    If TIMEOUT is 0, the feature is disabled. This is the default.

    This commit affects the compression side. Using xz for
    the decompression side for the above purpose doesn't work
    yet so well because there is quite a bit of input and
    output buffering when decompressing.

    The --long-help or man page were not updated yet.
    The details of this feature may change.


Date:   2013-07-04 13:41:03 +0300

    xz: Don't set src_eof=true after an I/O error because it's useless.


Date:   2013-07-04 13:25:11 +0300

    xz: Fix the test when to read more input.

    Testing for end of file was no longer correct after full flushing
    became possible with --block-size=SIZE and --block-list=SIZES.
    There was no bug in practice though because xz just made a few
    unneeded zero-byte reads.


Date:   2013-07-04 12:51:57 +0300

    xz: Move some of the timing code into mytime.[hc].

    This switches units from microseconds to milliseconds.

    New clock_gettime(CLOCK_MONOTONIC) will be used if available.
    There is still a fallback to gettimeofday().


Date:   2013-07-01 14:35:03 +0300

    Update THANKS.


Date:   2013-07-01 14:34:11 +0300

    xz: Silence a warning seen with _FORTIFY_SOURCE=2.

    Thanks to Christian Hesse.
  • Loading branch information...
1 parent f6823dd commit c473491334f2357cfa9491820302a3fd3ac9200c christos committed Apr 17, 2015
Showing with 17,617 additions and 5,296 deletions.
  1. +3 −3 external/public-domain/xz/dist/AUTHORS
  2. +7,151 −3,276 external/public-domain/xz/dist/ChangeLog
  3. +128 −38 external/public-domain/xz/dist/INSTALL
  4. +360 −0 external/public-domain/xz/dist/NEWS
  5. +31 −27 external/public-domain/xz/dist/README
  6. +28 −0 external/public-domain/xz/dist/THANKS
  7. +53 −9 external/public-domain/xz/dist/TODO
  8. +76 −8 external/public-domain/xz/dist/config.h.in
  9. +232 −50 external/public-domain/xz/dist/configure.ac
  10. +31 −0 external/public-domain/xz/dist/doc/examples/00_README.txt
  11. +297 −0 external/public-domain/xz/dist/doc/examples/01_compress_easy.c
  12. +287 −0 external/public-domain/xz/dist/doc/examples/02_decompress.c
  13. +193 −0 external/public-domain/xz/dist/doc/examples/03_compress_custom.c
  14. +206 −0 external/public-domain/xz/dist/doc/examples/04_compress_easy_mt.c
  15. +127 −0 external/public-domain/xz/dist/doc/examples_old/xz_pipe_comp.c
  16. +123 −0 external/public-domain/xz/dist/doc/examples_old/xz_pipe_decomp.c
  17. +12 −12 external/public-domain/xz/dist/doc/faq.txt
  18. +38 −37 external/public-domain/xz/dist/doc/history.txt
  19. +38 −2 external/public-domain/xz/dist/m4/tuklib_cpucores.m4
  20. +1 −1 external/public-domain/xz/dist/m4/tuklib_integer.m4
  21. +2 −1 external/public-domain/xz/dist/m4/tuklib_physmem.m4
  22. +113 −0 external/public-domain/xz/dist/macosx/build.sh
  23. BIN external/public-domain/xz/dist/po/cs.gmo
  24. +231 −122 external/public-domain/xz/dist/po/cs.po
  25. BIN external/public-domain/xz/dist/po/de.gmo
  26. +264 −129 external/public-domain/xz/dist/po/de.po
  27. BIN external/public-domain/xz/dist/po/fr.gmo
  28. +298 −182 external/public-domain/xz/dist/po/fr.po
  29. BIN external/public-domain/xz/dist/po/it.gmo
  30. +261 −128 external/public-domain/xz/dist/po/it.po
  31. BIN external/public-domain/xz/dist/po/pl.gmo
  32. +256 −126 external/public-domain/xz/dist/po/pl.po
  33. BIN external/public-domain/xz/dist/po/vi.gmo
  34. +970 −0 external/public-domain/xz/dist/po/vi.po
  35. +492 −13 external/public-domain/xz/dist/src/common/mythread.h
  36. +16 −3 external/public-domain/xz/dist/src/common/sysdefs.h
  37. +31 −2 external/public-domain/xz/dist/src/common/tuklib_cpucores.c
  38. +12 −12 external/public-domain/xz/dist/src/common/tuklib_integer.h
  39. +3 −1 external/public-domain/xz/dist/src/common/tuklib_open_stdxxx.c
  40. +7 −0 external/public-domain/xz/dist/src/common/tuklib_physmem.c
  41. +1 −1 external/public-domain/xz/dist/src/liblzma/api/lzma.h
  42. +67 −14 external/public-domain/xz/dist/src/liblzma/api/lzma/base.h
  43. +64 −13 external/public-domain/xz/dist/src/liblzma/api/lzma/block.h
  44. +198 −3 external/public-domain/xz/dist/src/liblzma/api/lzma/container.h
  45. +7 −6 external/public-domain/xz/dist/src/liblzma/api/lzma/filter.h
  46. +14 −0 external/public-domain/xz/dist/src/liblzma/api/lzma/hardware.h
  47. +8 −8 external/public-domain/xz/dist/src/liblzma/api/lzma/index.h
  48. +2 −2 external/public-domain/xz/dist/src/liblzma/api/lzma/index_hash.h
  49. +420 −0 external/public-domain/xz/dist/src/liblzma/api/lzma/lzma12.h
  50. +2 −2 external/public-domain/xz/dist/src/liblzma/api/lzma/version.h
  51. +75 −8 external/public-domain/xz/dist/src/liblzma/check/check.h
  52. +1 −1 external/public-domain/xz/dist/src/liblzma/check/crc32_fast.c
  53. +30 −35 external/public-domain/xz/dist/src/liblzma/check/sha256.c
  54. +17 −11 external/public-domain/xz/dist/src/liblzma/common/alone_decoder.c
  55. +3 −2 external/public-domain/xz/dist/src/liblzma/common/alone_decoder.h
  56. +4 −4 external/public-domain/xz/dist/src/liblzma/common/alone_encoder.c
  57. +4 −4 external/public-domain/xz/dist/src/liblzma/common/auto_decoder.c
  58. +1 −1 external/public-domain/xz/dist/src/liblzma/common/block_buffer_decoder.c
  59. +65 −33 external/public-domain/xz/dist/src/liblzma/common/block_buffer_encoder.c
  60. +24 −0 external/public-domain/xz/dist/src/liblzma/common/block_buffer_encoder.h
  61. +17 −7 external/public-domain/xz/dist/src/liblzma/common/block_decoder.c
  62. +1 −1 external/public-domain/xz/dist/src/liblzma/common/block_decoder.h
  63. +5 −5 external/public-domain/xz/dist/src/liblzma/common/block_encoder.c
  64. +1 −1 external/public-domain/xz/dist/src/liblzma/common/block_encoder.h
  65. +12 −4 external/public-domain/xz/dist/src/liblzma/common/block_header_decoder.c
  66. +1 −1 external/public-domain/xz/dist/src/liblzma/common/block_header_encoder.c
  67. +1 −1 external/public-domain/xz/dist/src/liblzma/common/block_util.c
  68. +67 −12 external/public-domain/xz/dist/src/liblzma/common/common.c
  69. +44 −10 external/public-domain/xz/dist/src/liblzma/common/common.h
  70. +2 −2 external/public-domain/xz/dist/src/liblzma/common/easy_buffer_encoder.c
  71. +0 −1 external/public-domain/xz/dist/src/liblzma/common/easy_encoder.c
  72. +2 −1 external/public-domain/xz/dist/src/liblzma/common/filter_buffer_decoder.c
  73. +4 −3 external/public-domain/xz/dist/src/liblzma/common/filter_buffer_encoder.c
  74. +2 −2 external/public-domain/xz/dist/src/liblzma/common/filter_common.c
  75. +1 −1 external/public-domain/xz/dist/src/liblzma/common/filter_common.h
  76. +4 −3 external/public-domain/xz/dist/src/liblzma/common/filter_decoder.c
  77. +1 −1 external/public-domain/xz/dist/src/liblzma/common/filter_decoder.h
  78. +23 −25 external/public-domain/xz/dist/src/liblzma/common/filter_encoder.c
  79. +3 −3 external/public-domain/xz/dist/src/liblzma/common/filter_encoder.h
  80. +1 −1 external/public-domain/xz/dist/src/liblzma/common/filter_flags_decoder.c
  81. +22 −0 external/public-domain/xz/dist/src/liblzma/common/hardware_cputhreads.c
  82. +18 −15 external/public-domain/xz/dist/src/liblzma/common/index.c
  83. +6 −6 external/public-domain/xz/dist/src/liblzma/common/index_decoder.c
  84. +3 −3 external/public-domain/xz/dist/src/liblzma/common/index_encoder.c
  85. +1 −1 external/public-domain/xz/dist/src/liblzma/common/index_encoder.h
  86. +4 −2 external/public-domain/xz/dist/src/liblzma/common/index_hash.c
  87. +175 −0 external/public-domain/xz/dist/src/liblzma/common/memcmplen.h
  88. +184 −0 external/public-domain/xz/dist/src/liblzma/common/outqueue.c
  89. +156 −0 external/public-domain/xz/dist/src/liblzma/common/outqueue.h
  90. +1 −1 external/public-domain/xz/dist/src/liblzma/common/stream_buffer_decoder.c
  91. +2 −1 external/public-domain/xz/dist/src/liblzma/common/stream_buffer_encoder.c
  92. +17 −6 external/public-domain/xz/dist/src/liblzma/common/stream_decoder.c
  93. +3 −2 external/public-domain/xz/dist/src/liblzma/common/stream_decoder.h
  94. +13 −12 external/public-domain/xz/dist/src/liblzma/common/stream_encoder.c
  95. +1,131 −0 external/public-domain/xz/dist/src/liblzma/common/stream_encoder_mt.c
  96. +2 −2 external/public-domain/xz/dist/src/liblzma/delta/delta_common.c
  97. +3 −3 external/public-domain/xz/dist/src/liblzma/delta/delta_decoder.c
  98. +3 −2 external/public-domain/xz/dist/src/liblzma/delta/delta_decoder.h
  99. +3 −3 external/public-domain/xz/dist/src/liblzma/delta/delta_encoder.c
  100. +2 −1 external/public-domain/xz/dist/src/liblzma/delta/delta_encoder.h
  101. +1 −1 external/public-domain/xz/dist/src/liblzma/delta/delta_private.h
  102. +108 −0 external/public-domain/xz/dist/src/liblzma/liblzma.map
  103. +1 −1 external/public-domain/xz/dist/src/liblzma/liblzma.pc.in
  104. +4 −4 external/public-domain/xz/dist/src/liblzma/lz/lz_decoder.c
  105. +4 −3 external/public-domain/xz/dist/src/liblzma/lz/lz_decoder.h
  106. +72 −50 external/public-domain/xz/dist/src/liblzma/lz/lz_encoder.c
  107. +4 −4 external/public-domain/xz/dist/src/liblzma/lz/lz_encoder.h
  108. +1 −1 external/public-domain/xz/dist/src/liblzma/lz/lz_encoder_hash.h
  109. +30 −39 external/public-domain/xz/dist/src/liblzma/lz/lz_encoder_mf.c
  110. +28 −27 external/public-domain/xz/dist/src/liblzma/lzma/fastpos.h
  111. +4 −4 external/public-domain/xz/dist/src/liblzma/lzma/lzma2_decoder.c
  112. +3 −2 external/public-domain/xz/dist/src/liblzma/lzma/lzma2_decoder.h
  113. +14 −4 external/public-domain/xz/dist/src/liblzma/lzma/lzma2_encoder.c
  114. +3 −1 external/public-domain/xz/dist/src/liblzma/lzma/lzma2_encoder.h
  115. +23 −22 external/public-domain/xz/dist/src/liblzma/lzma/lzma_common.h
  116. +39 −35 external/public-domain/xz/dist/src/liblzma/lzma/lzma_decoder.c
  117. +4 −3 external/public-domain/xz/dist/src/liblzma/lzma/lzma_decoder.h
  118. +32 −31 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder.c
  119. +3 −2 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder.h
  120. +9 −19 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_fast.c
  121. +67 −81 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_normal.c
  122. +5 −3 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder_presets.c
  123. +8 −8 external/public-domain/xz/dist/src/liblzma/lzma/lzma_encoder_private.h
  124. +9 −3 external/public-domain/xz/dist/src/liblzma/rangecoder/range_decoder.h
  125. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/arm.c
  126. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/armthumb.c
  127. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/ia64.c
  128. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/powerpc.c
  129. +6 −9 external/public-domain/xz/dist/src/liblzma/simple/simple_coder.c
  130. +24 −12 external/public-domain/xz/dist/src/liblzma/simple/simple_coder.h
  131. +1 −1 external/public-domain/xz/dist/src/liblzma/simple/simple_decoder.c
  132. +1 −1 external/public-domain/xz/dist/src/liblzma/simple/simple_decoder.h
  133. +3 −3 external/public-domain/xz/dist/src/liblzma/simple/simple_private.h
  134. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/sparc.c
  135. +5 −3 external/public-domain/xz/dist/src/liblzma/simple/x86.c
  136. +68 −0 external/public-domain/xz/dist/src/liblzma/validate_map.sh
  137. +2 −2 external/public-domain/xz/dist/src/lzmainfo/lzmainfo.1
  138. +109 −3 external/public-domain/xz/dist/src/xz/args.c
  139. +2 −0 external/public-domain/xz/dist/src/xz/args.h
  140. +365 −109 external/public-domain/xz/dist/src/xz/coder.c
  141. +16 −1 external/public-domain/xz/dist/src/xz/coder.h
  142. +313 −79 external/public-domain/xz/dist/src/xz/file_io.c
  143. +21 −0 external/public-domain/xz/dist/src/xz/file_io.h
  144. +19 −13 external/public-domain/xz/dist/src/xz/hardware.c
  145. +4 −5 external/public-domain/xz/dist/src/xz/hardware.h
  146. +90 −22 external/public-domain/xz/dist/src/xz/list.c
  147. +5 −0 external/public-domain/xz/dist/src/xz/main.c
  148. +69 −50 external/public-domain/xz/dist/src/xz/message.c
  149. +89 −0 external/public-domain/xz/dist/src/xz/mytime.c
  150. +47 −0 external/public-domain/xz/dist/src/xz/mytime.h
  151. +2 −2 external/public-domain/xz/dist/src/xz/options.c
  152. +2 −0 external/public-domain/xz/dist/src/xz/private.h
  153. +12 −5 external/public-domain/xz/dist/src/xz/signals.c
  154. +168 −10 external/public-domain/xz/dist/src/xz/suffix.c
  155. +12 −2 external/public-domain/xz/dist/src/xz/util.c
  156. +249 −38 external/public-domain/xz/dist/src/xz/xz.1
  157. +5 −5 external/public-domain/xz/dist/src/xzdec/xzdec.1
  158. +5 −5 external/public-domain/xz/dist/src/xzdec/xzdec.c
  159. +26 −28 external/public-domain/xz/dist/tests/compress_prepared_bcj_sparc.base64
  160. +29 −31 external/public-domain/xz/dist/tests/compress_prepared_bcj_x86.base64
  161. +2 −1 external/public-domain/xz/dist/tests/create_compress_files.c
  162. +4 −0 external/public-domain/xz/dist/tests/files/README
  163. +2 −2 external/public-domain/xz/dist/tests/files/bad-0cat-alone.xz.base64
  164. +2 −2 external/public-domain/xz/dist/tests/files/bad-0cat-header_magic.xz.base64
  165. +2 −2 external/public-domain/xz/dist/tests/files/bad-0catpad-empty.xz.base64
  166. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-block_header-1.xz.base64
  167. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-block_header-2.xz.base64
  168. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-block_header-3.xz.base64
  169. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-block_header-4.xz.base64
  170. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-block_header-5.xz.base64
  171. +4 −0 external/public-domain/xz/dist/tests/files/bad-1-block_header-6.xz.base64
  172. +2 −2 external/public-domain/xz/dist/tests/files/bad-1-check-crc32.xz.base64
Sorry, we could not display the entire diff because it was too big.
View
6 external/public-domain/xz/dist/AUTHORS
@@ -16,11 +16,11 @@ Authors of XZ Utils
Some scripts have been adapted from gzip. The original versions
were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
- Andrew Dudman helped adapting the script and their man pages for
+ Andrew Dudman helped adapting the scripts and their man pages for
XZ Utils.
- The GNU Autotools based build system contains files from many authors,
- which I'm not trying list here.
+ The GNU Autotools-based build system contains files from many authors,
+ which I'm not trying to list here.
Several people have contributed fixes or reported bugs. Most of them
are mentioned in the file THANKS.
View
10,427 external/public-domain/xz/dist/ChangeLog
7,151 additions, 3,276 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
166 external/public-domain/xz/dist/INSTALL
@@ -6,13 +6,14 @@ XZ Utils Installation
1. Supported platforms
1.1. Compilers
1.2. Platform-specific notes
- 1.2.1. IRIX
- 1.2.2. MINIX 3
- 1.2.3. OpenVMS
- 1.2.4. Solaris, OpenSolaris, and derivatives
- 1.2.5. Tru64
- 1.2.6. Windows
- 1.2.7. DOS
+ 1.2.1. AIX
+ 1.2.2. IRIX
+ 1.2.3. MINIX 3
+ 1.2.4. OpenVMS
+ 1.2.5. Solaris, OpenSolaris, and derivatives
+ 1.2.6. Tru64
+ 1.2.7. Windows
+ 1.2.8. DOS
1.3. Adding support for new platforms
2. configure options
2.1. Static vs. dynamic linking of liblzma
@@ -25,6 +26,8 @@ XZ Utils Installation
4.2. "No POSIX conforming shell (sh) was found."
4.3. configure works but build fails at crc32_x86.S
4.4. Lots of warnings about symbol visibility
+ 4.5. "make check" fails
+ 4.6. liblzma.so (or similar) not found when running xz
0. Preface
@@ -63,7 +66,14 @@ XZ Utils Installation
1.2. Platform-specific notes
-1.2.1. IRIX
+1.2.1. AIX
+
+ If you use IBM XL C compiler, pass CC=xlc_r to configure. If
+ you use CC=xlc instead, you must disable threading support
+ with --disable-threads (usually not recommended).
+
+
+1.2.2. IRIX
MIPSpro 7.4.4m has been reported to produce broken code if using
the -O2 optimization flag ("make check" fails). Using -O1 should
@@ -74,24 +84,26 @@ XZ Utils Installation
putting "-64" to CFLAGS to build a 64-bit version might help too.
-1.2.2. MINIX 3
+1.2.3. MINIX 3
The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
which doesn't support C99. Install GCC to compile XZ Utils.
- MINIX 3.1.8 (and possibly some other versions too) has bugs in
- /usr/include/stdint.h, which has to be patched before XZ Utils
- can be compiled correctly. See
+ MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has
+ to be patched before XZ Utils can be compiled correctly. See
<http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
+ MINIX 3.2.0 and later use a different libc and aren't affected by
+ the above bug.
+
XZ Utils doesn't have code to detect the amount of physical RAM and
number of CPU cores on MINIX 3.
See section 4.4 in this file about symbol visibility warnings (you
may want to pass gl_cv_cc_visibility=no to configure).
-1.2.3. OpenVMS
+1.2.4. OpenVMS
XZ Utils can be built for OpenVMS, but the build system files
are not included in the XZ Utils source package. The required
@@ -101,7 +113,7 @@ XZ Utils Installation
http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
-1.2.4. Solaris, OpenSolaris, and derivatives
+1.2.5. Solaris, OpenSolaris, and derivatives
The following linker error has been reported on some x86 systems:
@@ -110,35 +122,42 @@ XZ Utils Installation
This can be worked around by passing gl_cv_cc_visibility=no
as an argument to the configure script.
+ test_scripts.sh in "make check" may fail if good enough tools are
+ missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). See sections
+ 4.5 and 3.2 for more information.
+
-1.2.5. Tru64
+1.2.6. Tru64
If you try to use the native C compiler on Tru64 (passing CC=cc to
configure), you may need the workaround mention in section 4.1 in
this file (pass also ac_cv_prog_cc_c99= to configure).
-1.2.6. Windows
+1.2.7. Windows
Building XZ Utils on Windows is supported under MinGW + MSYS,
MinGW-w64 + MSYS, and Cygwin. There is windows/build.bash to
ease packaging XZ Utils with MinGW(-w64) + MSYS into a
redistributable .zip or .7z file. See windows/INSTALL-Windows.txt
for more information.
- It might be possible to build liblzma with a non-GNU toolchain too,
- but that will probably require writing a separate makefile. Building
+ It may be possible to build liblzma with other toolchains too, but
+ that will probably require writing a separate makefile. Building
the command line tools with non-GNU toolchains will be harder than
building only liblzma.
- Even if liblzma is built with MinGW, the resulting DLL or static
- library can be used by other compilers and linkers, including MSVC.
- Thus, it shouldn't be a problem to use MinGW to build liblzma even
- if you cannot use MinGW to build the rest of your project. See
+ Starting with XZ Utils 5.2.0, building liblzma (not the whole
+ XZ Utils) should work with MSVC 2013 update 2 or later using
+ windows/config.h. No project files or makefiles are included yet,
+ so the build process isn't as convenient yet as it could be.
+
+ Even if liblzma is built with MinGW(-w64), the resulting DLL can
+ be used by other compilers and linkers, including MSVC. See
windows/README-Windows.txt for details.
-1.2.7. DOS
+1.2.8. DOS
There is an experimental Makefile in the "dos" directory to build
XZ Utils on DOS using DJGPP. Support for long file names (LFN) is
@@ -241,6 +260,12 @@ XZ Utils Installation
Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
and their symlinks.
+ --disable-doc
+ Don't install the documentation files to $docdir
+ (often /usr/doc/xz or /usr/local/doc/xz). Man pages
+ will still be installed. The $docdir can be changed
+ with --docdir=DIR.
+
--disable-assembler
liblzma includes some assembler optimizations. Currently
there is only assembler code for CRC32 and CRC64 for
@@ -297,16 +322,42 @@ XZ Utils Installation
the amount of RAM on the operating system you use. See
src/common/tuklib_physmem.c for details.
- --disable-threads
- Disable threading support. This makes some things
- thread-unsafe, meaning that if multithreaded application
- calls liblzma functions from more than one thread,
- something bad may happen.
+ --enable-threads=METHOD
+ Threading support is enabled by default so normally there
+ is no need to specify this option.
+
+ Supported values for METHOD:
+
+ yes Autodetect the threading method. If none
+ is found, configure will give an error.
+
+ posix Use POSIX pthreads. This is the default
+ except on Windows outside Cygwin.
+
+ win95 Use Windows 95 compatible threads. This
+ is compatible with Windows XP and later
+ too. This is the default for 32-bit x86
+ Windows builds. The `win95' threading is
+ incompatible with --enable-small.
+
+ vista Use Windows Vista compatible threads. The
+ resulting binaries won't run on Windows XP
+ or older. This is the default for Windows
+ excluding 32-bit x86 builds (that is, on
+ x86-64 the default is `vista').
- Use this option if threading support causes you trouble,
- or if you know that you will use liblzma only from
- single-threaded applications and want to avoid dependency
- on libpthread.
+ no Disable threading support. This is the
+ same as using --disable-threads.
+ NOTE: If combined with --enable-small, the
+ resulting liblzma won't be thread safe,
+ that is, if a multi-threaded application
+ calls any liblzma functions from more than
+ one thread, something bad may happen.
+
+ --enable-symbol-versions
+ Use symbol versioning for liblzma. This is enabled by
+ default on GNU/Linux, other GNU-based systems, and
+ FreeBSD.
--enable-debug
This enables the assert() macro and possibly some other
@@ -377,11 +428,16 @@ XZ Utils Installation
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
script.
- Some of the scripts require also mktemp. The original mktemp can be
- found from <http://www.mktemp.org/>. On GNU, most will use the mktemp
- program from GNU coreutils instead of the original implementation.
- Both mktemp versions are fine for XZ Utils (and practically for
- everything else too).
+ xzdiff (xzcmp/lzdiff/lzcmp) may use mktemp if it is available. As
+ a fallback xzdiff will use mkdir to securely create a temporary
+ directory. Having mktemp available is still recommended since the
+ mkdir fallback method isn't as robust as mktemp is. The original
+ mktemp can be found from <http://www.mktemp.org/>. On GNU, most will
+ use the mktemp program from GNU coreutils instead of the original
+ implementation. Both mktemp versions are fine.
+
+ In addition to using xz to decompress .xz files, xzgrep and xzdiff
+ use gzip, bzip2, and lzop to support .gz, bz2, and .lzo files.
3.2. PATH
@@ -422,7 +478,8 @@ XZ Utils Installation
to POSIX. The configure script tries to find such a shell. If
it fails, you can force the shell to be used by passing
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
- script.
+ script. Alternatively you can omit the installation of scripts and
+ this error by passing --disable-scripts to configure.
4.3. configure works but build fails at crc32_x86.S
@@ -453,3 +510,36 @@ XZ Utils Installation
resulting binaries, but fewer warnings looks nicer and may allow
using --enable-werror.
+
+4.5. "make check" fails
+
+ If the other tests pass but test_scripts.sh fails, then the problem
+ is in the scripts in src/scripts. Comparing the contents of
+ tests/xzgrep_test_output to tests/xzgrep_expected_output might
+ give a good idea about problems in xzgrep. One possibility is that
+ some tools are missing from the current PATH or the tools lack
+ support for some POSIX features. This can happen at least on
+ Solaris where the tools in /bin may be ancient but good enough
+ tools are available in /usr/xpg4/bin or /usr/xpg6/bin. One fix
+ for this problem is described in section 3.2 of this file.
+
+ If tests other than test_scripts.sh fail, a likely reason is that
+ libtool links the test programs against an installed version of
+ liblzma instead of the version that was just built. This is
+ obviously a bug which seems to happen on some platforms.
+ A workaround is to uninstall the old liblzma versions first.
+
+ If the problem isn't any of those described above, then it's likely
+ a bug in XZ Utils or in the compiler. See the platform-specific
+ notes in this file for possible known problems. Please report
+ a bug if you cannot solve the problem. See README for contact
+ information.
+
+
+4.6. liblzma.so (or similar) not found when running xz
+
+ If you installed the package with "make install" and get an error
+ about liblzma.so (or a similarly named file) being missing, try
+ running "ldconfig" to update the run-time linker cache (if your
+ operating system has such a command).
+
View
360 external/public-domain/xz/dist/NEWS
@@ -2,6 +2,366 @@
XZ Utils Release Notes
======================
+5.2.1 (2015-02-26)
+
+ * Fixed a compression-ratio regression in fast mode of LZMA1 and
+ LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
+
+ * Fixed a portability problem in xz that affected at least OpenBSD.
+
+ * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
+ from most other mktemp implementations.
+
+ * Changed CPU core count detection to use cpuset_getaffinity() on
+ FreeBSD.
+
+
+5.2.0 (2014-12-21)
+
+ Since 5.1.4beta:
+
+ * All fixes from 5.0.8
+
+ * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
+ was used.
+
+ * xzdiff: If mktemp isn't installed, mkdir will be used as
+ a fallback to create a temporary directory. Installing mktemp
+ is still recommended.
+
+ * Updated French, German, Italian, Polish, and Vietnamese
+ translations.
+
+ Summary of fixes and new features added in the 5.1.x development
+ releases:
+
+ * liblzma:
+
+ - Added support for multi-threaded compression. See the
+ lzma_mt structure, lzma_stream_encoder_mt(), and
+ lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
+ lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
+ in <lzma/hardware.h> for details.
+
+ - Made the uses of lzma_allocator const correct.
+
+ - Added lzma_block_uncomp_encode() to create uncompressed
+ .xz Blocks using LZMA2 uncompressed chunks.
+
+ - Added support for LZMA_IGNORE_CHECK.
+
+ - A few speed optimizations were made.
+
+ - Added support for symbol versioning. It is enabled by default
+ on GNU/Linux, other GNU-based systems, and FreeBSD.
+
+ - liblzma (not the whole XZ Utils) should now be buildable
+ with MSVC 2013 update 2 or later using windows/config.h.
+
+ * xz:
+
+ - Fixed a race condition in the signal handling. It was
+ possible that e.g. the first SIGINT didn't make xz exit
+ if reading or writing blocked and one had bad luck. The fix
+ is non-trivial, so as of writing it is unknown if it will be
+ backported to the v5.0 branch.
+
+ - Multi-threaded decompression can be enabled with the
+ --threads (-T) option.
+
+ - New command line options in xz: --single-stream,
+ --block-size=SIZE, --block-list=SIZES,
+ --flush-timeout=TIMEOUT, and --ignore-check.
+
+ - xz -lvv now shows the minimum xz version that is required to
+ decompress the file. Currently it is 5.0.0 for all supported
+ .xz files except files with empty LZMA2 streams require 5.0.2.
+
+ * xzdiff and xzgrep now support .lzo files if lzop is installed.
+ The .tzo suffix is also recognized as a shorthand for .tar.lzo.
+
+
+5.1.4beta (2014-09-14)
+
+ * All fixes from 5.0.6
+
+ * liblzma: Fixed the use of presets in threaded encoder
+ initialization.
+
+ * xz --block-list and --block-size can now be used together
+ in single-threaded mode. Previously the combination only
+ worked in multi-threaded mode.
+
+ * Added support for LZMA_IGNORE_CHECK to liblzma and made it
+ available in xz as --ignore-check.
+
+ * liblzma speed optimizations:
+
+ - Initialization of a new LZMA1 or LZMA2 encoder has been
+ optimized. (The speed of reinitializing an already-allocated
+ encoder isn't affected.) This helps when compressing many
+ small buffers with lzma_stream_buffer_encode() and other
+ similar situations where an already-allocated encoder state
+ isn't reused. This speed-up is visible in xz too if one
+ compresses many small files one at a time instead running xz
+ once and giving all files as command-line arguments.
+
+ - Buffer comparisons are now much faster when unaligned access
+ is allowed (configured with --enable-unaligned-access). This
+ speeds up encoding significantly. There is arch-specific code
+ for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
+ results and there's no run-time CPU detection for now).
+ For other archs there is only generic code which probably
+ isn't as optimal as arch-specific solutions could be.
+
+ - A few speed optimizations were made to the SHA-256 code.
+ (Note that the builtin SHA-256 code isn't used on all
+ operating systems.)
+
+ * liblzma can now be built with MSVC 2013 update 2 or later
+ using windows/config.h.
+
+ * Vietnamese translation was added.
+
+
+5.1.3alpha (2013-10-26)
+
+ * All fixes from 5.0.5
+
+ * liblzma:
+
+ - Fixed a deadlock in the threaded encoder.
+
+ - Made the uses of lzma_allocator const correct.
+
+ - Added lzma_block_uncomp_encode() to create uncompressed
+ .xz Blocks using LZMA2 uncompressed chunks.
+
+ - Added support for native threads on Windows and the ability
+ to detect the number of CPU cores.
+
+ * xz:
+
+ - Fixed a race condition in the signal handling. It was
+ possible that e.g. the first SIGINT didn't make xz exit
+ if reading or writing blocked and one had bad luck. The fix
+ is non-trivial, so as of writing it is unknown if it will be
+ backported to the v5.0 branch.
+
+ - Made the progress indicator work correctly in threaded mode.
+
+ - Threaded encoder now works together with --block-list=SIZES.
+
+ - Added preliminary support for --flush-timeout=TIMEOUT.
+ It can be useful for (somewhat) real-time streaming. For
+ now the decompression side has to be done with something
+ else than the xz tool due to how xz does buffering, but this
+ should be fixed.
+
+
+5.1.2alpha (2012-07-04)
+
+ * All fixes from 5.0.3 and 5.0.4
+
+ * liblzma:
+
+ - Fixed a deadlock and an invalid free() in the threaded encoder.
+
+ - Added support for symbol versioning. It is enabled by default
+ on GNU/Linux, other GNU-based systems, and FreeBSD.
+
+ - Use SHA-256 implementation from the operating system if one is
+ available in libc, libmd, or libutil. liblzma won't use e.g.
+ OpenSSL or libgcrypt to avoid introducing new dependencies.
+
+ - Fixed liblzma.pc for static linking.
+
+ - Fixed a few portability bugs.
+
+ * xz --decompress --single-stream now fixes the input position after
+ successful decompression. Now the following works:
+
+ echo foo | xz > foo.xz
+ echo bar | xz >> foo.xz
+ ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
+
+ Note that it doesn't work if the input is not seekable
+ or if there is Stream Padding between the concatenated
+ .xz Streams.
+
+ * xz -lvv now shows the minimum xz version that is required to
+ decompress the file. Currently it is 5.0.0 for all supported .xz
+ files except files with empty LZMA2 streams require 5.0.2.
+
+ * Added an *incomplete* implementation of --block-list=SIZES to xz.
+ It only works correctly in single-threaded mode and when
+ --block-size isn't used at the same time. --block-list allows
+ specifying the sizes of Blocks which can be useful e.g. when
+ creating files for random-access reading.
+
+
+5.1.1alpha (2011-04-12)
+
+ * All fixes from 5.0.2
+
+ * liblzma fixes that will also be included in 5.0.3:
+
+ - A memory leak was fixed.
+
+ - lzma_stream_buffer_encode() no longer creates an empty .xz
+ Block if encoding an empty buffer. Such an empty Block with
+ LZMA2 data would trigger a bug in 5.0.1 and older (see the
+ first bullet point in 5.0.2 notes). When releasing 5.0.2,
+ I thought that no encoder creates this kind of files but
+ I was wrong.
+
+ - Validate function arguments better in a few functions. Most
+ importantly, specifying an unsupported integrity check to
+ lzma_stream_buffer_encode() no longer creates a corrupt .xz
+ file. Probably no application tries to do that, so this
+ shouldn't be a big problem in practice.
+
+ - Document that lzma_block_buffer_encode(),
+ lzma_easy_buffer_encode(), lzma_stream_encoder(), and
+ lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
+
+ - The return values of the _memusage() functions are now
+ documented better.
+
+ * Support for multithreaded compression was added using the simplest
+ method, which splits the input data into blocks and compresses
+ them independently. Other methods will be added in the future.
+ The current method has room for improvement, e.g. it is possible
+ to reduce the memory usage.
+
+ * Added the options --single-stream and --block-size=SIZE to xz.
+
+ * xzdiff and xzgrep now support .lzo files if lzop is installed.
+ The .tzo suffix is also recognized as a shorthand for .tar.lzo.
+
+ * Support for short 8.3 filenames under DOS was added to xz. It is
+ experimental and may change before it gets into a stable release.
+
+
+5.0.8 (2014-12-21)
+
+ * Fixed an old bug in xzgrep that affected OpenBSD and probably
+ a few other operating systems too.
+
+ * Updated French and German translations.
+
+ * Added support for detecting the amount of RAM on AmigaOS/AROS.
+
+ * Minor build system updates.
+
+
+5.0.7 (2014-09-20)
+
+ * Fix regressions introduced in 5.0.6:
+
+ - Fix building with non-GNU make.
+
+ - Fix invalid Libs.private value in liblzma.pc which broke
+ static linking against liblzma if the linker flags were
+ taken from pkg-config.
+
+
+5.0.6 (2014-09-14)
+
+ * xzgrep now exits with status 0 if at least one file matched.
+
+ * A few minor portability and build system fixes
+
+
+5.0.5 (2013-06-30)
+
+ * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
+ .lzma files that have less common settings in the headers
+ (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
+ size greater than 256 GiB). The limitations existed to avoid false
+ positives when detecting .lzma files. The lc + lp <= 4 limitation
+ still remains since liblzma's LZMA decoder has that limitation.
+
+ NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
+ affected by this change. They still consider uncommon .lzma headers
+ as not being in the .lzma format. Changing this would give way too
+ many false positives.
+
+ * xz:
+
+ - Interaction of preset and custom filter chain options was
+ made less illogical. This affects only certain less typical
+ uses cases so few people are expected to notice this change.
+
+ Now when a custom filter chain option (e.g. --lzma2) is
+ specified, all preset options (-0 ... -9, -e) earlier are on
+ the command line are completely forgotten. Similarly, when
+ a preset option is specified, all custom filter chain options
+ earlier on the command line are completely forgotten.
+
+ Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
+ which is equivalent to "xz -6e". Earlier -e didn't put xz back
+ into preset mode and thus the example command was equivalent
+ to "xz --lzma2=preset=5".
+
+ Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
+ "xz -7". Earlier a custom filter chain option didn't make
+ xz forget the -e option so the example was equivalent to
+ "xz -7e".
+
+ - Fixes and improvements to error handling.
+
+ - Various fixes to the man page.
+
+ * xzless: Fixed to work with "less" versions 448 and later.
+
+ * xzgrep: Made -h an alias for --no-filename.
+
+ * Include the previously missing debug/translation.bash which can
+ be useful for translators.
+
+ * Include a build script for Mac OS X. This has been in the Git
+ repository since 2010 but due to a mistake in Makefile.am the
+ script hasn't been included in a release tarball before.
+
+
+5.0.4 (2012-06-22)
+
+ * liblzma:
+
+ - Fix lzma_index_init(). It could crash if memory allocation
+ failed.
+
+ - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
+ filter is used and the application only provides exactly as
+ much output space as is the uncompressed size of the file.
+
+ - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
+ check if the last call to lzma_code() really returned
+ LZMA_STREAM_END, which made the program think that truncated
+ files are valid.
+
+ - New example programs in doc/examples (old programs are now in
+ doc/examples_old). These have more comments and more detailed
+ error handling.
+
+ * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
+
+ * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
+ incorrectly printed the filename also in the "foo (x/x)" format.
+
+ * Fix exit status of "xzdiff foo.xz bar.xz".
+
+ * Fix exit status of "xzgrep foo binary_file".
+
+ * Fix portability to EBCDIC systems.
+
+ * Fix a configure issue on AIX with the XL C compiler. See INSTALL
+ for details.
+
+ * Update French, German, Italian, and Polish translations.
+
+
5.0.3 (2011-05-21)
* liblzma fixes:
View
58 external/public-domain/xz/dist/README
@@ -5,7 +5,7 @@ XZ Utils
0. Overview
1. Documentation
1.1. Overall documentation
- 1.2. Documentation for command line tools
+ 1.2. Documentation for command-line tools
1.3. Documentation for liblzma
2. Version numbering
3. Reporting bugs
@@ -17,21 +17,21 @@ XZ Utils
0. Overview
-----------
- XZ Utils provide a general-purpose data compression library and
- command line tools. The native file format is the .xz format, but
+ XZ Utils provide a general-purpose data-compression library plus
+ command-line tools. The native file format is the .xz format, but
also the legacy .lzma format is supported. The .xz format supports
- multiple compression algorithms, which are called "filters" in
+ multiple compression algorithms, which are called "filters" in the
context of XZ Utils. The primary filter is currently LZMA2. With
typical files, XZ Utils create about 30 % smaller files than gzip.
To ease adapting support for the .xz format into existing applications
and scripts, the API of liblzma is somewhat similar to the API of the
- popular zlib library. For the same reason, the command line tool xz
- has similar command line syntax than that of gzip.
+ popular zlib library. For the same reason, the command-line tool xz
+ has a command-line syntax similar to that of gzip.
- When aiming for the highest compression ratio, LZMA2 encoder uses
+ When aiming for the highest compression ratio, the LZMA2 encoder uses
a lot of CPU time and may use, depending on the settings, even
- hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder
+ hundreds of megabytes of RAM. However, in fast modes, the LZMA2 encoder
competes with bzip2 in compression speed, RAM usage, and compression
ratio.
@@ -44,8 +44,8 @@ XZ Utils
since that needs to be done only once to benefit many people.
With some file types, combining (or "chaining") LZMA2 with an
- additional filter can improve compression ratio. A filter chain may
- contain up to four filters, although usually only one two is used.
+ additional filter can improve the compression ratio. A filter chain may
+ contain up to four filters, although usually only one or two are used.
For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
in the filter chain can improve compression ratio of executable files.
@@ -88,9 +88,9 @@ XZ Utils
packages.
-1.2. Documentation for command line tools
+1.2. Documentation for command-line tools
- The command line tools are documented as man pages. In source code
+ The command-line tools are documented as man pages. In source code
releases (and possibly also in some binary packages), the man pages
are also provided in plain text (ASCII only) and PDF formats in the
directory "doc/man" to make the man pages more accessible to those
@@ -109,8 +109,8 @@ XZ Utils
written yet.
For now, if you have never used liblzma, libbzip2, or zlib, I
- recommend learning *basics* of zlib API. Once you know that, it
- should be easier to learn liblzma.
+ recommend learning the *basics* of the zlib API. Once you know that,
+ it should be easier to learn liblzma.
http://zlib.net/manual.html
http://zlib.net/zlib_how.html
@@ -124,23 +124,27 @@ XZ Utils
- X is the major version. When this is incremented, the library
API and ABI break.
- - Y is the minor version. It is incremented when new features are
- added without breaking existing API or ABI. Even Y indicates
- stable release and odd Y indicates unstable (alpha or beta
- version).
+ - Y is the minor version. It is incremented when new features
+ are added without breaking the existing API or ABI. An even Y
+ indicates a stable release and an odd Y indicates unstable
+ (alpha or beta version).
- - Z is the revision. This has different meaning for stable and
+ - Z is the revision. This has a different meaning for stable and
unstable releases:
+
* Stable: Z is incremented when bugs get fixed without adding
- any new features.
+ any new features. This is intended to be convenient for
+ downstream distributors that want bug fixes but don't want
+ any new features to minimize the risk of introducing new bugs.
+
* Unstable: Z is just a counter. API or ABI of features added
in earlier unstable releases having the same X.Y may break.
- S indicates stability of the release. It is missing from the
- stable releases where Y is an even number. When Y is odd, S
+ stable releases, where Y is an even number. When Y is odd, S
is either "alpha" or "beta" to make it very clear that such
versions are not stable releases. The same X.Y.Z combination is
- not used for more than one stability level i.e. after X.Y.Zalpha,
+ not used for more than one stability level, i.e. after X.Y.Zalpha,
the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
@@ -176,7 +180,7 @@ XZ Utils
Don't send core dump files or any executables. If you have a small
example file(s) (total size less than 256 KiB), please include
it/them as an attachment. If you have bigger test files, put them
- online somewhere and include an URL to the file(s) in the bug report.
+ online somewhere and include a URL to the file(s) in the bug report.
Always include the exact version number of XZ Utils in the bug report.
If you are using a snapshot from the git repository, use "git describe"
@@ -193,7 +197,7 @@ XZ Utils
The messages from the xz tool have been translated into a few
languages. Before starting to translate into a new language, ask
- the author that someone else hasn't already started working on it.
+ the author whether someone else hasn't already started working on it.
Test your translation. Testing includes comparing the translated
output to the original English version by running the same commands
@@ -206,15 +210,15 @@ XZ Utils
# <Edit the .po file in the po directory.>
make -C po update-po
make install
- bash debug/translations.bash | less
- bash debug/translations.bash | less -S # For --list outputs
+ bash debug/translation.bash | less
+ bash debug/translation.bash | less -S # For --list outputs
Repeat the above as needed (no need to re-run configure though).
Note especially the following:
- The output of --help and --long-help must look nice on
- a 80-column terminal. It's OK to add extra lines if needed.
+ an 80-column terminal. It's OK to add extra lines if needed.
- In contrast, don't add extra lines to error messages and such.
They are often preceded with e.g. a filename on the same line,
View
28 external/public-domain/xz/dist/THANKS
@@ -6,6 +6,7 @@ Some people have helped more, some less, but nevertheless everyone's help
has been important. :-) In alphabetical order:
- Mark Adler
- H. Peter Anvin
+ - Jeff Bastian
- Nelson H. F. Beebe
- Karl Berry
- Anders F. Björklund
@@ -14,62 +15,89 @@ has been important. :-) In alphabetical order:
- Jakub Bogusz
- Maarten Bosmans
- Trent W. Buck
+ - James Buren
- David Burklund
- Daniel Mealha Cabrita
- Milo Casagrande
- Marek Černocký
+ - Tomer Chachamu
+ - Chris Donawa
- Andrew Dudman
- Markus Duft
- İsmail Dönmez
- Robert Elz
- Gilles Espinasse
- Denis Excoffier
+ - Michael Felt
- Mike Frysinger
+ - Daniel Richard G.
+ - Bill Glessner
- Jason Gorski
- Juan Manuel Guerrero
+ - Diederik de Haas
- Joachim Henke
+ - Christian Hesse
+ - Vincenzo Innocente
- Peter Ivanov
- Jouk Jansen
+ - Jun I Jin
- Per Øyvind Karlsen
- Thomas Klausner
- Richard Koch
- Ville Koskinen
+ - Jan Kratochvil
+ - Christian Kujau
- Stephan Kulow
- Peter Lawler
+ - James M Leddy
- Hin-Tak Leung
- Andraž 'ruskie' Levstik
+ - Cary Lewis
- Wim Lewis
- Lorenzo De Liso
+ - Bela Lubkin
- Gregory Margo
- Jim Meyering
+ - Arkadiusz Miskiewicz
+ - Conley Moorhous
- Rafał Mużyło
- Adrien Nader
- Hongbo Ni
- Jonathan Nieder
- Andre Noll
- Peter O'Gorman
+ - Peter Pallinger
+ - Rui Paulo
- Igor Pavlov
- Diego Elio Pettenò
- Elbert Pol
- Mikko Pouru
+ - Trần Ngọc Quân
+ - Pavel Raiskup
- Robert Readman
- Bernhard Reutner-Fischer
+ - Eric S. Raymond
- Cristian Rodríguez
- Christian von Roques
+ - Torsten Rupp
- Jukka Salmi
- Alexandre Sauvé
+ - Benno Schulenberg
- Andreas Schwab
- Dan Shechter
- Stuart Shelton
+ - Brad Smith
- Jonathan Stott
- Dan Stromberg
+ - Vincent Torri
- Paul Townsend
- Mohammed Adnène Trojette
- Alexey Tourbin
- Patrick J. Volkerding
- Martin Väth
- Christian Weisgerber
- Bert Wesarg
+ - Fredrik Wikstrom
- Ralf Wildenhues
- Charles Wilson
- Lars Wirzenius
View
62 external/public-domain/xz/dist/TODO
@@ -12,10 +12,6 @@ Known bugs
it would be possible by switching from BT2/BT3/BT4 match finder to
HC3/HC4.
- The code to detect number of CPU cores doesn't count hyperthreading
- as multiple cores. In context of xz, it probably should.
- Hyperthreading is good at least with p7zip.
-
XZ Utils compress some files significantly worse than LZMA Utils.
This is due to faster compression presets used by XZ Utils, and
can often be worked around by using "xz --extreme". With some files
@@ -32,14 +28,36 @@ Known bugs
time and calculated (de)compression speed won't make sense in the
progress indicator (xz --verbose).
+ If liblzma has created threads and fork() gets called, liblzma
+ code will break in the child process unless it calls exec() and
+ doesn't touch liblzma.
+
Missing features
----------------
+ Add support for storing metadata in .xz files. A preliminary
+ idea is to create a new Stream type for metadata. When both
+ metadata and data are wanted in the same .xz file, two or more
+ Streams would be concatenated.
+
+ The state stored in lzma_stream should be cloneable, which would
+ be mostly useful when using a preset dictionary in LZMA2, but
+ it may have other uses too. Compare to deflateCopy() in zlib.
+
+ Support LZMA_FINISH in raw decoder to indicate end of LZMA1 and
+ other streams that don't have an end of payload marker.
+
+ Adjust dictionary size when the input file size is known.
+ Maybe do this only if an option is given.
+
xz doesn't support copying extended attributes, access control
lists etc. from source to target file.
- Multithreaded compression
+ Multithreaded compression:
+ - Reduce memory usage of the current method.
+ - Implement threaded match finders.
+ - Implement pigz-style threading in LZMA2.
Multithreaded decompression
@@ -50,18 +68,44 @@ Missing features
It will be a separate library that supports uncompressed, .gz,
.bz2, .lzma, and .xz files.
+ Support changing lzma_options_lzma.mode with lzma_filters_update().
+
+ Support LZMA_FULL_FLUSH for lzma_stream_decoder() to stop at
+ Block and Stream boundaries.
+
lzma_strerror() to convert lzma_ret to human readable form?
This is tricky, because the same error codes are used with
slightly different meanings, and this cannot be fixed anymore.
+ Make it possible to adjust LZMA2 options in the middle of a Block
+ so that the encoding speed vs. compression ratio can be optimized
+ when the compressed data is streamed over network.
+
+ Improved BCJ filters. The current filters are small but they aren't
+ so great when compressing binary packages that contain various file
+ types. Specifically, they make things worse if there are static
+ libraries or Linux kernel modules. The filtering could also be
+ more effective (without getting overly complex), for example,
+ streamable variant BCJ2 from 7-Zip could be implemented.
+
+ Filter that autodetects specific data types in the input stream
+ and applies appropriate filters for the corrects parts of the input.
+ Perhaps combine this with the BCJ filter improvement point above.
+
+ Long-range LZ77 method as a separate filter or as a new LZMA2
+ match finder.
+
Documentation
-------------
- Some tutorial is needed for liblzma. I have planned to write some
- extremely well commented example programs, which would work as
- a tutorial. I suppose the Doxygen tags are quite OK as a quick
- reference once one is familiar with the liblzma API.
+ More tutorial programs are needed for liblzma.
Document the LZMA1 and LZMA2 algorithms.
+
+Miscellaneous
+------------
+
+ Try to get the media type for .xz registered at IANA.
+
View
84 external/public-domain/xz/dist/config.h.in
@@ -22,6 +22,12 @@
/* Define to 1 if you have the <byteswap.h> header file. */
#undef HAVE_BYTESWAP_H
+/* Define to 1 if the system has the type `CC_SHA256_CTX'. */
+#undef HAVE_CC_SHA256_CTX
+
+/* Define to 1 if you have the `CC_SHA256_Init' function. */
+#undef HAVE_CC_SHA256_INIT
+
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
@@ -39,10 +45,20 @@
/* Define to 1 if sha256 integrity check is enabled. */
#undef HAVE_CHECK_SHA256
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
+#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if
+ you don't. */
+#undef HAVE_DECL_CLOCK_MONOTONIC
+
/* Define to 1 if you have the declaration of `program_invocation_name', and
to 0 if you don't. */
#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
@@ -125,9 +141,12 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
-/* Define if you have the iconv() function. */
+/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
+/* Define to 1 if you have the <immintrin.h> header file. */
+#undef HAVE_IMMINTRIN_H
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -155,11 +174,41 @@
/* Define to 1 to enable hc4 match finder. */
#undef HAVE_MF_HC4
+/* Define to 1 if you have the <minix/sha2.h> header file. */
+#undef HAVE_MINIX_SHA2_H
+
/* Define to 1 if getopt.h declares extern int optreset. */
#undef HAVE_OPTRESET
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
+/* Define to 1 if you have the `pipe2' function. */
+#undef HAVE_PIPE2
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#undef HAVE_POSIX_FADVISE
+
+/* Define to 1 if you have the `pthread_condattr_setclock' function. */
+#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define to 1 if you have the `SHA256Init' function. */
+#undef HAVE_SHA256INIT
+
+/* Define to 1 if the system has the type `SHA256_CTX'. */
+#undef HAVE_SHA256_CTX
+
+/* Define to 1 if you have the <sha256.h> header file. */
+#undef HAVE_SHA256_H
+
+/* Define to 1 if you have the `SHA256_Init' function. */
+#undef HAVE_SHA256_INIT
+
+/* Define to 1 if the system has the type `SHA2_CTX'. */
+#undef HAVE_SHA2_CTX
+
+/* Define to 1 if you have the <sha2.h> header file. */
+#undef HAVE_SHA2_H
/* Define to 1 if optimizing for size. */
#undef HAVE_SMALL
@@ -234,16 +283,26 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to 1 if _mm_movemask_epi8 is available. */
+#undef HAVE__MM_MOVEMASK_EPI8
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
+/* Define to 1 when using POSIX threads (pthreads). */
+#undef MYTHREAD_POSIX
+
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+#undef MYTHREAD_VISTA
+
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista. */
+#undef MYTHREAD_WIN95
+
/* Define to 1 to disable debugging code. */
#undef NDEBUG
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Name of package */
#undef PACKAGE
@@ -276,6 +335,10 @@
#undef STDC_HEADERS
/* Define to 1 if the number of available CPU cores can be detected with
+ cpuset(2). */
+#undef TUKLIB_CPUCORES_CPUSET
+
+/* Define to 1 if the number of available CPU cores can be detected with
pstat_getdynamic(). */
#undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC
@@ -356,6 +419,11 @@
# endif
#endif
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
View
282 external/public-domain/xz/dist/configure.ac
@@ -59,7 +59,7 @@ AM_CFLAGS=
#############
AC_MSG_CHECKING([if debugging code should be compiled])
-AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [Enable debugging code.]),
+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging code.]),
[], enable_debug=no)
if test "x$enable_debug" = xyes; then
AC_MSG_RESULT([yes])
@@ -84,7 +84,7 @@ enable_decoder_[]NAME=no
])dnl
AC_MSG_CHECKING([which encoders to build])
-AC_ARG_ENABLE([encoders], AC_HELP_STRING([--enable-encoders=LIST],
+AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST],
[Comma-separated list of encoders to build. Default=all.
Available encoders:]
m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
@@ -112,7 +112,7 @@ else
fi
AC_MSG_CHECKING([which decoders to build])
-AC_ARG_ENABLE([decoders], AC_HELP_STRING([--enable-decoders=LIST],
+AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST],
[Comma-separated list of decoders to build. Default=all.
Available decoders are the same as available encoders.]),
[], [enable_decoders=SUPPORTED_FILTERS])
@@ -195,7 +195,7 @@ m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS],
])
AC_MSG_CHECKING([which match finders to build])
-AC_ARG_ENABLE([match-finders], AC_HELP_STRING([--enable-match-finders=LIST],
+AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST],
[Comma-separated list of match finders to build. Default=all.
At least one match finder is required for encoding with
the LZMA1 and LZMA2 filters. Available match finders:]
@@ -234,7 +234,7 @@ m4_foreach([NAME], [SUPPORTED_CHECKS],
])dnl
AC_MSG_CHECKING([which integrity checks to build])
-AC_ARG_ENABLE([checks], AC_HELP_STRING([--enable-checks=LIST],
+AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks=LIST],
[Comma-separated list of integrity checks to build.
Default=all. Available integrity checks:]
m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
@@ -260,7 +260,7 @@ else
done
AC_MSG_RESULT([$enable_checks])
fi
-if test "x$enable_checks_crc32" = xno ; then
+if test "x$enable_check_crc32" = xno ; then
AC_MSG_ERROR([For now, the CRC32 check must always be enabled.])
fi
@@ -274,7 +274,7 @@ m4_foreach([NAME], [SUPPORTED_CHECKS],
###########################
AC_MSG_CHECKING([if assembler optimizations should be used])
-AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
+AC_ARG_ENABLE([assembler], AS_HELP_STRING([--disable-assembler],
[Do not use assembler optimizations even if such exist
for the architecture.]),
[], [enable_assembler=yes])
@@ -297,7 +297,7 @@ case $enable_assembler in
;;
*)
AC_MSG_RESULT([])
- AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.])
+ AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', `x86', or `x86_64'.])
;;
esac
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
@@ -309,15 +309,15 @@ AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)
#####################
AC_MSG_CHECKING([if small size is preferred over speed])
-AC_ARG_ENABLE([small], AC_HELP_STRING([--enable-small],
+AC_ARG_ENABLE([small], AS_HELP_STRING([--enable-small],
[Make liblzma smaller and a little slower.
This is disabled by default to optimize for speed.]),
[], [enable_small=no])
if test "x$enable_small" = xyes; then
AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
elif test "x$enable_small" != xno; then
AC_MSG_RESULT([])
- AC_MSG_ERROR([--enable-small accepts only \`yes' or \`no'])
+ AC_MSG_ERROR([--enable-small accepts only `yes' or `no'])
fi
AC_MSG_RESULT([$enable_small])
AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
@@ -328,15 +328,47 @@ AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
#############
AC_MSG_CHECKING([if threading support is wanted])
-AC_ARG_ENABLE([threads], AC_HELP_STRING([--disable-threads],
- [Disable threading support.
- This makes some things thread-unsafe.]),
+AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD],
+ [Supported METHODS are `yes', `no', `posix', `win95', and
+ `vista'. The default is `yes'. Using `no' together with
+ --enable-small makes liblzma thread unsafe.]),
[], [enable_threads=yes])
-if test "x$enable_threads" != xyes && test "x$enable_threads" != xno; then
- AC_MSG_RESULT([])
- AC_MSG_ERROR([--enable-threads accepts only \`yes' or \`no'])
+
+if test "x$enable_threads" = xyes; then
+ case $host_os in
+ mingw*)
+ case $host_cpu in
+ i?86) enable_threads=win95 ;;
+ *) enable_threads=vista ;;
+ esac
+ ;;
+ *)
+ enable_threads=posix
+ ;;
+ esac
fi
-AC_MSG_RESULT([$enable_threads])
+
+case $enable_threads in
+ posix | win95 | vista)
+ AC_MSG_RESULT([yes, $enable_threads])
+ ;;
+ no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista'])
+ ;;
+esac
+
+# The Win95 threading lacks thread-safe one-time initialization function.
+# It's better to disallow it instead of allowing threaded but thread-unsafe
+# build.
+if test "x$enable_small$enable_threads" = xyeswin95; then
+ AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be
+ used at the same time])
+fi
+
# We use the actual result a little later.
@@ -349,7 +381,7 @@ AC_MSG_RESULT([$enable_threads])
# but most systems, on which we don't have any way to determine the amount
# of RAM, will probably have at least 128 MiB of RAM.
AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown])
-AC_ARG_ENABLE([assume-ram], AC_HELP_STRING([--enable-assume-ram=SIZE],
+AC_ARG_ENABLE([assume-ram], AS_HELP_STRING([--enable-assume-ram=SIZE],
[If and only if the real amount of RAM cannot be determined,
assume SIZE MiB. The default is 128 MiB. This affects the
default memory usage limit.]),
@@ -369,54 +401,92 @@ AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
# Components to install #
#########################
-AC_ARG_ENABLE([xz], [AC_HELP_STRING([--disable-xz],
+AC_ARG_ENABLE([xz], [AS_HELP_STRING([--disable-xz],
[do not build the xz tool])],
[], [enable_xz=yes])
AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
-AC_ARG_ENABLE([xzdec], [AC_HELP_STRING([--disable-xzdec],
+AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
[do not build xzdec])],
[], [enable_xzdec=yes])
AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
-AC_ARG_ENABLE([lzmadec], [AC_HELP_STRING([--disable-lzmadec],
+AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec],
[do not build lzmadec
(it exists primarily for LZMA Utils compatibility)])],
[], [enable_lzmadec=yes])
AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
-AC_ARG_ENABLE([lzmainfo], [AC_HELP_STRING([--disable-lzmainfo],
+AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo],
[do not build lzmainfo
(it exists primarily for LZMA Utils compatibility)])],
[], [enable_lzmainfo=yes])
AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
-AC_ARG_ENABLE([lzma-links], [AC_HELP_STRING([--disable-lzma-links],
+AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
[do not create symlinks for LZMA Utils compatibility])],
[], [enable_lzma_links=yes])
AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
-AC_ARG_ENABLE([scripts], [AC_HELP_STRING([--disable-scripts],
+AC_ARG_ENABLE([scripts], [AS_HELP_STRING([--disable-scripts],
[do not install the scripts xzdiff, xzgrep, xzless, xzmore,
and their symlinks])],
[], [enable_scripts=yes])
AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
+AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
+ [do not install documentation files to docdir
+ (man pages will still be installed)])],
+ [], [enable_doc=yes])
+AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
+
+
+#####################
+# Symbol versioning #
+#####################
+
+AC_MSG_CHECKING([if library symbol versioning should be used])
+AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions],
+ [Use symbol versioning for liblzma. Enabled by default on
+ GNU/Linux, other GNU-based systems, and FreeBSD.])],
+ [], [enable_symbol_versions=auto])
+if test "x$enable_symbol_versions" = xauto; then
+ case $host_os in
+ # NOTE: Even if one omits -gnu on GNU/Linux (e.g.
+ # i486-slackware-linux), configure will (via config.sub)
+ # append -gnu (e.g. i486-slackware-linux-gnu), and this
+ # test will work correctly.
+ gnu* | *-gnu* | freebsd*)
+ enable_symbol_versions=yes
+ ;;
+ *)
+ enable_symbol_versions=no
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$enable_symbol_versions])
+AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes])
+
###############################################################################
# Checks for programs.
###############################################################################
echo
gl_POSIX_SHELL
-if test -z "$POSIX_SHELL" ; then
+if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
fi
echo
echo "Initializing Automake:"
-AM_INIT_AUTOMAKE([1.10 foreign tar-v7 filename-length-max=99])
+# We don't use "subdir-objects" yet because it breaks "make distclean" when
+# dependencies are enabled (as of Automake 1.14.1) due to this bug:
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
+# The -Wno-unsupported is used to silence warnings about missing
+# "subdir-objects".
+AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 serial-tests -Wno-unsupported])
AC_PROG_LN_S
AC_PROG_CC_C99
@@ -428,14 +498,49 @@ AM_PROG_CC_C_O
AM_PROG_AS
AC_USE_SYSTEM_EXTENSIONS
-if test "x$enable_threads" = xyes; then
- echo
- echo "Threading support:"
- ACX_PTHREAD
- LIBS="$LIBS $PTHREAD_LIBS"
- AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
- CC="$PTHREAD_CC"
-fi
+case $enable_threads in
+ posix)
+ echo
+ echo "POSIX threading support:"
+ AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro.
+ LIBS="$LIBS $PTHREAD_LIBS"
+ AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
+
+ dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX,
+ dnl but it's tricky to get it right together with
+ dnl AC_PROG_CC_C99. Thus, this is handled by telling the
+ dnl user in INSTALL to set the correct CC manually.
+
+ AC_DEFINE([MYTHREAD_POSIX], [1],
+ [Define to 1 when using POSIX threads (pthreads).])
+
+ # These are nice to have but not mandatory.
+ #
+ # FIXME: xz uses clock_gettime if it is available and can do
+ # it even when threading is disabled. Moving this outside
+ # of pthread detection may be undesirable because then
+ # liblzma may get linked against librt even when librt isn't
+ # needed by liblzma.
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+ AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
+ AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
+ CFLAGS=$OLD_CFLAGS
+ ;;
+ win95)
+ AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using
+ Windows 95 (and thus XP) compatible threads.
+ This avoids use of features that were added in
+ Windows Vista.])
+ ;;
+ vista)
+ AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using
+ Windows Vista compatible threads. This uses
+ features that are not available on Windows XP.])
+ ;;
+esac
+AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
echo
echo "Initializing Libtool:"
@@ -456,9 +561,10 @@ AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
echo
echo "Initializing gettext:"
-AM_GNU_GETTEXT_VERSION([0.16.1])
+AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
+
###############################################################################
# Checks for header files.
###############################################################################
@@ -472,6 +578,9 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
[],
[AC_MSG_ERROR([Required header file(s) are missing.])])
+# This allows the use of the intrinsic functions if they are available.
+AC_CHECK_HEADERS([immintrin.h])
+
###############################################################################
# Checks for typedefs, structures, and compiler characteristics.
@@ -494,7 +603,7 @@ AC_TYPE_UINTPTR_T
AC_CHECK_SIZEOF([size_t])
# The command line tool can copy high resolution timestamps if such
-# information is availabe in struct stat. Otherwise one second accuracy
+# information is available in struct stat. Otherwise one second accuracy
# is used.
AC_CHECK_MEMBERS([
struct stat.st_atim.tv_nsec,
@@ -517,12 +626,78 @@ gl_GETOPT
# Find the best function to set timestamps.
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
+# These are nice to have but not mandatory.
+AC_CHECK_FUNCS([posix_fadvise pipe2])
+
TUKLIB_PROGNAME
TUKLIB_INTEGER
TUKLIB_PHYSMEM
TUKLIB_CPUCORES
TUKLIB_MBSTR
+# Check for system-provided SHA-256. At least the following is supported:
+#
+# OS Headers Library Type Function
+# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
+# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
+# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
+# MINIX 3 sys/types.h + minix/sha2.h libutil SHA256_CTX SHA256_Init
+# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
+#
+# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
+# of size_t.
+#
+# We don't check for e.g. OpenSSL or libgcrypt because we don't want
+# to introduce dependencies to other packages by default. Maybe such
+# libraries could be supported via additional configure options though.
+#
+if test "x$enable_check_sha256" = "xyes"; then
+ # Test for Common Crypto before others, because Darwin has sha256.h
+ # too and we don't want to use that, because on older versions it
+ # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
+ # succeed.
+ sha256_header_found=no
+ AC_CHECK_HEADERS(
+ [CommonCrypto/CommonDigest.h sha256.h sha2.h minix/sha2.h],
+ [sha256_header_found=yes ; break])
+ if test "x$sha256_header_found" = xyes; then
+ AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX], [], [],
+ [[#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif
+ #ifdef HAVE_MINIX_SHA2_H
+ # include <minix/sha2.h>
+ #endif]])
+ AC_SEARCH_LIBS([SHA256_Init], [md util])
+ AC_SEARCH_LIBS([SHA256Init], [md])
+ AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init],
+ [break])
+ fi
+fi
+AM_CONDITIONAL([COND_INTERNAL_SHA256],
+ [test "x$ac_cv_func_SHA256_Init" != xyes \
+ && test "x$ac_cv_func_SHA256Init" != xyes \
+ && test "x$ac_cv_func_CC_SHA256_Init" != xyes])
+
+# Check for SSE2 intrinsics.
+AC_CHECK_DECL([_mm_movemask_epi8],
+ [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
+ [Define to 1 if _mm_movemask_epi8 is available.])],
+ [],
+[#ifdef HAVE_IMMINTRIN_H
+#include <immintrin.h>
+#endif])
+
###############################################################################
# If using GCC, set some additional AM_CFLAGS:
@@ -556,6 +731,7 @@ if test "$GCC" = yes ; then
for NEW_FLAG in \
-Wall \
-Wextra \
+ -Wvla \
-Wformat=2 \
-Winit-self \
-Wmissing-include-dirs \
@@ -577,8 +753,9 @@ if test "$GCC" = yes ; then
do
AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $NEW_FLAG"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo(void) { }])], [
+ CFLAGS="$CFLAGS $NEW_FLAG -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [void foo(void); void foo(void) { }])], [
AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
AC_MSG_RESULT([yes])
], [
@@ -588,7 +765,7 @@ if test "$GCC" = yes ; then
done
AC_ARG_ENABLE([werror],
- AC_HELP_STRING([--enable-werror], [Enable -Werror to abort
+ AS_HELP_STRING([--enable-werror], [Enable -Werror to abort
compilation on all compiler warnings.]),
[], [enable_werror=no])
if test "x$enable_werror" = "xyes"; then
@@ -620,20 +797,19 @@ AC_CONFIG_FILES([
po/Makefile.in
lib/Makefile
src/Makefile
- src/liblzma/liblzma.pc
src/liblzma/Makefile
src/liblzma/api/Makefile
src/xz/Makefile
src/xzdec/Makefile
src/lzmainfo/Makefile
src/scripts/Makefile
- src/scripts/xzdiff
- src/scripts/xzgrep
- src/scripts/xzmore
- src/scripts/xzless
tests/Makefile
debug/Makefile
])
+AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff])
+AC_CONFIG_FILES([src/scripts/xzgrep], [chmod +x src/scripts/xzgrep])
+AC_CONFIG_FILES([src/scripts/xzmore], [chmod +x src/scripts/xzmore])
+AC_CONFIG_FILES([src/scripts/xzless], [chmod +x src/scripts/xzless])
AC_OUTPUT
@@ -646,9 +822,15 @@ if test x$tuklib_cv_physmem_method = xunknown; then
echo "or make a patch to add support for this operating system."
fi
-# Not threading yet so don't warn.
-#if test x$tuklib_cv_cpucores_method = xunknown; then
-# echo
-# echo "WARNING:"
-# echo "No supported method to detect the number of CPU cores."
-#fi
+if test x$tuklib_cv_cpucores_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the number of CPU cores."
+fi
+
+if test "x$enable_threads$enable_small" = xnoyes; then
+ echo
+ echo "NOTE:"
+ echo "liblzma will be thread unsafe due the combination"
+ echo "of --disable-threads --enable-small."
+fi
View
31 external/public-domain/xz/dist/doc/examples/00_README.txt
@@ -0,0 +1,31 @@
+
+liblzma example programs
+========================
+
+Introduction
+
+ The examples are written so that the same comments aren't
+ repeated (much) in later files.
+
+ On POSIX systems, the examples should build by just typing "make".
+
+ The examples that use stdin or stdout don't set stdin and stdout
+ to binary mode. On systems where it matters (e.g. Windows) it is
+ possible that the examples won't work without modification.
+
+
+List of examples
+
+ 01_compress_easy.c Multi-call compression using
+ a compression preset
+
+ 02_decompress.c Multi-call decompression
+
+ 03_compress_custom.c Like 01_compress_easy.c but using
+ a custom filter chain
+ (x86 BCJ + LZMA2)
+
+ 04_compress_easy_mt.c Multi-threaded multi-call
+ compression using a compression
+ preset
+
View
297 external/public-domain/xz/dist/doc/examples/01_compress_easy.c
@@ -0,0 +1,297 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file 01_compress_easy.c
+/// \brief Compress from stdin to stdout in multi-call mode
+///
+/// Usage: ./01_compress_easy PRESET < INFILE > OUTFILE
+///
+/// Example: ./01_compress_easy 6 < foo > foo.xz
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <lzma.h>
+
+
+static void
+show_usage_and_exit(const char *argv0)
+{
+ fprintf(stderr, "Usage: %s PRESET < INFILE > OUTFILE\n"
+ "PRESET is a number 0-9 and can optionally be "
+ "followed by `e' to indicate extreme preset\n",
+ argv0);
+ exit(EXIT_FAILURE);
+}
+
+
+static uint32_t
+get_preset(int argc, char **argv)
+{
+ // One argument whose first char must be 0-9.
+ if (argc != 2 || argv[1][0] < '0' || argv[1][0] > '9')
+ show_usage_and_exit(argv[0]);
+
+ // Calculate the preste level 0-9.
+ uint32_t preset = argv[1][0] - '0';
+
+ // If there is a second char, it must be 'e'. It will set
+ // the LZMA_PRESET_EXTREME flag.
+ if (argv[1][1] != '\0') {
+ if (argv[1][1] != 'e' || argv[1][2] != '\0')
+ show_usage_and_exit(argv[0]);
+
+ preset |= LZMA_PRESET_EXTREME;
+ }
+
+ return preset;
+}
+
+
+static bool
+init_encoder(lzma_stream *strm, uint32_t preset)
+{
+ // Initialize the encoder using a preset. Set the integrity to check
+ // to CRC64, which is the default in the xz command line tool. If
+ // the .xz file needs to be decompressed with XZ Embedded, use
+ // LZMA_CHECK_CRC32 instead.
+ lzma_ret ret = lzma_easy_encoder(strm, preset, LZMA_CHECK_CRC64);
+
+ // Return successfully if the initialization went fine.
+ if (ret == LZMA_OK)
+ return true;
+
+ // Something went wrong. The possible errors are documented in
+ // lzma/container.h (src/liblzma/api/lzma/container.h in the source
+ // package or e.g. /usr/include/lzma/container.h depending on the
+ // install prefix).
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ msg = "Specified preset is not supported";
+ break;
+
+ case LZMA_UNSUPPORTED_CHECK:
+ msg = "Specified integrity check is not supported";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR indicating a bug in
+ // this program or in liblzma. It is inconvenient to have a
+ // separate error message for errors that should be impossible
+ // to occur, but knowing the error code is important for
+ // debugging. That's why it is good to print the error code
+ // at least when there is no good error message to show.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Error initializing the encoder: %s (error code %u)\n",
+ msg, ret);
+ return false;
+}
+
+
+static bool
+compress(lzma_stream *strm, FILE *infile, FILE *outfile)
+{
+ // This will be LZMA_RUN until the end of the input file is reached.
+ // This tells lzma_code() when there will be no more input.
+ lzma_action action = LZMA_RUN;
+
+ // Buffers to temporarily hold uncompressed input
+ // and compressed output.
+ uint8_t inbuf[BUFSIZ];
+ uint8_t outbuf[BUFSIZ];
+
+ // Initialize the input and output pointers. Initializing next_in
+ // and avail_in isn't really necessary when we are going to encode
+ // just one file since LZMA_STREAM_INIT takes care of initializing
+ // those already. But it doesn't hurt much and it will be needed
+ // if encoding more than one file like we will in 02_decompress.c.
+ //
+ // While we don't care about strm->total_in or strm->total_out in this
+ // example, it is worth noting that initializing the encoder will
+ // always reset total_in and total_out to zero. But the encoder
+ // initialization doesn't touch next_in, avail_in, next_out, or
+ // avail_out.
+ strm->next_in = NULL;
+ strm->avail_in = 0;
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+
+ // Loop until the file has been successfully compressed or until
+ // an error occurs.
+ while (true) {
+ // Fill the input buffer if it is empty.
+ if (strm->avail_in == 0 && !feof(infile)) {
+ strm->next_in = inbuf;
+ strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
+ infile);
+
+ if (ferror(infile)) {
+ fprintf(stderr, "Read error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ // Once the end of the input file has been reached,
+ // we need to tell lzma_code() that no more input
+ // will be coming and that it should finish the
+ // encoding.
+ if (feof(infile))
+ action = LZMA_FINISH;
+ }
+
+ // Tell liblzma do the actual encoding.
+ //
+ // This reads up to strm->avail_in bytes of input starting
+ // from strm->next_in. avail_in will be decremented and
+ // next_in incremented by an equal amount to match the
+ // number of input bytes consumed.
+ //
+ // Up to strm->avail_out bytes of compressed output will be
+ // written starting from strm->next_out. avail_out and next_out
+ // will be incremented by an equal amount to match the number
+ // of output bytes written.
+ //
+ // The encoder has to do internal buffering, which means that
+ // it may take quite a bit of input before the same data is
+ // available in compressed form in the output buffer.
+ lzma_ret ret = lzma_code(strm, action);
+
+ // If the output buffer is full or if the compression finished
+ // successfully, write the data from the output bufffer to
+ // the output file.
+ if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
+ // When lzma_code() has returned LZMA_STREAM_END,
+ // the output buffer is likely to be only partially
+ // full. Calculate how much new data there is to
+ // be written to the output file.
+ size_t write_size = sizeof(outbuf) - strm->avail_out;
+
+ if (fwrite(outbuf, 1, write_size, outfile)
+ != write_size) {
+ fprintf(stderr, "Write error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ // Reset next_out and avail_out.
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+ }
+
+ // Normally the return value of lzma_code() will be LZMA_OK
+ // until everything has been encoded.
+ if (ret != LZMA_OK) {
+ // Once everything has been encoded successfully, the
+ // return value of lzma_code() will be LZMA_STREAM_END.
+ //
+ // It is important to check for LZMA_STREAM_END. Do not
+ // assume that getting ret != LZMA_OK would mean that
+ // everything has gone well.
+ if (ret == LZMA_STREAM_END)
+ return true;
+
+ // It's not LZMA_OK nor LZMA_STREAM_END,
+ // so it must be an error code. See lzma/base.h
+ // (src/liblzma/api/lzma/base.h in the source package
+ // or e.g. /usr/include/lzma/base.h depending on the
+ // install prefix) for the list and documentation of
+ // possible values. Most values listen in lzma_ret
+ // enumeration aren't possible in this example.
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_DATA_ERROR:
+ // This error is returned if the compressed
+ // or uncompressed size get near 8 EiB
+ // (2^63 bytes) because that's where the .xz
+ // file format size limits currently are.
+ // That is, the possibility of this error
+ // is mostly theoretical unless you are doing
+ // something very unusual.
+ //
+ // Note that strm->total_in and strm->total_out
+ // have nothing to do with this error. Changing
+ // those variables won't increase or decrease
+ // the chance of getting this error.
+ msg = "File size limits exceeded";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR, but
+ // if this program is buggy (or liblzma has
+ // a bug), it may be e.g. LZMA_BUF_ERROR or
+ // LZMA_OPTIONS_ERROR too.
+ //
+ // It is inconvenient to have a separate
+ // error message for errors that should be
+ // impossible to occur, but knowing the error
+ // code is important for debugging. That's why
+ // it is good to print the error code at least
+ // when there is no good error message to show.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Encoder error: %s (error code %u)\n",
+ msg, ret);
+