summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-26 18:13:06 +0000
committerKarl Berry <karl@freefriends.org>2010-05-26 18:13:06 +0000
commit3d8da5c85f9bb90eb80ac3fa22edf45b448140fb (patch)
treeea7e7459cb562b1bec12164edbcf295647c0202b /Build
parent102ace285218431079cbea4914f3faaad0c7383e (diff)
new xz release
git-svn-id: svn://tug.org/texlive/trunk@18518 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/extra/README13
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/ABOUT-NLS (renamed from Build/source/extra/xz-4.999.9beta/ABOUT-NLS)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/AUTHORS (renamed from Build/source/extra/xz-4.999.9beta/AUTHORS)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/COPYING (renamed from Build/source/extra/xz-4.999.9beta/COPYING)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv2 (renamed from Build/source/extra/xz-4.999.9beta/COPYING.GPLv2)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv3 (renamed from Build/source/extra/xz-4.999.9beta/COPYING.GPLv3)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.LGPLv2.1 (renamed from Build/source/extra/xz-4.999.9beta/COPYING.LGPLv2.1)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/ChangeLog (renamed from Build/source/extra/xz-4.999.9beta/ChangeLog)1843
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/Doxyfile.in (renamed from Build/source/extra/xz-4.999.9beta/Doxyfile.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL (renamed from Build/source/extra/xz-4.999.9beta/INSTALL)80
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL.generic (renamed from Build/source/extra/xz-4.999.9beta/INSTALL.generic)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/Makefile.am)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/Makefile.in)31
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/NEWS (renamed from Build/source/extra/xz-4.999.9beta/NEWS)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/PACKAGERS (renamed from Build/source/extra/xz-4.999.9beta/PACKAGERS)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/README (renamed from Build/source/extra/xz-4.999.9beta/README)5
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/THANKS (renamed from Build/source/extra/xz-4.999.9beta/THANKS)21
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/TODO (renamed from Build/source/extra/xz-4.999.9beta/TODO)16
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/aclocal.m4 (renamed from Build/source/extra/xz-4.999.9beta/aclocal.m4)17
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/autogen.sh (renamed from Build/source/extra/xz-4.999.9beta/autogen.sh)0
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/compile (renamed from Build/source/extra/xz-4.999.9beta/build-aux/compile)6
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.guess (renamed from Build/source/extra/xz-4.999.9beta/build-aux/config.guess)13
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.rpath (renamed from Build/source/extra/xz-4.999.9beta/build-aux/config.rpath)0
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.sub (renamed from Build/source/extra/xz-4.999.9beta/build-aux/config.sub)68
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/depcomp (renamed from Build/source/extra/xz-4.999.9beta/build-aux/depcomp)0
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/install-sh (renamed from Build/source/extra/xz-4.999.9beta/build-aux/install-sh)8
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/ltmain.sh (renamed from Build/source/extra/xz-4.999.9beta/build-aux/ltmain.sh)16
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/build-aux/missing (renamed from Build/source/extra/xz-4.999.9beta/build-aux/missing)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/config.h.in (renamed from Build/source/extra/xz-4.999.9beta/config.h.in)102
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/configure (renamed from Build/source/extra/xz-4.999.9beta/configure)1313
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/configure.ac (renamed from Build/source/extra/xz-4.999.9beta/configure.ac)151
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/debug/Makefile.am)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/debug/Makefile.in)15
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/README (renamed from Build/source/extra/xz-4.999.9beta/debug/README)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/crc32.c (renamed from Build/source/extra/xz-4.999.9beta/debug/crc32.c)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/full_flush.c (renamed from Build/source/extra/xz-4.999.9beta/debug/full_flush.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/hex2bin.c (renamed from Build/source/extra/xz-4.999.9beta/debug/hex2bin.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/known_sizes.c (renamed from Build/source/extra/xz-4.999.9beta/debug/known_sizes.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/memusage.c (renamed from Build/source/extra/xz-4.999.9beta/debug/memusage.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/repeat.c (renamed from Build/source/extra/xz-4.999.9beta/debug/repeat.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/debug/sync_flush.c (renamed from Build/source/extra/xz-4.999.9beta/debug/sync_flush.c)14
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/faq.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/faq.txt)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/history.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/history.txt)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/lzma-file-format.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/lzma-file-format.txt)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/lzmainfo-a4.pdfbin0 -> 4318 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xz-a4.pdfbin0 -> 41293 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdec-a4.pdfbin0 -> 6900 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdiff-a4.pdfbin0 -> 4241 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzgrep-a4.pdf (renamed from Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzgrep-a4.pdf)bin4443 -> 4443 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzless-a4.pdfbin0 -> 4274 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzmore-a4.pdfbin0 -> 4212 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/lzmainfo-letter.pdfbin0 -> 4316 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xz-letter.pdfbin0 -> 41272 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdec-letter.pdfbin0 -> 6895 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdiff-letter.pdfbin0 -> 4241 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzgrep-letter.pdf (renamed from Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzgrep-letter.pdf)bin4440 -> 4440 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzless-letter.pdfbin0 -> 4273 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzmore-letter.pdf (renamed from Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzmore-letter.pdf)bin4210 -> 4210 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/lzmainfo.txt40
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xz.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/man/txt/xz.txt)420
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdec.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdec.txt)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdiff.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdiff.txt)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzgrep.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/man/txt/xzgrep.txt)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzless.txt39
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzmore.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/man/txt/xzmore.txt)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/doc/xz-file-format.txt (renamed from Build/source/extra/xz-4.999.9beta/doc/xz-file-format.txt)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/dos/Makefile (renamed from Build/source/extra/xz-4.999.9beta/dos/Makefile)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/dos/README (renamed from Build/source/extra/xz-4.999.9beta/dos/README)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/dos/config.h (renamed from Build/source/extra/xz-4.999.9beta/dos/config.h)3
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/extra/7z2lzma/7z2lzma.bash (renamed from Build/source/extra/xz-4.999.9beta/extra/7z2lzma/7z2lzma.bash)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/extra/scanlzma/scanlzma.c (renamed from Build/source/extra/xz-4.999.9beta/extra/scanlzma/scanlzma.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/lib/Makefile.am)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/lib/Makefile.in)15
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.c (renamed from Build/source/extra/xz-4.999.9beta/lib/getopt.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.in.h (renamed from Build/source/extra/xz-4.999.9beta/lib/getopt.in.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt1.c (renamed from Build/source/extra/xz-4.999.9beta/lib/getopt1.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt_int.h (renamed from Build/source/extra/xz-4.999.9beta/lib/getopt_int.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/acx_pthread.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/acx_pthread.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/getopt.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/getopt.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/gettext.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/gettext.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/iconv.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/iconv.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-ld.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/lib-ld.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-link.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/lib-link.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-prefix.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/lib-prefix.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/libtool.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/libtool.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltoptions.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/ltoptions.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltsugar.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/ltsugar.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltversion.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/ltversion.m4)10
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/lt~obsolete.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/lt~obsolete.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/nls.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/nls.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/po.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/po.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/posix-shell.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/posix-shell.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/progtest.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/progtest.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_common.m422
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_cpucores.m4105
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_integer.m474
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_physmem.m4211
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_progname.m425
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/m4/visibility.m4 (renamed from Build/source/extra/xz-4.999.9beta/m4/visibility.m4)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/LINGUAS1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/Makefile.in.in (renamed from Build/source/extra/xz-4.999.9beta/po/Makefile.in.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/Makevars (renamed from Build/source/extra/xz-4.999.9beta/po/Makevars)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/POTFILES.in (renamed from Build/source/extra/xz-4.999.9beta/po/POTFILES.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/Rules-quot (renamed from Build/source/extra/xz-4.999.9beta/po/Rules-quot)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/boldquot.sed (renamed from Build/source/extra/xz-4.999.9beta/po/boldquot.sed)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.gmobin0 -> 16940 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.po620
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/en@boldquot.header (renamed from Build/source/extra/xz-4.999.9beta/po/en@boldquot.header)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/en@quot.header (renamed from Build/source/extra/xz-4.999.9beta/po/en@quot.header)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/insert-header.sin (renamed from Build/source/extra/xz-4.999.9beta/po/insert-header.sin)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/quot.sed (renamed from Build/source/extra/xz-4.999.9beta/po/quot.sed)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/remove-potcdate.sin (renamed from Build/source/extra/xz-4.999.9beta/po/remove-potcdate.sin)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/stamp-po (renamed from Build/source/extra/xz-4.999.9beta/po/stamp-po)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/po/xz.pot (renamed from Build/source/extra/xz-4.999.9beta/po/xz.pot)263
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/Makefile.am)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/Makefile.in)19
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/common_w32res.rc (renamed from Build/source/extra/xz-4.999.9beta/src/common/common_w32res.rc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/mythread.h (renamed from Build/source/extra/xz-4.999.9beta/src/common/mythread.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/sysdefs.h (renamed from Build/source/extra/xz-4.999.9beta/src/common/sysdefs.h)12
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_common.h71
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_config.h7
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.c62
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.h23
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.c57
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.h25
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_gettext.h44
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_integer.h523
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.c (renamed from Build/source/extra/xz-4.999.9beta/src/common/open_stdxxx.h)28
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.h23
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.c (renamed from Build/source/extra/xz-4.999.9beta/src/common/physmem.h)136
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.h28
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.c50
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.h32
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.am)5
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.in)176
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.am)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.in)16
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma.h)37
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/base.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/base.h)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/bcj.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/bcj.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/block.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/block.h)41
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/check.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/check.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/container.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/container.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/delta.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/delta.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/filter.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/filter.h)65
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/hardware.h51
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index.h676
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index_hash.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index_hash.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/lzma.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/lzma.h)15
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/stream_flags.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/stream_flags.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/subblock.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/subblock.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/version.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/version.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/vli.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/vli.h)17
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.c)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_fast.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_fast.c)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_small.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_small.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_be.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_be.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_le.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_le.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_tablegen.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_tablegen.c)38
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_x86.S (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_x86.S)12
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_fast.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_fast.c)9
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_small.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_small.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_be.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_be.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_le.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_le.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_tablegen.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_tablegen.c)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_x86.S (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_x86.S)14
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc_macros.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc_macros.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/sha256.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/check/sha256.c)18
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/Makefile.inc)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.c)11
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_encoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/auto_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/auto_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_encoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.c)14
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_decoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_encoder.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_util.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_util.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.c)21
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.h)28
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_buffer_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_buffer_encoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_decoder_memusage.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_decoder_memusage.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder.c25
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder_memusage.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder_memusage.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_decoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_encoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.c)87
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.c)31
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_encoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/hardware_physmem.c25
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.c1241
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.h)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_decoder.c)46
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.c)38
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_hash.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_hash.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_encoder.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.c)16
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.c)81
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_decoder.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_encoder.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_decoder.c)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_encoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_size.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_size.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.c)5
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.c)3
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.c)17
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_private.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_private.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma.pc.in (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma.pc.in)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma_w32res.rc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma_w32res.rc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/Makefile.inc)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.c)18
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.c)31
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.h)16
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_hash.h)39
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash_table.h68
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_mf.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_mf.c)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos.h)5
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_table.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_table.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_tablegen.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_tablegen.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.c)61
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_common.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.h)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.c)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_fast.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_fast.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_normal.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_normal.c)12
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_presets.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_presets.c)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_private.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_private.h)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_table.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_table.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_tablegen.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_tablegen.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_common.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_common.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/arm.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/arm.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/armthumb.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/armthumb.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/ia64.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/ia64.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/powerpc.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/powerpc.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.c)14
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_private.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_private.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/sparc.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/sparc.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/x86.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/simple/x86.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/Makefile.inc (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/Makefile.inc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.c (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.h (renamed from Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.am)5
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.in)55
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.1 (renamed from Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.1)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.c (renamed from Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.c)74
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.am)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.in)15
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.1 (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.1)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.in (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.1 (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.1)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.in (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.in)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.1 (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzless.1)10
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.in (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzless.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.1 (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.1)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.in (renamed from Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.in)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/xz/Makefile.am)12
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/xz/Makefile.in)123
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/args.c)105
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/args.h)1
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/coder.c)178
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/coder.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/file_io.c)454
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/file_io.h)59
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/hardware.c)49
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/hardware.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.c742
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.h18
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/main.c)168
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/main.h)9
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/message.c)524
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/message.h)57
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/options.c)77
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/options.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/private.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/private.h)12
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/signals.c)36
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/signals.h)17
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.c (renamed from Build/source/extra/xz-4.999.9beta/src/xz/suffix.c)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/suffix.h)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.c314
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.h (renamed from Build/source/extra/xz-4.999.9beta/src/xz/util.h)50
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz.1 (renamed from Build/source/extra/xz-4.999.9beta/src/xz/xz.1)193
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz_w32res.rc (renamed from Build/source/extra/xz-4.999.9beta/src/xz/xz_w32res.rc)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.am)11
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.in)98
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/lzmadec_w32res.rc (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/lzmadec_w32res.rc)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.1 (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.1)8
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.c (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.c)142
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec_w32res.rc (renamed from Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec_w32res.rc)2
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.am (renamed from Build/source/extra/xz-4.999.9beta/tests/Makefile.am)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.in (renamed from Build/source/extra/xz-4.999.9beta/tests/Makefile.in)15
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/bcj_test.c (renamed from Build/source/extra/xz-4.999.9beta/tests/bcj_test.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_sparc (renamed from Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_sparc)bin1240 -> 1240 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_x86 (renamed from Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_x86)bin1388 -> 1388 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/create_compress_files.c (renamed from Build/source/extra/xz-4.999.9beta/tests/create_compress_files.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/README (renamed from Build/source/extra/xz-4.999.9beta/tests/files/README)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-backward_size.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0-backward_size.xz)bin32 -> 32 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-empty-truncated.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0-empty-truncated.xz)bin31 -> 31 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-footer_magic.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0-footer_magic.xz)bin32 -> 32 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-header_magic.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0-header_magic.xz)bin32 -> 32 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-nonempty_index.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0-nonempty_index.xz)bin32 -> 32 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-alone.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-alone.xz)bin55 -> 55 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-header_magic.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-header_magic.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0catpad-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0catpad-empty.xz)bin69 -> 69 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0pad-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-0pad-empty.xz)bin37 -> 37 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-1.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-2.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-3.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-4.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-4.xz)bin76 -> 76 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-5.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-5.xz)bin72 -> 72 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc32.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc32.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc64.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc64.xz)bin72 -> 72 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-sha256.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-sha256.xz)bin96 -> 96 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-1.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-2.xz)bin424 -> 424 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-3.xz)bin424 -> 424 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-4.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-4.xz)bin408 -> 408 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-5.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-5.xz)bin408 -> 408 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-6.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-6.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-7.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-7.xz)bin408 -> 408 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-8.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-8.xz)bin464 -> 464 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-1.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-2.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-3.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-1.xz)bin72 -> 72 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-2.xz)bin76 -> 76 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-compressed_data_padding.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-compressed_data_padding.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-1.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-2.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-3.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-4.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-4.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-5.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-5.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-0-empty.xz)bin32 -> 32 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0cat-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-0cat-empty.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0catpad-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-0catpad-empty.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0pad-empty.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-0pad-empty.xz)bin36 -> 36 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-3delta-lzma2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-3delta-lzma2.xz)bin528 -> 528 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-1.xz)bin72 -> 72 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-2.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-3.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc32.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc32.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc64.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc64.xz)bin72 -> 72 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-none.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-none.xz)bin64 -> 64 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-sha256.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-sha256.xz)bin96 -> 96 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-delta-lzma2.tiff.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-delta-lzma2.tiff.xz)bin51316 -> 51316 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-1.xz)bin424 -> 424 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-2.xz)bin424 -> 424 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-3.xz)bin408 -> 408 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-4.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-4.xz)bin464 -> 464 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-sparc-lzma2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-sparc-lzma2.xz)bin612 -> 612 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-x86-lzma2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-1-x86-lzma2.xz)bin716 -> 716 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-2-lzma2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/good-2-lzma2.xz)bin92 -> 92 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-block_header.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/unsupported-block_header.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-check.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/unsupported-check.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-1.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-1.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-2.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-2.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-3.xz (renamed from Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-3.xz)bin68 -> 68 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_block_header.c (renamed from Build/source/extra/xz-4.999.9beta/tests/test_block_header.c)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_check.c (renamed from Build/source/extra/xz-4.999.9beta/tests/test_check.c)0
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/tests/test_compress.sh (renamed from Build/source/extra/xz-4.999.9beta/tests/test_compress.sh)0
-rwxr-xr-xBuild/source/extra/xz-4.999.9beta-124-gb637/tests/test_files.sh (renamed from Build/source/extra/xz-4.999.9beta/tests/test_files.sh)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_filter_flags.c (renamed from Build/source/extra/xz-4.999.9beta/tests/test_filter_flags.c)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_index.c659
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_stream_flags.c (renamed from Build/source/extra/xz-4.999.9beta/tests/test_stream_flags.c)6
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/tests/tests.h (renamed from Build/source/extra/xz-4.999.9beta/tests/tests.h)4
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/version.sh (renamed from Build/source/extra/xz-4.999.9beta/version.sh)0
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/windows/INSTALL-Windows.txt131
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/windows/README-Windows.txt115
-rw-r--r--Build/source/extra/xz-4.999.9beta-124-gb637/windows/build.sh188
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdfbin38867 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdfbin6914 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdfbin4240 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdfbin4329 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdfbin4211 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdfbin38846 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdfbin6909 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdfbin4239 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdfbin4326 -> 0 bytes
-rw-r--r--Build/source/extra/xz-4.999.9beta/doc/man/txt/xzless.txt40
-rw-r--r--Build/source/extra/xz-4.999.9beta/m4/lc_cpucores.m457
-rw-r--r--Build/source/extra/xz-4.999.9beta/m4/lc_physmem.m484
-rw-r--r--Build/source/extra/xz-4.999.9beta/po/LINGUAS0
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/common/bswap.h52
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/common/cpucores.h51
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/common/integer.h170
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index.h403
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/liblzma/common/bsr.h60
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder.c80
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.c776
-rw-r--r--Build/source/extra/xz-4.999.9beta/src/xz/util.c229
-rw-r--r--Build/source/extra/xz-4.999.9beta/tests/test_index.c532
-rw-r--r--Build/source/extra/xz-4.999.9beta/windows/Makefile308
-rw-r--r--Build/source/extra/xz-4.999.9beta/windows/README155
-rw-r--r--Build/source/extra/xz-4.999.9beta/windows/config.h165
439 files changed, 12329 insertions, 5592 deletions
diff --git a/Build/source/extra/README b/Build/source/extra/README
new file mode 100644
index 00000000000..bf0bbf1569c
--- /dev/null
+++ b/Build/source/extra/README
@@ -0,0 +1,13 @@
+$Id$
+Public domain. Originally written 2010 by Karl Berry.
+
+This directory contains things which are not part of the TeX Live build,
+but only present for convenience.
+
+djgpp support here is probably obsolete, but just in case.
+
+epstopdf is developed here because I didn't feel like making a separate
+ repository.
+
+xz-* is here so TL builders can easily get it
+ (http://tug.org/texlive/build.html)
diff --git a/Build/source/extra/xz-4.999.9beta/ABOUT-NLS b/Build/source/extra/xz-4.999.9beta-124-gb637/ABOUT-NLS
index ec20977e060..ec20977e060 100644
--- a/Build/source/extra/xz-4.999.9beta/ABOUT-NLS
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/ABOUT-NLS
diff --git a/Build/source/extra/xz-4.999.9beta/AUTHORS b/Build/source/extra/xz-4.999.9beta-124-gb637/AUTHORS
index 63a9815bc03..63a9815bc03 100644
--- a/Build/source/extra/xz-4.999.9beta/AUTHORS
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/AUTHORS
diff --git a/Build/source/extra/xz-4.999.9beta/COPYING b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING
index 43c90d0598c..43c90d0598c 100644
--- a/Build/source/extra/xz-4.999.9beta/COPYING
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING
diff --git a/Build/source/extra/xz-4.999.9beta/COPYING.GPLv2 b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv2
index d511905c164..d511905c164 100644
--- a/Build/source/extra/xz-4.999.9beta/COPYING.GPLv2
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv2
diff --git a/Build/source/extra/xz-4.999.9beta/COPYING.GPLv3 b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv3
index 94a9ed024d3..94a9ed024d3 100644
--- a/Build/source/extra/xz-4.999.9beta/COPYING.GPLv3
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.GPLv3
diff --git a/Build/source/extra/xz-4.999.9beta/COPYING.LGPLv2.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.LGPLv2.1
index 5ab7695ab8c..5ab7695ab8c 100644
--- a/Build/source/extra/xz-4.999.9beta/COPYING.LGPLv2.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/COPYING.LGPLv2.1
diff --git a/Build/source/extra/xz-4.999.9beta/ChangeLog b/Build/source/extra/xz-4.999.9beta-124-gb637/ChangeLog
index 15102ef62eb..3a47189cd6e 100644
--- a/Build/source/extra/xz-4.999.9beta/ChangeLog
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/ChangeLog
@@ -1,3 +1,1846 @@
+commit b6377fc990f9b8651149cae0fecb8b9c5904e26d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-05-16 18:42:22 +0300
+
+ Split message_filters().
+
+ message_filters_to_str() converts the filter chain to
+ a string. message_filters_show() replaces the original
+ message_filters().
+
+ uint32_to_optstr() was also added to show the dictionary
+ size in nicer format when possible.
+
+ src/xz/coder.c | 2 +-
+ src/xz/message.c | 187 ++++++++++++++++++++++++++++++++++-------------------
+ src/xz/message.h | 14 ++++-
+ 3 files changed, 134 insertions(+), 69 deletions(-)
+
+commit d9986db782d6cf0f314342127280519339378fa0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-05-14 23:17:20 +0300
+
+ Omit lzma_restrict from the API headers.
+
+ It isn't really useful so omitting it makes things
+ shorter and slightly more readable.
+
+ src/liblzma/api/lzma.h | 12 ------------
+ src/liblzma/api/lzma/index.h | 5 ++---
+ src/liblzma/api/lzma/vli.h | 11 +++++------
+ 3 files changed, 7 insertions(+), 21 deletions(-)
+
+commit 0d3489efca0a723dca0394809fa3e6170843af4b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-05-10 19:57:24 +0300
+
+ Updated INSTALL.
+
+ INSTALL | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+commit 3fb3d594a2b53886adee161b6261e92277f05f7c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-05-10 19:54:52 +0300
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 6548e304657e77d3a972053db3c41c5daf591113
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-05-10 19:54:15 +0300
+
+ Updates to tuklib_physmem and tuklib_cpucores.
+
+ Don't use #error to generate compile error, because some
+ compilers actually don't take it as an error. This fixes
+ tuklib_physmem on IRIX.
+
+ Fix incorrect error check for sysconf() return values.
+
+ Add AIX, HP-UX, and Tru64 specific code to detect the
+ amount RAM.
+
+ Add HP-UX specific code to detect the number of CPU cores.
+
+ Thanks a lot to Peter O'Gorman for initial patches,
+ testing, and debugging these fixes.
+
+ m4/tuklib_cpucores.m4 | 33 ++++++++++++++++---
+ m4/tuklib_physmem.m4 | 72 ++++++++++++++++++++++++++++++++++++++++-
+ src/common/tuklib_cpucores.c | 14 +++++++-
+ src/common/tuklib_physmem.c | 33 ++++++++++++++++++-
+ 4 files changed, 141 insertions(+), 11 deletions(-)
+
+commit a290cfee3e23f046889c022aa96b4eca2016fdda
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-04-12 21:55:56 +0300
+
+ Show both elapsed time and estimated remaining time in xz -v.
+
+ The extra space for showing both has been taken from the
+ sizes field. If the sizes grow big, bigger units than MiB
+ will be used. It makes it slightly difficult to see that
+ progress is still happening with huge files, but it should
+ be OK in practice.
+
+ Thanks to Trent W. Buck for <http://bugs.debian.org/574583>
+ and Jonathan Nieder for suggestions how to fix it.
+
+ THANKS | 1 +
+ src/xz/message.c | 86 ++++++++++++++++++++++++------------------------------
+ 2 files changed, 39 insertions(+), 48 deletions(-)
+
+commit a1f7a986b8d708f9290da9799ca1b8d7082fad3e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-31 16:47:25 +0300
+
+ Add a simple tip to faq.txt about tar and xz.
+
+ Thanks to Gilles Espinasse.
+
+ THANKS | 1 +
+ doc/faq.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+commit c737eec91d200d730aa82662affd6b06ebb0bff0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-22 21:03:03 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f4b2b52624b802c786e4e2a8eb6895794dd93b24
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-07 19:52:25 +0200
+
+ Fix xzgrep to not break if filenames have spaces or quotes.
+
+ Thanks to someone who reported the bug on IRC.
+
+ src/scripts/xzgrep.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit cf38da00a140bd3bd65b192390ae5553380fd774
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-07 13:59:32 +0200
+
+ Treat all integer multiplier suffixes as base-2.
+
+ Originally both base-2 and base-10 were supported, but since
+ there seems to be little need for base-10 in XZ Utils, treat
+ everything as base-2 and also be more relaxed about the case
+ of the first letter of the suffix. Now xz will accept e.g.
+ KiB, Ki, k, K, kB, and KB, and interpret them all as 1024. The
+ recommended spelling of the suffixes are still KiB, MiB, and GiB.
+
+ src/xz/util.c | 53 +++++++++++++++++++++++------------------------------
+ src/xz/xz.1 | 48 ++++++++++++++++++++++++++++--------------------
+ src/xzdec/xzdec.c | 42 ++++++++++++++++--------------------------
+ 3 files changed, 67 insertions(+), 76 deletions(-)
+
+commit 00fc1211ae7b687ac912098f4479112059deccbd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-07 13:50:23 +0200
+
+ Consistently round up the memory usage limit in messages.
+
+ It still feels a bit wrong to round 1 byte to 1 MiB but
+ at least it is now done consistently so that the same
+ byte value is always rounded the same way to MiB.
+
+ src/xz/message.c | 5 +++--
+ src/xzdec/xzdec.c | 7 +++++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+commit 9886d436ff5615fc70eef32ff757b1e934069621
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-07 13:34:34 +0200
+
+ Change the default of --enable-assume-ram from 32 to 128 MiB.
+
+ This is to allow files created with "xz -9" to be decompressed
+ if the amount of RAM cannot be determined.
+
+ INSTALL | 5 ++---
+ configure.ac | 11 ++++++-----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+commit 2672bcc9f85ba28ff648e092e9eb4cd9e69ce418
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-07 13:29:28 +0200
+
+ Increase the default memory usage limit on "low-memory" systems.
+
+ Previously the default limit was always 40 % of RAM. The
+ new limit is a little bit more complex:
+
+ - If 40 % of RAM is at least 80 MiB, 40 % of RAM is used
+ as the limit.
+
+ - If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.
+
+ - Otherwise 80 % of RAM is used as the limit.
+
+ This should make it possible to decompress files created with
+ "xz -9" on more systems. Swapping is generally more expected
+ on systems with less RAM, so higher default limit on them
+ shouldn't cause too bad surprises in terms of heavy swapping.
+ Instead, the higher default limit should reduce the number of
+ bad surprises when it used to prevent decompression of files
+ created with "xz -9". The DoS prevention system shouldn't be
+ a DoS itself.
+
+ Note that even with the new default limit, a system with 64 MiB
+ RAM cannot decompress files created with "xz -9" without user
+ overriding the limit. This should be OK, because if xz is going
+ to need more memory than the system has RAM, it will run very
+ very slowly and thus it's good that user has to override the limit
+ in that case.
+
+ src/xz/hardware.c | 43 +++++++++++++++++++++++++++++++------------
+ src/xz/xz.1 | 21 +++++++++++++++------
+ src/xzdec/xzdec.1 | 8 ++++----
+ src/xzdec/xzdec.c | 42 ++++++++++++++++++++++++++++++------------
+ 4 files changed, 80 insertions(+), 34 deletions(-)
+
+commit 5527b7269a997e7f335d60f237a64bbf225d9dc7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-06 21:36:19 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit d0d1c51aea4351288a7e533cce28cb7f852f6b05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-03-06 21:17:20 +0200
+
+ Fix missing initialization in lzma_strm_init().
+
+ With bad luck, lzma_code() could return LZMA_BUF_ERROR
+ when it shouldn't.
+
+ This has been here since the early days of liblzma.
+ It got triggered by the modifications made to the xz
+ tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f
+ but only when decompressing .lzma files. Somehow I managed
+ to miss testing that with Valgrind earlier.
+
+ This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
+ Thanks to Rafał Mużyło for helping to debug it on IRC.
+
+ src/liblzma/common/common.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-12 13:16:15 +0200
+
+ Collection of language fixes to comments and docs.
+
+ Thanks to Jonathan Nieder.
+
+ README | 2 +-
+ configure.ac | 2 +-
+ doc/faq.txt | 2 +-
+ extra/7z2lzma/7z2lzma.bash | 2 +-
+ src/common/tuklib_progname.c | 2 +-
+ src/common/tuklib_progname.h | 2 +-
+ src/liblzma/api/lzma/base.h | 8 ++++----
+ src/liblzma/api/lzma/bcj.h | 2 +-
+ src/liblzma/api/lzma/block.h | 2 +-
+ src/liblzma/api/lzma/check.h | 2 +-
+ src/liblzma/api/lzma/filter.h | 4 ++--
+ src/liblzma/api/lzma/index.h | 6 +++---
+ src/liblzma/api/lzma/lzma.h | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/api/lzma/vli.h | 2 +-
+ src/liblzma/common/block_header_encoder.c | 2 +-
+ src/liblzma/common/chunk_size.c | 4 ++--
+ src/liblzma/common/common.h | 4 ++--
+ src/liblzma/common/filter_buffer_decoder.c | 2 +-
+ src/liblzma/common/filter_encoder.c | 4 ++--
+ src/liblzma/common/index.c | 6 +++---
+ src/liblzma/common/index_encoder.c | 2 +-
+ src/liblzma/common/stream_encoder.c | 2 +-
+ src/liblzma/common/vli_decoder.c | 2 +-
+ src/liblzma/lz/lz_encoder.c | 2 +-
+ src/liblzma/lz/lz_encoder.h | 2 +-
+ src/liblzma/lzma/lzma2_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_decoder.c | 4 ++--
+ src/liblzma/lzma/lzma_decoder.h | 2 +-
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 2 +-
+ src/liblzma/lzma/lzma_encoder_private.h | 2 +-
+ src/liblzma/simple/simple_coder.c | 2 +-
+ src/liblzma/subblock/subblock_encoder.c | 2 +-
+ src/scripts/xzdiff.1 | 2 +-
+ src/scripts/xzless.1 | 10 +++++-----
+ src/xz/coder.c | 2 +-
+ src/xz/file_io.c | 2 +-
+ src/xz/main.c | 6 +++---
+ src/xz/main.h | 2 +-
+ src/xz/message.c | 10 +++++-----
+ src/xz/message.h | 2 +-
+ src/xz/xz.1 | 16 ++++++++--------
+ src/xzdec/lzmadec_w32res.rc | 2 +-
+ src/xzdec/xzdec_w32res.rc | 2 +-
+ tests/test_index.c | 2 +-
+ windows/build.sh | 4 ++--
+ 47 files changed, 77 insertions(+), 77 deletions(-)
+
+commit 4785f2021aa6a23f1caf724fcc823e562584f225
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-12 12:41:20 +0200
+
+ Fix jl -> jb in ASM files.
+
+ src/liblzma/check/crc32_x86.S | 2 +-
+ src/liblzma/check/crc64_x86.S | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 6b50c9429bf85521d355adc61745d06ee017f8c8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-12 12:31:22 +0200
+
+ Use __APPLE__ instead of __MACH__ in ASM files.
+
+ This allows the files to work on HURD.
+
+ Thanks to Jonathan Nieder.
+
+ src/liblzma/check/crc32_x86.S | 8 ++++----
+ src/liblzma/check/crc64_x86.S | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+commit 6503fde658a5cdbdd907a788865470dd64771601
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-07 19:48:06 +0200
+
+ Subtle change to liblzma Block handling API.
+
+ lzma_block.version has to be initialized even for
+ lzma_block_header_decode(). This way a future version
+ of liblzma won't allocate memory in a way that an old
+ application doesn't know how to free it.
+
+ The subtlety of this change is that all current apps
+ using lzma_block_header_decode() will keep working for
+ now, because the only possible version value is zero,
+ and lzma_block_header_decode() unconditionally sets the
+ version to zero even now. Unless fixed, these apps will
+ break in the future if a new version of the Block options
+ is ever needed.
+
+ src/liblzma/api/lzma/block.h | 39 +++++++++++++++-------------------
+ src/liblzma/common/stream_decoder.c | 3 ++
+ 2 files changed, 20 insertions(+), 22 deletions(-)
+
+commit dd7c3841ff78cb94ce02b0220c6e4748460970f7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-02 11:50:11 +0200
+
+ Fix wrong assertion.
+
+ This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.
+
+ src/xz/main.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit 9d67588c1597849504a3e5ac8bf6f06e7d2ee8be
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-01 22:48:42 +0200
+
+ Updated TODO.
+
+ TODO | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+commit fef6333f52c8801308c3b78acb7942988541d137
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-01 22:47:54 +0200
+
+ Fix typos in comments.
+
+ src/xz/list.c | 2 +-
+ windows/build.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 455e68c030fde8a8c2f5e254c3b3ab9489bf3735
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-01 22:46:56 +0200
+
+ Fix signal handling for --list.
+
+ src/xz/main.c | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 82220a149015616f75641ee8bbea415137535b9b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-01 11:44:45 +0200
+
+ Fix compression of symlinks with --force.
+
+ xz --force accepted symlinks, but didn't remove
+ them after successful compression. Instead, an error
+ message was displayed.
+
+ src/xz/file_io.c | 14 +++++++++++++-
+ 1 files changed, 13 insertions(+), 1 deletions(-)
+
+commit d4da177d5ba3d2ef7323a6f1e06ca16e0478810e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-02-01 10:20:57 +0200
+
+ Fix a comment.
+
+ windows/build.sh | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+commit f9dd797a423a148903cf345b4146cb1fe1eab11d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 23:43:54 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit ee5ddb8b28419fe4923ded5c18a50570a762dcab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 23:41:29 +0200
+
+ Updated TODO.
+
+ TODO | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+commit 11936ad3f5a2e97bda3463c7a56a2f4bb9265ea6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 23:35:04 +0200
+
+ Mention TODO in README.
+
+ README | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2901a8e7e82af05675b8cd8758a8ceddb111359f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 23:31:14 +0200
+
+ Updated INSTALL.
+
+ INSTALL | 52 ++++++++++++++++++++++++++--------------------------
+ 1 files changed, 26 insertions(+), 26 deletions(-)
+
+commit 8884e16864ba53fb4b58623d7537d7ef30c28e11
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 23:28:51 +0200
+
+ Revise the Windows build files.
+
+ The old Makefile + config.h was deleted, because it
+ becomes outdated too easily and building with the
+ Autotools based build system works fine even on Windows.
+
+ windows/build.sh hasn't got much testing, but it should
+ work to build 32-bit x86 and x86-64 versions of XZ Utils
+ using MSYS, MinGW or MinGW-w32, and MinGW-w64.
+
+ windows/INSTALL-Windows.txt describes what packages are
+ needed and how to install them.
+
+ windows/README-Windows.txt is a readme file for the binary
+ package that build.sh hopefully builds.
+
+ There are no instructions about using Autotools for now,
+ so those using a git snapshot may want to run
+ "autoreconf -fi && ./configure && make mydist" on a UN*X
+ box and then copy the resulting .tar.gz to a Windows.
+
+ windows/INSTALL-Windows.txt | 131 ++++++++++++++++++
+ windows/Makefile | 320 -------------------------------------------
+ windows/README | 155 ---------------------
+ windows/README-Windows.txt | 115 ++++++++++++++++
+ windows/build.sh | 189 +++++++++++++++++++++++++
+ windows/config.h | 170 -----------------------
+ 6 files changed, 435 insertions(+), 645 deletions(-)
+
+commit 34eb5e201d62f7f46bbe6fe97cfe08cb31b3b88c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 19:52:38 +0200
+
+ Select the default integrity check type at runtime.
+
+ Previously it was set statically to CRC64 or CRC32
+ depending on options passed to the configure script.
+
+ src/xz/coder.c | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+commit 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 18:17:50 +0200
+
+ Improve displaying of the memory usage limit.
+
+ src/xz/coder.c | 8 +++-----
+ src/xz/message.c | 37 +++++++++++++++++++++++++++++--------
+ src/xz/util.c | 7 +++++++
+ src/xz/util.h | 6 ++++++
+ 4 files changed, 45 insertions(+), 13 deletions(-)
+
+commit b3cc4d8edd68a0250cc69680c99b9f7343f99cf2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 12:53:56 +0200
+
+ Don't use uninitialized sigset_t.
+
+ If signal handlers haven't been established, then it's
+ useless to try to block them, especially since the sigset_t
+ used for blocking hasn't been initialized yet.
+
+ src/xz/signals.c | 34 ++++++++++++++++++++++++----------
+ 1 files changed, 24 insertions(+), 10 deletions(-)
+
+commit 231c3c7098f1099a56abb8afece76fc9b8699f05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-31 12:01:54 +0200
+
+ Delay opening the destionation file and other fixes.
+
+ The opening of the destination file is now delayed a little.
+ The coder is initialized, and if decompressing, the memory
+ usage of the first Block compared against the memory
+ usage limit before the destination file is opened. This
+ means that if --force was used, the old "target" file won't
+ be deleted so easily when something goes wrong very early.
+ Thanks to Mark K for the bug report.
+
+ The above fix required some changes to progress message
+ handling. Now there is a separate function for setting and
+ printing the filename. It is used also in list.c.
+
+ list_file() now handles stdin correctly (gives an error).
+
+ A useless check for user_abort was removed from file_io.c.
+
+ src/xz/coder.c | 64 ++++++++++++++++++++++----------
+ src/xz/file_io.c | 107 ++++++++++++++++++++++++++----------------------------
+ src/xz/file_io.h | 8 +++-
+ src/xz/list.c | 28 +++++----------
+ src/xz/message.c | 46 +++++++++++++----------
+ src/xz/message.h | 29 ++++++++++-----
+ 6 files changed, 157 insertions(+), 125 deletions(-)
+
+commit 0dbd0641db99d5e73d51d04ce7a71e52dc6b4105
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-29 22:48:04 +0200
+
+ Add list.h to src/xz/Makefile.am.
+
+ This should have been already in
+ 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1.
+
+ src/xz/Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit b4b1a56e0cbd597157858264f5c7189201ac9018
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-29 13:24:27 +0200
+
+ Add lzmainfo.1 to manfiles list to convert to .txt and .pdf.
+
+ Makefile.am | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 5574d64e03ad3a3d6e00e4b0d3e81c7b5529ec95
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-27 16:42:11 +0200
+
+ Silence two compiler warnings on DOS-like systems.
+
+ src/common/tuklib_open_stdxxx.c | 6 +++++-
+ src/xz/file_io.c | 3 +++
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+commit b063cc34a30a4edf109343ff373b2b62b8ca72d3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-27 13:31:03 +0200
+
+ Use PACKAGE_URL instead of custom PACKAGE_HOMEPAGE.
+
+ configure.ac | 9 ++-------
+ src/liblzma/liblzma.pc.in | 2 +-
+ src/lzmainfo/lzmainfo.c | 2 +-
+ src/xz/message.c | 2 +-
+ src/xzdec/xzdec.c | 2 +-
+ 5 files changed, 6 insertions(+), 11 deletions(-)
+
+commit 38b8035b5cb5f56457c5fa5a891d6900fcf5984f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-26 23:37:46 +0200
+
+ Add a missing space to an error message.
+
+ Thanks to Robert Readman.
+
+ src/xz/args.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e5496f9628ff5979392a80421d0b63a4de8015b4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-26 22:53:37 +0200
+
+ Use past tense in error message in io_unlink().
+
+ Added a note to translators too.
+
+ Thanks to Robert Readman.
+
+ THANKS | 1 +
+ src/xz/file_io.c | 14 ++++++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+commit d9a9800597ea540090e434132c3b511217df0a2b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-26 15:42:24 +0200
+
+ Fix too small static buffer in util.c.
+
+ This was introduced in
+ 0dd6d007669b946543ca939a44243833c79e08f4 two days ago.
+
+ src/xz/util.c | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+commit d0b4bbf5da068503c099cd456e294d7673548cc0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-26 14:46:43 +0200
+
+ Minor comment fix.
+
+ src/xz/main.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-24 23:50:54 +0200
+
+ Add initial version of xz --list.
+
+ This is a bit rough but should be useful for basic things.
+ Ideas (with detailed examples) about the output format are
+ welcome.
+
+ The output of --robot --list is not necessarily stable yet,
+ although I don't currently have any plans about changing it.
+
+ The man page hasn't been updated yet.
+
+ src/xz/Makefile.am | 1 +
+ src/xz/list.c | 988 +++++++++++++++++++++++++++++++++-------------------
+ src/xz/list.h | 18 +
+ src/xz/main.c | 19 +-
+ src/xz/private.h | 1 +
+ 5 files changed, 668 insertions(+), 359 deletions(-)
+
+commit df254ce03be016e217b511e7acd5d493f9929ca5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-24 22:46:11 +0200
+
+ Add io_pread().
+
+ It will be used by --list.
+
+ src/xz/file_io.c | 25 +++++++++++++++++++++++++
+ src/xz/file_io.h | 17 +++++++++++++++++
+ 2 files changed, 42 insertions(+), 0 deletions(-)
+
+commit ef68dd4a92976276304de2aedfbe34ae91a86abb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-24 22:45:14 +0200
+
+ Set LC_NUMERIC=C when --robot is used.
+
+ It is to ensure that floating point numbers
+ will always have a dot as the decimal separator.
+
+ src/xz/args.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 0dd6d007669b946543ca939a44243833c79e08f4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-24 16:57:40 +0200
+
+ Some improvements to printing sizes in xz.
+
+ src/xz/coder.c | 56 ++++++++++++++-----------------------
+ src/xz/message.c | 80 +++++++++++++++++-------------------------------------
+ src/xz/message.h | 4 +++
+ src/xz/util.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xz/util.h | 44 +++++++++++++++++++++++++++++
+ 5 files changed, 166 insertions(+), 90 deletions(-)
+
+commit 2a98fdffd68c66371279c211c29153c808ad5c1d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-20 22:02:35 +0200
+
+ Fix a typo in README.
+
+ Thanks to R. Bijker.
+
+ README | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 07a11dad44e041b01dcfc73e8d4e00731158c06d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-17 11:59:54 +0200
+
+ Updated windows/Makefile.
+
+ Thanks to Dan Shechter for the patch.
+
+ It is likely that windows/Makefile will be removed
+ completely, because Autotols based build nowadays
+ works well with both 32-bit and 64-bit MinGW (I
+ just need to update the docs).
+
+ windows/Makefile | 38 +++++++++++++++++++++++++-------------
+ windows/config.h | 2 ++
+ 2 files changed, 27 insertions(+), 13 deletions(-)
+
+commit 37f31ead9d2b4e467df11450cf29ed7d7e3e25f3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-15 11:05:11 +0200
+
+ Update the xz man page to match the previous two commits.
+
+ src/xz/xz.1 | 9 +++------
+ 1 files changed, 3 insertions(+), 6 deletions(-)
+
+commit 3ffd5d81a43210c8da56da5c5b3637d3f8bc63c7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-13 19:10:25 +0200
+
+ Don't read compressed data from a terminal or write it
+ to a terminal even if --force is specified.
+
+ It just seems more reasonable this way.
+
+ The new behavior matches bzip2. The old one matched gzip.
+
+ src/xz/main.c | 20 +++++++++-----------
+ src/xz/util.c | 8 ++++----
+ 2 files changed, 13 insertions(+), 15 deletions(-)
+
+commit 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-13 18:12:40 +0200
+
+ Don't compress or decompress special files unless writing
+ to stdout even if --force is used.
+
+ --force will still enable compression of symlinks, but only
+ in case they point to a regular file.
+
+ The new way simply seems more reasonable. It matches gzip's
+ behavior while the old one matched bzip2's behavior.
+
+ src/xz/file_io.c | 15 ++++++++++-----
+ 1 files changed, 10 insertions(+), 5 deletions(-)
+
+commit cee12aa852ec0902983dc1f153346ef750157fb9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-12 16:30:33 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 153c7740c54b3c90129dbd3d6153ac1303c4d605
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-12 16:18:14 +0200
+
+ Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.
+
+ This is untested but it will get tested soon and, if needed,
+ fixed before 5.0.0.
+
+ Thanks to Stuart Shelton.
+
+ m4/tuklib_cpucores.m4 | 11 +++++++++--
+ m4/tuklib_physmem.m4 | 22 +++++++++++++++++++++-
+ src/common/tuklib_cpucores.c | 6 ++++++
+ src/common/tuklib_physmem.c | 19 +++++++++++++++++++
+ 4 files changed, 55 insertions(+), 3 deletions(-)
+
+commit 8ea8dc754a7a5bc2d60db1eac201839cabdab6a1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2010-01-01 00:29:10 +0200
+
+ Fix _memconfig() functions.
+
+ This affects lzma_memusage() and lzma_memlimit_get().
+
+ src/liblzma/api/lzma/index.h | 7 -------
+ src/liblzma/common/alone_decoder.c | 11 +++++++----
+ src/liblzma/common/index_decoder.c | 10 ++++++----
+ src/liblzma/common/stream_decoder.c | 11 +++++++----
+ 4 files changed, 20 insertions(+), 19 deletions(-)
+
+commit 1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-31 22:45:53 +0200
+
+ Revised the Index handling code.
+
+ This breaks API and ABI but most apps are not affected
+ since most apps don't use this part of the API. You will
+ get a compile error if you are using anything that got
+ broken.
+
+ Summary of changes:
+
+ - Ability to store Stream Flags, which are needed
+ for random-access reading in multi-Stream files.
+
+ - Separate function to set size of Stream Padding.
+
+ - Iterator structure makes it possible to read the same
+ lzma_index from multiple threads at the same time.
+
+ - A lot faster code to locate Blocks.
+
+ - Removed lzma_index_equal() without adding anything
+ to replace it. I don't know what it should do exactly
+ with the new features and what actually needs this
+ function in the first place other than test_index.c,
+ which now has its own code to compare lzma_indexes.
+
+ src/liblzma/api/lzma/index.h | 572 ++++++++---
+ src/liblzma/common/index.c | 1553 ++++++++++++++++++----------
+ src/liblzma/common/index.h | 6 +
+ src/liblzma/common/index_decoder.c | 12 +-
+ src/liblzma/common/index_encoder.c | 36 +-
+ src/liblzma/common/index_encoder.h | 2 +-
+ src/liblzma/common/stream_buffer_encoder.c | 6 +-
+ src/liblzma/common/stream_encoder.c | 3 +-
+ tests/test_index.c | 371 +++++---
+ 9 files changed, 1703 insertions(+), 858 deletions(-)
+
+commit f29997a846e673cb3b8cbd57de47ed313b3978bb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-31 21:13:25 +0200
+
+ Remove c-format tag in cs.po.
+
+ It was fixed in the C code earlier.
+
+ po/cs.po | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 097bad000363e0bf29f8274ad2d7ab59f7dbf644
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-31 21:11:05 +0200
+
+ Add missing lzma_nothrow in filter.h.
+
+ src/liblzma/api/lzma/filter.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b56cb1fc31fa2381f92eefc040df85667048d626
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-09 18:13:44 +0200
+
+ Remove redefinition of _(msgid) macro from lzmainfo.c.
+
+ src/lzmainfo/lzmainfo.c | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+commit 171b03febfe09d9fae6ac8be6aa4518bcaf427d2
+Author: Jonathan Nieder <jrnieder@gmail.com>
+Date: 2009-12-08 19:41:57 -0600
+
+ update po/.gitignore
+
+ Since the *.gmo files are deleted by the maintainer-clean target,
+ I assume they are not meant to be tracked.
+
+ Also add the other files listed in the Makefile’s clean targets
+ (stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they
+ are not accidentally tracked. Most of these are intermediate
+ files that would not appear unless a build is interrupted or
+ fails.
+
+ Split the list of untracked files by origin to make it easier to
+ tell if files are missing in the future.
+
+ Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
+
+ po/.gitignore | 28 ++++++++++++++++++++++------
+ 1 files changed, 22 insertions(+), 6 deletions(-)
+
+commit f7e44c6c11f630519072971b8b07a5729c096c36
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-09 00:38:55 +0200
+
+ Always rely on GCC's auto-import on Windows.
+
+ I understood that this is nicer, because then people
+ don't need to worry about the LZMA_API_STATIC macro.
+
+ Thanks to Charles Wilson and Keith Marshall.
+
+ src/liblzma/api/lzma.h | 16 +++++++++-------
+ 1 files changed, 9 insertions(+), 7 deletions(-)
+
+commit 7b76a3e2336f25088957cba92b0dbd854d9caa3c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-07 21:46:53 +0200
+
+ Fix file_io.c on DOS-like systems.
+
+ The problem was introduced when adding sparse file
+ support in 465d1b0d6518c5d980f2db4c2d769f9905bdd902.
+
+ Thanks to Charles Wilson.
+
+ src/xz/file_io.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 0696f5d268362221380e039bad48a86e29067c6a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-07 20:54:21 +0200
+
+ Add Czech translation.
+
+ Thanks to Marek Černocký.
+
+ Other people planning to translate xz: Note that the
+ messages are a little bit in flux still. Translations
+ are still welcome, just be prepared to some extra work
+ in case there are changes.
+
+ THANKS | 1 +
+ po/LINGUAS | 1 +
+ po/cs.po | 637 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 639 insertions(+), 0 deletions(-)
+
+commit 5e817a50d276f0a3607638c1c1d449d50b9aa4e5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-07 20:32:08 +0200
+
+ Add a note for translators to add a bug reporting address
+ for translation bugs.
+
+ src/xz/message.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 6db1c35be9e1e364cdacff6878910e1b7aac2a37
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-12-07 20:07:02 +0200
+
+ Prevent xgettext from taking one regular string as a C format string.
+
+ Thanks to Marek Černocký.
+
+ src/xz/message.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit e0c2776b6ffbd2b1900fde353aceac734edc93d7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-28 17:45:22 +0200
+
+ Remove duplicate code in io_open_dest().
+
+ Fix a missing _() in the error message too.
+
+ src/xz/file_io.c | 9 +--------
+ 1 files changed, 1 insertions(+), 8 deletions(-)
+
+commit f057a33c6f7c5992389479f2d4feabf2900ba7ee
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-26 10:11:23 +0200
+
+ Typo fix to sysdefs.h.
+
+ Thanks to Jonathan Nieder.
+
+ src/common/sysdefs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 8767b41534eafdf5e742e12190646bf5740b0cdb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-26 10:10:36 +0200
+
+ Fix a memory leak in test_index.c.
+
+ This was introduced in
+ bd13b04e202b6f495a68eb0766f97085b7c50a06.
+
+ Thanks to Jim Meyering for noticing it.
+
+ tests/test_index.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 919fbaff860acdaa4bcd216500a0b1c960a6db92
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-25 14:22:19 +0200
+
+ Add missing error check to coder.c.
+
+ With bad luck this could cause a segfault due to
+ reading (but not writing) past the end of the buffer.
+
+ src/xz/coder.c | 20 +++++++++++---------
+ 1 files changed, 11 insertions(+), 9 deletions(-)
+
+commit bd13b04e202b6f495a68eb0766f97085b7c50a06
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-25 13:04:10 +0200
+
+ Fix bugs in lzma_index_read() and lzma_index_cat().
+
+ lzma_index_read() didn't skip over Stream Padding
+ if it was the first record in the Index.
+
+ lzma_index_cat() didn't combine small Indexes correctly.
+
+ The test suite was updated to check for these bugs.
+
+ These bugs didn't affect the xz command line tool or
+ most users of liblzma in any way.
+
+ src/liblzma/common/index.c | 30 +++++++++++++++++++-----------
+ tests/test_index.c | 28 +++++++++++++++++++++++++---
+ 2 files changed, 44 insertions(+), 14 deletions(-)
+
+commit 1f196909143b888e062bd9a0c4ba8c34d3019bfa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-25 12:52:56 +0200
+
+ Index decoder fixes.
+
+ The Index decoder code didn't perfectly match the API docs,
+ which said that *i will be set to point to the decoded Index
+ only after decoding has succeeded. The docs were a bit unclear
+ too.
+
+ Now the decoder will initially set *i to NULL. *i will be set
+ to point to the decoded Index once decoding has succeeded.
+ This simplifies applications too, since it avoids dangling
+ pointers.
+
+ src/liblzma/api/lzma/index.h | 23 ++++++++++++-----------
+ src/liblzma/common/index_decoder.c | 26 ++++++++++++++++++++------
+ 2 files changed, 32 insertions(+), 17 deletions(-)
+
+commit 465d1b0d6518c5d980f2db4c2d769f9905bdd902
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-25 11:19:20 +0200
+
+ Create sparse files by default when decompressing into
+ a regular file.
+
+ Sparse file creation can be disabled with --no-sparse.
+ I don't promise yet that the name of this option won't
+ change before 5.0.0. It's possible that the code, that
+ checks when it is safe to use sparse output on stdout,
+ is not good enough, and a more flexible command line
+ option is needed to configure sparse file handling.
+
+ src/xz/args.c | 6 ++
+ src/xz/coder.c | 33 ++++----
+ src/xz/file_io.c | 243 ++++++++++++++++++++++++++++++++++++++++++++++--------
+ src/xz/file_io.h | 34 ++++++--
+ src/xz/message.c | 1 +
+ src/xz/xz.1 | 11 +++
+ 6 files changed, 272 insertions(+), 56 deletions(-)
+
+commit 37de544414fc2dc5039471d1002ebd015eb3e627
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-22 12:43:06 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit f1a28b96c900c658fe016852ff62f6c24d1f50fa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-22 12:05:33 +0200
+
+ Add missing consts to pointer casts.
+
+ src/liblzma/check/crc32_fast.c | 4 ++--
+ src/liblzma/check/crc64_fast.c | 5 +++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+commit b9b5c54cd438b3ae47b44cc211b71f3bc53e35ef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-22 12:00:30 +0200
+
+ Enable assembler code only if it is known to work
+ on that operating system.
+
+ I'm too lazy to think how to make a good Autoconf test
+ for this and it's not that important anyway.
+
+ No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64.
+ Inline assembler (if any) is used if a macro like
+ __i386__ or __x86_64__ is defined.
+
+ configure.ac | 26 ++++++++++++--------------
+ 1 files changed, 12 insertions(+), 14 deletions(-)
+
+commit 0733f4c9994db696420a405810d5f02c79ebc404
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-22 11:55:03 +0200
+
+ Make fastpos.h use tuklib_integer.h instead of bsr.h
+ when --enable-small has been specified.
+
+ src/liblzma/common/Makefile.inc | 1 -
+ src/liblzma/common/bsr.h | 60 ---------------------------------------
+ src/liblzma/lzma/fastpos.h | 5 +--
+ 3 files changed, 1 insertions(+), 65 deletions(-)
+
+commit 7ac3985d891dcc5773543f84cc5bce6c14841b12
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-22 11:52:30 +0200
+
+ Update tuklib_integer.h with bit scan functions.
+
+ Thanks to Joachim Henke for the original patch.
+
+ src/common/tuklib_integer.h | 189 +++++++++++++++++++++++++++++++++++++++++--
+ 1 files changed, 181 insertions(+), 8 deletions(-)
+
+commit c74c132f7f79a842c073c66575a4fdb985e4c2e3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-20 12:51:19 +0200
+
+ Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,
+ which now use AC_CACHE_CHECK. Using the cache variable,
+ configure now warns if there is no method to detect the amount
+ of RAM and recommends using --enable-assume-ram.
+
+ configure.ac | 16 +++++++++++++++
+ m4/tuklib_cpucores.m4 | 31 +++++++++++++++++------------
+ m4/tuklib_physmem.m4 | 50 ++++++++++++++++++++++++++----------------------
+ 3 files changed, 61 insertions(+), 36 deletions(-)
+
+commit d315ca4930ff96e1428c6021c96f209e1abdd83e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-16 18:16:45 +0200
+
+ Add support for --info-memory and --robot to xz.
+
+ Currently --robot works only with --info-memory and
+ --version. --help and --long-help work too, but --robot
+ has no effect on them.
+
+ Thanks to Jonathan Nieder for the original patches.
+
+ src/xz/args.c | 85 +++++++++++++++++++++++++++++++----------------------
+ src/xz/args.h | 1 +
+ src/xz/main.c | 11 ++++--
+ src/xz/message.c | 47 ++++++++++++++++++++++-------
+ src/xz/message.h | 4 ++
+ src/xz/xz.1 | 40 +++++++++++++++++++++++--
+ 6 files changed, 133 insertions(+), 55 deletions(-)
+
+commit e330fb7e6b8162894280c8a3dc22fdc05cd2d85e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-15 12:54:45 +0200
+
+ Fix wrong indentation caused by incorrect settings
+ in the text editor.
+
+ src/liblzma/lz/lz_decoder.c | 18 +++++++++---------
+ src/liblzma/lzma/lzma2_encoder.c | 6 +++---
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 2 +-
+ 3 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 93e418562cf127a9171e87bcd4e9af8e1bfcdae4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-15 12:40:17 +0200
+
+ Add lzma_physmem().
+
+ I had hoped to keep liblzma as purely a compression
+ library as possible (e.g. file I/O will go into
+ a different library), but it seems that applications
+ linking agaisnt liblzma need some way to determine
+ the memory usage limit, and knowing the amount of RAM
+ is one reasonable way to help making such decisions.
+
+ Thanks to Jonathan Nieder for the original patch.
+
+ src/liblzma/Makefile.am | 5 ++-
+ src/liblzma/api/Makefile.am | 1 +
+ src/liblzma/api/lzma.h | 3 ++
+ src/liblzma/api/lzma/hardware.h | 51 +++++++++++++++++++++++++++++++++
+ src/liblzma/common/Makefile.inc | 1 +
+ src/liblzma/common/hardware_physmem.c | 25 ++++++++++++++++
+ src/xz/Makefile.am | 1 -
+ src/xz/hardware.c | 3 +-
+ src/xzdec/Makefile.am | 6 +--
+ src/xzdec/xzdec.c | 3 +-
+ 10 files changed, 88 insertions(+), 11 deletions(-)
+
+commit cf39faca59083d38422058c6c97aa757ea7797d0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-14 20:21:19 +0200
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2ddcae247c284cc2f396b6cfdab57790c7588b5f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-14 20:20:03 +0200
+
+ Some updates to xz man page.
+
+ src/xz/xz.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 files changed, 49 insertions(+), 5 deletions(-)
+
+commit 19b2674f07f8b588dfaf6638396b4b42866d7e23
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-14 19:51:03 +0200
+
+ Fix description of --memory in --long-help.
+
+ src/xz/message.c | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+commit 2291346f0cccf88e605d84b75c9c5aaaaddb5df8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-14 19:45:39 +0200
+
+ Update the debug programs so that they compile again.
+
+ debug/crc32.c | 1 +
+ debug/memusage.c | 6 ++++--
+ debug/sync_flush.c | 14 +++++++++-----
+ 3 files changed, 14 insertions(+), 7 deletions(-)
+
+commit 418d64a32e8144210f98a810738fed5a897e8367
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-11-14 18:59:19 +0200
+
+ Fix a design error in liblzma API.
+
+ Originally the idea was that using LZMA_FULL_FLUSH
+ with Stream encoder would read the filter chain
+ from the same array that was used to intialize the
+ Stream encoder. Since most apps wouldn't use
+ LZMA_FULL_FLUSH, most apps wouldn't need to keep
+ the filter chain available after initializing the
+ Stream encoder. However, due to my mistake, it
+ actually required keeping the array always available.
+
+ Since setting the new filter chain via the array
+ used at initialization time is not a nice way to do
+ it for a couple of reasons, this commit ditches it
+ and introduces lzma_filters_update(). This new function
+ replaces also the "persistent" flag used by LZMA2
+ (and to-be-designed Subblock filter), which was also
+ an ugly thing to do.
+
+ Thanks to Alexey Tourbin for reminding me about the problem
+ that Stream encoder used to require keeping the filter
+ chain allocated.
+
+ src/liblzma/api/lzma/filter.h | 30 ++++++++++++
+ src/liblzma/api/lzma/lzma.h | 13 -----
+ src/liblzma/common/block_encoder.c | 14 ++++++
+ src/liblzma/common/common.c | 20 ++++++++-
+ src/liblzma/common/common.h | 22 +++++++++
+ src/liblzma/common/easy_encoder.c | 63 ++------------------------
+ src/liblzma/common/filter_common.c | 3 +
+ src/liblzma/common/filter_encoder.c | 27 +++++++++++
+ src/liblzma/common/filter_encoder.h | 2 +-
+ src/liblzma/common/stream_encoder.c | 76 +++++++++++++++++++++++++++----
+ src/liblzma/delta/delta_common.c | 5 +--
+ src/liblzma/delta/delta_decoder.c | 3 +-
+ src/liblzma/delta/delta_encoder.c | 17 +++++++-
+ src/liblzma/delta/delta_private.h | 2 +-
+ src/liblzma/lz/lz_encoder.c | 17 +++++++
+ src/liblzma/lz/lz_encoder.h | 4 ++
+ src/liblzma/lzma/lzma2_encoder.c | 59 ++++++++++++++----------
+ src/liblzma/lzma/lzma_encoder_presets.c | 1 -
+ src/liblzma/simple/simple_coder.c | 12 +++++
+ src/xz/options.c | 1 -
+ 20 files changed, 273 insertions(+), 118 deletions(-)
+
+commit f0bf7634b77263a4dd02b20c71861ab67995da68
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-17 11:11:58 +0300
+
+ Fix wrong function name in the previous commit.
+
+ It was meant to be lzma_filters_copy(), not lzma_filters_dup().
+
+ src/liblzma/api/lzma/filter.h | 2 +-
+ src/liblzma/common/filter_common.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 6d118a0b9def82e96afba7386ec8d7da0b59649f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-17 01:47:07 +0300
+
+ Add lzma_filters_copy().
+
+ This will be needed internally by liblzma once I fix
+ a design mistake in the encoder API. This function may
+ be useful to applications too so it's good to export it.
+
+ src/liblzma/api/lzma/filter.h | 31 +++++++++++++
+ src/liblzma/common/filter_common.c | 82 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 113 insertions(+), 0 deletions(-)
+
+commit 78e92c18470483e161388e679c1ee556adb3a691
+Author: Jonathan Nieder <jrnieder@gmail.com>
+Date: 2009-10-15 20:44:13 -0500
+
+ Escape dashes in xzmore.1
+
+ A minus sign is larger, easier to see in a printout, and more
+ likely to use the same glyph as ASCII hyphen-minus in a terminal
+ than a hyphen. Since broken manual pagers do not find hyphens
+ when the user searches for a hyphen-minus, minus signs are also
+ easier to search for. So use minus signs instead of hyphens to
+ render sample terminal output.
+
+ src/scripts/xzmore.1 | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7b7fe902d98da28e5769e2aa1e0c08c92384f7ee
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-16 20:35:39 +0300
+
+ Mention --check=none in --long-help. It was already in
+ the man page though.
+
+ Thanks to Jim Meyering for noticing this.
+
+ src/xz/message.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-04 22:57:12 +0300
+
+ Use a tuklib module for integer handling.
+
+ This replaces bswap.h and integer.h.
+
+ The tuklib module uses <byteswap.h> on GNU,
+ <sys/endian.h> on *BSDs and <sys/byteorder.h>
+ on Solaris, which may contain optimized code
+ like inline assembly.
+
+ configure.ac | 54 +-----
+ m4/tuklib_integer.m4 | 74 ++++++
+ src/common/bswap.h | 52 -----
+ src/common/integer.h | 170 --------------
+ src/common/tuklib_config.h | 8 +-
+ src/common/tuklib_integer.h | 350 +++++++++++++++++++++++++++++
+ src/liblzma/check/check.c | 4 +-
+ src/liblzma/check/crc32_fast.c | 4 +-
+ src/liblzma/check/crc32_tablegen.c | 8 +-
+ src/liblzma/check/crc64_fast.c | 4 +-
+ src/liblzma/check/crc64_tablegen.c | 8 +-
+ src/liblzma/check/crc_macros.h | 2 -
+ src/liblzma/check/sha256.c | 18 +--
+ src/liblzma/common/alone_encoder.c | 2 +-
+ src/liblzma/common/block_header_decoder.c | 2 +-
+ src/liblzma/common/block_header_encoder.c | 2 +-
+ src/liblzma/common/common.h | 2 +-
+ src/liblzma/common/stream_flags_decoder.c | 6 +-
+ src/liblzma/common/stream_flags_encoder.c | 6 +-
+ src/liblzma/lz/lz_encoder_hash.h | 2 +-
+ src/liblzma/lzma/lzma_decoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder_private.h | 2 +-
+ src/liblzma/simple/simple_decoder.c | 2 +-
+ src/liblzma/simple/simple_encoder.c | 2 +-
+ tests/test_block_header.c | 4 +-
+ tests/test_stream_flags.c | 6 +-
+ tests/tests.h | 2 +-
+ 28 files changed, 467 insertions(+), 333 deletions(-)
+
+commit 29fd321033276261b87da7be5223db33d879a4c7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-02 14:35:56 +0300
+
+ Add support for --enable-assume-ram=SIZE.
+
+ INSTALL | 16 ++++++++++++++++
+ configure.ac | 24 ++++++++++++++++++++++++
+ src/xz/hardware.c | 7 +++----
+ src/xzdec/xzdec.c | 5 +++--
+ 4 files changed, 46 insertions(+), 6 deletions(-)
+
+commit 3782b3fee4812b0dd4ffdfa6563ed49f73060f25
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-02 11:28:17 +0300
+
+ Use unaligned access (if possible) on both endiannesses
+ in lz_encoder_hash.h.
+
+ src/liblzma/lz/lz_encoder_hash.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c5f68b5cc79085a87f950fea53843e27f328068e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-10-02 11:03:26 +0300
+
+ Make liblzma produce the same output on both endiannesses.
+
+ Seems that it is a problem in some cases if the same
+ version of XZ Utils produces different output on different
+ endiannesses, so this commit fixes that problem. The output
+ will still vary between different XZ Utils versions, but I
+ cannot avoid that for now.
+
+ This commit bloatens the code on big endian systems by 1 KiB,
+ which should be OK since liblzma is bloated already. ;-)
+
+ src/liblzma/check/crc32_tablegen.c | 30 ++++++++++++++
+ src/liblzma/lz/Makefile.inc | 1 +
+ src/liblzma/lz/lz_encoder.c | 7 +++-
+ src/liblzma/lz/lz_encoder_hash.h | 35 +++++++++++------
+ src/liblzma/lz/lz_encoder_hash_table.h | 68 ++++++++++++++++++++++++++++++++
+ src/liblzma/lz/lz_encoder_mf.c | 1 -
+ 6 files changed, 128 insertions(+), 14 deletions(-)
+
+commit 4a84d1adfda35e4fb4d41ecf0feb8223b100517a
+Author: Mike Frysinger <vapier@gentoo.org>
+Date: 2009-09-26 12:51:50 -0400
+
+ add lzmainfo to gitignore
+
+ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+ .gitignore | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 188a1dcd0cc7867810ed3a55c598d0680922c63b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-27 11:53:36 +0300
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit db9119b9181b307e7ac5d2bae82444d04b902b59
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-27 11:48:54 +0300
+
+ Work around a bug in Interix header files.
+
+ Thanks to Markus Duft for the patch.
+
+ src/common/sysdefs.h | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+commit b3d105e69786a45963176fd2193abe75e05ba738
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-24 17:50:17 +0300
+
+ Fix an error in OpenVMS-specific code.
+
+ Thanks to Jouk Jansen.
+
+ src/xz/file_io.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 5e000ff00d4d01e559397b49eb648ad3f159d496
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-22 18:59:56 +0300
+
+ Added OpenVMS-specific information to INSTALL.
+
+ INSTALL | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 932b2e204463d70f3eee5b8a1ea5a23bf9d001a4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-22 14:03:02 +0300
+
+ Better fixes for OpenVMS support.
+
+ Thanks to Jouk Jansen.
+
+ src/xz/file_io.c | 19 ++++++++++++++++---
+ 1 files changed, 16 insertions(+), 3 deletions(-)
+
+commit 4c3630ec4179fe9265407a35c4db1374ffc82372
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-22 13:40:19 +0300
+
+ Avoid non-standard preprocessor construct.
+
+ Thanks to Jouk Jansen.
+
+ src/common/tuklib_common.h | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 0deb1bb60addd1306b525e0ac0ad2a84eb0390d9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-21 19:50:09 +0300
+
+ Make sure that TUKLIB_DOSLIKE doesn't get defined on Cygwin.
+
+ Thanks to Charles Wilson.
+
+ src/common/tuklib_common.h | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit e599bba4216c0edb8cc8f40adad3a6dba88685f4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-19 09:47:30 +0300
+
+ Various changes.
+
+ Separate a few reusable components from XZ Utils specific
+ code. The reusable code is now in "tuklib" modules. A few
+ more could be separated still, e.g. bswap.h.
+
+ Fix some bugs in lzmainfo.
+
+ Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol
+ for help.
+
+ Add OpenVMS support into physmem. Add a few #ifdefs to ease
+ building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the
+ original patch.
+
+ THANKS | 1 +
+ configure.ac | 12 +--
+ m4/lc_cpucores.m4 | 57 ---------------
+ m4/lc_physmem.m4 | 84 ----------------------
+ m4/tuklib_common.m4 | 22 ++++++
+ m4/tuklib_cpucores.m4 | 72 +++++++++++++++++++
+ m4/tuklib_physmem.m4 | 119 +++++++++++++++++++++++++++++++
+ m4/tuklib_progname.m4 | 25 +++++++
+ src/common/cpucores.h | 51 --------------
+ src/common/open_stdxxx.h | 49 -------------
+ src/common/physmem.h | 144 --------------------------------------
+ src/common/sysdefs.h | 4 -
+ src/common/tuklib_common.h | 67 ++++++++++++++++++
+ src/common/tuklib_config.h | 1 +
+ src/common/tuklib_cpucores.c | 46 ++++++++++++
+ src/common/tuklib_cpucores.h | 23 ++++++
+ src/common/tuklib_exit.c | 57 +++++++++++++++
+ src/common/tuklib_exit.h | 25 +++++++
+ src/common/tuklib_gettext.h | 44 ++++++++++++
+ src/common/tuklib_open_stdxxx.c | 51 ++++++++++++++
+ src/common/tuklib_open_stdxxx.h | 23 ++++++
+ src/common/tuklib_physmem.c | 146 +++++++++++++++++++++++++++++++++++++++
+ src/common/tuklib_physmem.h | 28 ++++++++
+ src/common/tuklib_progname.c | 50 +++++++++++++
+ src/common/tuklib_progname.h | 32 +++++++++
+ src/lzmainfo/Makefile.am | 5 +-
+ src/lzmainfo/lzmainfo.c | 65 +++++------------
+ src/xz/Makefile.am | 7 ++-
+ src/xz/args.c | 8 +--
+ src/xz/file_io.c | 43 ++++++------
+ src/xz/hardware.c | 8 +-
+ src/xz/main.c | 100 ++++++---------------------
+ src/xz/main.h | 7 --
+ src/xz/message.c | 30 ++++----
+ src/xz/message.h | 8 +-
+ src/xz/private.h | 11 +--
+ src/xz/signals.c | 2 +
+ src/xz/signals.h | 17 ++---
+ src/xz/suffix.c | 2 +-
+ src/xzdec/Makefile.am | 13 +++-
+ src/xzdec/xzdec.c | 55 ++++-----------
+ 41 files changed, 974 insertions(+), 640 deletions(-)
+
+commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-15 21:07:23 +0300
+
+ Fix incorrect use of "restrict".
+
+ src/liblzma/api/lzma/vli.h | 4 ++--
+ src/liblzma/common/vli_decoder.c | 2 +-
+ src/liblzma/common/vli_encoder.c | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 15ffd675ab7af84592eb1c23b0e9f4699aa0fd8c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-12 14:09:17 +0300
+
+ Fix GCC version check for nothrow attribute.
+
+ src/liblzma/api/lzma.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6bfdd3a88a819f04c8f202e7d3c6f88a01c7d224
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-12 14:08:15 +0300
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 4ab7b16b9573bdfa32279e4adadff684d5cd58ac
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-12 14:07:36 +0300
+
+ A few grammar fixes.
+
+ Thanks to Christian Weisgerber for pointing out some of these.
+
+ src/liblzma/api/lzma.h | 4 ++--
+ src/liblzma/api/lzma/vli.h | 4 ++--
+ src/liblzma/common/block_header_encoder.c | 2 +-
+ src/liblzma/common/filter_common.c | 2 +-
+ src/liblzma/lz/lz_encoder.h | 10 +++++-----
+ src/xz/message.c | 22 +++++++++++-----------
+ src/xzdec/xzdec.c | 2 +-
+ 7 files changed, 23 insertions(+), 23 deletions(-)
+
+commit 8905a33daadcd2d6557c83c81c490b827d566c94
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-11 17:08:15 +0300
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 68059334ff435300ab1ce2c616b0eee1b0d88dd9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-11 17:06:32 +0300
+
+ Add PACKAGE_HOMEPAGE to {windows,dos}/config.h to fix build errors.
+
+ dos/config.h | 3 +++
+ windows/config.h | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+commit 221be761f467da76875247bc02d7a1716682075d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-11 10:24:09 +0300
+
+ Use $(LN_EXEEXT) in symlinks to executables.
+
+ This fixes "make install" on operating systems using
+ a suffix for executables.
+
+ Cygwin is treated specially. The symlink names won't have
+ .exe suffix even though the executables themselves have.
+ Thanks to Charles Wilson.
+
+ configure.ac | 9 +++++++++
+ src/xz/Makefile.am | 4 ++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+commit 18a4233a53d9b82abac7db7d7804684c5fea9c2c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-11 09:25:09 +0300
+
+ Fix a couple of warnings.
+
+ src/liblzma/common/stream_decoder.c | 2 +-
+ src/liblzma/lz/lz_encoder.c | 5 +----
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 8 ++++----
+ tests/tests.h | 2 +-
+ 5 files changed, 8 insertions(+), 11 deletions(-)
+
+commit 429910b2ba67611d8df60d1a9da9641bdb5f82b4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-05 18:39:21 +0300
+
+ Add OS/2-specific code to physmem.h.
+
+ Also move DJGPP-specific code near the code meant
+ for other DOS-like systems.
+
+ src/common/physmem.h | 32 +++++++++++++++++++++-----------
+ 1 files changed, 21 insertions(+), 11 deletions(-)
+
+commit 7aca7b3174bcbba4a4915682ff0cd405d63f5740
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-05 01:21:15 +0300
+
+ Updated THANKS.
+
+ THANKS | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 60ccb80c9c4a0d771acc5b7d9d6f32b17fed1071
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-05 01:20:29 +0300
+
+ Use sysctl() != -1 instead of !sysctl() to check if
+ the function call succeeded.
+
+ NetBSD 4.0 returns positive values on success, but
+ NetBSD Current and FreeBSD return zero. OpenBSD's
+ man page doesn't tell what sysctl() returns on
+ success. All these BSDs return -1 on error.
+
+ Thanks to Robert Elz and Thomas Klausner.
+
+ src/common/cpucores.h | 2 +-
+ src/common/physmem.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 173368911cf09ab0b03fc4db8f3d4b81d86dce32
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-02 09:43:51 +0300
+
+ Mention in INSTALL that --enable-small doesn't modify CFLAGS.
+
+ INSTALL | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+commit 319a0fd7d7e9ebbb71ca6930abfc20777cb4aacc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-01 20:40:01 +0300
+
+ Refactored option parsing.
+
+ src/xz/options.c | 70 +++++++++++++++++++++++++++---------------------------
+ 1 files changed, 35 insertions(+), 35 deletions(-)
+
+commit 25adaaa56e2e51a47a910a8d73452414619a2e53
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-01 20:23:30 +0300
+
+ Fix options parsing bug in xz.
+
+ xz used to reject "xz --lzma2=pb=2," while
+ "xz --lzma2=pb=2,," worked. Now both work.
+
+ src/xz/options.c | 6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+commit 5f6dddc6c911df02ba660564e78e6de80947c947
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-09-01 20:20:19 +0300
+
+ Updated TODO.
+
+ TODO | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 655457b9ada5ec7db398c5392e41290f3f332ea8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-31 21:59:25 +0300
+
+ Revert 43f44160b1ddcbf7e5205c37db09b3bebe7226f9
+ and use a fix that works on all systems using
+ GNU assembler.
+
+ Maybe the assembler code is used e.g. on Solaris x86
+ but let's worry about it if this doesn't work on it.
+
+ src/liblzma/check/crc32_x86.S | 7 ++-----
+ src/liblzma/check/crc64_x86.S | 7 ++-----
+ 2 files changed, 4 insertions(+), 10 deletions(-)
+
+commit 162189c3477953805a28f96d3a75cb9ab9417928
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-30 17:29:19 +0300
+
+ Updated THANKS.
+
+ THANKS | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+commit 2331f5f97af3e5897e23da45d9df3d664099c7f8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-30 17:28:52 +0300
+
+ Add more OS/2 specific info to INSTALL.
+
+ INSTALL | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit 94c66b3297b3ad307eee93cf6b160e3c43997f11
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-29 14:43:52 +0300
+
+ Use even more hackish way to support thousand separators.
+
+ Seems that in addition on Windows and DOS, also OpenBSD
+ lacks support for %'d style printf() format strings.
+ So far that is the only modern POSIX-like system I know
+ with this problem, but after this hack, the thousand
+ separator shouldn't be a problem on any system.
+
+ Maybe testing if a format string like %'d produces
+ reasonable output is invoking undefined behavior on some
+ systems, but so far all the problematic systems I've tried
+ just print the raw format string (e.g. %'d prints 'd).
+
+ Maybe Autoconf test would have been better, but this
+ hack works also for cross-compilation, and avoids
+ recompilation in case the system libc starts to support
+ the thousand separator.
+
+ src/xz/util.c | 36 +++++++++++++++++++++++++-----------
+ 1 files changed, 25 insertions(+), 11 deletions(-)
+
+commit 3432e9c6aab851da1227b63dce645d7f190c04d8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-29 13:42:56 +0300
+
+ Updated THANKS.
+
+ THANKS | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 27414daadf5727e8ab942374b5ec1c8990122878
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-29 13:39:21 +0300
+
+ Fix sysctl() usage.
+
+ This fixes build on *BSDs and Darwin.
+
+ Thanks to Jukka Salmi for the patches.
+ Richard Koch reported the problem too.
+
+ m4/lc_cpucores.m4 | 2 +-
+ m4/lc_physmem.m4 | 2 +-
+ src/common/cpucores.h | 2 +-
+ src/common/physmem.h | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 43f44160b1ddcbf7e5205c37db09b3bebe7226f9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2009-08-29 13:35:23 +0300
+
+ Fix x86 assembler on GCC 3.
+
+ Thanks to Karl Berry.
+
+ src/liblzma/check/crc32_x86.S | 7 +++++--
+ src/liblzma/check/crc64_x86.S | 7 +++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
commit 682efdc1f9492fdd76c9ce82e7c00ca0768067e8
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2009-08-27 18:36:59 +0300
diff --git a/Build/source/extra/xz-4.999.9beta/Doxyfile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/Doxyfile.in
index fa3c1e1ddc6..fa3c1e1ddc6 100644
--- a/Build/source/extra/xz-4.999.9beta/Doxyfile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/Doxyfile.in
diff --git a/Build/source/extra/xz-4.999.9beta/INSTALL b/Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL
index ec757202c98..5f38085ea96 100644
--- a/Build/source/extra/xz-4.999.9beta/INSTALL
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL
@@ -6,11 +6,12 @@ XZ Utils Installation
1. Supported platforms
1.1. Compilers
1.2. Platform-specific notes
- 1.2.1. Darwin (Mac OS X)
+ 1.2.1. IRIX
1.2.2. Tru64
1.2.3. Windows
1.2.4. DOS
1.2.5. OS/2
+ 1.2.6. OpenVMS
1.3. Adding support for new platforms
2. configure options
3. xzgrep and other scripts
@@ -58,14 +59,11 @@ XZ Utils Installation
1.2. Platform-specific notes
-1.2.1. Darwin (Mac OS X)
+1.2.1. IRIX
- You may need --disable-assembler if building universal binaries on
- Darwin. This is because different files are built when assembler is
- enabled, and there's no way to make it work with universal build.
- If you want to keep the assembler code, consider building one
- architecture at a time, and then combining the results to create
- universal binaries (see lipo(1)).
+ MIPSpro 7.4.4m has been reported to produce broken code if using
+ the -O2 optimization flag ("make check" fails). Using -O1 should
+ work.
1.2.2. Tru64
@@ -79,36 +77,49 @@ XZ Utils Installation
1.2.3. Windows
- Building XZ Utils on Windows is supported under MinGW and Cygwin.
- If the Autotools based build gives you trouble with MinGW, you may
- want try the alternative method found from the "windows" directory.
+ Building XZ Utils on Windows is supported under MinGW + MSYS and
+ Cygwin. There is windows/build.sh to ease packaging XZ Utils with
+ MinGW + MSYS into a redistributable .zip or .7z file. See
+ windows/INSTALL-Windows.txt for more information.
- MSVC doesn't support C99, thus it is not possible to use MSVC to
- compile XZ Utils. However, it is possible to use liblzma.dll from
- MSVC once liblzma.dll has been built with MinGW. The required
- import library for MSVC can be created from liblzma.def using the
- "lib" command shipped in MSVC:
+ It might be possible to build liblzma with a non-GNU toolchain 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.
- lib /def:liblzma.def /out:liblzma.lib /machine:ix86
-
- On x86-64, the /machine argument has to naturally be changed:
-
- lib /def:liblzma.def /out:liblzma.lib /machine:x64
+ 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
+ windows/README-Windows.txt for details.
1.2.4. 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
- needed.
+ needed. See dos/README for more information.
- GNU Autotools based build hasn't been tried on DOS.
+ GNU Autotools based build hasn't been tried on DOS. If you try, I
+ would like to hear if it worked.
1.2.5. OS/2
- You will need to pass --disable-assembler to configure when building
- on OS/2.
+ To omit large number of harmless warnings about visibility support,
+ pass gl_cv_cc_visibility=no as an argument to the configure script.
+ This isn't mandatory since it should have no effect on the resulting
+ binaries.
+
+
+1.2.6. OpenVMS
+
+ XZ Utils can be built for OpenVMS, but the build system files are
+ currently not included in the XZ Utils source package. The required
+ OpenVMS-specific files are maintained by Jouk Jansen and can be
+ downloaded here:
+
+ http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
1.3. Adding support for new platforms
@@ -217,6 +228,25 @@ XZ Utils Installation
means that the RAM holding the tables won't be shared
between applications linked against shared liblzma.
+ This option doesn't modify CFLAGS to tell the compiler
+ to optimize for size. You need to add -Os or equivalent
+ flag(s) to CFLAGS manually.
+
+ --enable-assume-ram=SIZE
+ On the most common operating systems, XZ Utils is able to
+ detect the amount of physical memory on the system. This
+ information is used to set the default memory usage limit.
+
+ On some systems, there is no code to detect the amount of
+ RAM though. Using --enable-assume-ram one can set how much
+ memory to assume on these systems. SIZE is given as MiB.
+ The default is 128 MiB, which allows decompressing files
+ created with "xz -9".
+
+ Feel free to send patches to add support for detecting
+ 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
diff --git a/Build/source/extra/xz-4.999.9beta/INSTALL.generic b/Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL.generic
index 2550dab7526..2550dab7526 100644
--- a/Build/source/extra/xz-4.999.9beta/INSTALL.generic
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/INSTALL.generic
diff --git a/Build/source/extra/xz-4.999.9beta/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.am
index 79cf1954f28..749494c4f6d 100644
--- a/Build/source/extra/xz-4.999.9beta/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.am
@@ -46,6 +46,7 @@ ACLOCAL_AMFLAGS = -I m4
manfiles = \
src/xz/xz.1 \
src/xzdec/xzdec.1 \
+ src/lzmainfo/lzmainfo.1 \
src/scripts/xzdiff.1 \
src/scripts/xzgrep.1 \
src/scripts/xzless.1 \
diff --git a/Build/source/extra/xz-4.999.9beta/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.in
index eef55e610bf..7d720190e03 100644
--- a/Build/source/extra/xz-4.999.9beta/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -47,15 +47,18 @@ DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -191,6 +194,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -208,7 +212,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -321,6 +324,7 @@ ACLOCAL_AMFLAGS = -I m4
manfiles = \
src/xz/xz.1 \
src/xzdec/xzdec.1 \
+ src/lzmainfo/lzmainfo.1 \
src/scripts/xzdiff.1 \
src/scripts/xzgrep.1 \
src/scripts/xzless.1 \
@@ -420,7 +424,7 @@ uninstall-dist_docDATA:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -445,7 +449,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -612,7 +616,8 @@ distdir: $(DISTFILES)
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
- || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -661,17 +666,17 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
diff --git a/Build/source/extra/xz-4.999.9beta/NEWS b/Build/source/extra/xz-4.999.9beta-124-gb637/NEWS
index e69de29bb2d..e69de29bb2d 100644
--- a/Build/source/extra/xz-4.999.9beta/NEWS
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/NEWS
diff --git a/Build/source/extra/xz-4.999.9beta/PACKAGERS b/Build/source/extra/xz-4.999.9beta-124-gb637/PACKAGERS
index c5d375ab270..c5d375ab270 100644
--- a/Build/source/extra/xz-4.999.9beta/PACKAGERS
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/PACKAGERS
diff --git a/Build/source/extra/xz-4.999.9beta/README b/Build/source/extra/xz-4.999.9beta-124-gb637/README
index 3544938e8e4..6b695d5ccdb 100644
--- a/Build/source/extra/xz-4.999.9beta/README
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/README
@@ -16,7 +16,7 @@ XZ Utils
0. Overview
-----------
- XZ Utils provide a general purporse data compression library and
+ XZ Utils provide a general-purpose data compression library and
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
@@ -81,6 +81,7 @@ XZ Utils
this software
NEWS User-visible changes between XZ Utils releases
ChangeLog Detailed list of changes (commit log)
+ TODO Known bugs and some sort of to-do list
Note that only some of the above files are included in binary
packages.
@@ -150,7 +151,7 @@ XZ Utils
However, quite often the reason for unexpected behavior is unknown,
so here are a few things to do before sending a bug report:
- 1. Try to create a small example how to reprocude the issue.
+ 1. Try to create a small example how to reproduce the issue.
2. Compile XZ Utils with debugging code using configure switches
--enable-debug and, if possible, --disable-shared. If you are
diff --git a/Build/source/extra/xz-4.999.9beta/THANKS b/Build/source/extra/xz-4.999.9beta-124-gb637/THANKS
index 426a2ed089f..f344c404e5a 100644
--- a/Build/source/extra/xz-4.999.9beta/THANKS
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/THANKS
@@ -7,37 +7,58 @@ has been important. :-) In alphabetical order:
- Mark Adler
- H. Peter Anvin
- Nelson H. F. Beebe
+ - Karl Berry
- Anders F. Björklund
- Emmanuel Blot
+ - Trent W. Buck
- David Burklund
+ - Marek Černocký
- Andrew Dudman
+ - Markus Duft
- İsmail Dönmez
+ - Robert Elz
+ - Gilles Espinasse
- Mike Frysinger
+ - Joachim Henke
+ - Peter Ivanov
+ - Jouk Jansen
- Per Øyvind Karlsen
+ - Thomas Klausner
+ - Richard Koch
- Ville Koskinen
- Stephan Kulow
- Peter Lawler
- Hin-Tak Leung
- Andraž 'ruskie' Levstik
- Jim Meyering
+ - Rafał Mużyło
+ - Adrien Nader
- Hongbo Ni
- Jonathan Nieder
+ - Peter O'Gorman
- Igor Pavlov
+ - Elbert Pol
- Mikko Pouru
+ - Robert Readman
- Bernhard Reutner-Fischer
- Christian von Roques
+ - Jukka Salmi
- Alexandre Sauvé
- Andreas Schwab
- Dan Shechter
+ - Stuart Shelton
- Jonathan Stott
- Paul Townsend
- Mohammed Adnène Trojette
+ - Alexey Tourbin
- Patrick J. Volkerding
+ - Christian Weisgerber
- Bert Wesarg
- Ralf Wildenhues
- Charles Wilson
- Lars Wirzenius
- Pilorz Wojciech
+ - Ryan Young
- Andreas Zieringer
Also thanks to all the people who have participated in the Tukaani project.
diff --git a/Build/source/extra/xz-4.999.9beta/TODO b/Build/source/extra/xz-4.999.9beta-124-gb637/TODO
index 6912943b5d9..9fac1b34195 100644
--- a/Build/source/extra/xz-4.999.9beta/TODO
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/TODO
@@ -7,7 +7,7 @@ Known bugs
The test suite is too incomplete.
- If the memor usage limit is less than about 13 MiB, xz is unable to
+ If the memory usage limit is less than about 13 MiB, xz is unable to
automatically scale down the compression settings enough even though
it would be possible by switching from BT2/BT3/BT4 match finder to
HC3/HC4.
@@ -22,14 +22,14 @@ Known bugs
need some tweaking and maybe this issue can be minimized without
making the typical case too much slower.
+ xz doesn't quote unprintable characters when it displays file names
+ given on the command line.
-Missing features
-----------------
+ tuklib_exit() doesn't block signals => EINTR is possible.
- "xz --list"
- xz could create sparse files when decompressing. (Some prototyping
- has been done.)
+Missing features
+----------------
xz doesn't support copying extended attributes, access control
lists etc. from source to target file.
@@ -43,6 +43,10 @@ Missing features
I/O library is not implemented. It will possibly be named libzzf.
+ lzma_strerror() to convert lzma_ret to human readable form?
+ This is tricky, because the same error codes are used with
+ slightly different meanings.
+
Documentation
-------------
diff --git a/Build/source/extra/xz-4.999.9beta/aclocal.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/aclocal.m4
index 09162f8a4cf..4640ae940f2 100644
--- a/Build/source/extra/xz-4.999.9beta/aclocal.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
-[m4_warning([this file was generated for autoconf 2.64.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65.71-f91e-dirty],,
+[m4_warning([this file was generated for autoconf 2.65.71-f91e-dirty.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.11.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -1010,8 +1010,6 @@ m4_include([m4/acx_pthread.m4])
m4_include([m4/getopt.m4])
m4_include([m4/gettext.m4])
m4_include([m4/iconv.m4])
-m4_include([m4/lc_cpucores.m4])
-m4_include([m4/lc_physmem.m4])
m4_include([m4/lib-ld.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
@@ -1024,4 +1022,9 @@ m4_include([m4/nls.m4])
m4_include([m4/po.m4])
m4_include([m4/posix-shell.m4])
m4_include([m4/progtest.m4])
+m4_include([m4/tuklib_common.m4])
+m4_include([m4/tuklib_cpucores.m4])
+m4_include([m4/tuklib_integer.m4])
+m4_include([m4/tuklib_physmem.m4])
+m4_include([m4/tuklib_progname.m4])
m4_include([m4/visibility.m4])
diff --git a/Build/source/extra/xz-4.999.9beta/autogen.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/autogen.sh
index f0195ecadd3..f0195ecadd3 100755
--- a/Build/source/extra/xz-4.999.9beta/autogen.sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/autogen.sh
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/compile b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/compile
index ec64c622026..c0096a7b563 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/compile
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/compile
@@ -1,7 +1,7 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2009-10-06.20; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
@@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
ret=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/config.guess b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.guess
index 115f944a61d..dc84c68ef79 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/config.guess
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
-timestamp='2010-04-03'
+timestamp='2009-11-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -56,9 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -92,7 +91,7 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' HUP INT TERM
+trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
@@ -106,7 +105,7 @@ trap 'exit 1' HUP INT TERM
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/config.rpath b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.rpath
index c492a93b663..c492a93b663 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/config.rpath
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.rpath
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/config.sub b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.sub
index 204218c0738..2a55a50751c 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/config.sub
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
-timestamp='2010-05-21'
+timestamp='2009-11-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -75,9 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,9 +123,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -296,7 +294,7 @@ case $basic_machine in
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
- | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
@@ -304,15 +302,6 @@ case $basic_machine in
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -344,7 +333,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -391,8 +380,7 @@ case $basic_machine in
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
@@ -492,15 +480,6 @@ case $basic_machine in
basic_machine=powerpc-ibm
os=-cnk
;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -1094,10 +1073,17 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
;;
tile*)
basic_machine=tile-unknown
@@ -1308,8 +1294,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1450,8 +1435,6 @@ case $os in
-dicos*)
os=-dicos
;;
- -nacl*)
- ;;
-none)
;;
*)
@@ -1492,15 +1475,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
- ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/depcomp b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/depcomp
index df8eea7e4ce..df8eea7e4ce 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/depcomp
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/depcomp
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/install-sh b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/install-sh
index 3f83ce9b555..6781b987bdb 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/install-sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -200,11 +200,7 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/ltmain.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/ltmain.sh
index b36c4ad366c..a72f2fd78bf 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/ltmain.sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/ltmain.sh
@@ -1,6 +1,6 @@
# Generated from ltmain.m4sh.
-# ltmain.sh (GNU libtool) 2.2.6
+# ltmain.sh (GNU libtool) 2.2.6b
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
@@ -65,7 +65,7 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6
+# $progname: (GNU libtool) 2.2.6b
# automake: $automake_version
# autoconf: $autoconf_version
#
@@ -73,9 +73,9 @@
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=2.2.6
+VERSION=2.2.6b
TIMESTAMP=""
-package_revision=1.3012
+package_revision=1.3017
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -116,15 +116,15 @@ $lt_unset CDPATH
: ${CP="cp -f"}
: ${ECHO="echo"}
-: ${EGREP="/usr/bin/grep -E"}
-: ${FGREP="/usr/bin/grep -F"}
-: ${GREP="/usr/bin/grep"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
-: ${SED="/opt/local/bin/gsed"}
+: ${SED="/bin/sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}
diff --git a/Build/source/extra/xz-4.999.9beta/build-aux/missing b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/missing
index 28055d2ae6f..28055d2ae6f 100755
--- a/Build/source/extra/xz-4.999.9beta/build-aux/missing
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/build-aux/missing
diff --git a/Build/source/extra/xz-4.999.9beta/config.h.in b/Build/source/extra/xz-4.999.9beta-124-gb637/config.h.in
index 0e31e37e4c3..a4a1290288f 100644
--- a/Build/source/extra/xz-4.999.9beta/config.h.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/config.h.in
@@ -3,16 +3,13 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
+/* How many MiB of RAM to assume if the real amount cannot be determined. */
+#undef ASSUME_RAM
+
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
-/* Define to 1 if using x86 assembler optimizations. */
-#undef HAVE_ASM_X86
-
-/* Define to 1 if using x86_64 assembler optimizations. */
-#undef HAVE_ASM_X86_64
-
/* Define to 1 if bswap_16 is available. */
#undef HAVE_BSWAP_16
@@ -42,18 +39,14 @@
/* Define to 1 if sha256 integrity check is enabled. */
#undef HAVE_CHECK_SHA256
-/* Define to 1 if the number of available CPU cores can be detected with
- sysconf(_SC_NPROCESSORS_ONLN). */
-#undef HAVE_CPUCORES_SYSCONF
-
-/* Define to 1 if the number of available CPU cores can be detected with
- sysctl(). */
-#undef HAVE_CPUCORES_SYSCTL
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
+/* 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
+
/* Define to 1 if decoder components are enabled. */
#undef HAVE_DECODER
@@ -123,9 +116,6 @@
/* Define to 1 if x86 encoder is enabled. */
#undef HAVE_ENCODER_X86
-/* Define to 1 if the system supports fast unaligned memory access. */
-#undef HAVE_FAST_UNALIGNED_ACCESS
-
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -177,18 +167,6 @@
/* Define to 1 if getopt.h declares extern int optreset. */
#undef HAVE_OPTRESET
-/* Define to 1 if the amount of physical memory can be detected with
- sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */
-#undef HAVE_PHYSMEM_SYSCONF
-
-/* Define to 1 if the amount of physical memory can be detected with sysctl().
- */
-#undef HAVE_PHYSMEM_SYSCTL
-
-/* Define to 1 if the amount of physical memory can be detected with Linux
- sysinfo(). */
-#undef HAVE_PHYSMEM_SYSINFO
-
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
@@ -210,30 +188,33 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if `struct stat' is a member of `st_atimensec'. */
+/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
-/* Define to 1 if `struct stat' is a member of `st_atimespec.tv_nsec'. */
+/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
-/* Define to 1 if `struct stat' is a member of `st_atim.st__tim.tv_nsec'. */
+/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
-/* Define to 1 if `struct stat' is a member of `st_atim.tv_nsec'. */
+/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
-/* Define to 1 if `struct stat' is a member of `st_uatime'. */
+/* Define to 1 if `st_uatime' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_UATIME
+/* Define to 1 if you have the <sys/byteorder.h> header file. */
+#undef HAVE_SYS_BYTEORDER_H
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+#undef HAVE_SYS_ENDIAN_H
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
-/* Define to 1 if you have the <sys/sysctl.h> header file. */
-#undef HAVE_SYS_SYSCTL_H
-
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
@@ -275,9 +256,6 @@
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
-/* Define to the URL of the home page of this package. */
-#undef PACKAGE_HOMEPAGE
-
/* Define to the full name of this package. */
#undef PACKAGE_NAME
@@ -303,6 +281,50 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if the number of available CPU cores can be detected with
+ pstat_getdynamic(). */
+#undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ sysconf(_SC_NPROCESSORS_ONLN) or sysconf(_SC_NPROC_ONLN). */
+#undef TUKLIB_CPUCORES_SYSCONF
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ sysctl(). */
+#undef TUKLIB_CPUCORES_SYSCTL
+
+/* Define to 1 if the system supports fast unaligned access to 16-bit and
+ 32-bit integers. */
+#undef TUKLIB_FAST_UNALIGNED_ACCESS
+
+/* Define to 1 if the amount of physical memory can be detected with
+ _system_configuration.physmem. */
+#undef TUKLIB_PHYSMEM_AIX
+
+/* Define to 1 if the amount of physical memory can be detected with
+ getinvent_r(). */
+#undef TUKLIB_PHYSMEM_GETINVENT_R
+
+/* Define to 1 if the amount of physical memory can be detected with
+ getsysinfo(). */
+#undef TUKLIB_PHYSMEM_GETSYSINFO
+
+/* Define to 1 if the amount of physical memory can be detected with
+ pstat_getstatic(). */
+#undef TUKLIB_PHYSMEM_PSTAT_GETSTATIC
+
+/* Define to 1 if the amount of physical memory can be detected with
+ sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */
+#undef TUKLIB_PHYSMEM_SYSCONF
+
+/* Define to 1 if the amount of physical memory can be detected with sysctl().
+ */
+#undef TUKLIB_PHYSMEM_SYSCTL
+
+/* Define to 1 if the amount of physical memory can be detected with Linux
+ sysinfo(). */
+#undef TUKLIB_PHYSMEM_SYSINFO
+
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
diff --git a/Build/source/extra/xz-4.999.9beta/configure b/Build/source/extra/xz-4.999.9beta-124-gb637/configure
index 317cb88a26d..f7688a18d08 100755
--- a/Build/source/extra/xz-4.999.9beta/configure
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/configure
@@ -1,13 +1,15 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for XZ Utils 4.999.9beta.
+# Generated by GNU Autoconf 2.65.71-f91e-dirty for XZ Utils 4.999.9beta.
#
# Report bugs to <lasse.collin@tukaani.org>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
@@ -317,7 +319,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -357,19 +359,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -676,7 +678,8 @@ fi
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -701,7 +704,7 @@ PACKAGE_TARNAME='xz'
PACKAGE_VERSION='4.999.9beta'
PACKAGE_STRING='XZ Utils 4.999.9beta'
PACKAGE_BUGREPORT='lasse.collin@tukaani.org'
-PACKAGE_URL=''
+PACKAGE_URL='http://tukaani.org/xz/'
ac_unique_file="src/liblzma/common/common.h"
# Factoring default headers for most tests.
@@ -934,6 +937,7 @@ COND_MAIN_DECODER_FALSE
COND_MAIN_DECODER_TRUE
COND_MAIN_ENCODER_FALSE
COND_MAIN_ENCODER_TRUE
+LN_EXEEXT
COND_W32_FALSE
COND_W32_TRUE
host_os
@@ -944,7 +948,6 @@ build_os
build_vendor
build_cpu
build
-PACKAGE_HOMEPAGE
target_alias
host_alias
build_alias
@@ -992,9 +995,9 @@ enable_decoders
enable_match_finders
enable_checks
enable_assembler
-enable_unaligned_access
enable_small
enable_threads
+enable_assume_ram
enable_dynamic
enable_dependency_tracking
enable_shared
@@ -1008,6 +1011,7 @@ enable_rpath
with_libiconv_prefix
with_libintl_prefix
enable_largefile
+enable_unaligned_access
enable_werror
'
ac_precious_vars='build_alias
@@ -1129,7 +1133,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1155,7 +1159,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1359,7 +1363,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1375,7 +1379,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1405,8 +1409,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1414,7 +1418,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1432,13 +1436,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1461,7 +1465,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1475,8 +1479,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1491,9 +1495,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1532,11 +1536,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1576,7 +1580,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1657,15 +1661,14 @@ Optional Features:
sha256
--disable-assembler Do not use assembler optimizations even if such
exist for the architecture.
- --enable-unaligned-access
- Enable if the system supports *fast* unaligned
- memory access with 16-bit and 32-bit integers. By
- default, this is enabled only on x86, x86_64, and
- big endian PowerPC.
--enable-small Make liblzma smaller and a little slower. This is
disabled by default to optimize for speed.
--disable-threads Disable threading support. This makes some things
thread-unsafe.
+ --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.
--enable-dynamic=TYPE Set how command line tools are linked against
liblzma. TYPE can be mixed, yes, or no. The default
is mixed.
@@ -1679,6 +1682,11 @@ Optional Features:
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
--disable-largefile omit support for large files
+ --enable-unaligned-access
+ Enable if the system supports *fast* unaligned
+ memory access with 16-bit and 32-bit integers. By
+ default, this is enabled only on x86, x86_64, and
+ big endian PowerPC.
--enable-werror Enable -Werror to abort compilation on all compiler
warnings.
@@ -1700,7 +1708,7 @@ Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CCAS assembler compiler command (defaults to CC)
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
@@ -1710,6 +1718,7 @@ Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <lasse.collin@tukaani.org>.
+XZ Utils home page: <http://tukaani.org/xz/>.
_ACEOF
ac_status=$?
fi
@@ -1773,9 +1782,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
XZ Utils configure 4.999.9beta
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65.71-f91e-dirty
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1820,7 +1829,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1857,7 +1866,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1992,7 +2001,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2069,7 +2078,7 @@ fi
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -2207,6 +2216,8 @@ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
'unsigned long long int' 'unsigned short int' 'unsigned char'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2215,7 +2226,7 @@ $ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0
;
@@ -2259,15 +2270,18 @@ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
for ac_type in int$2_t 'int' 'long int' \
'long long int' 'short int' 'signed char'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
+ enum { N = $2 / 2 - 1 };
int
main ()
{
-static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))];
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
test_array [0] = 0
;
@@ -2278,11 +2292,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
+ enum { N = $2 / 2 - 1 };
int
main ()
{
-static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1)
- < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))];
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+ < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
test_array [0] = 0
;
@@ -2491,7 +2506,7 @@ rm -f conftest.val
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
@@ -2552,9 +2567,10 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_member
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
@@ -2595,7 +2611,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by XZ Utils $as_me 4.999.9beta, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65.71-f91e-dirty. Invocation command line was
$ $0 $@
@@ -2848,7 +2864,7 @@ fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -2857,9 +2873,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -2929,7 +2945,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2945,16 +2961,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in build-aux "$srcdir"/build-aux; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2970,14 +2992,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
-PACKAGE_HOMEPAGE=http://tukaani.org/xz/
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_HOMEPAGE "$PACKAGE_HOMEPAGE"
-_ACEOF
-
-
-
echo
echo "$PACKAGE_STRING"
@@ -2986,7 +3000,7 @@ echo "System type:"
# This is needed to know if assembler optimizations can be used.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
@@ -2997,16 +3011,16 @@ else
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -3031,7 +3045,7 @@ else
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -3039,7 +3053,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -3070,6 +3084,15 @@ else
fi
+# We need to use $EXEEXT with $(LN_S) when creating symlinks to
+# executables. Cygwin is an exception to this, since it is recommended
+# that symlinks don't have the .exe suffix. To make this work, we
+# define LN_EXEEXT.
+case $host_os in
+ cygwin) LN_EXEEXT= ;;
+ *) LN_EXEEXT='$(EXEEXT)' ;;
+esac
+
echo
echo "Configure options:"
@@ -3232,7 +3255,7 @@ $as_echo "#define HAVE_ENCODER_SPARC 1" >>confdefs.h
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "unknown filter: $arg" "$LINENO" 5
+ as_fn_error $? "unknown filter: $arg" "$LINENO" 5
;;
esac
done
@@ -3333,7 +3356,7 @@ $as_echo "#define HAVE_DECODER_SPARC 1" >>confdefs.h
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "unknown filter: $arg" "$LINENO" 5
+ as_fn_error $? "unknown filter: $arg" "$LINENO" 5
;;
esac
done
@@ -3348,7 +3371,7 @@ fi
if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
|| test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
- as_fn_error "LZMA2 requires that LZMA1 is also enabled." "$LINENO" 5
+ as_fn_error $? "LZMA2 requires that LZMA1 is also enabled." "$LINENO" 5
fi
if test "x$enable_encoders" != xno && test "x$enable_encoders" != x; then
@@ -3752,7 +3775,7 @@ $as_echo "#define HAVE_MF_BT4 1" >>confdefs.h
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "unknown match finder: $arg" "$LINENO" 5
+ as_fn_error $? "unknown match finder: $arg" "$LINENO" 5
;;
esac
done
@@ -3819,7 +3842,7 @@ $as_echo "#define HAVE_CHECK_SHA256 1" >>confdefs.h
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "unknown integrity check: $arg" "$LINENO" 5
+ as_fn_error $? "unknown integrity check: $arg" "$LINENO" 5
;;
esac
done
@@ -3827,7 +3850,7 @@ $as_echo "" >&6; }
$as_echo "$enable_checks" >&6; }
fi
if test "x$enable_checks_crc32" = xno ; then
- as_fn_error "For now, the CRC32 check must always be enabled." "$LINENO" 5
+ as_fn_error $? "For now, the CRC32 check must always be enabled." "$LINENO" 5
fi
if test "x$enable_check_crc32" = xyes; then
@@ -3870,33 +3893,29 @@ else
fi
if test "x$enable_assembler" = xyes; then
- case $host_cpu in
- i?86) enable_assembler=x86 ;;
- x86_64) enable_assembler=x86_64 ;;
- *) enable_assembler=no ;;
+ enable_assembler=no
+ case $host_os in
+ # Darwin should work too but only if not creating universal
+ # binaries. Solaris x86 could work too but I cannot test.
+ linux* | *bsd* | mingw* | cygwin*)
+ case $host_cpu in
+ i?86) enable_assembler=x86 ;;
+ x86_64) enable_assembler=x86_64 ;;
+ esac
+ ;;
esac
fi
case $enable_assembler in
- x86)
-
-$as_echo "#define HAVE_ASM_X86 1" >>confdefs.h
-
- ;;
- x86_64)
-
-$as_echo "#define HAVE_ASM_X86_64 1" >>confdefs.h
-
- ;;
- no)
+ x86 | x86_64 | no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assembler" >&5
+$as_echo "$enable_assembler" >&6; }
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'." "$LINENO" 5
+ as_fn_error $? "--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'." "$LINENO" 5
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assembler" >&5
-$as_echo "$enable_assembler" >&6; }
if test "x$enable_assembler" = xx86; then
COND_ASM_X86_TRUE=
COND_ASM_X86_FALSE='#'
@@ -3915,41 +3934,6 @@ fi
-################################
-# Fast unaligned memory access #
-################################
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned memory access should be used" >&5
-$as_echo_n "checking if unaligned memory access should be used... " >&6; }
-# Check whether --enable-unaligned-access was given.
-if test "${enable_unaligned_access+set}" = set; then :
- enableval=$enable_unaligned_access;
-else
- enable_unaligned_access=auto
-fi
-
-if test "x$enable_unaligned_access" = xauto ; then
- case $host_cpu in
- i?86|x86_64|powerpc|powerpc64)
- enable_unaligned_access=yes
- ;;
- *)
- enable_unaligned_access=no
- ;;
- esac
-fi
-if test "x$enable_unaligned_access" = xyes ; then
-
-$as_echo "#define HAVE_FAST_UNALIGNED_ACCESS 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
#####################
# Size optimization #
#####################
@@ -3970,7 +3954,7 @@ $as_echo "#define HAVE_SMALL 1" >>confdefs.h
elif test "x$enable_small" != xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "--enable-small accepts only \`yes' or \`no'" "$LINENO" 5
+ as_fn_error $? "--enable-small accepts only \`yes' or \`no'" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_small" >&5
$as_echo "$enable_small" >&6; }
@@ -4000,13 +3984,45 @@ fi
if test "x$enable_threads" != xyes && test "x$enable_threads" != xno; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "--enable-threads accepts only \`yes' or \`no'" "$LINENO" 5
+ as_fn_error $? "--enable-threads accepts only \`yes' or \`no'" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_threads" >&5
$as_echo "$enable_threads" >&6; }
# We use the actual result a little later.
+#########################
+# Assumed amount of RAM #
+#########################
+
+# We use 128 MiB as default, because it will allow decompressing files
+# created with "xz -9". It would be slightly safer to guess a lower value,
+# 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how much RAM to assume if the real amount is unknown" >&5
+$as_echo_n "checking how much RAM to assume if the real amount is unknown... " >&6; }
+# Check whether --enable-assume-ram was given.
+if test "${enable_assume_ram+set}" = set; then :
+ enableval=$enable_assume_ram;
+else
+ enable_assume_ram=128
+fi
+
+assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
+if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+ as_fn_error $? "--enable-assume-ram accepts only an integer argument" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assume_ram MiB" >&5
+$as_echo "$enable_assume_ram MiB" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ASSUME_RAM $enable_assume_ram
+_ACEOF
+
+
+
############################################
# xz/xzdec/lzmadec linkage against liblzma #
############################################
@@ -4043,7 +4059,7 @@ $as_echo "statically" >&6; }
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
- as_fn_error "--enable-dynamic accepts only \`mixed', \`yes', or \`no'" "$LINENO" 5
+ as_fn_error $? "--enable-dynamic accepts only \`mixed', \`yes', or \`no'" "$LINENO" 5
;;
esac
# We use the actual results later, because we don't know yet
@@ -4111,7 +4127,7 @@ $as_echo "$gl_cv_posix_shell" >&6; }
if test -z "$POSIX_SHELL" ; then
- as_fn_error "No POSIX conforming shell (sh) was found." "$LINENO" 5
+ as_fn_error $? "No POSIX conforming shell (sh) was found." "$LINENO" 5
fi
echo
@@ -4223,11 +4239,11 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -4249,7 +4265,7 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -4259,7 +4275,7 @@ then
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -4431,6 +4447,7 @@ IFS=$as_save_IFS
fi
+ test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
@@ -4438,7 +4455,6 @@ fi
# value for MKDIR_P within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
- test -d ./--version && rmdir ./--version
MKDIR_P="$ac_install_sh -d"
fi
fi
@@ -4505,7 +4521,7 @@ SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -4539,7 +4555,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -4969,8 +4985,8 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4991,32 +5007,30 @@ $as_echo "$ac_try_echo"; } >&5
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -5078,62 +5092,28 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -5163,16 +5143,75 @@ done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -5215,8 +5254,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -5741,7 +5780,7 @@ fi
if test x$ac_cv_prog_cc_c99 = xno ; then
- as_fn_error "No C99 compiler was found." "$LINENO" 5
+ as_fn_error $? "No C99 compiler was found." "$LINENO" 5
fi
if test "x$CC" != xcc; then
@@ -6130,8 +6169,8 @@ if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -6192,7 +6231,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -6258,7 +6297,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -6828,8 +6867,8 @@ esac
-macro_version='2.2.6'
-macro_revision='1.3012'
+macro_version='2.2.6b'
+macro_revision='1.3017'
@@ -6902,7 +6941,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
ac_cv_path_SED=$SED
@@ -6981,7 +7020,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_FGREP=$FGREP
@@ -7097,7 +7136,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -7299,13 +7338,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:7302: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:7341: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:7305: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:7344: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:7308: output\"" >&5)
+ (eval echo "\"\$as_me:7347: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8496,7 +8535,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8499 "configure"' > conftest.$ac_ext
+ echo '#line 8538 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10056,11 +10095,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10059: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10098: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10063: \$? = $ac_status" >&5
+ echo "$as_me:10102: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10395,11 +10434,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10398: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10437: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10402: \$? = $ac_status" >&5
+ echo "$as_me:10441: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -10500,11 +10539,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10503: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10542: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10507: \$? = $ac_status" >&5
+ echo "$as_me:10546: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10555,11 +10594,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10558: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10597: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10562: \$? = $ac_status" >&5
+ echo "$as_me:10601: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12922,7 +12961,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12925 "configure"
+#line 12964 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13018,7 +13057,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13021 "configure"
+#line 13060 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13845,7 +13884,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${acl_cv_prog_gnu_ld+set}" = set; then :
@@ -15175,127 +15214,12 @@ eval as_val=\$$as_ac_Header
_ACEOF
else
- as_fn_error "Required header file(s) are missing." "$LINENO" 5
-fi
-
-done
-
-
-# If any of these headers are missing, things should still work correctly:
-for ac_header in sys/param.h sys/sysctl.h byteswap.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+ as_fn_error $? "Required header file(s) are missing." "$LINENO" 5
fi
done
-# Even if we have byteswap.h, we may lack the specific macros/functions.
-if test x$ac_cv_header_byteswap_h = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_16 is available" >&5
-$as_echo_n "checking if bswap_16 is available... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <byteswap.h>
-int
-main(void)
-{
- bswap_16(42);
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-
-$as_echo "#define HAVE_BSWAP_16 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_32 is available" >&5
-$as_echo_n "checking if bswap_32 is available... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <byteswap.h>
-int
-main(void)
-{
- bswap_32(42);
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-
-$as_echo "#define HAVE_BSWAP_32 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_64 is available" >&5
-$as_echo_n "checking if bswap_64 is available... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <byteswap.h>
-int
-main(void)
-{
- bswap_64(42);
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-
-$as_echo "#define HAVE_BSWAP_64 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- fi
-
###############################################################################
# Checks for typedefs, structures, and compiler characteristics.
@@ -15541,9 +15465,8 @@ else
if test "$ac_cv_type_size_t" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (size_t)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_size_t=0
fi
@@ -16029,7 +15952,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
- as_fn_error "unknown endianness
+ as_fn_error $? "unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
@@ -16129,32 +16052,254 @@ done
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+
+
+
+
+
+for ac_header in byteswap.h sys/endian.h sys/byteorder.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ break
+fi
+
+done
+
+
+# Even if we have byteswap.h, we may lack the specific macros/functions.
+if test x$ac_cv_header_byteswap_h = xyes ; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_16 is available" >&5
+$as_echo_n "checking if bswap_16 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_16(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_BSWAP_16 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_32 is available" >&5
+$as_echo_n "checking if bswap_32 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_32(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_BSWAP_32 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap_64 is available" >&5
+$as_echo_n "checking if bswap_64 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_64(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_BSWAP_64 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned memory access should be used" >&5
+$as_echo_n "checking if unaligned memory access should be used... " >&6; }
+# Check whether --enable-unaligned-access was given.
+if test "${enable_unaligned_access+set}" = set; then :
+ enableval=$enable_unaligned_access;
+else
+ enable_unaligned_access=auto
+fi
+
+if test "x$enable_unaligned_access" = xauto ; then
+ # TODO: There may be other architectures, on which unaligned access
+ # is OK.
+ case $host_cpu in
+ i?86|x86_64|powerpc|powerpc64)
+ enable_unaligned_access=yes
+ ;;
+ *)
+ enable_unaligned_access=no
+ ;;
+ esac
+fi
+if test "x$enable_unaligned_access" = xyes ; then
+
+$as_echo "#define TUKLIB_FAST_UNALIGNED_ACCESS 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# sys/param.h might be needed by sys/sysctl.h.
+for ac_header in sys/param.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 1
+_ACEOF
+
+fi
+
+done
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to detect the amount of physical memory" >&5
$as_echo_n "checking how to detect the amount of physical memory... " >&6; }
+if test "${tuklib_cv_physmem_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+# Maybe checking $host_os would be enough but this matches what
+# tuklib_physmem.c does.
+#
+# NOTE: IRIX has a compiler that doesn't error out with #error, so use
+# a non-compilable text instead of #error to generate an error.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <unistd.h>
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
+ || defined(__DJGPP__) || defined(__VMS)
+int main(void) { return 0; }
+#else
+compile error
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=special
+else
+
+
+# Look for AIX-specific solution before sysconf(), because the test
+# for sysconf() will pass on AIX but won't actually work
+# (sysconf(_SC_PHYS_PAGES) compiles but always returns -1 on AIX).
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/systemcfg.h>
+
int
main(void)
{
- long i;
- i = sysconf(_SC_PAGESIZE);
- i = sysconf(_SC_PHYS_PAGES);
+ (void)_system_configuration.physmem;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=aix
+else
-$as_echo "#define HAVE_PHYSMEM_SYSCONF 1" >>confdefs.h
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysconf" >&5
-$as_echo "sysconf" >&6; }
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+ i = sysconf(_SC_PAGESIZE);
+ i = sysconf(_SC_PHYS_PAGES);
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=sysconf
else
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16169,21 +16314,81 @@ main(void)
int name[2] = { CTL_HW, HW_PHYSMEM };
unsigned long mem;
size_t mem_ptr_size = sizeof(mem);
- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
+ sysctl(name, 2, &mem, &mem_ptr_size, NULL, 0);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=sysctl
+else
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/sysinfo.h>
+#include <machine/hal_sysinfo.h>
+
+int
+main(void)
+{
+ int memkb;
+ int start = 0;
+ getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=getsysinfo
+else
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+int
+main(void)
+{
+ struct pst_static pst;
+ pstat_getstatic(&pst, sizeof(pst), 1, 0);
+ (void)pst.physical_memory;
+ (void)pst.page_size;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=pstat_getstatic
+else
-$as_echo "#define HAVE_PHYSMEM_SYSCTL 1" >>confdefs.h
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysctl" >&5
-$as_echo "sysctl" >&6; }
+#include <invent.h>
+int
+main(void)
+{
+ inv_state_t *st = NULL;
+ setinvent_r(&st);
+ getinvent_r(st);
+ endinvent_r(st);
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_physmem_method=getinvent_r
else
+
+# This version of sysinfo() is Linux-specific. Some non-Linux systems have
+# different sysinfo() so we must check $host_os.
case $host_os in
linux*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16201,23 +16406,17 @@ main(void)
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_PHYSMEM_SYSINFO 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysinfo" >&5
-$as_echo "sysinfo" >&6; }
+ tuklib_cv_physmem_method=sysinfo
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
-$as_echo "unknown" >&6; }
+ tuklib_cv_physmem_method=unknown
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
-$as_echo "unknown" >&6; }
+ tuklib_cv_physmem_method=unknown
;;
esac
@@ -16225,33 +16424,85 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_physmem_method" >&5
+$as_echo "$tuklib_cv_physmem_method" >&6; }
+case $tuklib_cv_physmem_method in
+ aix)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to detect the number of available CPU cores" >&5
-$as_echo_n "checking how to detect the number of available CPU cores... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+$as_echo "#define TUKLIB_PHYSMEM_AIX 1" >>confdefs.h
-#include <unistd.h>
-int
-main(void)
-{
- long i;
- i = sysconf(_SC_NPROCESSORS_ONLN);
- return 0;
-}
+ ;;
+ sysconf)
+
+$as_echo "#define TUKLIB_PHYSMEM_SYSCONF 1" >>confdefs.h
+
+ ;;
+ sysctl)
+$as_echo "#define TUKLIB_PHYSMEM_SYSCTL 1" >>confdefs.h
+
+ ;;
+ getsysinfo)
+
+$as_echo "#define TUKLIB_PHYSMEM_GETSYSINFO 1" >>confdefs.h
+
+ ;;
+ pstat_getstatic)
+
+$as_echo "#define TUKLIB_PHYSMEM_PSTAT_GETSTATIC 1" >>confdefs.h
+
+ ;;
+ getinvent_r)
+
+$as_echo "#define TUKLIB_PHYSMEM_GETINVENT_R 1" >>confdefs.h
+
+ ;;
+ sysinfo)
+
+$as_echo "#define TUKLIB_PHYSMEM_SYSINFO 1" >>confdefs.h
+
+ ;;
+esac
+
+
+
+
+# sys/param.h might be needed by sys/sysctl.h.
+for ac_header in sys/param.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 1
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+fi
-$as_echo "#define HAVE_CPUCORES_SYSCONF 1" >>confdefs.h
+done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysconf" >&5
-$as_echo "sysconf" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to detect the number of available CPU cores" >&5
+$as_echo_n "checking how to detect the number of available CPU cores... " >&6; }
+if test "${tuklib_cv_cpucores_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
+
+# Look for sysctl() solution first, because on OS/2, both sysconf()
+# and sysctl() pass the tests in this file, but only sysctl()
+# actually works.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16266,28 +16517,90 @@ main(void)
int name[2] = { CTL_HW, HW_NCPU };
int cpus;
size_t cpus_size = sizeof(cpus);
- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
+ sysctl(name, 2, &cpus, &cpus_size, NULL, 0);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_cpucores_method=sysctl
+else
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+#ifdef _SC_NPROCESSORS_ONLN
+ /* Many systems using sysconf() */
+ i = sysconf(_SC_NPROCESSORS_ONLN);
+#else
+ /* IRIX */
+ i = sysconf(_SC_NPROC_ONLN);
+#endif
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_cpucores_method=sysconf
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-$as_echo "#define HAVE_CPUCORES_SYSCTL 1" >>confdefs.h
+#include <sys/param.h>
+#include <sys/pstat.h>
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: sysctl" >&5
-$as_echo "sysctl" >&6; }
+int
+main(void)
+{
+ struct pst_dynamic pst;
+ pstat_getdynamic(&pst, sizeof(pst), 1, 0);
+ (void)pst.psd_proc_cnt;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tuklib_cv_cpucores_method=pstat_getdynamic
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
-$as_echo "unknown" >&6; }
+ tuklib_cv_cpucores_method=unknown
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_cpucores_method" >&5
+$as_echo "$tuklib_cv_cpucores_method" >&6; }
+
+case $tuklib_cv_cpucores_method in
+ sysctl)
+
+$as_echo "#define TUKLIB_CPUCORES_SYSCTL 1" >>confdefs.h
+
+ ;;
+ sysconf)
+
+$as_echo "#define TUKLIB_CPUCORES_SYSCONF 1" >>confdefs.h
+
+ ;;
+ pstat_getdynamic)
+
+$as_echo "#define TUKLIB_CPUCORES_PSTAT_GETDYNAMIC 1" >>confdefs.h
+
+ ;;
+esac
@@ -16452,7 +16765,7 @@ fi
# Set additional flags for static/dynamic linking. The idea is that every
# program (not library) being built will use either STATIC_{CPPFLAGS,LDFLAGS}
# or DYNAMIC_{CPPFLAGS,LDFLAGS} depending on which type of linkage is
-# preferred. These preferences get overriden by use of --disable-static,
+# preferred. These preferences get overridden by use of --disable-static,
# --disable-shared, or --enable-dynamic.
#
# This is quite messy, because we want to use LZMA_API_STATIC when linking
@@ -16578,6 +16891,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -16593,183 +16907,183 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${COND_W32_TRUE}" && test -z "${COND_W32_FALSE}"; then
- as_fn_error "conditional \"COND_W32\" was never defined.
+ as_fn_error $? "conditional \"COND_W32\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_MAIN_ENCODER_TRUE}" && test -z "${COND_MAIN_ENCODER_FALSE}"; then
- as_fn_error "conditional \"COND_MAIN_ENCODER\" was never defined.
+ as_fn_error $? "conditional \"COND_MAIN_ENCODER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_MAIN_DECODER_TRUE}" && test -z "${COND_MAIN_DECODER_FALSE}"; then
- as_fn_error "conditional \"COND_MAIN_DECODER\" was never defined.
+ as_fn_error $? "conditional \"COND_MAIN_DECODER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_LZMA1_TRUE}" && test -z "${COND_FILTER_LZMA1_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_LZMA1\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_LZMA1\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_LZMA1_TRUE}" && test -z "${COND_ENCODER_LZMA1_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_LZMA1\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_LZMA1\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_LZMA1_TRUE}" && test -z "${COND_DECODER_LZMA1_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_LZMA1\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_LZMA1\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_LZMA2_TRUE}" && test -z "${COND_FILTER_LZMA2_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_LZMA2\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_LZMA2\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_LZMA2_TRUE}" && test -z "${COND_ENCODER_LZMA2_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_LZMA2\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_LZMA2\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_LZMA2_TRUE}" && test -z "${COND_DECODER_LZMA2_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_LZMA2\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_LZMA2\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_SUBBLOCK_TRUE}" && test -z "${COND_FILTER_SUBBLOCK_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_SUBBLOCK\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_SUBBLOCK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_SUBBLOCK_TRUE}" && test -z "${COND_ENCODER_SUBBLOCK_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_SUBBLOCK\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_SUBBLOCK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_SUBBLOCK_TRUE}" && test -z "${COND_DECODER_SUBBLOCK_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_SUBBLOCK\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_SUBBLOCK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_DELTA_TRUE}" && test -z "${COND_FILTER_DELTA_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_DELTA\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_DELTA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_DELTA_TRUE}" && test -z "${COND_ENCODER_DELTA_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_DELTA\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_DELTA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_DELTA_TRUE}" && test -z "${COND_DECODER_DELTA_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_DELTA\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_DELTA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_X86_TRUE}" && test -z "${COND_FILTER_X86_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_X86\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_X86\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_X86_TRUE}" && test -z "${COND_ENCODER_X86_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_X86\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_X86\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_X86_TRUE}" && test -z "${COND_DECODER_X86_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_X86\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_X86\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_POWERPC_TRUE}" && test -z "${COND_FILTER_POWERPC_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_POWERPC\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_POWERPC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_POWERPC_TRUE}" && test -z "${COND_ENCODER_POWERPC_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_POWERPC\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_POWERPC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_POWERPC_TRUE}" && test -z "${COND_DECODER_POWERPC_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_POWERPC\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_POWERPC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_IA64_TRUE}" && test -z "${COND_FILTER_IA64_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_IA64\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_IA64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_IA64_TRUE}" && test -z "${COND_ENCODER_IA64_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_IA64\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_IA64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_IA64_TRUE}" && test -z "${COND_DECODER_IA64_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_IA64\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_IA64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_ARM_TRUE}" && test -z "${COND_FILTER_ARM_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_ARM\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_ARM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_ARM_TRUE}" && test -z "${COND_ENCODER_ARM_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_ARM\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_ARM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_ARM_TRUE}" && test -z "${COND_DECODER_ARM_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_ARM\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_ARM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_ARMTHUMB_TRUE}" && test -z "${COND_FILTER_ARMTHUMB_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_ARMTHUMB\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_ARMTHUMB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_ARMTHUMB_TRUE}" && test -z "${COND_ENCODER_ARMTHUMB_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_ARMTHUMB\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_ARMTHUMB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_ARMTHUMB_TRUE}" && test -z "${COND_DECODER_ARMTHUMB_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_ARMTHUMB\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_ARMTHUMB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_SPARC_TRUE}" && test -z "${COND_FILTER_SPARC_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_SPARC\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_SPARC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_SPARC_TRUE}" && test -z "${COND_ENCODER_SPARC_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_SPARC\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_SPARC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_SPARC_TRUE}" && test -z "${COND_DECODER_SPARC_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_SPARC\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_SPARC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_SIMPLE_TRUE}" && test -z "${COND_FILTER_SIMPLE_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_SIMPLE\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_SIMPLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_SIMPLE_TRUE}" && test -z "${COND_ENCODER_SIMPLE_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_SIMPLE\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_SIMPLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_SIMPLE_TRUE}" && test -z "${COND_DECODER_SIMPLE_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_SIMPLE\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_SIMPLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_FILTER_LZ_TRUE}" && test -z "${COND_FILTER_LZ_FALSE}"; then
- as_fn_error "conditional \"COND_FILTER_LZ\" was never defined.
+ as_fn_error $? "conditional \"COND_FILTER_LZ\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ENCODER_LZ_TRUE}" && test -z "${COND_ENCODER_LZ_FALSE}"; then
- as_fn_error "conditional \"COND_ENCODER_LZ\" was never defined.
+ as_fn_error $? "conditional \"COND_ENCODER_LZ\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_DECODER_LZ_TRUE}" && test -z "${COND_DECODER_LZ_FALSE}"; then
- as_fn_error "conditional \"COND_DECODER_LZ\" was never defined.
+ as_fn_error $? "conditional \"COND_DECODER_LZ\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_CHECK_CRC32_TRUE}" && test -z "${COND_CHECK_CRC32_FALSE}"; then
- as_fn_error "conditional \"COND_CHECK_CRC32\" was never defined.
+ as_fn_error $? "conditional \"COND_CHECK_CRC32\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_CHECK_CRC64_TRUE}" && test -z "${COND_CHECK_CRC64_FALSE}"; then
- as_fn_error "conditional \"COND_CHECK_CRC64\" was never defined.
+ as_fn_error $? "conditional \"COND_CHECK_CRC64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_CHECK_SHA256_TRUE}" && test -z "${COND_CHECK_SHA256_FALSE}"; then
- as_fn_error "conditional \"COND_CHECK_SHA256\" was never defined.
+ as_fn_error $? "conditional \"COND_CHECK_SHA256\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ASM_X86_TRUE}" && test -z "${COND_ASM_X86_FALSE}"; then
- as_fn_error "conditional \"COND_ASM_X86\" was never defined.
+ as_fn_error $? "conditional \"COND_ASM_X86\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_ASM_X86_64_TRUE}" && test -z "${COND_ASM_X86_64_FALSE}"; then
- as_fn_error "conditional \"COND_ASM_X86_64\" was never defined.
+ as_fn_error $? "conditional \"COND_ASM_X86_64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_SMALL_TRUE}" && test -z "${COND_SMALL_FALSE}"; then
- as_fn_error "conditional \"COND_SMALL\" was never defined.
+ as_fn_error $? "conditional \"COND_SMALL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -n "$EXEEXT"; then
@@ -16781,24 +17095,24 @@ else
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCCAS\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_SHARED_TRUE}" && test -z "${COND_SHARED_FALSE}"; then
- as_fn_error "conditional \"COND_SHARED\" was never defined.
+ as_fn_error $? "conditional \"COND_SHARED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${COND_GNULIB_TRUE}" && test -z "${COND_GNULIB_FALSE}"; then
- as_fn_error "conditional \"COND_GNULIB\" was never defined.
+ as_fn_error $? "conditional \"COND_GNULIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -16948,19 +17262,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -17156,7 +17470,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -17210,7 +17524,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by XZ Utils $as_me 4.999.9beta, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65.71-f91e-dirty. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -17250,6 +17564,7 @@ Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -17268,16 +17583,18 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <lasse.collin@tukaani.org>."
+Report bugs to <lasse.collin@tukaani.org>.
+XZ Utils home page: <http://tukaani.org/xz/>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
XZ Utils config.status 4.999.9beta
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65.71-f91e-dirty,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -17313,6 +17630,8 @@ do
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -17331,7 +17650,7 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -17340,7 +17659,7 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -17752,7 +18071,7 @@ do
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"debug/Makefile") CONFIG_FILES="$CONFIG_FILES debug/Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -17790,7 +18109,7 @@ $debug ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -17807,7 +18126,7 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -17821,18 +18140,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -17854,7 +18173,7 @@ s/'"$ac_delim"'$//
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -17868,7 +18187,7 @@ s/.\{148\}//
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
@@ -17921,7 +18240,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
# VPATH may cause trouble with some makes, so we remove $(srcdir),
@@ -17962,7 +18281,7 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -18047,7 +18366,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -18060,7 +18379,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -18088,7 +18407,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -18115,7 +18434,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -18252,22 +18571,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -18278,19 +18597,19 @@ which seems to be undefined. Please make sure it is defined." >&2;}
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
@@ -19333,7 +19652,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -19354,10 +19673,26 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
+# Some warnings
+if test x$tuklib_cv_physmem_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the amount of RAM."
+ echo "Consider using --enable-assume-ram (if you didn't already)"
+ 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
diff --git a/Build/source/extra/xz-4.999.9beta/configure.ac b/Build/source/extra/xz-4.999.9beta-124-gb637/configure.ac
index d125a6936da..af317e93a97 100644
--- a/Build/source/extra/xz-4.999.9beta/configure.ac
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/configure.ac
@@ -15,20 +15,15 @@
# of malloc(), stat(), or lstat(), since we don't use those functions in
# a way that would cause the problems the autoconf macros check.
-AC_PREREQ([2.61])
+AC_PREREQ([2.64])
AC_INIT([XZ Utils], m4_esyscmd([/bin/sh version.sh]),
- [lasse.collin@tukaani.org], [xz])
+ [lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/])
AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])
-PACKAGE_HOMEPAGE=http://tukaani.org/xz/
-AC_DEFINE_UNQUOTED([PACKAGE_HOMEPAGE], ["$PACKAGE_HOMEPAGE"],
- [Define to the URL of the home page of this package.])
-AC_SUBST([PACKAGE_HOMEPAGE])
-
echo
echo "$PACKAGE_STRING"
@@ -44,6 +39,15 @@ case $host_os in
esac
AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
+# We need to use $EXEEXT with $(LN_S) when creating symlinks to
+# executables. Cygwin is an exception to this, since it is recommended
+# that symlinks don't have the .exe suffix. To make this work, we
+# define LN_EXEEXT.
+case $host_os in
+ cygwin) LN_EXEEXT= ;;
+ *) LN_EXEEXT='$(EXEEXT)' ;;
+esac
+AC_SUBST([LN_EXEEXT])
echo
echo "Configure options:"
@@ -279,62 +283,31 @@ AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
for the architecture.]),
[], [enable_assembler=yes])
if test "x$enable_assembler" = xyes; then
- case $host_cpu in
- i?86) enable_assembler=x86 ;;
- x86_64) enable_assembler=x86_64 ;;
- *) enable_assembler=no ;;
+ enable_assembler=no
+ case $host_os in
+ # Darwin should work too but only if not creating universal
+ # binaries. Solaris x86 could work too but I cannot test.
+ linux* | *bsd* | mingw* | cygwin*)
+ case $host_cpu in
+ i?86) enable_assembler=x86 ;;
+ x86_64) enable_assembler=x86_64 ;;
+ esac
+ ;;
esac
fi
case $enable_assembler in
- x86)
- AC_DEFINE([HAVE_ASM_X86], [1],
- [Define to 1 if using x86 assembler optimizations.])
- ;;
- x86_64)
- AC_DEFINE([HAVE_ASM_X86_64], [1],
- [Define to 1 if using x86_64 assembler optimizations.])
- ;;
- no)
+ x86 | x86_64 | no)
+ AC_MSG_RESULT([$enable_assembler])
;;
*)
AC_MSG_RESULT([])
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.])
;;
esac
-AC_MSG_RESULT([$enable_assembler])
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)
-################################
-# Fast unaligned memory access #
-################################
-
-AC_MSG_CHECKING([if unaligned memory access should be used])
-AC_ARG_ENABLE([unaligned-access], AC_HELP_STRING([--enable-unaligned-access],
- [Enable if the system supports *fast* unaligned memory access
- with 16-bit and 32-bit integers. By default, this is enabled
- only on x86, x86_64, and big endian PowerPC.]),
- [], [enable_unaligned_access=auto])
-if test "x$enable_unaligned_access" = xauto ; then
- case $host_cpu in
- i?86|x86_64|powerpc|powerpc64)
- enable_unaligned_access=yes
- ;;
- *)
- enable_unaligned_access=no
- ;;
- esac
-fi
-if test "x$enable_unaligned_access" = xyes ; then
- AC_DEFINE([HAVE_FAST_UNALIGNED_ACCESS], [1], [Define to 1 if
- the system supports fast unaligned memory access.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-
#####################
# Size optimization #
#####################
@@ -371,6 +344,31 @@ AC_MSG_RESULT([$enable_threads])
# We use the actual result a little later.
+#########################
+# Assumed amount of RAM #
+#########################
+
+# We use 128 MiB as default, because it will allow decompressing files
+# created with "xz -9". It would be slightly safer to guess a lower value,
+# 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],
+ [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.]),
+ [], [enable_assume_ram=128])
+assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
+if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
+fi
+AC_MSG_RESULT([$enable_assume_ram MiB])
+AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
+ [How many MiB of RAM to assume if the real amount cannot
+ be determined.])
+
+
############################################
# xz/xzdec/lzmadec linkage against liblzma #
############################################
@@ -475,35 +473,6 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
[],
[AC_MSG_ERROR([Required header file(s) are missing.])])
-# If any of these headers are missing, things should still work correctly:
-AC_CHECK_HEADERS([sys/param.h sys/sysctl.h byteswap.h],
- [], [], [
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-])
-
-# Even if we have byteswap.h, we may lack the specific macros/functions.
-if test x$ac_cv_header_byteswap_h = xyes ; then
- m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
- AC_MSG_CHECKING([if FUNC is available])
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-#include <byteswap.h>
-int
-main(void)
-{
- FUNC[](42);
- return 0;
-}
- ])], [
- AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
- [Define to 1 if] FUNC [is available.])
- AC_MSG_RESULT([yes])
- ], [AC_MSG_RESULT([no])])
-
- ])dnl
-fi
-
###############################################################################
# Checks for typedefs, structures, and compiler characteristics.
@@ -549,8 +518,10 @@ gl_GETOPT
# Find the best function to set timestamps.
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
-lc_PHYSMEM
-lc_CPUCORES
+TUKLIB_PROGNAME
+TUKLIB_INTEGER
+TUKLIB_PHYSMEM
+TUKLIB_CPUCORES
###############################################################################
@@ -642,7 +613,7 @@ AC_SUBST([AM_CFLAGS])
# Set additional flags for static/dynamic linking. The idea is that every
# program (not library) being built will use either STATIC_{CPPFLAGS,LDFLAGS}
# or DYNAMIC_{CPPFLAGS,LDFLAGS} depending on which type of linkage is
-# preferred. These preferences get overriden by use of --disable-static,
+# preferred. These preferences get overridden by use of --disable-static,
# --disable-shared, or --enable-dynamic.
#
# This is quite messy, because we want to use LZMA_API_STATIC when linking
@@ -704,3 +675,19 @@ AC_CONFIG_FILES([
])
AC_OUTPUT
+
+# Some warnings
+if test x$tuklib_cv_physmem_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the amount of RAM."
+ echo "Consider using --enable-assume-ram (if you didn't already)"
+ 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
diff --git a/Build/source/extra/xz-4.999.9beta/debug/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.am
index 23834f4fcac..23834f4fcac 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.am
diff --git a/Build/source/extra/xz-4.999.9beta/debug/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.in
index e8d6418c238..c8fa9782a50 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -43,15 +43,18 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -167,6 +170,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -184,7 +188,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
diff --git a/Build/source/extra/xz-4.999.9beta/debug/README b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/README
index 749610d77c0..749610d77c0 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/README
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/README
diff --git a/Build/source/extra/xz-4.999.9beta/debug/crc32.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/crc32.c
index 0fe46511f03..e545a3cc1eb 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/crc32.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/crc32.c
@@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
+#include "lzma.h"
#include <stdio.h>
diff --git a/Build/source/extra/xz-4.999.9beta/debug/full_flush.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/full_flush.c
index ce0d2e8940e..ce0d2e8940e 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/full_flush.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/full_flush.c
diff --git a/Build/source/extra/xz-4.999.9beta/debug/hex2bin.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/hex2bin.c
index 73246244746..73246244746 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/hex2bin.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/hex2bin.c
diff --git a/Build/source/extra/xz-4.999.9beta/debug/known_sizes.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/known_sizes.c
index cdee26dfd8e..cdee26dfd8e 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/known_sizes.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/known_sizes.c
diff --git a/Build/source/extra/xz-4.999.9beta/debug/memusage.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/memusage.c
index 93fe0b2ca79..bd72b5a22c6 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/memusage.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/memusage.c
@@ -42,8 +42,10 @@ main(void)
{ UINT64_MAX, NULL }
};
- printf("Encoder: %10" PRIu64 " B\n", lzma_memusage_encoder(filters));
- printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters));
+ printf("Encoder: %10" PRIu64 " B\n",
+ lzma_raw_encoder_memusage(filters));
+ printf("Decoder: %10" PRIu64 " B\n",
+ lzma_raw_decoder_memusage(filters));
return 0;
}
diff --git a/Build/source/extra/xz-4.999.9beta/debug/repeat.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/repeat.c
index a00bde2cd38..a00bde2cd38 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/repeat.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/repeat.c
diff --git a/Build/source/extra/xz-4.999.9beta/debug/sync_flush.c b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/sync_flush.c
index 1dccbdaacbd..4a31efdd88b 100644
--- a/Build/source/extra/xz-4.999.9beta/debug/sync_flush.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/debug/sync_flush.c
@@ -71,7 +71,6 @@ main(int argc, char **argv)
.lp = LZMA_LP_DEFAULT,
.pb = LZMA_PB_DEFAULT,
.preset_dict = NULL,
- .persistent = true,
.mode = LZMA_MODE_NORMAL,
.nice_len = 32,
.mf = LZMA_MF_HC3,
@@ -106,20 +105,25 @@ main(int argc, char **argv)
}
// Encoding
-
encode(0, LZMA_SYNC_FLUSH);
encode(6, LZMA_SYNC_FLUSH);
encode(0, LZMA_SYNC_FLUSH);
encode(7, LZMA_SYNC_FLUSH);
encode(0, LZMA_SYNC_FLUSH);
encode(0, LZMA_FINISH);
+
/*
encode(53, LZMA_SYNC_FLUSH);
-// opt_lzma.literal_context_bits = 2;
-// opt_lzma.literal_pos_bits = 1;
-// opt_lzma.pos_bits = 0;
+ opt_lzma.lc = 2;
+ opt_lzma.lp = 1;
+ opt_lzma.pb = 0;
+ if (lzma_filters_update(&strm, filters) != LZMA_OK) {
+ fprintf(stderr, "update failed\n");
+ exit(1);
+ }
encode(404, LZMA_FINISH);
*/
+
// Clean up
lzma_end(&strm);
diff --git a/Build/source/extra/xz-4.999.9beta/doc/faq.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/faq.txt
index 48c4ec711b8..8e87457a594 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/faq.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/faq.txt
@@ -67,6 +67,12 @@ A: For now, no. Since XZ Utils supports the .lzma format, it's usually
tool, contact Lasse Collin and offer some money.
+Q: I have installed xz, but my tar doesn't recognize .tar.xz files.
+ How can I extract .tar.xz files?
+
+A: xz -dc foo.tar.xz | tar xf -
+
+
Q: Can I recover parts of a broken .xz file (e.g. corrupted CD-R)?
A: It may be possible if the file consists of multiple blocks, which
@@ -117,6 +123,6 @@ A: Give --enable-small to the configure script. Use also appropriate
for size. See INSTALL for information about configure options.
If the result is still too big, take a look at XZ Embedded. It is
- a separate project, which provides a limited but signinificantly
+ a separate project, which provides a limited but significantly
smaller XZ decoder implementation than XZ Utils.
diff --git a/Build/source/extra/xz-4.999.9beta/doc/history.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/history.txt
index c97492e81a0..c97492e81a0 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/history.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/history.txt
diff --git a/Build/source/extra/xz-4.999.9beta/doc/lzma-file-format.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/lzma-file-format.txt
index 21fcb19fdcd..21fcb19fdcd 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/lzma-file-format.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/lzma-file-format.txt
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/lzmainfo-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/lzmainfo-a4.pdf
new file mode 100644
index 00000000000..4e82bed57cd
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/lzmainfo-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xz-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xz-a4.pdf
new file mode 100644
index 00000000000..50a9a1a75af
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xz-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdec-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdec-a4.pdf
new file mode 100644
index 00000000000..cc58976979e
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdec-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdiff-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdiff-a4.pdf
new file mode 100644
index 00000000000..13910c684d0
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzdiff-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzgrep-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzgrep-a4.pdf
index 2c928946d92..9fd5cc278e9 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzgrep-a4.pdf
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzgrep-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzless-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzless-a4.pdf
new file mode 100644
index 00000000000..2a8f0e69670
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzless-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzmore-a4.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzmore-a4.pdf
new file mode 100644
index 00000000000..b43131dd5d0
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-a4/xzmore-a4.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/lzmainfo-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/lzmainfo-letter.pdf
new file mode 100644
index 00000000000..feeaad35013
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/lzmainfo-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xz-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xz-letter.pdf
new file mode 100644
index 00000000000..7c6590edf28
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xz-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdec-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdec-letter.pdf
new file mode 100644
index 00000000000..a8d4b221a50
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdec-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdiff-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdiff-letter.pdf
new file mode 100644
index 00000000000..30fd16fc93b
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzdiff-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzgrep-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzgrep-letter.pdf
index 677186a1b44..e192b588e78 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzgrep-letter.pdf
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzgrep-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzless-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzless-letter.pdf
new file mode 100644
index 00000000000..aed468dcc84
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzless-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzmore-letter.pdf b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzmore-letter.pdf
index e22857d6894..11c162c0c3c 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzmore-letter.pdf
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/pdf-letter/xzmore-letter.pdf
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/lzmainfo.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/lzmainfo.txt
new file mode 100644
index 00000000000..28b1f962f58
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/lzmainfo.txt
@@ -0,0 +1,40 @@
+LZMAINFO(1) XZ Utils LZMAINFO(1)
+
+
+
+NAME
+ lzmainfo - show infomation stored in the .lzma file header
+
+SYNOPSIS
+ lzmainfo [--help] [--version] [file]...
+
+DESCRIPTION
+ lzmainfo shows information stored in the .lzma file header. It reads
+ the first 13 bytes from the specified file, decodes the header, and
+ prints it to standard output in human readable format. If no files are
+ given or file is -, standard input is read.
+
+ Usually the most interesting information is the uncompressed size and
+ the dictionary size. Uncompressed size can be shown only if the file is
+ in the non-streamed .lzma format variant. The amount of memory required
+ to decompress the file is a few dozen kilobytes plus the dictionary
+ size.
+
+ lzmainfo is included in XZ Utils primarily for backward compatibility
+ with LZMA Utils.
+
+EXIT STATUS
+ 0 All is good.
+
+ 1 An error occurred.
+
+BUGS
+ lzmainfo uses MB while the correct suffix would be MiB (2^20 bytes).
+ This is to keep the output compatible with LZMA Utils.
+
+SEE ALSO
+ xz(1)
+
+
+
+Tukaani 2009-08-13 LZMAINFO(1)
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xz.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xz.txt
index e3dacde4a11..6d9c00068d3 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xz.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xz.txt
@@ -50,9 +50,9 @@ DESCRIPTION
the file if any of the following applies:
o File is not a regular file. Symbolic links are not followed, thus
- they are never considered to be regular files.
+ they are not considered to be regular files.
- o File has more than one hardlink.
+ o File has more than one hard link.
o File has setuid, setgid, or sticky bit set.
@@ -91,63 +91,60 @@ DESCRIPTION
case memory usage of the decompressor is several gigabytes.
To prevent uncomfortable surprises caused by huge memory usage, xz has
- a built-in memory usage limiter. The default limit is 40 % of total
- physical RAM. While operating systems provide ways to limit the memory
- usage of processes, relying on it wasn't deemed to be flexible enough.
-
- When compressing, if the selected compression settings exceed the mem-
- ory usage limit, the settings are automatically adjusted downwards and
- a notice about this is displayed. As an exception, if the memory usage
- limit is exceeded when compressing with --format=raw, an error is dis-
+ a built-in memory usage limiter. While some operating systems provide
+ ways to limit the memory usage of processes, relying on it wasn't
+ deemed to be flexible enough. The default limit depends on the total
+ amount of physical RAM:
+
+ o If 40 % of RAM is at least 80 MiB, 40 % of RAM is used as the limit.
+
+ o If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.
+
+ o Otherwise 80 % of RAM is used as the limit.
+
+ When compressing, if the selected compression settings exceed the mem-
+ ory usage limit, the settings are automatically adjusted downwards and
+ a notice about this is displayed. As an exception, if the memory usage
+ limit is exceeded when compressing with --format=raw, an error is dis-
played and xz will exit with exit status 1.
- If source file cannot be decompressed without exceeding the memory
- usage limit, an error message is displayed and the file is skipped.
+ If source file cannot be decompressed without exceeding the memory
+ usage limit, an error message is displayed and the file is skipped.
Note that compressed files may contain many blocks, which may have been
- compressed with different settings. Typically all blocks will have
- roughly the same memory requirements, but it is possible that a block
- later in the file will exceed the memory usage limit, and an error
- about too low memory usage limit gets displayed after some data has
+ compressed with different settings. Typically all blocks will have
+ roughly the same memory requirements, but it is possible that a block
+ later in the file will exceed the memory usage limit, and an error
+ about too low memory usage limit gets displayed after some data has
already been decompressed.
- The absolute value of the active memory usage limit can be seen near
- the bottom of the output of --long-help. The default limit can be
- overriden with --memory=limit.
+ The absolute value of the active memory usage limit can be seen with
+ --info-memory or near the bottom of the output of --long-help. The
+ default limit can be overridden with --memory=limit.
OPTIONS
Integer suffixes and special values
- In most places where an integer argument is expected, an optional suf-
- fix is supported to easily indicate large integers. There must be no
+ In most places where an integer argument is expected, an optional suf-
+ fix is supported to easily indicate large integers. There must be no
space between the integer and the suffix.
- k or kB
- The integer is multiplied by 1,000 (10^3). For example, 5k or
- 5kB equals 5000.
-
- Ki or KiB
- The integer is multiplied by 1,024 (2^10).
+ KiB The integer is multiplied by 1,024 (2^10). Also Ki, k, kB, K,
+ and KB are accepted as synonyms for KiB.
- M or MB
- The integer is multiplied by 1,000,000 (10^6).
+ MiB The integer is multiplied by 1,048,576 (2^20). Also Mi, m, M,
+ and MB are accepted as synonyms for MiB.
- Mi or MiB
- The integer is multiplied by 1,048,576 (2^20).
+ GiB The integer is multiplied by 1,073,741,824 (2^30). Also Gi, g,
+ G, and GB are accepted as synonyms for GiB.
- G or GB
- The integer is multiplied by 1,000,000,000 (10^9).
-
- Gi or GiB
- The integer is multiplied by 1,073,741,824 (2^30).
-
- A special value max can be used to indicate the maximum integer value
+ A special value max can be used to indicate the maximum integer value
supported by the option.
Operation mode
- If multiple operation mode options are given, the last one takes
+ If multiple operation mode options are given, the last one takes
effect.
-z, --compress
- Compress. This is the default operation mode when no operation
+ Compress. This is the default operation mode when no operation
mode option is specified, and no other operation mode is implied
from the command name (for example, unxz implies --decompress).
@@ -156,14 +153,14 @@ OPTIONS
-t, --test
Test the integrity of compressed files. No files are created or
- removed. This option is equivalent to --decompress --stdout
- except that the decompressed data is discarded instead of being
+ removed. This option is equivalent to --decompress --stdout
+ except that the decompressed data is discarded instead of being
written to standard output.
-l, --list
- View information about the compressed files. No uncompressed
+ View information about the compressed files. No uncompressed
output is produced, and no files are created or removed. In list
- mode, the program cannot read the compressed data from standard
+ mode, the program cannot read the compressed data from standard
input or from other unseekable sources.
This feature has not been implemented yet.
@@ -178,49 +175,57 @@ OPTIONS
o If the target file already exists, delete it before compress-
ing or decompressing.
- o Compress or decompress even if the input is not a regular
- file, has more than one hardlink, or has setuid, setgid, or
- sticky bit set. The setuid, setgid, and sticky bits are not
- copied to the target file.
+ o Compress or decompress even if the input is a symbolic link
+ to a regular file, has more than one hard link, or has
+ setuid, setgid, or sticky bit set. The setuid, setgid, and
+ sticky bits are not copied to the target file.
- o If combined with --decompress --stdout and xz doesn't recog-
- nize the type of the source file, xz will copy the source
- file as is to standard output. This allows using xzcat
- --force like cat(1) for files that have not been compressed
- with xz. Note that in future, xz might support new com-
+ o If combined with --decompress --stdout and xz doesn't recog-
+ nize the type of the source file, xz will copy the source
+ file as is to standard output. This allows using xzcat
+ --force like cat(1) for files that have not been compressed
+ with xz. Note that in future, xz might support new com-
pressed file formats, which may make xz decompress more types
- of files instead of copying them as is to standard output.
+ of files instead of copying them as is to standard output.
--format=format can be used to restrict xz to decompress only
a single file format.
- o Allow writing compressed data to a terminal, and reading com-
- pressed data from a terminal.
-
-c, --stdout, --to-stdout
Write the compressed or decompressed data to standard output
instead of a file. This implies --keep.
+ --no-sparse
+ Disable creation of sparse files. By default, if decompressing
+ into a regular file, xz tries to make the file sparse if the
+ decompressed data contains long sequences of binary zeros. It
+ works also when writing to standard output as long as standard
+ output is connected to a regular file, and certain additional
+ conditions are met to make it safe. Creating sparse files may
+ save disk space and speed up the decompression by reducing the
+ amount of disk I/O.
+
-S .suf, --suffix=.suf
- When compressing, use .suf as the suffix for the target file
- instead of .xz or .lzma. If not writing to standard output and
- the source file already has the suffix .suf, a warning is dis-
+ When compressing, use .suf as the suffix for the target file
+ instead of .xz or .lzma. If not writing to standard output and
+ the source file already has the suffix .suf, a warning is dis-
played and the file is skipped.
When decompressing, recognize also files with the suffix .suf in
- addition to files with the .xz, .txz, .lzma, or .tlz suffix. If
- the source file has the suffix .suf, the suffix is removed to
+ addition to files with the .xz, .txz, .lzma, or .tlz suffix. If
+ the source file has the suffix .suf, the suffix is removed to
get the target filename.
- When compressing or decompressing raw streams (--format=raw),
- the suffix must always be specified unless writing to standard
+ When compressing or decompressing raw streams (--format=raw),
+ the suffix must always be specified unless writing to standard
output, because there is no default suffix for raw streams.
--files[=file]
- Read the filenames to process from file; if file is omitted,
+ Read the filenames to process from file; if file is omitted,
filenames are read from standard input. Filenames must be termi-
- nated with the newline character. If filenames are given also as
- command line arguments, they are processed before the filenames
- read from file.
+ nated with the newline character. A dash (-) is taken as a regu-
+ lar filename; it doesn't mean standard input. If filenames are
+ given also as command line arguments, they are processed before
+ the filenames read from file.
--files0[=file]
This is identical to --files[=file] except that the filenames
@@ -232,8 +237,8 @@ OPTIONS
o auto: This is the default. When compressing, auto is equiva-
lent to xz. When decompressing, the format of the input file
- is autodetected. Note that raw streams (created with --for-
- mat=raw) cannot be autodetected.
+ is automatically detected. Note that raw streams (created
+ with --format=raw) cannot be auto-detected.
o xz: Compress to the .xz file format, or accept only .xz files
when decompressing.
@@ -351,7 +356,7 @@ OPTIONS
cally (it can easily double).
-M limit, --memory=limit
- Set the memory usage limit. If this option is specied multiple
+ Set the memory usage limit. If this option is specified multiple
times, the last one takes effect. The limit can be specified in
multiple ways:
@@ -361,129 +366,130 @@ OPTIONS
o The limit can be specified as a percentage of physical RAM.
Example: --memory=70%
- o The limit can be reset back to its default value (currently
- 40 % of physical RAM) by setting it to 0.
+ o The limit can be reset back to its default value by setting
+ it to 0. See the section Memory usage for how the default
+ limit is defined.
o The memory usage limiting can be effectively disabled by set-
ting limit to max. This isn't recommended. It's usually bet-
ter to use, for example, --memory=90%.
- The current limit can be seen near the bottom of the output of
+ The current limit can be seen near the bottom of the output of
the --long-help option.
-T threads, --threads=threads
Specify the maximum number of worker threads to use. The default
- is the number of available CPU cores. You can see the current
- value of threads near the end of the output of the --long-help
+ is the number of available CPU cores. You can see the current
+ value of threads near the end of the output of the --long-help
option.
- The actual number of worker threads can be less than threads if
- using more threads would exceed the memory usage limit. In
- addition to CPU-intensive worker threads, xz may use a few aux-
+ The actual number of worker threads can be less than threads if
+ using more threads would exceed the memory usage limit. In
+ addition to CPU-intensive worker threads, xz may use a few aux-
iliary threads, which don't use a lot of CPU time.
- Multithreaded compression and decompression are not implemented
+ Multithreaded compression and decompression are not implemented
yet, so this option has no effect for now.
Custom compressor filter chains
- A custom filter chain allows specifying the compression settings in
+ A custom filter chain allows specifying the compression settings in
detail instead of relying on the settings associated to the preset lev-
- els. When a custom filter chain is specified, the compression preset
+ els. When a custom filter chain is specified, the compression preset
level options (-0 ... -9 and --extreme) are silently ignored.
- A filter chain is comparable to piping on the UN*X command line. When
- compressing, the uncompressed input goes to the first filter, whose
- output goes to the next filter (if any). The output of the last filter
- gets written to the compressed file. The maximum number of filters in
- the chain is four, but typically a filter chain has only one or two
+ A filter chain is comparable to piping on the UN*X command line. When
+ compressing, the uncompressed input goes to the first filter, whose
+ output goes to the next filter (if any). The output of the last filter
+ gets written to the compressed file. The maximum number of filters in
+ the chain is four, but typically a filter chain has only one or two
filters.
- Many filters have limitations where they can be in the filter chain:
- some filters can work only as the last filter in the chain, some only
- as a non-last filter, and some work in any position in the chain.
+ Many filters have limitations where they can be in the filter chain:
+ some filters can work only as the last filter in the chain, some only
+ as a non-last filter, and some work in any position in the chain.
Depending on the filter, this limitation is either inherent to the fil-
ter design or exists to prevent security issues.
- A custom filter chain is specified by using one or more filter options
+ A custom filter chain is specified by using one or more filter options
in the order they are wanted in the filter chain. That is, the order of
- filter options is significant! When decoding raw streams (--for-
- mat=raw), the filter chain is specified in the same order as it was
+ filter options is significant! When decoding raw streams (--for-
+ mat=raw), the filter chain is specified in the same order as it was
specified when compressing.
- Filters take filter-specific options as a comma-separated list. Extra
+ Filters take filter-specific options as a comma-separated list. Extra
commas in options are ignored. Every option has a default value, so you
need to specify only those you want to change.
--lzma1[=options], --lzma2[=options]
- Add LZMA1 or LZMA2 filter to the filter chain. These filter can
+ Add LZMA1 or LZMA2 filter to the filter chain. These filter can
be used only as the last filter in the chain.
- LZMA1 is a legacy filter, which is supported almost solely due
- to the legacy .lzma file format, which supports only LZMA1.
- LZMA2 is an updated version of LZMA1 to fix some practical
- issues of LZMA1. The .xz format uses LZMA2, and doesn't support
- LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2
+ LZMA1 is a legacy filter, which is supported almost solely due
+ to the legacy .lzma file format, which supports only LZMA1.
+ LZMA2 is an updated version of LZMA1 to fix some practical
+ issues of LZMA1. The .xz format uses LZMA2, and doesn't support
+ LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2
are practically the same.
LZMA1 and LZMA2 share the same set of options:
preset=preset
- Reset all LZMA1 or LZMA2 options to preset. Preset con-
- sist of an integer, which may be followed by single-let-
- ter preset modifiers. The integer can be from 0 to 9,
- matching the command line options -0 ... -9. The only
- supported modifier is currently e, which matches
+ Reset all LZMA1 or LZMA2 options to preset. Preset con-
+ sist of an integer, which may be followed by single-let-
+ ter preset modifiers. The integer can be from 0 to 9,
+ matching the command line options -0 ... -9. The only
+ supported modifier is currently e, which matches
--extreme.
- The default preset is 6, from which the default values
+ The default preset is 6, from which the default values
for the rest of the LZMA1 or LZMA2 options are taken.
dict=size
Dictionary (history buffer) size indicates how many bytes
- of the recently processed uncompressed data is kept in
- memory. One method to reduce size of the uncompressed
- data is to store distance-length pairs, which indicate
- what data to repeat from the dictionary buffer. The big-
+ of the recently processed uncompressed data is kept in
+ memory. One method to reduce size of the uncompressed
+ data is to store distance-length pairs, which indicate
+ what data to repeat from the dictionary buffer. The big-
ger the dictionary, the better the compression ratio usu-
- ally is, but dictionaries bigger than the uncompressed
+ ally is, but dictionaries bigger than the uncompressed
data are waste of RAM.
- Typical dictionary size is from 64 KiB to 64 MiB. The
- minimum is 4 KiB. The maximum for compression is cur-
+ Typical dictionary size is from 64 KiB to 64 MiB. The
+ minimum is 4 KiB. The maximum for compression is cur-
rently 1.5 GiB. The decompressor already supports dictio-
naries up to one byte less than 4 GiB, which is the maxi-
mum for LZMA1 and LZMA2 stream formats.
- Dictionary size has the biggest effect on compression
- ratio. Dictionary size and match finder together deter-
- mine the memory usage of the LZMA1 or LZMA2 encoder. The
- same dictionary size is required for decompressing that
- was used when compressing, thus the memory usage of the
- decoder is determined by the dictionary size used when
+ Dictionary size has the biggest effect on compression
+ ratio. Dictionary size and match finder together deter-
+ mine the memory usage of the LZMA1 or LZMA2 encoder. The
+ same dictionary size is required for decompressing that
+ was used when compressing, thus the memory usage of the
+ decoder is determined by the dictionary size used when
compressing.
- lc=lc Specify the number of literal context bits. The minimum
- is 0 and the maximum is 4; the default is 3. In addi-
+ lc=lc Specify the number of literal context bits. The minimum
+ is 0 and the maximum is 4; the default is 3. In addi-
tion, the sum of lc and lp must not exceed 4.
- lp=lp Specify the number of literal position bits. The minimum
+ lp=lp Specify the number of literal position bits. The minimum
is 0 and the maximum is 4; the default is 0.
pb=pb Specify the number of position bits. The minimum is 0 and
the maximum is 4; the default is 2.
mode=mode
- Compression mode specifies the function used to analyze
- the data produced by the match finder. Supported modes
+ Compression mode specifies the function used to analyze
+ the data produced by the match finder. Supported modes
are fast and normal. The default is fast for presets 0-2
and normal for presets 3-9.
- mf=mf Match finder has a major effect on encoder speed, memory
- usage, and compression ratio. Usually Hash Chain match
- finders are faster than Binary Tree match finders. Hash
- Chains are usually used together with mode=fast and
+ mf=mf Match finder has a major effect on encoder speed, memory
+ usage, and compression ratio. Usually Hash Chain match
+ finders are faster than Binary Tree match finders. Hash
+ Chains are usually used together with mode=fast and
Binary Trees with mode=normal. The memory usage formulas
- are only rough estimates, which are closest to reality
+ are only rough estimates, which are closest to reality
when dict is a power of two.
hc3 Hash Chain with 2- and 3-byte hashing
@@ -509,25 +515,25 @@ OPTIONS
Memory usage: dict * 11.5
nice=nice
- Specify what is considered to be a nice length for a
- match. Once a match of at least nice bytes is found, the
+ Specify what is considered to be a nice length for a
+ match. Once a match of at least nice bytes is found, the
algorithm stops looking for possibly better matches.
- nice can be 2-273 bytes. Higher values tend to give bet-
- ter compression ratio at expense of speed. The default
+ nice can be 2-273 bytes. Higher values tend to give bet-
+ ter compression ratio at expense of speed. The default
depends on the preset level.
depth=depth
Specify the maximum search depth in the match finder. The
- default is the special value 0, which makes the compres-
+ default is the special value 0, which makes the compres-
sor determine a reasonable depth from mf and nice.
- Using very high values for depth can make the encoder
- extremely slow with carefully crafted files. Avoid set-
- ting the depth over 1000 unless you are prepared to
+ Using very high values for depth can make the encoder
+ extremely slow with carefully crafted files. Avoid set-
+ ting the depth over 1000 unless you are prepared to
interrupt the compression in case it is taking too long.
- When decoding raw streams (--format=raw), LZMA2 needs only the
+ When decoding raw streams (--format=raw), LZMA2 needs only the
value of dict. LZMA1 needs also lc, lp, and pb.
--x86[=options]
@@ -541,17 +547,17 @@ OPTIONS
--armthumb[=options]
--sparc[=options]
- Add a branch/call/jump (BCJ) filter to the filter chain. These
+ Add a branch/call/jump (BCJ) filter to the filter chain. These
filters can be used only as non-last filter in the filter chain.
- A BCJ filter converts relative addresses in the machine code to
+ A BCJ filter converts relative addresses in the machine code to
their absolute counterparts. This doesn't change the size of the
- data, but it increases redundancy, which allows e.g. LZMA2 to
+ data, but it increases redundancy, which allows e.g. LZMA2 to
get better compression ratio.
The BCJ filters are always reversible, so using a BCJ filter for
- wrong type of data doesn't cause any data loss. However, apply-
- ing a BCJ filter for wrong type of data is a bad idea, because
+ wrong type of data doesn't cause any data loss. However, apply-
+ ing a BCJ filter for wrong type of data is a bad idea, because
it tends to make the compression ratio worse.
Different instruction sets have have different alignment:
@@ -564,48 +570,48 @@ OPTIONS
IA-64 16 Big or little endian
SPARC 4 Big or little endian
- Since the BCJ-filtered data is usually compressed with LZMA2,
- the compression ratio may be improved slightly if the LZMA2
- options are set to match the alignment of the selected BCJ fil-
- ter. For example, with the IA-64 filter, it's good to set pb=4
- with LZMA2 (2^4=16). The x86 filter is an exception; it's usu-
- ally good to stick to LZMA2's default four-byte alignment when
+ Since the BCJ-filtered data is usually compressed with LZMA2,
+ the compression ratio may be improved slightly if the LZMA2
+ options are set to match the alignment of the selected BCJ fil-
+ ter. For example, with the IA-64 filter, it's good to set pb=4
+ with LZMA2 (2^4=16). The x86 filter is an exception; it's usu-
+ ally good to stick to LZMA2's default four-byte alignment when
compressing x86 executables.
All BCJ filters support the same options:
start=offset
- Specify the start offset that is used when converting
+ Specify the start offset that is used when converting
between relative and absolute addresses. The offset must
be a multiple of the alignment of the filter (see the ta-
- ble above). The default is zero. In practice, the
- default is good; specifying a custom offset is almost
+ ble above). The default is zero. In practice, the
+ default is good; specifying a custom offset is almost
never useful.
- Specifying a non-zero start offset is probably useful
- only if the executable has multiple sections, and there
- are many cross-section jumps or calls. Applying a BCJ
+ Specifying a non-zero start offset is probably useful
+ only if the executable has multiple sections, and there
+ are many cross-section jumps or calls. Applying a BCJ
filter separately for each section with proper start off-
set and then compressing the result as a single chunk may
- give some improvement in compression ratio compared to
- applying the BCJ filter with the default offset for the
+ give some improvement in compression ratio compared to
+ applying the BCJ filter with the default offset for the
whole executable.
--delta[=options]
- Add Delta filter to the filter chain. The Delta filter can be
+ Add Delta filter to the filter chain. The Delta filter can be
used only as non-last filter in the filter chain.
- Currently only simple byte-wise delta calculation is supported.
- It can be useful when compressing e.g. uncompressed bitmap
+ Currently only simple byte-wise delta calculation is supported.
+ It can be useful when compressing e.g. uncompressed bitmap
images or uncompressed PCM audio. However, special purpose algo-
rithms may give significantly better results than Delta + LZMA2.
- This is true especially with audio, which compresses faster and
+ This is true especially with audio, which compresses faster and
better e.g. with FLAC.
Supported options:
dist=distance
- Specify the distance of the delta calculation as bytes.
+ Specify the distance of the delta calculation as bytes.
distance must be 1-256. The default is 1.
For example, with dist=2 and eight-byte input A1 B1 A2 B3
@@ -613,23 +619,76 @@ OPTIONS
Other options
-q, --quiet
- Suppress warnings and notices. Specify this twice to suppress
- errors too. This option has no effect on the exit status. That
- is, even if a warning was suppressed, the exit status to indi-
+ Suppress warnings and notices. Specify this twice to suppress
+ errors too. This option has no effect on the exit status. That
+ is, even if a warning was suppressed, the exit status to indi-
cate a warning is still used.
-v, --verbose
- Be verbose. If standard error is connected to a terminal, xz
- will display a progress indicator. Specifying --verbose twice
- will give even more verbose output (useful mostly for debug-
+ Be verbose. If standard error is connected to a terminal, xz
+ will display a progress indicator. Specifying --verbose twice
+ will give even more verbose output (useful mostly for debug-
ging).
+ The progress indicator shows the following information:
+
+ o Completion percentage is shown if the size of the input file
+ is known. That is, percentage cannot be shown in pipes.
+
+ o Amount of compressed data produced (compressing) or consumed
+ (decompressing).
+
+ o Amount of uncompressed data consumed (compressing) or pro-
+ duced (decompressing).
+
+ o Compression ratio, which is calculated by dividing the amount
+ of compressed data processed so far by the amount of uncom-
+ pressed data processed so far.
+
+ o Compression or decompression speed. This is measured as the
+ amount of uncompressed data consumed (compression) or pro-
+ duced (decompression) per second. It is shown once a few sec-
+ onds have passed since xz started processing the file.
+
+ o Elapsed time or estimated time remaining. Elapsed time is
+ displayed in the format M:SS or H:MM:SS. The estimated
+ remaining time is displayed in a less precise format which
+ never has colons, for example, 2 min 30 s. The estimate can
+ be shown only when the size of the input file is known and a
+ couple of seconds have already passed since xz started pro-
+ cessing the file.
+
+ When standard error is not a terminal, --verbose will make xz
+ print the filename, compressed size, uncompressed size, compres-
+ sion ratio, speed, and elapsed time on a single line to standard
+ error after compressing or decompressing the file. If operating
+ took at least a few seconds, also the speed and elapsed time are
+ printed. If the operation didn't finish, for example due to user
+ interruption, also the completion percentage is printed if the
+ size of the input file is known.
+
-Q, --no-warn
Don't set the exit status to 2 even if a condition worth a warn-
ing was detected. This option doesn't affect the verbosity
level, thus both --quiet and --no-warn have to be used to not
display warnings and to not alter the exit status.
+ --robot
+ Print messages in a machine-parsable format. This is intended to
+ ease writing frontends that want to use xz instead of liblzma,
+ which may be the case with various scripts. The output with this
+ option enabled is meant to be stable across xz releases. Cur-
+ rently --robot is implemented only for --info-memory and --ver-
+ sion, but the idea is to make it usable for actual compression
+ and decompression too.
+
+ --info-memory
+ Display the current memory usage limit in human-readable format
+ on a single line, and exit successfully. To see how much RAM xz
+ thinks your system has, use --memory=100% --info-memory. To get
+ machine-parsable output (memory usage limit as bytes without
+ thousand separators), specify --robot before --info-memory.
+
-h, --help
Display a help message describing the most commonly used
options, and exit successfully.
@@ -639,7 +698,9 @@ OPTIONS
successfully
-V, --version
- Display the version number of xz and liblzma.
+ Display the version number of xz and liblzma in human readable
+ format. To get machine-parsable output, specify --robot before
+ --version.
EXIT STATUS
0 All is good.
@@ -731,7 +792,7 @@ LZMA UTILS COMPATIBILITY
LZMA Utils creates only .lzma files which have dictionary size of 2^n
(a power of 2), but accepts files with any dictionary size. liblzma
accepts only .lzma files which have dictionary size of 2^n or 2^n +
- 2^(n-1). This is to decrease false positives when autodetecting .lzma
+ 2^(n-1). This is to decrease false positives when detecting .lzma
files.
These limitations shouldn't be a problem in practice, since practically
@@ -754,24 +815,23 @@ NOTES
identical. This is because the encoder can be improved (faster or bet-
ter compression) without affecting the file format. The output can vary
even between different builds of the same XZ Utils version, if differ-
- ent build options are used or if the endianness of the hardware is dif-
- ferent for different builds.
+ ent build options are used.
- The above means that implementing --rsyncable to create rsyncable .xz
- files is not going to happen without freezing a part of the encoder
+ The above means that implementing --rsyncable to create rsyncable .xz
+ files is not going to happen without freezing a part of the encoder
implementation, which can then be used with --rsyncable.
Embedded .xz decompressors
Embedded .xz decompressor implementations like XZ Embedded don't neces-
- sarily support files created with check types other than none and
- crc32. Since the default is --check=crc64, you must use --check=none
+ sarily support files created with check types other than none and
+ crc32. Since the default is --check=crc64, you must use --check=none
or --check=crc32 when creating files for embedded systems.
- Outside embedded systems, all .xz format decompressors support all the
- check types, or at least are able to decompress the file without veri-
+ Outside embedded systems, all .xz format decompressors support all the
+ check types, or at least are able to decompress the file without veri-
fying the integrity check if the particular check is not supported.
- XZ Embedded supports BCJ filters, but only with the default start off-
+ XZ Embedded supports BCJ filters, but only with the default start off-
set.
SEE ALSO
@@ -783,4 +843,4 @@ SEE ALSO
-Tukaani 2009-08-27 XZ(1)
+Tukaani 2010-03-07 XZ(1)
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdec.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdec.txt
index ee2b820adad..bbd39f32dcb 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdec.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdec.txt
@@ -48,8 +48,8 @@ OPTIONS
o The limit can be specified as a percentage of physical RAM.
Example: --memory=70%
- o The limit can be reset back to its default value (currently
- 40 % of physical RAM) by setting it to 0.
+ o The limit can be reset back to its default value by setting
+ it to 0.
o The memory usage limiting can be effectively disabled by set-
ting limit to max. This isn't recommended. It's usually bet-
@@ -90,6 +90,8 @@ NOTES
SEE ALSO
xz(1)
+ XZ Embedded: <http://tukaani.org/xz/embedded.html>
-Tukaani 2009-06-04 XZDEC(1)
+
+Tukaani 2010-03-07 XZDEC(1)
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdiff.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdiff.txt
index f64568f2ae3..0e7b2d1ee32 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzdiff.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzdiff.txt
@@ -12,7 +12,7 @@ SYNOPSIS
lzdiff [diff_options] file1 [file2]
DESCRIPTION
- xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with
+ xzcmp and xzdiff invoke cmp(1) or diff(1) on files compressed with
xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed
directly to cmp or diff. If only one file is specified, then the files
compared are file1 (which must have a suffix of a supported compression
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzgrep.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzgrep.txt
index 7f665bce295..7f665bce295 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzgrep.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzgrep.txt
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzless.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzless.txt
new file mode 100644
index 00000000000..cacb752ee0b
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzless.txt
@@ -0,0 +1,39 @@
+XZLESS(1) XZ Utils XZLESS(1)
+
+
+
+NAME
+ xzless, lzless - view xz or lzma compressed (text) files
+
+SYNOPSIS
+ xzless [file...]
+ lzless [file...]
+
+DESCRIPTION
+ xzless is a filter that displays text from compressed files to a termi-
+ nal. It works on files compressed with xz(1) or lzma(1). If no files
+ are given, xzless reads from standard input.
+
+ xzless uses less(1) to present its output. Unlike xzmore, its choice
+ of pager cannot be altered by setting an environment variable. Com-
+ mands are based on both more(1) and vi(1) and allow back and forth
+ movement and searching. See the less(1) manual for more information.
+
+ The command named lzless is provided for backward compatibility with
+ LZMA Utils.
+
+ENVIRONMENT
+ LESSMETACHARS
+ A list of characters special to the shell. Set by xzless unless
+ it is already set in the environment.
+
+ LESSOPEN
+ Set to a command line to invoke the xz(1) decompressor for pre-
+ processing the input files to less(1).
+
+SEE ALSO
+ less(1), xz(1), xzmore(1), zless(1)
+
+
+
+Tukaani 2009-07-05 XZLESS(1)
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzmore.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzmore.txt
index 6f6cfe93eea..6f6cfe93eea 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzmore.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/man/txt/xzmore.txt
diff --git a/Build/source/extra/xz-4.999.9beta/doc/xz-file-format.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/xz-file-format.txt
index 4ed66506018..4ed66506018 100644
--- a/Build/source/extra/xz-4.999.9beta/doc/xz-file-format.txt
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/doc/xz-file-format.txt
diff --git a/Build/source/extra/xz-4.999.9beta/dos/Makefile b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/Makefile
index 0b8a088c183..0b8a088c183 100644
--- a/Build/source/extra/xz-4.999.9beta/dos/Makefile
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/Makefile
diff --git a/Build/source/extra/xz-4.999.9beta/dos/README b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/README
index 649c58c438d..649c58c438d 100644
--- a/Build/source/extra/xz-4.999.9beta/dos/README
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/README
diff --git a/Build/source/extra/xz-4.999.9beta/dos/config.h b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/config.h
index 9c9fff022f8..dfd6f797776 100644
--- a/Build/source/extra/xz-4.999.9beta/dos/config.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/dos/config.h
@@ -140,6 +140,9 @@
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
+/* Define to the URL of the home page of this package. */
+#define PACKAGE_HOMEPAGE "http://tukaani.org/xz/"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "XZ Utils"
diff --git a/Build/source/extra/xz-4.999.9beta/extra/7z2lzma/7z2lzma.bash b/Build/source/extra/xz-4.999.9beta-124-gb637/extra/7z2lzma/7z2lzma.bash
index 35ea4dae973..1777c7868f9 100755
--- a/Build/source/extra/xz-4.999.9beta/extra/7z2lzma/7z2lzma.bash
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/extra/7z2lzma/7z2lzma.bash
@@ -62,7 +62,7 @@ if printf '%s\n' "$INFO" | grep -q '^Block = 1'; then
exit 1
fi
-# Get copmressed, uncompressed, and dictionary size.
+# Get compressed, uncompressed, and dictionary size.
CSIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Packed Size = ([0-9]+$)|\1|p')
USIZE=$(printf '%s\n' "$INFO" | sed -rn 's|^Size = ([0-9]+$)|\1|p')
DICT=$(printf '%s\n' "$INFO" | sed -rn 's|^Method = LZMA:([0-9]+[bkm]?)$|\1|p')
diff --git a/Build/source/extra/xz-4.999.9beta/extra/scanlzma/scanlzma.c b/Build/source/extra/xz-4.999.9beta-124-gb637/extra/scanlzma/scanlzma.c
index 5c3b25be32a..5c3b25be32a 100644
--- a/Build/source/extra/xz-4.999.9beta/extra/scanlzma/scanlzma.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/extra/scanlzma/scanlzma.c
diff --git a/Build/source/extra/xz-4.999.9beta/lib/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.am
index 0dbd9c42b72..0dbd9c42b72 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.am
diff --git a/Build/source/extra/xz-4.999.9beta/lib/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.in
index 6434e2868eb..810111403c6 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -40,15 +40,18 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in getopt.c \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -130,6 +133,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -147,7 +151,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
diff --git a/Build/source/extra/xz-4.999.9beta/lib/getopt.c b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.c
index 1d14b245b2b..1d14b245b2b 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/getopt.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.c
diff --git a/Build/source/extra/xz-4.999.9beta/lib/getopt.in.h b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.in.h
index ea77e3d749d..ea77e3d749d 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/getopt.in.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt.in.h
diff --git a/Build/source/extra/xz-4.999.9beta/lib/getopt1.c b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt1.c
index da5d53300b1..da5d53300b1 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/getopt1.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt1.c
diff --git a/Build/source/extra/xz-4.999.9beta/lib/getopt_int.h b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt_int.h
index 401579fd289..401579fd289 100644
--- a/Build/source/extra/xz-4.999.9beta/lib/getopt_int.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/lib/getopt_int.h
diff --git a/Build/source/extra/xz-4.999.9beta/m4/acx_pthread.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/acx_pthread.m4
index d2b116945f9..d2b116945f9 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/acx_pthread.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/acx_pthread.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/getopt.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/getopt.m4
index cfbe40f254e..cfbe40f254e 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/getopt.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/getopt.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/gettext.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/gettext.m4
index 91c345e992f..91c345e992f 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/gettext.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/gettext.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/iconv.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/iconv.m4
index 654c4158943..654c4158943 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/iconv.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/iconv.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lib-ld.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-ld.m4
index 96c4e2c3396..96c4e2c3396 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/lib-ld.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-ld.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lib-link.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-link.m4
index f95b7ba88d5..f95b7ba88d5 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/lib-link.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-link.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lib-prefix.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-prefix.m4
index a8684e17e3a..a8684e17e3a 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/lib-prefix.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lib-prefix.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/libtool.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/libtool.m4
index 39ba996cb96..39ba996cb96 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/libtool.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/libtool.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/ltoptions.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltoptions.m4
index 34151a3ba62..34151a3ba62 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/ltoptions.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltoptions.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/ltsugar.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltsugar.m4
index 9000a057d31..9000a057d31 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/ltsugar.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltsugar.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/ltversion.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltversion.m4
index b8e154fe6e1..f3c53098024 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/ltversion.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/ltversion.m4
@@ -9,15 +9,15 @@
# Generated from ltversion.in.
-# serial 3012 ltversion.m4
+# serial 3017 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
+[macro_version='2.2.6b'
+macro_revision='1.3017'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lt~obsolete.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lt~obsolete.m4
index 637bb2066c4..637bb2066c4 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/lt~obsolete.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/lt~obsolete.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/nls.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/nls.m4
index 7967cc2f9ac..7967cc2f9ac 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/nls.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/nls.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/po.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/po.m4
index 00133ef36f8..00133ef36f8 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/po.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/po.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/posix-shell.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/posix-shell.m4
index 4c56193c157..4c56193c157 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/posix-shell.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/posix-shell.m4
diff --git a/Build/source/extra/xz-4.999.9beta/m4/progtest.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/progtest.m4
index a56365cd37f..a56365cd37f 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/progtest.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/progtest.m4
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_common.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_common.m4
new file mode 100644
index 00000000000..d942a25fa28
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_common.m4
@@ -0,0 +1,22 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_COMMON
+#
+# DESCRIPTION
+#
+# Common checks for tuklib.
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_COMMON], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])dnl
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_cpucores.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_cpucores.m4
new file mode 100644
index 00000000000..9e295c8f62a
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_cpucores.m4
@@ -0,0 +1,105 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_CPUCORES
+#
+# DESCRIPTION
+#
+# Check how to find out the number of available CPU cores in the system.
+# This information is used by tuklib_cpucores.c.
+#
+# Supported methods:
+# - sysctl(): BSDs, OS/2
+# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, Cygwin
+# - pstat_getdynamic(): HP-UX
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_CPUCORES], [
+AC_REQUIRE([TUKLIB_COMMON])
+
+# sys/param.h might be needed by sys/sysctl.h.
+AC_CHECK_HEADERS([sys/param.h])
+
+AC_CACHE_CHECK([how to detect the number of available CPU cores],
+ [tuklib_cv_cpucores_method], [
+
+# Look for sysctl() solution first, because on OS/2, both sysconf()
+# and sysctl() pass the tests in this file, but only sysctl()
+# actually works.
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+int
+main(void)
+{
+ int name[2] = { CTL_HW, HW_NCPU };
+ int cpus;
+ size_t cpus_size = sizeof(cpus);
+ sysctl(name, 2, &cpus, &cpus_size, NULL, 0);
+ return 0;
+}
+]])], [tuklib_cv_cpucores_method=sysctl], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+#ifdef _SC_NPROCESSORS_ONLN
+ /* Many systems using sysconf() */
+ i = sysconf(_SC_NPROCESSORS_ONLN);
+#else
+ /* IRIX */
+ i = sysconf(_SC_NPROC_ONLN);
+#endif
+ return 0;
+}
+]])], [tuklib_cv_cpucores_method=sysconf], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+int
+main(void)
+{
+ struct pst_dynamic pst;
+ pstat_getdynamic(&pst, sizeof(pst), 1, 0);
+ (void)pst.psd_proc_cnt;
+ return 0;
+}
+]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [
+
+ tuklib_cv_cpucores_method=unknown
+])])])])
+
+case $tuklib_cv_cpucores_method in
+ sysctl)
+ AC_DEFINE([TUKLIB_CPUCORES_SYSCTL], [1],
+ [Define to 1 if the number of available CPU cores
+ can be detected with sysctl().])
+ ;;
+ sysconf)
+ AC_DEFINE([TUKLIB_CPUCORES_SYSCONF], [1],
+ [Define to 1 if the number of available CPU cores
+ can be detected with sysconf(_SC_NPROCESSORS_ONLN)
+ or sysconf(_SC_NPROC_ONLN).])
+ ;;
+ pstat_getdynamic)
+ AC_DEFINE([TUKLIB_CPUCORES_PSTAT_GETDYNAMIC], [1],
+ [Define to 1 if the number of available CPU cores
+ can be detected with pstat_getdynamic().])
+ ;;
+esac
+])dnl
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_integer.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_integer.m4
new file mode 100644
index 00000000000..5fe66eef1c2
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_integer.m4
@@ -0,0 +1,74 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_INTEGER
+#
+# DESCRIPTION
+#
+# Checks for tuklib_integer.h:
+# - Endianness
+# - Does operating system provide byte swapping macros
+# - Does the hardware support fast unaligned access to 16-bit
+# and 32-bit integers
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_INTEGER], [
+AC_REQUIRE([TUKLIB_COMMON])
+AC_REQUIRE([AC_C_BIGENDIAN])
+AC_CHECK_HEADERS([byteswap.h sys/endian.h sys/byteorder.h], [break])
+
+# Even if we have byteswap.h, we may lack the specific macros/functions.
+if test x$ac_cv_header_byteswap_h = xyes ; then
+ m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
+ AC_MSG_CHECKING([if FUNC is available])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([
+#include <byteswap.h>
+int
+main(void)
+{
+ FUNC[](42);
+ return 0;
+}
+ ])], [
+ AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
+ [Define to 1 if] FUNC [is available.])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+
+ ])dnl
+fi
+
+AC_MSG_CHECKING([if unaligned memory access should be used])
+AC_ARG_ENABLE([unaligned-access], AC_HELP_STRING([--enable-unaligned-access],
+ [Enable if the system supports *fast* unaligned memory access
+ with 16-bit and 32-bit integers. By default, this is enabled
+ only on x86, x86_64, and big endian PowerPC.]),
+ [], [enable_unaligned_access=auto])
+if test "x$enable_unaligned_access" = xauto ; then
+ # TODO: There may be other architectures, on which unaligned access
+ # is OK.
+ case $host_cpu in
+ i?86|x86_64|powerpc|powerpc64)
+ enable_unaligned_access=yes
+ ;;
+ *)
+ enable_unaligned_access=no
+ ;;
+ esac
+fi
+if test "x$enable_unaligned_access" = xyes ; then
+ AC_DEFINE([TUKLIB_FAST_UNALIGNED_ACCESS], [1], [Define to 1 if
+ the system supports fast unaligned access to 16-bit and
+ 32-bit integers.])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+])dnl
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_physmem.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_physmem.m4
new file mode 100644
index 00000000000..124992565b8
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_physmem.m4
@@ -0,0 +1,211 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_PHYSMEM
+#
+# DESCRIPTION
+#
+# Check how to get the amount of physical memory.
+# This information is used in tuklib_physmem.c.
+#
+# Supported methods:
+#
+# - Windows (including Cygwin), OS/2, DJGPP (DOS), and OpenVMS have
+# operating-system specific functions.
+#
+# - AIX has _system_configuration.physmem.
+#
+# - sysconf() works on GNU/Linux and Solaris, and possibly on
+# some BSDs.
+#
+# - BSDs use sysctl().
+#
+# - Tru64 uses getsysinfo().
+#
+# - HP-UX uses pstat_getstatic().
+#
+# - IRIX has setinvent_r(), getinvent_r(), and endinvent_r().
+#
+# - sysinfo() works on Linux/dietlibc and probably on other Linux
+# systems whose libc may lack sysconf().
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_PHYSMEM], [
+AC_REQUIRE([TUKLIB_COMMON])
+
+# sys/param.h might be needed by sys/sysctl.h.
+AC_CHECK_HEADERS([sys/param.h])
+
+AC_CACHE_CHECK([how to detect the amount of physical memory],
+ [tuklib_cv_physmem_method], [
+
+# Maybe checking $host_os would be enough but this matches what
+# tuklib_physmem.c does.
+#
+# NOTE: IRIX has a compiler that doesn't error out with #error, so use
+# a non-compilable text instead of #error to generate an error.
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
+ || defined(__DJGPP__) || defined(__VMS)
+int main(void) { return 0; }
+#else
+compile error
+#endif
+]])], [tuklib_cv_physmem_method=special], [
+
+# Look for AIX-specific solution before sysconf(), because the test
+# for sysconf() will pass on AIX but won't actually work
+# (sysconf(_SC_PHYS_PAGES) compiles but always returns -1 on AIX).
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/systemcfg.h>
+
+int
+main(void)
+{
+ (void)_system_configuration.physmem;
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=aix], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+ i = sysconf(_SC_PAGESIZE);
+ i = sysconf(_SC_PHYS_PAGES);
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=sysconf], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+int
+main(void)
+{
+ int name[2] = { CTL_HW, HW_PHYSMEM };
+ unsigned long mem;
+ size_t mem_ptr_size = sizeof(mem);
+ sysctl(name, 2, &mem, &mem_ptr_size, NULL, 0);
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=sysctl], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/sysinfo.h>
+#include <machine/hal_sysinfo.h>
+
+int
+main(void)
+{
+ int memkb;
+ int start = 0;
+ getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start);
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=getsysinfo],[
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+int
+main(void)
+{
+ struct pst_static pst;
+ pstat_getstatic(&pst, sizeof(pst), 1, 0);
+ (void)pst.physical_memory;
+ (void)pst.page_size;
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=pstat_getstatic],[
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <invent.h>
+int
+main(void)
+{
+ inv_state_t *st = NULL;
+ setinvent_r(&st);
+ getinvent_r(st);
+ endinvent_r(st);
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=getinvent_r], [
+
+# This version of sysinfo() is Linux-specific. Some non-Linux systems have
+# different sysinfo() so we must check $host_os.
+case $host_os in
+ linux*)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/sysinfo.h>
+int
+main(void)
+{
+ struct sysinfo si;
+ sysinfo(&si);
+ return 0;
+}
+ ]])], [
+ tuklib_cv_physmem_method=sysinfo
+ ], [
+ tuklib_cv_physmem_method=unknown
+ ])
+ ;;
+ *)
+ tuklib_cv_physmem_method=unknown
+ ;;
+esac
+])])])])])])])])
+
+case $tuklib_cv_physmem_method in
+ aix)
+ AC_DEFINE([TUKLIB_PHYSMEM_AIX], [1],
+ [Define to 1 if the amount of physical memory
+ can be detected with _system_configuration.physmem.])
+ ;;
+ sysconf)
+ AC_DEFINE([TUKLIB_PHYSMEM_SYSCONF], [1],
+ [Define to 1 if the amount of physical memory can
+ be detected with sysconf(_SC_PAGESIZE) and
+ sysconf(_SC_PHYS_PAGES).])
+ ;;
+ sysctl)
+ AC_DEFINE([TUKLIB_PHYSMEM_SYSCTL], [1],
+ [Define to 1 if the amount of physical memory can
+ be detected with sysctl().])
+ ;;
+ getsysinfo)
+ AC_DEFINE([TUKLIB_PHYSMEM_GETSYSINFO], [1],
+ [Define to 1 if the amount of physical memory can
+ be detected with getsysinfo().])
+ ;;
+ pstat_getstatic)
+ AC_DEFINE([TUKLIB_PHYSMEM_PSTAT_GETSTATIC], [1],
+ [Define to 1 if the amount of physical memory can
+ be detected with pstat_getstatic().])
+ ;;
+ getinvent_r)
+ AC_DEFINE([TUKLIB_PHYSMEM_GETINVENT_R], [1],
+ [Define to 1 if the amount of physical memory
+ can be detected with getinvent_r().])
+ ;;
+ sysinfo)
+ AC_DEFINE([TUKLIB_PHYSMEM_SYSINFO], [1],
+ [Define to 1 if the amount of physical memory
+ can be detected with Linux sysinfo().])
+ ;;
+esac
+])dnl
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_progname.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_progname.m4
new file mode 100644
index 00000000000..f3e158bd486
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/tuklib_progname.m4
@@ -0,0 +1,25 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_PROGNAME
+#
+# DESCRIPTION
+#
+# Put argv[0] into a global variable progname. On DOS-like systems,
+# modify it so that it looks nice (no full path or .exe suffix).
+#
+# This .m4 file is needed allow this module to use glibc's
+# program_invocation_name.
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_PROGNAME], [
+AC_REQUIRE([TUKLIB_COMMON])
+AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+])dnl
diff --git a/Build/source/extra/xz-4.999.9beta/m4/visibility.m4 b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/visibility.m4
index 2ff6330aa42..2ff6330aa42 100644
--- a/Build/source/extra/xz-4.999.9beta/m4/visibility.m4
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/m4/visibility.m4
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/po/LINGUAS b/Build/source/extra/xz-4.999.9beta-124-gb637/po/LINGUAS
new file mode 100644
index 00000000000..841618abade
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/LINGUAS
@@ -0,0 +1 @@
+cs
diff --git a/Build/source/extra/xz-4.999.9beta/po/Makefile.in.in b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Makefile.in.in
index 5022b8b187f..5022b8b187f 100644
--- a/Build/source/extra/xz-4.999.9beta/po/Makefile.in.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Makefile.in.in
diff --git a/Build/source/extra/xz-4.999.9beta/po/Makevars b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Makevars
index dc19bc96313..dc19bc96313 100644
--- a/Build/source/extra/xz-4.999.9beta/po/Makevars
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Makevars
diff --git a/Build/source/extra/xz-4.999.9beta/po/POTFILES.in b/Build/source/extra/xz-4.999.9beta-124-gb637/po/POTFILES.in
index ee430c5c3ab..ee430c5c3ab 100644
--- a/Build/source/extra/xz-4.999.9beta/po/POTFILES.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/POTFILES.in
diff --git a/Build/source/extra/xz-4.999.9beta/po/Rules-quot b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Rules-quot
index 9c2a995e300..9c2a995e300 100644
--- a/Build/source/extra/xz-4.999.9beta/po/Rules-quot
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/Rules-quot
diff --git a/Build/source/extra/xz-4.999.9beta/po/boldquot.sed b/Build/source/extra/xz-4.999.9beta-124-gb637/po/boldquot.sed
index 4b937aa517b..4b937aa517b 100644
--- a/Build/source/extra/xz-4.999.9beta/po/boldquot.sed
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/boldquot.sed
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.gmo b/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.gmo
new file mode 100644
index 00000000000..93f488f864d
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.gmo
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.po b/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.po
new file mode 100644
index 00000000000..25827c715b4
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/cs.po
@@ -0,0 +1,620 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-utils\n"
+"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
+"POT-Creation-Date: 2010-05-26 09:00+0300\n"
+"PO-Revision-Date: 2009-12-05 13:51+0100\n"
+"Last-Translator: Marek Černocký <marek@manet.cz>\n"
+"Language-Team: Czech <diskuze@lists.l10n.cz>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
+"X-Poedit-Language: Czech\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: src/xz/args.c:310
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Neznámý typ formátu souboru"
+
+#: src/xz/args.c:333 src/xz/args.c:341
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Neznámý typ kontroly integrity"
+
+#: src/xz/args.c:359
+#, fuzzy
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "Můžete zadat pouze jeden soubor spolu s přepínači „--files“ nebo „--files0“"
+
+#: src/xz/args.c:417
+msgid "The environment variable XZ_OPT contains too many arguments"
+msgstr "Proměnná prostředí XZ_OPT obsahuje příliš mnoho argumentů"
+
+#: src/xz/coder.c:95
+msgid "Maximum number of filters is four"
+msgstr "Maximální počet filtrů je čtyři"
+
+#: src/xz/coder.c:108
+#, fuzzy
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "Omezení použitelné paměti (%<PRIu64> MiB) je příliš malé pro dané nastavení filtru (%<PRIu64> MiB)"
+
+#: src/xz/coder.c:129
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Použití přednastavení v režimu raw je nevhodné."
+
+#: src/xz/coder.c:131
+msgid "The exact options of the presets may vary between software versions."
+msgstr "Přesné volby u přednastavení se mohou lišit mezi různými verzemi softwaru."
+
+#: src/xz/coder.c:159
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Formát .lzma podporuje pouze filtr LZMA1"
+
+#: src/xz/coder.c:167
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 nelze použít s formátem .xz"
+
+#: src/xz/coder.c:184
+#, fuzzy
+msgid "Unsupported filter chain or filter options"
+msgstr "Nepodporovaná volba"
+
+#: src/xz/coder.c:245
+#, c-format
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
+msgstr ""
+
+#. TRANSLATORS: When compression or decompression finishes,
+#. and xz is going to remove the source file, xz first checks
+#. if the source file still exists, and if it does, does its
+#. device and inode numbers match what xz saw when it opened
+#. the source file. If these checks fail, this message is
+#. shown, %s being the filename, and the file is not deleted.
+#. The check for device and inode numbers is there, because
+#. it is possible that the user has put a new file in place
+#. of the original file, and in that case it obviously
+#. shouldn't be removed.
+#: src/xz/file_io.c:137
+#, fuzzy, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s: Vypadá to, že soubor byl přesunut, neodstraní se"
+
+#: src/xz/file_io.c:144 src/xz/file_io.c:589
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Nelze odstranit: %s"
+
+#: src/xz/file_io.c:169
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Nelze nastavit vlastníka souboru: %s"
+
+#: src/xz/file_io.c:175
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Nelze nastavit skupinu souboru: %s"
+
+#: src/xz/file_io.c:194
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Nelze nastavit oprávnění souboru: %s"
+
+#: src/xz/file_io.c:337 src/xz/file_io.c:419
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Jedná se o symbolický odkaz, vynechává se"
+
+#: src/xz/file_io.c:454
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Jedná se o složku, vynechává se"
+
+#: src/xz/file_io.c:461
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Nejedná se o běžný soubor, vynechává se"
+
+#: src/xz/file_io.c:478
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s: Soubor má nastavený bit setuid nebo setgid, vynechává se"
+
+#: src/xz/file_io.c:485
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Soubor má nastavený bit sticky, vynechává se"
+
+#: src/xz/file_io.c:492
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s: Vstupní soubor má více než jeden pevný odkaz, vynechává se"
+
+#: src/xz/file_io.c:713
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "Chyba při obnovení příznaku O_APPEND na standardní výstup: %s"
+
+#: src/xz/file_io.c:725
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Selhalo zavření souboru: %s"
+
+#: src/xz/file_io.c:761 src/xz/file_io.c:945
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s: Selhalo nastavení pozice při pokusu o vytvoření záložního souboru: %s"
+
+#: src/xz/file_io.c:820
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Chyba čtení: %s"
+
+#: src/xz/file_io.c:843
+#, fuzzy, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Chyba při čtení názvů souborů: %s"
+
+#: src/xz/file_io.c:853
+#, fuzzy, c-format
+msgid "%s: Unexpected end of file"
+msgstr "Neočekávaný konec vstupu"
+
+#: src/xz/file_io.c:903
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Chyba zápisu: %s"
+
+#: src/xz/main.c:76
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Chyba při čtení názvů souborů: %s"
+
+#: src/xz/main.c:83
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: Neočekávaný konec vstupu při čtení názvů souborů"
+
+#: src/xz/main.c:107
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr "%s: Byl nalezen nulový znak při čtení názvů souborů; nechtěli jste náhodou použít „--files0“ místo „--files“?"
+
+#: src/xz/main.c:157
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Komprimace a dekomprimace s přepínačem --robot není zatím podporovaná."
+
+#: src/xz/main.c:214
+msgid "Cannot read data from standard input when reading filenames from standard input"
+msgstr "Ze standardního vstupu nelze číst data, když se ze standardního vstupu načítají názvy souborů"
+
+#: src/xz/message.c:788 src/xz/message.c:832
+msgid "Internal error (bug)"
+msgstr "Interní chyba"
+
+#: src/xz/message.c:795
+msgid "Cannot establish signal handlers"
+msgstr "Nelze ustanovit ovladač signálu"
+
+#: src/xz/message.c:804
+msgid "No integrity check; not verifying file integrity"
+msgstr "Žádná kontrola integrity; integrita souboru se nebude ověřovat"
+
+#: src/xz/message.c:807
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Nepodporovaný typ kontroly integrity; integrita souboru se nebude ověřovat"
+
+#: src/xz/message.c:814
+msgid "Memory usage limit reached"
+msgstr "Dosaženo omezení použitelné paměti"
+
+#: src/xz/message.c:817
+msgid "File format not recognized"
+msgstr "Formát souboru nebyl rozpoznán"
+
+#: src/xz/message.c:820
+msgid "Unsupported options"
+msgstr "Nepodporovaná volba"
+
+#: src/xz/message.c:823
+msgid "Compressed data is corrupt"
+msgstr "Komprimovaná data jsou poškozená"
+
+#: src/xz/message.c:826
+msgid "Unexpected end of input"
+msgstr "Neočekávaný konec vstupu"
+
+#: src/xz/message.c:872
+#, fuzzy, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "Je vyžadováno %s MiB (%s B) paměti pro každé vlákno, limit je %s MiB (%s B)"
+
+#: src/xz/message.c:1038
+#, fuzzy, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Omezující filtr:"
+
+#: src/xz/message.c:1049
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Zkuste „%s --help“ pro více informací"
+
+#: src/xz/message.c:1061
+#, c-format
+msgid "%s MiB (%s bytes)\n"
+msgstr "%s MiB (%s bajtů)\n"
+
+#: src/xz/message.c:1090
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Použití: %s [PŘEPÍNAČ]... [SOUBOR]...\n"
+"Komprimuje nebo dekomprimuje SOUBORy ve formátu xz.\n"
+"\n"
+
+#: src/xz/message.c:1094
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké přepínače.\n"
+
+#: src/xz/message.c:1098
+msgid " Operation mode:\n"
+msgstr "Operační režim:\n"
+
+#: src/xz/message.c:1101
+msgid ""
+" -z, --compress force compression\n"
+" -d, --decompress force decompression\n"
+" -t, --test test compressed file integrity\n"
+" -l, --list list information about files"
+msgstr ""
+" -z, --compress provést komprimaci\n"
+" -d, --decompress provést dekomprimaci\n"
+" -t, --test testovat integritu komprimovaného souboru\n"
+" -l, --list vypsat informace o souborech"
+
+#: src/xz/message.c:1107
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+"Modifikátory operací:\n"
+
+#: src/xz/message.c:1110
+msgid ""
+" -k, --keep keep (don't delete) input files\n"
+" -f, --force force overwrite of output file and (de)compress links\n"
+" -c, --stdout write to standard output and don't delete input files"
+msgstr ""
+" -k, --keep zachovat (nemazat) vstupní soubory\n"
+" -f, --force vynutit přepis výstupního souboru a de/komprimovat odkazy\n"
+" -c, --stdout zapisovat na standardní výstup a nemazat vstupní soubory"
+
+#: src/xz/message.c:1116
+msgid ""
+" --no-sparse do not create sparse files when decompressing\n"
+" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
+" --files=[FILE] read filenames to process from FILE; if FILE is\n"
+" omitted, filenames are read from the standard input;\n"
+" filenames must be terminated with the newline character\n"
+" --files0=[FILE] like --files but use the null character as terminator"
+msgstr ""
+" --no-sparse nevytvářet při dekomprimaci záložní soubory\n"
+" -S, --suffix=.SUF použít u komprimovaných souborů příponu „.SUF“\n"
+" --files=[SOUBOR] číst názvy souborů, které se mají zpracovat, ze SOUBORu;\n"
+" pokud není SOUBOR zadán, čte se ze standardního vstupu;\n"
+" názvy souborů musí být zakončeny znakem nového řádku\n"
+" --files0=[SOUBOR] stejné jako --files, ale použít k zakončování nulový znak"
+
+#: src/xz/message.c:1124
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+"Základní přepínače pro formát souboru a komprimaci:\n"
+
+#: src/xz/message.c:1126
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', and `raw'\n"
+" -C, --check=CHECK integrity check type: `crc32', `crc64' (default),\n"
+" `sha256', or `none' (use with caution)"
+msgstr ""
+" -F, --format=FORMÁT formát souboru k zakódování nebo dekódování; možné\n"
+" hodnoty jsou „auto“ (výchozí), „xz“, „lzma“ a „raw“\n"
+" -C, --check=KONTROLA typ kontroly integrity: „crc32“, „crc64“ (výchozí),\n"
+" „sha256“ nebo „none“ (používejte s rozmyslem)"
+
+#: src/xz/message.c:1133
+msgid ""
+" -0 .. -9 compression preset; 0-2 fast compression, 3-5 good\n"
+" compression, 6-9 excellent compression; default is 6"
+msgstr ""
+" -0 .. -9 přednastavení komprimace; 0-2 rychlá komprimace, 3-5\n"
+" dobrá komprimace, 6-9 skvělá komprimace; výchozí je 6"
+
+#: src/xz/message.c:1137
+msgid ""
+" -e, --extreme use more CPU time when encoding to increase compression\n"
+" ratio without increasing memory usage of the decoder"
+msgstr ""
+" -e, --extreme využít více procesorového času pro kódování, čímž se\n"
+" zvýší kompresní poměr bez zvýšení paměti použité kodérem"
+
+#: src/xz/message.c:1142
+#, no-c-format
+msgid ""
+" -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 indicates\n"
+" the default setting, which is 40 % of total RAM"
+msgstr ""
+" -M, --memory=POČ použít zhruba POČ bajtů paměti jako maximum; 0 znamená\n"
+" výchozí nastavení, což je 40% celkového množství paměti"
+
+#: src/xz/message.c:1147
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+"Vlastní omezující filtr pro komprimaci (alternativa k použití přednastavených):"
+
+#: src/xz/message.c:1152
+msgid ""
+"\n"
+" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
+" --lzma2[=OPTS] more of the following options (valid values; default):\n"
+" preset=NUM reset options to preset number NUM (0-9)\n"
+" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
+" lc=NUM number of literal context bits (0-4; 3)\n"
+" lp=NUM number of literal position bits (0-4; 0)\n"
+" pb=NUM number of position bits (0-4; 2)\n"
+" mode=MODE compression mode (fast, normal; normal)\n"
+" nice=NUM nice length of a match (2-273; 64)\n"
+" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=NUM maximum search depth; 0=automatic (default)"
+msgstr ""
+"\n"
+" --lzma1[=VOLBY] LZMA1 nebo LZMA2; VOLBY je čárkou oddělovaný seznam žádné\n"
+" --lzma2[=VOLBY] nebo více následujících voleb (platné hodnoty; výchozí):\n"
+" preset=POČ obnovení voleb na přednastavený POČet (0-9)\n"
+" dict=POČ velikost slovníku (4 KiB - 1536 MiB; 8 MiB)\n"
+" lc=POČ počet kontextových bitů literálu (0-4; 3)\n"
+" lp=POČ počet pozičních bitů literálu (0-4; 0)\n"
+" pb=POČ počet pozičních bitů (0-4; 2)\n"
+" mode=REŽIM režim komprimace (fast, normal; normal)\n"
+" nice=POČ příznivá délka shody (2-273; 64)\n"
+" mf=NÁZEV vyhledávač shod (hc3, hc4, bt2, bt3, bt4;\n"
+" bt4)\n"
+" depth=POČ maximální hloubka prohledávání;\n"
+" 0=automaticky (výchozí)"
+
+#: src/xz/message.c:1167
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA64 (Itanium) BCJ filter\n"
+" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=VOLBY] Filtr x86 BCJ\n"
+" --powerpc[=VOLBY] Filtr PowerPC BCJ (pouze big endian)\n"
+" --ia64[=VOLBY] Filtr IA64 (Itanium) BCJ\n"
+" --arm[=VOLBY] Filtr ARM BCJ (pouze little endian)\n"
+" --armthumb[=VOLBY] Filtr ARM-Thumb BCJ (pouze little endian)\n"
+" --sparc[=VOLBY] Filtr SPARC BCJ\n"
+" Platné volby pro všechny filtry BCJ:\n"
+" start=POČ počáteční posun pro převody (výchozí=0)"
+
+#: src/xz/message.c:1179
+msgid ""
+"\n"
+" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
+" dist=NUM distance between bytes being subtracted\n"
+" from each other (1-256; 1)"
+msgstr ""
+"\n"
+" --delta[=VOLBY] Filtr Delta; platné VOLBY (platné hodnoty; výchozí):\n"
+" dist=POČ vzdálenost mezi bajty, které jsou odečítány\n"
+" jeden od druhého (1-256; 1)"
+
+#: src/xz/message.c:1187
+msgid ""
+"\n"
+" --subblock[=OPTS] Subblock filter; valid OPTS (valid values; default):\n"
+" size=NUM number of bytes of data per subblock\n"
+" (1 - 256Mi; 4Ki)\n"
+" rle=NUM run-length encoder chunk size (0-256; 0)"
+msgstr ""
+"\n"
+" --subblock[=VOLBY] Subblokový filtr; platné VOLBY (platné hodnoty; výchozí):\n"
+" size=POČ počet bajtů dat na subblok\n"
+" (1 - 256 Mi; 4 Ki)\n"
+" rle=POČ velikost dávky pro kodér run-length (0-256; 0)"
+
+#: src/xz/message.c:1196
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Ostatní přepínače:\n"
+
+#: src/xz/message.c:1199
+msgid ""
+" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
+" -v, --verbose be verbose; specify twice for even more verbose"
+msgstr ""
+" -q, --quiet potlačit varování; zadáním dvakrát, potlačíte i chyby\n"
+" -v, --verbose podrobnější zprávy; zadáním dvakrát, budou ještě\n"
+" podrobnější"
+
+#: src/xz/message.c:1204
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn způsobí, že varování neovlivní stav ukončení"
+
+#: src/xz/message.c:1206
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot použít strojově analyzovatelné zprávy (užitečné pro skripty)"
+
+#: src/xz/message.c:1209
+msgid " --info-memory display the memory usage limit and exit"
+msgstr " --info-memory zobrazit omezení využití paměti a skončit"
+
+#: src/xz/message.c:1211
+msgid ""
+" -h, --help display the short help (lists only the basic options)\n"
+" -H, --long-help display this long help and exit"
+msgstr ""
+" -h, --help zobrazit krátkou nápovědu (vypíše jen základní přepínače)\n"
+" -H, --long-help zobrazit tuto úplnou nápovědu a skončit"
+
+#: src/xz/message.c:1215
+msgid ""
+" -h, --help display this short help and exit\n"
+" -H, --long-help display the long help (lists also the advanced options)"
+msgstr ""
+" -h, --help zobrazit tuto zkrácenou nápovědu a skončit\n"
+" -H, --long-help zobrazit úplnou nápovědu (vypíše i pokročilé přepínače)"
+
+#: src/xz/message.c:1220
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version zobrazit číslo verze a skončit"
+
+#: src/xz/message.c:1222
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Pokud SOUBOR není zadán nebo pokud je -, bude se číst ze standardního vstupu.\n"
+
+#: src/xz/message.c:1226
+#, c-format
+msgid ""
+"On this system and configuration, this program will use a maximum of roughly\n"
+"%s MiB RAM and "
+msgstr ""
+"Na tomto systému a s tímto nastavením použije tento program maximum ze zhruba\n"
+"%s MiB RAM a "
+
+#: src/xz/message.c:1228
+msgid ""
+"one thread.\n"
+"\n"
+msgstr ""
+"jedno vlákno.\n"
+"\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1237
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Chyby hlaste na <%s> (v angličtině nebo finštině).\n"
+
+#: src/xz/message.c:1239
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Domovská stránka %s: <%s>\n"
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Volby musí být páry „název=hodnota“ oddělené čárkami"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Neplatný název volby"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Neplatná hodnota volby"
+
+#: src/xz/options.c:308
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nepodporované přednastavení LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:426
+msgid "The sum of lc and lp must be at maximum of 4"
+msgstr "Součet lc a lp musí být maximálně 4"
+
+#: src/xz/options.c:431
+#, c-format
+msgid "The selected match finder requires at least nice=%<PRIu32>"
+msgstr "Vybraný vyhledávač shod vyžaduje minimálně nice=%<PRIu32>"
+
+#: src/xz/suffix.c:79 src/xz/suffix.c:164
+#, c-format
+msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: S --format=raw je vyžadováno --sufix=.SUF, vyjma zápisu do standardního výstupu"
+
+#: src/xz/suffix.c:99
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Název souboru má neznámou příponu, vynechává se"
+
+#: src/xz/suffix.c:154
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Soubor již má příponu „%s“, vynechává se"
+
+#: src/xz/suffix.c:205
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Neplatná přípona názvu souboru"
+
+#: src/xz/util.c:54
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Hodnota není nezáporné desítkové číslo"
+
+#: src/xz/util.c:90
+#, fuzzy, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Neplatná přípona názvu souboru"
+
+#: src/xz/util.c:92
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr ""
+
+#: src/xz/util.c:109
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Hodnota volby „%s“ musí být v rozsahu [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:283
+msgid "Empty filename, skipping"
+msgstr "Prázdný název souboru, vynechává se"
+
+#: src/xz/util.c:297
+#, fuzzy
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Komprimovaná data se nečtou z terminálu, vyjma použití volby „--force“."
+
+#: src/xz/util.c:310
+#, fuzzy
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Komprimovaná data se nezapisují do terminálu, vyjma použití volby „--force“."
+
+#~ msgid "Limit was %s MiB, but %s MiB would have been needed"
+#~ msgstr "Limit byl %s MiB, ale bylo by zapotřebí %s MiB"
+
+#~ msgid "%s: Invalid multiplier suffix. Valid suffixes:"
+#~ msgstr "%s: Neplatná přípona. Platné přípony jsou:"
diff --git a/Build/source/extra/xz-4.999.9beta/po/en@boldquot.header b/Build/source/extra/xz-4.999.9beta-124-gb637/po/en@boldquot.header
index fedb6a06d12..fedb6a06d12 100644
--- a/Build/source/extra/xz-4.999.9beta/po/en@boldquot.header
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/en@boldquot.header
diff --git a/Build/source/extra/xz-4.999.9beta/po/en@quot.header b/Build/source/extra/xz-4.999.9beta-124-gb637/po/en@quot.header
index a9647fc35c3..a9647fc35c3 100644
--- a/Build/source/extra/xz-4.999.9beta/po/en@quot.header
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/en@quot.header
diff --git a/Build/source/extra/xz-4.999.9beta/po/insert-header.sin b/Build/source/extra/xz-4.999.9beta-124-gb637/po/insert-header.sin
index b26de01f6c8..b26de01f6c8 100644
--- a/Build/source/extra/xz-4.999.9beta/po/insert-header.sin
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/insert-header.sin
diff --git a/Build/source/extra/xz-4.999.9beta/po/quot.sed b/Build/source/extra/xz-4.999.9beta-124-gb637/po/quot.sed
index 0122c46318d..0122c46318d 100644
--- a/Build/source/extra/xz-4.999.9beta/po/quot.sed
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/quot.sed
diff --git a/Build/source/extra/xz-4.999.9beta/po/remove-potcdate.sin b/Build/source/extra/xz-4.999.9beta-124-gb637/po/remove-potcdate.sin
index 2436c49e786..2436c49e786 100644
--- a/Build/source/extra/xz-4.999.9beta/po/remove-potcdate.sin
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/remove-potcdate.sin
diff --git a/Build/source/extra/xz-4.999.9beta/po/stamp-po b/Build/source/extra/xz-4.999.9beta-124-gb637/po/stamp-po
index 9788f70238c..9788f70238c 100644
--- a/Build/source/extra/xz-4.999.9beta/po/stamp-po
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/stamp-po
diff --git a/Build/source/extra/xz-4.999.9beta/po/xz.pot b/Build/source/extra/xz-4.999.9beta-124-gb637/po/xz.pot
index dc6e320178d..6256cfafec7 100644
--- a/Build/source/extra/xz-4.999.9beta/po/xz.pot
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/po/xz.pot
@@ -7,29 +7,30 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
-"POT-Creation-Date: 2009-08-27 18:37+0300\n"
+"POT-Creation-Date: 2010-05-26 09:00+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/xz/args.c:289
+#: src/xz/args.c:310
#, c-format
msgid "%s: Unknown file format type"
msgstr ""
-#: src/xz/args.c:312 src/xz/args.c:320
+#: src/xz/args.c:333 src/xz/args.c:341
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr ""
-#: src/xz/args.c:334
-msgid "Only one file can be specified with `--files'or `--files0'."
+#: src/xz/args.c:359
+msgid "Only one file can be specified with `--files' or `--files0'."
msgstr ""
-#: src/xz/args.c:392
+#: src/xz/args.c:417
msgid "The environment variable XZ_OPT contains too many arguments"
msgstr ""
@@ -38,180 +39,214 @@ msgid "Maximum number of filters is four"
msgstr ""
#: src/xz/coder.c:108
-#, c-format
-msgid "Memory usage limit (%<PRIu64> MiB) is too small for the given filter setup (%<PRIu64> MiB)"
+msgid "Memory usage limit is too low for the given filter setup."
msgstr ""
-#: src/xz/coder.c:128
+#: src/xz/coder.c:129
msgid "Using a preset in raw mode is discouraged."
msgstr ""
-#: src/xz/coder.c:130
+#: src/xz/coder.c:131
msgid "The exact options of the presets may vary between software versions."
msgstr ""
-#: src/xz/coder.c:158
+#: src/xz/coder.c:159
msgid "The .lzma format supports only the LZMA1 filter"
msgstr ""
-#: src/xz/coder.c:166
+#: src/xz/coder.c:167
msgid "LZMA1 cannot be used with the .xz format"
msgstr ""
-#: src/xz/coder.c:186
-#, c-format
-msgid "%s MiB (%s B) of memory is required per thread, limit is %s MiB (%s B)"
+#: src/xz/coder.c:184
+msgid "Unsupported filter chain or filter options"
msgstr ""
-#: src/xz/coder.c:553
+#: src/xz/coder.c:245
#, c-format
-msgid "Limit was %s MiB, but %s MiB would have been needed"
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr ""
-#: src/xz/file_io.c:86
+#. TRANSLATORS: When compression or decompression finishes,
+#. and xz is going to remove the source file, xz first checks
+#. if the source file still exists, and if it does, does its
+#. device and inode numbers match what xz saw when it opened
+#. the source file. If these checks fail, this message is
+#. shown, %s being the filename, and the file is not deleted.
+#. The check for device and inode numbers is there, because
+#. it is possible that the user has put a new file in place
+#. of the original file, and in that case it obviously
+#. shouldn't be removed.
+#: src/xz/file_io.c:137
#, c-format
-msgid "%s: File seems to be moved, not removing"
+msgid "%s: File seems to have been moved, not removing"
msgstr ""
-#: src/xz/file_io.c:93
+#: src/xz/file_io.c:144 src/xz/file_io.c:589
#, c-format
msgid "%s: Cannot remove: %s"
msgstr ""
-#: src/xz/file_io.c:118
+#: src/xz/file_io.c:169
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr ""
-#: src/xz/file_io.c:124
+#: src/xz/file_io.c:175
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr ""
-#: src/xz/file_io.c:143
+#: src/xz/file_io.c:194
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr ""
-#: src/xz/file_io.c:281 src/xz/file_io.c:360
+#: src/xz/file_io.c:337 src/xz/file_io.c:419
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr ""
-#: src/xz/file_io.c:395
+#: src/xz/file_io.c:454
#, c-format
msgid "%s: Is a directory, skipping"
msgstr ""
-#: src/xz/file_io.c:402
+#: src/xz/file_io.c:461
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr ""
-#: src/xz/file_io.c:419
+#: src/xz/file_io.c:478
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr ""
-#: src/xz/file_io.c:426
+#: src/xz/file_io.c:485
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr ""
-#: src/xz/file_io.c:433
+#: src/xz/file_io.c:492
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr ""
-#: src/xz/file_io.c:555
+#: src/xz/file_io.c:713
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr ""
+
+#: src/xz/file_io.c:725
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr ""
-#: src/xz/file_io.c:663
+#: src/xz/file_io.c:761 src/xz/file_io.c:945
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr ""
+
+#: src/xz/file_io.c:820
#, c-format
msgid "%s: Read error: %s"
msgstr ""
-#: src/xz/file_io.c:708
+#: src/xz/file_io.c:843
#, c-format
-msgid "%s: Write error: %s"
+msgid "%s: Error seeking the file: %s"
msgstr ""
-#: src/xz/main.c:57
-msgid "Writing to standard output failed"
+#: src/xz/file_io.c:853
+#, c-format
+msgid "%s: Unexpected end of file"
msgstr ""
-#: src/xz/main.c:60
-msgid "Unknown error"
+#: src/xz/file_io.c:903
+#, c-format
+msgid "%s: Write error: %s"
msgstr ""
-#: src/xz/main.c:117
+#: src/xz/main.c:76
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr ""
-#: src/xz/main.c:124
+#: src/xz/main.c:83
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr ""
-#: src/xz/main.c:148
+#: src/xz/main.c:107
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr ""
-#: src/xz/main.c:272
+#: src/xz/main.c:157
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr ""
+
+#: src/xz/main.c:214
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr ""
-#: src/xz/message.c:840 src/xz/message.c:884
+#: src/xz/message.c:788 src/xz/message.c:832
msgid "Internal error (bug)"
msgstr ""
-#: src/xz/message.c:847
+#: src/xz/message.c:795
msgid "Cannot establish signal handlers"
msgstr ""
-#: src/xz/message.c:856
+#: src/xz/message.c:804
msgid "No integrity check; not verifying file integrity"
msgstr ""
-#: src/xz/message.c:859
+#: src/xz/message.c:807
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr ""
-#: src/xz/message.c:866
+#: src/xz/message.c:814
msgid "Memory usage limit reached"
msgstr ""
-#: src/xz/message.c:869
+#: src/xz/message.c:817
msgid "File format not recognized"
msgstr ""
-#: src/xz/message.c:872
+#: src/xz/message.c:820
msgid "Unsupported options"
msgstr ""
-#: src/xz/message.c:875
+#: src/xz/message.c:823
msgid "Compressed data is corrupt"
msgstr ""
-#: src/xz/message.c:878
+#: src/xz/message.c:826
msgid "Unexpected end of input"
msgstr ""
-#: src/xz/message.c:897
+#: src/xz/message.c:872
#, c-format
-msgid "%s: Filter chain:"
+msgid "%s MiB of memory is required. The limit is %s."
msgstr ""
-#: src/xz/message.c:1008
+#: src/xz/message.c:1038
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr ""
+
+#: src/xz/message.c:1049
#, c-format
msgid "Try `%s --help' for more information."
msgstr ""
-#: src/xz/message.c:1027
+#: src/xz/message.c:1061
+#, c-format
+msgid "%s MiB (%s bytes)\n"
+msgstr ""
+
+#: src/xz/message.c:1090
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@@ -219,15 +254,15 @@ msgid ""
"\n"
msgstr ""
-#: src/xz/message.c:1031
+#: src/xz/message.c:1094
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
-#: src/xz/message.c:1035
+#: src/xz/message.c:1098
msgid " Operation mode:\n"
msgstr ""
-#: src/xz/message.c:1038
+#: src/xz/message.c:1101
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@@ -235,21 +270,22 @@ msgid ""
" -l, --list list information about files"
msgstr ""
-#: src/xz/message.c:1044
+#: src/xz/message.c:1107
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
-#: src/xz/message.c:1047
+#: src/xz/message.c:1110
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
-#: src/xz/message.c:1053
+#: src/xz/message.c:1116
msgid ""
+" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files=[FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
@@ -257,46 +293,46 @@ msgid ""
" --files0=[FILE] like --files but use the null character as terminator"
msgstr ""
-#: src/xz/message.c:1060
+#: src/xz/message.c:1124
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
-#: src/xz/message.c:1062
+#: src/xz/message.c:1126
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `crc32', `crc64' (default),\n"
-" or `sha256'"
+" `sha256', or `none' (use with caution)"
msgstr ""
-#: src/xz/message.c:1069
+#: src/xz/message.c:1133
msgid ""
" -0 .. -9 compression preset; 0-2 fast compression, 3-5 good\n"
" compression, 6-9 excellent compression; default is 6"
msgstr ""
-#: src/xz/message.c:1073
+#: src/xz/message.c:1137
msgid ""
" -e, --extreme use more CPU time when encoding to increase compression\n"
" ratio without increasing memory usage of the decoder"
msgstr ""
-#: src/xz/message.c:1078
+#: src/xz/message.c:1142
+#, no-c-format
msgid ""
" -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 indicates\n"
-" the default setting, which depends on the operation mode\n"
-" and the amount of physical memory (RAM)"
+" the default setting, which is 40 % of total RAM"
msgstr ""
-#: src/xz/message.c:1084
+#: src/xz/message.c:1147
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
-#: src/xz/message.c:1089
+#: src/xz/message.c:1152
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@@ -312,7 +348,7 @@ msgid ""
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
-#: src/xz/message.c:1104
+#: src/xz/message.c:1167
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter\n"
@@ -325,7 +361,7 @@ msgid ""
" start=NUM start offset for conversions (default=0)"
msgstr ""
-#: src/xz/message.c:1116
+#: src/xz/message.c:1179
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@@ -333,7 +369,7 @@ msgid ""
" from each other (1-256; 1)"
msgstr ""
-#: src/xz/message.c:1124
+#: src/xz/message.c:1187
msgid ""
"\n"
" --subblock[=OPTS] Subblock filter; valid OPTS (valid values; default):\n"
@@ -342,93 +378,104 @@ msgid ""
" rle=NUM run-length encoder chunk size (0-256; 0)"
msgstr ""
-#: src/xz/message.c:1133
+#: src/xz/message.c:1196
msgid ""
"\n"
" Other options:\n"
msgstr ""
-#: src/xz/message.c:1136
+#: src/xz/message.c:1199
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
-#: src/xz/message.c:1141
+#: src/xz/message.c:1204
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr ""
-#: src/xz/message.c:1145
+#: src/xz/message.c:1206
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+
+#: src/xz/message.c:1209
+msgid " --info-memory display the memory usage limit and exit"
+msgstr ""
+
+#: src/xz/message.c:1211
msgid ""
-"\n"
" -h, --help display the short help (lists only the basic options)\n"
-" -H, --long-help display this long help"
+" -H, --long-help display this long help and exit"
msgstr ""
-#: src/xz/message.c:1150
+#: src/xz/message.c:1215
msgid ""
-" -h, --help display this short help\n"
+" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
-#: src/xz/message.c:1154
-msgid " -V, --version display the version number"
+#: src/xz/message.c:1220
+msgid " -V, --version display the version number and exit"
msgstr ""
-#: src/xz/message.c:1156
+#: src/xz/message.c:1222
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
-#: src/xz/message.c:1160
+#: src/xz/message.c:1226
#, c-format
msgid ""
-"On this system and configuration, this program will use at maximum of roughly\n"
+"On this system and configuration, this program will use a maximum of roughly\n"
"%s MiB RAM and "
msgstr ""
-#: src/xz/message.c:1162
+#: src/xz/message.c:1228
msgid ""
"one thread.\n"
"\n"
msgstr ""
-#: src/xz/message.c:1167
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1237
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
-#: src/xz/message.c:1169
+#: src/xz/message.c:1239
#, c-format
msgid "%s home page: <%s>\n"
msgstr ""
-#: src/xz/options.c:88
+#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr ""
-#: src/xz/options.c:108
+#: src/xz/options.c:93
#, c-format
-msgid "%s: Invalid option value"
+msgid "%s: Invalid option name"
msgstr ""
-#: src/xz/options.c:131
+#: src/xz/options.c:113
#, c-format
-msgid "%s: Invalid option name"
+msgid "%s: Invalid option value"
msgstr ""
-#: src/xz/options.c:310
+#: src/xz/options.c:308
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr ""
-#: src/xz/options.c:429
+#: src/xz/options.c:426
msgid "The sum of lc and lp must be at maximum of 4"
msgstr ""
-#: src/xz/options.c:434
+#: src/xz/options.c:431
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr ""
@@ -453,29 +500,33 @@ msgstr ""
msgid "%s: Invalid filename suffix"
msgstr ""
-#: src/xz/util.c:62
+#: src/xz/util.c:54
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr ""
-#: src/xz/util.c:104
+#: src/xz/util.c:90
#, c-format
-msgid "%s: Invalid multiplier suffix. Valid suffixes:"
+msgid "%s: Invalid multiplier suffix"
+msgstr ""
+
+#: src/xz/util.c:92
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr ""
-#: src/xz/util.c:124
+#: src/xz/util.c:109
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr ""
-#: src/xz/util.c:198
+#: src/xz/util.c:283
msgid "Empty filename, skipping"
msgstr ""
-#: src/xz/util.c:212
-msgid "Compressed data not read from a terminal unless `--force' is used."
+#: src/xz/util.c:297
+msgid "Compressed data cannot be read from a terminal"
msgstr ""
-#: src/xz/util.c:225
-msgid "Compressed data not written to a terminal unless `--force' is used."
+#: src/xz/util.c:310
+msgid "Compressed data cannot be written to a terminal"
msgstr ""
diff --git a/Build/source/extra/xz-4.999.9beta/src/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.am
index f03f5a3da30..f03f5a3da30 100644
--- a/Build/source/extra/xz-4.999.9beta/src/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.am
diff --git a/Build/source/extra/xz-4.999.9beta/src/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.in
index 6d7c827ed7b..78b24eca875 100644
--- a/Build/source/extra/xz-4.999.9beta/src/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -38,15 +38,18 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -148,6 +151,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -165,7 +169,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -293,7 +296,7 @@ clean-libtool:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -318,7 +321,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/common_w32res.rc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/common_w32res.rc
index ad9e165394a..ad9e165394a 100644
--- a/Build/source/extra/xz-4.999.9beta/src/common/common_w32res.rc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/common_w32res.rc
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/mythread.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/mythread.h
index 476c2fc9e10..476c2fc9e10 100644
--- a/Build/source/extra/xz-4.999.9beta/src/common/mythread.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/mythread.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/sysdefs.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/sysdefs.h
index fbc9176a8a1..97a1c045cfb 100644
--- a/Build/source/extra/xz-4.999.9beta/src/common/sysdefs.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/sysdefs.h
@@ -50,7 +50,7 @@
// we can work without inttypes.h thanks to Autoconf tests.
#ifndef UINT32_C
# if UINT_MAX != 4294967295U
-# error UINT32_C is not defined and unsiged int is not 32-bit.
+# error UINT32_C is not defined and unsigned int is not 32-bit.
# endif
# define UINT32_C(n) n ## U
#endif
@@ -89,6 +89,12 @@
# define UINT64_MAX UINT64_C(18446744073709551615)
#endif
+// Interix has broken header files, which typedef size_t to unsigned long,
+// but a few lines later define SIZE_MAX to INT32_MAX.
+#ifdef __INTERIX
+# undef SIZE_MAX
+#endif
+
// The code currently assumes that size_t is either 32-bit or 64-bit.
#ifndef SIZE_MAX
# if SIZEOF_SIZE_T == 4
@@ -147,10 +153,6 @@ typedef unsigned char _Bool;
// Macros //
////////////
-#if defined(_WIN32) || defined(__MSDOS__) || defined(__OS2__)
-# define DOSLIKE 1
-#endif
-
#undef memzero
#define memzero(s, n) memset(s, 0, n)
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_common.h
new file mode 100644
index 00000000000..31fbab58b00
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_common.h
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_common.h
+/// \brief Common definitions for tuklib modules
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_COMMON_H
+#define TUKLIB_COMMON_H
+
+// The config file may be replaced by a package-specific file.
+// It should include at least stddef.h, inttypes.h, and limits.h.
+#include "tuklib_config.h"
+
+// TUKLIB_SYMBOL_PREFIX is prefixed to all symbols exported by
+// the tuklib modules. If you use a tuklib module in a library,
+// you should use TUKLIB_SYMBOL_PREFIX to make sure that there
+// are no symbol conflicts in case someone links your library
+// into application that also uses the same tuklib module.
+#ifndef TUKLIB_SYMBOL_PREFIX
+# define TUKLIB_SYMBOL_PREFIX
+#endif
+
+#define TUKLIB_CAT_X(a, b) a ## b
+#define TUKLIB_CAT(a, b) TUKLIB_CAT_X(a, b)
+
+#ifndef TUKLIB_SYMBOL
+# define TUKLIB_SYMBOL(sym) TUKLIB_CAT(TUKLIB_SYMBOL_PREFIX, sym)
+#endif
+
+#ifndef TUKLIB_DECLS_BEGIN
+# ifdef __cplusplus
+# define TUKLIB_DECLS_BEGIN extern "C" {
+# else
+# define TUKLIB_DECLS_BEGIN
+# endif
+#endif
+
+#ifndef TUKLIB_DECLS_END
+# ifdef __cplusplus
+# define TUKLIB_DECLS_END }
+# else
+# define TUKLIB_DECLS_END
+# endif
+#endif
+
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define TUKLIB_GNUC_REQ(major, minor) \
+ ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
+ || __GNUC__ > (major))
+#else
+# define TUKLIB_GNUC_REQ(major, minor) 0
+#endif
+
+#if TUKLIB_GNUC_REQ(2, 5)
+# define tuklib_attr_noreturn __attribute__((__noreturn__))
+#else
+# define tuklib_attr_noreturn
+#endif
+
+#if (defined(_WIN32) && !defined(__CYGWIN__)) \
+ || defined(__OS2__) || defined(__MSDOS__)
+# define TUKLIB_DOSLIKE 1
+#endif
+
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_config.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_config.h
new file mode 100644
index 00000000000..549cb24d773
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_config.h
@@ -0,0 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "sysdefs.h"
+#else
+# include <stddef.h>
+# include <inttypes.h>
+# include <limits.h>
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.c
new file mode 100644
index 00000000000..1da13df7f5f
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.c
@@ -0,0 +1,62 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_cpucores.c
+/// \brief Get the number of CPU cores online
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_cpucores.h"
+
+#if defined(TUKLIB_CPUCORES_SYSCTL)
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# include <sys/sysctl.h>
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+# include <unistd.h>
+
+// HP-UX
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+# include <sys/param.h>
+# include <sys/pstat.h>
+#endif
+
+
+extern uint32_t
+tuklib_cpucores(void)
+{
+ uint32_t ret = 0;
+
+#if defined(TUKLIB_CPUCORES_SYSCTL)
+ int name[2] = { CTL_HW, HW_NCPU };
+ int cpus;
+ size_t cpus_size = sizeof(cpus);
+ if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
+ && cpus_size == sizeof(cpus) && cpus > 0)
+ ret = cpus;
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+# ifdef _SC_NPROCESSORS_ONLN
+ // Most systems
+ const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
+# else
+ // IRIX
+ const long cpus = sysconf(_SC_NPROC_ONLN);
+# endif
+ if (cpus > 0)
+ ret = cpus;
+
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+ struct pst_dynamic pst;
+ if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
+ ret = pst.psd_proc_cnt;
+#endif
+
+ return ret;
+}
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.h
new file mode 100644
index 00000000000..be1ce1c175a
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_cpucores.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_cpucores.h
+/// \brief Get the number of CPU cores online
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_CPUCORES_H
+#define TUKLIB_CPUCORES_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_cpucores TUKLIB_SYMBOL(tuklib_cpucores)
+extern uint32_t tuklib_cpucores(void);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.c
new file mode 100644
index 00000000000..c393be64d75
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.c
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_exit.c
+/// \brief Close stdout and stderr, and exit
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_common.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+
+
+extern void
+tuklib_exit(int status, int err_status, int show_error)
+{
+ if (status != err_status) {
+ // Close stdout. If something goes wrong,
+ // print an error message to stderr.
+ const int ferror_err = ferror(stdout);
+ const int fclose_err = fclose(stdout);
+ if (ferror_err || fclose_err) {
+ status = err_status;
+
+ // If it was fclose() that failed, we have the reason
+ // in errno. If only ferror() indicated an error,
+ // we have no idea what the reason was.
+ if (show_error)
+ fprintf(stderr, "%s: %s: %s\n", progname,
+ _("Writing to standard "
+ "output failed"),
+ fclose_err ? strerror(errno)
+ : _("Unknown error"));
+ }
+ }
+
+ if (status != err_status) {
+ // Close stderr. If something goes wrong, there's
+ // nothing where we could print an error message.
+ // Just set the exit status.
+ const int ferror_err = ferror(stderr);
+ const int fclose_err = fclose(stderr);
+ if (fclose_err || ferror_err)
+ status = err_status;
+ }
+
+ exit(status);
+}
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.h
new file mode 100644
index 00000000000..b11776f0e5b
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_exit.h
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_exit.h
+/// \brief Close stdout and stderr, and exit
+/// \note Requires tuklib_progname and tuklib_gettext modules
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_EXIT_H
+#define TUKLIB_EXIT_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_exit TUKLIB_SYMBOL(tuklib_exit)
+extern void tuklib_exit(int status, int err_status, int show_error)
+ tuklib_attr_noreturn;
+
+TUKLIB_DECLS_END
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_gettext.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_gettext.h
new file mode 100644
index 00000000000..248521347ab
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_gettext.h
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_gettext.h
+/// \brief Wrapper for gettext and friends
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_GETTEXT_H
+#define TUKLIB_GETTEXT_H
+
+#include "tuklib_common.h"
+#include <locale.h>
+
+#ifndef TUKLIB_GETTEXT
+# ifdef ENABLE_NLS
+# define TUKLIB_GETTEXT 1
+# else
+# define TUKLIB_GETTEXT 0
+# endif
+#endif
+
+#if TUKLIB_GETTEXT
+# include <libintl.h>
+# define tuklib_gettext_init(package, localedir) \
+ do { \
+ setlocale(LC_ALL, ""); \
+ bindtextdomain(package, localedir); \
+ textdomain(package); \
+ } while (0)
+# define _(msgid) gettext(msgid)
+# define N_(msgid1, msgid2, n) ngettext(msgid1, msgid2, n)
+#else
+# define tuklib_gettext_init(package, localedir) \
+ setlocale(LC_ALL, "")
+# define _(msgid) (msgid)
+# define N_(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2))
+#endif
+
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_integer.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_integer.h
new file mode 100644
index 00000000000..e6daa772d58
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_integer.h
@@ -0,0 +1,523 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_integer.h
+/// \brief Various integer and bit operations
+///
+/// This file provides macros or functions to do some basic integer and bit
+/// operations.
+///
+/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l):
+/// - Byte swapping: bswapXX(num)
+/// - Byte order conversions to/from native: convXXYe(num)
+/// - Aligned reads: readXXYe(ptr)
+/// - Aligned writes: writeXXYe(ptr, num)
+/// - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr)
+/// - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num)
+///
+/// Since they can macros, the arguments should have no side effects since
+/// they may be evaluated more than once.
+///
+/// \todo PowerPC and possibly some other architectures support
+/// byte swapping load and store instructions. This file
+/// doesn't take advantage of those instructions.
+///
+/// Bit scan operations for non-zero 32-bit integers:
+/// - Bit scan reverse (find highest non-zero bit): bsr32(num)
+/// - Count leading zeros: clz32(num)
+/// - Count trailing zeros: ctz32(num)
+/// - Bit scan forward (simply an alias for ctz32()): bsf32(num)
+///
+/// The above bit scan operations return 0-31. If num is zero,
+/// the result is undefined.
+//
+// Authors: Lasse Collin
+// Joachim Henke
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_INTEGER_H
+#define TUKLIB_INTEGER_H
+
+#include "tuklib_common.h"
+
+
+////////////////////////////////////////
+// Operating system specific features //
+////////////////////////////////////////
+
+#if defined(HAVE_BYTESWAP_H)
+ // glibc, uClibc, dietlibc
+# include <byteswap.h>
+# ifdef HAVE_BSWAP_16
+# define bswap16(num) bswap_16(num)
+# endif
+# ifdef HAVE_BSWAP_32
+# define bswap32(num) bswap_32(num)
+# endif
+# ifdef HAVE_BSWAP_64
+# define bswap64(num) bswap_64(num)
+# endif
+
+#elif defined(HAVE_SYS_ENDIAN_H)
+ // *BSDs and Darwin
+# include <sys/endian.h>
+
+#elif defined(HAVE_SYS_BYTEORDER_H)
+ // Solaris
+# include <sys/byteorder.h>
+# ifdef BSWAP_16
+# define bswap16(num) BSWAP_16(num)
+# endif
+# ifdef BSWAP_32
+# define bswap32(num) BSWAP_32(num)
+# endif
+# ifdef BSWAP_64
+# define bswap64(num) BSWAP_64(num)
+# endif
+# ifdef BE_16
+# define conv16be(num) BE_16(num)
+# endif
+# ifdef BE_32
+# define conv32be(num) BE_32(num)
+# endif
+# ifdef BE_64
+# define conv64be(num) BE_64(num)
+# endif
+# ifdef LE_16
+# define conv16le(num) LE_16(num)
+# endif
+# ifdef LE_32
+# define conv32le(num) LE_32(num)
+# endif
+# ifdef LE_64
+# define conv64le(num) LE_64(num)
+# endif
+#endif
+
+
+///////////////////
+// Byte swapping //
+///////////////////
+
+#ifndef bswap16
+# define bswap16(num) \
+ (((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8))
+#endif
+
+#ifndef bswap32
+# define bswap32(num) \
+ ( (((uint32_t)(num) << 24) ) \
+ | (((uint32_t)(num) << 8) & UINT32_C(0x00FF0000)) \
+ | (((uint32_t)(num) >> 8) & UINT32_C(0x0000FF00)) \
+ | (((uint32_t)(num) >> 24) ) )
+#endif
+
+#ifndef bswap64
+# define bswap64(num) \
+ ( (((uint64_t)(num) << 56) ) \
+ | (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \
+ | (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \
+ | (((uint64_t)(num) << 8) & UINT64_C(0x000000FF00000000)) \
+ | (((uint64_t)(num) >> 8) & UINT64_C(0x00000000FF000000)) \
+ | (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \
+ | (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \
+ | (((uint64_t)(num) >> 56) ) )
+#endif
+
+// Define conversion macros using the basic byte swapping macros.
+#ifdef WORDS_BIGENDIAN
+# ifndef conv16be
+# define conv16be(num) ((uint16_t)(num))
+# endif
+# ifndef conv32be
+# define conv32be(num) ((uint32_t)(num))
+# endif
+# ifndef conv64be
+# define conv64be(num) ((uint64_t)(num))
+# endif
+# ifndef conv16le
+# define conv16le(num) bswap16(num)
+# endif
+# ifndef conv32le
+# define conv32le(num) bswap32(num)
+# endif
+# ifndef conv64le
+# define conv64le(num) bswap64(num)
+# endif
+#else
+# ifndef conv16be
+# define conv16be(num) bswap16(num)
+# endif
+# ifndef conv32be
+# define conv32be(num) bswap32(num)
+# endif
+# ifndef conv64be
+# define conv64be(num) bswap64(num)
+# endif
+# ifndef conv16le
+# define conv16le(num) ((uint16_t)(num))
+# endif
+# ifndef conv32le
+# define conv32le(num) ((uint32_t)(num))
+# endif
+# ifndef conv64le
+# define conv64le(num) ((uint64_t)(num))
+# endif
+#endif
+
+
+//////////////////////////////
+// Aligned reads and writes //
+//////////////////////////////
+
+static inline uint16_t
+read16be(const uint8_t *buf)
+{
+ uint16_t num = *(const uint16_t *)buf;
+ return conv16be(num);
+}
+
+
+static inline uint16_t
+read16le(const uint8_t *buf)
+{
+ uint16_t num = *(const uint16_t *)buf;
+ return conv16le(num);
+}
+
+
+static inline uint32_t
+read32be(const uint8_t *buf)
+{
+ uint32_t num = *(const uint32_t *)buf;
+ return conv32be(num);
+}
+
+
+static inline uint32_t
+read32le(const uint8_t *buf)
+{
+ uint32_t num = *(const uint32_t *)buf;
+ return conv32le(num);
+}
+
+
+static inline uint64_t
+read64be(const uint8_t *buf)
+{
+ uint64_t num = *(const uint64_t *)buf;
+ return conv64be(num);
+}
+
+
+static inline uint64_t
+read64le(const uint8_t *buf)
+{
+ uint64_t num = *(const uint64_t *)buf;
+ return conv64le(num);
+}
+
+
+// NOTE: Possible byte swapping must be done in a macro to allow GCC
+// to optimize byte swapping of constants when using glibc's or *BSD's
+// byte swapping macros. The actual write is done in an inline function
+// to make type checking of the buf pointer possible similarly to readXXYe()
+// functions.
+
+#define write16be(buf, num) write16ne((buf), conv16be(num))
+#define write16le(buf, num) write16ne((buf), conv16le(num))
+#define write32be(buf, num) write32ne((buf), conv32be(num))
+#define write32le(buf, num) write32ne((buf), conv32le(num))
+#define write64be(buf, num) write64ne((buf), conv64be(num))
+#define write64le(buf, num) write64ne((buf), conv64le(num))
+
+
+static inline void
+write16ne(uint8_t *buf, uint16_t num)
+{
+ *(uint16_t *)buf = num;
+ return;
+}
+
+
+static inline void
+write32ne(uint8_t *buf, uint32_t num)
+{
+ *(uint32_t *)buf = num;
+ return;
+}
+
+
+static inline void
+write64ne(uint8_t *buf, uint64_t num)
+{
+ *(uint64_t *)buf = num;
+ return;
+}
+
+
+////////////////////////////////
+// Unaligned reads and writes //
+////////////////////////////////
+
+// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
+// 32-bit unaligned integer loads and stores. It's possible that 64-bit
+// unaligned access doesn't work or is slower than byte-by-byte access.
+// Since unaligned 64-bit is probably not needed as often as 16-bit or
+// 32-bit, we simply don't support 64-bit unaligned access for now.
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+# define unaligned_read16be read16be
+# define unaligned_read16le read16le
+# define unaligned_read32be read32be
+# define unaligned_read32le read32le
+# define unaligned_write16be write16be
+# define unaligned_write16le write16le
+# define unaligned_write32be write32be
+# define unaligned_write32le write32le
+
+#else
+
+static inline uint16_t
+unaligned_read16be(const uint8_t *buf)
+{
+ uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
+ return num;
+}
+
+
+static inline uint16_t
+unaligned_read16le(const uint8_t *buf)
+{
+ uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
+ return num;
+}
+
+
+static inline uint32_t
+unaligned_read32be(const uint8_t *buf)
+{
+ uint32_t num = (uint32_t)buf[0] << 24;
+ num |= (uint32_t)buf[1] << 16;
+ num |= (uint32_t)buf[2] << 8;
+ num |= (uint32_t)buf[3];
+ return num;
+}
+
+
+static inline uint32_t
+unaligned_read32le(const uint8_t *buf)
+{
+ uint32_t num = (uint32_t)buf[0];
+ num |= (uint32_t)buf[1] << 8;
+ num |= (uint32_t)buf[2] << 16;
+ num |= (uint32_t)buf[3] << 24;
+ return num;
+}
+
+
+static inline void
+unaligned_write16be(uint8_t *buf, uint16_t num)
+{
+ buf[0] = num >> 8;
+ buf[1] = num;
+ return;
+}
+
+
+static inline void
+unaligned_write16le(uint8_t *buf, uint16_t num)
+{
+ buf[0] = num;
+ buf[1] = num >> 8;
+ return;
+}
+
+
+static inline void
+unaligned_write32be(uint8_t *buf, uint32_t num)
+{
+ buf[0] = num >> 24;
+ buf[1] = num >> 16;
+ buf[2] = num >> 8;
+ buf[3] = num;
+ return;
+}
+
+
+static inline void
+unaligned_write32le(uint8_t *buf, uint32_t num)
+{
+ buf[0] = num;
+ buf[1] = num >> 8;
+ buf[2] = num >> 16;
+ buf[3] = num >> 24;
+ return;
+}
+
+#endif
+
+
+static inline uint32_t
+bsr32(uint32_t n)
+{
+ // Check for ICC first, since it tends to define __GNUC__ too.
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_reverse(n);
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
+ // GCC >= 3.4 has __builtin_clz(), which gives good results on
+ // multiple architectures. On x86, __builtin_clz() ^ 31U becomes
+ // either plain BSR (so the XOR gets optimized away) or LZCNT and
+ // XOR (if -march indicates that SSE4a instructions are supported).
+ return __builtin_clz(n) ^ 31U;
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+ // MSVC isn't supported by tuklib, but since this code exists,
+ // it doesn't hurt to have it here anyway.
+ uint32_t i;
+ _BitScanReverse((DWORD *)&i, n);
+ return i;
+
+#else
+ uint32_t i = 31;
+
+ if ((n & UINT32_C(0xFFFF0000)) == 0) {
+ n <<= 16;
+ i = 15;
+ }
+
+ if ((n & UINT32_C(0xFF000000)) == 0) {
+ n <<= 8;
+ i -= 8;
+ }
+
+ if ((n & UINT32_C(0xF0000000)) == 0) {
+ n <<= 4;
+ i -= 4;
+ }
+
+ if ((n & UINT32_C(0xC0000000)) == 0) {
+ n <<= 2;
+ i -= 2;
+ }
+
+ if ((n & UINT32_C(0x80000000)) == 0)
+ --i;
+
+ return i;
+#endif
+}
+
+
+static inline uint32_t
+clz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_reverse(n) ^ 31U;
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
+ return __builtin_clz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsrl %1, %0\n\t"
+ "xorl $31, %0"
+ : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+ uint32_t i;
+ _BitScanReverse((DWORD *)&i, n);
+ return i ^ 31U;
+
+#else
+ uint32_t i = 0;
+
+ if ((n & UINT32_C(0xFFFF0000)) == 0) {
+ n <<= 16;
+ i = 16;
+ }
+
+ if ((n & UINT32_C(0xFF000000)) == 0) {
+ n <<= 8;
+ i += 8;
+ }
+
+ if ((n & UINT32_C(0xF0000000)) == 0) {
+ n <<= 4;
+ i += 4;
+ }
+
+ if ((n & UINT32_C(0xC0000000)) == 0) {
+ n <<= 2;
+ i += 2;
+ }
+
+ if ((n & UINT32_C(0x80000000)) == 0)
+ ++i;
+
+ return i;
+#endif
+}
+
+
+static inline uint32_t
+ctz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_forward(n);
+
+#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
+ return __builtin_ctz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+ uint32_t i;
+ _BitScanForward((DWORD *)&i, n);
+ return i;
+
+#else
+ uint32_t i = 0;
+
+ if ((n & UINT32_C(0x0000FFFF)) == 0) {
+ n >>= 16;
+ i = 16;
+ }
+
+ if ((n & UINT32_C(0x000000FF)) == 0) {
+ n >>= 8;
+ i += 8;
+ }
+
+ if ((n & UINT32_C(0x0000000F)) == 0) {
+ n >>= 4;
+ i += 4;
+ }
+
+ if ((n & UINT32_C(0x00000003)) == 0) {
+ n >>= 2;
+ i += 2;
+ }
+
+ if ((n & UINT32_C(0x00000001)) == 0)
+ ++i;
+
+ return i;
+#endif
+}
+
+#define bsf32 ctz32
+
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/open_stdxxx.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.c
index 22300851a2a..08bc60d8cf8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/common/open_stdxxx.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.c
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
//
-/// \file open_stdxxx.h
+/// \file tuklib_open_stdxxx.c
/// \brief Make sure that file descriptors 0, 1, and 2 are open
//
// Author: Lasse Collin
@@ -10,17 +10,24 @@
//
///////////////////////////////////////////////////////////////////////////////
-#ifndef OPEN_STDXXX_H
-#define OPEN_STDXXX_H
+#include "tuklib_open_stdxxx.h"
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
+#ifndef TUKLIB_DOSLIKE
+# include <stdlib.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <unistd.h>
+#endif
-static void
-open_stdxxx(int status)
+extern void
+tuklib_open_stdxxx(int err_status)
{
+#ifdef TUKLIB_DOSLIKE
+ // Do nothing, just silence warnings.
+ (void)err_status;
+
+#else
for (int i = 0; i <= 2; ++i) {
// We use fcntl() to check if the file descriptor is open.
if (fcntl(i, F_GETFD) == -1 && errno == EBADF) {
@@ -38,12 +45,11 @@ open_stdxxx(int status)
// may very well be non-existent. This
// error should be extremely rare.
(void)close(fd);
- exit(status);
+ exit(err_status);
}
}
}
+#endif
return;
}
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.h
new file mode 100644
index 00000000000..b91161609ee
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_open_stdxxx.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_open_stdxxx.h
+/// \brief Make sure that file descriptors 0, 1, and 2 are open
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_OPEN_STDXXX_H
+#define TUKLIB_OPEN_STDXXX_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_open_stdxx TUKLIB_SYMBOL(tuklib_open_stdxxx)
+extern void tuklib_open_stdxxx(int err_status);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/physmem.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.c
index 63482c6c868..623b6e70b7f 100644
--- a/Build/source/extra/xz-4.999.9beta/src/common/physmem.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.c
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
//
-/// \file physmem.h
+/// \file tuklib_physmem.c
/// \brief Get the amount of physical memory
//
// Author: Lasse Collin
@@ -10,43 +10,64 @@
//
///////////////////////////////////////////////////////////////////////////////
-#ifndef PHYSMEM_H
-#define PHYSMEM_H
+#include "tuklib_physmem.h"
-// Test for Windows first, because we want to use Windows-specific code
-// on Cygwin, which also has memory information available via sysconf(), but
-// on Cygwin 1.5 and older it gives wrong results (from our point of view).
+// We want to use Windows-specific code on Cygwin, which also has memory
+// information available via sysconf(), but on Cygwin 1.5 and older it
+// gives wrong results (from our point of view).
#if defined(_WIN32) || defined(__CYGWIN__)
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500
# endif
# include <windows.h>
-#elif defined(HAVE_PHYSMEM_SYSCONF)
+#elif defined(__OS2__)
+# define INCL_DOSMISC
+# include <os2.h>
+
+#elif defined(__DJGPP__)
+# include <dpmi.h>
+
+#elif defined(__VMS)
+# include <lib$routines.h>
+# include <syidef.h>
+# include <ssdef.h>
+
+// AIX
+#elif defined(TUKLIB_PHYSMEM_AIX)
+# include <sys/systemcfg.h>
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
# include <unistd.h>
-#elif defined(HAVE_PHYSMEM_SYSCTL)
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
# ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
# endif
-# ifdef HAVE_SYS_SYSCTL_H
-# include <sys/sysctl.h>
-# endif
+# include <sys/sysctl.h>
-#elif defined(HAVE_PHYSMEM_SYSINFO)
+// Tru64
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
# include <sys/sysinfo.h>
+# include <machine/hal_sysinfo.h>
-#elif defined(__DJGPP__)
-# include <dpmi.h>
+// HP-UX
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+# include <sys/param.h>
+# include <sys/pstat.h>
+
+// IRIX
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+# include <invent.h>
+
+// This sysinfo() is Linux-specific.
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
+# include <sys/sysinfo.h>
#endif
-/// \brief Get the amount of physical memory in bytes
-///
-/// \return Amount of physical memory in bytes. On error, zero is
-/// returned.
-static inline uint64_t
-physmem(void)
+extern uint64_t
+tuklib_physmem(void)
{
uint64_t ret = 0;
@@ -79,18 +100,40 @@ physmem(void)
ret = meminfo.dwTotalPhys;
}
-#elif defined(HAVE_PHYSMEM_SYSCONF)
+#elif defined(__OS2__)
+ unsigned long mem;
+ if (DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM,
+ &mem, sizeof(mem)) == 0)
+ ret = mem;
+
+#elif defined(__DJGPP__)
+ __dpmi_free_mem_info meminfo;
+ if (__dpmi_get_free_memory_information(&meminfo) == 0
+ && meminfo.total_number_of_physical_pages
+ != (unsigned long)-1)
+ ret = (uint64_t)meminfo.total_number_of_physical_pages * 4096;
+
+#elif defined(__VMS)
+ int vms_mem;
+ int val = SYI$_MEMSIZE;
+ if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
+ ret = (uint64_t)vms_mem * 8192;
+
+#elif defined(TUKLIB_PHYSMEM_AIX)
+ ret = _system_configuration.physmem;
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
const long pagesize = sysconf(_SC_PAGESIZE);
const long pages = sysconf(_SC_PHYS_PAGES);
- if (pagesize != -1 || pages != -1)
+ if (pagesize != -1 && pages != -1)
// According to docs, pagesize * pages can overflow.
// Simple case is 32-bit box with 4 GiB or more RAM,
// which may report exactly 4 GiB of RAM, and "long"
// being 32-bit will overflow. Casting to uint64_t
// hopefully avoids overflows in the near future.
- ret = (uint64_t)(pagesize) * (uint64_t)(pages);
+ ret = (uint64_t)pagesize * (uint64_t)pages;
-#elif defined(HAVE_PHYSMEM_SYSCTL)
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
int name[2] = {
CTL_HW,
#ifdef HW_PHYSMEM64
@@ -104,7 +147,7 @@ physmem(void)
uint64_t u64;
} mem;
size_t mem_ptr_size = sizeof(mem.u64);
- if (!sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, NULL)) {
+ if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) {
// IIRC, 64-bit "return value" is possible on some 64-bit
// BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
// so support both.
@@ -114,21 +157,40 @@ physmem(void)
ret = mem.u32;
}
-#elif defined(HAVE_PHYSMEM_SYSINFO)
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
+ // Docs are unclear if "start" is needed, but it doesn't hurt
+ // much to have it.
+ int memkb;
+ int start = 0;
+ if (getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start)
+ != -1)
+ ret = (uint64_t)memkb * 1024;
+
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+ struct pst_static pst;
+ if (pstat_getstatic(&pst, sizeof(pst), 1, 0) != -1)
+ ret = (uint64_t)pst.physical_memory * (uint64_t)pst.page_size;
+
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+ inv_state_t *st = NULL;
+ if (setinvent_r(&st) != -1) {
+ inventory_t *i;
+ while ((i = getinvent_r(st)) != NULL) {
+ if (i->inv_class == INV_MEMORY
+ && i->inv_type == INV_MAIN_MB) {
+ ret = (uint64_t)i->inv_state << 20;
+ break;
+ }
+ }
+
+ endinvent_r(st);
+ }
+
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
struct sysinfo si;
if (sysinfo(&si) == 0)
- ret = (uint64_t)(si.totalram) * si.mem_unit;
-
-#elif defined(__DJGPP__)
- __dpmi_free_mem_info meminfo;
- if (__dpmi_get_free_memory_information(&meminfo) == 0
- && meminfo.total_number_of_physical_pages
- != (unsigned long)(-1))
- ret = (uint64_t)(meminfo.total_number_of_physical_pages)
- * 4096;
+ ret = (uint64_t)si.totalram * si.mem_unit;
#endif
return ret;
}
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.h
new file mode 100644
index 00000000000..09e2a51338a
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_physmem.h
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_physmem.h
+/// \brief Get the amount of physical memory
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_PHYSMEM_H
+#define TUKLIB_PHYSMEM_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_physmem TUKLIB_SYMBOL(tuklib_physmem)
+extern uint64_t tuklib_physmem(void);
+///<
+/// \brief Get the amount of physical memory in bytes
+///
+/// \return Amount of physical memory in bytes. On error, zero is
+/// returned.
+
+TUKLIB_DECLS_END
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.c
new file mode 100644
index 00000000000..7cb7e203dd9
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.c
@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_progname.c
+/// \brief Program name to be displayed in messages
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_progname.h"
+#include <string.h>
+
+
+#if !HAVE_DECL_PROGRAM_INVOCATION_NAME
+char *progname = NULL;
+#endif
+
+
+extern void
+tuklib_progname_init(char **argv)
+{
+#ifdef TUKLIB_DOSLIKE
+ // On these systems, argv[0] always has the full path and .exe
+ // suffix even if the user just types the plain program name.
+ // We modify argv[0] to make it nicer to read.
+
+ // Strip the leading path.
+ char *p = argv[0] + strlen(argv[0]);
+ while (argv[0] < p && p[-1] != '/' && p[-1] != '\\')
+ --p;
+
+ argv[0] = p;
+
+ // Strip the .exe suffix.
+ p = strrchr(p, '.');
+ if (p != NULL)
+ *p = '\0';
+
+ // Make it lowercase.
+ for (p = argv[0]; *p != '\0'; ++p)
+ if (*p >= 'A' && *p <= 'Z')
+ *p = *p - 'A' + 'a';
+#endif
+
+ progname = argv[0];
+ return;
+}
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.h
new file mode 100644
index 00000000000..791b12517e5
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/common/tuklib_progname.h
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_progname.h
+/// \brief Program name to be displayed in messages
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_PROGNAME_H
+#define TUKLIB_PROGNAME_H
+
+#include "tuklib_common.h"
+#include <errno.h>
+
+TUKLIB_DECLS_BEGIN
+
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+# define progname program_invocation_name
+#else
+# define progname TUKLIB_SYMBOL(tuklib_progname)
+ extern char *progname;
+#endif
+
+#define tuklib_progname_init TUKLIB_SYMBOL(tuklib_progname_init)
+extern void tuklib_progname_init(char **argv);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.am
index 6d5753b14fc..a4d2c1e6361 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.am
@@ -12,7 +12,7 @@ CLEANFILES =
doc_DATA =
lib_LTLIBRARIES = liblzma.la
-liblzma_la_SOURCES =
+liblzma_la_SOURCES = $(top_srcdir)/src/common/tuklib_physmem.c
liblzma_la_CPPFLAGS = \
-I$(top_srcdir)/src/liblzma/api \
-I$(top_srcdir)/src/liblzma/common \
@@ -23,7 +23,8 @@ liblzma_la_CPPFLAGS = \
-I$(top_srcdir)/src/liblzma/subblock \
-I$(top_srcdir)/src/liblzma/delta \
-I$(top_srcdir)/src/liblzma/simple \
- -I$(top_srcdir)/src/common
+ -I$(top_srcdir)/src/common \
+ -DTUKLIB_SYMBOL_PREFIX=lzma_
liblzma_la_LDFLAGS = -no-undefined -version-info 0:0:0
include $(srcdir)/common/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.in
index 7d401e58b45..74a9bb94225 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -104,6 +104,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder.c \
@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder.h \
@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_hash.h \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_hash_table.h \
@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_mf.c
@COND_DECODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@am__append_13 = \
@@ -192,15 +193,18 @@ subdir = src/liblzma
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -232,42 +236,43 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \
"$(DESTDIR)$(pkgconfigdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
liblzma_la_LIBADD =
-am__liblzma_la_SOURCES_DIST = common/common.c common/common.h \
- common/bsr.h common/block_util.c common/easy_preset.c \
+am__liblzma_la_SOURCES_DIST = \
+ $(top_srcdir)/src/common/tuklib_physmem.c common/common.c \
+ common/common.h common/block_util.c common/easy_preset.c \
common/easy_preset.h common/filter_common.c \
- common/filter_common.h common/index.c common/index.h \
- common/stream_flags_common.c common/stream_flags_common.h \
- common/vli_size.c common/alone_encoder.c \
- common/block_buffer_encoder.c common/block_encoder.c \
- common/block_encoder.h common/block_header_encoder.c \
- common/easy_buffer_encoder.c common/easy_encoder.c \
- common/easy_encoder_memusage.c common/filter_buffer_encoder.c \
- common/filter_encoder.c common/filter_encoder.h \
- common/filter_flags_encoder.c common/index_encoder.c \
- common/index_encoder.h common/stream_buffer_encoder.c \
- common/stream_encoder.c common/stream_encoder.h \
- common/stream_flags_encoder.c common/vli_encoder.c \
- common/alone_decoder.c common/alone_decoder.h \
- common/auto_decoder.c common/block_buffer_decoder.c \
- common/block_decoder.c common/block_decoder.h \
- common/block_header_decoder.c common/easy_decoder_memusage.c \
- common/filter_buffer_decoder.c common/filter_decoder.c \
- common/filter_decoder.h common/filter_flags_decoder.c \
- common/index_decoder.c common/index_hash.c \
- common/stream_buffer_decoder.c common/stream_decoder.c \
- common/stream_decoder.h common/stream_flags_decoder.c \
- common/vli_decoder.c check/check.c check/check.h \
- check/crc_macros.h check/crc32_small.c check/crc32_table.c \
- check/crc32_table_le.h check/crc32_table_be.h \
- check/crc32_x86.S check/crc32_fast.c check/crc64_small.c \
- check/crc64_table.c check/crc64_table_le.h \
+ common/filter_common.h common/hardware_physmem.c \
+ common/index.c common/index.h common/stream_flags_common.c \
+ common/stream_flags_common.h common/vli_size.c \
+ common/alone_encoder.c common/block_buffer_encoder.c \
+ common/block_encoder.c common/block_encoder.h \
+ common/block_header_encoder.c common/easy_buffer_encoder.c \
+ common/easy_encoder.c common/easy_encoder_memusage.c \
+ common/filter_buffer_encoder.c common/filter_encoder.c \
+ common/filter_encoder.h common/filter_flags_encoder.c \
+ common/index_encoder.c common/index_encoder.h \
+ common/stream_buffer_encoder.c common/stream_encoder.c \
+ common/stream_encoder.h common/stream_flags_encoder.c \
+ common/vli_encoder.c common/alone_decoder.c \
+ common/alone_decoder.h common/auto_decoder.c \
+ common/block_buffer_decoder.c common/block_decoder.c \
+ common/block_decoder.h common/block_header_decoder.c \
+ common/easy_decoder_memusage.c common/filter_buffer_decoder.c \
+ common/filter_decoder.c common/filter_decoder.h \
+ common/filter_flags_decoder.c common/index_decoder.c \
+ common/index_hash.c common/stream_buffer_decoder.c \
+ common/stream_decoder.c common/stream_decoder.h \
+ common/stream_flags_decoder.c common/vli_decoder.c \
+ check/check.c check/check.h check/crc_macros.h \
+ check/crc32_small.c check/crc32_table.c check/crc32_table_le.h \
+ check/crc32_table_be.h check/crc32_x86.S check/crc32_fast.c \
+ check/crc64_small.c check/crc64_table.c check/crc64_table_le.h \
check/crc64_table_be.h check/crc64_x86.S check/crc64_fast.c \
check/sha256.c lz/lz_encoder.c lz/lz_encoder.h \
- lz/lz_encoder_hash.h lz/lz_encoder_mf.c lz/lz_decoder.c \
- lz/lz_decoder.h lzma/lzma_common.h lzma/fastpos.h \
- lzma/lzma_encoder.h lzma/lzma_encoder.c \
- lzma/lzma_encoder_presets.c lzma/lzma_encoder_private.h \
- lzma/lzma_encoder_optimum_fast.c \
+ lz/lz_encoder_hash.h lz/lz_encoder_hash_table.h \
+ lz/lz_encoder_mf.c lz/lz_decoder.c lz/lz_decoder.h \
+ lzma/lzma_common.h lzma/fastpos.h lzma/lzma_encoder.h \
+ lzma/lzma_encoder.c lzma/lzma_encoder_presets.c \
+ lzma/lzma_encoder_private.h lzma/lzma_encoder_optimum_fast.c \
lzma/lzma_encoder_optimum_normal.c lzma/fastpos_table.c \
lzma/lzma_decoder.c lzma/lzma_decoder.h lzma/lzma2_encoder.c \
lzma/lzma2_encoder.h lzma/lzma2_decoder.c lzma/lzma2_decoder.h \
@@ -354,22 +359,24 @@ am__objects_14 =
@COND_FILTER_ARMTHUMB_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_33 = liblzma_la-armthumb.lo
@COND_FILTER_SIMPLE_TRUE@@COND_FILTER_SPARC_TRUE@am__objects_34 = liblzma_la-sparc.lo
@COND_W32_TRUE@am__objects_35 = liblzma_w32res.lo
-am_liblzma_la_OBJECTS = liblzma_la-common.lo liblzma_la-block_util.lo \
+am_liblzma_la_OBJECTS = liblzma_la-tuklib_physmem.lo \
+ liblzma_la-common.lo liblzma_la-block_util.lo \
liblzma_la-easy_preset.lo liblzma_la-filter_common.lo \
- liblzma_la-index.lo liblzma_la-stream_flags_common.lo \
- liblzma_la-vli_size.lo $(am__objects_1) $(am__objects_2) \
- liblzma_la-check.lo $(am__objects_3) $(am__objects_4) \
- $(am__objects_5) $(am__objects_6) $(am__objects_7) \
- $(am__objects_8) $(am__objects_9) $(am__objects_10) \
- $(am__objects_11) $(am__objects_12) $(am__objects_13) \
- $(am__objects_14) $(am__objects_15) $(am__objects_16) \
- $(am__objects_17) $(am__objects_18) $(am__objects_19) \
- $(am__objects_14) $(am__objects_20) $(am__objects_14) \
- $(am__objects_21) $(am__objects_22) $(am__objects_23) \
- $(am__objects_24) $(am__objects_25) $(am__objects_26) \
- $(am__objects_27) $(am__objects_28) $(am__objects_29) \
- $(am__objects_30) $(am__objects_31) $(am__objects_32) \
- $(am__objects_33) $(am__objects_34) $(am__objects_35)
+ liblzma_la-hardware_physmem.lo liblzma_la-index.lo \
+ liblzma_la-stream_flags_common.lo liblzma_la-vli_size.lo \
+ $(am__objects_1) $(am__objects_2) liblzma_la-check.lo \
+ $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+ $(am__objects_6) $(am__objects_7) $(am__objects_8) \
+ $(am__objects_9) $(am__objects_10) $(am__objects_11) \
+ $(am__objects_12) $(am__objects_13) $(am__objects_14) \
+ $(am__objects_15) $(am__objects_16) $(am__objects_17) \
+ $(am__objects_18) $(am__objects_19) $(am__objects_14) \
+ $(am__objects_20) $(am__objects_14) $(am__objects_21) \
+ $(am__objects_22) $(am__objects_23) $(am__objects_24) \
+ $(am__objects_25) $(am__objects_26) $(am__objects_27) \
+ $(am__objects_28) $(am__objects_29) $(am__objects_30) \
+ $(am__objects_31) $(am__objects_32) $(am__objects_33) \
+ $(am__objects_34) $(am__objects_35)
liblzma_la_OBJECTS = $(am_liblzma_la_OBJECTS)
liblzma_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -488,6 +495,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -505,7 +513,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -590,24 +597,26 @@ EXTRA_DIST = check/crc32_tablegen.c check/crc64_tablegen.c \
CLEANFILES = $(am__append_38)
doc_DATA = $(am__append_41)
lib_LTLIBRARIES = liblzma.la
-liblzma_la_SOURCES = common/common.c common/common.h common/bsr.h \
- common/block_util.c common/easy_preset.c common/easy_preset.h \
- common/filter_common.c common/filter_common.h common/index.c \
- common/index.h common/stream_flags_common.c \
- common/stream_flags_common.h common/vli_size.c $(am__append_1) \
- $(am__append_2) check/check.c check/check.h check/crc_macros.h \
- $(am__append_3) $(am__append_4) $(am__append_5) \
- $(am__append_6) $(am__append_7) $(am__append_8) \
- $(am__append_9) $(am__append_10) $(am__append_11) \
- $(am__append_12) $(am__append_13) $(am__append_15) \
- $(am__append_16) $(am__append_17) $(am__append_18) \
- $(am__append_19) $(am__append_20) $(am__append_21) \
- $(am__append_22) $(am__append_23) $(am__append_24) \
- $(am__append_25) $(am__append_26) $(am__append_27) \
- $(am__append_28) $(am__append_29) $(am__append_30) \
- $(am__append_31) $(am__append_32) $(am__append_33) \
- $(am__append_34) $(am__append_35) $(am__append_36) \
- $(am__append_37) $(am__append_39)
+liblzma_la_SOURCES = $(top_srcdir)/src/common/tuklib_physmem.c \
+ common/common.c common/common.h common/block_util.c \
+ common/easy_preset.c common/easy_preset.h \
+ common/filter_common.c common/filter_common.h \
+ common/hardware_physmem.c common/index.c common/index.h \
+ common/stream_flags_common.c common/stream_flags_common.h \
+ common/vli_size.c $(am__append_1) $(am__append_2) \
+ check/check.c check/check.h check/crc_macros.h $(am__append_3) \
+ $(am__append_4) $(am__append_5) $(am__append_6) \
+ $(am__append_7) $(am__append_8) $(am__append_9) \
+ $(am__append_10) $(am__append_11) $(am__append_12) \
+ $(am__append_13) $(am__append_15) $(am__append_16) \
+ $(am__append_17) $(am__append_18) $(am__append_19) \
+ $(am__append_20) $(am__append_21) $(am__append_22) \
+ $(am__append_23) $(am__append_24) $(am__append_25) \
+ $(am__append_26) $(am__append_27) $(am__append_28) \
+ $(am__append_29) $(am__append_30) $(am__append_31) \
+ $(am__append_32) $(am__append_33) $(am__append_34) \
+ $(am__append_35) $(am__append_36) $(am__append_37) \
+ $(am__append_39)
liblzma_la_CPPFLAGS = \
-I$(top_srcdir)/src/liblzma/api \
-I$(top_srcdir)/src/liblzma/common \
@@ -618,7 +627,8 @@ liblzma_la_CPPFLAGS = \
-I$(top_srcdir)/src/liblzma/subblock \
-I$(top_srcdir)/src/liblzma/delta \
-I$(top_srcdir)/src/liblzma/simple \
- -I$(top_srcdir)/src/common
+ -I$(top_srcdir)/src/common \
+ -DTUKLIB_SYMBOL_PREFIX=lzma_
liblzma_la_LDFLAGS = -no-undefined -version-info 0:0:0 \
$(am__append_40)
@@ -738,6 +748,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_encoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_flags_decoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_flags_encoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-hardware_physmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-ia64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index_decoder.Plo@am__quote@
@@ -770,6 +781,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-subblock_decoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-subblock_decoder_helper.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-subblock_encoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-tuklib_physmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_decoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_encoder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_size.Plo@am__quote@
@@ -831,6 +843,13 @@ liblzma_la-crc64_x86.lo: check/crc64_x86.S
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+liblzma_la-tuklib_physmem.lo: $(top_srcdir)/src/common/tuklib_physmem.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-tuklib_physmem.lo -MD -MP -MF $(DEPDIR)/liblzma_la-tuklib_physmem.Tpo -c -o liblzma_la-tuklib_physmem.lo `test -f '$(top_srcdir)/src/common/tuklib_physmem.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_physmem.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liblzma_la-tuklib_physmem.Tpo $(DEPDIR)/liblzma_la-tuklib_physmem.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_physmem.c' object='liblzma_la-tuklib_physmem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-tuklib_physmem.lo `test -f '$(top_srcdir)/src/common/tuklib_physmem.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_physmem.c
+
liblzma_la-common.lo: common/common.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-common.lo -MD -MP -MF $(DEPDIR)/liblzma_la-common.Tpo -c -o liblzma_la-common.lo `test -f 'common/common.c' || echo '$(srcdir)/'`common/common.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liblzma_la-common.Tpo $(DEPDIR)/liblzma_la-common.Plo
@@ -859,6 +878,13 @@ liblzma_la-filter_common.lo: common/filter_common.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_common.lo `test -f 'common/filter_common.c' || echo '$(srcdir)/'`common/filter_common.c
+liblzma_la-hardware_physmem.lo: common/hardware_physmem.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-hardware_physmem.lo -MD -MP -MF $(DEPDIR)/liblzma_la-hardware_physmem.Tpo -c -o liblzma_la-hardware_physmem.lo `test -f 'common/hardware_physmem.c' || echo '$(srcdir)/'`common/hardware_physmem.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liblzma_la-hardware_physmem.Tpo $(DEPDIR)/liblzma_la-hardware_physmem.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common/hardware_physmem.c' object='liblzma_la-hardware_physmem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-hardware_physmem.lo `test -f 'common/hardware_physmem.c' || echo '$(srcdir)/'`common/hardware_physmem.c
+
liblzma_la-index.lo: common/index.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-index.lo -MD -MP -MF $(DEPDIR)/liblzma_la-index.Tpo -c -o liblzma_la-index.lo `test -f 'common/index.c' || echo '$(srcdir)/'`common/index.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liblzma_la-index.Tpo $(DEPDIR)/liblzma_la-index.Plo
@@ -1388,7 +1414,7 @@ uninstall-pkgconfigDATA:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -1413,7 +1439,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.am
index 0992d221044..4536b0ac320 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.am
@@ -14,6 +14,7 @@ nobase_include_HEADERS = \
lzma/container.h \
lzma/delta.h \
lzma/filter.h \
+ lzma/hardware.h \
lzma/index.h \
lzma/index_hash.h \
lzma/lzma.h \
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.in
index f4f9a3e7302..810f3bf0cc7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -40,15 +40,18 @@ DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -135,6 +138,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -152,7 +156,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -240,6 +243,7 @@ nobase_include_HEADERS = \
lzma/container.h \
lzma/delta.h \
lzma/filter.h \
+ lzma/hardware.h \
lzma/index.h \
lzma/index_hash.h \
lzma/lzma.h \
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma.h
index 44de60a16f5..84279211cf3 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma.h
@@ -95,8 +95,8 @@
/* Use the standard inttypes.h. */
# ifdef __cplusplus
/*
- * C99 sections 7.18.2 and 7.18.4 specify that
- * in C++ implementations define the limit
+ * C99 sections 7.18.2 and 7.18.4 specify
+ * that C++ implementations define the limit
* and constant macros only if specifically
* requested. Note that if you want the
* format macros (PRIu64 etc.) too, you need
@@ -162,10 +162,9 @@
******************/
/*
- * Some systems require (or at least recommend) that the functions and
- * function pointers are declared specially in the headers. LZMA_API_IMPORT
- * is for importing symbols and LZMA_API_CALL is to specify calling
- * convention.
+ * Some systems require that the functions and function pointers are
+ * declared specially in the headers. LZMA_API_IMPORT is for importing
+ * symbols and LZMA_API_CALL is to specify the calling convention.
*
* By default it is assumed that the application will link dynamically
* against liblzma. #define LZMA_API_STATIC in your application if you
@@ -174,11 +173,14 @@
* against static liblzma on them, don't worry about LZMA_API_STATIC. That
* is, most developers will never need to use LZMA_API_STATIC.
*
- * Cygwin is a special case on Windows. We rely on GCC doing the right thing
- * and thus don't use dllimport and don't specify the calling convention.
+ * The GCC variants are a special case on Windows (Cygwin and MinGW).
+ * We rely on GCC doing the right thing with its auto-import feature,
+ * and thus don't use __declspec(dllimport). This way developers don't
+ * need to worry about LZMA_API_STATIC. Also the calling convention is
+ * omitted on Cygwin but not on MinGW.
*/
#ifndef LZMA_API_IMPORT
-# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__CYGWIN__)
+# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)
# else
# define LZMA_API_IMPORT
@@ -210,7 +212,7 @@
#ifndef lzma_nothrow
# if defined(__cplusplus)
# define lzma_nothrow throw()
-# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define lzma_nothrow __attribute__((__nothrow__))
# else
# define lzma_nothrow
@@ -232,10 +234,6 @@
# define lzma_attribute(attr) __attribute__(attr)
# endif
-# ifndef lzma_restrict
-# define lzma_restrict __restrict__
-# endif
-
/* warn_unused_result was added in GCC 3.4. */
# ifndef lzma_attr_warn_unused_result
# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
@@ -247,14 +245,6 @@
# ifndef lzma_attribute
# define lzma_attribute(attr)
# endif
-
-# ifndef lzma_restrict
-# if __STDC_VERSION__ >= 199901L
-# define lzma_restrict restrict
-# else
-# define lzma_restrict
-# endif
-# endif
#endif
@@ -308,6 +298,9 @@ extern "C" {
#include "lzma/index.h"
#include "lzma/index_hash.h"
+/* Hardware information */
+#include "lzma/hardware.h"
+
/*
* All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
* re-including the subheaders.
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/base.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/base.h
index 01555068659..993626a4cdf 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/base.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/base.h
@@ -81,7 +81,7 @@ typedef enum {
* the decoder. LZMA_NO_CHECK is just a warning, and
* the decoding can be continued normally.
*
- * It is possible to call lzma_get_check() immediatelly after
+ * It is possible to call lzma_get_check() immediately after
* lzma_code has returned LZMA_NO_CHECK. The result will
* naturally be LZMA_CHECK_NONE, but the possibility to call
* lzma_get_check() may be convenient in some applications.
@@ -107,7 +107,7 @@ typedef enum {
* errors may go undetected.
*
* With decoder, it is possible to call lzma_get_check()
- * immediatelly after lzma_code() has returned
+ * immediately after lzma_code() has returned
* LZMA_UNSUPPORTED_CHECK. This way it is possible to find
* out what the unsupported Check ID was.
*/
@@ -280,7 +280,7 @@ typedef enum {
*
* Using LZMA_SYNC_FLUSH very often can dramatically reduce
* the compression ratio. With some filters (for example,
- * LZMA2), finetuning the compression options may help
+ * LZMA2), fine-tuning the compression options may help
* mitigate this problem significantly.
*
* Decoders don't support LZMA_SYNC_FLUSH.
@@ -489,7 +489,7 @@ typedef struct {
/**
* \brief Initialization for lzma_stream
*
- * When you declare an instance of lzma_stream, you can immediatelly
+ * When you declare an instance of lzma_stream, you can immediately
* initialize it so that initialization functions know that no memory
* has been allocated yet:
*
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/bcj.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/bcj.h
index 274bf6c735c..82e4a440b21 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/bcj.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/bcj.h
@@ -77,7 +77,7 @@ typedef struct {
* This setting is useful only when the same filter is used
* _separately_ for multiple sections of the same executable file,
* and the sections contain cross-section branch/call/jump
- * instructions. In that case it is benefical to set the start
+ * instructions. In that case it is beneficial to set the start
* offset of the non-first sections so that the relative addresses
* of the cross-section branch/call/jump instructions will use the
* same absolute addresses as in the first section.
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/block.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/block.h
index 10e97446640..8e681ed2811 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/block.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/block.h
@@ -32,27 +32,14 @@ typedef struct {
* \brief Block format version
*
* To prevent API and ABI breakages if new features are needed in
- * Block, a version number is used to indicate which fields in this
- * structure are in use. For now, version must always be zero.
- * With non-zero version, most Block related functions will return
- * LZMA_OPTIONS_ERROR.
- *
- * The decoding functions will always set this to the lowest value
- * that supports all the features indicated by the Block Header field.
- * The application must check that the version number set by the
- * decoding functions is supported by the application. Otherwise it
- * is possible that the application will decode the Block incorrectly.
+ * the Block field, a version number is used to indicate which
+ * fields in this structure are in use. For now, version must always
+ * be zero. With non-zero version, most Block related functions will
+ * return LZMA_OPTIONS_ERROR.
*
* Read by:
- * - lzma_block_header_size()
- * - lzma_block_header_encode()
- * - lzma_block_compressed_size()
- * - lzma_block_unpadded_size()
- * - lzma_block_total_size()
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
+ * - All functions that take pointer to lzma_block as argument,
+ * including lzma_block_header_decode().
*
* Written by:
* - lzma_block_header_decode()
@@ -323,13 +310,18 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
/**
* \brief Decode Block Header
*
+ * block->version should be set to the highest value supported by the
+ * application; currently the only possible version is zero. This function
+ * will set version to the lowest value that still supports all the features
+ * required by the Block Header.
+ *
* The size of the Block Header must have already been decoded with
* lzma_block_header_size_decode() macro and stored to block->header_size.
+ *
* block->filters must have been allocated, but not necessarily initialized.
* Possible existing filter options are _not_ freed.
*
- * \param block Destination for block options with header_size
- * properly initialized.
+ * \param block Destination for Block options.
* \param allocator lzma_allocator for custom allocator functions.
* Set to NULL to use malloc() (and also free()
* if an error occurs).
@@ -339,7 +331,10 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
* \return - LZMA_OK: Decoding was successful. block->header_size
* bytes were read from the input buffer.
* - LZMA_OPTIONS_ERROR: The Block Header specifies some
- * unsupported options such as unsupported filters.
+ * unsupported options such as unsupported filters. This can
+ * happen also if block->version was set to a too low value
+ * compared to what would be required to properly represent
+ * the information stored in the Block Header.
* - LZMA_DATA_ERROR: Block Header is corrupt, for example,
* the CRC32 doesn't match.
* - LZMA_PROG_ERROR: Invalid arguments, for example
@@ -419,7 +414,7 @@ extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
* \return - LZMA_OK: All good, continue with lzma_code().
* - LZMA_MEM_ERROR
* - LZMA_OPTIONS_ERROR
- * - LZMA_UNSUPPORTED_CHECK: block->check specfies a Check ID
+ * - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
* that is not supported by this buid of liblzma. Initializing
* the encoder failed.
* - LZMA_PROG_ERROR
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/check.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/check.h
index 5661bbe5d40..6a243db0d79 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/check.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/check.h
@@ -142,7 +142,7 @@ extern LZMA_API(uint64_t) lzma_crc64(
/**
* \brief Get the type of the integrity check
*
- * This function can be called only immediatelly after lzma_code() has
+ * This function can be called only immediately after lzma_code() has
* returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
* Calling this function in any other situation has undefined behavior.
*/
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/container.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/container.h
index 0d907650fc4..0d907650fc4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/container.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/container.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/delta.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/delta.h
index 592fc4f8496..592fc4f8496 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/delta.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/delta.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/filter.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/filter.h
index 8d0db96bcc1..038a93398c6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/filter.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/filter.h
@@ -95,6 +95,37 @@ extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
/**
+ * \brief Copy the filters array
+ *
+ * Copy the Filter IDs and filter-specific options from src to dest.
+ * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating
+ * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least
+ * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that
+ * src is smaller than that.
+ *
+ * Unless the filter-specific options is NULL, the Filter ID has to be
+ * supported by liblzma, because liblzma needs to know the size of every
+ * filter-specific options structure. The filter-specific options are not
+ * validated. If options is NULL, any unsupported Filter IDs are copied
+ * without returning an error.
+ *
+ * Old filter-specific options in dest are not freed, so dest doesn't
+ * need to be initialized by the caller in any way.
+ *
+ * If an error occurs, memory possibly already allocated by this function
+ * is always freed.
+ *
+ * \return - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
+ * is not NULL.
+ * - LZMA_PROG_ERROR: src or dest is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
+ lzma_filter *dest, lzma_allocator *allocator) lzma_nothrow;
+
+
+/**
* \brief Calculate rough memory requirements for raw encoder
*
* Because the calculation is rough, this function can be used to calculate
@@ -167,6 +198,36 @@ extern LZMA_API(lzma_ret) lzma_raw_decoder(
/**
+ * \brief Update the filter chain in the encoder
+ *
+ * This function is for advanced users only. This function has two slightly
+ * different purposes:
+ *
+ * - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter
+ * chain, which will be used starting from the next Block.
+ *
+ * - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change
+ * the filter-specific options in the middle of encoding. The actual
+ * filters in the chain (Filter IDs) cannot be changed. In the future,
+ * it might become possible to change the filter options without
+ * using LZMA_SYNC_FLUSH.
+ *
+ * While rarely useful, this function may be called also when no data has
+ * been compressed yet. In that case, this function will behave as if
+ * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block
+ * encoder) had been used right before calling this function.
+ *
+ * \return - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_filters_update(
+ lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
+
+
+/**
* \brief Single-call raw encoder
*
* \param filters Array of lzma_filter structures. The end of the
@@ -229,7 +290,7 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
* using the raw encoder and decoder.
*
* \param size Pointer to uint32_t to hold the size of the properties
- * \param filter Filter ID and options (the size of the propeties may
+ * \param filter Filter ID and options (the size of the properties may
* vary depending on the options)
*
* \return - LZMA_OK
@@ -304,7 +365,7 @@ extern LZMA_API(lzma_ret) lzma_properties_decode(
*
* \param size Pointer to integer to hold the calculated size
* \param filters Filter ID and associated options whose encoded
- * size is to be calculted
+ * size is to be calculated
*
* \return - LZMA_OK: *size set successfully. Note that this doesn't
* guarantee that filters->options is valid, thus
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/hardware.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/hardware.h
new file mode 100644
index 00000000000..f44cb602ff9
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/hardware.h
@@ -0,0 +1,51 @@
+/**
+ * \file lzma/hardware.h
+ * \brief Hardware information
+ *
+ * Since liblzma can consume a lot of system resources, it also provides
+ * ways to limit the resource usage. Applications linking against liblzma
+ * need to do the actual decisions how much resources to let liblzma to use.
+ * To ease making these decisions, liblzma provides functions to find out
+ * the relevant capabilities of the underlaying hardware. Currently there
+ * is only a function to find out the amount of RAM, but in the future there
+ * will be also a function to detect how many concurrent threads the system
+ * can run.
+ *
+ * \note On some operating systems, these function may temporarily
+ * load a shared library or open file descriptor(s) to find out
+ * the requested hardware information. Unless the application
+ * assumes that specific file descriptors are not touched by
+ * other threads, this should have no effect on thread safety.
+ * Possible operations involving file descriptors will restart
+ * the syscalls if they return EINTR.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Get the total amount of physical memory (RAM) in bytes
+ *
+ * This function may be useful when determining a reasonable memory
+ * usage limit for decompressing or how much memory it is OK to use
+ * for compressing. For example, the default limit used by the xz
+ * command line tool is 40 % of RAM.
+ *
+ * \return On success, the total amount of physical memory in bytes
+ * is returned. If the amount of RAM cannot be determined,
+ * zero is returned. This can happen if an error occurs
+ * or if there is no code in liblzma to detect the amount
+ * of RAM on the specific operating system.
+ */
+extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index.h
new file mode 100644
index 00000000000..a0469b23c34
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index.h
@@ -0,0 +1,676 @@
+/**
+ * \file lzma/index.h
+ * \brief Handling of .xz Index and related information
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * See ../lzma.h for information about liblzma as a whole.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Opaque data type to hold the Index(es) and other information
+ *
+ * lzma_index often holds just one .xz Index and possibly the Stream Flags
+ * of the same Stream and size of the Stream Padding field. However,
+ * multiple lzma_indexes can be concatenated with lzma_index_cat() and then
+ * there may be information about multiple Streams in the same lzma_index.
+ *
+ * Notes about thread safety: Only one thread may modify lzma_index at
+ * a time. All functions that take non-const pointer to lzma_index
+ * modify it. As long as no thread is modifying the lzma_index, getting
+ * information from the same lzma_index can be done from multiple threads
+ * at the same time with functions that take a const pointer to
+ * lzma_index or use lzma_index_iter. The same iterator must be used
+ * only by one thread at a time, of course, but there can be as many
+ * iterators for the same lzma_index as needed.
+ */
+typedef struct lzma_index_s lzma_index;
+
+
+/**
+ * \brief Iterator to get information about Blocks and Streams
+ */
+typedef struct {
+ struct {
+ /**
+ * \brief Pointer to Stream Flags
+ *
+ * This is NULL if Stream Flags have not been set for
+ * this Stream with lzma_index_stream_flags().
+ */
+ const lzma_stream_flags *flags;
+
+ const void *reserved_ptr1;
+ const void *reserved_ptr2;
+ const void *reserved_ptr3;
+
+ /**
+ * \brief Stream number in the lzma_index
+ *
+ * The first Stream is 1.
+ */
+ lzma_vli number;
+
+ /**
+ * \brief Number of Blocks in the Stream
+ *
+ * If this is zero, the block structure below has
+ * undefined values.
+ */
+ lzma_vli block_count;
+
+ /**
+ * \brief Compressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli compressed_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli uncompressed_offset;
+
+ /**
+ * \brief Compressed size of this Stream
+ *
+ * This includes all headers except the possible
+ * Stream Padding after this Stream.
+ */
+ lzma_vli compressed_size;
+
+ /**
+ * \brief Uncompressed size of this Stream
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Size of Stream Padding after this Stream
+ *
+ * If it hasn't been set with lzma_index_stream_padding(),
+ * this defaults to zero. Stream Padding is always
+ * a multiple of four bytes.
+ */
+ lzma_vli padding;
+
+ lzma_vli reserved_vli1;
+ lzma_vli reserved_vli2;
+ lzma_vli reserved_vli3;
+ lzma_vli reserved_vli4;
+ } stream;
+
+ struct {
+ /**
+ * \brief Block number in the file
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_file;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the
+ * lzma_index (i.e. usually the beginning of the .xz file).
+ * Normally this is where you should seek in the .xz file
+ * to start decompressing this Block.
+ */
+ lzma_vli compressed_file_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli uncompressed_file_offset;
+
+ /**
+ * \brief Block number in this Stream
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_stream;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli compressed_stream_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli uncompressed_stream_offset;
+
+ /**
+ * \brief Uncompressed size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block.
+ *
+ * When doing random-access reading, it is possible that
+ * the target offset is not exactly at Block boundary. One
+ * will need to compare the target offset against
+ * uncompressed_file_offset or uncompressed_stream_offset,
+ * and possibly decode and throw away some amount of data
+ * before reaching the target offset.
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Unpadded size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block.
+ */
+ lzma_vli unpadded_size;
+
+ /**
+ * \brief Total compressed size
+ *
+ * This includes all headers and padding in this Block.
+ * This is useful if you need to know how many bytes
+ * the Block decoder will actually read.
+ */
+ lzma_vli total_size;
+
+ lzma_vli reserved_vli1;
+ lzma_vli reserved_vli2;
+ lzma_vli reserved_vli3;
+ lzma_vli reserved_vli4;
+
+ const void *reserved_ptr1;
+ const void *reserved_ptr2;
+ const void *reserved_ptr3;
+ const void *reserved_ptr4;
+ } block;
+
+ /*
+ * Internal data which is used to store the state of the iterator.
+ * The exact format may vary between liblzma versions, so don't
+ * touch these in any way.
+ */
+ union {
+ const void *p;
+ size_t s;
+ lzma_vli v;
+ } internal[6];
+} lzma_index_iter;
+
+
+/**
+ * \brief Operation mode for lzma_index_iter_next()
+ */
+typedef enum {
+ LZMA_INDEX_ITER_ANY = 0,
+ /**<
+ * \brief Get the next Block or Stream
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. Otherwise go to the next Stream even if
+ * it has no Blocks. If the Stream has no Blocks
+ * (lzma_index_iter.stream.block_count == 0),
+ * lzma_index_iter.block will have undefined values.
+ */
+
+ LZMA_INDEX_ITER_STREAM = 1,
+ /**<
+ * \brief Get the next Stream
+ *
+ * Go to the next Stream even if the current Stream has
+ * unread Blocks left. If the next Stream has at least one
+ * Block, the iterator will point to the first Block.
+ * If there are no Blocks, lzma_index_iter.block will have
+ * undefined values.
+ */
+
+ LZMA_INDEX_ITER_BLOCK = 2,
+ /**<
+ * \brief Get the next Block
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. If the current Stream has no Blocks left,
+ * the next Stream with at least one Block is located and
+ * the iterator will be made to point to the first Block of
+ * that Stream.
+ */
+
+ LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3
+ /**<
+ * \brief Get the next non-empty Block
+ *
+ * This is like LZMA_INDEX_ITER_BLOCK except that it will
+ * skip Blocks whose Uncompressed Size is zero.
+ */
+
+} lzma_index_iter_mode;
+
+
+/**
+ * \brief Calculate memory usage of lzma_index
+ *
+ * On disk, the size of the Index field depends on both the number of Records
+ * stored and how big values the Records store (due to variable-length integer
+ * encoding). When the Index is kept in lzma_index structure, the memory usage
+ * depends only on the number of Records/Blocks stored in the Index(es), and
+ * in case of concatenated lzma_indexes, the number of Streams. The size in
+ * RAM is almost always significantly bigger than in the encoded form on disk.
+ *
+ * This function calculates an approximate amount of memory needed hold
+ * the given number of Streams and Blocks in lzma_index structure. This
+ * value may vary between CPU architectures and also between liblzma versions
+ * if the internal implementation is modified.
+ */
+extern LZMA_API(uint64_t) lzma_index_memusage(
+ lzma_vli streams, lzma_vli blocks) lzma_nothrow;
+
+
+/**
+ * \brief Calculate the memory usage of an existing lzma_index
+ *
+ * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
+ * lzma_index_block_count(i)).
+ */
+extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
+ lzma_nothrow;
+
+
+/**
+ * \brief Allocate and initialize a new lzma_index structure
+ *
+ * \return On success, a pointer to an empty initialized lzma_index is
+ * returned. If allocation fails, NULL is returned.
+ */
+extern LZMA_API(lzma_index *) lzma_index_init(lzma_allocator *allocator)
+ lzma_nothrow;
+
+
+/**
+ * \brief Deallocate lzma_index
+ *
+ * If i is NULL, this does nothing.
+ */
+extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator)
+ lzma_nothrow;
+
+
+/**
+ * \brief Add a new Block to lzma_index
+ *
+ * \param i Pointer to a lzma_index structure
+ * \param allocator Pointer to lzma_allocator, or NULL to
+ * use malloc()
+ * \param unpadded_size Unpadded Size of a Block. This can be
+ * calculated with lzma_block_unpadded_size()
+ * after encoding or decoding the Block.
+ * \param uncompressed_size Uncompressed Size of a Block. This can be
+ * taken directly from lzma_block structure
+ * after encoding or decoding the Block.
+ *
+ * Appending a new Block does not invalidate iterators. For example,
+ * if an iterator was pointing to the end of the lzma_index, after
+ * lzma_index_append() it is possible to read the next Block with
+ * an existing iterator.
+ *
+ * \return - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR: Compressed or uncompressed size of the
+ * Stream or size of the Index field would grow too big.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_append(
+ lzma_index *i, lzma_allocator *allocator,
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Set the Stream Flags
+ *
+ * Set the Stream Flags of the last (and typically the only) Stream
+ * in lzma_index. This can be useful when reading information from the
+ * lzma_index, because to decode Blocks, knowing the integrity check type
+ * is needed.
+ *
+ * The given Stream Flags are copied into internal preallocated structure
+ * in the lzma_index, thus the caller doesn't need to keep the *stream_flags
+ * available after calling this function.
+ *
+ * \return - LZMA_OK
+ * - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_flags(
+ lzma_index *i, const lzma_stream_flags *stream_flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Get the types of integrity Checks
+ *
+ * If lzma_index_stream_padding() is used to set the Stream Flags for
+ * every Stream, lzma_index_checks() can be used to get a bitmask to
+ * indicate which Check types have been used. It can be useful e.g. if
+ * showing the Check types to the user.
+ *
+ * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
+ */
+extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Set the amount of Stream Padding
+ *
+ * Set the amount of Stream Padding of the last (and typically the only)
+ * Stream in the lzma_index. This is needed when planning to do random-access
+ * reading within multiple concatenated Streams.
+ *
+ * By default, the amount of Stream Padding is assumed to be zero bytes.
+ *
+ * \return - LZMA_OK
+ * - LZMA_DATA_ERROR: The file size would grow too big.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_padding(
+ lzma_index *i, lzma_vli stream_padding)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Get the number of Streams
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the number of Blocks
+ *
+ * This returns the total number of Blocks in lzma_index. To get number
+ * of Blocks in individual Streams, use lzma_index_iter.
+ */
+extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the size of the Index field as bytes
+ *
+ * This is needed to verify the Backward Size field in the Stream Footer.
+ */
+extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the Stream
+ *
+ * If multiple lzma_indexes have been combined, this works as if the Blocks
+ * were in a single Stream. This is useful if you are going to combine
+ * Blocks from multiple Streams into a single new Stream.
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the Blocks
+ *
+ * This doesn't include the Stream Header, Stream Footer, Stream Padding,
+ * or Index fields.
+ */
+extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the file
+ *
+ * When no lzma_indexes have been combined with lzma_index_cat() and there is
+ * no Stream Padding, this function is identical to lzma_index_stream_size().
+ * If multiple lzma_indexes have been combined, this includes also the headers
+ * of each separate Stream and the possible Stream Padding fields.
+ */
+extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the uncompressed size of the file
+ */
+extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize an iterator
+ *
+ * \param iter Pointer to a lzma_index_iter structure
+ * \param i lzma_index to which the iterator will be associated
+ *
+ * This function associates the iterator with the given lzma_index, and calls
+ * lzma_index_iter_rewind() on the iterator.
+ *
+ * This function doesn't allocate any memory, thus there is no
+ * lzma_index_iter_end(). The iterator is valid as long as the
+ * associated lzma_index is valid, that is, until lzma_index_end() or
+ * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't
+ * become invalid if new Blocks are added to it with lzma_index_append() or
+ * if it is used as the destination in lzma_index_cat().
+ *
+ * It is safe to make copies of an initialized lzma_index_iter, for example,
+ * to easily restart reading at some particular position.
+ */
+extern LZMA_API(void) lzma_index_iter_init(
+ lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
+
+
+/**
+ * \brief Rewind the iterator
+ *
+ * Rewind the iterator so that next call to lzma_index_iter_next() will
+ * return the first Block or Stream.
+ */
+extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
+ lzma_nothrow;
+
+
+/**
+ * \brief Get the next Block or Stream
+ *
+ * \param iter Iterator initialized with lzma_index_iter_init()
+ * \param mode Specify what kind of information the caller wants
+ * to get. See lzma_index_iter_mode for details.
+ *
+ * \return If next Block or Stream matching the mode was found, *iter
+ * is updated and this function returns false. If no Block or
+ * Stream matching the mode is found, *iter is not modified
+ * and this function returns true. If mode is set to an unknown
+ * value, *iter is not modified and this function returns true.
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_next(
+ lzma_index_iter *iter, lzma_index_iter_mode mode)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Locate a Block
+ *
+ * If it is possible to seek in the .xz file, it is possible to parse
+ * the Index field(s) and use lzma_index_iter_locate() to do random-access
+ * reading with granularity of Block size.
+ *
+ * \param iter Iterator that was earlier initialized with
+ * lzma_index_iter_init().
+ * \param target Uncompressed target offset which the caller would
+ * like to locate from the Stream
+ *
+ * If the target is smaller than the uncompressed size of the Stream (can be
+ * checked with lzma_index_uncompressed_size()):
+ * - Information about the Stream and Block containing the requested
+ * uncompressed offset is stored into *iter.
+ * - Internal state of the iterator is adjusted so that
+ * lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
+ * - This function returns false.
+ *
+ * If target is greater than the uncompressed size of the Stream, *iter
+ * is not modified, and this function returns true.
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_locate(
+ lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
+
+
+/**
+ * \brief Concatenate lzma_indexes
+ *
+ * Concatenating lzma_indexes is useful when doing random-access reading in
+ * multi-Stream .xz file, or when combining multiple Streams into single
+ * Stream.
+ *
+ * \param dest lzma_index after which src is appended
+ * \param src lzma_index to be appended after dest. If this
+ * function succeeds, the memory allocated for src
+ * is freed or moved to be part of dest, and all
+ * iterators pointing to src will become invalid.
+ * \param allocator Custom memory allocator; can be NULL to use
+ * malloc() and free().
+ *
+ * \return - LZMA_OK: lzma_indexes were concatenated successfully.
+ * src is now a dangling pointer.
+ * - LZMA_DATA_ERROR: *dest would grow too big.
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_cat(
+ lzma_index *dest, lzma_index *src, lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Duplicate lzma_index
+ *
+ * \return A copy of the lzma_index, or NULL if memory allocation failed.
+ */
+extern LZMA_API(lzma_index *) lzma_index_dup(
+ const lzma_index *i, lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .xz Index encoder
+ *
+ * \param strm Pointer to properly prepared lzma_stream
+ * \param i Pointer to lzma_index which should be encoded.
+ *
+ * The only valid action value for lzma_code() is LZMA_RUN.
+ *
+ * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_encoder(
+ lzma_stream *strm, const lzma_index *i)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .xz Index decoder
+ *
+ * \param strm Pointer to properly prepared lzma_stream
+ * \param i The decoded Index will be made available via
+ * this pointer. Initially this function will
+ * set *i to NULL (the old value is ignored). If
+ * decoding succeeds (lzma_code() returns
+ * LZMA_STREAM_END), *i will be set to point
+ * to a new lzma_index, which the application
+ * has to later free with lzma_index_end().
+ * \param memlimit How much memory the resulting lzma_index is
+ * allowed to require.
+ *
+ * The only valid action value for lzma_code() is LZMA_RUN.
+ *
+ * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_decoder(
+ lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call .xz Index encoder
+ *
+ * \param i lzma_index to be encoded
+ * \param out Beginning of the output buffer
+ * \param out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Output buffer is too small. Use
+ * lzma_index_size() to find out how much output
+ * space is needed.
+ * - LZMA_PROG_ERROR
+ *
+ * \note This function doesn't take allocator argument since all
+ * the internal data is allocated on stack.
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Single-call .xz Index decoder
+ *
+ * \param i If decoding succeeds, *i will point to a new
+ * lzma_index, which the application has to
+ * later free with lzma_index_end(). If an error
+ * occurs, *i will be NULL. The old value of *i
+ * is always ignored and thus doesn't need to be
+ * initialized by the caller.
+ * \param memlimit Pointer to how much memory the resulting
+ * lzma_index is allowed to require. The value
+ * pointed by this pointer is modified if and only
+ * if LZMA_MEMLIMIT_ERROR is returned.
+ * \param allocator Pointer to lzma_allocator, or NULL to use malloc()
+ * \param in Beginning of the input buffer
+ * \param in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ *
+ * \return - LZMA_OK: Decoding was successful.
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ * The minimum required memlimit value was stored to *memlimit.
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
+ uint64_t *memlimit, lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index_hash.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index_hash.h
index 94726e7beea..94726e7beea 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index_hash.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/index_hash.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/lzma.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/lzma.h
index 28ebbb14b90..c17736d7eaa 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/lzma.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/lzma.h
@@ -298,19 +298,6 @@ typedef struct {
# define LZMA_PB_MAX 4
# define LZMA_PB_DEFAULT 2
- /**
- * \brief Indicate if the options structure is persistent
- *
- * If this is true, the application must keep this options structure
- * available after the LZMA2 encoder has been initialized. With
- * persistent structure it is possible to change some encoder options
- * in the middle of the encoding process without resetting the encoder.
- *
- * This option is used only by LZMA2. LZMA1 ignores this and it is
- * safe to not initialize this when encoding with LZMA1.
- */
- lzma_bool persistent;
-
/** Compression mode */
lzma_mode mode;
@@ -320,7 +307,7 @@ typedef struct {
* This determines how many bytes the encoder compares from the match
* candidates when looking for the best match. Once a match of at
* least nice_len bytes long is found, the encoder stops looking for
- * better condidates and encodes the match. (Naturally, if the found
+ * better candidates and encodes the match. (Naturally, if the found
* match is actually longer than nice_len, the actual length is
* encoded; it's not truncated to nice_len.)
*
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/stream_flags.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/stream_flags.h
index d255bdda15f..d255bdda15f 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/stream_flags.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/stream_flags.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/subblock.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/subblock.h
index 4ffb049824b..4ffb049824b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/subblock.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/subblock.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/version.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/version.h
index 36b7952dce8..0f7c2d3737d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/version.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/version.h
@@ -18,7 +18,7 @@
/*
- * Version number splitted in components
+ * Version number split into components
*/
#define LZMA_VERSION_MAJOR 4
#define LZMA_VERSION_MINOR 999
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/vli.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/vli.h
index f002c775165..57e3d3882b5 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/vli.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/api/lzma/vli.h
@@ -10,8 +10,8 @@
* number of bytes required to represent the given value. Encodings that use
* non-minimum number of bytes are invalid, thus every integer has exactly
* one encoded representation. The maximum number of bits in a VLI is 63,
- * thus the vli argument must be at maximum of UINT64_MAX / 2. You should
- * use LZMA_VLI_MAX for clarity.
+ * thus the vli argument must be less than or equal to UINT64_MAX / 2. You
+ * should use LZMA_VLI_MAX for clarity.
*/
/*
@@ -57,7 +57,7 @@
* [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN,
* which is the maximum value of the underlaying integer type.
*
- * In future, even if lzma_vli is typdefined to something else than uint64_t,
+ * In future, even if lzma_vli is defined to be something other than uint64_t,
* it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli.
* This simplifies integer overflow detection.
*/
@@ -113,9 +113,8 @@ typedef uint64_t lzma_vli;
* - LZMA_BUF_ERROR: No output space was provided.
* - LZMA_PROG_ERROR: Arguments are not sane.
*/
-extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli,
- size_t *lzma_restrict vli_pos, uint8_t *lzma_restrict out,
- size_t *lzma_restrict out_pos, size_t out_size) lzma_nothrow;
+extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
/**
@@ -153,9 +152,9 @@ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli,
* - LZMA_BUF_ERROR: No input was provided.
* - LZMA_PROG_ERROR: Arguments are not sane.
*/
-extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *lzma_restrict vli,
- size_t *lzma_restrict vli_pos, const uint8_t *lzma_restrict in,
- size_t *lzma_restrict in_pos, size_t in_size) lzma_nothrow;
+extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow;
/**
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/Makefile.inc
index e4067a9cbcb..e4067a9cbcb 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.c
index ba8622e6376..428ddaeb779 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.c
@@ -150,13 +150,13 @@ lzma_check_finish(lzma_check_state *check, lzma_check type)
switch (type) {
#ifdef HAVE_CHECK_CRC32
case LZMA_CHECK_CRC32:
- check->buffer.u32[0] = integer_le_32(check->state.crc32);
+ check->buffer.u32[0] = conv32le(check->state.crc32);
break;
#endif
#ifdef HAVE_CHECK_CRC64
case LZMA_CHECK_CRC64:
- check->buffer.u64[0] = integer_le_64(check->state.crc64);
+ check->buffer.u64[0] = conv64le(check->state.crc64);
break;
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.h
index e100d2b8530..e100d2b8530 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/check.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/check.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_fast.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_fast.c
index a308eff5829..94da85592d8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_fast.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_fast.c
@@ -29,7 +29,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
crc = ~crc;
#ifdef WORDS_BIGENDIAN
- crc = bswap_32(crc);
+ crc = bswap32(crc);
#endif
if (size > 8) {
@@ -49,7 +49,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
// Calculate the CRC32 using the slice-by-eight algorithm.
while (buf < limit) {
- crc ^= *(uint32_t *)(buf);
+ crc ^= *(const uint32_t *)(buf);
buf += 4;
crc = lzma_crc32_table[7][A(crc)]
@@ -57,7 +57,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
^ lzma_crc32_table[5][C(crc)]
^ lzma_crc32_table[4][D(crc)];
- const uint32_t tmp = *(uint32_t *)(buf);
+ const uint32_t tmp = *(const uint32_t *)(buf);
buf += 4;
// At least with some compilers, it is critical for
@@ -75,7 +75,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc);
#ifdef WORDS_BIGENDIAN
- crc = bswap_32(crc);
+ crc = bswap32(crc);
#endif
return ~crc;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_small.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_small.c
index 5f8a3286878..5f8a3286878 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_small.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_small.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table.c
index 368874eb79d..368874eb79d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_be.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_be.h
index c483cb670dc..c483cb670dc 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_be.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_be.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_le.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_le.h
index 25f4fc44353..25f4fc44353 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_table_le.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_table_le.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_tablegen.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_tablegen.c
index 0cbfecd89dd..31a4d2751db 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_tablegen.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_tablegen.c
@@ -5,6 +5,7 @@
///
/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c
/// Add -DWORDS_BIGENDIAN to generate big endian table.
+/// Add -DLZ_HASH_TABLE to generate lz_encoder_hash_table.h (little endian).
//
// Author: Lasse Collin
//
@@ -13,12 +14,8 @@
//
///////////////////////////////////////////////////////////////////////////////
-#include <inttypes.h>
#include <stdio.h>
-
-#ifdef WORDS_BIGENDIAN
-# include "../../common/bswap.h"
-#endif
+#include "../../common/tuklib_integer.h"
static uint32_t crc32_table[8][256];
@@ -47,7 +44,7 @@ init_crc32_table(void)
#ifdef WORDS_BIGENDIAN
for (size_t s = 0; s < 8; ++s)
for (size_t b = 0; b < 256; ++b)
- crc32_table[s][b] = bswap_32(crc32_table[s][b]);
+ crc32_table[s][b] = bswap32(crc32_table[s][b]);
#endif
return;
@@ -82,10 +79,39 @@ print_crc32_table(void)
}
+static void
+print_lz_table(void)
+{
+ printf("/* This file has been automatically generated by "
+ "crc32_tablegen.c. */\n\n"
+ "const uint32_t lzma_lz_hash_table[256] = {");
+
+ for (size_t b = 0; b < 256; ++b) {
+ if ((b % 4) == 0)
+ printf("\n\t");
+
+ printf("0x%08" PRIX32, crc32_table[0][b]);
+
+ if (b != 255)
+ printf(",%s", (b+1) % 4 == 0 ? "" : " ");
+ }
+
+ printf("\n};\n");
+
+ return;
+}
+
+
int
main(void)
{
init_crc32_table();
+
+#ifdef LZ_HASH_TABLE
+ print_lz_table();
+#else
print_crc32_table();
+#endif
+
return 0;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_x86.S b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_x86.S
index cca29891f82..67f68a4145f 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc32_x86.S
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc32_x86.S
@@ -67,7 +67,7 @@ init_table(void)
* Solaris assembler doesn't have .p2align, and Darwin uses .align
* differently than GNU/Linux and Solaris.
*/
-#if defined(__MACH__) || defined(__MSDOS__)
+#if defined(__APPLE__) || defined(__MSDOS__)
# define ALIGN(pow2, abs) .align pow2
#else
# define ALIGN(pow2, abs) .align abs
@@ -76,7 +76,7 @@ init_table(void)
.text
.globl LZMA_CRC32
-#if !defined(__MACH__) && !defined(_WIN32) && !defined(__CYGWIN__) \
+#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
&& !defined(__MSDOS__)
.type LZMA_CRC32, @function
#endif
@@ -118,8 +118,8 @@ LZMA_CRC32:
#if (!defined(PIC) && !defined(__PIC__)) \
|| (defined(_WIN32) || defined(__CYGWIN__))
/* Not PIC */
- movl $LZMA_CRC32_TABLE, %ebx
-#elif defined(__MACH__)
+ movl $ LZMA_CRC32_TABLE, %ebx
+#elif defined(__APPLE__)
/* Mach-O */
call .L_get_pc
.L_pic:
@@ -142,7 +142,7 @@ LZMA_CRC32:
* We need 16 bytes, because the loop pre-reads eight bytes.
*/
cmpl $16, %edi
- jl .L_rest
+ jb .L_rest
/* Check if we have reached alignment of eight bytes. */
testl $7, %esi
@@ -275,7 +275,7 @@ LZMA_CRC32:
ret
#endif
-#if defined(__MACH__) && (defined(PIC) || defined(__PIC__))
+#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
/* Mach-O PIC */
.section __IMPORT,__pointers,non_lazy_symbol_pointers
.L_lzma_crc32_table$non_lazy_ptr:
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_fast.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_fast.c
index 25557264b8a..52af29ed48d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_fast.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_fast.c
@@ -32,7 +32,7 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
crc = ~crc;
#ifdef WORDS_BIGENDIAN
- crc = bswap_64(crc);
+ crc = bswap64(crc);
#endif
if (size > 4) {
@@ -46,9 +46,10 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
while (buf < limit) {
#ifdef WORDS_BIGENDIAN
- const uint32_t tmp = (crc >> 32) ^ *(uint32_t *)(buf);
+ const uint32_t tmp = (crc >> 32)
+ ^ *(const uint32_t *)(buf);
#else
- const uint32_t tmp = crc ^ *(uint32_t *)(buf);
+ const uint32_t tmp = crc ^ *(const uint32_t *)(buf);
#endif
buf += 4;
@@ -64,7 +65,7 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
crc = lzma_crc64_table[0][*buf++ ^ A1(crc)] ^ S8(crc);
#ifdef WORDS_BIGENDIAN
- crc = bswap_64(crc);
+ crc = bswap64(crc);
#endif
return ~crc;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_small.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_small.c
index 55d72316bce..55d72316bce 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_small.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_small.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table.c
index 1fbcd94703c..1fbcd94703c 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_be.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_be.h
index ea074f397a7..ea074f397a7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_be.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_be.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_le.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_le.h
index 1196b31e132..1196b31e132 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_table_le.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_table_le.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_tablegen.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_tablegen.c
index 92b9a7da8ca..fddaa7ed140 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_tablegen.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_tablegen.c
@@ -13,12 +13,8 @@
//
///////////////////////////////////////////////////////////////////////////////
-#include <inttypes.h>
#include <stdio.h>
-
-#ifdef WORDS_BIGENDIAN
-# include "../../common/bswap.h"
-#endif
+#include "../../common/tuklib_integer.h"
static uint64_t crc64_table[4][256];
@@ -47,7 +43,7 @@ init_crc64_table(void)
#ifdef WORDS_BIGENDIAN
for (size_t s = 0; s < 4; ++s)
for (size_t b = 0; b < 256; ++b)
- crc64_table[s][b] = bswap_64(crc64_table[s][b]);
+ crc64_table[s][b] = bswap64(crc64_table[s][b]);
#endif
return;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_x86.S b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_x86.S
index 17de076ac9a..f5bb84b97e0 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc64_x86.S
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc64_x86.S
@@ -57,7 +57,7 @@ init_table(void)
* Solaris assembler doesn't have .p2align, and Darwin uses .align
* differently than GNU/Linux and Solaris.
*/
-#if defined(__MACH__) || defined(__MSDOS__)
+#if defined(__APPLE__) || defined(__MSDOS__)
# define ALIGN(pow2, abs) .align pow2
#else
# define ALIGN(pow2, abs) .align abs
@@ -66,7 +66,7 @@ init_table(void)
.text
.globl LZMA_CRC64
-#if !defined(__MACH__) && !defined(_WIN32) && !defined(__CYGWIN__) \
+#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
&& !defined(__MSDOS__)
.type LZMA_CRC64, @function
#endif
@@ -109,8 +109,8 @@ LZMA_CRC64:
#if (!defined(PIC) && !defined(__PIC__)) \
|| (defined(_WIN32) || defined(__CYGWIN__))
/* Not PIC */
- movl $LZMA_CRC64_TABLE, %ebx
-#elif defined(__MACH__)
+ movl $ LZMA_CRC64_TABLE, %ebx
+#elif defined(__APPLE__)
/* Mach-O */
call .L_get_pc
.L_pic:
@@ -133,7 +133,7 @@ LZMA_CRC64:
* We need eight bytes, because the loop pre-reads four bytes.
*/
cmpl $8, %edi
- jl .L_rest
+ jb .L_rest
/* Check if we have reached alignment of four bytes. */
testl $3, %esi
@@ -197,7 +197,7 @@ LZMA_CRC64:
* read it here than at the top of the loop.
*/
movl (%esi), %ecx
- jl .L_loop
+ jb .L_loop
/*
* Process the remaining four bytes, which we have already
@@ -258,7 +258,7 @@ LZMA_CRC64:
ret
#endif
-#if defined(__MACH__) && (defined(PIC) || defined(__PIC__))
+#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
/* Mach-O PIC */
.section __IMPORT,__pointers,non_lazy_symbol_pointers
.L_lzma_crc64_table$non_lazy_ptr:
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc_macros.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc_macros.h
index 9e2c030304f..a7c21b765dc 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/crc_macros.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/crc_macros.h
@@ -11,8 +11,6 @@
///////////////////////////////////////////////////////////////////////////////
#ifdef WORDS_BIGENDIAN
-# include "../../common/bswap.h"
-
# define A(x) ((x) >> 24)
# define B(x) (((x) >> 16) & 0xFF)
# define C(x) (((x) >> 8) & 0xFF)
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/sha256.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/sha256.c
index 6053a51bf10..04231dbaef9 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/check/sha256.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/check/sha256.c
@@ -29,10 +29,6 @@
#include "check.h"
-#ifndef WORDS_BIGENDIAN
-# include "../../common/bswap.h"
-#endif
-
// At least on x86, GCC is able to optimize this to a rotate instruction.
#define rotr_32(num, amount) ((num) >> (amount) | (num) << (32 - (amount)))
@@ -123,7 +119,7 @@ process(lzma_check_state *check)
uint32_t data[16];
for (size_t i = 0; i < 16; ++i)
- data[i] = bswap_32(check->buffer.u32[i]);
+ data[i] = bswap32(check->buffer.u32[i]);
transform(check->state.sha256.state, data);
#endif
@@ -194,20 +190,12 @@ lzma_sha256_finish(lzma_check_state *check)
// Convert the message size from bytes to bits.
check->state.sha256.size *= 8;
-#ifdef WORDS_BIGENDIAN
- check->buffer.u64[(64 - 8) / 8] = check->state.sha256.size;
-#else
- check->buffer.u64[(64 - 8) / 8] = bswap_64(check->state.sha256.size);
-#endif
+ check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
process(check);
for (size_t i = 0; i < 8; ++i)
-#ifdef WORDS_BIGENDIAN
- check->buffer.u32[i] = check->state.sha256.state[i];
-#else
- check->buffer.u32[i] = bswap_32(check->state.sha256.state[i]);
-#endif
+ check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
return;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/Makefile.inc
index aaaeee93307..f154f82ff52 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/Makefile.inc
@@ -8,12 +8,12 @@
liblzma_la_SOURCES += \
common/common.c \
common/common.h \
- common/bsr.h \
common/block_util.c \
common/easy_preset.c \
common/easy_preset.h \
common/filter_common.c \
common/filter_common.h \
+ common/hardware_physmem.c \
common/index.c \
common/index.h \
common/stream_flags_common.c \
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.c
index fa7fb8399cf..039b4285954 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.c
@@ -173,12 +173,15 @@ static lzma_ret
alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit)
{
- if (new_memlimit != 0 && new_memlimit < coder->memusage)
- return LZMA_MEMLIMIT_ERROR;
-
*memusage = coder->memusage;
*old_memlimit = coder->memlimit;
- coder->memlimit = new_memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < coder->memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
return LZMA_OK;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.h
index 70d0d2a0ffa..70d0d2a0ffa 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_encoder.c
index 68c9505db14..d8c0170f023 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/alone_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/alone_encoder.c
@@ -116,7 +116,7 @@ alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
if (d != UINT32_MAX)
++d;
- integer_write_32(next->coder->header + 1, d);
+ unaligned_write32le(next->coder->header + 1, d);
// - Uncompressed size (always unknown and using EOPM)
memset(next->coder->header + 1 + 4, 0xFF, 8);
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/auto_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/auto_decoder.c
index ae6c3e78642..ae6c3e78642 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/auto_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/auto_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_decoder.c
index ff27a11ccfe..ff27a11ccfe 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_encoder.c
index 4d90feef50b..4d90feef50b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_buffer_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_buffer_encoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.c
index a3ce6f49500..a3ce6f49500 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.h
index 7da9df63f76..7da9df63f76 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.c
index 567889aa2f6..ca5152357e7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.c
@@ -142,6 +142,19 @@ block_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
}
+static lzma_ret
+block_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters lzma_attribute((unused)),
+ const lzma_filter *reversed_filters)
+{
+ if (coder->sequence != SEQ_CODE)
+ return LZMA_PROG_ERROR;
+
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters);
+}
+
+
extern lzma_ret
lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
lzma_block *block)
@@ -167,6 +180,7 @@ lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->code = &block_encode;
next->end = &block_encoder_end;
+ next->update = &block_encoder_update;
next->coder->next = LZMA_NEXT_CODER_INIT;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.h
index b9eff0be273..b9eff0be273 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_decoder.c
index 868f71b2ddd..2c9573ee204 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_decoder.c
@@ -59,7 +59,7 @@ lzma_block_header_decode(lzma_block *block,
const size_t in_size = block->header_size - 4;
// Verify CRC32
- if (lzma_crc32(in, in_size, 0) != integer_read_32(in + in_size))
+ if (lzma_crc32(in, in_size, 0) != unaligned_read32le(in + in_size))
return LZMA_DATA_ERROR;
// Check for unsupported flags.
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_encoder.c
index 8bef63b53d2..707dd0cb14a 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_header_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_header_encoder.c
@@ -73,7 +73,7 @@ lzma_block_header_size(lzma_block *block)
extern LZMA_API(lzma_ret)
lzma_block_header_encode(const lzma_block *block, uint8_t *out)
{
- // Valdidate everything but filters.
+ // Validate everything but filters.
if (lzma_block_unpadded_size(block) == 0
|| !lzma_vli_is_valid(block->uncompressed_size))
return LZMA_PROG_ERROR;
@@ -110,7 +110,7 @@ lzma_block_header_encode(const lzma_block *block, uint8_t *out)
size_t filter_count = 0;
do {
- // There can be at maximum of four filters.
+ // There can be a maximum of four filters.
if (filter_count == LZMA_FILTERS_MAX)
return LZMA_PROG_ERROR;
@@ -126,7 +126,7 @@ lzma_block_header_encode(const lzma_block *block, uint8_t *out)
memzero(out + out_pos, out_size - out_pos);
// CRC32
- integer_write_32(out + out_size, lzma_crc32(out, out_size, 0));
+ unaligned_write32le(out + out_size, lzma_crc32(out, out_size, 0));
return LZMA_OK;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_util.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_util.c
index cb9cde255e6..cb9cde255e6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/block_util.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/block_util.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.c
index 3bdf32522a3..2f185e490d4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.c
@@ -92,12 +92,30 @@ lzma_next_filter_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters)
{
lzma_next_coder_init(filters[0].init, next, allocator);
-
+ next->id = filters[0].id;
return filters[0].init == NULL
? LZMA_OK : filters[0].init(next, allocator, filters);
}
+extern lzma_ret
+lzma_next_filter_update(lzma_next_coder *next, lzma_allocator *allocator,
+ const lzma_filter *reversed_filters)
+{
+ // Check that the application isn't trying to change the Filter ID.
+ // End of filters is indicated with LZMA_VLI_UNKNOWN in both
+ // reversed_filters[0].id and next->id.
+ if (reversed_filters[0].id != next->id)
+ return LZMA_PROG_ERROR;
+
+ if (reversed_filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_OK;
+
+ assert(next->update != NULL);
+ return next->update(next->coder, allocator, NULL, reversed_filters);
+}
+
+
extern void
lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator)
{
@@ -143,6 +161,7 @@ lzma_strm_init(lzma_stream *strm)
strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
strm->internal->supported_actions[LZMA_FINISH] = false;
strm->internal->sequence = ISEQ_RUN;
+ strm->internal->allow_buf_error = false;
strm->total_in = 0;
strm->total_out = 0;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.h
index d794cb30e3b..7b7fbb11c3d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/common.h
@@ -15,7 +15,7 @@
#include "sysdefs.h"
#include "mythread.h"
-#include "integer.h"
+#include "tuklib_integer.h"
#if defined(_WIN32) || defined(__CYGWIN__)
# ifdef DLL_EXPORT
@@ -50,7 +50,7 @@
/// Starting value for memory usage estimates. Instead of calculating size
-/// of _every_ structure and taking into accont malloc() overhead etc. we
+/// of _every_ structure and taking into account malloc() overhead etc., we
/// add a base size to all memory usage estimates. It's not very accurate
/// but should be easily good enough.
#define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15)
@@ -109,6 +109,10 @@ typedef void (*lzma_end_function)(
/// an array of lzma_filter_info structures. This array is used with
/// lzma_next_filter_init to initialize the filter chain.
struct lzma_filter_info_s {
+ /// Filter ID. This is used only by the encoder
+ /// with lzma_filters_update().
+ lzma_vli id;
+
/// Pointer to function used to initialize the filter.
/// This is NULL to indicate end of array.
lzma_init_function init;
@@ -123,6 +127,10 @@ struct lzma_next_coder_s {
/// Pointer to coder-specific data
lzma_coder *coder;
+ /// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
+ /// point to a filter coder.
+ lzma_vli id;
+
/// "Pointer" to init function. This is never called here.
/// We need only to detect if we are initializing a coder
/// that was allocated earlier. See lzma_next_coder_init and
@@ -145,6 +153,12 @@ struct lzma_next_coder_s {
/// If new_memlimit == 0, the limit is not changed.
lzma_ret (*memconfig)(lzma_coder *coder, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit);
+
+ /// Update the filter-specific options or the whole filter chain
+ /// in the encoder.
+ lzma_ret (*update)(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters,
+ const lzma_filter *reversed_filters);
};
@@ -153,10 +167,12 @@ struct lzma_next_coder_s {
(lzma_next_coder){ \
.coder = NULL, \
.init = (uintptr_t)(NULL), \
+ .id = LZMA_VLI_UNKNOWN, \
.code = NULL, \
.end = NULL, \
.get_check = NULL, \
.memconfig = NULL, \
+ .update = NULL, \
}
@@ -212,6 +228,12 @@ extern lzma_ret lzma_strm_init(lzma_stream *strm);
extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
lzma_allocator *allocator, const lzma_filter_info *filters);
+/// Update the next filter in the chain, if any. This checks that
+/// the application is not trying to change the Filter IDs.
+extern lzma_ret lzma_next_filter_update(
+ lzma_next_coder *next, lzma_allocator *allocator,
+ const lzma_filter *reversed_filters);
+
/// Frees the memory allocated for next->coder either using next->end or,
/// if next->end is NULL, using lzma_free.
extern void lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator);
@@ -226,7 +248,7 @@ extern size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
/// \brief Return if expression doesn't evaluate to LZMA_OK
///
-/// There are several situations where we want to return immediatelly
+/// There are several situations where we want to return immediately
/// with the value of expr if it isn't LZMA_OK. This macro shortens
/// the code a little.
#define return_if_error(expr) \
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_buffer_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_buffer_encoder.c
index c4be34ccfa2..c4be34ccfa2 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_buffer_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_buffer_encoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_decoder_memusage.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_decoder_memusage.c
index 20bcd5b7175..20bcd5b7175 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_decoder_memusage.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_decoder_memusage.c
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder.c
new file mode 100644
index 00000000000..d13ccd7351f
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder.c
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_encoder.c
+/// \brief Easy .xz Stream encoder initialization
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+#include "stream_encoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
+{
+ lzma_options_easy opt_easy;
+ if (lzma_easy_preset(&opt_easy, preset))
+ return LZMA_OPTIONS_ERROR;
+
+ return lzma_stream_encoder(strm, opt_easy.filters, check);
+}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder_memusage.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder_memusage.c
index e9105758423..e9105758423 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder_memusage.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_encoder_memusage.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.c
index 2f9859860ad..2f9859860ad 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.h
index 382ade89406..382ade89406 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_preset.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/easy_preset.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_decoder.c
index 4fe5d78e173..2d35ef8e0af 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_decoder.c
@@ -57,7 +57,7 @@ lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator,
} else {
// All the input was consumed and output
- // buffer is full. Now we don't immediatelly
+ // buffer is full. Now we don't immediately
// know the reason for the error. Try
// decoding one more byte. If it succeeds,
// then the output buffer was too small. If
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_encoder.c
index 646e1b30374..646e1b30374 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_buffer_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_buffer_encoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.c
index ca1196aa3e5..2322d7deec9 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.c
@@ -17,6 +17,9 @@ static const struct {
/// Filter ID
lzma_vli id;
+ /// Size of the filter-specific options structure
+ size_t options_size;
+
/// True if it is OK to use this filter as non-last filter in
/// the chain.
bool non_last_ok;
@@ -34,6 +37,7 @@ static const struct {
#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
{
.id = LZMA_FILTER_LZMA1,
+ .options_size = sizeof(lzma_options_lzma),
.non_last_ok = false,
.last_ok = true,
.changes_size = true,
@@ -42,6 +46,7 @@ static const struct {
#ifdef HAVE_DECODER_LZMA2
{
.id = LZMA_FILTER_LZMA2,
+ .options_size = sizeof(lzma_options_lzma),
.non_last_ok = false,
.last_ok = true,
.changes_size = true,
@@ -50,6 +55,7 @@ static const struct {
#if defined(HAVE_ENCODER_SUBBLOCK) || defined(HAVE_DECODER_SUBBLOCK)
{
.id = LZMA_FILTER_SUBBLOCK,
+ .options_size = sizeof(lzma_options_subblock),
.non_last_ok = true,
.last_ok = true,
.changes_size = true,
@@ -58,6 +64,7 @@ static const struct {
#ifdef HAVE_DECODER_X86
{
.id = LZMA_FILTER_X86,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -66,6 +73,7 @@ static const struct {
#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
{
.id = LZMA_FILTER_POWERPC,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -74,6 +82,7 @@ static const struct {
#ifdef HAVE_DECODER_IA64
{
.id = LZMA_FILTER_IA64,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -82,6 +91,7 @@ static const struct {
#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
{
.id = LZMA_FILTER_ARM,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -90,6 +100,7 @@ static const struct {
#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
{
.id = LZMA_FILTER_ARMTHUMB,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -98,6 +109,7 @@ static const struct {
#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
{
.id = LZMA_FILTER_SPARC,
+ .options_size = sizeof(lzma_options_bcj),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -106,6 +118,7 @@ static const struct {
#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
{
.id = LZMA_FILTER_DELTA,
+ .options_size = sizeof(lzma_options_delta),
.non_last_ok = true,
.last_ok = false,
.changes_size = false,
@@ -117,6 +130,75 @@ static const struct {
};
+extern LZMA_API(lzma_ret)
+lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
+ lzma_allocator *allocator)
+{
+ if (src == NULL || dest == NULL)
+ return LZMA_PROG_ERROR;
+
+ lzma_ret ret;
+ size_t i;
+ for (i = 0; src[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ // There must be a maximum of four filters plus
+ // the array terminator.
+ if (i == LZMA_FILTERS_MAX) {
+ ret = LZMA_OPTIONS_ERROR;
+ goto error;
+ }
+
+ dest[i].id = src[i].id;
+
+ if (src[i].options == NULL) {
+ dest[i].options = NULL;
+ } else {
+ // See if the filter is supported only when the
+ // options is not NULL. This might be convenient
+ // sometimes if the app is actually copying only
+ // a partial filter chain with a place holder ID.
+ //
+ // When options is not NULL, the Filter ID must be
+ // supported by us, because otherwise we don't know
+ // how big the options are.
+ size_t j;
+ for (j = 0; src[i].id != features[j].id; ++j) {
+ if (features[j].id == LZMA_VLI_UNKNOWN) {
+ ret = LZMA_OPTIONS_ERROR;
+ goto error;
+ }
+ }
+
+ // Allocate and copy the options.
+ dest[i].options = lzma_alloc(features[j].options_size,
+ allocator);
+ if (dest[i].options == NULL) {
+ ret = LZMA_MEM_ERROR;
+ goto error;
+ }
+
+ memcpy(dest[i].options, src[i].options,
+ features[j].options_size);
+ }
+ }
+
+ // Terminate the filter array.
+ assert(i <= LZMA_FILTERS_MAX + 1);
+ dest[i].id = LZMA_VLI_UNKNOWN;
+ dest[i].options = NULL;
+
+ return LZMA_OK;
+
+error:
+ // Free the options which we have already allocated.
+ while (i-- > 0) {
+ lzma_free(dest[i].options, allocator);
+ dest[i].options = NULL;
+ }
+
+ return ret;
+}
+
+
static lzma_ret
validate_chain(const lzma_filter *filters, size_t *count)
{
@@ -155,7 +237,7 @@ validate_chain(const lzma_filter *filters, size_t *count)
} while (filters[++i].id != LZMA_VLI_UNKNOWN);
// There must be 1-4 filters. The last filter must be usable as
- // the last filter in the chain. At maximum of three filters are
+ // the last filter in the chain. A maximum of three filters are
// allowed to change the size of the data.
if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
return LZMA_OPTIONS_ERROR;
@@ -188,6 +270,7 @@ lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
if (fc == NULL || fc->init == NULL)
return LZMA_OPTIONS_ERROR;
+ filters[j].id = options[i].id;
filters[j].init = fc->init;
filters[j].options = options[i].options;
}
@@ -198,12 +281,14 @@ lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
if (fc == NULL || fc->init == NULL)
return LZMA_OPTIONS_ERROR;
+ filters[i].id = options[i].id;
filters[i].init = fc->init;
filters[i].options = options[i].options;
}
}
// Terminate the array.
+ filters[count].id = LZMA_VLI_UNKNOWN;
filters[count].init = NULL;
// Initialize the filters.
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.h
index cd61fc0724f..cd61fc0724f 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_common.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.c
index 95f77b76cf7..95f77b76cf7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.h
index d5c68bdd4a6..d5c68bdd4a6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.c
index d6fb82e511b..ab3d3af15e2 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.c
@@ -32,7 +32,7 @@ typedef struct {
uint64_t (*memusage)(const void *options);
/// Calculates the minimum sane size for Blocks (or other types of
- /// chunks) to which the input data can be splitted to make
+ /// chunks) to which the input data can be split to make
/// multithreaded encoding possible. If this is NULL, it is assumed
/// that the encoder is fast enough with single thread.
lzma_vli (*chunk_size)(const void *options);
@@ -45,7 +45,7 @@ typedef struct {
/// Encodes Filter Properties.
///
- /// \return - LZMA_OK: Properties encoded sucessfully.
+ /// \return - LZMA_OK: Properties encoded successfully.
/// - LZMA_OPTIONS_ERROR: Unsupported options
/// - LZMA_PROG_ERROR: Invalid options or not enough
/// output space
@@ -180,6 +180,33 @@ lzma_filter_encoder_is_supported(lzma_vli id)
}
+extern LZMA_API(lzma_ret)
+lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
+{
+ if (strm->internal->next.update == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Validate the filter chain.
+ if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // The actual filter chain in the encoder is reversed. Some things
+ // still want the normal order chain, so we provide both.
+ size_t count = 1;
+ while (filters[count].id != LZMA_VLI_UNKNOWN)
+ ++count;
+
+ lzma_filter reversed_filters[LZMA_FILTERS_MAX + 1];
+ for (size_t i = 0; i < count; ++i)
+ reversed_filters[count - i - 1] = filters[i];
+
+ reversed_filters[count].id = LZMA_VLI_UNKNOWN;
+
+ return strm->internal->next.update(strm->internal->next.coder,
+ strm->allocator, filters, reversed_filters);
+}
+
+
extern lzma_ret
lzma_raw_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter *options)
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.h
index 5b65cd305a9..a978932def7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_encoder.h
@@ -22,6 +22,6 @@ extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
extern lzma_ret lzma_raw_encoder_init(
lzma_next_coder *next, lzma_allocator *allocator,
- const lzma_filter *options);
+ const lzma_filter *filters);
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_decoder.c
index caae10ce79a..caae10ce79a 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_encoder.c
index d110566de99..d110566de99 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/filter_flags_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/filter_flags_encoder.c
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/hardware_physmem.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/hardware_physmem.c
new file mode 100644
index 00000000000..7405b658af7
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/hardware_physmem.c
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware_physmem.c
+/// \brief Get the total amount of physical memory (RAM)
+//
+// Author: Jonathan Nieder
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+#include "tuklib_physmem.h"
+
+
+extern LZMA_API(uint64_t)
+lzma_physmem(void)
+{
+ // It is simpler to make lzma_physmem() a wrapper for
+ // tuklib_physmem() than to hack appropriate symbol visiblity
+ // support for the tuklib modules.
+ return tuklib_physmem();
+}
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.c
new file mode 100644
index 00000000000..3941e28ba72
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.c
@@ -0,0 +1,1241 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index.c
+/// \brief Handling of .xz Indexes and some other Stream information
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index.h"
+#include "stream_flags_common.h"
+
+
+/// \brief How many Records to allocate at once
+///
+/// This should be big enough to avoid making lots of tiny allocations
+/// but small enough to avoid too much unused memory at once.
+#define INDEX_GROUP_SIZE 500
+
+
+/// \brief How many Records can be allocated at once at maximum
+#define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
+
+
+/// \brief Base structure for index_stream and index_group structures
+typedef struct index_tree_node_s index_tree_node;
+struct index_tree_node_s {
+ /// Uncompressed start offset of this Stream (relative to the
+ /// beginning of the file) or Block (relative to the beginning
+ /// of the Stream)
+ lzma_vli uncompressed_base;
+
+ /// Compressed start offset of this Stream or Block
+ lzma_vli compressed_base;
+
+ index_tree_node *parent;
+ index_tree_node *left;
+ index_tree_node *right;
+};
+
+
+/// \brief AVL tree to hold index_stream or index_group structures
+typedef struct {
+ /// Root node
+ index_tree_node *root;
+
+ /// Leftmost node. Since the tree will be filled sequentially,
+ /// this won't change after the first node has been added to
+ /// the tree.
+ index_tree_node *leftmost;
+
+ /// The rightmost node in the tree. Since the tree is filled
+ /// sequentially, this is always the node where to add the new data.
+ index_tree_node *rightmost;
+
+ /// Number of nodes in the tree
+ uint32_t count;
+
+} index_tree;
+
+
+typedef struct {
+ lzma_vli uncompressed_sum;
+ lzma_vli unpadded_sum;
+} index_record;
+
+
+typedef struct {
+ /// Every Record group is part of index_stream.groups tree.
+ index_tree_node node;
+
+ /// Number of Blocks in this Stream before this group.
+ lzma_vli number_base;
+
+ /// Number of Records that can be put in records[].
+ size_t allocated;
+
+ /// Index of the last Record in use.
+ size_t last;
+
+ /// The sizes in this array are stored as cumulative sums relative
+ /// to the beginning of the Stream. This makes it possible to
+ /// use binary search in lzma_index_locate().
+ ///
+ /// Note that the cumulative summing is done specially for
+ /// unpadded_sum: The previous value is rounded up to the next
+ /// multiple of four before adding the Unpadded Size of the new
+ /// Block. The total encoded size of the Blocks in the Stream
+ /// is records[last].unpadded_sum in the last Record group of
+ /// the Stream.
+ ///
+ /// For example, if the Unpadded Sizes are 39, 57, and 81, the
+ /// stored values are 39, 97 (40 + 57), and 181 (100 + 181).
+ /// The total encoded size of these Blocks is 184.
+ ///
+ /// This is a flexible array, because it makes easy to optimize
+ /// memory usage in case someone concatenates many Streams that
+ /// have only one or few Blocks.
+ index_record records[];
+
+} index_group;
+
+
+typedef struct {
+ /// Every index_stream is a node in the tree of Sreams.
+ index_tree_node node;
+
+ /// Number of this Stream (first one is 1)
+ uint32_t number;
+
+ /// Total number of Blocks before this Stream
+ lzma_vli block_number_base;
+
+ /// Record groups of this Stream are stored in a tree.
+ /// It's a T-tree with AVL-tree balancing. There are
+ /// INDEX_GROUP_SIZE Records per node by default.
+ /// This keeps the number of memory allocations reasonable
+ /// and finding a Record is fast.
+ index_tree groups;
+
+ /// Number of Records in this Stream
+ lzma_vli record_count;
+
+ /// Size of the List of Records field in this Stream. This is used
+ /// together with record_count to calculate the size of the Index
+ /// field and thus the total size of the Stream.
+ lzma_vli index_list_size;
+
+ /// Stream Flags of this Stream. This is meaningful only if
+ /// the Stream Flags have been told us with lzma_index_stream_flags().
+ /// Initially stream_flags.version is set to UINT32_MAX to indicate
+ /// that the Stream Flags are unknown.
+ lzma_stream_flags stream_flags;
+
+ /// Amount of Stream Padding after this Stream. This defaults to
+ /// zero and can be set with lzma_index_stream_padding().
+ lzma_vli stream_padding;
+
+} index_stream;
+
+
+struct lzma_index_s {
+ /// AVL-tree containing the Stream(s). Often there is just one
+ /// Stream, but using a tree keeps lookups fast even when there
+ /// are many concatenated Streams.
+ index_tree streams;
+
+ /// Uncompressed size of all the Blocks in the Stream(s)
+ lzma_vli uncompressed_size;
+
+ /// Total size of all the Blocks in the Stream(s)
+ lzma_vli total_size;
+
+ /// Total number of Records in all Streams in this lzma_index
+ lzma_vli record_count;
+
+ /// Size of the List of Records field if all the Streams in this
+ /// lzma_index were packed into a single Stream (makes it simpler to
+ /// take many .xz files and combine them into a single Stream).
+ ///
+ /// This value together with record_count is needed to calculate
+ /// Backward Size that is stored into Stream Footer.
+ lzma_vli index_list_size;
+
+ /// How many Records to allocate at once in lzma_index_append().
+ /// This defaults to INDEX_GROUP_SIZE but can be overriden with
+ /// lzma_index_prealloc().
+ size_t prealloc;
+
+ /// Bitmask indicating what integrity check types have been used
+ /// as set by lzma_index_stream_flags(). The bit of the last Stream
+ /// is not included here, since it is possible to change it by
+ /// calling lzma_index_stream_flags() again.
+ uint32_t checks;
+};
+
+
+static void
+index_tree_init(index_tree *tree)
+{
+ tree->root = NULL;
+ tree->leftmost = NULL;
+ tree->rightmost = NULL;
+ tree->count = 0;
+ return;
+}
+
+
+/// Helper for index_tree_end()
+static void
+index_tree_node_end(index_tree_node *node, lzma_allocator *allocator,
+ void (*free_func)(void *node, lzma_allocator *allocator))
+{
+ // The tree won't ever be very huge, so recursion should be fine.
+ // 20 levels in the tree is likely quite a lot already in practice.
+ if (node->left != NULL)
+ index_tree_node_end(node->left, allocator, free_func);
+
+ if (node->right != NULL)
+ index_tree_node_end(node->right, allocator, free_func);
+
+ if (free_func != NULL)
+ free_func(node, allocator);
+
+ lzma_free(node, allocator);
+ return;
+}
+
+
+/// Free the meory allocated for a tree. If free_func is not NULL,
+/// it is called on each node before freeing the node. This is used
+/// to free the Record groups from each index_stream before freeing
+/// the index_stream itself.
+static void
+index_tree_end(index_tree *tree, lzma_allocator *allocator,
+ void (*free_func)(void *node, lzma_allocator *allocator))
+{
+ if (tree->root != NULL)
+ index_tree_node_end(tree->root, allocator, free_func);
+
+ return;
+}
+
+
+/// Add a new node to the tree. node->uncompressed_base and
+/// node->compressed_base must have been set by the caller already.
+static void
+index_tree_append(index_tree *tree, index_tree_node *node)
+{
+ node->parent = tree->rightmost;
+ node->left = NULL;
+ node->right = NULL;
+
+ ++tree->count;
+
+ // Handle the special case of adding the first node.
+ if (tree->root == NULL) {
+ tree->root = node;
+ tree->leftmost = node;
+ tree->rightmost = node;
+ return;
+ }
+
+ // The tree is always filled sequentially.
+ assert(tree->rightmost->uncompressed_base <= node->uncompressed_base);
+ assert(tree->rightmost->compressed_base < node->compressed_base);
+
+ // Add the new node after the rightmost node. It's the correct
+ // place due to the reason above.
+ tree->rightmost->right = node;
+ tree->rightmost = node;
+
+ // Balance the AVL-tree if needed. We don't need to keep the balance
+ // factors in nodes, because we always fill the tree sequentially,
+ // and thus know the state of the tree just by looking at the node
+ // count. From the node count we can calculate how many steps to go
+ // up in the tree to find the rotation root.
+ uint32_t up = tree->count ^ (UINT32_C(1) << bsr32(tree->count));
+ if (up != 0) {
+ // Locate the root node for the rotation.
+ up = ctz32(tree->count) + 2;
+ do {
+ node = node->parent;
+ } while (--up > 0);
+
+ // Rotate left using node as the rotation root.
+ index_tree_node *pivot = node->right;
+
+ if (node->parent == NULL) {
+ tree->root = pivot;
+ } else {
+ assert(node->parent->right == node);
+ node->parent->right = pivot;
+ }
+
+ pivot->parent = node->parent;
+
+ node->right = pivot->left;
+ if (node->right != NULL)
+ node->right->parent = node;
+
+ pivot->left = node;
+ node->parent = pivot;
+ }
+
+ return;
+}
+
+
+/// Get the next node in the tree. Return NULL if there are no more nodes.
+static void *
+index_tree_next(const index_tree_node *node)
+{
+ if (node->right != NULL) {
+ node = node->right;
+ while (node->left != NULL)
+ node = node->left;
+
+ return (void *)(node);
+ }
+
+ while (node->parent != NULL && node->parent->right == node)
+ node = node->parent;
+
+ return (void *)(node->parent);
+}
+
+
+/// Locate a node that contains the given uncompressed offset. It is
+/// caller's job to check that target is not bigger than the uncompressed
+/// size of the tree (the last node would be returned in that case still).
+static void *
+index_tree_locate(const index_tree *tree, lzma_vli target)
+{
+ const index_tree_node *result = NULL;
+ const index_tree_node *node = tree->root;
+
+ assert(tree->leftmost == NULL
+ || tree->leftmost->uncompressed_base == 0);
+
+ // Consecutive nodes may have the same uncompressed_base.
+ // We must pick the rightmost one.
+ while (node != NULL) {
+ if (node->uncompressed_base > target) {
+ node = node->left;
+ } else {
+ result = node;
+ node = node->right;
+ }
+ }
+
+ return (void *)(result);
+}
+
+
+/// Allocate and initialize a new Stream using the given base offsets.
+static index_stream *
+index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
+ lzma_vli stream_number, lzma_vli block_number_base,
+ lzma_allocator *allocator)
+{
+ index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
+ if (s == NULL)
+ return NULL;
+
+ s->node.uncompressed_base = uncompressed_base;
+ s->node.compressed_base = compressed_base;
+ s->node.parent = NULL;
+ s->node.left = NULL;
+ s->node.right = NULL;
+
+ s->number = stream_number;
+ s->block_number_base = block_number_base;
+
+ index_tree_init(&s->groups);
+
+ s->record_count = 0;
+ s->index_list_size = 0;
+ s->stream_flags.version = UINT32_MAX;
+ s->stream_padding = 0;
+
+ return s;
+}
+
+
+/// Free the memory allocated for a Stream and its Record groups.
+static void
+index_stream_end(void *node, lzma_allocator *allocator)
+{
+ index_stream *s = node;
+ index_tree_end(&s->groups, allocator, NULL);
+ return;
+}
+
+
+static lzma_index *
+index_init_plain(lzma_allocator *allocator)
+{
+ lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
+ if (i != NULL) {
+ index_tree_init(&i->streams);
+ i->uncompressed_size = 0;
+ i->total_size = 0;
+ i->record_count = 0;
+ i->index_list_size = 0;
+ i->prealloc = INDEX_GROUP_SIZE;
+ i->checks = 0;
+ }
+
+ return i;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_init(lzma_allocator *allocator)
+{
+ lzma_index *i = index_init_plain(allocator);
+ index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
+ if (i == NULL || s == NULL) {
+ index_stream_end(s, allocator);
+ lzma_free(i, allocator);
+ }
+
+ index_tree_append(&i->streams, &s->node);
+
+ return i;
+}
+
+
+extern LZMA_API(void)
+lzma_index_end(lzma_index *i, lzma_allocator *allocator)
+{
+ // NOTE: If you modify this function, check also the bottom
+ // of lzma_index_cat().
+ if (i != NULL) {
+ index_tree_end(&i->streams, allocator, &index_stream_end);
+ lzma_free(i, allocator);
+ }
+
+ return;
+}
+
+
+extern void
+lzma_index_prealloc(lzma_index *i, lzma_vli records)
+{
+ if (records > PREALLOC_MAX)
+ records = PREALLOC_MAX;
+
+ i->prealloc = (size_t)(records);
+ return;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
+{
+ // This calculates an upper bound that is only a little bit
+ // bigger than the exact maximum memory usage with the given
+ // parameters.
+
+ // Typical malloc() overhead is 2 * sizeof(void *) but we take
+ // a little bit extra just in case. Using LZMA_MEMUSAGE_BASE
+ // instead would give too inaccurate estimate.
+ const size_t alloc_overhead = 4 * sizeof(void *);
+
+ // Amount of memory needed for each Stream base structures.
+ // We assume that every Stream has at least one Block and
+ // thus at least one group.
+ const size_t stream_base = sizeof(index_stream)
+ + sizeof(index_group) + 2 * alloc_overhead;
+
+ // Amount of memory needed per group.
+ const size_t group_base = sizeof(index_group)
+ + INDEX_GROUP_SIZE * sizeof(index_record)
+ + alloc_overhead;
+
+ // Number of groups. There may actually be more, but that overhead
+ // has been taken into account in stream_base already.
+ const lzma_vli groups
+ = (blocks + INDEX_GROUP_SIZE - 1) / INDEX_GROUP_SIZE;
+
+ // Memory used by index_stream and index_group structures.
+ const uint64_t streams_mem = streams * stream_base;
+ const uint64_t groups_mem = groups * group_base;
+
+ // Memory used by the base structure.
+ const uint64_t index_base = sizeof(lzma_index) + alloc_overhead;
+
+ // Validate the arguments and catch integer overflows.
+ // Maximum number of Streams is "only" UINT32_MAX, because
+ // that limit is used by the tree containing the Streams.
+ const uint64_t limit = UINT64_MAX - index_base;
+ if (streams == 0 || streams > UINT32_MAX || blocks > LZMA_VLI_MAX
+ || streams > limit / stream_base
+ || groups > limit / group_base
+ || limit - streams_mem < groups_mem)
+ return UINT64_MAX;
+
+ return index_base + streams_mem + groups_mem;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memused(const lzma_index *i)
+{
+ return lzma_index_memusage(i->streams.count, i->record_count);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_block_count(const lzma_index *i)
+{
+ return i->record_count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_count(const lzma_index *i)
+{
+ return i->streams.count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_size(const lzma_index *i)
+{
+ return index_size(i->record_count, i->index_list_size);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_total_size(const lzma_index *i)
+{
+ return i->total_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_size(const lzma_index *i)
+{
+ // Stream Header + Blocks + Index + Stream Footer
+ return LZMA_STREAM_HEADER_SIZE + i->total_size
+ + index_size(i->record_count, i->index_list_size)
+ + LZMA_STREAM_HEADER_SIZE;
+}
+
+
+static lzma_vli
+index_file_size(lzma_vli compressed_base, lzma_vli unpadded_sum,
+ lzma_vli record_count, lzma_vli index_list_size,
+ lzma_vli stream_padding)
+{
+ // Earlier Streams and Stream Paddings + Stream Header
+ // + Blocks + Index + Stream Footer + Stream Padding
+ //
+ // This might go over LZMA_VLI_MAX due to too big unpadded_sum
+ // when this function is used in lzma_index_append().
+ lzma_vli file_size = compressed_base + 2 * LZMA_STREAM_HEADER_SIZE
+ + stream_padding + vli_ceil4(unpadded_sum);
+ if (file_size > LZMA_VLI_MAX)
+ return LZMA_VLI_UNKNOWN;
+
+ // The same applies here.
+ file_size += index_size(record_count, index_list_size);
+ if (file_size > LZMA_VLI_MAX)
+ return LZMA_VLI_UNKNOWN;
+
+ return file_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_file_size(const lzma_index *i)
+{
+ const index_stream *s = (const index_stream *)(i->streams.rightmost);
+ const index_group *g = (const index_group *)(s->groups.rightmost);
+ return index_file_size(s->node.compressed_base,
+ g == NULL ? 0 : g->records[g->last].unpadded_sum,
+ s->record_count, s->index_list_size,
+ s->stream_padding);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_uncompressed_size(const lzma_index *i)
+{
+ return i->uncompressed_size;
+}
+
+
+extern LZMA_API(uint32_t)
+lzma_index_checks(const lzma_index *i)
+{
+ uint32_t checks = i->checks;
+
+ // Get the type of the Check of the last Stream too.
+ const index_stream *s = (const index_stream *)(i->streams.rightmost);
+ if (s->stream_flags.version != UINT32_MAX)
+ checks |= UINT32_C(1) << s->stream_flags.check;
+
+ return checks;
+}
+
+
+extern uint32_t
+lzma_index_padding_size(const lzma_index *i)
+{
+ return (LZMA_VLI_C(4) - index_size_unpadded(
+ i->record_count, i->index_list_size)) & 3;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
+{
+ if (i == NULL || stream_flags == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Validate the Stream Flags.
+ return_if_error(lzma_stream_flags_compare(
+ stream_flags, stream_flags));
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+ s->stream_flags = *stream_flags;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
+{
+ if (i == NULL || stream_padding > LZMA_VLI_MAX
+ || (stream_padding & 3) != 0)
+ return LZMA_PROG_ERROR;
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+
+ // Check that the new value won't make the file grow too big.
+ const lzma_vli old_stream_padding = s->stream_padding;
+ s->stream_padding = 0;
+ if (lzma_index_file_size(i) + stream_padding > LZMA_VLI_MAX) {
+ s->stream_padding = old_stream_padding;
+ return LZMA_DATA_ERROR;
+ }
+
+ s->stream_padding = stream_padding;
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_append(lzma_index *i, lzma_allocator *allocator,
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
+{
+ // Validate.
+ if (i == NULL || unpadded_size < UNPADDED_SIZE_MIN
+ || unpadded_size > UNPADDED_SIZE_MAX
+ || uncompressed_size > LZMA_VLI_MAX)
+ return LZMA_PROG_ERROR;
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+ index_group *g = (index_group *)(s->groups.rightmost);
+
+ const lzma_vli compressed_base = g == NULL ? 0
+ : vli_ceil4(g->records[g->last].unpadded_sum);
+ const lzma_vli uncompressed_base = g == NULL ? 0
+ : g->records[g->last].uncompressed_sum;
+ const uint32_t index_list_size_add = lzma_vli_size(unpadded_size)
+ + lzma_vli_size(uncompressed_size);
+
+ // Check that the file size will stay within limits.
+ if (index_file_size(s->node.compressed_base,
+ compressed_base + unpadded_size, s->record_count + 1,
+ s->index_list_size + index_list_size_add,
+ s->stream_padding) == LZMA_VLI_UNKNOWN)
+ return LZMA_DATA_ERROR;
+
+ // The size of the Index field must not exceed the maximum value
+ // that can be stored in the Backward Size field.
+ if (index_size(i->record_count + 1,
+ i->index_list_size + index_list_size_add)
+ > LZMA_BACKWARD_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+
+ if (g != NULL && g->last + 1 < g->allocated) {
+ // There is space in the last group at least for one Record.
+ ++g->last;
+ } else {
+ // We need to allocate a new group.
+ g = lzma_alloc(sizeof(index_group)
+ + i->prealloc * sizeof(index_record),
+ allocator);
+ if (g == NULL)
+ return LZMA_MEM_ERROR;
+
+ g->last = 0;
+ g->allocated = i->prealloc;
+
+ // Reset prealloc so that if the application happens to
+ // add new Records, the allocation size will be sane.
+ i->prealloc = INDEX_GROUP_SIZE;
+
+ // Set the start offsets of this group.
+ g->node.uncompressed_base = uncompressed_base;
+ g->node.compressed_base = compressed_base;
+ g->number_base = s->record_count + 1;
+
+ // Add the new group to the Stream.
+ index_tree_append(&s->groups, &g->node);
+ }
+
+ // Add the new Record to the group.
+ g->records[g->last].uncompressed_sum
+ = uncompressed_base + uncompressed_size;
+ g->records[g->last].unpadded_sum
+ = compressed_base + unpadded_size;
+
+ // Update the totals.
+ ++s->record_count;
+ s->index_list_size += index_list_size_add;
+
+ i->total_size += vli_ceil4(unpadded_size);
+ i->uncompressed_size += uncompressed_size;
+ ++i->record_count;
+ i->index_list_size += index_list_size_add;
+
+ return LZMA_OK;
+}
+
+
+/// Structure to pass info to index_cat_helper()
+typedef struct {
+ /// Uncompressed size of the destination
+ lzma_vli uncompressed_size;
+
+ /// Compressed file size of the destination
+ lzma_vli file_size;
+
+ /// Same as above but for Block numbers
+ lzma_vli block_number_add;
+
+ /// Number of Streams that were in the destination index before we
+ /// started appending new Streams from the source index. This is
+ /// used to fix the Stream numbering.
+ uint32_t stream_number_add;
+
+ /// Destination index' Stream tree
+ index_tree *streams;
+
+} index_cat_info;
+
+
+/// Add the Stream nodes from the source index to dest using recursion.
+/// Simplest iterative traversal of the source tree wouldn't work, because
+/// we update the pointers in nodes when moving them to the destination tree.
+static void
+index_cat_helper(const index_cat_info *info, index_stream *this)
+{
+ index_stream *left = (index_stream *)(this->node.left);
+ index_stream *right = (index_stream *)(this->node.right);
+
+ if (left != NULL)
+ index_cat_helper(info, left);
+
+ this->node.uncompressed_base += info->uncompressed_size;
+ this->node.compressed_base += info->file_size;
+ this->number += info->stream_number_add;
+ this->block_number_base += info->block_number_add;
+ index_tree_append(info->streams, &this->node);
+
+ if (right != NULL)
+ index_cat_helper(info, right);
+
+ return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
+ lzma_allocator *allocator)
+{
+ const lzma_vli dest_file_size = lzma_index_file_size(dest);
+
+ // Check that we don't exceed the file size limits.
+ if (dest_file_size + lzma_index_file_size(src) > LZMA_VLI_MAX
+ || dest->uncompressed_size + src->uncompressed_size
+ > LZMA_VLI_MAX)
+ return LZMA_DATA_ERROR;
+
+ // Check that the encoded size of the combined lzma_indexes stays
+ // within limits. In theory, this should be done only if we know
+ // that the user plans to actually combine the Streams and thus
+ // construct a single Index (probably rare). However, exceeding
+ // this limit is quite theoretical, so we do this check always
+ // to simplify things elsewhere.
+ {
+ const lzma_vli dest_size = index_size_unpadded(
+ dest->record_count, dest->index_list_size);
+ const lzma_vli src_size = index_size_unpadded(
+ src->record_count, src->index_list_size);
+ if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+ }
+
+ // Optimize the last group to minimize memory usage. Allocation has
+ // to be done before modifying dest or src.
+ {
+ index_stream *s = (index_stream *)(dest->streams.rightmost);
+ index_group *g = (index_group *)(s->groups.rightmost);
+ if (g != NULL && g->last + 1 < g->allocated) {
+ assert(g->node.left == NULL);
+ assert(g->node.right == NULL);
+
+ index_group *newg = lzma_alloc(sizeof(index_group)
+ + (g->last + 1)
+ * sizeof(index_record),
+ allocator);
+ if (newg == NULL)
+ return LZMA_MEM_ERROR;
+
+ newg->node = g->node;
+ newg->allocated = g->last + 1;
+ newg->last = g->last;
+ newg->number_base = g->number_base;
+
+ memcpy(newg->records, g->records, newg->allocated
+ * sizeof(index_record));
+
+ if (g->node.parent != NULL) {
+ assert(g->node.parent->right == &g->node);
+ g->node.parent->right = &newg->node;
+ }
+
+ if (s->groups.leftmost == &g->node) {
+ assert(s->groups.root == &g->node);
+ s->groups.leftmost = &newg->node;
+ s->groups.root = &newg->node;
+ }
+
+ if (s->groups.rightmost == &g->node)
+ s->groups.rightmost = &newg->node;
+
+ lzma_free(g, allocator);
+ }
+ }
+
+ // Add all the Streams from src to dest. Update the base offsets
+ // of each Stream from src.
+ const index_cat_info info = {
+ .uncompressed_size = dest->uncompressed_size,
+ .file_size = dest_file_size,
+ .stream_number_add = dest->streams.count,
+ .block_number_add = dest->record_count,
+ .streams = &dest->streams,
+ };
+ index_cat_helper(&info, (index_stream *)(src->streams.root));
+
+ // Update info about all the combined Streams.
+ dest->uncompressed_size += src->uncompressed_size;
+ dest->total_size += src->total_size;
+ dest->record_count += src->record_count;
+ dest->index_list_size += src->index_list_size;
+ dest->checks = lzma_index_checks(dest) | src->checks;
+
+ // There's nothing else left in src than the base structure.
+ lzma_free(src, allocator);
+
+ return LZMA_OK;
+}
+
+
+/// Duplicate an index_stream.
+static index_stream *
+index_dup_stream(const index_stream *src, lzma_allocator *allocator)
+{
+ // Catch a somewhat theoretical integer overflow.
+ if (src->record_count > PREALLOC_MAX)
+ return NULL;
+
+ // Allocate and initialize a new Stream.
+ index_stream *dest = index_stream_init(src->node.compressed_base,
+ src->node.uncompressed_base, src->number,
+ src->block_number_base, allocator);
+
+ // Return immediately if allocation failed or if there are
+ // no groups to duplicate.
+ if (dest == NULL || src->groups.leftmost == NULL)
+ return dest;
+
+ // Copy the overall information.
+ dest->record_count = src->record_count;
+ dest->index_list_size = src->index_list_size;
+ dest->stream_flags = src->stream_flags;
+ dest->stream_padding = src->stream_padding;
+
+ // Allocate memory for the Records. We put all the Records into
+ // a single group. It's simplest and also tends to make
+ // lzma_index_locate() a little bit faster with very big Indexes.
+ index_group *destg = lzma_alloc(sizeof(index_group)
+ + src->record_count * sizeof(index_record),
+ allocator);
+ if (destg == NULL) {
+ index_stream_end(dest, allocator);
+ return NULL;
+ }
+
+ // Initialize destg.
+ destg->node.uncompressed_base = 0;
+ destg->node.compressed_base = 0;
+ destg->number_base = 1;
+ destg->allocated = src->record_count;
+ destg->last = src->record_count - 1;
+
+ // Go through all the groups in src and copy the Records into destg.
+ const index_group *srcg = (const index_group *)(src->groups.leftmost);
+ size_t i = 0;
+ do {
+ memcpy(destg->records + i, srcg->records,
+ (srcg->last + 1) * sizeof(index_record));
+ i += srcg->last + 1;
+ srcg = index_tree_next(&srcg->node);
+ } while (srcg != NULL);
+
+ assert(i == destg->allocated);
+
+ // Add the group to the new Stream.
+ index_tree_append(&dest->groups, &destg->node);
+
+ return dest;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
+{
+ // Allocate the base structure (no initial Stream).
+ lzma_index *dest = index_init_plain(allocator);
+ if (dest == NULL)
+ return NULL;
+
+ // Copy the totals.
+ dest->uncompressed_size = src->uncompressed_size;
+ dest->total_size = src->total_size;
+ dest->record_count = src->record_count;
+ dest->index_list_size = src->index_list_size;
+
+ // Copy the Streams and the groups in them.
+ const index_stream *srcstream
+ = (const index_stream *)(src->streams.leftmost);
+ do {
+ index_stream *deststream = index_dup_stream(
+ srcstream, allocator);
+ if (deststream == NULL) {
+ lzma_index_end(dest, allocator);
+ return NULL;
+ }
+
+ index_tree_append(&dest->streams, &deststream->node);
+
+ srcstream = index_tree_next(&srcstream->node);
+ } while (srcstream != NULL);
+
+ return dest;
+}
+
+
+/// Indexing for lzma_index_iter.internal[]
+enum {
+ ITER_INDEX,
+ ITER_STREAM,
+ ITER_GROUP,
+ ITER_RECORD,
+ ITER_METHOD,
+};
+
+
+/// Values for lzma_index_iter.internal[ITER_METHOD].s
+enum {
+ ITER_METHOD_NORMAL,
+ ITER_METHOD_NEXT,
+ ITER_METHOD_LEFTMOST,
+};
+
+
+static void
+iter_set_info(lzma_index_iter *iter)
+{
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+ const index_stream *stream = iter->internal[ITER_STREAM].p;
+ const index_group *group = iter->internal[ITER_GROUP].p;
+ const size_t record = iter->internal[ITER_RECORD].s;
+
+ // lzma_index_iter.internal must not contain a pointer to the last
+ // group in the index, because that may be reallocated by
+ // lzma_index_cat().
+ if (group == NULL) {
+ // There are no groups.
+ assert(stream->groups.root == NULL);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+
+ } else if (i->streams.rightmost != &stream->node
+ || stream->groups.rightmost != &group->node) {
+ // The group is not not the last group in the index.
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+
+ } else if (stream->groups.leftmost != &group->node) {
+ // The group isn't the only group in the Stream, thus we
+ // know that it must have a parent group i.e. it's not
+ // the root node.
+ assert(stream->groups.root != &group->node);
+ assert(group->node.parent->right == &group->node);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
+ iter->internal[ITER_GROUP].p = group->node.parent;
+
+ } else {
+ // The Stream has only one group.
+ assert(stream->groups.root == &group->node);
+ assert(group->node.parent == NULL);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+ iter->internal[ITER_GROUP].p = NULL;
+ }
+
+ iter->stream.number = stream->number;
+ iter->stream.block_count = stream->record_count;
+ iter->stream.compressed_offset = stream->node.compressed_base;
+ iter->stream.uncompressed_offset = stream->node.uncompressed_base;
+
+ // iter->stream.flags will be NULL if the Stream Flags haven't been
+ // set with lzma_index_stream_flags().
+ iter->stream.flags = stream->stream_flags.version == UINT32_MAX
+ ? NULL : &stream->stream_flags;
+ iter->stream.padding = stream->stream_padding;
+
+ if (stream->groups.rightmost == NULL) {
+ // Stream has no Blocks.
+ iter->stream.compressed_size = index_size(0, 0)
+ + 2 * LZMA_STREAM_HEADER_SIZE;
+ iter->stream.uncompressed_size = 0;
+ } else {
+ const index_group *g = (const index_group *)(
+ stream->groups.rightmost);
+
+ // Stream Header + Stream Footer + Index + Blocks
+ iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
+ + index_size(stream->record_count,
+ stream->index_list_size)
+ + vli_ceil4(g->records[g->last].unpadded_sum);
+ iter->stream.uncompressed_size
+ = g->records[g->last].uncompressed_sum;
+ }
+
+ if (group != NULL) {
+ iter->block.number_in_stream = group->number_base + record;
+ iter->block.number_in_file = iter->block.number_in_stream
+ + stream->block_number_base;
+
+ iter->block.compressed_stream_offset
+ = record == 0 ? group->node.compressed_base
+ : vli_ceil4(group->records[
+ record - 1].unpadded_sum);
+ iter->block.uncompressed_stream_offset
+ = record == 0 ? group->node.uncompressed_base
+ : group->records[record - 1].uncompressed_sum;
+
+ iter->block.uncompressed_size
+ = group->records[record].uncompressed_sum
+ - iter->block.uncompressed_stream_offset;
+ iter->block.unpadded_size
+ = group->records[record].unpadded_sum
+ - iter->block.compressed_stream_offset;
+ iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
+
+ iter->block.compressed_stream_offset
+ += LZMA_STREAM_HEADER_SIZE;
+
+ iter->block.compressed_file_offset
+ = iter->block.compressed_stream_offset
+ + iter->stream.compressed_offset;
+ iter->block.uncompressed_file_offset
+ = iter->block.uncompressed_stream_offset
+ + iter->stream.uncompressed_offset;
+ }
+
+ return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
+{
+ iter->internal[ITER_INDEX].p = i;
+ lzma_index_iter_rewind(iter);
+ return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_rewind(lzma_index_iter *iter)
+{
+ iter->internal[ITER_STREAM].p = NULL;
+ iter->internal[ITER_GROUP].p = NULL;
+ iter->internal[ITER_RECORD].s = 0;
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+ return;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
+{
+ // Catch unsupported mode values.
+ if ((unsigned int)(mode) > LZMA_INDEX_ITER_NONEMPTY_BLOCK)
+ return true;
+
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+ const index_stream *stream = iter->internal[ITER_STREAM].p;
+ const index_group *group = NULL;
+ size_t record = iter->internal[ITER_RECORD].s;
+
+ // If we are being asked for the next Stream, leave group to NULL
+ // so that the rest of the this function thinks that this Stream
+ // has no groups and will thus go to the next Stream.
+ if (mode != LZMA_INDEX_ITER_STREAM) {
+ // Get the pointer to the current group. See iter_set_inf()
+ // for explanation.
+ switch (iter->internal[ITER_METHOD].s) {
+ case ITER_METHOD_NORMAL:
+ group = iter->internal[ITER_GROUP].p;
+ break;
+
+ case ITER_METHOD_NEXT:
+ group = index_tree_next(iter->internal[ITER_GROUP].p);
+ break;
+
+ case ITER_METHOD_LEFTMOST:
+ group = (const index_group *)(
+ stream->groups.leftmost);
+ break;
+ }
+ }
+
+again:
+ if (stream == NULL) {
+ // We at the beginning of the lzma_index.
+ // Locate the first Stream.
+ stream = (const index_stream *)(i->streams.leftmost);
+ if (mode >= LZMA_INDEX_ITER_BLOCK) {
+ // Since we are being asked to return information
+ // about the first a Block, skip Streams that have
+ // no Blocks.
+ while (stream->groups.leftmost == NULL) {
+ stream = index_tree_next(&stream->node);
+ if (stream == NULL)
+ return true;
+ }
+ }
+
+ // Start from the first Record in the Stream.
+ group = (const index_group *)(stream->groups.leftmost);
+ record = 0;
+
+ } else if (group != NULL && record < group->last) {
+ // The next Record is in the same group.
+ ++record;
+
+ } else {
+ // This group has no more Records or this Stream has
+ // no Blocks at all.
+ record = 0;
+
+ // If group is not NULL, this Stream has at least one Block
+ // and thus at least one group. Find the next group.
+ if (group != NULL)
+ group = index_tree_next(&group->node);
+
+ if (group == NULL) {
+ // This Stream has no more Records. Find the next
+ // Stream. If we are being asked to return information
+ // about a Block, we skip empty Streams.
+ do {
+ stream = index_tree_next(&stream->node);
+ if (stream == NULL)
+ return true;
+ } while (mode >= LZMA_INDEX_ITER_BLOCK
+ && stream->groups.leftmost == NULL);
+
+ group = (const index_group *)(
+ stream->groups.leftmost);
+ }
+ }
+
+ if (mode == LZMA_INDEX_ITER_NONEMPTY_BLOCK) {
+ // We need to look for the next Block again if this Block
+ // is empty.
+ if (record == 0) {
+ if (group->node.uncompressed_base
+ == group->records[0].uncompressed_sum)
+ goto again;
+ } else if (group->records[record - 1].uncompressed_sum
+ == group->records[record].uncompressed_sum) {
+ goto again;
+ }
+ }
+
+ iter->internal[ITER_STREAM].p = stream;
+ iter->internal[ITER_GROUP].p = group;
+ iter->internal[ITER_RECORD].s = record;
+
+ iter_set_info(iter);
+
+ return false;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
+{
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+
+ // If the target is past the end of the file, return immediately.
+ if (i->uncompressed_size <= target)
+ return true;
+
+ // Locate the Stream containing the target offset.
+ const index_stream *stream = index_tree_locate(&i->streams, target);
+ assert(stream != NULL);
+ target -= stream->node.uncompressed_base;
+
+ // Locate the group containing the target offset.
+ const index_group *group = index_tree_locate(&stream->groups, target);
+ assert(group != NULL);
+
+ // Use binary search to locate the exact Record. It is the first
+ // Record whose uncompressed_sum is greater than target.
+ // This is because we want the rightmost Record that fullfills the
+ // search criterion. It is possible that there are empty Blocks;
+ // we don't want to return them.
+ size_t left = 0;
+ size_t right = group->last;
+
+ while (left < right) {
+ const size_t pos = left + (right - left) / 2;
+ if (group->records[pos].uncompressed_sum <= target)
+ left = pos + 1;
+ else
+ right = pos;
+ }
+
+ iter->internal[ITER_STREAM].p = stream;
+ iter->internal[ITER_GROUP].p = group;
+ iter->internal[ITER_RECORD].s = left;
+
+ iter_set_info(iter);
+
+ return false;
+}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.h
index 9f177b1b3d4..64e97247dd3 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index.h
@@ -28,6 +28,12 @@
extern uint32_t lzma_index_padding_size(const lzma_index *i);
+/// Set for how many Records to allocate memory the next time
+/// lzma_index_append() needs to allocate space for a new Record.
+/// This is used only by the Index decoder.
+extern void lzma_index_prealloc(lzma_index *i, lzma_vli records);
+
+
/// Round the variable-length integer to the next multiple of four.
static inline lzma_vli
vli_ceil4(lzma_vli vli)
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_decoder.c
index 51e9de38ed9..86a22971b06 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_decoder.c
@@ -32,6 +32,10 @@ struct lzma_coder_s {
/// Target Index
lzma_index *index;
+ /// Pointer give by the application, which is set after
+ /// successful decoding.
+ lzma_index **index_ptr;
+
/// Number of Records left to decode.
lzma_vli count;
@@ -91,11 +95,15 @@ index_decode(lzma_coder *coder, lzma_allocator *allocator,
// Fall through
case SEQ_MEMUSAGE:
- if (lzma_index_memusage(coder->count) > coder->memlimit) {
+ if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
ret = LZMA_MEMLIMIT_ERROR;
goto out;
}
+ // Tell the Index handling code how many Records this
+ // Index has to allow it to allocate memory more efficiently.
+ lzma_index_prealloc(coder->index, coder->count);
+
ret = LZMA_OK;
coder->sequence = coder->count == 0
? SEQ_PADDING_INIT : SEQ_UNPADDED;
@@ -174,6 +182,10 @@ index_decode(lzma_coder *coder, lzma_allocator *allocator,
} while (++coder->pos < 4);
+ // Decoding was successful, now we can let the application
+ // see the decoded Index.
+ *coder->index_ptr = coder->index;
+
// Make index NULL so we don't free it unintentionally.
coder->index = NULL;
@@ -206,13 +218,15 @@ static lzma_ret
index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit)
{
- *memusage = lzma_index_memusage(coder->count);
+ *memusage = lzma_index_memusage(1, coder->count);
+ *old_memlimit = coder->memlimit;
- if (new_memlimit != 0 && new_memlimit < *memusage)
- return LZMA_MEMLIMIT_ERROR;
+ if (new_memlimit != 0) {
+ if (new_memlimit < *memusage)
+ return LZMA_MEMLIMIT_ERROR;
- *old_memlimit = coder->memlimit;
- coder->memlimit = new_memlimit;
+ coder->memlimit = new_memlimit;
+ }
return LZMA_OK;
}
@@ -222,15 +236,21 @@ static lzma_ret
index_decoder_reset(lzma_coder *coder, lzma_allocator *allocator,
lzma_index **i, uint64_t memlimit)
{
+ // Remember the pointer given by the application. We will set it
+ // to point to the decoded Index only if decoding is successful.
+ // Before that, keep it NULL so that applications can always safely
+ // pass it to lzma_index_end() no matter did decoding succeed or not.
+ coder->index_ptr = i;
+ *i = NULL;
+
// We always allocate a new lzma_index.
- *i = lzma_index_init(NULL, allocator);
- if (*i == NULL)
+ coder->index = lzma_index_init(allocator);
+ if (coder->index == NULL)
return LZMA_MEM_ERROR;
// Initialize the rest.
coder->sequence = SEQ_INDICATOR;
coder->memlimit = memlimit;
- coder->index = *i;
coder->count = 0; // Needs to be initialized due to _memconfig().
coder->pos = 0;
coder->crc32 = 0;
@@ -282,7 +302,8 @@ lzma_index_buffer_decode(
const uint8_t *in, size_t *in_pos, size_t in_size)
{
// Sanity checks
- if (i == NULL || in == NULL || in_pos == NULL || *in_pos > in_size)
+ if (i == NULL || memlimit == NULL
+ || in == NULL || in_pos == NULL || *in_pos > in_size)
return LZMA_PROG_ERROR;
// Initialize the decoder.
@@ -302,8 +323,7 @@ lzma_index_buffer_decode(
} else {
// Something went wrong, free the Index structure and restore
// the input position.
- lzma_index_end(*i, allocator);
- *i = NULL;
+ lzma_index_end(coder.index, allocator);
*in_pos = in_start;
if (ret == LZMA_OK) {
@@ -315,7 +335,7 @@ lzma_index_buffer_decode(
} else if (ret == LZMA_MEMLIMIT_ERROR) {
// Tell the caller how much memory would have
// been needed.
- *memlimit = lzma_index_memusage(coder.count);
+ *memlimit = lzma_index_memusage(1, coder.count);
}
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.c
index e23963ce42a..706f1fd7990 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.c
@@ -26,12 +26,11 @@ struct lzma_coder_s {
SEQ_CRC32,
} sequence;
- /// Index given to us to encode. Note that we modify it in sense that
- /// we read it, and read position is tracked in lzma_index structure.
- lzma_index *index;
+ /// Index being encoded
+ const lzma_index *index;
- /// The current Index Record being encoded
- lzma_index_record record;
+ /// Iterator for the Index being encoded
+ lzma_index_iter iter;
/// Position in integers
size_t pos;
@@ -69,8 +68,8 @@ index_encode(lzma_coder *coder,
break;
case SEQ_COUNT: {
- const lzma_vli index_count = lzma_index_count(coder->index);
- ret = lzma_vli_encode(index_count, &coder->pos,
+ const lzma_vli count = lzma_index_block_count(coder->index);
+ ret = lzma_vli_encode(count, &coder->pos,
out, out_pos, out_size);
if (ret != LZMA_STREAM_END)
goto out;
@@ -82,7 +81,8 @@ index_encode(lzma_coder *coder,
}
case SEQ_NEXT:
- if (lzma_index_read(coder->index, &coder->record)) {
+ if (lzma_index_iter_next(
+ &coder->iter, LZMA_INDEX_ITER_BLOCK)) {
// Get the size of the Index Padding field.
coder->pos = lzma_index_padding_size(coder->index);
assert(coder->pos <= 3);
@@ -90,12 +90,6 @@ index_encode(lzma_coder *coder,
break;
}
- // Unpadded Size must be within valid limits.
- if (coder->record.unpadded_size < UNPADDED_SIZE_MIN
- || coder->record.unpadded_size
- > UNPADDED_SIZE_MAX)
- return LZMA_PROG_ERROR;
-
coder->sequence = SEQ_UNPADDED;
// Fall through
@@ -103,8 +97,8 @@ index_encode(lzma_coder *coder,
case SEQ_UNPADDED:
case SEQ_UNCOMPRESSED: {
const lzma_vli size = coder->sequence == SEQ_UNPADDED
- ? coder->record.unpadded_size
- : coder->record.uncompressed_size;
+ ? coder->iter.block.unpadded_size
+ : coder->iter.block.uncompressed_size;
ret = lzma_vli_encode(size, &coder->pos,
out, out_pos, out_size);
@@ -172,9 +166,9 @@ index_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
static void
-index_encoder_reset(lzma_coder *coder, lzma_index *i)
+index_encoder_reset(lzma_coder *coder, const lzma_index *i)
{
- lzma_index_rewind(i);
+ lzma_index_iter_init(&coder->iter, i);
coder->sequence = SEQ_INDICATOR;
coder->index = i;
@@ -187,7 +181,7 @@ index_encoder_reset(lzma_coder *coder, lzma_index *i)
extern lzma_ret
lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
- lzma_index *i)
+ const lzma_index *i)
{
lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
@@ -210,7 +204,7 @@ lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
extern LZMA_API(lzma_ret)
-lzma_index_encoder(lzma_stream *strm, lzma_index *i)
+lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
{
lzma_next_strm_init(lzma_index_encoder_init, strm, i);
@@ -221,10 +215,10 @@ lzma_index_encoder(lzma_stream *strm, lzma_index *i)
extern LZMA_API(lzma_ret)
-lzma_index_buffer_encode(lzma_index *i,
+lzma_index_buffer_encode(const lzma_index *i,
uint8_t *out, size_t *out_pos, size_t out_size)
{
- // Validate the arugments.
+ // Validate the arguments.
if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size)
return LZMA_PROG_ERROR;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.h
index c85d1c87ab3..a13c94dcd07 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_encoder.h
@@ -17,7 +17,7 @@
extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
- lzma_allocator *allocator, lzma_index *i);
+ lzma_allocator *allocator, const lzma_index *i);
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_hash.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_hash.c
index e3e9386ae8e..e3e9386ae8e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index_hash.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/index_hash.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_decoder.c
index ae753155180..ae753155180 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_encoder.c
index dd94c22add3..bbafaa6d01d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_buffer_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_buffer_encoder.c
@@ -94,11 +94,11 @@ lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
// Index
{
// Create an Index with one Record.
- lzma_index *i = lzma_index_init(NULL, NULL);
+ lzma_index *i = lzma_index_init(allocator);
if (i == NULL)
return LZMA_MEM_ERROR;
- lzma_ret ret = lzma_index_append(i, NULL,
+ lzma_ret ret = lzma_index_append(i, allocator,
lzma_block_unpadded_size(&block),
block.uncompressed_size);
@@ -111,7 +111,7 @@ lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
stream_flags.backward_size = lzma_index_size(i);
}
- lzma_index_end(i, NULL);
+ lzma_index_end(i, allocator);
if (ret != LZMA_OK)
return ret;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.c
index dcc047d9673..37ea71edbd7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.c
@@ -182,6 +182,9 @@ stream_decode(lzma_coder *coder, lzma_allocator *allocator,
coder->pos = 0;
+ // Version 0 is currently the only possible version.
+ coder->block_options.version = 0;
+
// Set up a buffer to hold the filter chain. Block Header
// decoder will initialize all members of this array so
// we don't need to do it here.
@@ -358,7 +361,7 @@ stream_decode(lzma_coder *coder, lzma_allocator *allocator,
return LZMA_PROG_ERROR;
}
- return LZMA_OK;
+ // Never reached
}
@@ -383,12 +386,15 @@ static lzma_ret
stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit)
{
- if (new_memlimit != 0 && new_memlimit < coder->memusage)
- return LZMA_MEMLIMIT_ERROR;
-
*memusage = coder->memusage;
*old_memlimit = coder->memlimit;
- coder->memlimit = new_memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < coder->memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
return LZMA_OK;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.h
index e54ac28f44a..e54ac28f44a 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.c
index 292efc8248b..48d91da7933 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.c
@@ -25,12 +25,20 @@ struct lzma_coder_s {
SEQ_STREAM_FOOTER,
} sequence;
+ /// True if Block encoder has been initialized by
+ /// lzma_stream_encoder_init() or stream_encoder_update()
+ /// and thus doesn't need to be initialized in stream_encode().
+ bool block_encoder_is_initialized;
+
/// Block
lzma_next_coder block_encoder;
/// Options for the Block encoder
lzma_block block_options;
+ /// The filter chain currently in use
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
/// Index encoder. This is separate from Block encoder, because this
/// doesn't take much memory, and when encoding multiple Streams
/// with the same encoding options we avoid reallocating memory.
@@ -97,7 +105,7 @@ stream_encode(lzma_coder *coder, lzma_allocator *allocator,
case SEQ_BLOCK_INIT: {
if (*in_pos == in_size) {
// If we are requested to flush or finish the current
- // Block, return LZMA_STREAM_END immediatelly since
+ // Block, return LZMA_STREAM_END immediately since
// there's nothing to do.
if (action != LZMA_FINISH)
return action == LZMA_RUN
@@ -117,12 +125,16 @@ stream_encode(lzma_coder *coder, lzma_allocator *allocator,
break;
}
- // Initialize the Block encoder except if this is the first
- // Block, because stream_encoder_init() has already
- // initialized it.
- if (lzma_index_count(coder->index) != 0)
+ // Initialize the Block encoder unless it was already
+ // initialized by lzma_stream_encoder_init() or
+ // stream_encoder_update().
+ if (!coder->block_encoder_is_initialized)
return_if_error(block_encoder_init(coder, allocator));
+ // Make it false so that we don't skip the initialization
+ // with the next Block.
+ coder->block_encoder_is_initialized = false;
+
// Encode the Block Header. This shouldn't fail since we have
// already initialized the Block encoder.
if (lzma_block_header_encode(&coder->block_options,
@@ -202,11 +214,54 @@ stream_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
lzma_next_end(&coder->block_encoder, allocator);
lzma_next_end(&coder->index_encoder, allocator);
lzma_index_end(coder->index, allocator);
+
+ for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+ lzma_free(coder->filters[i].options, allocator);
+
lzma_free(coder, allocator);
return;
}
+static lzma_ret
+stream_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters,
+ const lzma_filter *reversed_filters)
+{
+ if (coder->sequence <= SEQ_BLOCK_INIT) {
+ // There is no incomplete Block waiting to be finished,
+ // thus we can change the whole filter chain. Start by
+ // trying to initialize the Block encoder with the new
+ // chain. This way we detect if the chain is valid.
+ coder->block_encoder_is_initialized = false;
+ coder->block_options.filters = (lzma_filter *)(filters);
+ const lzma_ret ret = block_encoder_init(coder, allocator);
+ coder->block_options.filters = coder->filters;
+ if (ret != LZMA_OK)
+ return ret;
+
+ coder->block_encoder_is_initialized = true;
+
+ } else if (coder->sequence <= SEQ_BLOCK_ENCODE) {
+ // We are in the middle of a Block. Try to update only
+ // the filter-specific options.
+ return_if_error(coder->block_encoder.update(
+ coder->block_encoder.coder, allocator,
+ filters, reversed_filters));
+ } else {
+ // Trying to update the filter chain when we are already
+ // encoding Index or Stream Footer.
+ return LZMA_PROG_ERROR;
+ }
+
+ // Free the copy of the old chain and make a copy of the new chain.
+ for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
+ lzma_free(coder->filters[i].options, allocator);
+
+ return lzma_filters_copy(filters, coder->filters, allocator);
+}
+
+
extern lzma_ret
lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter *filters, lzma_check check)
@@ -223,6 +278,7 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->code = &stream_encode;
next->end = &stream_encoder_end;
+ next->update = &stream_encoder_update;
next->coder->block_encoder = LZMA_NEXT_CODER_INIT;
next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
@@ -233,10 +289,11 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->coder->sequence = SEQ_STREAM_HEADER;
next->coder->block_options.version = 0;
next->coder->block_options.check = check;
- next->coder->block_options.filters = (lzma_filter *)(filters);
+ next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
// Initialize the Index
- next->coder->index = lzma_index_init(next->coder->index, allocator);
+ lzma_index_end(next->coder->index, allocator);
+ next->coder->index = lzma_index_init(allocator);
if (next->coder->index == NULL)
return LZMA_MEM_ERROR;
@@ -251,11 +308,11 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->coder->buffer_pos = 0;
next->coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
- // Initialize the Block encoder. This way we detect if the given
- // filters are supported by the current liblzma build, and the
- // application doesn't need to keep the filters structure available
- // unless it is going to use LZMA_FULL_FLUSH.
- return block_encoder_init(next->coder, allocator);
+ // Initialize the Block encoder. This way we detect unsupported
+ // filter chains when initializing the Stream encoder instead of
+ // giving an error after Stream Header has already written out.
+ return stream_encoder_update(
+ next->coder, allocator, filters, NULL);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.h
index 46a7aed72ea..46a7aed72ea 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.c
index fbe8eb8abda..fbe8eb8abda 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.h
index 9f3122a3b1e..9f3122a3b1e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_common.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_decoder.c
index 3dbbbcf4445..1bc2f97c519 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_decoder.c
@@ -38,7 +38,7 @@ lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
// and unsupported files.
const uint32_t crc = lzma_crc32(in + sizeof(lzma_header_magic),
LZMA_STREAM_FLAGS_SIZE, 0);
- if (crc != integer_read_32(in + sizeof(lzma_header_magic)
+ if (crc != unaligned_read32le(in + sizeof(lzma_header_magic)
+ LZMA_STREAM_FLAGS_SIZE))
return LZMA_DATA_ERROR;
@@ -67,7 +67,7 @@ lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
// CRC32
const uint32_t crc = lzma_crc32(in + sizeof(uint32_t),
sizeof(uint32_t) + LZMA_STREAM_FLAGS_SIZE, 0);
- if (crc != integer_read_32(in))
+ if (crc != unaligned_read32le(in))
return LZMA_DATA_ERROR;
// Stream Flags
@@ -75,7 +75,7 @@ lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
return LZMA_OPTIONS_ERROR;
// Backward Size
- options->backward_size = integer_read_32(in + sizeof(uint32_t));
+ options->backward_size = unaligned_read32le(in + sizeof(uint32_t));
options->backward_size = (options->backward_size + 1) * 4;
return LZMA_OK;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_encoder.c
index ecbd0f13c31..4e717159f1e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/stream_flags_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/stream_flags_encoder.c
@@ -46,7 +46,7 @@ lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
const uint32_t crc = lzma_crc32(out + sizeof(lzma_header_magic),
LZMA_STREAM_FLAGS_SIZE, 0);
- integer_write_32(out + sizeof(lzma_header_magic)
+ unaligned_write32le(out + sizeof(lzma_header_magic)
+ LZMA_STREAM_FLAGS_SIZE, crc);
return LZMA_OK;
@@ -66,7 +66,7 @@ lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
if (!is_backward_size_valid(options))
return LZMA_PROG_ERROR;
- integer_write_32(out + 4, options->backward_size / 4 - 1);
+ unaligned_write32le(out + 4, options->backward_size / 4 - 1);
// Stream Flags
if (stream_flags_encode(options, out + 2 * 4))
@@ -76,7 +76,7 @@ lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
const uint32_t crc = lzma_crc32(
out + 4, 4 + LZMA_STREAM_FLAGS_SIZE, 0);
- integer_write_32(out, crc);
+ unaligned_write32le(out, crc);
// Magic
memcpy(out + 2 * 4 + LZMA_STREAM_FLAGS_SIZE,
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_decoder.c
index ffb27cadc53..c181828bf56 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_decoder.c
@@ -14,7 +14,7 @@
extern LZMA_API(lzma_ret)
-lzma_vli_decode(lzma_vli *restrict vli, size_t *restrict vli_pos,
+lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos,
const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size)
{
@@ -47,7 +47,7 @@ lzma_vli_decode(lzma_vli *restrict vli, size_t *restrict vli_pos,
do {
// Read the next byte. Use a temporary variable so that we
- // can update *in_pos immediatelly.
+ // can update *in_pos immediately.
const uint8_t byte = in[*in_pos];
++*in_pos;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_encoder.c
index ebc9f344acf..f8642694e29 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_encoder.c
@@ -14,7 +14,7 @@
extern LZMA_API(lzma_ret)
-lzma_vli_encode(lzma_vli vli, size_t *restrict vli_pos,
+lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
uint8_t *restrict out, size_t *restrict out_pos,
size_t out_size)
{
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_size.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_size.c
index ec1b4fa488b..ec1b4fa488b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/vli_size.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/common/vli_size.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/Makefile.inc
index c7739b44223..c7739b44223 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.c
index 6d55ff6538e..930ad215131 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.c
@@ -25,7 +25,7 @@ delta_coder_end(lzma_coder *coder, lzma_allocator *allocator)
extern lzma_ret
lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
- const lzma_filter_info *filters, lzma_code_function code)
+ const lzma_filter_info *filters)
{
// Allocate memory for the decoder if needed.
if (next->coder == NULL) {
@@ -38,9 +38,6 @@ lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->coder->next = LZMA_NEXT_CODER_INIT;
}
- // Coding function is different for encoder and decoder.
- next->code = code;
-
// Validate the options.
if (lzma_delta_coder_memusage(filters[0].options) == UINT64_MAX)
return LZMA_OPTIONS_ERROR;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.h
index 7e7e1baaf68..7e7e1baaf68 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_common.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.c
index 2ddf163d8d0..2cf60d5bdc7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.c
@@ -50,7 +50,8 @@ extern lzma_ret
lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters)
{
- return lzma_delta_coder_init(next, allocator, filters, &delta_decode);
+ next->code = &delta_decode;
+ return lzma_delta_coder_init(next, allocator, filters);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.h
index ae89acc59f8..ae89acc59f8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.c
index 0244673eae3..80d0d1764dd 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.c
@@ -83,11 +83,26 @@ delta_encode(lzma_coder *coder, lzma_allocator *allocator,
}
+static lzma_ret
+delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((unused)),
+ const lzma_filter *reversed_filters)
+{
+ // Delta doesn't and will never support changing the options in
+ // the middle of encoding. If the app tries to change them, we
+ // simply ignore them.
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
extern lzma_ret
lzma_delta_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters)
{
- return lzma_delta_coder_init(next, allocator, filters, &delta_encode);
+ next->code = &delta_encode;
+ next->update = &delta_encoder_update;
+ return lzma_delta_coder_init(next, allocator, filters);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.h
index a447862f205..a447862f205 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_private.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_private.h
index 69be82e2f7d..62b7fed86e4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/delta/delta_private.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/delta/delta_private.h
@@ -32,6 +32,6 @@ struct lzma_coder_s {
extern lzma_ret lzma_delta_coder_init(
lzma_next_coder *next, lzma_allocator *allocator,
- const lzma_filter_info *filters, lzma_code_function code);
+ const lzma_filter_info *filters);
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma.pc.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma.pc.in
index eb3f6c75d38..7f11f1a2009 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma.pc.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma.pc.in
@@ -12,7 +12,7 @@ includedir=@includedir@
Name: liblzma
Description: General purpose data compression library
-URL: @PACKAGE_HOMEPAGE@
+URL: @PACKAGE_URL@
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -llzma
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma_w32res.rc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma_w32res.rc
index d4d8159c7b4..d4d8159c7b4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/liblzma_w32res.rc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/liblzma_w32res.rc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/Makefile.inc
index 470d59c09d3..75742a84bf8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/Makefile.inc
@@ -10,6 +10,7 @@ liblzma_la_SOURCES += \
lz/lz_encoder.c \
lz/lz_encoder.h \
lz/lz_encoder_hash.h \
+ lz/lz_encoder_hash_table.h \
lz/lz_encoder_mf.c
endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.c
index e91ad81c32a..350b1f89812 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.c
@@ -39,15 +39,15 @@ struct lzma_coder_s {
/// marker. This may become true before next_finished becomes true.
bool this_finished;
- /// Temporary buffer needed when the LZ-based filter is not the last
- /// filter in the chain. The output of the next filter is first
- /// decoded into buffer[], which is then used as input for the actual
- /// LZ-based decoder.
- struct {
- size_t pos;
- size_t size;
- uint8_t buffer[LZMA_BUFFER_SIZE];
- } temp;
+ /// Temporary buffer needed when the LZ-based filter is not the last
+ /// filter in the chain. The output of the next filter is first
+ /// decoded into buffer[], which is then used as input for the actual
+ /// LZ-based decoder.
+ struct {
+ size_t pos;
+ size_t size;
+ uint8_t buffer[LZMA_BUFFER_SIZE];
+ } temp;
};
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.h
index bf1609dbedf..bf1609dbedf 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.c
index 5437546dd2b..757e53749c4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.c
@@ -13,7 +13,12 @@
#include "lz_encoder.h"
#include "lz_encoder_hash.h"
-#include "check.h"
+
+// See lz_encoder_hash.h. This is a bit hackish but avoids making
+// endianness a conditional in makefiles.
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+# include "lz_encoder_hash_table.h"
+#endif
struct lzma_coder_s {
@@ -84,23 +89,20 @@ fill_window(lzma_coder *coder, lzma_allocator *allocator, const uint8_t *in,
// (which I find cleanest), but we need size_t here when filling
// the history window.
size_t write_pos = coder->mf.write_pos;
- size_t in_used;
lzma_ret ret;
if (coder->next.code == NULL) {
// Not using a filter, simply memcpy() as much as possible.
- in_used = lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
+ lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
&write_pos, coder->mf.size);
ret = action != LZMA_RUN && *in_pos == in_size
? LZMA_STREAM_END : LZMA_OK;
} else {
- const size_t in_start = *in_pos;
ret = coder->next.code(coder->next.coder, allocator,
in, in_pos, in_size,
coder->mf.buffer, &write_pos,
coder->mf.size, action);
- in_used = *in_pos - in_start;
}
coder->mf.write_pos = write_pos;
@@ -227,7 +229,7 @@ lz_encoder_prepare(lzma_mf *mf, lzma_allocator *allocator,
mf->nice_len = lz_options->nice_len;
// cyclic_size has to stay smaller than 2 Gi. Note that this doesn't
- // mean limitting dictionary size to less than 2 GiB. With a match
+ // mean limiting dictionary size to less than 2 GiB. With a match
// finder that uses multibyte resolution (hashes start at e.g. every
// fourth byte), cyclic_size would stay below 2 Gi even when
// dictionary size is greater than 2 GiB.
@@ -473,6 +475,22 @@ lz_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
}
+static lzma_ret
+lz_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((unused)),
+ const lzma_filter *reversed_filters)
+{
+ if (coder->lz.options_update == NULL)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(coder->lz.options_update(
+ coder->lz.coder, reversed_filters));
+
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
extern lzma_ret
lzma_lz_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters,
@@ -493,6 +511,7 @@ lzma_lz_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->code = &lz_encode;
next->end = &lz_encoder_end;
+ next->update = &lz_encoder_update;
next->coder->lz.coder = NULL;
next->coder->lz.code = NULL;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.h
index 35e9ebbfc4d..f6352a47227 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder.h
@@ -143,7 +143,7 @@ typedef struct {
/// maximum possible length.
size_t match_len_max;
- /// Match finder will search matches of at maximum of this length.
+ /// Match finder will search matches up to this length.
/// This must be less than or equal to match_len_max.
size_t nice_len;
@@ -170,9 +170,9 @@ typedef struct {
// also take longer.
//
// A single encoder loop in the LZ-based encoder may call the match finder
-// (mf_find() or mf_skip()) at maximum of after_size times.
-// In other words, a single encoder loop may advance lzma_mf.read_pos at
-// maximum of after_size times. Since matches are looked up to
+// (mf_find() or mf_skip()) at most after_size times. In other words,
+// a single encoder loop may increment lzma_mf.read_pos at most after_size
+// times. Since matches are looked up to
// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
// amount of extra buffer needed after dict_size becomes
// after_size + match_len_max.
@@ -182,7 +182,7 @@ typedef struct {
// TODO: Maybe this could be changed by making the LZ-based encoders to
// store the actual literals as they do with length-distance pairs.
//
-// Alrogithms such as LZMA2 first try to compress a chunk, and then check
+// Algorithms such as LZMA2 first try to compress a chunk, and then check
// if the encoded result is smaller than the uncompressed one. If the chunk
// was uncompressible, it is better to store it in uncompressed form in
// the output stream. To do this, the whole uncompressed chunk has to be
@@ -201,6 +201,10 @@ typedef struct {
/// Free allocated resources
void (*end)(lzma_coder *coder, lzma_allocator *allocator);
+ /// Update the options in the middle of the encoding.
+ lzma_ret (*options_update)(lzma_coder *coder,
+ const lzma_filter *filter);
+
} lzma_lz_encoder;
@@ -270,7 +274,7 @@ mf_skip(lzma_mf *mf, uint32_t amount)
}
-/// Copies at maximum of *left amount of bytes from the history buffer
+/// Copies at most *left number of bytes from the history buffer
/// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
static inline void
mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_hash.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash.h
index dd4b1f1906b..c398d7d05e4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_hash.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash.h
@@ -13,6 +13,17 @@
#ifndef LZMA_LZ_ENCODER_HASH_H
#define LZMA_LZ_ENCODER_HASH_H
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+ // This is to make liblzma produce the same output on big endian
+ // systems that it does on little endian systems. lz_encoder.c
+ // takes care of including the actual table.
+ extern const uint32_t lzma_lz_hash_table[256];
+# define hash_table lzma_lz_hash_table
+#else
+# include "check.h"
+# define hash_table lzma_crc32_table[0]
+#endif
+
#define HASH_2_SIZE (UINT32_C(1) << 10)
#define HASH_3_SIZE (UINT32_C(1) << 16)
#define HASH_4_SIZE (UINT32_C(1) << 20)
@@ -25,8 +36,8 @@
#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE)
#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE)
-// TODO Benchmark, and probably doesn't need to be endian dependent.
-#if !defined(WORDS_BIGENDIAN) && defined(HAVE_FAST_UNALIGNED_ACCESS)
+// Endianness doesn't matter in hash_2_calc() (no effect on the output).
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
# define hash_2_calc() \
const uint32_t hash_value = *(const uint16_t *)(cur);
#else
@@ -36,31 +47,31 @@
#endif
#define hash_3_calc() \
- const uint32_t temp = lzma_crc32_table[0][cur[0]] ^ cur[1]; \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
const uint32_t hash_2_value = temp & HASH_2_MASK; \
const uint32_t hash_value \
= (temp ^ ((uint32_t)(cur[2]) << 8)) & mf->hash_mask
#define hash_4_calc() \
- const uint32_t temp = lzma_crc32_table[0][cur[0]] ^ cur[1]; \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
const uint32_t hash_2_value = temp & HASH_2_MASK; \
const uint32_t hash_3_value \
= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
const uint32_t hash_value = (temp ^ ((uint32_t)(cur[2]) << 8) \
- ^ (lzma_crc32_table[0][cur[3]] << 5)) & mf->hash_mask
+ ^ (hash_table[cur[3]] << 5)) & mf->hash_mask
// The following are not currently used.
#define hash_5_calc() \
- const uint32_t temp = lzma_crc32_table[0][cur[0]] ^ cur[1]; \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
const uint32_t hash_2_value = temp & HASH_2_MASK; \
const uint32_t hash_3_value \
= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
- ^ lzma_crc32_table[0][cur[3]] << 5); \
+ ^ hash_table[cur[3]] << 5); \
const uint32_t hash_value \
- = (hash_4_value ^ (lzma_crc32_table[0][cur[4]] << 3)) \
+ = (hash_4_value ^ (hash_table[cur[4]] << 3)) \
& mf->hash_mask; \
hash_4_value &= HASH_4_MASK
@@ -68,30 +79,30 @@
#define hash_zip_calc() \
const uint32_t hash_value \
= (((uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)) \
- ^ lzma_crc32_table[0][cur[2]]) & 0xFFFF
+ ^ hash_table[cur[2]]) & 0xFFFF
*/
#define hash_zip_calc() \
const uint32_t hash_value \
= (((uint32_t)(cur[2]) | ((uint32_t)(cur[0]) << 8)) \
- ^ lzma_crc32_table[0][cur[1]]) & 0xFFFF
+ ^ hash_table[cur[1]]) & 0xFFFF
#define mt_hash_2_calc() \
const uint32_t hash_2_value \
- = (lzma_crc32_table[0][cur[0]] ^ cur[1]) & HASH_2_MASK
+ = (hash_table[cur[0]] ^ cur[1]) & HASH_2_MASK
#define mt_hash_3_calc() \
- const uint32_t temp = lzma_crc32_table[0][cur[0]] ^ cur[1]; \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
const uint32_t hash_2_value = temp & HASH_2_MASK; \
const uint32_t hash_3_value \
= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK
#define mt_hash_4_calc() \
- const uint32_t temp = lzma_crc32_table[0][cur[0]] ^ cur[1]; \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
const uint32_t hash_2_value = temp & HASH_2_MASK; \
const uint32_t hash_3_value \
= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
const uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
- (lzma_crc32_table[0][cur[3]] << 5)) & HASH_4_MASK
+ (hash_table[cur[3]] << 5)) & HASH_4_MASK
#endif
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash_table.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash_table.h
new file mode 100644
index 00000000000..8c51717d704
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_hash_table.h
@@ -0,0 +1,68 @@
+/* This file has been automatically generated by crc32_tablegen.c. */
+
+const uint32_t lzma_lz_hash_table[256] = {
+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+};
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_mf.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_mf.c
index e48de4fee93..b31b08578d4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lz/lz_encoder_mf.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lz/lz_encoder_mf.c
@@ -13,7 +13,6 @@
#include "lz_encoder.h"
#include "lz_encoder_hash.h"
-#include "check.h"
/// \brief Find matches starting from the current byte
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/Makefile.inc
index 7fc4d172096..7fc4d172096 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos.h
index a95a00c4792..4aea23181ab 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos.h
@@ -76,15 +76,12 @@
// slightly faster, but sometimes it is a lot slower.
#ifdef HAVE_SMALL
-# include "bsr.h"
-
# define get_pos_slot(pos) ((pos) <= 4 ? (pos) : get_pos_slot_2(pos))
static inline uint32_t
get_pos_slot_2(uint32_t pos)
{
- uint32_t i;
- lzma_bsr(i, pos);
+ const uint32_t i = bsr32(pos);
return (i + i) + ((pos >> (i - 1)) & 1);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_table.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_table.c
index 6a3ceac0e90..6a3ceac0e90 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_table.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_table.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_tablegen.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_tablegen.c
index c97e6f411c2..c97e6f411c2 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/fastpos_tablegen.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/fastpos_tablegen.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.c
index b4c2f2d5ba7..b4c2f2d5ba7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.h
index fac4ac487b0..fac4ac487b0 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.c
index 8db813685f6..1e0569a4a95 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.c
@@ -29,10 +29,6 @@ struct lzma_coder_s {
/// LZMA encoder
lzma_coder *lzma;
- /// If this is not NULL, we will check new options from this
- /// structure when starting a new chunk.
- const lzma_options_lzma *opt_new;
-
/// LZMA options currently in use.
lzma_options_lzma opt_cur;
@@ -155,25 +151,6 @@ lzma2_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
? LZMA_OK : LZMA_STREAM_END;
}
- // Look if there are new options. At least for now,
- // only lc/lp/pb can be changed.
- if (coder->opt_new != NULL
- && (coder->opt_cur.lc != coder->opt_new->lc
- || coder->opt_cur.lp != coder->opt_new->lp
- || coder->opt_cur.pb != coder->opt_new->pb)) {
- // Options have been changed, copy them to opt_cur.
- // These get validated as part of
- // lzma_lzma_encoder_reset() below.
- coder->opt_cur.lc = coder->opt_new->lc;
- coder->opt_cur.lp = coder->opt_new->lp;
- coder->opt_cur.pb = coder->opt_new->pb;
-
- // We need to write the new options and reset
- // the encoder state.
- coder->need_properties = true;
- coder->need_state_reset = true;
- }
-
if (coder->need_state_reset)
return_if_error(lzma_lzma_encoder_reset(
coder->lzma, &coder->opt_cur));
@@ -192,7 +169,7 @@ lzma2_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
uint32_t limit;
if (left < mf->match_len_max) {
- // Must flush immediatelly since the next LZMA symbol
+ // Must flush immediately since the next LZMA symbol
// could make the uncompressed size of the chunk too
// big.
limit = 0;
@@ -294,6 +271,39 @@ lzma2_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
static lzma_ret
+lzma2_encoder_options_update(lzma_coder *coder, const lzma_filter *filter)
+{
+ // New options can be set only when there is no incomplete chunk.
+ // This is the case at the beginning of the raw stream and right
+ // after LZMA_SYNC_FLUSH.
+ if (filter->options == NULL || coder->sequence != SEQ_INIT)
+ return LZMA_PROG_ERROR;
+
+ // Look if there are new options. At least for now,
+ // only lc/lp/pb can be changed.
+ const lzma_options_lzma *opt = filter->options;
+ if (coder->opt_cur.lc != opt->lc || coder->opt_cur.lp != opt->lp
+ || coder->opt_cur.pb != opt->pb) {
+ // Validate the options.
+ if (opt->lc > LZMA_LCLP_MAX || opt->lp > LZMA_LCLP_MAX
+ || opt->lc + opt->lp > LZMA_LCLP_MAX
+ || opt->pb > LZMA_PB_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // The new options will be used when the encoder starts
+ // a new LZMA2 chunk.
+ coder->opt_cur.lc = opt->lc;
+ coder->opt_cur.lp = opt->lp;
+ coder->opt_cur.pb = opt->pb;
+ coder->need_properties = true;
+ coder->need_state_reset = true;
+ }
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
lzma2_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
const void *options, lzma_lz_options *lz_options)
{
@@ -307,13 +317,12 @@ lzma2_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
lz->code = &lzma2_encode;
lz->end = &lzma2_encoder_end;
+ lz->options_update = &lzma2_encoder_options_update;
lz->coder->lzma = NULL;
}
lz->coder->opt_cur = *(const lzma_options_lzma *)(options);
- lz->coder->opt_new = lz->coder->opt_cur.persistent
- ? options : NULL;
lz->coder->sequence = SEQ_INIT;
lz->coder->need_properties = true;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.h
index ca19ef4691c..ca19ef4691c 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma2_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_common.h
index e31e285f9a5..e31e285f9a5 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_common.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.c
index a013a62be7f..4329e019927 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.c
@@ -195,7 +195,7 @@ struct lzma_coder_s {
/// 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
probability pos_slot[LEN_TO_POS_STATES][POS_SLOTS];
- /// Probility trees for additional bits for match distance when the
+ /// Probability trees for additional bits for match distance when the
/// distance is in the range [4, 127].
probability pos_special[FULL_DISTANCES - END_POS_MODEL_INDEX];
@@ -600,7 +600,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
}
#endif
} else {
- // The distace is >= 128. Decode the
+ // The distance is >= 128. Decode the
// lower bits without probabilities
// except the lowest four bits.
assert(symbol >= 14);
@@ -1042,7 +1042,7 @@ lzma_lzma_props_decode(void **options, lzma_allocator *allocator,
// All dictionary sizes are accepted, including zero. LZ decoder
// will automatically use a dictionary at least a few KiB even if
// a smaller dictionary is requested.
- opt->dict_size = integer_read_32(props + 1);
+ opt->dict_size = unaligned_read32le(props + 1);
opt->preset_dict = NULL;
opt->preset_dict_size = 0;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.h
index 147208dc804..a463a76fc69 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_decoder.h
@@ -30,7 +30,7 @@ extern lzma_ret lzma_lzma_props_decode(
/// \brief Decodes the LZMA Properties byte (lc/lp/pb)
///
-/// \return true if error occorred, false on success
+/// \return true if error occurred, false on success
///
extern bool lzma_lzma_lclppb_decode(
lzma_options_lzma *options, uint8_t byte);
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.c
index bda194cddf2..0fe992d510a 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.c
@@ -486,7 +486,7 @@ lzma_lzma_encoder_reset(lzma_coder *coder, const lzma_options_lzma *options)
rc_reset(&coder->rc);
// State
- coder->state = 0;
+ coder->state = STATE_LIT_LIT;
for (size_t i = 0; i < REP_DISTANCES; ++i)
coder->reps[i] = 0;
@@ -661,7 +661,7 @@ lzma_lzma_props_encode(const void *options, uint8_t *out)
if (lzma_lzma_lclppb_encode(opt, out))
return LZMA_PROG_ERROR;
- integer_write_32(out + 1, opt->dict_size);
+ unaligned_write32le(out + 1, opt->dict_size);
return LZMA_OK;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.h
index 835e1f58330..835e1f58330 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_fast.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_fast.c
index 61aaf3b9b8d..4ca55b60028 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_fast.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_fast.c
@@ -62,7 +62,7 @@ lzma_lzma_optimum_fast(lzma_coder *restrict coder, lzma_mf *restrict mf,
&& buf[len] == buf_back[len]; ++len) ;
// If we have found a repeated match that is at least
- // nice_len long, return it immediatelly.
+ // nice_len long, return it immediately.
if (len >= nice_len) {
*back_res = i;
*len_res = len;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_normal.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_normal.c
index cb9a1b9dbc4..9284c8a2896 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_optimum_normal.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_optimum_normal.c
@@ -455,7 +455,7 @@ helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
uint32_t matches_count = coder->matches_count;
uint32_t new_len = coder->longest_match_length;
uint32_t pos_prev = coder->opts[cur].pos_prev;
- uint32_t state;
+ lzma_lzma_state state;
if (coder->opts[cur].prev_1_is_literal) {
--pos_prev;
@@ -531,7 +531,7 @@ helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
const uint32_t cur_and_1_price = cur_price
+ rc_bit_0_price(coder->is_match[state][pos_state])
+ get_literal_price(coder, position, buf[-1],
- !is_literal_state(state), match_byte, current_byte);
+ !is_literal_state(state), match_byte, current_byte);
bool next_is_literal = false;
@@ -579,7 +579,7 @@ helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
--len_test;
if (len_test >= 2) {
- uint32_t state_2 = state;
+ lzma_lzma_state state_2 = state;
update_literal(state_2);
const uint32_t pos_state_next = (position + 1) & coder->pos_mask;
@@ -657,7 +657,7 @@ helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
len_test_2 -= len_test + 1;
if (len_test_2 >= 2) {
- uint32_t state_2 = state;
+ lzma_lzma_state state_2 = state;
update_long_rep(state_2);
uint32_t pos_state_next = (position + len_test) & coder->pos_mask;
@@ -753,7 +753,7 @@ helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
len_test_2 -= len_test + 1;
if (len_test_2 >= 2) {
- uint32_t state_2 = state;
+ lzma_lzma_state state_2 = state;
update_match(state_2);
uint32_t pos_state_next
= (position + len_test) & coder->pos_mask;
@@ -838,7 +838,7 @@ lzma_lzma_optimum_normal(lzma_coder *restrict coder, lzma_mf *restrict mf,
}
// TODO: This needs quite a bit of cleaning still. But splitting
- // the oroginal function to two pieces makes it at least a little
+ // the original function into two pieces makes it at least a little
// more readable, since those two parts don't share many variables.
uint32_t len_end = helper1(coder, mf, back_res, len_res, position);
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_presets.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_presets.c
index 68900a9bed4..c4c9c146f55 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_presets.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_presets.c
@@ -33,7 +33,6 @@ lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
options->lp = LZMA_LP_DEFAULT;
options->pb = LZMA_PB_DEFAULT;
- options->persistent = false;
options->mode = level <= 2 ? LZMA_MODE_FAST : LZMA_MODE_NORMAL;
options->nice_len = level == 0 ? 8 : level <= 5 ? 32 : 64;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_private.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_private.h
index 017f58bd984..684745236c8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/lzma/lzma_encoder_private.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/lzma/lzma_encoder_private.h
@@ -24,7 +24,7 @@
// needed in lzma_lzma_optimum_*() to test if the match is at least
// MATCH_LEN_MIN bytes. Unaligned access gives tiny gain so there's no
// reason to not use it when it is supported.
-#ifdef HAVE_FAST_UNALIGNED_ACCESS
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
# define not_equal_16(a, b) \
(*(const uint16_t *)(a) != *(const uint16_t *)(b))
#else
@@ -85,7 +85,7 @@ struct lzma_coder_s {
/// Number of match candidates in matches[]
uint32_t matches_count;
- /// Varibale to hold the length of the longest match between calls
+ /// Variable to hold the length of the longest match between calls
/// to lzma_lzma_optimum_*().
uint32_t longest_match_length;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/Makefile.inc
index d8a597a2607..d8a597a2607 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price.h
index 8ae02ca7474..8ae02ca7474 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_table.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_table.c
index ac64bf62c76..ac64bf62c76 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_table.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_table.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_tablegen.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_tablegen.c
index bf08ce39d7e..bf08ce39d7e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/price_tablegen.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/price_tablegen.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_common.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_common.h
index 0e6424198d1..0e6424198d1 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_common.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_common.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_decoder.h
index fb96180fb39..fb96180fb39 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_encoder.h
index 1e1c36995b6..1e1c36995b6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/rangecoder/range_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/rangecoder/range_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/Makefile.inc
index 8a5e2d7fa96..8a5e2d7fa96 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/arm.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/arm.c
index 8fcf6437491..8fcf6437491 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/arm.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/arm.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/armthumb.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/armthumb.c
index eb6a69d1282..eb6a69d1282 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/armthumb.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/armthumb.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/ia64.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/ia64.c
index fd263d4aea0..fd263d4aea0 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/ia64.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/ia64.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/powerpc.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/powerpc.c
index aaa14f22197..aaa14f22197 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/powerpc.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/powerpc.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.c
index 497949a3d09..06db86ec2d0 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.c
@@ -88,7 +88,7 @@ simple_code(lzma_coder *coder, lzma_allocator *allocator,
out, out_pos, out_size);
// If we couldn't flush all the filtered data, return to
- // application immediatelly.
+ // application immediately.
if (coder->pos < coder->filtered)
return LZMA_OK;
@@ -210,6 +210,17 @@ simple_coder_end(lzma_coder *coder, lzma_allocator *allocator)
}
+static lzma_ret
+simple_coder_update(lzma_coder *coder, lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((unused)),
+ const lzma_filter *reversed_filters)
+{
+ // No update support, just call the next filter in the chain.
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
extern lzma_ret
lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
const lzma_filter_info *filters,
@@ -231,6 +242,7 @@ lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->code = &simple_code;
next->end = &simple_coder_end;
+ next->update = &simple_coder_update;
next->coder->next = LZMA_NEXT_CODER_INIT;
next->coder->filter = filter;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.h
index 0952fad33b3..0952fad33b3 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_coder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_coder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.c
index 9be1bfef579..0beccd32a7d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.c
@@ -28,7 +28,7 @@ lzma_simple_props_decode(void **options, lzma_allocator *allocator,
if (opt == NULL)
return LZMA_MEM_ERROR;
- opt->start_offset = integer_read_32(props);
+ opt->start_offset = unaligned_read32le(props);
// Don't leave an options structure allocated if start_offset is zero.
if (opt->start_offset == 0)
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.h
index b8bf590f768..b8bf590f768 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.c
index 1ceabd1ff96..8aa463bed22 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.c
@@ -32,7 +32,7 @@ lzma_simple_props_encode(const void *options, uint8_t *out)
if (opt == NULL || opt->start_offset == 0)
return LZMA_OK;
- integer_write_32(out, opt->start_offset);
+ unaligned_write32le(out, opt->start_offset);
return LZMA_OK;
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.h
index 1cee4823a4e..1cee4823a4e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_private.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_private.h
index a69f82785fb..a69f82785fb 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/simple_private.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/simple_private.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/sparc.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/sparc.c
index 808a59aaac7..808a59aaac7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/sparc.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/sparc.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/x86.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/x86.c
index 5d1509bb227..5d1509bb227 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/simple/x86.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/simple/x86.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/Makefile.inc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/Makefile.inc
index a4710cc5955..a4710cc5955 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/Makefile.inc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/Makefile.inc
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.c
index e055cee3ea7..e055cee3ea7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.h
index d1030b2b94f..d1030b2b94f 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.c
index 2a864eddad9..2a864eddad9 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.c
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.h
index 18dcbb39a39..18dcbb39a39 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_decoder_helper.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.c
index b46b1c29754..4f71f99cc63 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.c
@@ -516,7 +516,7 @@ subblock_buffer(lzma_coder *coder, lzma_allocator *allocator,
// Run-length encoder
//
// First check if there is some data pending and we
- // have an obvious need to flush it immediatelly.
+ // have an obvious need to flush it immediately.
if (coder->rle.count > 0
&& (coder->rle.size
!= coder->options->rle
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.h
index ddbfe64bce8..ddbfe64bce8 100644
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/liblzma/subblock/subblock_encoder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.am
index 22295eea339..cbc7e5c7edf 100644
--- a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.am
@@ -7,7 +7,10 @@
bin_PROGRAMS = lzmainfo
-lzmainfo_SOURCES = lzmainfo.c
+lzmainfo_SOURCES = \
+ lzmainfo.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c
lzmainfo_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
diff --git a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.in
index 81c698fd86f..758705e2d2b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -42,15 +42,18 @@ DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -59,7 +62,9 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_lzmainfo_OBJECTS = lzmainfo-lzmainfo.$(OBJEXT)
+am_lzmainfo_OBJECTS = lzmainfo-lzmainfo.$(OBJEXT) \
+ lzmainfo-tuklib_progname.$(OBJEXT) \
+ lzmainfo-tuklib_exit.$(OBJEXT)
lzmainfo_OBJECTS = $(am_lzmainfo_OBJECTS)
am__DEPENDENCIES_1 =
lzmainfo_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
@@ -161,6 +166,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -178,7 +184,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -257,7 +262,11 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xz = @xz@
-lzmainfo_SOURCES = lzmainfo.c
+lzmainfo_SOURCES = \
+ lzmainfo.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c
+
lzmainfo_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-I$(top_srcdir)/src/common \
@@ -357,6 +366,8 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-lzmainfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-tuklib_exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-tuklib_progname.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -393,6 +404,34 @@ lzmainfo-lzmainfo.obj: lzmainfo.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-lzmainfo.obj `if test -f 'lzmainfo.c'; then $(CYGPATH_W) 'lzmainfo.c'; else $(CYGPATH_W) '$(srcdir)/lzmainfo.c'; fi`
+lzmainfo-tuklib_progname.o: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_progname.o -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_progname.Tpo -c -o lzmainfo-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmainfo-tuklib_progname.Tpo $(DEPDIR)/lzmainfo-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='lzmainfo-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+
+lzmainfo-tuklib_progname.obj: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_progname.Tpo -c -o lzmainfo-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmainfo-tuklib_progname.Tpo $(DEPDIR)/lzmainfo-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='lzmainfo-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+
+lzmainfo-tuklib_exit.o: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_exit.o -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_exit.Tpo -c -o lzmainfo-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmainfo-tuklib_exit.Tpo $(DEPDIR)/lzmainfo-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='lzmainfo-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+
+lzmainfo-tuklib_exit.obj: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_exit.Tpo -c -o lzmainfo-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmainfo-tuklib_exit.Tpo $(DEPDIR)/lzmainfo-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='lzmainfo-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.1
index ef736a6c662..ef736a6c662 100644
--- a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.1
diff --git a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.c
index d9ae311afec..af8e66cc8f9 100644
--- a/Build/source/extra/xz-4.999.9beta/src/lzmainfo/lzmainfo.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/lzmainfo/lzmainfo.c
@@ -14,48 +14,11 @@
#include <stdio.h>
#include <errno.h>
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# define _(msgid) gettext(msgid)
-#else
-# define _(msgid) msgid
-#endif
-
#include "lzma.h"
#include "getopt.h"
-
-
-/// Name of the program from argv[0]
-static const char *argv0;
-
-
-/// Close stdout unless we are already going to exit with EXIT_FAILURE.
-/// If closing stdout fails, set exit status to EXIT_FAILURE and print
-/// an error message to stderr. We don't care about closing stderr,
-/// because we don't print anything to stderr unless we are going to
-/// use EXIT_FAILURE anyway.
-static void lzma_attribute((noreturn))
-my_exit(int status)
-{
- if (status != EXIT_FAILURE) {
- const int ferror_err = ferror(stdout);
- const int fclose_err = fclose(stdout);
-
- if (ferror_err || fclose_err) {
- // If it was fclose() that failed, we have the reason
- // in errno. If only ferror() indicated an error,
- // we have no idea what the reason was.
- fprintf(stderr, "%s: %s: %s\n", argv0,
- _("Writing to standard output "
- "failed"),
- fclose_err ? strerror(errno)
- : _("Unknown error"));
- status = EXIT_FAILURE;
- }
- }
-
- exit(status);
-}
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
static void lzma_attribute((noreturn))
@@ -63,7 +26,7 @@ help(void)
{
printf(
_("Usage: %s [--help] [--version] [FILE]...\n"
-"Show information stored in the .lzma file header"), argv0);
+"Show information stored in the .lzma file header"), progname);
printf(_(
"\nWith no FILE, or when FILE is -, read standard input.\n"));
@@ -71,9 +34,9 @@ _("Usage: %s [--help] [--version] [FILE]...\n"
printf(_("Report bugs to <%s> (in English or Finnish).\n"),
PACKAGE_BUGREPORT);
- printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_HOMEPAGE);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
- my_exit(EXIT_SUCCESS);
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, true);
}
@@ -81,7 +44,7 @@ static void lzma_attribute((noreturn))
version(void)
{
puts("lzmainfo (" PACKAGE_NAME ") " PACKAGE_VERSION);
- my_exit(EXIT_SUCCESS);
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, true);
}
@@ -135,7 +98,7 @@ lzmainfo(const char *name, FILE *f)
uint8_t buf[13];
const size_t size = fread(buf, 1, sizeof(buf), f);
if (size != 13) {
- fprintf(stderr, "%s: %s: %s\n", argv0, name,
+ fprintf(stderr, "%s: %s: %s\n", progname, name,
ferror(f) ? strerror(errno)
: _("File is too small to be a .lzma file"));
return true;
@@ -149,16 +112,17 @@ lzmainfo(const char *name, FILE *f)
break;
case LZMA_OPTIONS_ERROR:
- fprintf(stderr, "%s: %s: %s\n", argv0, name,
+ fprintf(stderr, "%s: %s: %s\n", progname, name,
_("Not a .lzma file"));
return true;
case LZMA_MEM_ERROR:
- fprintf(stderr, "%s: %s\n", argv0, strerror(ENOMEM));
+ fprintf(stderr, "%s: %s\n", progname, strerror(ENOMEM));
exit(EXIT_FAILURE);
default:
- fprintf(stderr, "%s: %s\n", argv0, _("Internal error (bug)"));
+ fprintf(stderr, "%s: %s\n", progname,
+ _("Internal error (bug)"));
exit(EXIT_FAILURE);
}
@@ -202,16 +166,19 @@ lzmainfo(const char *name, FILE *f)
extern int
main(int argc, char **argv)
{
- int ret = EXIT_SUCCESS;
- argv0 = argv[0];
+ tuklib_progname_init(argv);
+ tuklib_gettext_init(PACKAGE, LOCALEDIR);
parse_args(argc, argv);
+ int ret = EXIT_SUCCESS;
+
// We print empty lines around the output only when reading from
// files specified on the command line. This is due to how
// LZMA Utils did it.
if (optind == argc) {
- lzmainfo("(stdin)", stdin);
+ if (lzmainfo("(stdin)", stdin))
+ ret = EXIT_FAILURE;
} else {
printf("\n");
@@ -224,7 +191,8 @@ main(int argc, char **argv)
if (f == NULL) {
ret = EXIT_FAILURE;
fprintf(stderr, "%s: %s: %s\n",
- argv0, argv[optind],
+ progname,
+ argv[optind],
strerror(errno));
continue;
}
@@ -238,5 +206,5 @@ main(int argc, char **argv)
} while (++optind < argc);
}
- my_exit(ret);
+ tuklib_exit(ret, EXIT_FAILURE, true);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.am
index 86f273884f6..86f273884f6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.am
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.in
index 66e23b3846a..4cb73efefbd 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -41,15 +41,18 @@ DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -137,6 +140,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -154,7 +158,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.1
index 252d1cd303d..318d06fb04d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.1
@@ -24,7 +24,7 @@ xzcmp, xzdiff, lzcmp, lzdiff \- compare compressed files
.SH DESCRIPTION
.B xzcmp
and
-.B xdiff
+.B xzdiff
invoke
.BR cmp (1)
or
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.in
index 2d6e5da4760..2d6e5da4760 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzdiff.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzdiff.in
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.1
index 996d64aee8b..996d64aee8b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.1
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.in
index 9a9b393fcec..bfa9fb536a4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzgrep.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzgrep.in
@@ -154,7 +154,7 @@ for i; do
# Fail if xz or grep (or sed) fails.
xz_status=$(
exec 5>&1
- (eval "$uncompress" -- "$i" 5>&-; echo $? >&5) 3>&- |
+ ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- |
if test $files_with_matches -eq 1; then
eval "$grep" -q && { printf '%s\n' "$i" || exit 2; }
elif test $files_without_matches -eq 1; then
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzless.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.1
index 4fe4bcba970..299806fdfa6 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzless.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.1
@@ -18,8 +18,8 @@ xzless, lzless \- view xz or lzma compressed (text) files
.RI [ file ...]
.SH DESCRIPTION
.B xzless
-is a filter that displays pagefulls of uncompressed text from compressed
-file(s) to a terminal. It works on files compressed with
+is a filter that displays text from compressed files to a terminal.
+It works on files compressed with
.BR xz (1)
or
.BR lzma (1).
@@ -32,13 +32,13 @@ reads from standard input.
.B xzless
uses
.BR less (1)
-as its only pager. Unlike
+to present its output. Unlike
.BR xzmore ,
-the choice of pagers is not alterable by an environment variable.
+its choice of pager cannot be altered by setting an environment variable.
Commands are based on both
.BR more (1)
and
-.BR vi (1),
+.BR vi (1)
and allow back and forth movement and searching.
See the
.BR less (1)
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzless.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.in
index a3da697c590..a3da697c590 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzless.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzless.in
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.1
index a94e83263cf..42542bfe8c2 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.1
@@ -31,14 +31,14 @@ The name
is provided for backward compatibility with LZMA Utils.
.TP
.BR e " or " q
-When the prompt --More--(Next file:
+When the prompt \-\-More\-\-(Next file:
.IR file )
is printed, this command causes
.B xzmore
to exit.
.TP
.B s
-When the prompt --More--(Next file:
+When the prompt \-\-More\-\-(Next file:
.IR file )
is printed, this command causes
.B xzmore
diff --git a/Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.in
index 940d6614460..940d6614460 100644
--- a/Build/source/extra/xz-4.999.9beta/src/scripts/xzmore.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/scripts/xzmore.in
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.am
index ccdc66cab44..4dbe0f2604e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.am
@@ -16,6 +16,8 @@ xz_SOURCES = \
file_io.h \
hardware.c \
hardware.h \
+ list.c \
+ list.h \
main.c \
main.h \
message.c \
@@ -28,7 +30,11 @@ xz_SOURCES = \
suffix.c \
suffix.h \
util.c \
- util.h
+ util.h \
+ $(top_srcdir)/src/common/tuklib_open_stdxxx.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c \
+ $(top_srcdir)/src/common/tuklib_cpucores.c
if COND_W32
xz_SOURCES += xz_w32res.rc
@@ -69,7 +75,7 @@ install-exec-hook:
cd $(DESTDIR)$(bindir) && \
target=`echo xz | sed '$(transform)'`$(EXEEXT) && \
for name in $(xzlinks); do \
- link=`echo $$name | sed '$(transform)'` && \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
rm -f $$link && \
$(LN_S) $$target $$link; \
done
@@ -86,7 +92,7 @@ install-data-hook:
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
for name in $(xzlinks); do \
- link=`echo $$name | sed '$(transform)'` && \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
rm -f $$link; \
done
cd $(DESTDIR)$(mandir)/man1 && \
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.in
index cb127ade119..a88edca72d5 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -43,15 +43,18 @@ DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -61,14 +64,21 @@ CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
am__xz_SOURCES_DIST = args.c args.h coder.c coder.h file_io.c \
- file_io.h hardware.c hardware.h main.c main.h message.c \
- message.h options.c options.h private.h signals.c signals.h \
- suffix.c suffix.h util.c util.h xz_w32res.rc
+ file_io.h hardware.c hardware.h list.c list.h main.c main.h \
+ message.c message.h options.c options.h private.h signals.c \
+ signals.h suffix.c suffix.h util.c util.h \
+ $(top_srcdir)/src/common/tuklib_open_stdxxx.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c \
+ $(top_srcdir)/src/common/tuklib_cpucores.c xz_w32res.rc
@COND_W32_TRUE@am__objects_1 = xz_w32res.$(OBJEXT)
am_xz_OBJECTS = xz-args.$(OBJEXT) xz-coder.$(OBJEXT) \
- xz-file_io.$(OBJEXT) xz-hardware.$(OBJEXT) xz-main.$(OBJEXT) \
- xz-message.$(OBJEXT) xz-options.$(OBJEXT) xz-signals.$(OBJEXT) \
- xz-suffix.$(OBJEXT) xz-util.$(OBJEXT) $(am__objects_1)
+ xz-file_io.$(OBJEXT) xz-hardware.$(OBJEXT) xz-list.$(OBJEXT) \
+ xz-main.$(OBJEXT) xz-message.$(OBJEXT) xz-options.$(OBJEXT) \
+ xz-signals.$(OBJEXT) xz-suffix.$(OBJEXT) xz-util.$(OBJEXT) \
+ xz-tuklib_open_stdxxx.$(OBJEXT) xz-tuklib_progname.$(OBJEXT) \
+ xz-tuklib_exit.$(OBJEXT) xz-tuklib_cpucores.$(OBJEXT) \
+ $(am__objects_1)
xz_OBJECTS = $(am_xz_OBJECTS)
am__DEPENDENCIES_1 =
xz_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
@@ -170,6 +180,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -187,7 +198,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -267,9 +277,13 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xz = @xz@
xz_SOURCES = args.c args.h coder.c coder.h file_io.c file_io.h \
- hardware.c hardware.h main.c main.h message.c message.h \
- options.c options.h private.h signals.c signals.h suffix.c \
- suffix.h util.c util.h $(am__append_1)
+ hardware.c hardware.h list.c list.h main.c main.h message.c \
+ message.h options.c options.h private.h signals.c signals.h \
+ suffix.c suffix.h util.c util.h \
+ $(top_srcdir)/src/common/tuklib_open_stdxxx.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c \
+ $(top_srcdir)/src/common/tuklib_cpucores.c $(am__append_1)
xz_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-I$(top_srcdir)/src/common \
@@ -375,11 +389,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-coder.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-file_io.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-hardware.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-message.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-options.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-signals.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-suffix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_cpucores.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_open_stdxxx.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_progname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-util.Po@am__quote@
.c.o:
@@ -459,6 +478,20 @@ xz-hardware.obj: hardware.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-hardware.obj `if test -f 'hardware.c'; then $(CYGPATH_W) 'hardware.c'; else $(CYGPATH_W) '$(srcdir)/hardware.c'; fi`
+xz-list.o: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-list.o -MD -MP -MF $(DEPDIR)/xz-list.Tpo -c -o xz-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-list.Tpo $(DEPDIR)/xz-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='xz-list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+
+xz-list.obj: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-list.obj -MD -MP -MF $(DEPDIR)/xz-list.Tpo -c -o xz-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-list.Tpo $(DEPDIR)/xz-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='xz-list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+
xz-main.o: main.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-main.o -MD -MP -MF $(DEPDIR)/xz-main.Tpo -c -o xz-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-main.Tpo $(DEPDIR)/xz-main.Po
@@ -543,6 +576,62 @@ xz-util.obj: util.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+xz-tuklib_open_stdxxx.o: $(top_srcdir)/src/common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_open_stdxxx.o -MD -MP -MF $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo -c -o xz-tuklib_open_stdxxx.o `test -f '$(top_srcdir)/src/common/tuklib_open_stdxxx.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo $(DEPDIR)/xz-tuklib_open_stdxxx.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_open_stdxxx.c' object='xz-tuklib_open_stdxxx.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_open_stdxxx.o `test -f '$(top_srcdir)/src/common/tuklib_open_stdxxx.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_open_stdxxx.c
+
+xz-tuklib_open_stdxxx.obj: $(top_srcdir)/src/common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_open_stdxxx.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo -c -o xz-tuklib_open_stdxxx.obj `if test -f '$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo $(DEPDIR)/xz-tuklib_open_stdxxx.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_open_stdxxx.c' object='xz-tuklib_open_stdxxx.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_open_stdxxx.obj `if test -f '$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_open_stdxxx.c'; fi`
+
+xz-tuklib_progname.o: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_progname.o -MD -MP -MF $(DEPDIR)/xz-tuklib_progname.Tpo -c -o xz-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_progname.Tpo $(DEPDIR)/xz-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='xz-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+
+xz-tuklib_progname.obj: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_progname.Tpo -c -o xz-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_progname.Tpo $(DEPDIR)/xz-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='xz-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+
+xz-tuklib_exit.o: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_exit.o -MD -MP -MF $(DEPDIR)/xz-tuklib_exit.Tpo -c -o xz-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_exit.Tpo $(DEPDIR)/xz-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='xz-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+
+xz-tuklib_exit.obj: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_exit.Tpo -c -o xz-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_exit.Tpo $(DEPDIR)/xz-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='xz-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+
+xz-tuklib_cpucores.o: $(top_srcdir)/src/common/tuklib_cpucores.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_cpucores.o -MD -MP -MF $(DEPDIR)/xz-tuklib_cpucores.Tpo -c -o xz-tuklib_cpucores.o `test -f '$(top_srcdir)/src/common/tuklib_cpucores.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_cpucores.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_cpucores.Tpo $(DEPDIR)/xz-tuklib_cpucores.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_cpucores.c' object='xz-tuklib_cpucores.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_cpucores.o `test -f '$(top_srcdir)/src/common/tuklib_cpucores.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_cpucores.c
+
+xz-tuklib_cpucores.obj: $(top_srcdir)/src/common/tuklib_cpucores.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_cpucores.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_cpucores.Tpo -c -o xz-tuklib_cpucores.obj `if test -f '$(top_srcdir)/src/common/tuklib_cpucores.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_cpucores.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_cpucores.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xz-tuklib_cpucores.Tpo $(DEPDIR)/xz-tuklib_cpucores.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_cpucores.c' object='xz-tuklib_cpucores.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_cpucores.obj `if test -f '$(top_srcdir)/src/common/tuklib_cpucores.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_cpucores.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_cpucores.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -818,7 +907,7 @@ install-exec-hook:
cd $(DESTDIR)$(bindir) && \
target=`echo xz | sed '$(transform)'`$(EXEEXT) && \
for name in $(xzlinks); do \
- link=`echo $$name | sed '$(transform)'` && \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
rm -f $$link && \
$(LN_S) $$target $$link; \
done
@@ -835,7 +924,7 @@ install-data-hook:
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
for name in $(xzlinks); do \
- link=`echo $$name | sed '$(transform)'` && \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
rm -f $$link; \
done
cd $(DESTDIR)$(mandir)/man1 && \
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/args.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.c
index b50e28b7fd9..f37f80244b4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/args.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.c
@@ -21,6 +21,7 @@
bool opt_stdout = false;
bool opt_force = false;
bool opt_keep_original = false;
+bool opt_robot = false;
// We don't modify or free() this, but we need to assign it in some
// non-const pointers.
@@ -42,8 +43,11 @@ parse_real(args_info *args, int argc, char **argv)
OPT_LZMA1,
OPT_LZMA2,
+ OPT_NO_SPARSE,
OPT_FILES,
OPT_FILES0,
+ OPT_INFO_MEMORY,
+ OPT_ROBOT,
};
static const char short_opts[]
@@ -51,51 +55,54 @@ parse_real(args_info *args, int argc, char **argv)
static const struct option long_opts[] = {
// Operation mode
- { "compress", no_argument, NULL, 'z' },
- { "decompress", no_argument, NULL, 'd' },
- { "uncompress", no_argument, NULL, 'd' },
- { "test", no_argument, NULL, 't' },
- { "list", no_argument, NULL, 'l' },
+ { "compress", no_argument, NULL, 'z' },
+ { "decompress", no_argument, NULL, 'd' },
+ { "uncompress", no_argument, NULL, 'd' },
+ { "test", no_argument, NULL, 't' },
+ { "list", no_argument, NULL, 'l' },
// Operation modifiers
- { "keep", no_argument, NULL, 'k' },
- { "force", no_argument, NULL, 'f' },
- { "stdout", no_argument, NULL, 'c' },
- { "to-stdout", no_argument, NULL, 'c' },
- { "suffix", required_argument, NULL, 'S' },
+ { "keep", no_argument, NULL, 'k' },
+ { "force", no_argument, NULL, 'f' },
+ { "stdout", no_argument, NULL, 'c' },
+ { "to-stdout", no_argument, NULL, 'c' },
+ { "no-sparse", no_argument, NULL, OPT_NO_SPARSE },
+ { "suffix", required_argument, NULL, 'S' },
// { "recursive", no_argument, NULL, 'r' }, // TODO
- { "files", optional_argument, NULL, OPT_FILES },
- { "files0", optional_argument, NULL, OPT_FILES0 },
+ { "files", optional_argument, NULL, OPT_FILES },
+ { "files0", optional_argument, NULL, OPT_FILES0 },
// Basic compression settings
- { "format", required_argument, NULL, 'F' },
- { "check", required_argument, NULL, 'C' },
- { "memory", required_argument, NULL, 'M' },
- { "threads", required_argument, NULL, 'T' },
+ { "format", required_argument, NULL, 'F' },
+ { "check", required_argument, NULL, 'C' },
+ { "memory", required_argument, NULL, 'M' },
+ { "threads", required_argument, NULL, 'T' },
- { "extreme", no_argument, NULL, 'e' },
- { "fast", no_argument, NULL, '0' },
- { "best", no_argument, NULL, '9' },
+ { "extreme", no_argument, NULL, 'e' },
+ { "fast", no_argument, NULL, '0' },
+ { "best", no_argument, NULL, '9' },
// Filters
- { "lzma1", optional_argument, NULL, OPT_LZMA1 },
- { "lzma2", optional_argument, NULL, OPT_LZMA2 },
- { "x86", optional_argument, NULL, OPT_X86 },
- { "powerpc", optional_argument, NULL, OPT_POWERPC },
- { "ia64", optional_argument, NULL, OPT_IA64 },
- { "arm", optional_argument, NULL, OPT_ARM },
- { "armthumb", optional_argument, NULL, OPT_ARMTHUMB },
- { "sparc", optional_argument, NULL, OPT_SPARC },
- { "delta", optional_argument, NULL, OPT_DELTA },
- { "subblock", optional_argument, NULL, OPT_SUBBLOCK },
+ { "lzma1", optional_argument, NULL, OPT_LZMA1 },
+ { "lzma2", optional_argument, NULL, OPT_LZMA2 },
+ { "x86", optional_argument, NULL, OPT_X86 },
+ { "powerpc", optional_argument, NULL, OPT_POWERPC },
+ { "ia64", optional_argument, NULL, OPT_IA64 },
+ { "arm", optional_argument, NULL, OPT_ARM },
+ { "armthumb", optional_argument, NULL, OPT_ARMTHUMB },
+ { "sparc", optional_argument, NULL, OPT_SPARC },
+ { "delta", optional_argument, NULL, OPT_DELTA },
+ { "subblock", optional_argument, NULL, OPT_SUBBLOCK },
// Other options
- { "quiet", no_argument, NULL, 'q' },
- { "verbose", no_argument, NULL, 'v' },
- { "no-warn", no_argument, NULL, 'Q' },
- { "help", no_argument, NULL, 'h' },
- { "long-help", no_argument, NULL, 'H' },
- { "version", no_argument, NULL, 'V' },
+ { "quiet", no_argument, NULL, 'q' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "no-warn", no_argument, NULL, 'Q' },
+ { "robot", no_argument, NULL, OPT_ROBOT },
+ { "info-memory", no_argument, NULL, OPT_INFO_MEMORY },
+ { "help", no_argument, NULL, 'h' },
+ { "long-help", no_argument, NULL, 'H' },
+ { "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
};
@@ -169,6 +176,11 @@ parse_real(args_info *args, int argc, char **argv)
opt_force = true;
break;
+ // --info-memory
+ case OPT_INFO_MEMORY:
+ // This doesn't return.
+ message_memlimit();
+
// --help
case 'h':
// This doesn't return.
@@ -207,6 +219,15 @@ parse_real(args_info *args, int argc, char **argv)
message_verbosity_increase();
break;
+ // --robot
+ case OPT_ROBOT:
+ opt_robot = true;
+
+ // This is to make sure that floating point numbers
+ // always have a dot as decimal separator.
+ setlocale(LC_NUMERIC, "C");
+ break;
+
case 'z':
opt_mode = MODE_COMPRESS;
break;
@@ -324,6 +345,10 @@ parse_real(args_info *args, int argc, char **argv)
break;
}
+ case OPT_NO_SPARSE:
+ io_no_sparse();
+ break;
+
case OPT_FILES:
args->files_delim = '\n';
@@ -332,7 +357,7 @@ parse_real(args_info *args, int argc, char **argv)
case OPT_FILES0:
if (args->files_name != NULL)
message_fatal(_("Only one file can be "
- "specified with `--files'"
+ "specified with `--files' "
"or `--files0'."));
if (optarg == NULL) {
@@ -351,7 +376,7 @@ parse_real(args_info *args, int argc, char **argv)
default:
message_try_help();
- my_exit(E_ERROR);
+ tuklib_exit(E_ERROR, E_ERROR, false);
}
}
@@ -449,18 +474,12 @@ args_parse(args_info *args, int argc, char **argv)
// Check how we were called.
{
-#ifdef DOSLIKE
- // We adjusted argv[0] in the beginning of main() so we don't
- // need to do anything here.
- const char *name = argv[0];
-#else
// Remove the leading path name, if any.
const char *name = strrchr(argv[0], '/');
if (name == NULL)
name = argv[0];
else
++name;
-#endif
// NOTE: It's possible that name[0] is now '\0' if argv[0]
// is weird, but it doesn't matter here.
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/args.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.h
index 91e43ad65a1..ac5959b52ba 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/args.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/args.h
@@ -35,6 +35,7 @@ extern bool opt_stdout;
extern bool opt_force;
extern bool opt_keep_original;
// extern bool opt_recursive;
+extern bool opt_robot;
extern const char *stdin_filename;
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/coder.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.c
index 7cf6186f806..8d882d26871 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/coder.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.c
@@ -33,8 +33,8 @@ static lzma_stream strm = LZMA_STREAM_INIT;
static lzma_filter filters[LZMA_FILTERS_MAX + 1];
/// Input and output buffers
-static uint8_t in_buf[IO_BUFFER_SIZE];
-static uint8_t out_buf[IO_BUFFER_SIZE];
+static io_buf in_buf;
+static io_buf out_buf;
/// Number of filters. Zero indicates that we are using a preset.
static size_t filters_count = 0;
@@ -56,17 +56,17 @@ static bool preset_default = true;
static bool preset_extreme = false;
/// Integrity check type
-#ifdef HAVE_CHECK_CRC64
-static lzma_check check = LZMA_CHECK_CRC64;
-#else
-static lzma_check check = LZMA_CHECK_CRC32;
-#endif
+static lzma_check check;
+
+/// This becomes false if the --check=CHECK option is used.
+static bool check_default = true;
extern void
coder_set_check(lzma_check new_check)
{
check = new_check;
+ check_default = false;
return;
}
@@ -103,11 +103,12 @@ coder_add_filter(lzma_vli id, void *options)
static void lzma_attribute((noreturn))
-memlimit_too_small(uint64_t memory_usage, uint64_t memory_limit)
+memlimit_too_small(uint64_t memory_usage)
{
- message_fatal(_("Memory usage limit (%" PRIu64 " MiB) is too small "
- "for the given filter setup (%" PRIu64 " MiB)"),
- memory_limit >> 20, memory_usage >> 20);
+ message(V_ERROR, _("Memory usage limit is too low for the given "
+ "filter setup."));
+ message_mem_needed(V_ERROR, memory_usage);
+ tuklib_exit(E_ERROR, E_ERROR, false);
}
@@ -167,7 +168,7 @@ coder_set_compression_settings(void)
"with the .xz format"));
// Print the selected filter chain.
- message_filters(V_DEBUG, filters);
+ message_filters_show(V_DEBUG, filters);
// If using --format=raw, we can be decoding. The memusage function
// also validates the filter chain and the options used for the
@@ -180,22 +181,18 @@ coder_set_compression_settings(void)
memory_usage = lzma_raw_decoder_memusage(filters);
if (memory_usage == UINT64_MAX)
- message_fatal("Unsupported filter chain or filter options");
+ message_fatal(_("Unsupported filter chain or filter options"));
- // Print memory usage info.
- message(V_DEBUG, _("%s MiB (%s B) of memory is required per thread, "
- "limit is %s MiB (%s B)"),
- uint64_to_str(memory_usage >> 20, 0),
- uint64_to_str(memory_usage, 1),
- uint64_to_str(memory_limit >> 20, 2),
- uint64_to_str(memory_limit, 3));
+ // Print memory usage info before possible dictionary
+ // size auto-adjusting.
+ message_mem_needed(V_DEBUG, memory_usage);
if (memory_usage > memory_limit) {
// If --no-auto-adjust was used or we didn't find LZMA1 or
- // LZMA2 as the last filter, give an error immediatelly.
+ // LZMA2 as the last filter, give an error immediately.
// --format=raw implies --no-auto-adjust.
if (!auto_adjust || opt_format == FORMAT_RAW)
- memlimit_too_small(memory_usage, memory_limit);
+ memlimit_too_small(memory_usage);
assert(opt_mode == MODE_COMPRESS);
@@ -206,7 +203,7 @@ coder_set_compression_settings(void)
while (filters[i].id != LZMA_FILTER_LZMA2
&& filters[i].id != LZMA_FILTER_LZMA1) {
if (filters[i].id == LZMA_VLI_UNKNOWN)
- memlimit_too_small(memory_usage, memory_limit);
+ memlimit_too_small(memory_usage);
++i;
}
@@ -225,7 +222,7 @@ coder_set_compression_settings(void)
// FIXME: Displays the scaled memory usage instead
// of the original.
if (opt->dict_size < (UINT32_C(1) << 20))
- memlimit_too_small(memory_usage, memory_limit);
+ memlimit_too_small(memory_usage);
memory_usage = lzma_raw_encoder_memusage(filters);
if (memory_usage == UINT64_MAX)
@@ -245,14 +242,15 @@ coder_set_compression_settings(void)
// However, omit the message if no preset or custom chain
// was given. FIXME: Always warn?
if (!preset_default)
- message(V_WARNING, "Adjusted LZMA%c dictionary size "
+ message(V_WARNING, _("Adjusted LZMA%c dictionary size "
"from %s MiB to %s MiB to not exceed "
- "the memory usage limit of %s MiB",
+ "the memory usage limit of %s MiB"),
filters[i].id == LZMA_FILTER_LZMA2
? '2' : '1',
uint64_to_str(orig_dict_size >> 20, 0),
uint64_to_str(opt->dict_size >> 20, 1),
- uint64_to_str(memory_limit >> 20, 2));
+ uint64_to_str(round_up_to_mib(
+ memory_limit), 2));
}
/*
@@ -267,6 +265,15 @@ coder_set_compression_settings(void)
opt_threads = thread_limit;
*/
+ if (check_default) {
+ // The default check type is CRC64, but fallback to CRC32
+ // if CRC64 isn't supported by the copy of liblzma we are
+ // using. CRC32 is always supported.
+ check = LZMA_CHECK_CRC64;
+ if (!lzma_check_is_supported(check))
+ check = LZMA_CHECK_CRC32;
+ }
+
return;
}
@@ -275,7 +282,7 @@ coder_set_compression_settings(void)
static bool
is_format_xz(void)
{
- return strm.avail_in >= 6 && memcmp(in_buf, "\3757zXZ", 6) == 0;
+ return strm.avail_in >= 6 && memcmp(in_buf.u8, "\3757zXZ", 6) == 0;
}
@@ -289,7 +296,7 @@ is_format_lzma(void)
// Decode the LZMA1 properties.
lzma_filter filter = { .id = LZMA_FILTER_LZMA1 };
- if (lzma_properties_decode(&filter, NULL, in_buf, 5) != LZMA_OK)
+ if (lzma_properties_decode(&filter, NULL, in_buf.u8, 5) != LZMA_OK)
return false;
// A hack to ditch tons of false positives: We allow only dictionary
@@ -317,7 +324,7 @@ is_format_lzma(void)
// Again, if someone complains, this will be reconsidered.
uint64_t uncompressed_size = 0;
for (size_t i = 0; i < 8; ++i)
- uncompressed_size |= (uint64_t)(in_buf[5 + i]) << (i * 8);
+ uncompressed_size |= (uint64_t)(in_buf.u8[5 + i]) << (i * 8);
if (uncompressed_size != UINT64_MAX
&& uncompressed_size > (UINT64_C(1) << 38))
@@ -417,10 +424,23 @@ coder_init(file_pair *pair)
ret = lzma_raw_decoder(&strm, filters);
break;
}
+
+ // Try to decode the headers. This will catch too low
+ // memory usage limit in case it happens in the first
+ // Block of the first Stream, which is where it very
+ // probably will happen if it is going to happen.
+ if (ret == LZMA_OK && init_format != FORMAT_RAW) {
+ strm.next_out = NULL;
+ strm.avail_out = 0;
+ ret = lzma_code(&strm, LZMA_RUN);
+ }
}
if (ret != LZMA_OK) {
message_error("%s: %s", pair->src_name, message_strm(ret));
+ if (ret == LZMA_MEMLIMIT_ERROR)
+ message_mem_needed(V_ERROR, lzma_memusage(&strm));
+
return CODER_INIT_ERROR;
}
@@ -444,15 +464,16 @@ coder_normal(file_pair *pair)
// Assume that something goes wrong.
bool success = false;
- strm.next_out = out_buf;
+ strm.next_out = out_buf.u8;
strm.avail_out = IO_BUFFER_SIZE;
while (!user_abort) {
// Fill the input buffer if it is empty and we haven't reached
// end of file yet.
if (strm.avail_in == 0 && !pair->src_eof) {
- strm.next_in = in_buf;
- strm.avail_in = io_read(pair, in_buf, IO_BUFFER_SIZE);
+ strm.next_in = in_buf.u8;
+ strm.avail_in = io_read(
+ pair, &in_buf, IO_BUFFER_SIZE);
if (strm.avail_in == SIZE_MAX)
break;
@@ -466,11 +487,11 @@ coder_normal(file_pair *pair)
// Write out if the output buffer became full.
if (strm.avail_out == 0) {
- if (opt_mode != MODE_TEST && io_write(pair, out_buf,
+ if (opt_mode != MODE_TEST && io_write(pair, &out_buf,
IO_BUFFER_SIZE - strm.avail_out))
break;
- strm.next_out = out_buf;
+ strm.next_out = out_buf.u8;
strm.avail_out = IO_BUFFER_SIZE;
}
@@ -487,7 +508,7 @@ coder_normal(file_pair *pair)
// when trying to get at least some useful
// data out of damaged files.
if (opt_mode != MODE_TEST && io_write(pair,
- out_buf, IO_BUFFER_SIZE
+ &out_buf, IO_BUFFER_SIZE
- strm.avail_out))
break;
}
@@ -502,7 +523,7 @@ coder_normal(file_pair *pair)
// input, and thus pair->src_eof
// becomes true.
strm.avail_in = io_read(
- pair, in_buf, 1);
+ pair, &in_buf, 1);
if (strm.avail_in == SIZE_MAX)
break;
@@ -537,24 +558,10 @@ coder_normal(file_pair *pair)
}
if (ret == LZMA_MEMLIMIT_ERROR) {
- // Figure out how much memory it would have
+ // Display how much memory it would have
// actually needed.
- uint64_t memusage = lzma_memusage(&strm);
- uint64_t memlimit = hardware_memlimit_get();
-
- // Round the memory limit down and usage up.
- // This way we don't display a ridiculous
- // message like "Limit was 9 MiB, but 9 MiB
- // would have been needed".
- memusage = (memusage + 1024 * 1024 - 1)
- / (1024 * 1024);
- memlimit /= 1024 * 1024;
-
- message_error(_("Limit was %s MiB, "
- "but %s MiB would "
- "have been needed"),
- uint64_to_str(memlimit, 0),
- uint64_to_str(memusage, 1));
+ message_mem_needed(V_ERROR,
+ lzma_memusage(&strm));
}
if (stop)
@@ -579,14 +586,14 @@ coder_passthru(file_pair *pair)
if (user_abort)
return false;
- if (io_write(pair, in_buf, strm.avail_in))
+ if (io_write(pair, &in_buf, strm.avail_in))
return false;
strm.total_in += strm.avail_in;
strm.total_out = strm.total_in;
message_progress_update();
- strm.avail_in = io_read(pair, in_buf, IO_BUFFER_SIZE);
+ strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
if (strm.avail_in == SIZE_MAX)
return false;
}
@@ -598,39 +605,52 @@ coder_passthru(file_pair *pair)
extern void
coder_run(const char *filename)
{
- // Try to open the input and output files.
- file_pair *pair = io_open(filename);
+ // Set and possibly print the filename for the progress message.
+ message_filename(filename);
+
+ // Try to open the input file.
+ file_pair *pair = io_open_src(filename);
if (pair == NULL)
return;
- // Initialize the progress indicator.
- const uint64_t in_size = pair->src_st.st_size <= (off_t)(0)
- ? 0 : (uint64_t)(pair->src_st.st_size);
- message_progress_start(&strm, pair->src_name, in_size);
-
// Assume that something goes wrong.
bool success = false;
// Read the first chunk of input data. This is needed to detect
// the input file type (for now, only for decompression).
- strm.next_in = in_buf;
- strm.avail_in = io_read(pair, in_buf, IO_BUFFER_SIZE);
-
- switch (coder_init(pair)) {
- case CODER_INIT_NORMAL:
- success = coder_normal(pair);
- break;
-
- case CODER_INIT_PASSTHRU:
- success = coder_passthru(pair);
- break;
-
- case CODER_INIT_ERROR:
- break;
+ strm.next_in = in_buf.u8;
+ strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
+
+ if (strm.avail_in != SIZE_MAX) {
+ // Initialize the coder. This will detect the file format
+ // and, in decompression or testing mode, check the memory
+ // usage of the first Block too. This way we don't try to
+ // open the destination file if we see that coding wouldn't
+ // work at all anyway. This also avoids deleting the old
+ // "target" file if --force was used.
+ const enum coder_init_ret init_ret = coder_init(pair);
+
+ if (init_ret != CODER_INIT_ERROR && !user_abort) {
+ // Don't open the destination file when --test
+ // is used.
+ if (opt_mode == MODE_TEST || !io_open_dest(pair)) {
+ // Initialize the progress indicator.
+ const uint64_t in_size
+ = pair->src_st.st_size <= 0
+ ? 0 : pair->src_st.st_size;
+ message_progress_start(&strm, in_size);
+
+ // Do the actual coding or passthru.
+ if (init_ret == CODER_INIT_NORMAL)
+ success = coder_normal(pair);
+ else
+ success = coder_passthru(pair);
+
+ message_progress_end(success);
+ }
+ }
}
- message_progress_end(success);
-
// Close the file pair. It needs to know if coding was successful to
// know if the source or target file should be unlinked.
io_close(pair, success);
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/coder.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.h
index 0d3af6ad449..0d3af6ad449 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/coder.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/coder.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/file_io.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.c
index 4c52da56c59..a78002eba55 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/file_io.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.c
@@ -14,8 +14,10 @@
#include <fcntl.h>
-#ifdef DOSLIKE
+#ifdef TUKLIB_DOSLIKE
# include <io.h>
+#else
+static bool warn_fchown;
#endif
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
@@ -24,6 +26,8 @@
# include <utime.h>
#endif
+#include "tuklib_open_stdxxx.h"
+
#ifndef O_BINARY
# define O_BINARY 0
#endif
@@ -32,22 +36,30 @@
# define O_NOCTTY 0
#endif
-#ifndef DOSLIKE
-# include "open_stdxxx.h"
-static bool warn_fchown;
+
+/// If true, try to create sparse files when decompressing.
+static bool try_sparse = true;
+
+#ifndef TUKLIB_DOSLIKE
+/// File status flags of standard output. This is used by io_open_dest()
+/// and io_close_dest().
+static int stdout_flags = 0;
#endif
+static bool io_write_buf(file_pair *pair, const uint8_t *buf, size_t size);
+
+
extern void
io_init(void)
{
-#ifndef DOSLIKE
// Make sure that stdin, stdout, and and stderr are connected to
- // a valid file descriptor. Exit immediatelly with exit code ERROR
+ // a valid file descriptor. Exit immediately with exit code ERROR
// if we cannot make the file descriptors valid. Maybe we should
// print an error message, but our stderr could be screwed anyway.
- open_stdxxx(E_ERROR);
+ tuklib_open_stdxxx(E_ERROR);
+#ifndef TUKLIB_DOSLIKE
// If fchown() fails setting the owner, we warn about it only if
// we are root.
warn_fchown = geteuid() == 0;
@@ -64,7 +76,15 @@ io_init(void)
}
-/// \brief Unlinks a file
+extern void
+io_no_sparse(void)
+{
+ try_sparse = false;
+ return;
+}
+
+
+/// \brief Unlink a file
///
/// This tries to verify that the file being unlinked really is the file that
/// we want to unlink by verifying device and inode numbers. There's still
@@ -73,18 +93,49 @@ io_init(void)
static void
io_unlink(const char *name, const struct stat *known_st)
{
-#ifdef DOSLIKE
- // On Windows, st_ino is meaningless, so don't bother testing it.
- // Just silence a compiler warning.
+#if defined(TUKLIB_DOSLIKE)
+ // On DOS-like systems, st_ino is meaningless, so don't bother
+ // testing it. Just silence a compiler warning.
(void)known_st;
#else
struct stat new_st;
- if (lstat(name, &new_st)
+ // If --force was used, use stat() instead of lstat(). This way
+ // (de)compressing symlinks works correctly. However, it also means
+ // that xz cannot detect if a regular file foo is renamed to bar
+ // and then a symlink foo -> bar is created. Because of stat()
+ // instead of lstat(), xz will think that foo hasn't been replaced
+ // with another file. Thus, xz will remove foo even though it no
+ // longer is the same file that xz used when it started compressing.
+ // Probably it's not too bad though, so this doesn't need a more
+ // complex fix.
+ const int stat_ret = opt_force
+ ? stat(name, &new_st) : lstat(name, &new_st);
+
+ if (stat_ret
+# ifdef __VMS
+ // st_ino is an array, and we don't want to
+ // compare st_dev at all.
+ || memcmp(&new_st.st_ino, &known_st->st_ino,
+ sizeof(new_st.st_ino)) != 0
+# else
+ // Typical POSIX-like system
|| new_st.st_dev != known_st->st_dev
- || new_st.st_ino != known_st->st_ino)
- message_error(_("%s: File seems to be moved, not removing"),
- name);
+ || new_st.st_ino != known_st->st_ino
+# endif
+ )
+ // TRANSLATORS: When compression or decompression finishes,
+ // and xz is going to remove the source file, xz first checks
+ // if the source file still exists, and if it does, does its
+ // device and inode numbers match what xz saw when it opened
+ // the source file. If these checks fail, this message is
+ // shown, %s being the filename, and the file is not deleted.
+ // The check for device and inode numbers is there, because
+ // it is possible that the user has put a new file in place
+ // of the original file, and in that case it obviously
+ // shouldn't be removed.
+ message_error(_("%s: File seems to have been moved, "
+ "not removing"), name);
else
#endif
// There's a race condition between lstat() and unlink()
@@ -105,7 +156,7 @@ static void
io_copy_attrs(const file_pair *pair)
{
// Skip chown and chmod on Windows.
-#ifndef DOSLIKE
+#ifndef TUKLIB_DOSLIKE
// This function is more tricky than you may think at first.
// Blindly copying permissions may permit users to access the
// destination file who didn't have permission to access the
@@ -235,25 +286,30 @@ io_copy_attrs(const file_pair *pair)
/// Opens the source file. Returns false on success, true on error.
static bool
-io_open_src(file_pair *pair)
+io_open_src_real(file_pair *pair)
{
// There's nothing to open when reading from stdin.
if (pair->src_name == stdin_filename) {
pair->src_fd = STDIN_FILENO;
-#ifdef DOSLIKE
+#ifdef TUKLIB_DOSLIKE
setmode(STDIN_FILENO, O_BINARY);
#endif
return false;
}
+ // Symlinks are not followed unless writing to stdout or --force
+ // was used.
+ const bool follow_symlinks = opt_stdout || opt_force;
+
// We accept only regular files if we are writing the output
- // to disk too, and if --force was not given.
- const bool reg_files_only = !opt_stdout && !opt_force;
+ // to disk too. bzip2 allows overriding this with --force but
+ // gzip and xz don't.
+ const bool reg_files_only = !opt_stdout;
// Flags for open()
int flags = O_RDONLY | O_BINARY | O_NOCTTY;
-#ifndef DOSLIKE
+#ifndef TUKLIB_DOSLIKE
// If we accept only regular files, we need to be careful to avoid
// problems with special files like devices and FIFOs. O_NONBLOCK
// prevents blocking when opening such files. When we want to accept
@@ -264,13 +320,13 @@ io_open_src(file_pair *pair)
#endif
#if defined(O_NOFOLLOW)
- if (reg_files_only)
+ if (!follow_symlinks)
flags |= O_NOFOLLOW;
-#elif !defined(DOSLIKE)
+#elif !defined(TUKLIB_DOSLIKE)
// Some POSIX-like systems lack O_NOFOLLOW (it's not required
// by POSIX). Check for symlinks with a separate lstat() on
// these systems.
- if (reg_files_only) {
+ if (!follow_symlinks) {
struct stat st;
if (lstat(pair->src_name, &st)) {
message_error("%s: %s", pair->src_name,
@@ -283,6 +339,9 @@ io_open_src(file_pair *pair)
return true;
}
}
+#else
+ // Avoid warnings.
+ (void)follow_symlinks;
#endif
// Try to open the file. If we are accepting non-regular files,
@@ -345,7 +404,7 @@ io_open_src(file_pair *pair)
was_symlink = true;
# else
- if (errno == ELOOP && reg_files_only) {
+ if (errno == ELOOP && !follow_symlinks) {
const int saved_errno = errno;
struct stat st;
if (lstat(pair->src_name, &st) == 0
@@ -370,7 +429,7 @@ io_open_src(file_pair *pair)
return true;
}
-#ifndef DOSLIKE
+#ifndef TUKLIB_DOSLIKE
// Drop O_NONBLOCK, which is used only when we are accepting only
// regular files. After the open() call, we want things to block
// instead of giving EAGAIN.
@@ -405,7 +464,7 @@ io_open_src(file_pair *pair)
}
// These are meaningless on Windows.
-#ifndef DOSLIKE
+#ifndef TUKLIB_DOSLIKE
if (pair->src_st.st_mode & (S_ISUID | S_ISGID)) {
// gzip rejects setuid and setgid files even
// when --force was used. bzip2 doesn't check
@@ -448,6 +507,36 @@ error:
}
+extern file_pair *
+io_open_src(const char *src_name)
+{
+ if (is_empty_filename(src_name))
+ return NULL;
+
+ // Since we have only one file open at a time, we can use
+ // a statically allocated structure.
+ static file_pair pair;
+
+ pair = (file_pair){
+ .src_name = src_name,
+ .dest_name = NULL,
+ .src_fd = -1,
+ .dest_fd = -1,
+ .src_eof = false,
+ .dest_try_sparse = false,
+ .dest_pending_sparse = 0,
+ };
+
+ // Block the signals, for which we have a custom signal handler, so
+ // that we don't need to worry about EINTR.
+ signals_block();
+ const bool error = io_open_src_real(&pair);
+ signals_unblock();
+
+ return error ? NULL : &pair;
+}
+
+
/// \brief Closes source file of the file_pair structure
///
/// \param pair File whose src_fd should be closed
@@ -457,7 +546,7 @@ static void
io_close_src(file_pair *pair, bool success)
{
if (pair->src_fd != STDIN_FILENO && pair->src_fd != -1) {
-#ifdef DOSLIKE
+#ifdef TUKLIB_DOSLIKE
(void)close(pair->src_fd);
#endif
@@ -471,7 +560,7 @@ io_close_src(file_pair *pair, bool success)
if (success && !opt_keep_original)
io_unlink(pair->src_name, &pair->src_st);
-#ifndef DOSLIKE
+#ifndef TUKLIB_DOSLIKE
(void)close(pair->src_fd);
#endif
}
@@ -481,63 +570,127 @@ io_close_src(file_pair *pair, bool success)
static bool
-io_open_dest(file_pair *pair)
+io_open_dest_real(file_pair *pair)
{
if (opt_stdout || pair->src_fd == STDIN_FILENO) {
// We don't modify or free() this.
pair->dest_name = (char *)"(stdout)";
pair->dest_fd = STDOUT_FILENO;
-#ifdef DOSLIKE
+#ifdef TUKLIB_DOSLIKE
setmode(STDOUT_FILENO, O_BINARY);
#endif
- return false;
- }
-
- pair->dest_name = suffix_get_dest_name(pair->src_name);
- if (pair->dest_name == NULL)
- return true;
-
- // If --force was used, unlink the target file first.
- if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
- message_error("%s: Cannot unlink: %s",
- pair->dest_name, strerror(errno));
- free(pair->dest_name);
- return true;
- }
+ } else {
+ pair->dest_name = suffix_get_dest_name(pair->src_name);
+ if (pair->dest_name == NULL)
+ return true;
- if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
- message_error("%s: Cannot unlink: %s", pair->dest_name,
- strerror(errno));
- free(pair->dest_name);
- return true;
- }
+ // If --force was used, unlink the target file first.
+ if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
+ message_error(_("%s: Cannot remove: %s"),
+ pair->dest_name, strerror(errno));
+ free(pair->dest_name);
+ return true;
+ }
- // Open the file.
- const int flags = O_WRONLY | O_BINARY | O_NOCTTY | O_CREAT | O_EXCL;
- const mode_t mode = S_IRUSR | S_IWUSR;
- pair->dest_fd = open(pair->dest_name, flags, mode);
+ // Open the file.
+ const int flags = O_WRONLY | O_BINARY | O_NOCTTY
+ | O_CREAT | O_EXCL;
+ const mode_t mode = S_IRUSR | S_IWUSR;
+ pair->dest_fd = open(pair->dest_name, flags, mode);
- if (pair->dest_fd == -1) {
- // Don't bother with error message if user requested
- // us to exit anyway.
- if (!user_abort)
+ if (pair->dest_fd == -1) {
message_error("%s: %s", pair->dest_name,
strerror(errno));
-
- free(pair->dest_name);
- return true;
+ free(pair->dest_name);
+ return true;
+ }
}
// If this really fails... well, we have a safe fallback.
if (fstat(pair->dest_fd, &pair->dest_st)) {
+#if defined(__VMS)
+ pair->dest_st.st_ino[0] = 0;
+ pair->dest_st.st_ino[1] = 0;
+ pair->dest_st.st_ino[2] = 0;
+#elif !defined(TUKLIB_DOSLIKE)
pair->dest_st.st_dev = 0;
pair->dest_st.st_ino = 0;
+#endif
+#ifndef TUKLIB_DOSLIKE
+ } else if (try_sparse && opt_mode == MODE_DECOMPRESS) {
+ // When writing to standard output, we need to be extra
+ // careful:
+ // - It may be connected to something else than
+ // a regular file.
+ // - We aren't necessarily writing to a new empty file
+ // or to the end of an existing file.
+ // - O_APPEND may be active.
+ //
+ // TODO: I'm keeping this disabled for DOS-like systems
+ // for now. FAT doesn't support sparse files, but NTFS
+ // does, so maybe this should be enabled on Windows after
+ // some testing.
+ if (pair->dest_fd == STDOUT_FILENO) {
+ if (!S_ISREG(pair->dest_st.st_mode))
+ return false;
+
+ const int flags = fcntl(STDOUT_FILENO, F_GETFL);
+ if (flags == -1)
+ return false;
+
+ if (flags & O_APPEND) {
+ // Creating a sparse file is not possible
+ // when O_APPEND is active (it's used by
+ // shell's >> redirection). As I understand
+ // it, it is safe to temporarily disable
+ // O_APPEND in xz, because if someone
+ // happened to write to the same file at the
+ // same time, results would be bad anyway
+ // (users shouldn't assume that xz uses any
+ // specific block size when writing data).
+ //
+ // The write position may be something else
+ // than the end of the file, so we must fix
+ // it to start writing at the end of the file
+ // to imitate O_APPEND.
+ if (lseek(STDOUT_FILENO, 0, SEEK_END) == -1)
+ return false;
+
+ if (fcntl(STDOUT_FILENO, F_SETFL,
+ stdout_flags & ~O_APPEND))
+ return false;
+
+ // Remember the flags so that io_close_dest()
+ // can restore them.
+ stdout_flags = flags;
+
+ } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR)
+ != pair->dest_st.st_size) {
+ // Writing won't start exactly at the end
+ // of the file. We cannot use sparse output,
+ // because it would probably corrupt the file.
+ return false;
+ }
+ }
+
+ pair->dest_try_sparse = true;
+#endif
}
return false;
}
+extern bool
+io_open_dest(file_pair *pair)
+{
+ signals_block();
+ const bool ret = io_open_dest_real(pair);
+ signals_unblock();
+ return ret;
+}
+
+
/// \brief Closes destination file of the file_pair structure
///
/// \param pair File whose dest_fd should be closed
@@ -545,11 +698,28 @@ io_open_dest(file_pair *pair)
///
/// \return Zero if closing succeeds. On error, -1 is returned and
/// error message printed.
-static int
+static bool
io_close_dest(file_pair *pair, bool success)
{
+#ifndef TUKLIB_DOSLIKE
+ // If io_open_dest() has disabled O_APPEND, restore it here.
+ if (stdout_flags != 0) {
+ assert(pair->dest_fd == STDOUT_FILENO);
+
+ const int fail = fcntl(STDOUT_FILENO, F_SETFL, stdout_flags);
+ stdout_flags = 0;
+
+ if (fail) {
+ message_error(_("Error restoring the O_APPEND flag "
+ "to standard output: %s"),
+ strerror(errno));
+ return true;
+ }
+ }
+#endif
+
if (pair->dest_fd == -1 || pair->dest_fd == STDOUT_FILENO)
- return 0;
+ return false;
if (close(pair->dest_fd)) {
message_error(_("%s: Closing the file failed: %s"),
@@ -559,7 +729,7 @@ io_close_dest(file_pair *pair, bool success)
// contents. Get rid of junk:
io_unlink(pair->dest_name, &pair->dest_st);
free(pair->dest_name);
- return -1;
+ return true;
}
// If the operation using this file wasn't successful, we git rid
@@ -569,55 +739,41 @@ io_close_dest(file_pair *pair, bool success)
free(pair->dest_name);
- return 0;
-}
-
-
-extern file_pair *
-io_open(const char *src_name)
-{
- if (is_empty_filename(src_name))
- return NULL;
-
- // Since we have only one file open at a time, we can use
- // a statically allocated structure.
- static file_pair pair;
-
- pair = (file_pair){
- .src_name = src_name,
- .dest_name = NULL,
- .src_fd = -1,
- .dest_fd = -1,
- .src_eof = false,
- };
-
- // Block the signals, for which we have a custom signal handler, so
- // that we don't need to worry about EINTR.
- signals_block();
-
- file_pair *ret = NULL;
- if (!io_open_src(&pair)) {
- // io_open_src() may have unblocked the signals temporarily,
- // and thus user_abort may have got set even if open()
- // succeeded.
- if (user_abort || io_open_dest(&pair))
- io_close_src(&pair, false);
- else
- ret = &pair;
- }
-
- signals_unblock();
-
- return ret;
+ return false;
}
extern void
io_close(file_pair *pair, bool success)
{
+ // Take care of sparseness at the end of the output file.
+ if (success && pair->dest_try_sparse
+ && pair->dest_pending_sparse > 0) {
+ // Seek forward one byte less than the size of the pending
+ // hole, then write one zero-byte. This way the file grows
+ // to its correct size. An alternative would be to use
+ // ftruncate() but that isn't portable enough (e.g. it
+ // doesn't work with FAT on Linux; FAT isn't that important
+ // since it doesn't support sparse files anyway, but we don't
+ // want to create corrupt files on it).
+ if (lseek(pair->dest_fd, pair->dest_pending_sparse - 1,
+ SEEK_CUR) == -1) {
+ message_error(_("%s: Seeking failed when trying "
+ "to create a sparse file: %s"),
+ pair->dest_name, strerror(errno));
+ success = false;
+ } else {
+ const uint8_t zero[1] = { '\0' };
+ if (io_write_buf(pair, zero, 1))
+ success = false;
+ }
+ }
+
signals_block();
- if (success && pair->dest_fd != STDOUT_FILENO)
+ // Copy the file attributes. We need to skip this if destination
+ // file isn't open or it is standard output.
+ if (success && pair->dest_fd != -1 && pair->dest_fd != STDOUT_FILENO)
io_copy_attrs(pair);
// Close the destination first. If it fails, we must not remove
@@ -637,11 +793,12 @@ io_close(file_pair *pair, bool success)
extern size_t
-io_read(file_pair *pair, uint8_t *buf, size_t size)
+io_read(file_pair *pair, io_buf *buf_union, size_t size)
{
// We use small buffers here.
assert(size < SSIZE_MAX);
+ uint8_t *buf = buf_union->u8;
size_t left = size;
while (left > 0) {
@@ -678,7 +835,45 @@ io_read(file_pair *pair, uint8_t *buf, size_t size)
extern bool
-io_write(const file_pair *pair, const uint8_t *buf, size_t size)
+io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos)
+{
+ // Using lseek() and read() is more portable than pread() and
+ // for us it is as good as real pread().
+ if (lseek(pair->src_fd, pos, SEEK_SET) != pos) {
+ message_error(_("%s: Error seeking the file: %s"),
+ pair->src_name, strerror(errno));
+ return true;
+ }
+
+ const size_t amount = io_read(pair, buf, size);
+ if (amount == SIZE_MAX)
+ return true;
+
+ if (amount != size) {
+ message_error(_("%s: Unexpected end of file"),
+ pair->src_name);
+ return true;
+ }
+
+ return false;
+}
+
+
+static bool
+is_sparse(const io_buf *buf)
+{
+ assert(IO_BUFFER_SIZE % sizeof(uint64_t) == 0);
+
+ for (size_t i = 0; i < ARRAY_SIZE(buf->u64); ++i)
+ if (buf->u64[i] != 0)
+ return false;
+
+ return true;
+}
+
+
+static bool
+io_write_buf(file_pair *pair, const uint8_t *buf, size_t size)
{
assert(size < SSIZE_MAX);
@@ -717,3 +912,46 @@ io_write(const file_pair *pair, const uint8_t *buf, size_t size)
return false;
}
+
+
+extern bool
+io_write(file_pair *pair, const io_buf *buf, size_t size)
+{
+ assert(size <= IO_BUFFER_SIZE);
+
+ if (pair->dest_try_sparse) {
+ // Check if the block is sparse (contains only zeros). If it
+ // sparse, we just store the amount and return. We will take
+ // care of actually skipping over the hole when we hit the
+ // next data block or close the file.
+ //
+ // Since io_close() requires that dest_pending_sparse > 0
+ // if the file ends with sparse block, we must also return
+ // if size == 0 to avoid doing the lseek().
+ if (size == IO_BUFFER_SIZE) {
+ if (is_sparse(buf)) {
+ pair->dest_pending_sparse += size;
+ return false;
+ }
+ } else if (size == 0) {
+ return false;
+ }
+
+ // This is not a sparse block. If we have a pending hole,
+ // skip it now.
+ if (pair->dest_pending_sparse > 0) {
+ if (lseek(pair->dest_fd, pair->dest_pending_sparse,
+ SEEK_CUR) == -1) {
+ message_error(_("%s: Seeking failed when "
+ "trying to create a sparse "
+ "file: %s"), pair->dest_name,
+ strerror(errno));
+ return true;
+ }
+
+ pair->dest_pending_sparse = 0;
+ }
+ }
+
+ return io_write_buf(pair, buf->u8, size);
+}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/file_io.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.h
index b0bbe11a834..967da868b07 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/file_io.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/file_io.h
@@ -11,13 +11,23 @@
///////////////////////////////////////////////////////////////////////////////
// Some systems have suboptimal BUFSIZ. Use a bit bigger value on them.
+// We also need that IO_BUFFER_SIZE is a multiple of 8 (sizeof(uint64_t))
#if BUFSIZ <= 1024
# define IO_BUFFER_SIZE 8192
#else
-# define IO_BUFFER_SIZE BUFSIZ
+# define IO_BUFFER_SIZE (BUFSIZ & ~7U)
#endif
+/// is_sparse() accesses the buffer as uint64_t for maximum speed.
+/// Use an union to make sure that the buffer is properly aligned.
+typedef union {
+ uint8_t u8[IO_BUFFER_SIZE];
+ uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
+ uint64_t u64[IO_BUFFER_SIZE / sizeof(uint64_t)];
+} io_buf;
+
+
typedef struct {
/// Name of the source filename (as given on the command line) or
/// pointer to static "(stdin)" when reading from standard input.
@@ -33,15 +43,24 @@ typedef struct {
/// File descriptor of the target file
int dest_fd;
+ /// True once end of the source file has been detected.
+ bool src_eof;
+
+ /// If true, we look for long chunks of zeros and try to create
+ /// a sparse file.
+ bool dest_try_sparse;
+
+ /// This is used only if dest_try_sparse is true. This holds the
+ /// number of zero bytes we haven't written out, because we plan
+ /// to make that byte range a sparse chunk.
+ off_t dest_pending_sparse;
+
/// Stat of the source file.
struct stat src_st;
/// Stat of the destination file.
struct stat dest_st;
- /// True once end of the source file has been detected.
- bool src_eof;
-
} file_pair;
@@ -49,8 +68,16 @@ typedef struct {
extern void io_init(void);
-/// \brief Opens a file pair
-extern file_pair *io_open(const char *src_name);
+/// \brief Disable creation of sparse files when decompressing
+extern void io_no_sparse(void);
+
+
+/// \brief Open the source file
+extern file_pair *io_open_src(const char *src_name);
+
+
+/// \brief Open the destination file
+extern bool io_open_dest(file_pair *pair);
/// \brief Closes the file descriptors and frees possible allocated memory
@@ -72,7 +99,23 @@ extern void io_close(file_pair *pair, bool success);
/// \return On success, number of bytes read is returned. On end of
/// file zero is returned and pair->src_eof set to true.
/// On error, SIZE_MAX is returned and error message printed.
-extern size_t io_read(file_pair *pair, uint8_t *buf, size_t size);
+extern size_t io_read(file_pair *pair, io_buf *buf, size_t size);
+
+
+/// \brief Read from source file from given offset to a buffer
+///
+/// This is remotely similar to standard pread(). This uses lseek() though,
+/// so the read offset is changed on each call.
+///
+/// \param pair Seekable source file
+/// \param buf Destination buffer
+/// \param size Amount of data to read
+/// \param pos Offset relative to the beginning of the file,
+/// from which the data should be read.
+///
+/// \return On success, false is returned. On error, error message
+/// is printed and true is returned.
+extern bool io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos);
/// \brief Writes a buffer to the destination file
@@ -83,4 +126,4 @@ extern size_t io_read(file_pair *pair, uint8_t *buf, size_t size);
///
/// \return On success, zero is returned. On error, -1 is returned
/// and error message printed.
-extern bool io_write(const file_pair *pair, const uint8_t *buf, size_t size);
+extern bool io_write(file_pair *pair, const io_buf *buf, size_t size);
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/hardware.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.c
index 72dc2cb10ca..74742fcec87 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/hardware.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.c
@@ -11,8 +11,7 @@
///////////////////////////////////////////////////////////////////////////////
#include "private.h"
-#include "physmem.h"
-#include "cpucores.h"
+#include "tuklib_cpucores.h"
/// Maximum number of free *coder* threads. This can be set with
@@ -22,13 +21,16 @@ static uint32_t threadlimit;
/// Memory usage limit
static uint64_t memlimit;
+/// Total amount of physical RAM
+static uint64_t total_ram;
+
extern void
hardware_threadlimit_set(uint32_t new_threadlimit)
{
if (new_threadlimit == 0) {
// The default is the number of available CPU cores.
- threadlimit = cpucores();
+ threadlimit = tuklib_cpucores();
if (threadlimit == 0)
threadlimit = 1;
} else {
@@ -49,11 +51,27 @@ hardware_threadlimit_get(void)
extern void
hardware_memlimit_set(uint64_t new_memlimit)
{
- if (new_memlimit == 0) {
- // The default is 40 % of total installed physical RAM.
- hardware_memlimit_set_percentage(40);
- } else {
+ if (new_memlimit != 0) {
memlimit = new_memlimit;
+ } else {
+ // The default depends on the amount of RAM but so that
+ // on "low-memory" systems the relative limit is higher
+ // to make it more likely that files created with "xz -9"
+ // will still decompress without overriding the limit
+ // manually.
+ //
+ // If 40 % of RAM is 80 MiB or more, use 40 % of RAM as
+ // the limit.
+ memlimit = 40 * total_ram / 100;
+ if (memlimit < UINT64_C(80) * 1024 * 1024) {
+ // If 80 % of RAM is less than 80 MiB,
+ // use 80 % of RAM as the limit.
+ memlimit = 80 * total_ram / 100;
+ if (memlimit > UINT64_C(80) * 1024 * 1024) {
+ // Otherwise use 80 MiB as the limit.
+ memlimit = UINT64_C(80) * 1024 * 1024;
+ }
+ }
}
return;
@@ -66,15 +84,7 @@ hardware_memlimit_set_percentage(uint32_t percentage)
assert(percentage > 0);
assert(percentage <= 100);
- uint64_t mem = physmem();
-
- // If we cannot determine the amount of RAM, assume 32 MiB. Maybe
- // even that is too much on some systems. But on most systems it's
- // far too little, and can be annoying.
- if (mem == 0)
- mem = UINT64_C(32) * 1024 * 1024;
-
- memlimit = percentage * mem / 100;
+ memlimit = percentage * total_ram / 100;
return;
}
@@ -89,6 +99,13 @@ hardware_memlimit_get(void)
extern void
hardware_init(void)
{
+ // Get the amount of RAM. If we cannot determine it,
+ // use the assumption defined by the configure script.
+ total_ram = lzma_physmem();
+ if (total_ram == 0)
+ total_ram = (uint64_t)(ASSUME_RAM) * 1024 * 1024;
+
+ // Set the defaults.
hardware_memlimit_set(0);
hardware_threadlimit_set(0);
return;
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/hardware.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.h
index b2cf34cbc8c..b2cf34cbc8c 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/hardware.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/hardware.h
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.c
new file mode 100644
index 00000000000..91707b918b4
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.c
@@ -0,0 +1,742 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file list.c
+/// \brief Listing information about .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include "tuklib_integer.h"
+
+
+/// Totals that are displayed if there was more than one file.
+/// The "files" counter is also used in print_info_adv() to show
+/// the file number.
+static struct {
+ uint64_t files;
+ uint64_t streams;
+ uint64_t blocks;
+ uint64_t compressed_size;
+ uint64_t uncompressed_size;
+ uint32_t checks;
+} totals = { 0, 0, 0, 0, 0, 0 };
+
+
+/// \brief Parse the Index(es) from the given .xz file
+///
+/// \param idx If decoding is successful, *idx will be set to point
+/// to lzma_index containing the decoded information.
+/// On error, *idx is not modified.
+/// \param pair Input file
+///
+/// \return On success, false is returned. On error, true is returned.
+///
+// TODO: This function is pretty big. liblzma should have a function that
+// takes a callback function to parse the Index(es) from a .xz file to make
+// it easy for applications.
+static bool
+parse_indexes(lzma_index **idx, file_pair *pair)
+{
+ if (pair->src_st.st_size <= 0) {
+ message_error(_("%s: File is empty"), pair->src_name);
+ return true;
+ }
+
+ if (pair->src_st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) {
+ message_error(_("%s: Too small to be a valid .xz file"),
+ pair->src_name);
+ return true;
+ }
+
+ io_buf buf;
+ lzma_stream_flags header_flags;
+ lzma_stream_flags footer_flags;
+ lzma_ret ret;
+
+ // lzma_stream for the Index decoder
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ // All Indexes decoded so far
+ lzma_index *combined_index = NULL;
+
+ // The Index currently being decoded
+ lzma_index *this_index = NULL;
+
+ // Current position in the file. We parse the file backwards so
+ // initialize it to point to the end of the file.
+ off_t pos = pair->src_st.st_size;
+
+ // Each loop iteration decodes one Index.
+ do {
+ // Check that there is enough data left to contain at least
+ // the Stream Header and Stream Footer. This check cannot
+ // fail in the first pass of this loop.
+ if (pos < 2 * LZMA_STREAM_HEADER_SIZE) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(LZMA_DATA_ERROR));
+ goto error;
+ }
+
+ pos -= LZMA_STREAM_HEADER_SIZE;
+ lzma_vli stream_padding = 0;
+
+ // Locate the Stream Footer. There may be Stream Padding which
+ // we must skip when reading backwards.
+ while (true) {
+ if (pos < LZMA_STREAM_HEADER_SIZE) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(
+ LZMA_DATA_ERROR));
+ goto error;
+ }
+
+ if (io_pread(pair, &buf,
+ LZMA_STREAM_HEADER_SIZE, pos))
+ goto error;
+
+ // Stream Padding is always a multiple of four bytes.
+ int i = 2;
+ if (buf.u32[i] != 0)
+ break;
+
+ // To avoid calling io_pread() for every four bytes
+ // of Stream Padding, take advantage that we read
+ // 12 bytes (LZMA_STREAM_HEADER_SIZE) already and
+ // check them too before calling io_pread() again.
+ do {
+ stream_padding += 4;
+ pos -= 4;
+ --i;
+ } while (i >= 0 && buf.u32[i] == 0);
+ }
+
+ // Decode the Stream Footer.
+ ret = lzma_stream_footer_decode(&footer_flags, buf.u8);
+ if (ret != LZMA_OK) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+ goto error;
+ }
+
+ // Check that the size of the Index field looks sane.
+ lzma_vli index_size = footer_flags.backward_size;
+ if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(LZMA_DATA_ERROR));
+ goto error;
+ }
+
+ // Set pos to the beginning of the Index.
+ pos -= index_size;
+
+ // See how much memory we can use for decoding this Index.
+ uint64_t memlimit = hardware_memlimit_get();
+ uint64_t memused = 0;
+ if (combined_index != NULL) {
+ memused = lzma_index_memused(combined_index);
+ if (memused > memlimit)
+ message_bug();
+
+ memlimit -= memused;
+ }
+
+ // Decode the Index.
+ ret = lzma_index_decoder(&strm, &this_index, memlimit);
+ if (ret != LZMA_OK) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+ goto error;
+ }
+
+ do {
+ // Don't give the decoder more input than the
+ // Index size.
+ strm.avail_in = MIN(IO_BUFFER_SIZE, index_size);
+ if (io_pread(pair, &buf, strm.avail_in, pos))
+ goto error;
+
+ pos += strm.avail_in;
+ index_size -= strm.avail_in;
+
+ strm.next_in = buf.u8;
+ ret = lzma_code(&strm, LZMA_RUN);
+
+ } while (ret == LZMA_OK);
+
+ // If the decoding seems to be successful, check also that
+ // the Index decoder consumed as much input as indicated
+ // by the Backward Size field.
+ if (ret == LZMA_STREAM_END)
+ if (index_size != 0 || strm.avail_in != 0)
+ ret = LZMA_DATA_ERROR;
+
+ if (ret != LZMA_STREAM_END) {
+ // LZMA_BUFFER_ERROR means that the Index decoder
+ // would have liked more input than what the Index
+ // size should be according to Stream Footer.
+ // The message for LZMA_DATA_ERROR makes more
+ // sense in that case.
+ if (ret == LZMA_BUF_ERROR)
+ ret = LZMA_DATA_ERROR;
+
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+
+ // If the error was too low memory usage limit,
+ // show also how much memory would have been needed.
+ if (ret == LZMA_MEMLIMIT_ERROR) {
+ uint64_t needed = lzma_memusage(&strm);
+ if (UINT64_MAX - needed < memused)
+ needed = UINT64_MAX;
+ else
+ needed += memused;
+
+ message_mem_needed(V_ERROR, needed);
+ }
+
+ goto error;
+ }
+
+ // Decode the Stream Header and check that its Stream Flags
+ // match the Stream Footer.
+ pos -= footer_flags.backward_size + LZMA_STREAM_HEADER_SIZE;
+ if ((lzma_vli)(pos) < lzma_index_total_size(this_index)) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(LZMA_DATA_ERROR));
+ goto error;
+ }
+
+ pos -= lzma_index_total_size(this_index);
+ if (io_pread(pair, &buf, LZMA_STREAM_HEADER_SIZE, pos))
+ goto error;
+
+ ret = lzma_stream_header_decode(&header_flags, buf.u8);
+ if (ret != LZMA_OK) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+ goto error;
+ }
+
+ ret = lzma_stream_flags_compare(&header_flags, &footer_flags);
+ if (ret != LZMA_OK) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+ goto error;
+ }
+
+ // Store the decoded Stream Flags into this_index. This is
+ // needed so that we can print which Check is used in each
+ // Stream.
+ ret = lzma_index_stream_flags(this_index, &footer_flags);
+ if (ret != LZMA_OK)
+ message_bug();
+
+ // Store also the size of the Stream Padding field. It is
+ // needed to show the offsets of the Streams correctly.
+ ret = lzma_index_stream_padding(this_index, stream_padding);
+ if (ret != LZMA_OK)
+ message_bug();
+
+ if (combined_index != NULL) {
+ // Append the earlier decoded Indexes
+ // after this_index.
+ ret = lzma_index_cat(
+ this_index, combined_index, NULL);
+ if (ret != LZMA_OK) {
+ message_error("%s: %s", pair->src_name,
+ message_strm(ret));
+ goto error;
+ }
+ }
+
+ combined_index = this_index;
+ this_index = NULL;
+
+ } while (pos > 0);
+
+ lzma_end(&strm);
+
+ // All OK. Make combined_index available to the caller.
+ *idx = combined_index;
+ return false;
+
+error:
+ // Something went wrong, free the allocated memory.
+ lzma_end(&strm);
+ lzma_index_end(combined_index, NULL);
+ lzma_index_end(this_index, NULL);
+ return true;
+}
+
+
+/// \brief Get the compression ratio
+///
+/// This has slightly different format than that is used by in message.c.
+static const char *
+get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
+{
+ if (uncompressed_size == 0)
+ return "---";
+
+ const double ratio = (double)(compressed_size)
+ / (double)(uncompressed_size);
+ if (ratio > 9.999)
+ return "---";
+
+ static char buf[6];
+ snprintf(buf, sizeof(buf), "%.3f", ratio);
+ return buf;
+}
+
+
+static const char check_names[LZMA_CHECK_ID_MAX + 1][12] = {
+ "None",
+ "CRC32",
+ "Unknown-2",
+ "Unknown-3",
+ "CRC64",
+ "Unknown-5",
+ "Unknown-6",
+ "Unknown-7",
+ "Unknown-8",
+ "Unknown-9",
+ "SHA-256",
+ "Unknown-11",
+ "Unknown-12",
+ "Unknown-13",
+ "Unknown-14",
+ "Unknown-15",
+};
+
+
+/// \brief Get a comma-separated list of Check names
+///
+/// \param checks Bit mask of Checks to print
+/// \param space_after_comma
+/// It's better to not use spaces in table-like listings,
+/// but in more verbose formats a space after a comma
+/// is good for readability.
+static const char *
+get_check_names(uint32_t checks, bool space_after_comma)
+{
+ assert(checks != 0);
+
+ static char buf[sizeof(check_names)];
+ char *pos = buf;
+ size_t left = sizeof(buf);
+
+ const char *sep = space_after_comma ? ", " : ",";
+ bool comma = false;
+
+ for (size_t i = 0; i <= LZMA_CHECK_ID_MAX; ++i) {
+ if (checks & (UINT32_C(1) << i)) {
+ my_snprintf(&pos, &left, "%s%s",
+ comma ? sep : "", check_names[i]);
+ comma = true;
+ }
+ }
+
+ return buf;
+}
+
+
+/// \brief Read the Check value from the .xz file and print it
+///
+/// Since this requires a seek, listing all Check values for all Blocks can
+/// be slow.
+///
+/// \param pair Input file
+/// \param iter Location of the Block whose Check value should
+/// be printed.
+///
+/// \return False on success, true on I/O error.
+static bool
+print_check_value(file_pair *pair, const lzma_index_iter *iter)
+{
+ // Don't read anything from the file if there is no integrity Check.
+ if (iter->stream.flags->check == LZMA_CHECK_NONE) {
+ printf("---");
+ return false;
+ }
+
+ // Locate and read the Check field.
+ const uint32_t size = lzma_check_size(iter->stream.flags->check);
+ const off_t offset = iter->block.compressed_file_offset
+ + iter->block.total_size - size;
+ io_buf buf;
+ if (io_pread(pair, &buf, size, offset))
+ return true;
+
+ // CRC32 and CRC64 are in little endian. Guess that all the future
+ // 32-bit and 64-bit Check values are little endian too. It shouldn't
+ // be a too big problem if this guess is wrong.
+ if (size == 4) {
+ printf("%08" PRIx32, conv32le(buf.u32[0]));
+ } else if (size == 8) {
+ printf("%016" PRIx64, conv64le(buf.u64[0]));
+ } else {
+ for (size_t i = 0; i < size; ++i)
+ printf("%02x", buf.u8[i]);
+ }
+
+ return false;
+}
+
+
+static void
+print_info_basic(const lzma_index *idx, file_pair *pair)
+{
+ static bool headings_displayed = false;
+ if (!headings_displayed) {
+ headings_displayed = true;
+ // TRANSLATORS: These are column titles. From Strms (Streams)
+ // to Ratio, the columns are right aligned. Check and Filename
+ // are left aligned. If you need longer words, it's OK to
+ // use two lines here. Test with xz --list.
+ puts(_("Strms Blocks Compressed Uncompressed Ratio "
+ "Check Filename"));
+ }
+
+ printf("%5s %7s %11s %11s %5s %-7s %s\n",
+ uint64_to_str(lzma_index_stream_count(idx), 0),
+ uint64_to_str(lzma_index_block_count(idx), 1),
+ uint64_to_nicestr(lzma_index_file_size(idx),
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(lzma_index_uncompressed_size(idx),
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(lzma_index_file_size(idx),
+ lzma_index_uncompressed_size(idx)),
+ get_check_names(lzma_index_checks(idx), false),
+ pair->src_name);
+
+ return;
+}
+
+
+static void
+print_adv_helper(uint64_t stream_count, uint64_t block_count,
+ uint64_t compressed_size, uint64_t uncompressed_size,
+ uint32_t checks)
+{
+ printf(_(" Stream count: %s\n"),
+ uint64_to_str(stream_count, 0));
+ printf(_(" Block count: %s\n"),
+ uint64_to_str(block_count, 0));
+ printf(_(" Compressed size: %s\n"),
+ uint64_to_nicestr(compressed_size,
+ NICESTR_B, NICESTR_TIB, true, 0));
+ printf(_(" Uncompressed size: %s\n"),
+ uint64_to_nicestr(uncompressed_size,
+ NICESTR_B, NICESTR_TIB, true, 0));
+ printf(_(" Ratio: %s\n"),
+ get_ratio(compressed_size, uncompressed_size));
+ printf(_(" Check: %s\n"),
+ get_check_names(checks, true));
+ return;
+}
+
+
+static void
+print_info_adv(const lzma_index *idx, file_pair *pair)
+{
+ // Print the overall information.
+ print_adv_helper(lzma_index_stream_count(idx),
+ lzma_index_block_count(idx),
+ lzma_index_file_size(idx),
+ lzma_index_uncompressed_size(idx),
+ lzma_index_checks(idx));
+
+ // TODO: The rest of this function needs some work. Currently
+ // the offsets are not printed, which could be useful even when
+ // printed in a less accurate format. On the other hand, maybe
+ // this should print the information with exact byte values,
+ // or maybe there should be at least an option to do that.
+ //
+ // We could also display some other info. E.g. it could be useful
+ // to quickly see how big is the biggest Block (uncompressed size)
+ // and if all Blocks have Compressed Size and Uncompressed Size
+ // fields present, which can be used e.g. for multithreaded
+ // decompression.
+
+ // Avoid printing Stream and Block lists when they wouldn't be useful.
+ bool show_blocks = false;
+ if (lzma_index_stream_count(idx) > 1) {
+ puts(_(" Streams:"));
+ puts(_(" Number Blocks Compressed "
+ "Uncompressed Ratio Check"));
+
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, idx);
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)) {
+ if (iter.stream.block_count > 1)
+ show_blocks = true;
+
+ printf(" %8s %10s %11s %11s %5s %s\n",
+ uint64_to_str(iter.stream.number, 0),
+ uint64_to_str(iter.stream.block_count, 1),
+ uint64_to_nicestr(
+ iter.stream.compressed_size,
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(
+ iter.stream.uncompressed_size,
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(iter.stream.compressed_size,
+ iter.stream.uncompressed_size),
+ check_names[iter.stream.flags->check]);
+ }
+ }
+
+ if (show_blocks || lzma_index_block_count(idx)
+ > lzma_index_stream_count(idx)
+ || message_verbosity_get() >= V_DEBUG) {
+ puts(_(" Blocks:"));
+ // FIXME: Number in Stream/file, which one is better?
+ puts(_(" Stream Number Compressed "
+ "Uncompressed Ratio Check"));
+
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, idx);
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+ printf(" %8s %10s %11s %11s %5s %-7s",
+ uint64_to_str(iter.stream.number, 0),
+ uint64_to_str(iter.block.number_in_stream, 1),
+ uint64_to_nicestr(iter.block.total_size,
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(
+ iter.block.uncompressed_size,
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(iter.block.total_size,
+ iter.block.uncompressed_size),
+ check_names[iter.stream.flags->check]);
+
+ if (message_verbosity_get() >= V_DEBUG)
+ if (print_check_value(pair, &iter))
+ return;
+
+ putchar('\n');
+ }
+ }
+}
+
+
+static void
+print_info_robot(const lzma_index *idx, file_pair *pair)
+{
+ printf("file\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%s\t%s\n",
+ lzma_index_stream_count(idx),
+ lzma_index_block_count(idx),
+ lzma_index_file_size(idx),
+ lzma_index_uncompressed_size(idx),
+ get_ratio(lzma_index_file_size(idx),
+ lzma_index_uncompressed_size(idx)),
+ get_check_names(lzma_index_checks(idx), false),
+ pair->src_name);
+
+ if (message_verbosity_get() >= V_VERBOSE) {
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, idx);
+
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM))
+ printf("stream\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%" PRIu64 "\t%s\n",
+ iter.stream.number,
+ iter.stream.compressed_offset,
+ iter.stream.uncompressed_offset,
+ iter.stream.compressed_size,
+ iter.stream.uncompressed_size,
+ get_ratio(iter.stream.compressed_size,
+ iter.stream.uncompressed_size),
+ iter.stream.padding,
+ check_names[iter.stream.flags->check]);
+
+ lzma_index_iter_rewind(&iter);
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+ printf("block\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64 "\t%s\t%s",
+ iter.stream.number,
+ iter.block.number_in_stream,
+ iter.block.number_in_file,
+ iter.block.compressed_file_offset,
+ iter.block.uncompressed_file_offset,
+ iter.block.total_size,
+ iter.block.uncompressed_size,
+ get_ratio(iter.block.total_size,
+ iter.block.uncompressed_size),
+ check_names[iter.stream.flags->check]);
+
+ if (message_verbosity_get() >= V_DEBUG) {
+ putchar('\t');
+ if (print_check_value(pair, &iter))
+ return;
+ }
+
+ putchar('\n');
+ }
+ }
+
+ return;
+}
+
+
+static void
+update_totals(const lzma_index *idx)
+{
+ // TODO: Integer overflow checks
+ ++totals.files;
+ totals.streams += lzma_index_stream_count(idx);
+ totals.blocks += lzma_index_block_count(idx);
+ totals.compressed_size += lzma_index_file_size(idx);
+ totals.uncompressed_size += lzma_index_uncompressed_size(idx);
+ totals.checks |= lzma_index_checks(idx);
+ return;
+}
+
+
+static void
+print_totals_basic(void)
+{
+ // Print a separator line.
+ char line[80];
+ memset(line, '-', sizeof(line));
+ line[sizeof(line) - 1] = '\0';
+ puts(line);
+
+ // Print the totals except the file count, which needs
+ // special handling.
+ printf("%5s %7s %11s %11s %5s %-7s ",
+ uint64_to_str(totals.streams, 0),
+ uint64_to_str(totals.blocks, 1),
+ uint64_to_nicestr(totals.compressed_size,
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(totals.uncompressed_size,
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(totals.compressed_size,
+ totals.uncompressed_size),
+ get_check_names(totals.checks, false));
+
+ // Since we print totals only when there are at least two files,
+ // the English message will always use "%s files". But some other
+ // languages need different forms for different plurals so we
+ // have to translate this string still.
+ //
+ // TRANSLATORS: This simply indicates the number of files shown
+ // by --list even though the format string uses %s.
+ printf(N_("%s file", "%s files\n",
+ totals.files <= ULONG_MAX ? totals.files
+ : (totals.files % 1000000) + 1000000),
+ uint64_to_str(totals.files, 0));
+
+ return;
+}
+
+
+static void
+print_totals_adv(void)
+{
+ putchar('\n');
+ puts(_("Totals:"));
+ printf(_(" Number of files: %s\n"),
+ uint64_to_str(totals.files, 0));
+ print_adv_helper(totals.streams, totals.blocks,
+ totals.compressed_size, totals.uncompressed_size,
+ totals.checks);
+
+ return;
+}
+
+
+static void
+print_totals_robot(void)
+{
+ printf("totals\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%s\t%" PRIu64 "\n",
+ totals.streams,
+ totals.blocks,
+ totals.compressed_size,
+ totals.uncompressed_size,
+ get_ratio(totals.compressed_size,
+ totals.uncompressed_size),
+ get_check_names(totals.checks, false),
+ totals.files);
+
+ return;
+}
+
+
+extern void
+list_totals(void)
+{
+ if (opt_robot) {
+ // Always print totals in --robot mode. It can be convenient
+ // in some cases and doesn't complicate usage of the
+ // single-file case much.
+ print_totals_robot();
+
+ } else if (totals.files > 1) {
+ // For non-robot mode, totals are printed only if there
+ // is more than one file.
+ if (message_verbosity_get() <= V_WARNING)
+ print_totals_basic();
+ else
+ print_totals_adv();
+ }
+
+ return;
+}
+
+
+extern void
+list_file(const char *filename)
+{
+ if (opt_format != FORMAT_XZ && opt_format != FORMAT_AUTO)
+ message_fatal(_("--list works only on .xz files "
+ "(--format=xz or --format=auto)"));
+
+ message_filename(filename);
+
+ if (filename == stdin_filename) {
+ message_error(_("--list does not support reading from "
+ "standard input"));
+ return;
+ }
+
+ // Unset opt_stdout so that io_open_src() won't accept special files.
+ // Set opt_force so that io_open_src() will follow symlinks.
+ opt_stdout = false;
+ opt_force = true;
+ file_pair *pair = io_open_src(filename);
+ if (pair == NULL)
+ return;
+
+ lzma_index *idx;
+ if (!parse_indexes(&idx, pair)) {
+ // Update the totals that are displayed after all
+ // the individual files have been listed.
+ update_totals(idx);
+
+ // We have three main modes:
+ // - --robot, which has submodes if --verbose is specified
+ // once or twice
+ // - Normal --list without --verbose
+ // - --list with one or two --verbose
+ if (opt_robot)
+ print_info_robot(idx, pair);
+ else if (message_verbosity_get() <= V_WARNING)
+ print_info_basic(idx, pair);
+ else
+ print_info_adv(idx, pair);
+
+ lzma_index_end(idx, NULL);
+ }
+
+ io_close(pair, false);
+ return;
+}
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.h
new file mode 100644
index 00000000000..a4c6ec7dc42
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/list.h
@@ -0,0 +1,18 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file list.h
+/// \brief List information about .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// \brief List information about the given .xz file
+extern void list_file(const char *filename);
+
+
+/// \brief Show the totals after all files have been listed
+extern void list_totals(void);
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/main.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.c
index 4121f8d48bc..e0905893c89 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/main.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.c
@@ -42,52 +42,11 @@ set_exit_no_warn(void)
}
-extern void
-my_exit(enum exit_status_type status)
-{
- // Close stdout. If something goes wrong, print an error message
- // to stderr.
- {
- const int ferror_err = ferror(stdout);
- const int fclose_err = fclose(stdout);
- if (ferror_err || fclose_err) {
- // If it was fclose() that failed, we have the reason
- // in errno. If only ferror() indicated an error,
- // we have no idea what the reason was.
- message(V_ERROR, "%s: %s", _("Writing to standard "
- "output failed"),
- fclose_err ? strerror(errno)
- : _("Unknown error"));
- status = E_ERROR;
- }
- }
-
- // Close stderr. If something goes wrong, there's nothing where we
- // could print an error message. Just set the exit status.
- {
- const int ferror_err = ferror(stderr);
- const int fclose_err = fclose(stderr);
- if (fclose_err || ferror_err)
- status = E_ERROR;
- }
-
- // Suppress the exit status indicating a warning if --no-warn
- // was specified.
- if (status == E_WARNING && no_warn)
- status = E_SUCCESS;
-
- // If we have got a signal, raise it to kill the program.
- // Otherwise we just call exit().
- signals_exit();
- exit(status);
-}
-
-
static const char *
read_name(const args_info *args)
{
// FIXME: Maybe we should have some kind of memory usage limit here
- // like the tool has for the actual compression and uncompression.
+ // like the tool has for the actual compression and decompression.
// Giving some huge text file with --files0 makes us to read the
// whole file in RAM.
static char *name = NULL;
@@ -170,48 +129,21 @@ read_name(const args_info *args)
int
main(int argc, char **argv)
{
- // Initialize the file I/O as the very first step. This makes sure
- // that stdin, stdout, and stderr are something valid.
- io_init();
+ // Set up the progname variable.
+ tuklib_progname_init(argv);
-#ifdef DOSLIKE
- // Adjust argv[0] to make it look nicer in messages, and also to
- // help the code in args.c.
- {
- // Strip the leading path.
- char *p = argv[0] + strlen(argv[0]);
- while (argv[0] < p && p[-1] != '/' && p[-1] != '\\')
- --p;
-
- argv[0] = p;
-
- // Strip the .exe suffix.
- p = strrchr(p, '.');
- if (p != NULL)
- *p = '\0';
-
- // Make it lowercase.
- for (p = argv[0]; *p != '\0'; ++p)
- if (*p >= 'A' && *p <= 'Z')
- *p = *p - 'A' + 'a';
- }
-#endif
-
- // Set up the locale.
- setlocale(LC_ALL, "");
+ // Initialize the file I/O. This makes sure that
+ // stdin, stdout, and stderr are something valid.
+ io_init();
-#ifdef ENABLE_NLS
- // Set up the message translations too.
- bindtextdomain(PACKAGE, LOCALEDIR);
- textdomain(PACKAGE);
-#endif
+ // Set up the locale and message translations.
+ tuklib_gettext_init(PACKAGE, LOCALEDIR);
- // Set the program invocation name used in various messages, and
- // do other message handling related initializations.
- message_init(argv[0]);
+ // Initialize handling of error/warning/other messages.
+ message_init();
// Set hardware-dependent default values. These can be overriden
- // on the command line, thus this must be done before parse_args().
+ // on the command line, thus this must be done before args_parse().
hardware_init();
// Parse the command line arguments and get an array of filenames.
@@ -221,6 +153,10 @@ main(int argc, char **argv)
args_info args;
args_parse(&args, argc, argv);
+ if (opt_mode != MODE_LIST && opt_robot)
+ message_fatal(_("Compression and decompression with --robot "
+ "are not supported yet."));
+
// Tell the message handling code how many input files there are if
// we know it. This way the progress indicator can show it.
if (args.files_name != NULL)
@@ -229,40 +165,46 @@ main(int argc, char **argv)
message_set_files(args.arg_count);
// Refuse to write compressed data to standard output if it is
- // a terminal and --force wasn't used.
- if (opt_mode == MODE_COMPRESS && !opt_force) {
+ // a terminal.
+ if (opt_mode == MODE_COMPRESS) {
if (opt_stdout || (args.arg_count == 1
&& strcmp(args.arg_names[0], "-") == 0)) {
if (is_tty_stdout()) {
message_try_help();
- my_exit(E_ERROR);
+ tuklib_exit(E_ERROR, E_ERROR, false);
}
}
}
- if (opt_mode == MODE_LIST) {
- message_fatal("--list is not implemented yet.");
- }
-
- // Hook the signal handlers. We don't need these before we start
- // the actual action, so this is done after parsing the command
- // line arguments.
- signals_init();
+ // Set up the signal handlers. We don't need these before we
+ // start the actual action and not in --list mode, so this is
+ // done after parsing the command line arguments.
+ //
+ // It's good to keep signal handlers in normal compression and
+ // decompression modes even when only writing to stdout, because
+ // we might need to restore O_APPEND flag on stdout before exiting.
+ // In --test mode, signal handlers aren't really needed, but let's
+ // keep them there for consistency with normal decompression.
+ if (opt_mode != MODE_LIST)
+ signals_init();
+
+ // coder_run() handles compression, decompression, and testing.
+ // list_file() is for --list.
+ void (*run)(const char *filename) = opt_mode == MODE_LIST
+ ? &list_file : &coder_run;
// Process the files given on the command line. Note that if no names
- // were given, parse_args() gave us a fake "-" filename.
+ // were given, args_parse() gave us a fake "-" filename.
for (size_t i = 0; i < args.arg_count && !user_abort; ++i) {
if (strcmp("-", args.arg_names[i]) == 0) {
- // Processing from stdin to stdout. Unless --force
- // was used, check that we aren't writing compressed
- // data to a terminal or reading it from terminal.
- if (!opt_force) {
- if (opt_mode == MODE_COMPRESS) {
- if (is_tty_stdout())
- continue;
- } else if (is_tty_stdin()) {
+ // Processing from stdin to stdout. Check that we
+ // aren't writing compressed data to a terminal or
+ // reading it from a terminal.
+ if (opt_mode == MODE_COMPRESS) {
+ if (is_tty_stdout())
continue;
- }
+ } else if (is_tty_stdin()) {
+ continue;
}
// It doesn't make sense to compress data from stdin
@@ -284,8 +226,8 @@ main(int argc, char **argv)
args.arg_names[i] = (char *)stdin_filename;
}
- // Do the actual compression or uncompression.
- coder_run(args.arg_names[i]);
+ // Do the actual compression or decompression.
+ run(args.arg_names[i]);
}
// If --files or --files0 was used, process the filenames from the
@@ -301,12 +243,30 @@ main(int argc, char **argv)
// read_name() doesn't return empty names.
assert(name[0] != '\0');
- coder_run(name);
+ run(name);
}
if (args.files_name != stdin_filename)
(void)fclose(args.files_file);
}
- my_exit(exit_status);
+ // All files have now been handled. If in --list mode, display
+ // the totals before exiting. We don't have signal handlers
+ // enabled in --list mode, so we don't need to check user_abort.
+ if (opt_mode == MODE_LIST) {
+ assert(!user_abort);
+ list_totals();
+ }
+
+ // If we have got a signal, raise it to kill the program instead
+ // of calling tuklib_exit().
+ signals_exit();
+
+ // Suppress the exit status indicating a warning if --no-warn
+ // was specified.
+ if (exit_status == E_WARNING && no_warn)
+ exit_status = E_SUCCESS;
+
+ tuklib_exit(exit_status, E_ERROR,
+ message_verbosity_get() != V_SILENT);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/main.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.h
index 8fd923930f9..323f2f7d09c 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/main.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/main.h
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
//
/// \file main.h
-/// \brief Miscellanous declarations
+/// \brief Miscellaneous declarations
//
// Author: Lasse Collin
//
@@ -28,10 +28,3 @@ extern void set_exit_status(enum exit_status_type new_status);
/// but nothing worth an error has occurred. This is called when --no-warn
/// is specified.
extern void set_exit_no_warn(void);
-
-
-/// Exits the program using the given status. This takes care of closing
-/// stdin, stdout, and stderr and catches possible errors. If we had got
-/// a signal, this function will raise it so that to the parent process it
-/// appears that we were killed by the signal sent by the user.
-extern void my_exit(enum exit_status_type status) lzma_attribute((noreturn));
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/message.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.c
index 19aff9bdb41..94140132bf2 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/message.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.c
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
//
/// \file message.c
-/// \brief Printing messages to stderr
+/// \brief Printing messages
//
// Author: Lasse Collin
//
@@ -19,9 +19,6 @@
#include <stdarg.h>
-/// Name of the program which is prefixed to the error messages.
-static const char *argv0;
-
/// Number of the current file
static unsigned int files_pos = 0;
@@ -114,35 +111,9 @@ my_time(void)
}
-/// Wrapper for snprintf() to help constructing a string in pieces.
-static void lzma_attribute((format(printf, 3, 4)))
-my_snprintf(char **pos, size_t *left, const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- const int len = vsnprintf(*pos, *left, fmt, ap);
- va_end(ap);
-
- // If an error occurred, we want the caller to think that the whole
- // buffer was used. This way no more data will be written to the
- // buffer. We don't need better error handling here.
- if (len < 0 || (size_t)(len) >= *left) {
- *left = 0;
- } else {
- *pos += len;
- *left -= len;
- }
-
- return;
-}
-
-
extern void
-message_init(const char *given_argv0)
+message_init(void)
{
- // Name of the program
- argv0 = given_argv0;
-
// If --verbose is used, we use a progress indicator if and only
// if stderr is a terminal. If stderr is not a terminal, we print
// verbose information only after finishing the file. As a special
@@ -158,7 +129,7 @@ message_init(const char *given_argv0)
if (progress_automatic) {
// stderr is a terminal. Check the COLUMNS environment
// variable to see if the terminal is wide enough. If COLUMNS
- // doesn't exist or it has some unparseable value, we assume
+ // doesn't exist or it has some unparsable value, we assume
// that the terminal is wide enough.
const char *columns_str = getenv("COLUMNS");
if (columns_str != NULL) {
@@ -226,6 +197,13 @@ message_verbosity_decrease(void)
}
+extern enum message_verbosity
+message_verbosity_get(void)
+{
+ return verbosity;
+}
+
+
extern void
message_set_files(unsigned int files)
{
@@ -241,14 +219,15 @@ message_set_files(unsigned int files)
static void
print_filename(void)
{
- if (!current_filename_printed
- && (files_total != 1 || filename != stdin_filename)) {
+ if (files_total != 1 || filename != stdin_filename) {
signals_block();
+ FILE *file = opt_mode == MODE_LIST ? stdout : stderr;
+
// If a file was already processed, put an empty line
// before the next filename to improve readability.
if (first_filename_printed)
- fputc('\n', stderr);
+ fputc('\n', file);
first_filename_printed = true;
current_filename_printed = true;
@@ -256,10 +235,10 @@ print_filename(void)
// If we don't know how many files there will be due
// to usage of --files or --files0.
if (files_total == 0)
- fprintf(stderr, "%s (%u)\n", filename,
+ fprintf(file, "%s (%u)\n", filename,
files_pos);
else
- fprintf(stderr, "%s (%u/%u)\n", filename,
+ fprintf(file, "%s (%u/%u)\n", filename,
files_pos, files_total);
signals_unblock();
@@ -270,8 +249,24 @@ print_filename(void)
extern void
-message_progress_start(
- lzma_stream *strm, const char *src_name, uint64_t in_size)
+message_filename(const char *src_name)
+{
+ // Start numbering the files starting from one.
+ ++files_pos;
+ filename = src_name;
+
+ if (verbosity >= V_VERBOSE
+ && (progress_automatic || opt_mode == MODE_LIST))
+ print_filename();
+ else
+ current_filename_printed = false;
+
+ return;
+}
+
+
+extern void
+message_progress_start(lzma_stream *strm, uint64_t in_size)
{
// Store the pointer to the lzma_stream used to do the coding.
// It is needed to find out the position in the stream.
@@ -282,30 +277,18 @@ message_progress_start(
// since it is possible that the user sends us a signal to show
// statistics, we need to have these available anyway.
start_time = my_time();
- filename = src_name;
expected_in_size = in_size;
// Indicate that progress info may need to be printed before
// printing error messages.
progress_started = true;
- // Indicate the name of this file hasn't been printed to
- // stderr yet.
- current_filename_printed = false;
-
- // Start numbering the files starting from one.
- ++files_pos;
-
// If progress indicator is wanted, print the filename and possibly
// the file count now.
if (verbosity >= V_VERBOSE && progress_automatic) {
- // Print the filename to stderr if that is appropriate with
- // the current settings.
- print_filename();
-
// Start the timer to display the first progress message
// after one second. An alternative would be to show the
- // first message almost immediatelly, but delaying by one
+ // first message almost immediately, but delaying by one
// second looks better to me, since extremely early
// progress info is pretty much useless.
#ifdef SIGALRM
@@ -325,65 +308,26 @@ message_progress_start(
/// Make the string indicating completion percentage.
static const char *
-progress_percentage(uint64_t in_pos, bool final)
+progress_percentage(uint64_t in_pos)
{
- static char buf[sizeof("100.0 %")];
-
- double percentage;
-
- if (final) {
- // Use floating point conversion of snprintf() also for
- // 100.0 % instead of fixed string, because the decimal
- // separator isn't a dot in all locales.
- percentage = 100.0;
- } else {
- // If the size of the input file is unknown or the size told us is
- // clearly wrong since we have processed more data than the alleged
- // size of the file, show a static string indicating that we have
- // no idea of the completion percentage.
- if (expected_in_size == 0 || in_pos > expected_in_size)
- return "--- %";
-
- // Never show 100.0 % before we actually are finished.
- percentage = (double)(in_pos) / (double)(expected_in_size)
- * 99.9;
- }
-
+ // If the size of the input file is unknown or the size told us is
+ // clearly wrong since we have processed more data than the alleged
+ // size of the file, show a static string indicating that we have
+ // no idea of the completion percentage.
+ if (expected_in_size == 0 || in_pos > expected_in_size)
+ return "--- %";
+
+ // Never show 100.0 % before we actually are finished.
+ double percentage = (double)(in_pos) / (double)(expected_in_size)
+ * 99.9;
+
+ static char buf[sizeof("99.9 %")];
snprintf(buf, sizeof(buf), "%.1f %%", percentage);
return buf;
}
-static void
-progress_sizes_helper(char **pos, size_t *left, uint64_t value, bool final)
-{
- // Allow high precision only for the final message, since it looks
- // stupid for in-progress information.
- if (final) {
- // At maximum of four digits is allowed for exact byte count.
- if (value < 10000) {
- my_snprintf(pos, left, "%s B",
- uint64_to_str(value, 0));
- return;
- }
-
- // At maximum of five significant digits is allowed for KiB.
- if (value < UINT64_C(10239900)) {
- my_snprintf(pos, left, "%s KiB", double_to_str(
- (double)(value) / 1024.0));
- return;
- }
- }
-
- // Otherwise we use MiB.
- my_snprintf(pos, left, "%s MiB",
- double_to_str((double)(value) / (1024.0 * 1024.0)));
-
- return;
-}
-
-
/// Make the string containing the amount of input processed, amount of
/// output produced, and the compression ratio.
static const char *
@@ -393,16 +337,19 @@ progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
// separator is used, or about 1 PiB without thousand separator.
// After that the progress indicator will look a bit silly, since
// the compression ratio no longer fits with three decimal places.
- static char buf[44];
+ static char buf[36];
char *pos = buf;
size_t left = sizeof(buf);
// Print the sizes. If this the final message, use more reasonable
// units than MiB if the file was small.
- progress_sizes_helper(&pos, &left, compressed_pos, final);
- my_snprintf(&pos, &left, " / ");
- progress_sizes_helper(&pos, &left, uncompressed_pos, final);
+ const enum nicestr_unit unit_min = final ? NICESTR_B : NICESTR_MIB;
+ my_snprintf(&pos, &left, "%s / %s",
+ uint64_to_nicestr(compressed_pos,
+ unit_min, NICESTR_TIB, false, 0),
+ uint64_to_nicestr(uncompressed_pos,
+ unit_min, NICESTR_TIB, false, 1));
// Avoid division by zero. If we cannot calculate the ratio, set
// it to some nice number greater than 10.0 so that it gets caught
@@ -426,8 +373,8 @@ progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
static const char *
progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
{
- // Don't print the speed immediatelly, since the early values look
- // like somewhat random.
+ // Don't print the speed immediately, since the early values look
+ // somewhat random.
if (elapsed < 3000000)
return "";
@@ -494,13 +441,13 @@ progress_time(uint64_t useconds)
}
-/// Make the string to contain the estimated remaining time, or if the amount
-/// of input isn't known, how much time has elapsed.
+/// Return a string containing estimated remaining time when
+/// reasonably possible.
static const char *
progress_remaining(uint64_t in_pos, uint64_t elapsed)
{
- // Show the amount of time spent so far when making an estimate of
- // remaining time wouldn't be reasonable:
+ // Don't show the estimated remaining time when it wouldn't
+ // make sense:
// - Input size is unknown.
// - Input has grown bigger since we started (de)compressing.
// - We haven't processed much data yet, so estimate would be
@@ -509,7 +456,7 @@ progress_remaining(uint64_t in_pos, uint64_t elapsed)
// so estimate would be too inaccurate.
if (expected_in_size == 0 || in_pos > expected_in_size
|| in_pos < (UINT64_C(1) << 19) || elapsed < 8000000)
- return progress_time(elapsed);
+ return "";
// Calculate the estimate. Don't give an estimate of zero seconds,
// since it is possible that all the input has been already passed
@@ -523,59 +470,58 @@ progress_remaining(uint64_t in_pos, uint64_t elapsed)
// Select appropriate precision for the estimated remaining time.
if (remaining <= 10) {
- // At maximum of 10 seconds remaining.
+ // A maximum of 10 seconds remaining.
// Show the number of seconds as is.
snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
} else if (remaining <= 50) {
- // At maximum of 50 seconds remaining.
+ // A maximum of 50 seconds remaining.
// Round up to the next multiple of five seconds.
remaining = (remaining + 4) / 5 * 5;
snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
} else if (remaining <= 590) {
- // At maximum of 9 minutes and 50 seconds remaining.
+ // A maximum of 9 minutes and 50 seconds remaining.
// Round up to the next multiple of ten seconds.
remaining = (remaining + 9) / 10 * 10;
snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s",
remaining / 60, remaining % 60);
} else if (remaining <= 59 * 60) {
- // At maximum of 59 minutes remaining.
+ // A maximum of 59 minutes remaining.
// Round up to the next multiple of a minute.
remaining = (remaining + 59) / 60;
snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining);
} else if (remaining <= 9 * 3600 + 50 * 60) {
- // At maximum of 9 hours and 50 minutes left.
+ // A maximum of 9 hours and 50 minutes left.
// Round up to the next multiple of ten minutes.
remaining = (remaining + 599) / 600 * 10;
snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min",
remaining / 60, remaining % 60);
} else if (remaining <= 23 * 3600) {
- // At maximum of 23 hours remaining.
+ // A maximum of 23 hours remaining.
// Round up to the next multiple of an hour.
remaining = (remaining + 3599) / 3600;
snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining);
} else if (remaining <= 9 * 24 * 3600 + 23 * 3600) {
- // At maximum of 9 days and 23 hours remaining.
+ // A maximum of 9 days and 23 hours remaining.
// Round up to the next multiple of an hour.
remaining = (remaining + 3599) / 3600;
snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h",
remaining / 24, remaining % 24);
} else if (remaining <= 999 * 24 * 3600) {
- // At maximum of 999 days remaining. ;-)
+ // A maximum of 999 days remaining. ;-)
// Round up to the next multiple of a day.
remaining = (remaining + 24 * 3600 - 1) / (24 * 3600);
snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining);
} else {
- // The estimated remaining time is so big that it's better
- // that we just show the elapsed time.
- return progress_time(elapsed);
+ // The estimated remaining time is too big. Don't show it.
+ return "";
}
return buf;
@@ -636,15 +582,17 @@ message_progress_update(void)
signals_block();
// Print the filename if it hasn't been printed yet.
- print_filename();
+ if (!current_filename_printed)
+ print_filename();
// Print the actual progress message. The idea is that there is at
// least three spaces between the fields in typical situations, but
// even in rare situations there is at least one space.
- fprintf(stderr, " %7s %43s %9s %10s\r",
- progress_percentage(in_pos, false),
+ fprintf(stderr, "\r %6s %35s %9s %10s %10s\r",
+ progress_percentage(in_pos),
progress_sizes(compressed_pos, uncompressed_pos, false),
progress_speed(uncompressed_pos, elapsed),
+ progress_time(elapsed),
progress_remaining(in_pos, elapsed));
#ifdef SIGALRM
@@ -708,7 +656,6 @@ progress_flush(bool finished)
progress_active = false;
const uint64_t elapsed = progress_elapsed();
- const char *elapsed_str = progress_time(elapsed);
signals_block();
@@ -716,24 +663,24 @@ progress_flush(bool finished)
// statistics are printed in the same format as the progress
// indicator itself.
if (progress_automatic) {
- // Using floating point conversion for the percentage instead
- // of static "100.0 %" string, because the decimal separator
- // isn't a dot in all locales.
- fprintf(stderr, " %7s %43s %9s %10s\n",
- progress_percentage(in_pos, finished),
+ fprintf(stderr, "\r %6s %35s %9s %10s %10s\n",
+ finished ? "100 %" : progress_percentage(in_pos),
progress_sizes(compressed_pos, uncompressed_pos, true),
progress_speed(uncompressed_pos, elapsed),
- elapsed_str);
+ progress_time(elapsed),
+ finished ? "" : progress_remaining(in_pos, elapsed));
} else {
// The filename is always printed.
fprintf(stderr, "%s: ", filename);
// Percentage is printed only if we didn't finish yet.
- // FIXME: This may look weird when size of the input
- // isn't known.
- if (!finished)
- fprintf(stderr, "%s, ",
- progress_percentage(in_pos, false));
+ if (!finished) {
+ // Don't print the percentage when it isn't known
+ // (starts with a dash).
+ const char *percentage = progress_percentage(in_pos);
+ if (percentage[0] != '-')
+ fprintf(stderr, "%s, ", percentage);
+ }
// Size information is always printed.
fprintf(stderr, "%s", progress_sizes(
@@ -744,6 +691,7 @@ progress_flush(bool finished)
if (speed[0] != '\0')
fprintf(stderr, ", %s", speed);
+ const char *elapsed_str = progress_time(elapsed);
if (elapsed_str[0] != '\0')
fprintf(stderr, ", %s", elapsed_str);
@@ -774,7 +722,7 @@ vmessage(enum message_verbosity v, const char *fmt, va_list ap)
progress_flush(false);
- fprintf(stderr, "%s: ", argv0);
+ fprintf(stderr, "%s: ", progname);
vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
@@ -830,7 +778,7 @@ message_fatal(const char *fmt, ...)
vmessage(V_ERROR, fmt, ap);
va_end(ap);
- my_exit(E_ERROR);
+ tuklib_exit(E_ERROR, E_ERROR, false);
}
@@ -889,113 +837,206 @@ message_strm(lzma_ret code)
extern void
-message_filters(enum message_verbosity v, const lzma_filter *filters)
+message_mem_needed(enum message_verbosity v, uint64_t memusage)
{
if (v > verbosity)
return;
- fprintf(stderr, _("%s: Filter chain:"), argv0);
+ // Convert memusage to MiB, rounding up to the next full MiB.
+ // This way the user can always use the displayed usage as
+ // the new memory usage limit. (If we rounded to the nearest,
+ // the user might need to +1 MiB to get high enough limit.)
+ memusage = round_up_to_mib(memusage);
+
+ // 2^64 with thousand separators + " MiB" suffix + '\0' = 26 + 4 + 1
+ char memlimitstr[32];
+
+ // Show the memory usage limit as MiB unless it is less than 1 MiB.
+ // This way it's easy to notice errors where one has typed
+ // --memory=123 instead of --memory=123MiB.
+ uint64_t memlimit = hardware_memlimit_get();
+ if (memlimit < (UINT32_C(1) << 20)) {
+ snprintf(memlimitstr, sizeof(memlimitstr), "%s B",
+ uint64_to_str(memlimit, 1));
+ } else {
+ // Round up just like with memusage. If this function is
+ // called for informational purposes (to just show the
+ // current usage and limit), we should never show that
+ // the usage is higher than the limit, which would give
+ // a false impression that the memory usage limit isn't
+ // properly enforced.
+ snprintf(memlimitstr, sizeof(memlimitstr), "%s MiB",
+ uint64_to_str(round_up_to_mib(memlimit), 1));
+ }
- for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
- fprintf(stderr, " --");
+ message(v, _("%s MiB of memory is required. The limit is %s."),
+ uint64_to_str(memusage, 0), memlimitstr);
- switch (filters[i].id) {
- case LZMA_FILTER_LZMA1:
- case LZMA_FILTER_LZMA2: {
- const lzma_options_lzma *opt = filters[i].options;
- const char *mode;
- const char *mf;
+ return;
+}
- switch (opt->mode) {
- case LZMA_MODE_FAST:
- mode = "fast";
- break;
- case LZMA_MODE_NORMAL:
- mode = "normal";
- break;
+/// \brief Convert uint32_t to a nice string for --lzma[12]=dict=SIZE
+///
+/// The idea is to use KiB or MiB suffix when possible.
+static const char *
+uint32_to_optstr(uint32_t num)
+{
+ static char buf[16];
- default:
- mode = "UNKNOWN";
- break;
- }
+ if ((num & ((UINT32_C(1) << 20) - 1)) == 0)
+ snprintf(buf, sizeof(buf), "%" PRIu32 "MiB", num >> 20);
+ else if ((num & ((UINT32_C(1) << 10) - 1)) == 0)
+ snprintf(buf, sizeof(buf), "%" PRIu32 "KiB", num >> 10);
+ else
+ snprintf(buf, sizeof(buf), "%" PRIu32, num);
- switch (opt->mf) {
- case LZMA_MF_HC3:
- mf = "hc3";
- break;
+ return buf;
+}
- case LZMA_MF_HC4:
- mf = "hc4";
- break;
- case LZMA_MF_BT2:
- mf = "bt2";
- break;
+extern const char *
+message_filters_get(const lzma_filter *filters, bool all_known)
+{
+ static char buf[512];
- case LZMA_MF_BT3:
- mf = "bt3";
- break;
+ char *pos = buf;
+ size_t left = sizeof(buf);
- case LZMA_MF_BT4:
- mf = "bt4";
- break;
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ // Add the dashes for the filter option. A space is
+ // needed after the first and later filters.
+ my_snprintf(&pos, &left, "%s", i == 0 ? "--" : " --");
- default:
- mf = "UNKNOWN";
- break;
+ switch (filters[i].id) {
+ case LZMA_FILTER_LZMA1:
+ case LZMA_FILTER_LZMA2: {
+ const lzma_options_lzma *opt = filters[i].options;
+ const char *mode;
+ const char *mf;
+
+ if (all_known) {
+ switch (opt->mode) {
+ case LZMA_MODE_FAST:
+ mode = "fast";
+ break;
+
+ case LZMA_MODE_NORMAL:
+ mode = "normal";
+ break;
+
+ default:
+ mode = "UNKNOWN";
+ break;
+ }
+
+ switch (opt->mf) {
+ case LZMA_MF_HC3:
+ mf = "hc3";
+ break;
+
+ case LZMA_MF_HC4:
+ mf = "hc4";
+ break;
+
+ case LZMA_MF_BT2:
+ mf = "bt2";
+ break;
+
+ case LZMA_MF_BT3:
+ mf = "bt3";
+ break;
+
+ case LZMA_MF_BT4:
+ mf = "bt4";
+ break;
+
+ default:
+ mf = "UNKNOWN";
+ break;
+ }
}
- fprintf(stderr, "lzma%c=dict=%" PRIu32
+ // Add the filter name and dictionary size, which
+ // is always known.
+ my_snprintf(&pos, &left, "lzma%c=dict=%s",
+ filters[i].id == LZMA_FILTER_LZMA2
+ ? '2' : '1',
+ uint32_to_optstr(opt->dict_size));
+
+ // With LZMA1 also lc/lp/pb are known when
+ // decompressing, but this function is never
+ // used to print information about .lzma headers.
+ assert(filters[i].id == LZMA_FILTER_LZMA2
+ || all_known);
+
+ // Print the rest of the options, which are known
+ // only when compressing.
+ if (all_known)
+ my_snprintf(&pos, &left,
",lc=%" PRIu32 ",lp=%" PRIu32
",pb=%" PRIu32
",mode=%s,nice=%" PRIu32 ",mf=%s"
",depth=%" PRIu32,
- filters[i].id == LZMA_FILTER_LZMA2
- ? '2' : '1',
- opt->dict_size,
opt->lc, opt->lp, opt->pb,
mode, opt->nice_len, mf, opt->depth);
break;
}
case LZMA_FILTER_X86:
- fprintf(stderr, "x86");
- break;
-
case LZMA_FILTER_POWERPC:
- fprintf(stderr, "powerpc");
- break;
-
case LZMA_FILTER_IA64:
- fprintf(stderr, "ia64");
- break;
-
case LZMA_FILTER_ARM:
- fprintf(stderr, "arm");
- break;
-
case LZMA_FILTER_ARMTHUMB:
- fprintf(stderr, "armthumb");
- break;
+ case LZMA_FILTER_SPARC: {
+ static const char bcj_names[][9] = {
+ "x86",
+ "powerpc",
+ "ia64",
+ "arm",
+ "armthumb",
+ "sparc",
+ };
+
+ const lzma_options_bcj *opt = filters[i].options;
+ my_snprintf(&pos, &left, "%s", bcj_names[filters[i].id
+ - LZMA_FILTER_X86]);
+
+ // Show the start offset only when really needed.
+ if (opt != NULL && opt->start_offset != 0)
+ my_snprintf(&pos, &left, "=start=%" PRIu32,
+ opt->start_offset);
- case LZMA_FILTER_SPARC:
- fprintf(stderr, "sparc");
break;
+ }
case LZMA_FILTER_DELTA: {
const lzma_options_delta *opt = filters[i].options;
- fprintf(stderr, "delta=dist=%" PRIu32, opt->dist);
+ my_snprintf(&pos, &left, "delta=dist=%" PRIu32,
+ opt->dist);
break;
}
default:
- fprintf(stderr, "UNKNOWN");
+ // This should be possible only if liblzma is
+ // newer than the xz tool.
+ my_snprintf(&pos, &left, "UNKNOWN");
break;
}
}
- fputc('\n', stderr);
+ return buf;
+}
+
+
+extern void
+message_filters_show(enum message_verbosity v, const lzma_filter *filters)
+{
+ if (v > verbosity)
+ return;
+
+ fprintf(stderr, _("%s: Filter chain: %s\n"), progname,
+ message_filters_get(filters, true));
return;
}
@@ -1005,19 +1046,41 @@ message_try_help(void)
{
// Print this with V_WARNING instead of V_ERROR to prevent it from
// showing up when --quiet has been specified.
- message(V_WARNING, _("Try `%s --help' for more information."), argv0);
+ message(V_WARNING, _("Try `%s --help' for more information."),
+ progname);
return;
}
extern void
+message_memlimit(void)
+{
+ if (opt_robot)
+ printf("%" PRIu64 "\n", hardware_memlimit_get());
+ else
+ printf(_("%s MiB (%s bytes)\n"),
+ uint64_to_str(
+ round_up_to_mib(hardware_memlimit_get()), 0),
+ uint64_to_str(hardware_memlimit_get(), 1));
+
+ tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
+}
+
+
+extern void
message_version(void)
{
// It is possible that liblzma version is different than the command
// line tool version, so print both.
- printf("xz (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n");
- printf("liblzma %s\n", lzma_version_string());
- my_exit(E_SUCCESS);
+ if (opt_robot) {
+ printf("XZ_VERSION=%d\nLIBLZMA_VERSION=%d\n",
+ LZMA_VERSION, lzma_version_number());
+ } else {
+ printf("xz (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n");
+ printf("liblzma %s\n", lzma_version_string());
+ }
+
+ tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
}
@@ -1026,7 +1089,7 @@ message_help(bool long_help)
{
printf(_("Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n\n"),
- argv0);
+ progname);
puts(_("Mandatory arguments to long options are mandatory for "
"short options too.\n"));
@@ -1050,6 +1113,7 @@ message_help(bool long_help)
if (long_help)
puts(_(
+" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files=[FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
@@ -1062,7 +1126,7 @@ message_help(bool long_help)
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `crc32', `crc64' (default),\n"
-" or `sha256'"));
+" `sha256', or `none' (use with caution)"));
}
puts(_(
@@ -1074,10 +1138,9 @@ message_help(bool long_help)
" ratio without increasing memory usage of the decoder"));
if (long_help)
- puts(_(
+ puts(_( // xgettext:no-c-format
" -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 indicates\n"
-" the default setting, which depends on the operation mode\n"
-" and the amount of physical memory (RAM)"));
+" the default setting, which is 40 % of total RAM"));
if (long_help) {
puts(_(
@@ -1136,37 +1199,44 @@ message_help(bool long_help)
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"));
- if (long_help)
+ if (long_help) {
puts(_(
" -Q, --no-warn make warnings not affect the exit status"));
-
- if (long_help)
puts(_(
-"\n"
+" --robot use machine-parsable messages (useful for scripts)"));
+ puts("");
+ puts(_(
+" --info-memory display the memory usage limit and exit"));
+ puts(_(
" -h, --help display the short help (lists only the basic options)\n"
-" -H, --long-help display this long help"));
- else
+" -H, --long-help display this long help and exit"));
+ } else {
puts(_(
-" -h, --help display this short help\n"
+" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"));
+ }
puts(_(
-" -V, --version display the version number"));
+" -V, --version display the version number and exit"));
puts(_("\nWith no FILE, or when FILE is -, read standard input.\n"));
if (long_help) {
printf(_(
-"On this system and configuration, this program will use at maximum of roughly\n"
-"%s MiB RAM and "), uint64_to_str(hardware_memlimit_get() / (1024 * 1024), 0));
+"On this system and configuration, this program will use a maximum of roughly\n"
+"%s MiB RAM and "), uint64_to_str(round_up_to_mib(hardware_memlimit_get()), 0));
printf(N_("one thread.\n\n", "%s threads.\n\n",
hardware_threadlimit_get()),
uint64_to_str(hardware_threadlimit_get(), 0));
}
+ // TRANSLATORS: This message indicates the bug reporting address
+ // for this package. Please add _another line_ saying
+ // "Report translation bugs to <...>\n" with the email or WWW
+ // address for translation bugs. Thanks.
printf(_("Report bugs to <%s> (in English or Finnish).\n"),
PACKAGE_BUGREPORT);
- printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_HOMEPAGE);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
- my_exit(E_SUCCESS);
+ tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/message.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.h
index 16e38b757cf..8f011874689 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/message.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/message.h
@@ -22,12 +22,9 @@ enum message_verbosity {
/// \brief Initializes the message functions
///
-/// \param argv0 Name of the program i.e. argv[0] from main()
-/// \param verbosity Verbosity level
-///
/// If an error occurs, this function doesn't return.
///
-extern void message_init(const char *argv0);
+extern void message_init(void);
/// Increase verbosity level by one step unless it was at maximum.
@@ -36,10 +33,8 @@ extern void message_verbosity_increase(void);
/// Decrease verbosity level by one step unless it was at minimum.
extern void message_verbosity_decrease(void);
-
-/// Set the total number of files to be processed (stdin is counted as a file
-/// here). The default is one.
-extern void message_set_files(unsigned int files);
+/// Get the current verbosity level.
+extern enum message_verbosity message_verbosity_get(void);
/// \brief Print a message if verbosity level is at least "verbosity"
@@ -87,8 +82,24 @@ extern void message_signal_handler(void) lzma_attribute((noreturn));
extern const char *message_strm(lzma_ret code);
+/// Display how much memory was needed and how much the limit was.
+extern void message_mem_needed(enum message_verbosity v, uint64_t memusage);
+
+
+/// \brief Get the filter chain as a string
+///
+/// \param filters Pointer to the filter chain
+/// \param all_known If true, all filter options are printed.
+/// If false, only the options that get stored
+/// into .xz headers are printed.
+///
+/// \return Pointer to a statically allocated buffer.
+extern const char *message_filters_get(
+ const lzma_filter *filters, bool all_known);
+
+
/// Print the filter chain.
-extern void message_filters(
+extern void message_filters_show(
enum message_verbosity v, const lzma_filter *filters);
@@ -96,6 +107,10 @@ extern void message_filters(
extern void message_try_help(void);
+/// Print the memory usage limit and exit.
+extern void message_memlimit(void) lzma_attribute((noreturn));
+
+
/// Prints the version number to stdout and exits with exit status SUCCESS.
extern void message_version(void) lzma_attribute((noreturn));
@@ -104,18 +119,34 @@ extern void message_version(void) lzma_attribute((noreturn));
extern void message_help(bool long_help) lzma_attribute((noreturn));
+/// \brief Set the total number of files to be processed
+///
+/// Standard input is counted as a file here. This is used when printing
+/// the filename via message_filename().
+extern void message_set_files(unsigned int files);
+
+
+/// \brief Set the name of the current file and possibly print it too
+///
+/// The name is printed immediately if --list was used or if --verbose
+/// was used and stderr is a terminal. Even when the filename isn't printed,
+/// it is stored so that it can be printed later if needed for progress
+/// messages.
+extern void message_filename(const char *src_name);
+
+
/// \brief Start progress info handling
///
+/// message_filename() must be called before this function to set
+/// the filename.
+///
/// This must be paired with a call to message_progress_end() before the
/// given *strm becomes invalid.
///
/// \param strm Pointer to lzma_stream used for the coding.
-/// \param filename Name of the input file. stdin_filename is
-/// handled specially.
/// \param in_size Size of the input file, or zero if unknown.
///
-extern void message_progress_start(
- lzma_stream *strm, const char *filename, uint64_t in_size);
+extern void message_progress_start(lzma_stream *strm, uint64_t in_size);
/// Update the progress info if in verbose mode and enough time has passed
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/options.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.c
index 8ac6750403f..00b34a83ae1 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/options.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.c
@@ -68,11 +68,9 @@ parse_options(const char *str, const option_map *opts,
char *s = xstrdup(str);
char *name = s;
- while (true) {
+ while (*name != '\0') {
if (*name == ',') {
- if (*++name == '\0')
- break;
-
+ ++name;
continue;
}
@@ -89,47 +87,47 @@ parse_options(const char *str, const option_map *opts,
"pairs separated with commas"), str);
// Look for the option name from the option map.
- bool found = false;
- for (size_t i = 0; opts[i].name != NULL; ++i) {
- if (strcmp(name, opts[i].name) != 0)
- continue;
-
- if (opts[i].map != NULL) {
- // value is a string which we should map
- // to an integer.
- size_t j;
- for (j = 0; opts[i].map[j].name != NULL; ++j) {
- if (strcmp(opts[i].map[j].name, value)
- == 0)
- break;
- }
-
- if (opts[i].map[j].name == NULL)
- message_fatal(_("%s: Invalid option "
- "value"), value);
-
- set(filter_options, i, opts[i].map[j].id,
- value);
+ size_t i = 0;
+ while (true) {
+ if (opts[i].name == NULL)
+ message_fatal(_("%s: Invalid option name"),
+ name);
- } else if (opts[i].min == UINT64_MAX) {
- // value is a special string that will be
- // parsed by set().
- set(filter_options, i, 0, value);
+ if (strcmp(name, opts[i].name) == 0)
+ break;
+
+ ++i;
+ }
- } else {
- // value is an integer.
- const uint64_t v = str_to_uint64(name, value,
- opts[i].min, opts[i].max);
- set(filter_options, i, v, value);
+ // Option was found from the map. See how we should handle it.
+ if (opts[i].map != NULL) {
+ // value is a string which we should map
+ // to an integer.
+ size_t j;
+ for (j = 0; opts[i].map[j].name != NULL; ++j) {
+ if (strcmp(opts[i].map[j].name, value) == 0)
+ break;
}
- found = true;
- break;
- }
+ if (opts[i].map[j].name == NULL)
+ message_fatal(_("%s: Invalid option value"),
+ value);
- if (!found)
- message_fatal(_("%s: Invalid option name"), name);
+ set(filter_options, i, opts[i].map[j].id, value);
+
+ } else if (opts[i].min == UINT64_MAX) {
+ // value is a special string that will be
+ // parsed by set().
+ set(filter_options, i, 0, value);
+
+ } else {
+ // value is an integer.
+ const uint64_t v = str_to_uint64(name, value,
+ opts[i].min, opts[i].max);
+ set(filter_options, i, v, value);
+ }
+ // Check if it was the last option.
if (split == NULL)
break;
@@ -416,7 +414,6 @@ options_lzma(const char *str)
.lc = LZMA_LC_DEFAULT,
.lp = LZMA_LP_DEFAULT,
.pb = LZMA_PB_DEFAULT,
- .persistent = false,
.mode = LZMA_MODE_NORMAL,
.nice_len = 64,
.mf = LZMA_MF_BT4,
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/options.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.h
index e7389c8e99c..e7389c8e99c 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/options.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/options.h
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/private.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/private.h
index 6141b88c416..b543435750d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/private.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/private.h
@@ -22,14 +22,9 @@
#include <stdio.h>
#include <unistd.h>
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# define _(msgid) gettext(msgid)
-# define N_(msgid1, msgid2, n) ngettext(msgid1, msgid2, n)
-#else
-# define _(msgid) (msgid)
-# define N_(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2))
-#endif
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
#ifndef STDIN_FILENO
# define STDIN_FILENO (fileno(stdin))
@@ -53,3 +48,4 @@
#include "signals.h"
#include "suffix.h"
#include "util.h"
+#include "list.h"
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/signals.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.c
index c9acab26a00..b27cd5b52cb 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/signals.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.c
@@ -27,6 +27,11 @@ static volatile sig_atomic_t exit_signal = 0;
/// user_abort to true.
static sigset_t hooked_signals;
+/// True once signals_init() has finished. This is used to skip blocking
+/// signals (with uninitialized hooked_signals) if signals_block() and
+/// signals_unblock() are called before signals_init() has been called.
+static bool signals_are_initialized = false;
+
/// signals_block() and signals_unblock() can be called recursively.
static size_t signals_block_count = 0;
@@ -91,17 +96,22 @@ signals_init(void)
message_signal_handler();
}
+ signals_are_initialized = true;
+
return;
}
+#ifndef __VMS
extern void
signals_block(void)
{
- if (signals_block_count++ == 0) {
- const int saved_errno = errno;
- mythread_sigmask(SIG_BLOCK, &hooked_signals, NULL);
- errno = saved_errno;
+ if (signals_are_initialized) {
+ if (signals_block_count++ == 0) {
+ const int saved_errno = errno;
+ mythread_sigmask(SIG_BLOCK, &hooked_signals, NULL);
+ errno = saved_errno;
+ }
}
return;
@@ -111,16 +121,19 @@ signals_block(void)
extern void
signals_unblock(void)
{
- assert(signals_block_count > 0);
-
- if (--signals_block_count == 0) {
- const int saved_errno = errno;
- mythread_sigmask(SIG_UNBLOCK, &hooked_signals, NULL);
- errno = saved_errno;
+ if (signals_are_initialized) {
+ assert(signals_block_count > 0);
+
+ if (--signals_block_count == 0) {
+ const int saved_errno = errno;
+ mythread_sigmask(SIG_UNBLOCK, &hooked_signals, NULL);
+ errno = saved_errno;
+ }
}
return;
}
+#endif
extern void
@@ -155,6 +168,9 @@ signal_handler(DWORD type lzma_attribute((unused)))
// Since we don't get a signal number which we could raise() at
// signals_exit() like on POSIX, just set the exit status to
// indicate an error, so that we cannot return with zero exit status.
+ //
+ // FIXME: Since this function runs in its own thread,
+ // set_exit_status() should have a mutex.
set_exit_status(E_ERROR);
user_abort = true;
return TRUE;
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/signals.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.h
index 48945b22403..7603d8033f7 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/signals.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/signals.h
@@ -21,8 +21,10 @@ extern volatile sig_atomic_t user_abort;
extern void signals_init(void);
-#ifndef _WIN32
-
+#if defined(_WIN32) || defined(__VMS)
+# define signals_block() do { } while (0)
+# define signals_unblock() do { } while (0)
+#else
/// Block the signals which don't have SA_RESTART and which would just set
/// user_abort to true. This is handy when we don't want to handle EINTR
/// and don't want SA_RESTART either.
@@ -30,15 +32,12 @@ extern void signals_block(void);
/// Unblock the signals blocked by signals_block().
extern void signals_unblock(void);
+#endif
+#ifdef _WIN32
+# define signals_exit() do { } while (0)
+#else
/// If user has sent us a signal earlier to terminate the process,
/// re-raise that signal to actually terminate the process.
extern void signals_exit(void);
-
-#else
-
-#define signals_block() do { } while (0)
-#define signals_unblock() do { } while (0)
-#define signals_exit() do { } while (0)
-
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/suffix.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.c
index f9052832634..f2a2da2749b 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/suffix.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.c
@@ -13,7 +13,7 @@
#include "private.h"
// For case-insensitive filename suffix on case-insensitive systems
-#ifdef DOSLIKE
+#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
# define strcmp strcasecmp
#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/suffix.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.h
index 5537d7324f4..5537d7324f4 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/suffix.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/suffix.h
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.c
new file mode 100644
index 00000000000..deb5dcc2fd3
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.c
@@ -0,0 +1,314 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file util.c
+/// \brief Miscellaneous utility functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include <stdarg.h>
+
+
+extern void *
+xrealloc(void *ptr, size_t size)
+{
+ assert(size > 0);
+
+ ptr = realloc(ptr, size);
+ if (ptr == NULL)
+ message_fatal("%s", strerror(errno));
+
+ return ptr;
+}
+
+
+extern char *
+xstrdup(const char *src)
+{
+ assert(src != NULL);
+ const size_t size = strlen(src) + 1;
+ char *dest = xmalloc(size);
+ return memcpy(dest, src, size);
+}
+
+
+extern uint64_t
+str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
+{
+ uint64_t result = 0;
+
+ // Skip blanks.
+ while (*value == ' ' || *value == '\t')
+ ++value;
+
+ // Accept special value "max". Supporting "min" doesn't seem useful.
+ if (strcmp(value, "max") == 0)
+ return max;
+
+ if (*value < '0' || *value > '9')
+ message_fatal(_("%s: Value is not a non-negative "
+ "decimal integer"), value);
+
+ do {
+ // Don't overflow.
+ if (result > (UINT64_MAX - 9) / 10)
+ goto error;
+
+ result *= 10;
+ result += *value - '0';
+ ++value;
+ } while (*value >= '0' && *value <= '9');
+
+ if (*value != '\0') {
+ // Look for suffix. Originally this supported both base-2
+ // and base-10, but since there seems to be little need
+ // for base-10 in this program, treat everything as base-2
+ // and also be more relaxed about the case of the first
+ // letter of the suffix.
+ uint64_t multiplier = 0;
+ if (*value == 'k' || *value == 'K')
+ multiplier = UINT64_C(1) << 10;
+ else if (*value == 'm' || *value == 'M')
+ multiplier = UINT64_C(1) << 20;
+ else if (*value == 'g' || *value == 'G')
+ multiplier = UINT64_C(1) << 30;
+
+ ++value;
+
+ // Allow also e.g. Ki, KiB, and KB.
+ if (*value != '\0' && strcmp(value, "i") != 0
+ && strcmp(value, "iB") != 0
+ && strcmp(value, "B") != 0)
+ multiplier = 0;
+
+ if (multiplier == 0) {
+ message(V_ERROR, _("%s: Invalid multiplier suffix"),
+ value - 1);
+ message_fatal(_("Valid suffixes are `KiB' (2^10), "
+ "`MiB' (2^20), and `GiB' (2^30)."));
+ }
+
+ // Don't overflow here either.
+ if (result > UINT64_MAX / multiplier)
+ goto error;
+
+ result *= multiplier;
+ }
+
+ if (result < min || result > max)
+ goto error;
+
+ return result;
+
+error:
+ message_fatal(_("Value of the option `%s' must be in the range "
+ "[%" PRIu64 ", %" PRIu64 "]"),
+ name, min, max);
+}
+
+
+extern uint64_t
+round_up_to_mib(uint64_t n)
+{
+ return (n >> 20) + ((n & ((UINT32_C(1) << 20) - 1)) != 0);
+}
+
+
+extern const char *
+uint64_to_str(uint64_t value, uint32_t slot)
+{
+ // 2^64 with thousand separators is 26 bytes plus trailing '\0'.
+ static char bufs[4][32];
+
+ assert(slot < ARRAY_SIZE(bufs));
+
+ static enum { UNKNOWN, WORKS, BROKEN } thousand = UNKNOWN;
+ if (thousand == UNKNOWN) {
+ bufs[slot][0] = '\0';
+ snprintf(bufs[slot], sizeof(bufs[slot]), "%'" PRIu64,
+ UINT64_C(1));
+ thousand = bufs[slot][0] == '1' ? WORKS : BROKEN;
+ }
+
+ if (thousand == WORKS)
+ snprintf(bufs[slot], sizeof(bufs[slot]), "%'" PRIu64, value);
+ else
+ snprintf(bufs[slot], sizeof(bufs[slot]), "%" PRIu64, value);
+
+ return bufs[slot];
+}
+
+
+extern const char *
+uint64_to_nicestr(uint64_t value, enum nicestr_unit unit_min,
+ enum nicestr_unit unit_max, bool always_also_bytes,
+ uint32_t slot)
+{
+ assert(unit_min <= unit_max);
+ assert(unit_max <= NICESTR_TIB);
+
+ enum nicestr_unit unit = NICESTR_B;
+ const char *str;
+
+ if ((unit_min == NICESTR_B && value < 10000)
+ || unit_max == NICESTR_B) {
+ // The value is shown as bytes.
+ str = uint64_to_str(value, slot);
+ } else {
+ // Scale the value to a nicer unit. Unless unit_min and
+ // unit_max limit us, we will show at most five significant
+ // digits with one decimal place.
+ double d = (double)(value);
+ do {
+ d /= 1024.0;
+ ++unit;
+ } while (unit < unit_min || (d > 9999.9 && unit < unit_max));
+
+ str = double_to_str(d);
+ }
+
+ static const char suffix[5][4] = { "B", "KiB", "MiB", "GiB", "TiB" };
+
+ // Minimum buffer size:
+ // 26 2^64 with thousand separators
+ // 4 " KiB"
+ // 2 " ("
+ // 26 2^64 with thousand separators
+ // 3 " B)"
+ // 1 '\0'
+ // 62 Total
+ static char buf[4][64];
+ char *pos = buf[slot];
+ size_t left = sizeof(buf[slot]);
+ my_snprintf(&pos, &left, "%s %s", str, suffix[unit]);
+
+ if (always_also_bytes && value >= 10000)
+ snprintf(pos, left, " (%s B)", uint64_to_str(value, slot));
+
+ return buf[slot];
+}
+
+
+extern const char *
+double_to_str(double value)
+{
+ static char buf[64];
+
+ static enum { UNKNOWN, WORKS, BROKEN } thousand = UNKNOWN;
+ if (thousand == UNKNOWN) {
+ buf[0] = '\0';
+ snprintf(buf, sizeof(buf), "%'.1f", 2.0);
+ thousand = buf[0] == '2' ? WORKS : BROKEN;
+ }
+
+ if (thousand == WORKS)
+ snprintf(buf, sizeof(buf), "%'.1f", value);
+ else
+ snprintf(buf, sizeof(buf), "%.1f", value);
+
+ return buf;
+}
+
+
+extern void
+my_snprintf(char **pos, size_t *left, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ const int len = vsnprintf(*pos, *left, fmt, ap);
+ va_end(ap);
+
+ // If an error occurred, we want the caller to think that the whole
+ // buffer was used. This way no more data will be written to the
+ // buffer. We don't need better error handling here.
+ if (len < 0 || (size_t)(len) >= *left) {
+ *left = 0;
+ } else {
+ *pos += len;
+ *left -= len;
+ }
+
+ return;
+}
+
+
+/*
+/// \brief Simple quoting to get rid of ASCII control characters
+///
+/// This is not so cool and locale-dependent, but should be good enough
+/// At least we don't print any control characters on the terminal.
+///
+extern char *
+str_quote(const char *str)
+{
+ size_t dest_len = 0;
+ bool has_ctrl = false;
+
+ while (str[dest_len] != '\0')
+ if (*(unsigned char *)(str + dest_len++) < 0x20)
+ has_ctrl = true;
+
+ char *dest = malloc(dest_len + 1);
+ if (dest != NULL) {
+ if (has_ctrl) {
+ for (size_t i = 0; i < dest_len; ++i)
+ if (*(unsigned char *)(str + i) < 0x20)
+ dest[i] = '?';
+ else
+ dest[i] = str[i];
+
+ dest[dest_len] = '\0';
+
+ } else {
+ // Usually there are no control characters,
+ // so we can optimize.
+ memcpy(dest, str, dest_len + 1);
+ }
+ }
+
+ return dest;
+}
+*/
+
+
+extern bool
+is_empty_filename(const char *filename)
+{
+ if (filename[0] == '\0') {
+ message_error(_("Empty filename, skipping"));
+ return true;
+ }
+
+ return false;
+}
+
+
+extern bool
+is_tty_stdin(void)
+{
+ const bool ret = isatty(STDIN_FILENO);
+
+ if (ret)
+ message_error(_("Compressed data cannot be read from "
+ "a terminal"));
+
+ return ret;
+}
+
+
+extern bool
+is_tty_stdout(void)
+{
+ const bool ret = isatty(STDOUT_FILENO);
+
+ if (ret)
+ message_error(_("Compressed data cannot be written to "
+ "a terminal"));
+
+ return ret;
+}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/util.h b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.h
index 3657eb80da4..2e08b4a868e 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/util.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/util.h
@@ -41,6 +41,12 @@ extern uint64_t str_to_uint64(const char *name, const char *value,
uint64_t min, uint64_t max);
+/// \brief Round an integer up to the next full MiB and convert to MiB
+///
+/// This is used when printing memory usage and limit.
+extern uint64_t round_up_to_mib(uint64_t n);
+
+
/// \brief Convert uint64_t to a string
///
/// Convert the given value to a string with locale-specific thousand
@@ -54,6 +60,42 @@ extern uint64_t str_to_uint64(const char *name, const char *value,
extern const char *uint64_to_str(uint64_t value, uint32_t slot);
+enum nicestr_unit {
+ NICESTR_B,
+ NICESTR_KIB,
+ NICESTR_MIB,
+ NICESTR_GIB,
+ NICESTR_TIB,
+};
+
+
+/// \brief Convert uint64_t to a nice human readable string
+///
+/// This is like uint64_to_str() but uses B, KiB, MiB, GiB, or TiB suffix
+/// and optionally includes the exact size in parenthesis.
+///
+/// \param value Value to be printed
+/// \param unit_min Smallest unit to use. This and unit_max are used
+/// e.g. when showing the progress indicator to force
+/// the unit to MiB.
+/// \param unit_max Biggest unit to use. assert(unit_min <= unit_max).
+/// \param always_also_bytes
+/// Show also the exact byte value in parenthesis
+/// if the nicely formatted string uses bigger unit
+/// than bytes.
+/// \param slot Which static buffer to use to hold the string.
+/// This is shared with uint64_to_str().
+///
+/// \return Pointer to statically allocated buffer containing the string.
+///
+/// \note This uses double_to_str() internally so the static buffer
+/// in double_to_str() will be overwritten.
+///
+extern const char *uint64_to_nicestr(uint64_t value,
+ enum nicestr_unit unit_min, enum nicestr_unit unit_max,
+ bool always_also_bytes, uint32_t slot);
+
+
/// \brief Convert double to a string with one decimal place
///
/// This is like uint64_to_str() except that this converts a double and
@@ -61,6 +103,14 @@ extern const char *uint64_to_str(uint64_t value, uint32_t slot);
extern const char *double_to_str(double value);
+/// \brief Wrapper for snprintf() to help constructing a string in pieces
+///
+/// A maximum of *left bytes is written starting from *pos. *pos and *left
+/// are updated accordingly.
+extern void my_snprintf(char **pos, size_t *left, const char *fmt, ...)
+ lzma_attribute((format(printf, 3, 4)));
+
+
/// \brief Check if filename is empty and print an error message
extern bool is_empty_filename(const char *filename);
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/xz.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz.1
index 2fef75f43a5..b60353d0e92 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/xz.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz.1
@@ -5,7 +5,7 @@
.\" This file has been put into the public domain.
.\" You can do whatever you want with this file.
.\"
-.TH XZ 1 "2009-08-27" "Tukaani" "XZ Utils"
+.TH XZ 1 "2010-03-07" "Tukaani" "XZ Utils"
.SH NAME
xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
.SH SYNOPSIS
@@ -118,10 +118,10 @@ if any of the following applies:
.IP \(bu 3
.I File
is not a regular file. Symbolic links are not followed, thus they
-are never considered to be regular files.
+are not considered to be regular files.
.IP \(bu 3
.I File
-has more than one hardlink.
+has more than one hard link.
.IP \(bu 3
.I File
has setuid, setgid, or sticky bit set.
@@ -195,9 +195,16 @@ is several gigabytes.
.PP
To prevent uncomfortable surprises caused by huge memory usage,
.B xz
-has a built-in memory usage limiter. The default limit is 40 % of total
-physical RAM. While operating systems provide ways to limit the memory usage
-of processes, relying on it wasn't deemed to be flexible enough.
+has a built-in memory usage limiter. While some operating systems provide
+ways to limit the memory usage of processes, relying on it wasn't deemed
+to be flexible enough. The default limit depends on the total amount of
+physical RAM:
+.IP \(bu 3
+If 40\ % of RAM is at least 80 MiB, 40\ % of RAM is used as the limit.
+.IP \(bu 3
+If 80\ % of RAM is over 80 MiB, 80 MiB is used as the limit.
+.IP \(bu 3
+Otherwise 80\ % of RAM is used as the limit.
.PP
When compressing, if the selected compression settings exceed the memory
usage limit, the settings are automatically adjusted downwards and a notice
@@ -219,10 +226,11 @@ but it is possible that a block later in the file will exceed the memory usage
limit, and an error about too low memory usage limit gets displayed after some
data has already been decompressed.
.PP
-The absolute value of the active memory usage limit can be seen near
-the bottom of the output of
+The absolute value of the active memory usage limit can be seen with
+.B \-\-info-memory
+or near the bottom of the output of
.BR \-\-long\-help .
-The default limit can be overriden with
+The default limit can be overridden with
\fB\-\-memory=\fIlimit\fR.
.SH OPTIONS
.SS "Integer suffixes and special values"
@@ -230,28 +238,36 @@ In most places where an integer argument is expected, an optional suffix
is supported to easily indicate large integers. There must be no space
between the integer and the suffix.
.TP
-.BR k " or " kB
-The integer is multiplied by 1,000 (10^3). For example,
-.B "5k"
-or
-.B "5kB"
-equals
-.BR "5000" .
-.TP
-.BR Ki " or " KiB
-The integer is multiplied by 1,024 (2^10).
-.TP
-.BR M " or " MB
-The integer is multiplied by 1,000,000 (10^6).
-.TP
-.BR Mi " or " MiB
-The integer is multiplied by 1,048,576 (2^20).
+.B KiB
+The integer is multiplied by 1,024 (2^10). Also
+.BR Ki ,
+.BR k ,
+.BR kB ,
+.BR K ,
+and
+.B KB
+are accepted as synonyms for
+.BR KiB .
.TP
-.BR G " or " GB
-The integer is multiplied by 1,000,000,000 (10^9).
+.B MiB
+The integer is multiplied by 1,048,576 (2^20). Also
+.BR Mi ,
+.BR m ,
+.BR M ,
+and
+.B MB
+are accepted as synonyms for
+.BR MiB .
.TP
-.BR Gi " or " GiB
-The integer is multiplied by 1,073,741,824 (2^30).
+.B GiB
+The integer is multiplied by 1,073,741,824 (2^30). Also
+.BR Gi ,
+.BR g ,
+.BR G ,
+and
+.B GB
+are accepted as synonyms for
+.BR GiB .
.PP
A special value
.B max
@@ -297,8 +313,8 @@ This option has several effects:
If the target file already exists, delete it before compressing or
decompressing.
.IP \(bu 3
-Compress or decompress even if the input is not a regular file,
-has more than one hardlink, or has setuid, setgid, or sticky bit set.
+Compress or decompress even if the input is a symbolic link to a regular file,
+has more than one hard link, or has setuid, setgid, or sticky bit set.
The setuid, setgid, and sticky bits are not copied to the target file.
.IP \(bu 3
If combined with
@@ -325,9 +341,6 @@ standard output.
can be used to restrict
.B xz
to decompress only a single file format.
-.IP \(bu 3
-Allow writing compressed data to a terminal, and reading compressed data
-from a terminal.
.RE
.TP
.BR \-c ", " \-\-stdout ", " \-\-to-stdout
@@ -335,6 +348,17 @@ Write the compressed or decompressed data to standard output instead of
a file. This implies
.BR \-\-keep .
.TP
+.B \-\-no\-sparse
+Disable creation of sparse files. By default, if decompressing into
+a regular file,
+.B xz
+tries to make the file sparse if the decompressed data contains long
+sequences of binary zeros. It works also when writing to standard output
+as long as standard output is connected to a regular file, and certain
+additional conditions are met to make it safe. Creating sparse files may
+save disk space and speed up the decompression by reducing the amount of
+disk I/O.
+.TP
\fB\-S\fR \fI.suf\fR, \fB\-\-suffix=\fI.suf
When compressing, use
.I .suf
@@ -369,8 +393,11 @@ Read the filenames to process from
if
.I file
is omitted, filenames are read from standard input. Filenames must be
-terminated with the newline character. If filenames are given also as
-command line arguments, they are processed before the filenames read from
+terminated with the newline character. A dash
+.RB ( \- )
+is taken as a regular filename; it doesn't mean standard input.
+If filenames are given also as command line arguments, they are
+processed before the filenames read from
.IR file .
.TP
\fB\-\-files0\fR[\fB=\fIfile\fR]
@@ -387,10 +414,10 @@ This is the default. When compressing,
.B auto
is equivalent to
.BR xz .
-When decompressing, the format of the input file is autodetected. Note that
-raw streams (created with
+When decompressing, the format of the input file is automatically detected.
+Note that raw streams (created with
.BR \-\-format=raw )
-cannot be autodetected.
+cannot be auto-detected.
.IP \(bu 3
.BR xz :
Compress to the
@@ -556,7 +583,7 @@ increase a little with presets \fB\-0\fR ... \fB\-2\fR). The downside is that
the compression time will increase dramatically (it can easily double).
.TP
\fB\-M\fR \fIlimit\fR, \fB\-\-memory=\fIlimit
-Set the memory usage limit. If this option is specied multiple times,
+Set the memory usage limit. If this option is specified multiple times,
the last one takes effect. The
.I limit
can be specified in multiple ways:
@@ -576,9 +603,11 @@ can be specified as a percentage of physical RAM. Example:
.IP \(bu 3
The
.I limit
-can be reset back to its default value (currently 40 % of physical RAM)
-by setting it to
+can be reset back to its default value by setting it to
.BR 0 .
+See the section
+.B "Memory usage"
+for how the default limit is defined.
.IP \(bu 3
The memory usage limiting can be effectively disabled by setting
.I limit
@@ -996,6 +1025,48 @@ will display a progress indicator.
Specifying
.B \-\-verbose
twice will give even more verbose output (useful mostly for debugging).
+.IP
+The progress indicator shows the following information:
+.RS
+.IP \(bu 3
+Completion percentage is shown if the size of the input file is known.
+That is, percentage cannot be shown in pipes.
+.IP \(bu 3
+Amount of compressed data produced (compressing) or consumed (decompressing).
+.IP \(bu 3
+Amount of uncompressed data consumed (compressing) or produced
+(decompressing).
+.IP \(bu 3
+Compression ratio, which is calculated by dividing the amount of
+compressed data processed so far by the amount of uncompressed data
+processed so far.
+.IP \(bu 3
+Compression or decompression speed. This is measured as the amount of
+uncompressed data consumed (compression) or produced (decompression)
+per second. It is shown once a few seconds have passed since
+.B xz
+started processing the file.
+.IP \(bu 3
+Elapsed time or estimated time remaining.
+Elapsed time is displayed in the format M:SS or H:MM:SS.
+The estimated remaining time is displayed in a less precise format
+which never has colons, for example, 2 min 30 s. The estimate can
+be shown only when the size of the input file is known and a couple of
+seconds have already passed since
+.B xz
+started processing the file.
+.RE
+.IP
+When standard error is not a terminal,
+.B \-\-verbose
+will make
+.B xz
+print the filename, compressed size, uncompressed size, compression ratio,
+speed, and elapsed time on a single line to standard error after
+compressing or decompressing the file. If operating took at least a few
+seconds, also the speed and elapsed time are printed. If the operation
+didn't finish, for example due to user interruption, also the completion
+percentage is printed if the size of the input file is known.
.TP
.BR \-Q ", " \-\-no\-warn
Don't set the exit status to
@@ -1007,6 +1078,34 @@ and
.B \-\-no\-warn
have to be used to not display warnings and to not alter the exit status.
.TP
+.B \-\-robot
+Print messages in a machine-parsable format. This is intended to ease
+writing frontends that want to use
+.B xz
+instead of liblzma, which may be the case with various scripts. The output
+with this option enabled is meant to be stable across
+.B xz
+releases. Currently
+.B \-\-robot
+is implemented only for
+.B \-\-info\-memory
+and
+.BR \-\-version ,
+but the idea is to make it usable for actual compression
+and decompression too.
+.TP
+.BR \-\-info-memory
+Display the current memory usage limit in human-readable format on
+a single line, and exit successfully. To see how much RAM
+.B xz
+thinks your system has, use
+.BR "\-\-memory=100% \-\-info\-memory" .
+To get machine-parsable output
+(memory usage limit as bytes without thousand separators), specify
+.B \-\-robot
+before
+.BR \-\-info-memory .
+.TP
.BR \-h ", " \-\-help
Display a help message describing the most commonly used options,
and exit successfully.
@@ -1019,7 +1118,10 @@ and exit successfully
.BR \-V ", " \-\-version
Display the version number of
.B xz
-and liblzma.
+and liblzma in human readable format. To get machine-parsable output, specify
+.B \-\-robot
+before
+.BR \-\-version .
.SH "EXIT STATUS"
.TP
.B 0
@@ -1175,7 +1277,7 @@ files which have dictionary size of
.RI "2^" n
or
.RI "2^" n " + 2^(" n "\-1)."
-This is to decrease false positives when autodetecting
+This is to decrease false positives when detecting
.B .lzma
files.
.PP
@@ -1202,8 +1304,7 @@ The exact compressed output produced from the same uncompressed input file
may vary between XZ Utils versions even if compression options are identical.
This is because the encoder can be improved (faster or better compression)
without affecting the file format. The output can vary even between different
-builds of the same XZ Utils version, if different build options are used or
-if the endianness of the hardware is different for different builds.
+builds of the same XZ Utils version, if different build options are used.
.PP
The above means that implementing
.B \-\-rsyncable
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/xz_w32res.rc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz_w32res.rc
index bad30202991..bad30202991 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xz/xz_w32res.rc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xz/xz_w32res.rc
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.am
index aaa5b5f6490..ad487721338 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.am
@@ -14,13 +14,17 @@
bin_PROGRAMS = xzdec lzmadec
-xzdec_SOURCES = xzdec.c
+xzdec_SOURCES = \
+ xzdec.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c
if COND_W32
xzdec_SOURCES += xzdec_w32res.rc
endif
xzdec_CPPFLAGS = \
+ -DTUKLIB_GETTEXT=0 \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/liblzma/api \
-I$(top_builddir)/lib \
@@ -35,7 +39,10 @@ endif
xzdec_LDADD += $(LTLIBINTL)
-lzmadec_SOURCES = xzdec.c
+lzmadec_SOURCES = \
+ xzdec.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c
if COND_W32
lzmadec_SOURCES += lzmadec_w32res.rc
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.in
index 4fda1f5c883..5c61984a9b9 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -44,15 +44,18 @@ DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -61,9 +64,13 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am__lzmadec_SOURCES_DIST = xzdec.c lzmadec_w32res.rc
+am__lzmadec_SOURCES_DIST = xzdec.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c lzmadec_w32res.rc
@COND_W32_TRUE@am__objects_1 = lzmadec_w32res.$(OBJEXT)
-am_lzmadec_OBJECTS = lzmadec-xzdec.$(OBJEXT) $(am__objects_1)
+am_lzmadec_OBJECTS = lzmadec-xzdec.$(OBJEXT) \
+ lzmadec-tuklib_progname.$(OBJEXT) \
+ lzmadec-tuklib_exit.$(OBJEXT) $(am__objects_1)
lzmadec_OBJECTS = $(am_lzmadec_OBJECTS)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = $(top_builddir)/src/liblzma/liblzma.la \
@@ -72,9 +79,13 @@ lzmadec_DEPENDENCIES = $(am__DEPENDENCIES_2)
lzmadec_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(lzmadec_LDFLAGS) \
$(LDFLAGS) -o $@
-am__xzdec_SOURCES_DIST = xzdec.c xzdec_w32res.rc
+am__xzdec_SOURCES_DIST = xzdec.c \
+ $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c xzdec_w32res.rc
@COND_W32_TRUE@am__objects_2 = xzdec_w32res.$(OBJEXT)
-am_xzdec_OBJECTS = xzdec-xzdec.$(OBJEXT) $(am__objects_2)
+am_xzdec_OBJECTS = xzdec-xzdec.$(OBJEXT) \
+ xzdec-tuklib_progname.$(OBJEXT) xzdec-tuklib_exit.$(OBJEXT) \
+ $(am__objects_2)
xzdec_OBJECTS = $(am_xzdec_OBJECTS)
xzdec_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
$(am__append_2) $(am__DEPENDENCIES_1)
@@ -175,6 +186,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -192,7 +204,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -271,8 +282,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xz = @xz@
-xzdec_SOURCES = xzdec.c $(am__append_1)
+xzdec_SOURCES = xzdec.c $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c $(am__append_1)
xzdec_CPPFLAGS = \
+ -DTUKLIB_GETTEXT=0 \
-I$(top_srcdir)/src/common \
-I$(top_srcdir)/src/liblzma/api \
-I$(top_builddir)/lib \
@@ -281,7 +294,8 @@ xzdec_CPPFLAGS = \
xzdec_LDFLAGS = $(STATIC_LDFLAGS)
xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la $(am__append_2) \
$(LTLIBINTL)
-lzmadec_SOURCES = xzdec.c $(am__append_3)
+lzmadec_SOURCES = xzdec.c $(top_srcdir)/src/common/tuklib_progname.c \
+ $(top_srcdir)/src/common/tuklib_exit.c $(am__append_3)
lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC
lzmadec_LDFLAGS = $(xzdec_LDFLAGS)
lzmadec_LDADD = $(xzdec_LDADD)
@@ -376,7 +390,11 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-tuklib_exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-tuklib_progname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmadec-xzdec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-tuklib_exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-tuklib_progname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzdec-xzdec.Po@am__quote@
.c.o:
@@ -414,6 +432,34 @@ lzmadec-xzdec.obj: xzdec.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi`
+lzmadec-tuklib_progname.o: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_progname.o -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_progname.Tpo -c -o lzmadec-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmadec-tuklib_progname.Tpo $(DEPDIR)/lzmadec-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='lzmadec-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+
+lzmadec-tuklib_progname.obj: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_progname.Tpo -c -o lzmadec-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmadec-tuklib_progname.Tpo $(DEPDIR)/lzmadec-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='lzmadec-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+
+lzmadec-tuklib_exit.o: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_exit.o -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_exit.Tpo -c -o lzmadec-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmadec-tuklib_exit.Tpo $(DEPDIR)/lzmadec-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='lzmadec-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+
+lzmadec-tuklib_exit.obj: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmadec-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/lzmadec-tuklib_exit.Tpo -c -o lzmadec-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lzmadec-tuklib_exit.Tpo $(DEPDIR)/lzmadec-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='lzmadec-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmadec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmadec-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+
xzdec-xzdec.o: xzdec.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-xzdec.o -MD -MP -MF $(DEPDIR)/xzdec-xzdec.Tpo -c -o xzdec-xzdec.o `test -f 'xzdec.c' || echo '$(srcdir)/'`xzdec.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xzdec-xzdec.Tpo $(DEPDIR)/xzdec-xzdec.Po
@@ -428,6 +474,34 @@ xzdec-xzdec.obj: xzdec.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-xzdec.obj `if test -f 'xzdec.c'; then $(CYGPATH_W) 'xzdec.c'; else $(CYGPATH_W) '$(srcdir)/xzdec.c'; fi`
+xzdec-tuklib_progname.o: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_progname.o -MD -MP -MF $(DEPDIR)/xzdec-tuklib_progname.Tpo -c -o xzdec-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xzdec-tuklib_progname.Tpo $(DEPDIR)/xzdec-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='xzdec-tuklib_progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_progname.o `test -f '$(top_srcdir)/src/common/tuklib_progname.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_progname.c
+
+xzdec-tuklib_progname.obj: $(top_srcdir)/src/common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/xzdec-tuklib_progname.Tpo -c -o xzdec-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xzdec-tuklib_progname.Tpo $(DEPDIR)/xzdec-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_progname.c' object='xzdec-tuklib_progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_progname.obj `if test -f '$(top_srcdir)/src/common/tuklib_progname.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_progname.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_progname.c'; fi`
+
+xzdec-tuklib_exit.o: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_exit.o -MD -MP -MF $(DEPDIR)/xzdec-tuklib_exit.Tpo -c -o xzdec-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xzdec-tuklib_exit.Tpo $(DEPDIR)/xzdec-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='xzdec-tuklib_exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_exit.o `test -f '$(top_srcdir)/src/common/tuklib_exit.c' || echo '$(srcdir)/'`$(top_srcdir)/src/common/tuklib_exit.c
+
+xzdec-tuklib_exit.obj: $(top_srcdir)/src/common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xzdec-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/xzdec-tuklib_exit.Tpo -c -o xzdec-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xzdec-tuklib_exit.Tpo $(DEPDIR)/xzdec-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/common/tuklib_exit.c' object='xzdec-tuklib_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzdec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xzdec-tuklib_exit.obj `if test -f '$(top_srcdir)/src/common/tuklib_exit.c'; then $(CYGPATH_W) '$(top_srcdir)/src/common/tuklib_exit.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/common/tuklib_exit.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/lzmadec_w32res.rc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/lzmadec_w32res.rc
index 7d90e420541..2c71a51ac31 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/lzmadec_w32res.rc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/lzmadec_w32res.rc
@@ -1,5 +1,5 @@
#define MY_TYPE VFT_APP
#define MY_NAME "lzmadec"
#define MY_SUFFIX ".exe"
-#define MY_DESC "lzmadec uncompression tool for .lzma files"
+#define MY_DESC "lzmadec decompression tool for .lzma files"
#include "common_w32res.rc"
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.1 b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.1
index 442a19ece12..3057c586d25 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.1
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.1
@@ -4,7 +4,7 @@
.\" This file has been put into the public domain.
.\" You can do whatever you want with this file.
.\"
-.TH XZDEC 1 "2009-06-04" "Tukaani" "XZ Utils"
+.TH XZDEC 1 "2010-03-07" "Tukaani" "XZ Utils"
.SH NAME
xzdec, lzmadec \- Small .xz and .lzma decompressors
.SH SYNOPSIS
@@ -99,8 +99,7 @@ can be specified as a percentage of physical RAM. Example:
.IP \(bu 3
The
.I limit
-can be reset back to its default value (currently 40 % of physical RAM)
-by setting it to
+can be reset back to its default value by setting it to
.BR 0 .
.IP \(bu 3
The memory usage limiting can be effectively disabled by setting
@@ -163,6 +162,7 @@ for executables distributed in typical non-embedded operating system
distributions. If you need a truly small
.B .xz
decompressor, consider using XZ Embedded.
-.\" TODO: Provide URL to XZ Embedded.
.SH "SEE ALSO"
.BR xz (1)
+.PP
+XZ Embedded: <http://tukaani.org/xz/embedded.html>
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.c b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.c
index e99934f535c..8518d362a2d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec.c
@@ -18,14 +18,15 @@
#include <stdio.h>
#include <unistd.h>
-#ifdef DOSLIKE
+#include "getopt.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+
+#ifdef TUKLIB_DOSLIKE
# include <fcntl.h>
# include <io.h>
#endif
-#include "getopt.h"
-#include "physmem.h"
-
#ifdef LZMADEC
# define TOOL_FORMAT "lzma"
@@ -37,13 +38,13 @@
/// Number of bytes to use memory at maximum
static uint64_t memlimit;
+/// Total amount of physical RAM
+static uint64_t total_ram;
+
/// Error messages are suppressed if this is zero, which is the case when
/// --quiet has been given at least twice.
static unsigned int display_errors = 2;
-/// Program name to be shown in error messages
-static const char *argv0;
-
static void lzma_attribute((format(printf, 1, 2)))
my_errorf(const char *fmt, ...)
@@ -52,7 +53,7 @@ my_errorf(const char *fmt, ...)
va_start(ap, fmt);
if (display_errors) {
- fprintf(stderr, "%s: ", argv0);
+ fprintf(stderr, "%s: ", progname);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
}
@@ -63,31 +64,12 @@ my_errorf(const char *fmt, ...)
static void lzma_attribute((noreturn))
-my_exit(void)
-{
- int status = EXIT_SUCCESS;
-
- // Close stdout. We don't care about stderr, because we write to it
- // only when an error has already occurred.
- const int ferror_err = ferror(stdout);
- const int fclose_err = fclose(stdout);
-
- if (ferror_err || fclose_err) {
- // If it was fclose() that failed, we have the reason
- // in errno. If only ferror() indicated an error,
- // we have no idea what the reason was.
- my_errorf("Writing to standard output failed: %s", fclose_err
- ? strerror(errno) : "Unknown error");
- status = EXIT_FAILURE;
- }
-
- exit(status);
-}
-
-
-static void lzma_attribute((noreturn))
help(void)
{
+ // Round up to the next MiB and do it correctly also with UINT64_MAX.
+ const uint64_t mem_mib = (memlimit >> 20)
+ + ((memlimit & ((UINT32_C(1) << 20) - 1)) != 0);
+
printf(
"Usage: %s [OPTION]... [FILE]...\n"
"Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n"
@@ -103,13 +85,12 @@ help(void)
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
"\n"
-"On this system and configuration, this program will use at maximum of roughly\n"
+"On this system and configuration, this program will use a maximum of roughly\n"
"%" PRIu64 " MiB RAM.\n"
"\n"
"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n"
-PACKAGE_NAME " home page: <" PACKAGE_HOMEPAGE ">\n",
- argv0, memlimit / (1024 * 1024));
- my_exit();
+PACKAGE_NAME " home page: <" PACKAGE_URL ">\n", progname, mem_mib);
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors);
}
@@ -119,7 +100,7 @@ version(void)
printf(TOOL_FORMAT "dec (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n"
"liblzma %s\n", lzma_version_string());
- my_exit();
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors);
}
@@ -128,13 +109,7 @@ version(void)
static void
memlimit_set_percentage(uint32_t percentage)
{
- uint64_t mem = physmem();
-
- // If we cannot determine the amount of RAM, assume 32 MiB.
- if (mem == 0)
- mem = UINT64_C(32) * 1024 * 1024;
-
- memlimit = percentage * mem / 100;
+ memlimit = percentage * total_ram / 100;
return;
}
@@ -144,15 +119,37 @@ memlimit_set_percentage(uint32_t percentage)
static void
memlimit_set(uint64_t new_memlimit)
{
- if (new_memlimit == 0)
- memlimit_set_percentage(40);
- else
+ if (new_memlimit != 0) {
memlimit = new_memlimit;
+ } else {
+ memlimit = 40 * total_ram / 100;
+ if (memlimit < UINT64_C(80) * 1024 * 1024) {
+ memlimit = 80 * total_ram / 100;
+ if (memlimit > UINT64_C(80) * 1024 * 1024)
+ memlimit = UINT64_C(80) * 1024 * 1024;
+ }
+ }
return;
}
+/// Get the total amount of physical RAM and set the memory usage limit
+/// to the default value.
+static void
+memlimit_init(void)
+{
+ // If we cannot determine the amount of RAM, use the assumption
+ // defined by the configure script.
+ total_ram = lzma_physmem();
+ if (total_ram == 0)
+ total_ram = (uint64_t)(ASSUME_RAM) * 1024 * 1024;
+
+ memlimit_set(0);
+ return;
+}
+
+
/// \brief Convert a string to uint64_t
///
/// This is rudely copied from src/xz/util.c and modified a little. :-(
@@ -186,34 +183,24 @@ str_to_uint64(const char *value, uint64_t max)
if (*value != '\0') {
// Look for suffix.
- static const struct {
- const char name[4];
- uint32_t multiplier;
- } suffixes[] = {
- { "k", 1000 },
- { "kB", 1000 },
- { "M", 1000000 },
- { "MB", 1000000 },
- { "G", 1000000000 },
- { "GB", 1000000000 },
- { "Ki", 1024 },
- { "KiB", 1024 },
- { "Mi", 1048576 },
- { "MiB", 1048576 },
- { "Gi", 1073741824 },
- { "GiB", 1073741824 }
- };
-
- uint32_t multiplier = 0;
- for (size_t i = 0; i < ARRAY_SIZE(suffixes); ++i) {
- if (strcmp(value, suffixes[i].name) == 0) {
- multiplier = suffixes[i].multiplier;
- break;
- }
- }
+ uint64_t multiplier = 0;
+ if (*value == 'k' || *value == 'K')
+ multiplier = UINT64_C(1) << 10;
+ else if (*value == 'm' || *value == 'M')
+ multiplier = UINT64_C(1) << 20;
+ else if (*value == 'g' || *value == 'G')
+ multiplier = UINT64_C(1) << 30;
+
+ ++value;
+
+ // Allow also e.g. Ki, KiB, and KB.
+ if (*value != '\0' && strcmp(value, "i") != 0
+ && strcmp(value, "iB") != 0
+ && strcmp(value, "B") != 0)
+ multiplier = 0;
if (multiplier == 0) {
- my_errorf("%s: Invalid suffix", value);
+ my_errorf("%s: Invalid suffix", value - 1);
exit(EXIT_FAILURE);
}
@@ -441,13 +428,12 @@ uncompress(lzma_stream *strm, FILE *file, const char *filename)
int
main(int argc, char **argv)
{
- // Set the argv0 global so that we can print the command name in
- // error and help messages.
- argv0 = argv[0];
+ // Initialize progname which we will be used in error messages.
+ tuklib_progname_init(argv);
// Set the default memory usage limit. This is needed before parsing
// the command line arguments.
- memlimit_set(0);
+ memlimit_init();
// Parse the command line options.
parse_options(argc, argv);
@@ -458,7 +444,7 @@ main(int argc, char **argv)
lzma_stream strm = LZMA_STREAM_INIT;
// Some systems require setting stdin and stdout to binary mode.
-#ifdef DOSLIKE
+#ifdef TUKLIB_DOSLIKE
setmode(fileno(stdin), O_BINARY);
setmode(fileno(stdout), O_BINARY);
#endif
@@ -492,5 +478,5 @@ main(int argc, char **argv)
lzma_end(&strm);
#endif
- my_exit();
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors);
}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec_w32res.rc b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec_w32res.rc
index 626f26cea87..0e26a225b0d 100644
--- a/Build/source/extra/xz-4.999.9beta/src/xzdec/xzdec_w32res.rc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/src/xzdec/xzdec_w32res.rc
@@ -8,5 +8,5 @@
#define MY_TYPE VFT_APP
#define MY_NAME "xzdec"
#define MY_SUFFIX ".exe"
-#define MY_DESC "xzdec uncompression tool for .xz files"
+#define MY_DESC "xzdec decompression tool for .xz files"
#include "common_w32res.rc"
diff --git a/Build/source/extra/xz-4.999.9beta/tests/Makefile.am b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.am
index d01787a37ad..d01787a37ad 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/Makefile.am
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.am
diff --git a/Build/source/extra/xz-4.999.9beta/tests/Makefile.in b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.in
index d4a018ecac3..bd24d70ee44 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/Makefile.in
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -45,15 +45,18 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lc_cpucores.m4 \
- $(top_srcdir)/m4/lc_physmem.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \
+ $(top_srcdir)/m4/tuklib_cpucores.m4 \
+ $(top_srcdir)/m4/tuklib_integer.m4 \
+ $(top_srcdir)/m4/tuklib_physmem.m4 \
+ $(top_srcdir)/m4/tuklib_progname.m4 \
+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -170,6 +173,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN_EXEEXT = @LN_EXEEXT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
@@ -187,7 +191,6 @@ OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_HOMEPAGE = @PACKAGE_HOMEPAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
diff --git a/Build/source/extra/xz-4.999.9beta/tests/bcj_test.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/bcj_test.c
index 05de38a28a3..05de38a28a3 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/bcj_test.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/bcj_test.c
diff --git a/Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_sparc b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_sparc
index 86ea7ddb11b..86ea7ddb11b 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_sparc
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_sparc
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_x86 b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_x86
index bcc546f04cb..bcc546f04cb 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/compress_prepared_bcj_x86
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/compress_prepared_bcj_x86
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/create_compress_files.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/create_compress_files.c
index 44367d8f18e..44367d8f18e 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/create_compress_files.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/create_compress_files.c
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/README b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/README
index 392ff768a90..392ff768a90 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/README
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/README
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-backward_size.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-backward_size.xz
index 2b46fa937b3..2b46fa937b3 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-backward_size.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-backward_size.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-empty-truncated.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-empty-truncated.xz
index f879af84ac4..f879af84ac4 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-empty-truncated.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-empty-truncated.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-footer_magic.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-footer_magic.xz
index 5d9e3894bc2..5d9e3894bc2 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-footer_magic.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-footer_magic.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-header_magic.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-header_magic.xz
index 5984a453bf8..5984a453bf8 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-header_magic.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-header_magic.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-nonempty_index.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-nonempty_index.xz
index ed6e81fa046..ed6e81fa046 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0-nonempty_index.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0-nonempty_index.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-alone.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-alone.xz
index a915a3a1e2b..a915a3a1e2b 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-alone.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-alone.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-header_magic.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-header_magic.xz
index 426bf2d4218..426bf2d4218 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0cat-header_magic.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0cat-header_magic.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0catpad-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0catpad-empty.xz
index 97c13302006..97c13302006 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0catpad-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0catpad-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0pad-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0pad-empty.xz
index 45e00b74a3f..45e00b74a3f 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-0pad-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-0pad-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-1.xz
index d991536aed8..d991536aed8 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-2.xz
index ae42ecf0f9b..ae42ecf0f9b 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-3.xz
index 606cbd20e25..606cbd20e25 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-4.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-4.xz
index e72dfbfc394..e72dfbfc394 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-4.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-4.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-5.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-5.xz
index 96521129267..96521129267 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-block_header-5.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-block_header-5.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc32.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc32.xz
index 1ebe1310b5a..1ebe1310b5a 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc32.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc32.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc64.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc64.xz
index cdb77093db1..cdb77093db1 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-crc64.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-crc64.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-sha256.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-sha256.xz
index def7bff174f..def7bff174f 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-check-sha256.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-check-sha256.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-1.xz
index 640f592e803..640f592e803 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-2.xz
index 69ab07d4577..69ab07d4577 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-3.xz
index 66f48c5d535..66f48c5d535 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-4.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-4.xz
index ac970419399..ac970419399 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-4.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-4.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-5.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-5.xz
index 700464d51ef..700464d51ef 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-5.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-5.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-6.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-6.xz
index 2bda0c4b8b8..2bda0c4b8b8 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-6.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-6.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-7.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-7.xz
index 8cc711c19ed..8cc711c19ed 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-7.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-7.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-8.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-8.xz
index f21a71b63f3..f21a71b63f3 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-lzma2-8.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-lzma2-8.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-1.xz
index 6511773ec69..6511773ec69 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-2.xz
index 0c66b364b0e..0c66b364b0e 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-3.xz
index a9b1f98365f..a9b1f98365f 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-stream_flags-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-stream_flags-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-1.xz
index 6514ab12946..6514ab12946 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-2.xz
index c16941b4083..c16941b4083 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-1-vli-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-1-vli-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-compressed_data_padding.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-compressed_data_padding.xz
index 382d0476700..382d0476700 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-compressed_data_padding.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-compressed_data_padding.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-1.xz
index f51ed214d16..f51ed214d16 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-2.xz
index d7d00ff343f..d7d00ff343f 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-3.xz
index 62428b87223..62428b87223 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-4.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-4.xz
index 9cf2df65da5..9cf2df65da5 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-4.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-4.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-5.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-5.xz
index 0a79270900a..0a79270900a 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/bad-2-index-5.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/bad-2-index-5.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-0-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0-empty.xz
index 83b95e05bc8..83b95e05bc8 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-0-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-0cat-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0cat-empty.xz
index e6fc31461db..e6fc31461db 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-0cat-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0cat-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-0catpad-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0catpad-empty.xz
index 4f86b7d152d..4f86b7d152d 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-0catpad-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0catpad-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-0pad-empty.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0pad-empty.xz
index c51e3a69c0d..c51e3a69c0d 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-0pad-empty.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-0pad-empty.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-3delta-lzma2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-3delta-lzma2.xz
index a0be1d007a2..a0be1d007a2 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-3delta-lzma2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-3delta-lzma2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-1.xz
index fea5ad2f998..fea5ad2f998 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-2.xz
index 6b5dcb347b2..6b5dcb347b2 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-3.xz
index 15653120634..15653120634 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-block_header-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-block_header-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc32.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc32.xz
index 6c89593d447..6c89593d447 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc32.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc32.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc64.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc64.xz
index 5a9915d2f9f..5a9915d2f9f 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-crc64.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-crc64.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-none.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-none.xz
index 1e85faf3d06..1e85faf3d06 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-none.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-none.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-sha256.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-sha256.xz
index fdc556b602c..fdc556b602c 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-check-sha256.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-check-sha256.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-delta-lzma2.tiff.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-delta-lzma2.tiff.xz
index 1f033bc52b5..1f033bc52b5 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-delta-lzma2.tiff.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-delta-lzma2.tiff.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-1.xz
index d8d6489c872..d8d6489c872 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-2.xz
index 7e8cdf1b7d0..7e8cdf1b7d0 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-3.xz
index c4c72be6561..c4c72be6561 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-4.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-4.xz
index e0d623a001c..e0d623a001c 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-lzma2-4.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-lzma2-4.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-sparc-lzma2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-sparc-lzma2.xz
index 4532bc61c1a..4532bc61c1a 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-sparc-lzma2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-sparc-lzma2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-x86-lzma2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-x86-lzma2.xz
index 8053917bad7..8053917bad7 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-1-x86-lzma2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-1-x86-lzma2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/good-2-lzma2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-2-lzma2.xz
index bed5085c1f6..bed5085c1f6 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/good-2-lzma2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/good-2-lzma2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-block_header.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-block_header.xz
index 38304429d91..38304429d91 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-block_header.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-block_header.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-check.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-check.xz
index c28355e7474..c28355e7474 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-check.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-check.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-1.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-1.xz
index 48b93731c52..48b93731c52 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-1.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-1.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-2.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-2.xz
index c283359d562..c283359d562 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-2.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-2.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-3.xz b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-3.xz
index 26084984f97..26084984f97 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/files/unsupported-filter_flags-3.xz
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/files/unsupported-filter_flags-3.xz
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_block_header.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_block_header.c
index a95792eb9dd..3d9b5d93147 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/test_block_header.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_block_header.c
@@ -211,7 +211,7 @@ test3(void)
// Unsupported filter
// NOTE: This may need updating when new IDs become supported.
buf[2] ^= 0x1F;
- integer_write_32(buf + known_options.header_size - 4,
+ unaligned_write32le(buf + known_options.header_size - 4,
lzma_crc32(buf, known_options.header_size - 4, 0));
expect(lzma_block_header_decode(&decoded_options, NULL, buf)
== LZMA_OPTIONS_ERROR);
@@ -219,7 +219,7 @@ test3(void)
// Non-nul Padding
buf[known_options.header_size - 4 - 1] ^= 1;
- integer_write_32(buf + known_options.header_size - 4,
+ unaligned_write32le(buf + known_options.header_size - 4,
lzma_crc32(buf, known_options.header_size - 4, 0));
expect(lzma_block_header_decode(&decoded_options, NULL, buf)
== LZMA_OPTIONS_ERROR);
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_check.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_check.c
index 7d4a36078cf..7d4a36078cf 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/test_check.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_check.c
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_compress.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_compress.sh
index ff0cb304df4..ff0cb304df4 100755
--- a/Build/source/extra/xz-4.999.9beta/tests/test_compress.sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_compress.sh
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_files.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_files.sh
index 7dd9a3901bf..7dd9a3901bf 100755
--- a/Build/source/extra/xz-4.999.9beta/tests/test_files.sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_files.sh
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_filter_flags.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_filter_flags.c
index 808682b57e0..808682b57e0 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/test_filter_flags.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_filter_flags.c
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_index.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_index.c
new file mode 100644
index 00000000000..06b4d6ba99e
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_index.c
@@ -0,0 +1,659 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_index.c
+/// \brief Tests functions handling the lzma_index structure
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tests.h"
+
+#define MEMLIMIT (LZMA_VLI_C(1) << 20)
+
+#define SMALL_COUNT 3
+#define BIG_COUNT 5555
+
+
+static lzma_index *
+create_empty(void)
+{
+ lzma_index *i = lzma_index_init(NULL);
+ expect(i != NULL);
+ return i;
+}
+
+
+static lzma_index *
+create_small(void)
+{
+ lzma_index *i = lzma_index_init(NULL);
+ expect(i != NULL);
+ expect(lzma_index_append(i, NULL, 101, 555) == LZMA_OK);
+ expect(lzma_index_append(i, NULL, 602, 777) == LZMA_OK);
+ expect(lzma_index_append(i, NULL, 804, 999) == LZMA_OK);
+ return i;
+}
+
+
+static lzma_index *
+create_big(void)
+{
+ lzma_index *i = lzma_index_init(NULL);
+ expect(i != NULL);
+
+ lzma_vli total_size = 0;
+ lzma_vli uncompressed_size = 0;
+
+ // Add pseudo-random sizes (but always the same size values).
+ uint32_t n = 11;
+ for (size_t j = 0; j < BIG_COUNT; ++j) {
+ n = 7019 * n + 7607;
+ const uint32_t t = n * 3011;
+ expect(lzma_index_append(i, NULL, t, n) == LZMA_OK);
+ total_size += (t + 3) & ~LZMA_VLI_C(3);
+ uncompressed_size += n;
+ }
+
+ expect(lzma_index_block_count(i) == BIG_COUNT);
+ expect(lzma_index_total_size(i) == total_size);
+ expect(lzma_index_uncompressed_size(i) == uncompressed_size);
+ expect(lzma_index_total_size(i) + lzma_index_size(i)
+ + 2 * LZMA_STREAM_HEADER_SIZE
+ == lzma_index_stream_size(i));
+
+ return i;
+}
+
+
+static bool
+is_equal(const lzma_index *a, const lzma_index *b)
+{
+ // Compare only the Stream and Block sizes and offsets.
+ lzma_index_iter ra, rb;
+ lzma_index_iter_init(&ra, a);
+ lzma_index_iter_init(&rb, b);
+
+ while (true) {
+ bool reta = lzma_index_iter_next(&ra, LZMA_INDEX_ITER_ANY);
+ bool retb = lzma_index_iter_next(&rb, LZMA_INDEX_ITER_ANY);
+ if (reta)
+ return !(reta ^ retb);
+
+ if (ra.stream.number != rb.stream.number
+ || ra.stream.block_count
+ != rb.stream.block_count
+ || ra.stream.compressed_offset
+ != rb.stream.compressed_offset
+ || ra.stream.uncompressed_offset
+ != rb.stream.uncompressed_offset
+ || ra.stream.compressed_size
+ != rb.stream.compressed_size
+ || ra.stream.uncompressed_size
+ != rb.stream.uncompressed_size
+ || ra.stream.padding
+ != rb.stream.padding)
+ return false;
+
+ if (ra.stream.block_count == 0)
+ continue;
+
+ if (ra.block.number_in_file != rb.block.number_in_file
+ || ra.block.compressed_file_offset
+ != rb.block.compressed_file_offset
+ || ra.block.uncompressed_file_offset
+ != rb.block.uncompressed_file_offset
+ || ra.block.number_in_stream
+ != rb.block.number_in_stream
+ || ra.block.compressed_stream_offset
+ != rb.block.compressed_stream_offset
+ || ra.block.uncompressed_stream_offset
+ != rb.block.uncompressed_stream_offset
+ || ra.block.uncompressed_size
+ != rb.block.uncompressed_size
+ || ra.block.unpadded_size
+ != rb.block.unpadded_size
+ || ra.block.total_size
+ != rb.block.total_size)
+ return false;
+ }
+}
+
+
+static void
+test_equal(void)
+{
+ lzma_index *a = create_empty();
+ lzma_index *b = create_small();
+ lzma_index *c = create_big();
+ expect(a && b && c);
+
+ expect(is_equal(a, a));
+ expect(is_equal(b, b));
+ expect(is_equal(c, c));
+
+ expect(!is_equal(a, b));
+ expect(!is_equal(a, c));
+ expect(!is_equal(b, c));
+
+ lzma_index_end(a, NULL);
+ lzma_index_end(b, NULL);
+ lzma_index_end(c, NULL);
+}
+
+
+static void
+test_overflow(void)
+{
+ // Integer overflow tests
+ lzma_index *i = create_empty();
+
+ expect(lzma_index_append(i, NULL, LZMA_VLI_MAX - 5, 1234)
+ == LZMA_DATA_ERROR);
+
+ // TODO
+
+ lzma_index_end(i, NULL);
+}
+
+
+static void
+test_copy(const lzma_index *i)
+{
+ lzma_index *d = lzma_index_dup(i, NULL);
+ expect(d != NULL);
+ expect(is_equal(i, d));
+ lzma_index_end(d, NULL);
+}
+
+
+static void
+test_read(lzma_index *i)
+{
+ lzma_index_iter r;
+ lzma_index_iter_init(&r, i);
+
+ // Try twice so we see that rewinding works.
+ for (size_t j = 0; j < 2; ++j) {
+ lzma_vli total_size = 0;
+ lzma_vli uncompressed_size = 0;
+ lzma_vli stream_offset = LZMA_STREAM_HEADER_SIZE;
+ lzma_vli uncompressed_offset = 0;
+ uint32_t count = 0;
+
+ while (!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)) {
+ ++count;
+
+ total_size += r.block.total_size;
+ uncompressed_size += r.block.uncompressed_size;
+
+ expect(r.block.compressed_file_offset
+ == stream_offset);
+ expect(r.block.uncompressed_file_offset
+ == uncompressed_offset);
+
+ stream_offset += r.block.total_size;
+ uncompressed_offset += r.block.uncompressed_size;
+ }
+
+ expect(lzma_index_total_size(i) == total_size);
+ expect(lzma_index_uncompressed_size(i) == uncompressed_size);
+ expect(lzma_index_block_count(i) == count);
+
+ lzma_index_iter_rewind(&r);
+ }
+}
+
+
+static void
+test_code(lzma_index *i)
+{
+ const size_t alloc_size = 128 * 1024;
+ uint8_t *buf = malloc(alloc_size);
+ expect(buf != NULL);
+
+ // Encode
+ lzma_stream strm = LZMA_STREAM_INIT;
+ expect(lzma_index_encoder(&strm, i) == LZMA_OK);
+ const lzma_vli index_size = lzma_index_size(i);
+ succeed(coder_loop(&strm, NULL, 0, buf, index_size,
+ LZMA_STREAM_END, LZMA_RUN));
+
+ // Decode
+ lzma_index *d;
+ expect(lzma_index_decoder(&strm, &d, MEMLIMIT) == LZMA_OK);
+ expect(d == NULL);
+ succeed(decoder_loop(&strm, buf, index_size));
+
+ expect(is_equal(i, d));
+
+ lzma_index_end(d, NULL);
+ lzma_end(&strm);
+
+ // Decode with hashing
+ lzma_index_hash *h = lzma_index_hash_init(NULL, NULL);
+ expect(h != NULL);
+ lzma_index_iter r;
+ lzma_index_iter_init(&r, i);
+ while (!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK))
+ expect(lzma_index_hash_append(h, r.block.unpadded_size,
+ r.block.uncompressed_size) == LZMA_OK);
+ size_t pos = 0;
+ while (pos < index_size - 1)
+ expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
+ == LZMA_OK);
+ expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
+ == LZMA_STREAM_END);
+
+ lzma_index_hash_end(h, NULL);
+
+ // Encode buffer
+ size_t buf_pos = 1;
+ expect(lzma_index_buffer_encode(i, buf, &buf_pos, index_size)
+ == LZMA_BUF_ERROR);
+ expect(buf_pos == 1);
+
+ succeed(lzma_index_buffer_encode(i, buf, &buf_pos, index_size + 1));
+ expect(buf_pos == index_size + 1);
+
+ // Decode buffer
+ buf_pos = 1;
+ uint64_t memlimit = MEMLIMIT;
+ expect(lzma_index_buffer_decode(&d, &memlimit, NULL, buf, &buf_pos,
+ index_size) == LZMA_DATA_ERROR);
+ expect(buf_pos == 1);
+ expect(d == NULL);
+
+ succeed(lzma_index_buffer_decode(&d, &memlimit, NULL, buf, &buf_pos,
+ index_size + 1));
+ expect(buf_pos == index_size + 1);
+ expect(is_equal(i, d));
+
+ lzma_index_end(d, NULL);
+
+ free(buf);
+}
+
+
+static void
+test_many(lzma_index *i)
+{
+ test_copy(i);
+ test_read(i);
+ test_code(i);
+}
+
+
+static void
+test_cat(void)
+{
+ lzma_index *a, *b, *c;
+ lzma_index_iter r;
+
+ // Empty Indexes
+ a = create_empty();
+ b = create_empty();
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_block_count(a) == 0);
+ expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
+ expect(lzma_index_file_size(a)
+ == 2 * (2 * LZMA_STREAM_HEADER_SIZE + 8));
+ lzma_index_iter_init(&r, a);
+ expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
+
+ b = create_empty();
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_block_count(a) == 0);
+ expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
+ expect(lzma_index_file_size(a)
+ == 3 * (2 * LZMA_STREAM_HEADER_SIZE + 8));
+
+ b = create_empty();
+ c = create_empty();
+ expect(lzma_index_stream_padding(b, 4) == LZMA_OK);
+ expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
+ expect(lzma_index_block_count(b) == 0);
+ expect(lzma_index_stream_size(b) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
+ expect(lzma_index_file_size(b)
+ == 2 * (2 * LZMA_STREAM_HEADER_SIZE + 8) + 4);
+
+ expect(lzma_index_stream_padding(a, 8) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_block_count(a) == 0);
+ expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
+ expect(lzma_index_file_size(a)
+ == 5 * (2 * LZMA_STREAM_HEADER_SIZE + 8) + 4 + 8);
+
+ expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
+ lzma_index_iter_rewind(&r);
+ expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
+ lzma_index_end(a, NULL);
+
+ // Small Indexes
+ a = create_small();
+ lzma_vli stream_size = lzma_index_stream_size(a);
+ lzma_index_iter_init(&r, a);
+ for (int i = SMALL_COUNT; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ b = create_small();
+ expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_file_size(a) == stream_size * 2 + 4);
+ expect(lzma_index_stream_size(a) > stream_size);
+ expect(lzma_index_stream_size(a) < stream_size * 2);
+ for (int i = SMALL_COUNT; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ lzma_index_iter_rewind(&r);
+ for (int i = SMALL_COUNT * 2; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ b = create_small();
+ c = create_small();
+ expect(lzma_index_stream_padding(b, 8) == LZMA_OK);
+ expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
+ expect(lzma_index_stream_padding(a, 12) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
+
+ expect(lzma_index_block_count(a) == SMALL_COUNT * 4);
+ for (int i = SMALL_COUNT * 2; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ lzma_index_iter_rewind(&r);
+ for (int i = SMALL_COUNT * 4; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ lzma_index_end(a, NULL);
+
+ // Mix of empty and small
+ a = create_empty();
+ b = create_small();
+ expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ lzma_index_iter_init(&r, a);
+ for (int i = SMALL_COUNT; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ lzma_index_end(a, NULL);
+
+ // Big Indexes
+ a = create_big();
+ stream_size = lzma_index_stream_size(a);
+ b = create_big();
+ expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_file_size(a) == stream_size * 2 + 4);
+ expect(lzma_index_stream_size(a) > stream_size);
+ expect(lzma_index_stream_size(a) < stream_size * 2);
+
+ b = create_big();
+ c = create_big();
+ expect(lzma_index_stream_padding(b, 8) == LZMA_OK);
+ expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
+ expect(lzma_index_stream_padding(a, 12) == LZMA_OK);
+ expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
+ expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
+
+ lzma_index_iter_init(&r, a);
+ for (int i = BIG_COUNT * 4; i >= 0; --i)
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
+ ^ (i == 0));
+
+ lzma_index_end(a, NULL);
+}
+
+
+static void
+test_locate(void)
+{
+ lzma_index *i = lzma_index_init(NULL);
+ expect(i != NULL);
+ lzma_index_iter r;
+ lzma_index_iter_init(&r, i);
+
+ // Cannot locate anything from an empty Index.
+ expect(lzma_index_iter_locate(&r, 0));
+ expect(lzma_index_iter_locate(&r, 555));
+
+ // One empty Record: nothing is found since there's no uncompressed
+ // data.
+ expect(lzma_index_append(i, NULL, 16, 0) == LZMA_OK);
+ expect(lzma_index_iter_locate(&r, 0));
+
+ // Non-empty Record and we can find something.
+ expect(lzma_index_append(i, NULL, 32, 5) == LZMA_OK);
+ expect(!lzma_index_iter_locate(&r, 0));
+ expect(r.block.total_size == 32);
+ expect(r.block.uncompressed_size == 5);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ // Still cannot find anything past the end.
+ expect(lzma_index_iter_locate(&r, 5));
+
+ // Add the third Record.
+ expect(lzma_index_append(i, NULL, 40, 11) == LZMA_OK);
+
+ expect(!lzma_index_iter_locate(&r, 0));
+ expect(r.block.total_size == 32);
+ expect(r.block.uncompressed_size == 5);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
+ expect(r.block.total_size == 40);
+ expect(r.block.uncompressed_size == 11);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16 + 32);
+ expect(r.block.uncompressed_file_offset == 5);
+
+ expect(!lzma_index_iter_locate(&r, 2));
+ expect(r.block.total_size == 32);
+ expect(r.block.uncompressed_size == 5);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ expect(!lzma_index_iter_locate(&r, 5));
+ expect(r.block.total_size == 40);
+ expect(r.block.uncompressed_size == 11);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16 + 32);
+ expect(r.block.uncompressed_file_offset == 5);
+
+ expect(!lzma_index_iter_locate(&r, 5 + 11 - 1));
+ expect(r.block.total_size == 40);
+ expect(r.block.uncompressed_size == 11);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 16 + 32);
+ expect(r.block.uncompressed_file_offset == 5);
+
+ expect(lzma_index_iter_locate(&r, 5 + 11));
+ expect(lzma_index_iter_locate(&r, 5 + 15));
+
+ // Large Index
+ lzma_index_end(i, NULL);
+ i = lzma_index_init(NULL);
+ expect(i != NULL);
+ lzma_index_iter_init(&r, i);
+
+ for (size_t n = 4; n <= 4 * 5555; n += 4)
+ expect(lzma_index_append(i, NULL, n + 8, n) == LZMA_OK);
+
+ expect(lzma_index_block_count(i) == 5555);
+
+ // First Record
+ expect(!lzma_index_iter_locate(&r, 0));
+ expect(r.block.total_size == 4 + 8);
+ expect(r.block.uncompressed_size == 4);
+ expect(r.block.compressed_file_offset == LZMA_STREAM_HEADER_SIZE);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ expect(!lzma_index_iter_locate(&r, 3));
+ expect(r.block.total_size == 4 + 8);
+ expect(r.block.uncompressed_size == 4);
+ expect(r.block.compressed_file_offset == LZMA_STREAM_HEADER_SIZE);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ // Second Record
+ expect(!lzma_index_iter_locate(&r, 4));
+ expect(r.block.total_size == 2 * 4 + 8);
+ expect(r.block.uncompressed_size == 2 * 4);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + 4 + 8);
+ expect(r.block.uncompressed_file_offset == 4);
+
+ // Last Record
+ expect(!lzma_index_iter_locate(
+ &r, lzma_index_uncompressed_size(i) - 1));
+ expect(r.block.total_size == 4 * 5555 + 8);
+ expect(r.block.uncompressed_size == 4 * 5555);
+ expect(r.block.compressed_file_offset == lzma_index_total_size(i)
+ + LZMA_STREAM_HEADER_SIZE - 4 * 5555 - 8);
+ expect(r.block.uncompressed_file_offset
+ == lzma_index_uncompressed_size(i) - 4 * 5555);
+
+ // Allocation chunk boundaries. See INDEX_GROUP_SIZE in
+ // liblzma/common/index.c.
+ const size_t group_multiple = 256 * 4;
+ const size_t radius = 8;
+ const size_t start = group_multiple - radius;
+ lzma_vli ubase = 0;
+ lzma_vli tbase = 0;
+ size_t n;
+ for (n = 1; n < start; ++n) {
+ ubase += n * 4;
+ tbase += n * 4 + 8;
+ }
+
+ while (n < start + 2 * radius) {
+ expect(!lzma_index_iter_locate(&r, ubase + n * 4));
+
+ expect(r.block.compressed_file_offset == tbase + n * 4 + 8
+ + LZMA_STREAM_HEADER_SIZE);
+ expect(r.block.uncompressed_file_offset == ubase + n * 4);
+
+ tbase += n * 4 + 8;
+ ubase += n * 4;
+ ++n;
+
+ expect(r.block.total_size == n * 4 + 8);
+ expect(r.block.uncompressed_size == n * 4);
+ }
+
+ // Do it also backwards.
+ while (n > start) {
+ expect(!lzma_index_iter_locate(&r, ubase + (n - 1) * 4));
+
+ expect(r.block.total_size == n * 4 + 8);
+ expect(r.block.uncompressed_size == n * 4);
+
+ --n;
+ tbase -= n * 4 + 8;
+ ubase -= n * 4;
+
+ expect(r.block.compressed_file_offset == tbase + n * 4 + 8
+ + LZMA_STREAM_HEADER_SIZE);
+ expect(r.block.uncompressed_file_offset == ubase + n * 4);
+ }
+
+ // Test locating in concatenated Index.
+ lzma_index_end(i, NULL);
+ i = lzma_index_init(NULL);
+ expect(i != NULL);
+ lzma_index_iter_init(&r, i);
+ for (n = 0; n < group_multiple; ++n)
+ expect(lzma_index_append(i, NULL, 8, 0) == LZMA_OK);
+ expect(lzma_index_append(i, NULL, 16, 1) == LZMA_OK);
+ expect(!lzma_index_iter_locate(&r, 0));
+ expect(r.block.total_size == 16);
+ expect(r.block.uncompressed_size == 1);
+ expect(r.block.compressed_file_offset
+ == LZMA_STREAM_HEADER_SIZE + group_multiple * 8);
+ expect(r.block.uncompressed_file_offset == 0);
+
+ lzma_index_end(i, NULL);
+}
+
+
+static void
+test_corrupt(void)
+{
+ const size_t alloc_size = 128 * 1024;
+ uint8_t *buf = malloc(alloc_size);
+ expect(buf != NULL);
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ lzma_index *i = create_empty();
+ expect(lzma_index_append(i, NULL, 0, 1) == LZMA_PROG_ERROR);
+ lzma_index_end(i, NULL);
+
+ // Create a valid Index and corrupt it in different ways.
+ i = create_small();
+ expect(lzma_index_encoder(&strm, i) == LZMA_OK);
+ succeed(coder_loop(&strm, NULL, 0, buf, 20,
+ LZMA_STREAM_END, LZMA_RUN));
+ lzma_index_end(i, NULL);
+
+ // Wrong Index Indicator
+ buf[0] ^= 1;
+ expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
+ succeed(decoder_loop_ret(&strm, buf, 1, LZMA_DATA_ERROR));
+ buf[0] ^= 1;
+
+ // Wrong Number of Records and thus CRC32 fails.
+ --buf[1];
+ expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
+ succeed(decoder_loop_ret(&strm, buf, 10, LZMA_DATA_ERROR));
+ ++buf[1];
+
+ // Padding not NULs
+ buf[15] ^= 1;
+ expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
+ succeed(decoder_loop_ret(&strm, buf, 16, LZMA_DATA_ERROR));
+
+ lzma_end(&strm);
+ free(buf);
+}
+
+
+int
+main(void)
+{
+ test_equal();
+
+ test_overflow();
+
+ lzma_index *i = create_empty();
+ test_many(i);
+ lzma_index_end(i, NULL);
+
+ i = create_small();
+ test_many(i);
+ lzma_index_end(i, NULL);
+
+ i = create_big();
+ test_many(i);
+ lzma_index_end(i, NULL);
+
+ test_cat();
+
+ test_locate();
+
+ test_corrupt();
+
+ return 0;
+}
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_stream_flags.c b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_stream_flags.c
index 9c86c6b860a..9611459e1ba 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/test_stream_flags.c
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/test_stream_flags.c
@@ -133,13 +133,13 @@ test_decode_invalid(void)
// Test 2a (valid CRC32)
uint32_t crc = lzma_crc32(buffer + 6, 2, 0);
- integer_write_32(buffer + 8, crc);
+ unaligned_write32le(buffer + 8, crc);
succeed(test_header_decoder(LZMA_OK));
// Test 2b (invalid Stream Flags with valid CRC32)
buffer[6] ^= 0x20;
crc = lzma_crc32(buffer + 6, 2, 0);
- integer_write_32(buffer + 8, crc);
+ unaligned_write32le(buffer + 8, crc);
succeed(test_header_decoder(LZMA_OPTIONS_ERROR));
// Test 3 (invalid CRC32)
@@ -151,7 +151,7 @@ test_decode_invalid(void)
expect(lzma_stream_footer_encode(&known_flags, buffer) == LZMA_OK);
buffer[9] ^= 0x40;
crc = lzma_crc32(buffer + 4, 6, 0);
- integer_write_32(buffer, crc);
+ unaligned_write32le(buffer, crc);
succeed(test_footer_decoder(LZMA_OPTIONS_ERROR));
// Test 5 (invalid Magic Bytes)
diff --git a/Build/source/extra/xz-4.999.9beta/tests/tests.h b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/tests.h
index 185a6820058..8f3c745d8ec 100644
--- a/Build/source/extra/xz-4.999.9beta/tests/tests.h
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/tests/tests.h
@@ -14,14 +14,14 @@
#define LZMA_TESTS_H
#include "sysdefs.h"
-#include "integer.h"
+#include "tuklib_integer.h"
#include "lzma.h"
#include <stdio.h>
#define memcrap(buf, size) memset(buf, 0xFD, size)
-#define expect(test) ((test) ? 0 : (fprintf(stderr, "%s:%u: %s\n", \
+#define expect(test) ((test) ? 0 : (fprintf(stderr, "%s:%d: %s\n", \
__FILE__, __LINE__, #test), abort(), 0))
#define succeed(test) expect(!(test))
diff --git a/Build/source/extra/xz-4.999.9beta/version.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/version.sh
index 40d04936288..40d04936288 100644
--- a/Build/source/extra/xz-4.999.9beta/version.sh
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/version.sh
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/windows/INSTALL-Windows.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/INSTALL-Windows.txt
new file mode 100644
index 00000000000..b5ac9630b77
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/INSTALL-Windows.txt
@@ -0,0 +1,131 @@
+
+Building XZ Utils on Windows
+============================
+
+Introduction
+------------
+
+ This document explains shortly where to get and how to install the
+ build tool that are needed to build XZ Utils on Windows. The final
+ binary package will be standalone in sense that it will depend only
+ on DLLs that are included in all Windows installations.
+
+ These instructions don't apply to Cygwin. XZ Utils can be built under
+ Cygwin in the same way as many other packages.
+
+ These instructions don't apply to MinGW and MSYS developers either,
+ who may want to package XZ Utils for MinGW or MSYS distributions.
+ You know who you are, and will probably use quite different configure
+ options etc. than what is described here.
+
+
+Installing the toolchain(s)
+---------------------------
+
+ Some of the following is needed:
+ - MSYS is always needed to use the GNU Autotools based build system.
+ - MinGW builds 32-bit x86 binaries.
+ - MingW-w32 builds 32-bit x86 executables too.
+ - MinGW-w64 builds 64-bit x86-64 binaries.
+
+ So you need to pick between MinGW and MinGW-w32 when building
+ 32-bit version. You don't need both.
+
+ You might find 7-Zip <http://7-zip.org/> handy when extracting
+ some files (especially the .tar.lzma files). The ready-made
+ build script will also use 7-Zip to create the distributable
+ .zip and .7z files.
+
+ I used the following directory structure but you can use whatever
+ you want. Just note that I will use these in my examples. Each of
+ these should have a subdirectory "bin":
+
+ C:\devel\tools\msys
+ C:\devel\tools\mingw
+ C:\devel\tools\mingw-w32
+ C:\devel\tools\mingw-w64
+
+
+Installing MSYS
+
+ You can download MSYS from MinGW's Sourceforge page:
+
+ http://sourceforge.net/projects/mingw/files/
+
+ It's under "MSYS Base System". I recommend using MSYS 1.0.11
+ (MSYS-1.0.11.exe or msysCORE-1.0.11-bin.tar.gz) because that
+ package includes all the required tools. At least some of the
+ later versions include only a subset and thus you would need to
+ download the rest separately. The old version will work fine for
+ building XZ Utils.
+
+ You can use either the .exe or .tar.gz package. I prefer .tar.gz,
+ because it can be extracted into any directory and later removed
+ without worrying about uninstallers.
+
+
+Installing MinGW
+
+ You can download the required packages from MinGW's Sourceforge page:
+
+ http://sourceforge.net/projects/mingw/files/
+
+ These version numbers were the latest when I wrote this document, but
+ you probably should pick the latest versions:
+
+ MinGW Runtime -> mingwrt-3.17-mingw32-dev.tar.gz
+ MinGW API for MS-Windows -> w32api-3.14-mingw32-dev.tar.gz
+ GNU Binutils -> binutils-2.20-1-bin.tar.gz
+ GCC Version 4 -> gcc-full-4.4.0-mingw32-bin-2.tar.lzma
+
+ The full GCC package is quite big, but if you want a smaller
+ download, you will need to download more than one file, so I'm
+ using the full package in this document for simplicity.
+
+ Extract the packages in the above order, possibly overwriting files
+ from packages that were extracted earlier.
+
+
+Installing MinGW-w32 or MinGW-w64
+
+ You can find the latest MinGW-w32 and MinGW-w64 builds here:
+
+ http://sourceforge.net/projects/mingw-w64/files/
+
+ Locate the appropriate files:
+
+ Toolchains targeting Win32 -> mingw-w32-*-mingw*.zip
+ Toolchains targeting Win64 -> mingw-w64-*-mingw*.zip
+
+ I don't know what is the most recommended one. I used sezero's
+ versions from "Personal Builds", since they seemed to have
+ a stable GCC (judging from the GCC version number only).
+
+ If you will install both MinGW-w32 and MinGW-w64, remember to
+ extract them into different directories.
+
+
+Building XZ Utils
+-----------------
+
+ Start MSYS by going to the directory C:\devel\tools\msys and running
+ msys.bat there (double-click or use command prompt). It will start
+ at "home" directory, which is C:\devel\tools\msys\home\YourUserName.
+
+ If you have xz-5.x.x.tar.gz in C:\devel, you should be able to build
+ it now with the following commands:
+
+ cd /c/devel
+ tar xzf xz-5.x.x.tar.gz
+ cd xz-5.x.x
+ sh windows/build.sh
+
+ If you used some other directory than C:\devel\tools for the build
+ tools, edit the variables near the beginning of build.sh first.
+
+ If you want to build manually, read the buildit() function in
+ build.sh. Look especially at the latter configure invocation.
+
+ Be patient. Running configure and other scripts used by the build
+ system is (very) slow under Windows.
+
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/windows/README-Windows.txt b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/README-Windows.txt
new file mode 100644
index 00000000000..536d08f51f9
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/README-Windows.txt
@@ -0,0 +1,115 @@
+
+XZ Utils for Windows
+====================
+
+Introduction
+------------
+
+ This package includes command line tools (xz.exe and a few others)
+ and the liblzma compression library from XZ Utils. You can find the
+ latest version and full source code from <http://tukaani.org/xz/>.
+
+ The parts of the XZ Utils source code, that are relevant to this
+ binary package, are in the public domain. XZ Utils have been built
+ for this package with MinGW and linked statically against the MinGW
+ runtime and w32api packages.
+
+ FIXME: Add license info about MinGW runtime and w32api.
+
+
+Package contents
+----------------
+
+ All executables and libraries in this package require msvcrt.dll.
+ It's included in all recent Windows versions. On Windows 95 it
+ might be missing, but once you get it somewhere, XZ Utils should
+ run even on Windows 95.
+
+ There are two different versions of the executable and library files.
+ There is one directory for each type of binaries:
+
+ bin_i486 32-bit x86 (i486 and up), Windows 95 and later
+ bin_x86-64 64-bit x86-64, Windows XP and later
+
+ Each of the above directories have the following files:
+
+ *.exe Command line tools. (It's useless to double-click
+ these; use the command prompt instead.) These have
+ been linked statically against liblzma, so they
+ don't require liblzma.dll. Thus, you can copy e.g.
+ xz.exe to a directory that is in PATH without copying
+ any other files from this package.
+
+ liblzma.dll Shared version of the liblzma compression library.
+ This file is mostly useful to developers, although
+ some non-developers might use it to upgrade their
+ copy of liblzma.
+
+ liblzma.a Static version of the liblzma compression library.
+ This file is useful only for developers.
+
+ The rest of the directories contain architecture-independent files:
+
+ doc Documentation in the plain text (TXT) format. The
+ manuals of the command line tools are provided also
+ in the PDF format. liblzma.def is in this directory
+ too.
+
+ include C header files for liblzma. These should be
+ compatible with most C and C++ compilers. If you
+ have problems, try to fix it and send your fixes
+ upstream, or at least report a bug, thanks.
+
+
+Linking against liblzma
+-----------------------
+
+MinGW
+
+ If you use MinGW, linking against liblzma.dll or liblzma.a should
+ be straightforward. You don't need an import library to link
+ against liblzma.dll, and for static linking, you don't need to
+ worry about the LZMA_API_STATIC macro.
+
+ Note that the MinGW distribution includes liblzma. If you are
+ building packages that will be part of the MinGW distribution, you
+ probably should use the version of liblzma shipped in MinGW instead
+ of this package.
+
+
+Microsoft Visual C++
+
+ To link against liblzma.dll, you need to create an import library
+ first. You need the "lib" command from MSVC and liblzma.def from
+ the "doc" directory of this package. Here is the command that works
+ on 32-bit x86:
+
+ lib /def:liblzma.def /out:liblzma.lib /machine:ix86
+
+ On x86-64, the /machine argument has to naturally be changed:
+
+ lib /def:liblzma.def /out:liblzma.lib /machine:x64
+
+ Linking against static liblzma should work too. Rename liblzma.a
+ to e.g. liblzma_static.lib and tell MSVC to link against it. You
+ also need to tell lzma.h to not use __declspec(dllimport) by defining
+ the macro LZMA_API_STATIC. You can do it either in the C/C++ code
+
+ #define LZMA_API_STATIC
+ #include <lzma.h>
+
+ or by adding it to compiler options.
+
+
+Other compilers
+
+ If you are using some other compiler, see its documentation how to
+ create an import library (if it is needed). If it is simple, I
+ might consider including the instructions here.
+
+
+Reporting bugs
+--------------
+
+ Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
+
diff --git a/Build/source/extra/xz-4.999.9beta-124-gb637/windows/build.sh b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/build.sh
new file mode 100644
index 00000000000..3c762dc0c1b
--- /dev/null
+++ b/Build/source/extra/xz-4.999.9beta-124-gb637/windows/build.sh
@@ -0,0 +1,188 @@
+#!/bin/sh
+#
+###############################################################################
+#
+# Build a binary package on Windows with MinGW and MSYS
+#
+# Set the paths where MinGW, Mingw-w32, or MinGW-w64 are installed. If both
+# MinGW and MinGW-w32 are specified, MinGW will be used. If there is no
+# 32-bit or 64-bit compiler at all, it is simply skipped.
+#
+# Optionally, 7-Zip is used to create the final .zip and .7z packages.
+# If you have installed it in the default directory, this script should
+# find it automatically. Otherwise adjust the path manually.
+#
+# If you want to use a cross-compiler e.g. on GNU/Linux, this script won't
+# work out of the box. You need to omit "make check" commands and replace
+# u2d with some other tool to convert newlines from LF to CR+LF. You will
+# also need to pass the --host option to configure.
+#
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+MINGW_DIR=/c/devel/tools/mingw
+MINGW_W32_DIR=/c/devel/tools/mingw-w32
+MINGW_W64_DIR=/c/devel/tools/mingw-w64
+
+for SEVENZ_EXE in "$PROGRAMW6432/7-Zip/7z.exe" "$PROGRAMFILES/7-Zip/7z.exe" \
+ "/c/Program Files/7-Zip/7z.exe"
+do
+ [ -x "$SEVENZ_EXE" ] && break
+done
+
+
+# Abort immediately if something goes wrong.
+set -e
+
+# White spaces in directory names may break things so catch them immediately.
+case $(pwd) in
+ ' ' | ' ' | '
+') echo "Error: White space in the directory name" >&2; exit 1 ;;
+esac
+
+# This script can be run either at the top-level directory of the package
+# or in the same directory containing this script.
+if [ ! -f windows/build.sh ]; then
+ cd ..
+ if [ ! -f windows/build.sh ]; then
+ echo "You are in a wrong directory." >&2
+ exit 1
+ fi
+fi
+
+# Run configure and copy the binaries to the given directory.
+#
+# The first argument is the directory where to copy the binaries.
+# The rest of the arguments are passed to configure.
+buildit()
+{
+ DESTDIR=$1
+ BUILD=$2
+ CFLAGS=$3
+
+ # Clean up if it was already configured.
+ [ -f Makefile ] && make distclean
+
+ # Build the size-optimized binaries. Note that I don't want to
+ # provide size-optimized liblzma (shared nor static), because
+ # that isn't thread-safe now, and depending on bunch of things,
+ # maybe it will never be on Windows (pthreads-win32 helps but
+ # static liblzma might bit a bit tricky with it).
+ ./configure \
+ --prefix= \
+ --disable-nls \
+ --disable-threads \
+ --disable-shared \
+ --enable-small \
+ --build="$BUILD" \
+ CFLAGS="$CFLAGS -Os"
+ make check
+
+ mkdir -pv "$DESTDIR"
+ cp -v src/xzdec/{xz,lzma}dec.exe src/lzmainfo/lzmainfo.exe "$DESTDIR"
+
+ make distclean
+
+ # Build the normal speed-optimized binaries. Note that while
+ # --disable-threads has been documented to make some things
+ # thread-unsafe, it's not actually true with this combination
+ # of configure flags in XZ Utils 5.0.x. Things can (and probably
+ # will) change after 5.0.x, and this script will be updated too.
+ ./configure \
+ --prefix= \
+ --disable-nls \
+ --disable-threads \
+ --enable-dynamic=no \
+ --build="$BUILD" \
+ CFLAGS="$CFLAGS -O2"
+ make check
+
+ cp -v src/xz/xz.exe src/liblzma/.libs/liblzma.a "$DESTDIR"
+ cp -v src/liblzma/.libs/liblzma-*.dll "$DESTDIR/liblzma.dll"
+
+ strip -v "$DESTDIR/"*
+}
+
+# Copy files and convert newlines from LF to CR+LF. Optinally add a suffix
+# to the destination filename.
+#
+# The first argument is the destination directory. The second argument is
+# the suffix to append to the filenames; use empty string if no extra suffix
+# is wanted. The rest of the arguments are actual the filenames.
+txtcp()
+{
+ DESTDIR=$1
+ SUFFIX=$2
+ shift 2
+ for SRCFILE; do
+ DESTFILE="$DESTDIR/${SRCFILE##*/}$SUFFIX"
+ echo "Converting \`$SRCFILE' -> \`$DESTFILE'"
+ u2d < "$SRCFILE" > "$DESTFILE"
+ done
+}
+
+# FIXME: Make sure that we don't get i686 or i586 code from the runtime.
+# Actually i586 would be fine, but i686 probably not if the idea is to
+# support even Win95.
+#
+# FIXME: Using i486 in the configure triplet may be wrong.
+if [ -d "$MINGW_DIR" ]; then
+ # 32-bit x86, Win95 or later, using MinGW
+ PATH=$MINGW_DIR/bin:$PATH \
+ buildit \
+ pkg/bin_i486 \
+ i486-pc-mingw32 \
+ '-march=i486 -mtune=generic'
+elif [ -d "$MINGW_W32_DIR" ]; then
+ # 32-bit x86, Win95 or later, using MinGW-w32
+ PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \
+ buildit \
+ pkg/bin_i486 \
+ i486-w64-mingw32 \
+ '-march=i486 -mtune=generic'
+fi
+
+if [ -d "$MINGW_W64_DIR" ]; then
+ # 64-bit x86, WinXP or later, using MinGW-w64
+ PATH=$MINGW_W64_DIR/bin:$MINGW_W64_DIR/x86_64-w64-mingw32/bin:$PATH \
+ buildit \
+ pkg/bin_x86-64 \
+ x86_64-w64-mingw32 \
+ '-march=x86-64 -mtune=generic'
+fi
+
+# Copy the headers, the .def file, and the docs.
+# They are the same for all architectures and builds.
+mkdir -pv pkg/{include/lzma,doc/manuals}
+txtcp pkg/include "" src/liblzma/api/lzma.h
+txtcp pkg/include/lzma "" src/liblzma/api/lzma/*.h
+txtcp pkg/doc "" src/liblzma/liblzma.def
+txtcp pkg/doc .txt AUTHORS COPYING NEWS README THANKS TODO
+txtcp pkg/doc "" doc/*.txt
+txtcp pkg/doc/manuals "" doc/man/txt/{xz,xzdec,lzmainfo}.txt
+cp -v doc/man/pdf-*/{xz,xzdec,lzmainfo}-*.pdf pkg/doc/manuals
+txtcp pkg "" windows/README-Windows.txt
+
+# Create the package. This requires 7z.exe from 7-Zip. If it wasn't found,
+# this step is skipped and you have to zip it yourself.
+VER=$(sh version.sh)
+cd pkg
+if [ -x "$SEVENZ_EXE" ]; then
+ "$SEVENZ_EXE" a -tzip ../xz-$VER-windows.zip *
+ "$SEVENZ_EXE" a ../xz-$VER-windows.7z *
+else
+ echo
+ echo "NOTE: 7z.exe was not found. xz-$VER-windows.zip"
+ echo " and xz-$VER-windows.7z were not created."
+ echo " You can create them yourself from the pkg directory."
+fi
+
+echo
+echo "Build completed successfully."
+echo
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdf
deleted file mode 100644
index 0b6805432e5..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdf
deleted file mode 100644
index 92e52eec78e..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdf
deleted file mode 100644
index 80aad7a9df2..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdf
deleted file mode 100644
index a6374692f4d..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdf
deleted file mode 100644
index b36a5fdfe6d..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdf
deleted file mode 100644
index 6df9ab66aff..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdf
deleted file mode 100644
index f056c2ee348..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdf
deleted file mode 100644
index 39bc0f0a287..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdf b/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdf
deleted file mode 100644
index dcbd4871228..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdf
+++ /dev/null
Binary files differ
diff --git a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzless.txt b/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzless.txt
deleted file mode 100644
index 2f3dc9fe2c4..00000000000
--- a/Build/source/extra/xz-4.999.9beta/doc/man/txt/xzless.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-XZLESS(1) XZ Utils XZLESS(1)
-
-
-
-NAME
- xzless, lzless - view xz or lzma compressed (text) files
-
-SYNOPSIS
- xzless [file...]
- lzless [file...]
-
-DESCRIPTION
- xzless is a filter that displays pagefulls of uncompressed text from
- compressed file(s) to a terminal. It works on files compressed with
- xz(1) or lzma(1). If no files are given, xzless reads from standard
- input.
-
- xzless uses less(1) as its only pager. Unlike xzmore, the choice of
- pagers is not alterable by an environment variable. Commands are based
- on both more(1) and vi(1), and allow back and forth movement and
- searching. See the less(1) manual for more information.
-
- The command named lzless is provided for backward compatibility with
- LZMA Utils.
-
-ENVIRONMENT
- LESSMETACHARS
- A list of characters special to the shell. Set by xzless unless
- it is already set in the environment.
-
- LESSOPEN
- Set to a command line to invoke the xz(1) decompressor for pre-
- processing the input files to less(1).
-
-SEE ALSO
- less(1), xz(1), xzmore(1), zless(1)
-
-
-
-Tukaani 2009-07-05 XZLESS(1)
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lc_cpucores.m4 b/Build/source/extra/xz-4.999.9beta/m4/lc_cpucores.m4
deleted file mode 100644
index 2fae953ad47..00000000000
--- a/Build/source/extra/xz-4.999.9beta/m4/lc_cpucores.m4
+++ /dev/null
@@ -1,57 +0,0 @@
-dnl ###########################################################################
-dnl
-dnl lc_CPUCORES - Check how to find out the number of online CPU cores
-dnl
-dnl Check how to find out the number of available CPU cores in the system.
-dnl sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
-dnl use sysctl().
-dnl
-dnl ###########################################################################
-dnl
-dnl Author: Lasse Collin
-dnl
-dnl This file has been put into the public domain.
-dnl You can do whatever you want with this file.
-dnl
-dnl ###########################################################################
-AC_DEFUN([lc_CPUCORES], [
-AC_MSG_CHECKING([how to detect the number of available CPU cores])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <unistd.h>
-int
-main(void)
-{
- long i;
- i = sysconf(_SC_NPROCESSORS_ONLN);
- return 0;
-}
-]])], [
- AC_DEFINE([HAVE_CPUCORES_SYSCONF], [1],
- [Define to 1 if the number of available CPU cores can be
- detected with sysconf(_SC_NPROCESSORS_ONLN).])
- AC_MSG_RESULT([sysconf])
-], [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-#include <sys/sysctl.h>
-int
-main(void)
-{
- int name[2] = { CTL_HW, HW_NCPU };
- int cpus;
- size_t cpus_size = sizeof(cpus);
- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
- return 0;
-}
-]])], [
- AC_DEFINE([HAVE_CPUCORES_SYSCTL], [1],
- [Define to 1 if the number of available CPU cores can be
- detected with sysctl().])
- AC_MSG_RESULT([sysctl])
-], [
- AC_MSG_RESULT([unknown])
-])])
-])dnl lc_CPUCORES
diff --git a/Build/source/extra/xz-4.999.9beta/m4/lc_physmem.m4 b/Build/source/extra/xz-4.999.9beta/m4/lc_physmem.m4
deleted file mode 100644
index 78be1362db2..00000000000
--- a/Build/source/extra/xz-4.999.9beta/m4/lc_physmem.m4
+++ /dev/null
@@ -1,84 +0,0 @@
-dnl ###########################################################################
-dnl
-dnl lc_PHYSMEM - Check how to find out the amount of physical memory
-dnl
-dnl - sysconf() gives all the needed info on GNU+Linux and Solaris.
-dnl - BSDs use sysctl().
-dnl - sysinfo() works on Linux/dietlibc and probably on other Linux systems
-dnl whose libc may lack sysconf().
-dnl
-dnl ###########################################################################
-dnl
-dnl Author: Lasse Collin
-dnl
-dnl This file has been put into the public domain.
-dnl You can do whatever you want with this file.
-dnl
-dnl ###########################################################################
-AC_DEFUN([lc_PHYSMEM], [
-AC_MSG_CHECKING([how to detect the amount of physical memory])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <unistd.h>
-int
-main(void)
-{
- long i;
- i = sysconf(_SC_PAGESIZE);
- i = sysconf(_SC_PHYS_PAGES);
- return 0;
-}
-]])], [
- AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
- [Define to 1 if the amount of physical memory can be detected
- with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
- AC_MSG_RESULT([sysconf])
-], [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-#include <sys/sysctl.h>
-int
-main(void)
-{
- int name[2] = { CTL_HW, HW_PHYSMEM };
- unsigned long mem;
- size_t mem_ptr_size = sizeof(mem);
- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
- return 0;
-}
-]])], [
- AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1],
- [Define to 1 if the amount of physical memory can be detected
- with sysctl().])
- AC_MSG_RESULT([sysctl])
-], [
-dnl sysinfo() is Linux-specific. Some non-Linux systems have
-dnl incompatible sysinfo() so we must check $host_os.
-case $host_os in
- linux*)
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <sys/sysinfo.h>
-int
-main(void)
-{
- struct sysinfo si;
- sysinfo(&si);
- return 0;
-}
- ]])], [
- AC_DEFINE([HAVE_PHYSMEM_SYSINFO], [1],
- [Define to 1 if the amount of physical memory
- can be detected with Linux sysinfo().])
- AC_MSG_RESULT([sysinfo])
- ], [
- AC_MSG_RESULT([unknown])
- ])
- ;;
- *)
- AC_MSG_RESULT([unknown])
- ;;
-esac
-])])
-])dnl lc_PHYSMEM
diff --git a/Build/source/extra/xz-4.999.9beta/po/LINGUAS b/Build/source/extra/xz-4.999.9beta/po/LINGUAS
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/Build/source/extra/xz-4.999.9beta/po/LINGUAS
+++ /dev/null
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/bswap.h b/Build/source/extra/xz-4.999.9beta/src/common/bswap.h
deleted file mode 100644
index c8cf125aeb8..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/common/bswap.h
+++ /dev/null
@@ -1,52 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file bswap.h
-/// \brief Byte swapping
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BSWAP_H
-#define LZMA_BSWAP_H
-
-// NOTE: We assume that config.h is already #included.
-
-// At least glibc has byteswap.h which contains inline assembly code for
-// byteswapping. Some systems have byteswap.h but lack one or more of the
-// bswap_xx macros/functions, which is why we check them separately even
-// if byteswap.h is available.
-
-#ifdef HAVE_BYTESWAP_H
-# include <byteswap.h>
-#endif
-
-#ifndef HAVE_BSWAP_16
-# define bswap_16(num) \
- (((num) << 8) | ((num) >> 8))
-#endif
-
-#ifndef HAVE_BSWAP_32
-# define bswap_32(num) \
- ( (((num) << 24) ) \
- | (((num) << 8) & UINT32_C(0x00FF0000)) \
- | (((num) >> 8) & UINT32_C(0x0000FF00)) \
- | (((num) >> 24) ) )
-#endif
-
-#ifndef HAVE_BSWAP_64
-# define bswap_64(num) \
- ( (((num) << 56) ) \
- | (((num) << 40) & UINT64_C(0x00FF000000000000)) \
- | (((num) << 24) & UINT64_C(0x0000FF0000000000)) \
- | (((num) << 8) & UINT64_C(0x000000FF00000000)) \
- | (((num) >> 8) & UINT64_C(0x00000000FF000000)) \
- | (((num) >> 24) & UINT64_C(0x0000000000FF0000)) \
- | (((num) >> 40) & UINT64_C(0x000000000000FF00)) \
- | (((num) >> 56) ) )
-#endif
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/cpucores.h b/Build/source/extra/xz-4.999.9beta/src/common/cpucores.h
deleted file mode 100644
index 704d8a26e54..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/common/cpucores.h
+++ /dev/null
@@ -1,51 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file cpucores.h
-/// \brief Get the number of online CPU cores
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef CPUCORES_H
-#define CPUCORES_H
-
-#if defined(HAVE_CPUCORES_SYSCONF)
-# include <unistd.h>
-
-#elif defined(HAVE_CPUCORES_SYSCTL)
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# ifdef HAVE_SYS_SYSCTL_H
-# include <sys/sysctl.h>
-# endif
-#endif
-
-
-static inline uint32_t
-cpucores(void)
-{
- uint32_t ret = 0;
-
-#if defined(HAVE_CPUCORES_SYSCONF)
- const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
- if (cpus > 0)
- ret = (uint32_t)(cpus);
-
-#elif defined(HAVE_CPUCORES_SYSCTL)
- int name[2] = { CTL_HW, HW_NCPU };
- int cpus;
- size_t cpus_size = sizeof(cpus);
- if (!sysctl(name, &cpus, &cpus_size, NULL, NULL)
- && cpus_size == sizeof(cpus) && cpus > 0)
- ret = (uint32_t)(cpus);
-#endif
-
- return ret;
-}
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/common/integer.h b/Build/source/extra/xz-4.999.9beta/src/common/integer.h
deleted file mode 100644
index 518c2a4e91d..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/common/integer.h
+++ /dev/null
@@ -1,170 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file integer.h
-/// \brief Reading and writing integers from and to buffers
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_INTEGER_H
-#define LZMA_INTEGER_H
-
-// On big endian, we need byte swapping. These macros may be used outside
-// this file, so don't put these inside HAVE_FAST_UNALIGNED_ACCESS.
-#ifdef WORDS_BIGENDIAN
-# include "bswap.h"
-# define integer_le_16(n) bswap_16(n)
-# define integer_le_32(n) bswap_32(n)
-# define integer_le_64(n) bswap_64(n)
-#else
-# define integer_le_16(n) (n)
-# define integer_le_32(n) (n)
-# define integer_le_64(n) (n)
-#endif
-
-
-// I'm aware of AC_CHECK_ALIGNED_ACCESS_REQUIRED from Autoconf archive, but
-// it's not useful here. We don't care if unaligned access is supported,
-// we care if it is fast. Some systems can emulate unaligned access in
-// software, which is horribly slow; we want to use byte-by-byte access on
-// such systems but the Autoconf test would detect such a system as
-// supporting unaligned access.
-//
-// NOTE: HAVE_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
-// 32-bit integer loads and stores. 64-bit integers may or may not work.
-// That's why 64-bit functions are commented out.
-//
-// TODO: Big endian PowerPC supports byte swapping load and store instructions
-// that also allow unaligned access. Inline assembler could be OK for that.
-//
-// Performance of these functions isn't that important until LZMA3, but it
-// doesn't hurt to have these ready already.
-#ifdef HAVE_FAST_UNALIGNED_ACCESS
-
-static inline uint16_t
-integer_read_16(const uint8_t buf[static 2])
-{
- uint16_t ret = *(const uint16_t *)(buf);
- return integer_le_16(ret);
-}
-
-
-static inline uint32_t
-integer_read_32(const uint8_t buf[static 4])
-{
- uint32_t ret = *(const uint32_t *)(buf);
- return integer_le_32(ret);
-}
-
-
-/*
-static inline uint64_t
-integer_read_64(const uint8_t buf[static 8])
-{
- uint64_t ret = *(const uint64_t *)(buf);
- return integer_le_64(ret);
-}
-*/
-
-
-static inline void
-integer_write_16(uint8_t buf[static 2], uint16_t num)
-{
- *(uint16_t *)(buf) = integer_le_16(num);
-}
-
-
-static inline void
-integer_write_32(uint8_t buf[static 4], uint32_t num)
-{
- *(uint32_t *)(buf) = integer_le_32(num);
-}
-
-
-/*
-static inline void
-integer_write_64(uint8_t buf[static 8], uint64_t num)
-{
- *(uint64_t *)(buf) = integer_le_64(num);
-}
-*/
-
-
-#else
-
-static inline uint16_t
-integer_read_16(const uint8_t buf[static 2])
-{
- uint16_t ret = buf[0] | (buf[1] << 8);
- return ret;
-}
-
-
-static inline uint32_t
-integer_read_32(const uint8_t buf[static 4])
-{
- uint32_t ret = buf[0];
- ret |= (uint32_t)(buf[1]) << 8;
- ret |= (uint32_t)(buf[2]) << 16;
- ret |= (uint32_t)(buf[3]) << 24;
- return ret;
-}
-
-
-/*
-static inline uint64_t
-integer_read_64(const uint8_t buf[static 8])
-{
- uint64_t ret = buf[0];
- ret |= (uint64_t)(buf[1]) << 8;
- ret |= (uint64_t)(buf[2]) << 16;
- ret |= (uint64_t)(buf[3]) << 24;
- ret |= (uint64_t)(buf[4]) << 32;
- ret |= (uint64_t)(buf[5]) << 40;
- ret |= (uint64_t)(buf[6]) << 48;
- ret |= (uint64_t)(buf[7]) << 56;
- return ret;
-}
-*/
-
-
-static inline void
-integer_write_16(uint8_t buf[static 2], uint16_t num)
-{
- buf[0] = (uint8_t)(num);
- buf[1] = (uint8_t)(num >> 8);
-}
-
-
-static inline void
-integer_write_32(uint8_t buf[static 4], uint32_t num)
-{
- buf[0] = (uint8_t)(num);
- buf[1] = (uint8_t)(num >> 8);
- buf[2] = (uint8_t)(num >> 16);
- buf[3] = (uint8_t)(num >> 24);
-}
-
-
-/*
-static inline void
-integer_write_64(uint8_t buf[static 8], uint64_t num)
-{
- buf[0] = (uint8_t)(num);
- buf[1] = (uint8_t)(num >> 8);
- buf[2] = (uint8_t)(num >> 16);
- buf[3] = (uint8_t)(num >> 24);
- buf[4] = (uint8_t)(num >> 32);
- buf[5] = (uint8_t)(num >> 40);
- buf[6] = (uint8_t)(num >> 48);
- buf[7] = (uint8_t)(num >> 56);
-}
-*/
-
-#endif
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index.h b/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index.h
deleted file mode 100644
index da9a622aa80..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/api/lzma/index.h
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * \file lzma/index.h
- * \brief Handling of .xz Index lists
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief Opaque data type to hold the Index
- */
-typedef struct lzma_index_s lzma_index;
-
-
-/**
- * \brief Index Record and its location
- */
-typedef struct {
- /**
- * \brief Total encoded size of a Block including Block Padding
- *
- * This value is useful if you need to know the actual size of the
- * Block that the Block decoder will read.
- */
- lzma_vli total_size;
-
- /**
- * \brief Encoded size of a Block excluding Block Padding
- *
- * This value is stored in the Index. When doing random-access
- * reading, you should give this value to the Block decoder along
- * with uncompressed_size.
- */
- lzma_vli unpadded_size;
-
- /**
- * \brief Uncompressed Size of a Block
- */
- lzma_vli uncompressed_size;
-
- /**
- * \brief Compressed offset in the Stream(s)
- *
- * This is the offset of the first byte of the Block, that is,
- * where you need to seek to decode the Block. The offset
- * is relative to the beginning of the Stream, or if there are
- * multiple Indexes combined, relative to the beginning of the
- * first Stream.
- */
- lzma_vli stream_offset;
-
- /**
- * \brief Uncompressed offset
- *
- * When doing random-access reading, it is possible that the target
- * offset is not exactly at Block boundary. One will need to compare
- * the target offset against uncompressed_offset, and possibly decode
- * and throw away some amount of data before reaching the target
- * offset.
- */
- lzma_vli uncompressed_offset;
-
-} lzma_index_record;
-
-
-/**
- * \brief Calculate memory usage for Index with given number of Records
- *
- * On disk, the size of the Index field depends on both the number of Records
- * stored and how big values the Records store (due to variable-length integer
- * encoding). When the Index is kept in lzma_index structure, the memory usage
- * depends only on the number of Records stored in the Index. The size in RAM
- * is almost always a lot bigger than in encoded form on disk.
- *
- * This function calculates an approximate amount of memory needed hold the
- * given number of Records in lzma_index structure. This value may vary
- * between liblzma versions if the internal implementation is modified.
- *
- * If you want to know how much memory an existing lzma_index structure is
- * using, use lzma_index_memusage(lzma_index_count(i)).
- */
-extern LZMA_API(uint64_t) lzma_index_memusage(lzma_vli record_count)
- lzma_nothrow;
-
-
-/**
- * \brief Allocate and initialize a new lzma_index structure
- *
- * If i is NULL, a new lzma_index structure is allocated, initialized,
- * and a pointer to it returned. If allocation fails, NULL is returned.
- *
- * If i is non-NULL, it is reinitialized and the same pointer returned.
- * In this case, return value cannot be NULL or a different pointer than
- * the i that was given as an argument.
- */
-extern LZMA_API(lzma_index *) lzma_index_init(
- lzma_index *i, lzma_allocator *allocator) lzma_nothrow;
-
-
-/**
- * \brief Deallocate the Index
- *
- * If i is NULL, this does nothing.
- */
-extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator)
- lzma_nothrow;
-
-
-/**
- * \brief Add a new Record to an Index
- *
- * \param i Pointer to a lzma_index structure
- * \param allocator Pointer to lzma_allocator, or NULL to
- * use malloc()
- * \param unpadded_size Unpadded Size of a Block. This can be
- * calculated with lzma_block_unpadded_size()
- * after encoding or decoding the Block.
- * \param uncompressed_size Uncompressed Size of a Block. This can be
- * taken directly from lzma_block structure
- * after encoding or decoding the Block.
- *
- * Appending a new Record does not affect the read position.
- *
- * \return - LZMA_OK
- * - LZMA_MEM_ERROR
- * - LZMA_DATA_ERROR: Compressed or uncompressed size of the
- * Stream or size of the Index field would grow too big.
- * - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_append(
- lzma_index *i, lzma_allocator *allocator,
- lzma_vli unpadded_size, lzma_vli uncompressed_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Get the number of Records
- */
-extern LZMA_API(lzma_vli) lzma_index_count(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the size of the Index field as bytes
- *
- * This is needed to verify the Backward Size field in the Stream Footer.
- */
-extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the total size of the Blocks
- *
- * This doesn't include the Stream Header, Stream Footer, Stream Padding,
- * or Index fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the total size of the Stream
- *
- * If multiple Indexes have been combined, this works as if the Blocks
- * were in a single Stream.
- */
-extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the total size of the file
- *
- * When no Indexes have been combined with lzma_index_cat(), this function is
- * identical to lzma_index_stream_size(). If multiple Indexes have been
- * combined, this includes also the headers of each separate Stream and the
- * possible Stream Padding fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the uncompressed size of the Stream
- */
-extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Get the next Record from the Index
- */
-extern LZMA_API(lzma_bool) lzma_index_read(
- lzma_index *i, lzma_index_record *record)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Rewind the Index
- *
- * Rewind the Index so that next call to lzma_index_read() will return the
- * first Record.
- */
-extern LZMA_API(void) lzma_index_rewind(lzma_index *i) lzma_nothrow;
-
-
-/**
- * \brief Locate a Record
- *
- * When the Index is available, it is possible to do random-access reading
- * with granularity of Block size.
- *
- * \param i Pointer to lzma_index structure
- * \param record Pointer to a structure to hold the search results
- * \param target Uncompressed target offset which the caller would
- * like to locate from the Stream
- *
- * If the target is smaller than the uncompressed size of the Stream (can be
- * checked with lzma_index_uncompressed_size()):
- * - Information about the Record containing the requested uncompressed
- * offset is stored into *record.
- * - Read offset will be adjusted so that calling lzma_index_read() can be
- * used to read subsequent Records.
- * - This function returns false.
- *
- * If target is greater than the uncompressed size of the Stream, *record
- * and the read position are not modified, and this function returns true.
- */
-extern LZMA_API(lzma_bool) lzma_index_locate(
- lzma_index *i, lzma_index_record *record, lzma_vli target)
- lzma_nothrow;
-
-
-/**
- * \brief Concatenate Indexes of two Streams
- *
- * Concatenating Indexes is useful when doing random-access reading in
- * multi-Stream .xz file, or when combining multiple Streams into single
- * Stream.
- *
- * \param dest Destination Index after which src is appended
- * \param src Source Index. If this function succeeds, the
- * memory allocated for src is freed or moved to
- * be part of dest.
- * \param allocator Custom memory allocator; can be NULL to use
- * malloc() and free().
- * \param padding Size of the Stream Padding field between Streams.
- * This must be a multiple of four.
- *
- * \return - LZMA_OK: Indexes concatenated successfully. src is now
- * a dangling pointer.
- * - LZMA_DATA_ERROR: *dest would grow too big.
- * - LZMA_MEM_ERROR
- * - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *lzma_restrict dest,
- lzma_index *lzma_restrict src,
- lzma_allocator *allocator, lzma_vli padding)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Duplicate an Index list
- *
- * Makes an identical copy of the Index. Also the read position is copied.
- *
- * \return A copy of the Index, or NULL if memory allocation failed.
- */
-extern LZMA_API(lzma_index *) lzma_index_dup(
- const lzma_index *i, lzma_allocator *allocator)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Compare if two Index lists are identical
- *
- * Read positions are not compared.
- *
- * \return True if *a and *b are equal, false otherwise.
- */
-extern LZMA_API(lzma_bool) lzma_index_equal(
- const lzma_index *a, const lzma_index *b)
- lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief Initialize .xz Index encoder
- *
- * \param strm Pointer to properly prepared lzma_stream
- * \param i Pointer to lzma_index which should be encoded.
- * The read position will be at the end of the Index
- * after lzma_code() has returned LZMA_STREAM_END.
- *
- * The only valid action value for lzma_code() is LZMA_RUN.
- *
- * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
- * - LZMA_MEM_ERROR
- * - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_encoder(lzma_stream *strm, lzma_index *i)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Initialize .xz Index decoder
- *
- * \param strm Pointer to properly prepared lzma_stream
- * \param i Pointer to a pointer that will be made to point
- * to the final decoded Index once lzma_code() has
- * returned LZMA_STREAM_END. That is,
- * lzma_index_decoder() always takes care of
- * allocating a new lzma_index structure, and *i
- * doesn't need to be initialized by the caller.
- * \param memlimit How much memory the resulting Index is allowed
- * to require.
- *
- * The only valid action value for lzma_code() is LZMA_RUN.
- *
- * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
- * - LZMA_MEM_ERROR
- * - LZMA_MEMLIMIT_ERROR
- * - LZMA_PROG_ERROR
- *
- * \note The memory usage limit is checked early in the decoding
- * (within the first dozen input bytes or so). The actual memory
- * is allocated later in smaller pieces. If the memory usage
- * limit is modified with lzma_memlimit_set() after a part
- * of the Index has already been decoded, the new limit may
- * get ignored.
- */
-extern LZMA_API(lzma_ret) lzma_index_decoder(
- lzma_stream *strm, lzma_index **i, uint64_t memlimit)
- lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief Single-call .xz Index encoder
- *
- * \param i Index to be encoded. The read position will be at
- * the end of the Index if encoding succeeds, or at
- * unspecified position in case an error occurs.
- * \param out Beginning of the output buffer
- * \param out_pos The next byte will be written to out[*out_pos].
- * *out_pos is updated only if encoding succeeds.
- * \param out_size Size of the out buffer; the first byte into
- * which no data is written to is out[out_size].
- *
- * \return - LZMA_OK: Encoding was successful.
- * - LZMA_BUF_ERROR: Output buffer is too small. Use
- * lzma_index_size() to find out how much output
- * space is needed.
- * - LZMA_PROG_ERROR
- *
- * \note This function doesn't take allocator argument since all
- * the internal data is allocated on stack.
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_encode(lzma_index *i,
- uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief Single-call .xz Index decoder
- *
- * \param i Pointer to a pointer that will be made to point
- * to the final decoded Index if decoding is
- * successful. That is, lzma_index_buffer_decode()
- * always takes care of allocating a new
- * lzma_index structure, and *i doesn't need to be
- * initialized by the caller.
- * \param memlimit Pointer to how much memory the resulting Index
- * is allowed to require. The value pointed by
- * this pointer is modified if and only if
- * LZMA_MEMLIMIT_ERROR is returned.
- * \param allocator Pointer to lzma_allocator, or NULL to use malloc()
- * \param in Beginning of the input buffer
- * \param in_pos The next byte will be read from in[*in_pos].
- * *in_pos is updated only if decoding succeeds.
- * \param in_size Size of the input buffer; the first byte that
- * won't be read is in[in_size].
- *
- * \return - LZMA_OK: Decoding was successful.
- * - LZMA_MEM_ERROR
- * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
- * The minimum required memlimit value was stored to *memlimit.
- * - LZMA_DATA_ERROR
- * - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
- uint64_t *memlimit, lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size)
- lzma_nothrow;
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/bsr.h b/Build/source/extra/xz-4.999.9beta/src/liblzma/common/bsr.h
deleted file mode 100644
index bef8641fa73..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/bsr.h
+++ /dev/null
@@ -1,60 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file bsr.h
-/// \brief Bit scan reverse
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BSR_H
-#define LZMA_BSR_H
-
-// NOTE: Both input and output variables for lzma_bsr must be uint32_t.
-
-#if defined(__GNUC__) && (defined (HAVE_ASM_X86) || defined(HAVE_ASM_X86_64))
-# define lzma_bsr(dest, n) \
- __asm__("bsrl %1, %0" : "=r" (dest) : "rm" (n))
-
-#else
-# define lzma_bsr(dest, n) dest = lzma_bsr_helper(n)
-
-static inline uint32_t
-lzma_bsr_helper(uint32_t n)
-{
- assert(n != 0);
-
- uint32_t i = 31;
-
- if ((n & UINT32_C(0xFFFF0000)) == 0) {
- n <<= 16;
- i = 15;
- }
-
- if ((n & UINT32_C(0xFF000000)) == 0) {
- n <<= 8;
- i -= 8;
- }
-
- if ((n & UINT32_C(0xF0000000)) == 0) {
- n <<= 4;
- i -= 4;
- }
-
- if ((n & UINT32_C(0xC0000000)) == 0) {
- n <<= 2;
- i -= 2;
- }
-
- if ((n & UINT32_C(0x80000000)) == 0)
- --i;
-
- return i;
-}
-
-#endif
-
-#endif
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder.c b/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder.c
deleted file mode 100644
index 5e2641c99f2..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/easy_encoder.c
+++ /dev/null
@@ -1,80 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file easy_encoder.c
-/// \brief Easy .xz Stream encoder initialization
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-#include "stream_encoder.h"
-
-
-struct lzma_coder_s {
- lzma_next_coder stream_encoder;
- lzma_options_easy opt_easy;
-};
-
-
-static lzma_ret
-easy_encode(lzma_coder *coder, lzma_allocator *allocator,
- const uint8_t *restrict in, size_t *restrict in_pos,
- size_t in_size, uint8_t *restrict out,
- size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
- return coder->stream_encoder.code(
- coder->stream_encoder.coder, allocator,
- in, in_pos, in_size, out, out_pos, out_size, action);
-}
-
-
-static void
-easy_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
- lzma_next_end(&coder->stream_encoder, allocator);
- lzma_free(coder, allocator);
- return;
-}
-
-
-static lzma_ret
-easy_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
- uint32_t preset, lzma_check check)
-{
- lzma_next_coder_init(&easy_encoder_init, next, allocator);
-
- if (next->coder == NULL) {
- next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
- if (next->coder == NULL)
- return LZMA_MEM_ERROR;
-
- next->code = &easy_encode;
- next->end = &easy_encoder_end;
-
- next->coder->stream_encoder = LZMA_NEXT_CODER_INIT;
- }
-
- if (lzma_easy_preset(&next->coder->opt_easy, preset))
- return LZMA_OPTIONS_ERROR;
-
- return lzma_stream_encoder_init(&next->coder->stream_encoder,
- allocator, next->coder->opt_easy.filters, check);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
-{
- lzma_next_strm_init(easy_encoder_init, strm, preset, check);
-
- strm->internal->supported_actions[LZMA_RUN] = true;
- strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
- strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
- strm->internal->supported_actions[LZMA_FINISH] = true;
-
- return LZMA_OK;
-}
diff --git a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.c b/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.c
deleted file mode 100644
index 46d9ff6eb12..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/liblzma/common/index.c
+++ /dev/null
@@ -1,776 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file index.c
-/// \brief Handling of Index
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-
-
-/// Number of Records to allocate at once in the unrolled list.
-#define INDEX_GROUP_SIZE 256
-
-
-typedef struct lzma_index_group_s lzma_index_group;
-struct lzma_index_group_s {
- /// Previous group
- lzma_index_group *prev;
-
- /// Next group
- lzma_index_group *next;
-
- /// Index of the last Record in this group
- size_t last;
-
- /// Unpadded Size fields as special cumulative sum relative to the
- /// beginning of the group. It's special in sense that the previous
- /// value is rounded up the next multiple of four with before
- /// calculating the new value. The total encoded size of the Blocks
- /// in the group is unpadded_sums[last] rounded up to the next
- /// multiple of four.
- ///
- /// For example, if the Unpadded Sizes are 39, 57, and 81, the stored
- /// values are 39, 97 (40 + 57), and 181 (100 + 181). The total
- /// encoded size of these Blocks is 184.
- ///
- /// This encoding is nice from point of view of lzma_index_locate().
- lzma_vli unpadded_sums[INDEX_GROUP_SIZE];
-
- /// Uncompressed Size fields as cumulative sum relative to the
- /// beginning of the group. The uncompressed size of the group is
- /// uncompressed_sums[last].
- lzma_vli uncompressed_sums[INDEX_GROUP_SIZE];
-
- /// True if the Record is padding
- bool paddings[INDEX_GROUP_SIZE];
-};
-
-
-struct lzma_index_s {
- /// Total size of the Blocks and padding
- lzma_vli total_size;
-
- /// Uncompressed size of the Stream
- lzma_vli uncompressed_size;
-
- /// Number of non-padding records. This is needed for Index encoder.
- lzma_vli count;
-
- /// Size of the List of Records field; this is updated every time
- /// a new non-padding Record is added.
- lzma_vli index_list_size;
-
- /// First group of Records
- lzma_index_group *head;
-
- /// Last group of Records
- lzma_index_group *tail;
-
- /// Tracking the read position
- struct {
- /// Group where the current read position is.
- lzma_index_group *group;
-
- /// The most recently read Record in *group
- size_t record;
-
- /// Uncompressed offset of the beginning of *group relative
- /// to the beginning of the Stream
- lzma_vli uncompressed_offset;
-
- /// Compressed offset of the beginning of *group relative
- /// to the beginning of the Stream
- lzma_vli stream_offset;
- } current;
-
- /// Information about earlier Indexes when multiple Indexes have
- /// been combined.
- struct {
- /// Sum of the Record counts of the all but the last Stream.
- lzma_vli count;
-
- /// Sum of the List of Records fields of all but the last
- /// Stream. This is needed when a new Index is concatenated
- /// to this lzma_index structure.
- lzma_vli index_list_size;
-
- /// Total size of all but the last Stream and all Stream
- /// Padding fields.
- lzma_vli streams_size;
- } old;
-};
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_memusage(lzma_vli count)
-{
- if (count > LZMA_VLI_MAX)
- return UINT64_MAX;
-
- return sizeof(lzma_index) + (count + INDEX_GROUP_SIZE - 1)
- / INDEX_GROUP_SIZE * sizeof(lzma_index_group);
-}
-
-
-static void
-free_index_list(lzma_index *i, lzma_allocator *allocator)
-{
- lzma_index_group *g = i->head;
-
- while (g != NULL) {
- lzma_index_group *tmp = g->next;
- lzma_free(g, allocator);
- g = tmp;
- }
-
- return;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_init(lzma_index *i, lzma_allocator *allocator)
-{
- if (i == NULL) {
- i = lzma_alloc(sizeof(lzma_index), allocator);
- if (i == NULL)
- return NULL;
- } else {
- free_index_list(i, allocator);
- }
-
- i->total_size = 0;
- i->uncompressed_size = 0;
- i->count = 0;
- i->index_list_size = 0;
- i->head = NULL;
- i->tail = NULL;
- i->current.group = NULL;
- i->old.count = 0;
- i->old.index_list_size = 0;
- i->old.streams_size = 0;
-
- return i;
-}
-
-
-extern LZMA_API(void)
-lzma_index_end(lzma_index *i, lzma_allocator *allocator)
-{
- if (i != NULL) {
- free_index_list(i, allocator);
- lzma_free(i, allocator);
- }
-
- return;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_count(const lzma_index *i)
-{
- return i->count;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_size(const lzma_index *i)
-{
- return index_size(i->count, i->index_list_size);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_total_size(const lzma_index *i)
-{
- return i->total_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_stream_size(const lzma_index *i)
-{
- // Stream Header + Blocks + Index + Stream Footer
- return LZMA_STREAM_HEADER_SIZE + i->total_size
- + index_size(i->count, i->index_list_size)
- + LZMA_STREAM_HEADER_SIZE;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_file_size(const lzma_index *i)
-{
- // If multiple Streams are concatenated, the Stream Header, Index,
- // and Stream Footer fields of all but the last Stream are already
- // included in old.streams_size. Thus, we need to calculate only the
- // size of the last Index, not all Indexes.
- return i->old.streams_size + LZMA_STREAM_HEADER_SIZE + i->total_size
- + index_size(i->count - i->old.count,
- i->index_list_size - i->old.index_list_size)
- + LZMA_STREAM_HEADER_SIZE;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_uncompressed_size(const lzma_index *i)
-{
- return i->uncompressed_size;
-}
-
-
-extern uint32_t
-lzma_index_padding_size(const lzma_index *i)
-{
- return (LZMA_VLI_C(4)
- - index_size_unpadded(i->count, i->index_list_size)) & 3;
-}
-
-
-/// Appends a new Record to the Index. If needed, this allocates a new
-/// Record group.
-static lzma_ret
-index_append_real(lzma_index *i, lzma_allocator *allocator,
- lzma_vli unpadded_size, lzma_vli uncompressed_size,
- bool is_padding)
-{
- // Add the new record.
- if (i->tail == NULL || i->tail->last == INDEX_GROUP_SIZE - 1) {
- // Allocate a new group.
- lzma_index_group *g = lzma_alloc(sizeof(lzma_index_group),
- allocator);
- if (g == NULL)
- return LZMA_MEM_ERROR;
-
- // Initialize the group and set its first record.
- g->prev = i->tail;
- g->next = NULL;
- g->last = 0;
- g->unpadded_sums[0] = unpadded_size;
- g->uncompressed_sums[0] = uncompressed_size;
- g->paddings[0] = is_padding;
-
- // If this is the first group, make it the head.
- if (i->head == NULL)
- i->head = g;
- else
- i->tail->next = g;
-
- // Make it the new tail.
- i->tail = g;
-
- } else {
- // i->tail has space left for at least one record.
- i->tail->unpadded_sums[i->tail->last + 1]
- = unpadded_size + vli_ceil4(
- i->tail->unpadded_sums[i->tail->last]);
- i->tail->uncompressed_sums[i->tail->last + 1]
- = i->tail->uncompressed_sums[i->tail->last]
- + uncompressed_size;
- i->tail->paddings[i->tail->last + 1] = is_padding;
- ++i->tail->last;
- }
-
- return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_append(lzma_index *i, lzma_allocator *allocator,
- lzma_vli unpadded_size, lzma_vli uncompressed_size)
-{
- if (unpadded_size < UNPADDED_SIZE_MIN
- || unpadded_size > UNPADDED_SIZE_MAX
- || uncompressed_size > LZMA_VLI_MAX)
- return LZMA_PROG_ERROR;
-
- // This looks a bit ugly. We want to first validate that the Index
- // and Stream stay in valid limits after adding this Record. After
- // validating, we may need to allocate a new lzma_index_group (it's
- // slightly more correct to validate before allocating, YMMV).
- lzma_ret ret;
-
- // First update the overall info so we can validate it.
- const lzma_vli index_list_size_add = lzma_vli_size(unpadded_size)
- + lzma_vli_size(uncompressed_size);
-
- const lzma_vli total_size = vli_ceil4(unpadded_size);
-
- i->total_size += total_size;
- i->uncompressed_size += uncompressed_size;
- ++i->count;
- i->index_list_size += index_list_size_add;
-
- if (i->total_size > LZMA_VLI_MAX
- || i->uncompressed_size > LZMA_VLI_MAX
- || lzma_index_size(i) > LZMA_BACKWARD_SIZE_MAX
- || lzma_index_file_size(i) > LZMA_VLI_MAX)
- ret = LZMA_DATA_ERROR; // Would grow past the limits.
- else
- ret = index_append_real(i, allocator, unpadded_size,
- uncompressed_size, false);
-
- if (ret != LZMA_OK) {
- // Something went wrong. Undo the updates.
- i->total_size -= total_size;
- i->uncompressed_size -= uncompressed_size;
- --i->count;
- i->index_list_size -= index_list_size_add;
- }
-
- return ret;
-}
-
-
-/// Initialize i->current to point to the first Record.
-static bool
-init_current(lzma_index *i)
-{
- if (i->head == NULL) {
- assert(i->count == 0);
- return true;
- }
-
- assert(i->count > 0);
-
- i->current.group = i->head;
- i->current.record = 0;
- i->current.stream_offset = LZMA_STREAM_HEADER_SIZE;
- i->current.uncompressed_offset = 0;
-
- return false;
-}
-
-
-/// Go backward to the previous group.
-static void
-previous_group(lzma_index *i)
-{
- assert(i->current.group->prev != NULL);
-
- // Go to the previous group first.
- i->current.group = i->current.group->prev;
- i->current.record = i->current.group->last;
-
- // Then update the offsets.
- i->current.stream_offset -= vli_ceil4(i->current.group->unpadded_sums[
- i->current.group->last]);
- i->current.uncompressed_offset -= i->current.group->uncompressed_sums[
- i->current.group->last];
-
- return;
-}
-
-
-/// Go forward to the next group.
-static void
-next_group(lzma_index *i)
-{
- assert(i->current.group->next != NULL);
-
- // Update the offsets first.
- i->current.stream_offset += vli_ceil4(i->current.group->unpadded_sums[
- i->current.group->last]);
- i->current.uncompressed_offset += i->current.group
- ->uncompressed_sums[i->current.group->last];
-
- // Then go to the next group.
- i->current.record = 0;
- i->current.group = i->current.group->next;
-
- return;
-}
-
-
-/// Set *info from i->current.
-static void
-set_info(const lzma_index *i, lzma_index_record *info)
-{
- // First copy the cumulative sizes from the current Record of the
- // current group.
- info->unpadded_size
- = i->current.group->unpadded_sums[i->current.record];
- info->total_size = vli_ceil4(info->unpadded_size);
- info->uncompressed_size = i->current.group->uncompressed_sums[
- i->current.record];
-
- // Copy the start offsets of this group.
- info->stream_offset = i->current.stream_offset;
- info->uncompressed_offset = i->current.uncompressed_offset;
-
- // If it's not the first Record in this group, we need to do some
- // adjustements.
- if (i->current.record > 0) {
- // Since the _sums[] are cumulative, we substract the sums of
- // the previous Record to get the sizes of the current Record,
- // and add the sums of the previous Record to the offsets.
- // With unpadded_sums[] we need to take into account that it
- // uses a bit weird way to do the cumulative summing
- const lzma_vli total_sum
- = vli_ceil4(i->current.group->unpadded_sums[
- i->current.record - 1]);
-
- const lzma_vli uncompressed_sum = i->current.group
- ->uncompressed_sums[i->current.record - 1];
-
- info->total_size -= total_sum;
- info->unpadded_size -= total_sum;
- info->uncompressed_size -= uncompressed_sum;
-
- info->stream_offset += total_sum;
- info->uncompressed_offset += uncompressed_sum;
- }
-
- return;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_read(lzma_index *i, lzma_index_record *info)
-{
- if (i->current.group == NULL) {
- // We are at the beginning of the Record list. Set up
- // i->current point at the first Record. Return if there
- // are no Records.
- if (init_current(i))
- return true;
- } else do {
- // Try to go the next Record.
- if (i->current.record < i->current.group->last)
- ++i->current.record;
- else if (i->current.group->next == NULL)
- return true;
- else
- next_group(i);
- } while (i->current.group->paddings[i->current.record]);
-
- // We found a new Record. Set the information to *info.
- set_info(i, info);
-
- return false;
-}
-
-
-extern LZMA_API(void)
-lzma_index_rewind(lzma_index *i)
-{
- i->current.group = NULL;
- return;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_locate(lzma_index *i, lzma_index_record *info, lzma_vli target)
-{
- // Check if it is possible to fullfill the request.
- if (target >= i->uncompressed_size)
- return true;
-
- // Now we know that we will have an answer. Initialize the current
- // read position if needed.
- if (i->current.group == NULL && init_current(i))
- return true;
-
- // Locate the group where the wanted Block is. First search forward.
- while (i->current.uncompressed_offset <= target) {
- // If the first uncompressed byte of the next group is past
- // the target offset, it has to be this or an earlier group.
- if (i->current.uncompressed_offset + i->current.group
- ->uncompressed_sums[i->current.group->last]
- > target)
- break;
-
- // Go forward to the next group.
- next_group(i);
- }
-
- // Then search backward.
- while (i->current.uncompressed_offset > target)
- previous_group(i);
-
- // Now the target Block is somewhere in i->current.group. Offsets
- // in groups are relative to the beginning of the group, thus
- // we must adjust the target before starting the search loop.
- assert(target >= i->current.uncompressed_offset);
- target -= i->current.uncompressed_offset;
-
- // Use binary search to locate the exact Record. It is the first
- // Record whose uncompressed_sums[] value is greater than target.
- // This is because we want the rightmost Record that fullfills the
- // search criterion. It is possible that there are empty Blocks or
- // padding, we don't want to return them.
- size_t left = 0;
- size_t right = i->current.group->last;
-
- while (left < right) {
- const size_t pos = left + (right - left) / 2;
- if (i->current.group->uncompressed_sums[pos] <= target)
- left = pos + 1;
- else
- right = pos;
- }
-
- i->current.record = left;
-
-#ifndef NDEBUG
- // The found Record must not be padding or have zero uncompressed size.
- assert(!i->current.group->paddings[i->current.record]);
-
- if (i->current.record == 0)
- assert(i->current.group->uncompressed_sums[0] > 0);
- else
- assert(i->current.group->uncompressed_sums[i->current.record]
- - i->current.group->uncompressed_sums[
- i->current.record - 1] > 0);
-#endif
-
- set_info(i, info);
-
- return false;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
- lzma_allocator *allocator, lzma_vli padding)
-{
- if (dest == NULL || src == NULL || dest == src
- || padding > LZMA_VLI_MAX)
- return LZMA_PROG_ERROR;
-
- // Check that the combined size of the Indexes stays within limits.
- {
- const lzma_vli dest_size = index_size_unpadded(
- dest->count, dest->index_list_size);
- const lzma_vli src_size = index_size_unpadded(
- src->count, src->index_list_size);
- if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
- return LZMA_DATA_ERROR;
- }
-
- // Check that the combined size of the "files" (combined total
- // encoded sizes) stays within limits.
- {
- const lzma_vli dest_size = lzma_index_file_size(dest);
- const lzma_vli src_size = lzma_index_file_size(src);
- if (dest_size + src_size > LZMA_VLI_MAX
- || dest_size + src_size + padding
- > LZMA_VLI_MAX)
- return LZMA_DATA_ERROR;
- }
-
- // Add a padding Record to take into account the size of
- // Index + Stream Footer + Stream Padding + Stream Header.
- //
- // NOTE: This cannot overflow, because Index Size is always
- // far smaller than LZMA_VLI_MAX, and adding two VLIs
- // (Index Size and padding) doesn't overflow.
- padding += index_size(dest->count - dest->old.count,
- dest->index_list_size
- - dest->old.index_list_size)
- + LZMA_STREAM_HEADER_SIZE * 2;
-
- // While the above cannot overflow, but it may become an invalid VLI.
- if (padding > LZMA_VLI_MAX)
- return LZMA_DATA_ERROR;
-
- // Add the padding Record.
- {
- lzma_ret ret;
-
- // First update the info so we can validate it.
- dest->old.streams_size += padding;
-
- if (dest->old.streams_size > LZMA_VLI_MAX
- || lzma_index_file_size(dest) > LZMA_VLI_MAX)
- ret = LZMA_DATA_ERROR; // Would grow past the limits.
- else
- ret = index_append_real(dest, allocator,
- padding, 0, true);
-
- // If something went wrong, undo the updated value and return
- // the error.
- if (ret != LZMA_OK) {
- dest->old.streams_size -= padding;
- return ret;
- }
- }
-
- // Avoid wasting lots of memory if src->head has only a few records
- // that fit into dest->tail. That is, combine two groups if possible.
- //
- // NOTE: We know that dest->tail != NULL since we just appended
- // a padding Record. But we don't know about src->head.
- if (src->head != NULL && src->head->last + 1
- <= INDEX_GROUP_SIZE - dest->tail->last - 1) {
- // Copy the first Record.
- dest->tail->unpadded_sums[dest->tail->last + 1]
- = vli_ceil4(dest->tail->unpadded_sums[
- dest->tail->last])
- + src->head->unpadded_sums[0];
-
- dest->tail->uncompressed_sums[dest->tail->last + 1]
- = dest->tail->uncompressed_sums[dest->tail->last]
- + src->head->uncompressed_sums[0];
-
- dest->tail->paddings[dest->tail->last + 1]
- = src->head->paddings[0];
-
- ++dest->tail->last;
-
- // Copy the rest.
- for (size_t i = 1; i < src->head->last; ++i) {
- dest->tail->unpadded_sums[dest->tail->last + 1]
- = vli_ceil4(dest->tail->unpadded_sums[
- dest->tail->last])
- + src->head->unpadded_sums[i + 1]
- - src->head->unpadded_sums[i];
-
- dest->tail->uncompressed_sums[dest->tail->last + 1]
- = dest->tail->uncompressed_sums[
- dest->tail->last]
- + src->head->uncompressed_sums[i + 1]
- - src->head->uncompressed_sums[i];
-
- dest->tail->paddings[dest->tail->last + 1]
- = src->head->paddings[i + 1];
-
- ++dest->tail->last;
- }
-
- // Free the head group of *src. Don't bother updating prev
- // pointers since those won't be used for anything before
- // we deallocate the whole *src structure.
- lzma_index_group *tmp = src->head;
- src->head = src->head->next;
- lzma_free(tmp, allocator);
- }
-
- // If there are groups left in *src, join them as is. Note that if we
- // are combining already combined Indexes, src->head can be non-NULL
- // even if we just combined the old src->head to dest->tail.
- if (src->head != NULL) {
- src->head->prev = dest->tail;
- dest->tail->next = src->head;
- dest->tail = src->tail;
- }
-
- // Update information about earlier Indexes. Only the last Index
- // from *src won't be counted in dest->old. The last Index is left
- // open and can be even appended with lzma_index_append().
- dest->old.count = dest->count + src->old.count;
- dest->old.index_list_size
- = dest->index_list_size + src->old.index_list_size;
- dest->old.streams_size += src->old.streams_size;
-
- // Update overall information.
- dest->total_size += src->total_size;
- dest->uncompressed_size += src->uncompressed_size;
- dest->count += src->count;
- dest->index_list_size += src->index_list_size;
-
- // *src has nothing left but the base structure.
- lzma_free(src, allocator);
-
- return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
-{
- lzma_index *dest = lzma_alloc(sizeof(lzma_index), allocator);
- if (dest == NULL)
- return NULL;
-
- // Copy the base structure except the pointers.
- *dest = *src;
- dest->head = NULL;
- dest->tail = NULL;
- dest->current.group = NULL;
-
- // Copy the Records.
- const lzma_index_group *src_group = src->head;
- while (src_group != NULL) {
- // Allocate a new group.
- lzma_index_group *dest_group = lzma_alloc(
- sizeof(lzma_index_group), allocator);
- if (dest_group == NULL) {
- lzma_index_end(dest, allocator);
- return NULL;
- }
-
- // Set the pointers.
- dest_group->prev = dest->tail;
- dest_group->next = NULL;
-
- if (dest->head == NULL)
- dest->head = dest_group;
- else
- dest->tail->next = dest_group;
-
- dest->tail = dest_group;
-
- dest_group->last = src_group->last;
-
- // Copy the arrays so that we don't read uninitialized memory.
- const size_t count = src_group->last + 1;
- memcpy(dest_group->unpadded_sums, src_group->unpadded_sums,
- sizeof(lzma_vli) * count);
- memcpy(dest_group->uncompressed_sums,
- src_group->uncompressed_sums,
- sizeof(lzma_vli) * count);
- memcpy(dest_group->paddings, src_group->paddings,
- sizeof(bool) * count);
-
- // Copy also the read position.
- if (src_group == src->current.group)
- dest->current.group = dest->tail;
-
- src_group = src_group->next;
- }
-
- return dest;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_equal(const lzma_index *a, const lzma_index *b)
-{
- // No point to compare more if the pointers are the same.
- if (a == b)
- return true;
-
- // Compare the basic properties.
- if (a->total_size != b->total_size
- || a->uncompressed_size != b->uncompressed_size
- || a->index_list_size != b->index_list_size
- || a->count != b->count)
- return false;
-
- // Compare the Records.
- const lzma_index_group *ag = a->head;
- const lzma_index_group *bg = b->head;
- while (ag != NULL && bg != NULL) {
- const size_t count = ag->last + 1;
- if (ag->last != bg->last
- || memcmp(ag->unpadded_sums,
- bg->unpadded_sums,
- sizeof(lzma_vli) * count) != 0
- || memcmp(ag->uncompressed_sums,
- bg->uncompressed_sums,
- sizeof(lzma_vli) * count) != 0
- || memcmp(ag->paddings, bg->paddings,
- sizeof(bool) * count) != 0)
- return false;
-
- ag = ag->next;
- bg = bg->next;
- }
-
- return ag == NULL && bg == NULL;
-}
diff --git a/Build/source/extra/xz-4.999.9beta/src/xz/util.c b/Build/source/extra/xz-4.999.9beta/src/xz/util.c
deleted file mode 100644
index d160ea0d600..00000000000
--- a/Build/source/extra/xz-4.999.9beta/src/xz/util.c
+++ /dev/null
@@ -1,229 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file util.c
-/// \brief Miscellaneous utility functions
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "private.h"
-
-
-// Thousand separator for format strings is not supported outside POSIX.
-// This is used in uint64_to_str() and double_to_str().
-#ifdef DOSLIKE
-# define THOUSAND ""
-#else
-# define THOUSAND "'"
-#endif
-
-
-extern void *
-xrealloc(void *ptr, size_t size)
-{
- assert(size > 0);
-
- ptr = realloc(ptr, size);
- if (ptr == NULL)
- message_fatal("%s", strerror(errno));
-
- return ptr;
-}
-
-
-extern char *
-xstrdup(const char *src)
-{
- assert(src != NULL);
- const size_t size = strlen(src) + 1;
- char *dest = xmalloc(size);
- return memcpy(dest, src, size);
-}
-
-
-extern uint64_t
-str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
-{
- uint64_t result = 0;
-
- // Skip blanks.
- while (*value == ' ' || *value == '\t')
- ++value;
-
- // Accept special value "max". Supporting "min" doesn't seem useful.
- if (strcmp(value, "max") == 0)
- return max;
-
- if (*value < '0' || *value > '9')
- message_fatal(_("%s: Value is not a non-negative "
- "decimal integer"), value);
-
- do {
- // Don't overflow.
- if (result > (UINT64_MAX - 9) / 10)
- goto error;
-
- result *= 10;
- result += *value - '0';
- ++value;
- } while (*value >= '0' && *value <= '9');
-
- if (*value != '\0') {
- // Look for suffix.
- static const struct {
- const char name[4];
- uint64_t multiplier;
- } suffixes[] = {
- { "k", UINT64_C(1000) },
- { "kB", UINT64_C(1000) },
- { "M", UINT64_C(1000000) },
- { "MB", UINT64_C(1000000) },
- { "G", UINT64_C(1000000000) },
- { "GB", UINT64_C(1000000000) },
- { "Ki", UINT64_C(1024) },
- { "KiB", UINT64_C(1024) },
- { "Mi", UINT64_C(1048576) },
- { "MiB", UINT64_C(1048576) },
- { "Gi", UINT64_C(1073741824) },
- { "GiB", UINT64_C(1073741824) }
- };
-
- uint64_t multiplier = 0;
- for (size_t i = 0; i < ARRAY_SIZE(suffixes); ++i) {
- if (strcmp(value, suffixes[i].name) == 0) {
- multiplier = suffixes[i].multiplier;
- break;
- }
- }
-
- if (multiplier == 0) {
- message(V_ERROR, _("%s: Invalid multiplier suffix. "
- "Valid suffixes:"), value);
- message_fatal("`k' (10^3), `M' (10^6), `G' (10^9) "
- "`Ki' (2^10), `Mi' (2^20), "
- "`Gi' (2^30)");
- }
-
- // Don't overflow here either.
- if (result > UINT64_MAX / multiplier)
- goto error;
-
- result *= multiplier;
- }
-
- if (result < min || result > max)
- goto error;
-
- return result;
-
-error:
- message_fatal(_("Value of the option `%s' must be in the range "
- "[%" PRIu64 ", %" PRIu64 "]"),
- name, min, max);
-}
-
-
-extern const char *
-uint64_to_str(uint64_t value, uint32_t slot)
-{
- // 2^64 with thousand separators is 26 bytes plus trailing '\0'.
- static char bufs[4][32];
-
- assert(slot < ARRAY_SIZE(bufs));
-
- snprintf(bufs[slot], sizeof(bufs[slot]), "%" THOUSAND PRIu64, value);
- return bufs[slot];
-}
-
-
-extern const char *
-double_to_str(double value)
-{
- // 64 bytes is surely enough, since it won't fit in some other
- // fields anyway.
- static char buf[64];
-
- snprintf(buf, sizeof(buf), "%" THOUSAND ".1f", value);
- return buf;
-}
-
-
-/*
-/// \brief Simple quoting to get rid of ASCII control characters
-///
-/// This is not so cool and locale-dependent, but should be good enough
-/// At least we don't print any control characters on the terminal.
-///
-extern char *
-str_quote(const char *str)
-{
- size_t dest_len = 0;
- bool has_ctrl = false;
-
- while (str[dest_len] != '\0')
- if (*(unsigned char *)(str + dest_len++) < 0x20)
- has_ctrl = true;
-
- char *dest = malloc(dest_len + 1);
- if (dest != NULL) {
- if (has_ctrl) {
- for (size_t i = 0; i < dest_len; ++i)
- if (*(unsigned char *)(str + i) < 0x20)
- dest[i] = '?';
- else
- dest[i] = str[i];
-
- dest[dest_len] = '\0';
-
- } else {
- // Usually there are no control characters,
- // so we can optimize.
- memcpy(dest, str, dest_len + 1);
- }
- }
-
- return dest;
-}
-*/
-
-
-extern bool
-is_empty_filename(const char *filename)
-{
- if (filename[0] == '\0') {
- message_error(_("Empty filename, skipping"));
- return true;
- }
-
- return false;
-}
-
-
-extern bool
-is_tty_stdin(void)
-{
- const bool ret = isatty(STDIN_FILENO);
-
- if (ret)
- message_error(_("Compressed data not read from a terminal "
- "unless `--force' is used."));
-
- return ret;
-}
-
-
-extern bool
-is_tty_stdout(void)
-{
- const bool ret = isatty(STDOUT_FILENO);
-
- if (ret)
- message_error(_("Compressed data not written to a terminal "
- "unless `--force' is used."));
-
- return ret;
-}
diff --git a/Build/source/extra/xz-4.999.9beta/tests/test_index.c b/Build/source/extra/xz-4.999.9beta/tests/test_index.c
deleted file mode 100644
index 5ce2c524735..00000000000
--- a/Build/source/extra/xz-4.999.9beta/tests/test_index.c
+++ /dev/null
@@ -1,532 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file test_index.c
-/// \brief Tests functions handling the lzma_index structure
-//
-// Author: Lasse Collin
-//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "tests.h"
-
-#define MEMLIMIT (LZMA_VLI_C(1) << 20)
-
-
-static lzma_index *
-create_empty(void)
-{
- lzma_index *i = lzma_index_init(NULL, NULL);
- expect(i != NULL);
- return i;
-}
-
-
-static lzma_index *
-create_small(void)
-{
- lzma_index *i = lzma_index_init(NULL, NULL);
- expect(i != NULL);
- expect(lzma_index_append(i, NULL, 101, 555) == LZMA_OK);
- expect(lzma_index_append(i, NULL, 602, 777) == LZMA_OK);
- expect(lzma_index_append(i, NULL, 804, 999) == LZMA_OK);
- return i;
-}
-
-
-static lzma_index *
-create_big(void)
-{
- lzma_index *i = lzma_index_init(NULL, NULL);
- expect(i != NULL);
-
- lzma_vli total_size = 0;
- lzma_vli uncompressed_size = 0;
-
- // Add pseudo-random sizes (but always the same size values).
- const size_t count = 5555;
- uint32_t n = 11;
- for (size_t j = 0; j < count; ++j) {
- n = 7019 * n + 7607;
- const uint32_t t = n * 3011;
- expect(lzma_index_append(i, NULL, t, n) == LZMA_OK);
- total_size += (t + 3) & ~LZMA_VLI_C(3);
- uncompressed_size += n;
- }
-
- expect(lzma_index_count(i) == count);
- expect(lzma_index_total_size(i) == total_size);
- expect(lzma_index_uncompressed_size(i) == uncompressed_size);
- expect(lzma_index_total_size(i) + lzma_index_size(i)
- + 2 * LZMA_STREAM_HEADER_SIZE
- == lzma_index_stream_size(i));
-
- return i;
-}
-
-
-static void
-test_equal(void)
-{
- lzma_index *a = create_empty();
- lzma_index *b = create_small();
- lzma_index *c = create_big();
- expect(a && b && c);
-
- expect(lzma_index_equal(a, a));
- expect(lzma_index_equal(b, b));
- expect(lzma_index_equal(c, c));
-
- expect(!lzma_index_equal(a, b));
- expect(!lzma_index_equal(a, c));
- expect(!lzma_index_equal(b, c));
-
- lzma_index_end(a, NULL);
- lzma_index_end(b, NULL);
- lzma_index_end(c, NULL);
-}
-
-
-static void
-test_overflow(void)
-{
- // Integer overflow tests
- lzma_index *i = create_empty();
-
- expect(lzma_index_append(i, NULL, LZMA_VLI_MAX - 5, 1234)
- == LZMA_DATA_ERROR);
-
- // TODO
-
- lzma_index_end(i, NULL);
-}
-
-
-static void
-test_copy(const lzma_index *i)
-{
- lzma_index *d = lzma_index_dup(i, NULL);
- expect(d != NULL);
- lzma_index_end(d, NULL);
-}
-
-
-static void
-test_read(lzma_index *i)
-{
- lzma_index_record record;
-
- // Try twice so we see that rewinding works.
- for (size_t j = 0; j < 2; ++j) {
- lzma_vli total_size = 0;
- lzma_vli uncompressed_size = 0;
- lzma_vli stream_offset = LZMA_STREAM_HEADER_SIZE;
- lzma_vli uncompressed_offset = 0;
- uint32_t count = 0;
-
- while (!lzma_index_read(i, &record)) {
- ++count;
-
- total_size += record.total_size;
- uncompressed_size += record.uncompressed_size;
-
- expect(record.stream_offset == stream_offset);
- expect(record.uncompressed_offset
- == uncompressed_offset);
-
- stream_offset += record.total_size;
- uncompressed_offset += record.uncompressed_size;
- }
-
- expect(lzma_index_total_size(i) == total_size);
- expect(lzma_index_uncompressed_size(i) == uncompressed_size);
- expect(lzma_index_count(i) == count);
-
- lzma_index_rewind(i);
- }
-}
-
-
-static void
-test_code(lzma_index *i)
-{
- const size_t alloc_size = 128 * 1024;
- uint8_t *buf = malloc(alloc_size);
- expect(buf != NULL);
-
- // Encode
- lzma_stream strm = LZMA_STREAM_INIT;
- expect(lzma_index_encoder(&strm, i) == LZMA_OK);
- const lzma_vli index_size = lzma_index_size(i);
- succeed(coder_loop(&strm, NULL, 0, buf, index_size,
- LZMA_STREAM_END, LZMA_RUN));
-
- // Decode
- lzma_index *d;
- expect(lzma_index_decoder(&strm, &d, MEMLIMIT) == LZMA_OK);
- succeed(decoder_loop(&strm, buf, index_size));
-
- expect(lzma_index_equal(i, d));
-
- lzma_index_end(d, NULL);
- lzma_end(&strm);
-
- // Decode with hashing
- lzma_index_hash *h = lzma_index_hash_init(NULL, NULL);
- expect(h != NULL);
- lzma_index_rewind(i);
- lzma_index_record r;
- while (!lzma_index_read(i, &r))
- expect(lzma_index_hash_append(h, r.unpadded_size,
- r.uncompressed_size) == LZMA_OK);
- size_t pos = 0;
- while (pos < index_size - 1)
- expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
- == LZMA_OK);
- expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
- == LZMA_STREAM_END);
-
- lzma_index_hash_end(h, NULL);
-
- // Encode buffer
- size_t buf_pos = 1;
- expect(lzma_index_buffer_encode(i, buf, &buf_pos, index_size)
- == LZMA_BUF_ERROR);
- expect(buf_pos == 1);
-
- succeed(lzma_index_buffer_encode(i, buf, &buf_pos, index_size + 1));
- expect(buf_pos == index_size + 1);
-
- // Decode buffer
- buf_pos = 1;
- uint64_t memlimit = MEMLIMIT;
- expect(lzma_index_buffer_decode(&d, &memlimit, NULL, buf, &buf_pos,
- index_size) == LZMA_DATA_ERROR);
- expect(buf_pos == 1);
- expect(d == NULL);
-
- succeed(lzma_index_buffer_decode(&d, &memlimit, NULL, buf, &buf_pos,
- index_size + 1));
- expect(buf_pos == index_size + 1);
- expect(lzma_index_equal(i, d));
-
- lzma_index_end(d, NULL);
-
- free(buf);
-}
-
-
-static void
-test_many(lzma_index *i)
-{
- test_copy(i);
- test_read(i);
- test_code(i);
-}
-
-
-static void
-test_cat(void)
-{
- lzma_index *a, *b, *c;
-
- // Empty Indexes
- a = create_empty();
- b = create_empty();
- expect(lzma_index_cat(a, b, NULL, 0) == LZMA_OK);
- expect(lzma_index_count(a) == 0);
- expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
- expect(lzma_index_file_size(a)
- == 2 * (2 * LZMA_STREAM_HEADER_SIZE + 8));
-
- b = create_empty();
- expect(lzma_index_cat(a, b, NULL, 0) == LZMA_OK);
- expect(lzma_index_count(a) == 0);
- expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
- expect(lzma_index_file_size(a)
- == 3 * (2 * LZMA_STREAM_HEADER_SIZE + 8));
-
- b = create_empty();
- c = create_empty();
- expect(lzma_index_cat(b, c, NULL, 4) == LZMA_OK);
- expect(lzma_index_count(b) == 0);
- expect(lzma_index_stream_size(b) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
- expect(lzma_index_file_size(b)
- == 2 * (2 * LZMA_STREAM_HEADER_SIZE + 8) + 4);
-
- expect(lzma_index_cat(a, b, NULL, 8) == LZMA_OK);
- expect(lzma_index_count(a) == 0);
- expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
- expect(lzma_index_file_size(a)
- == 5 * (2 * LZMA_STREAM_HEADER_SIZE + 8) + 4 + 8);
-
- lzma_index_end(a, NULL);
-
- // Small Indexes
- a = create_small();
- lzma_vli stream_size = lzma_index_stream_size(a);
- b = create_small();
- expect(lzma_index_cat(a, b, NULL, 4) == LZMA_OK);
- expect(lzma_index_file_size(a) == stream_size * 2 + 4);
- expect(lzma_index_stream_size(a) > stream_size);
- expect(lzma_index_stream_size(a) < stream_size * 2);
-
- b = create_small();
- c = create_small();
- expect(lzma_index_cat(b, c, NULL, 8) == LZMA_OK);
- expect(lzma_index_cat(a, b, NULL, 12) == LZMA_OK);
- expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
-
- lzma_index_end(a, NULL);
-
- // Big Indexes
- a = create_big();
- stream_size = lzma_index_stream_size(a);
- b = create_big();
- expect(lzma_index_cat(a, b, NULL, 4) == LZMA_OK);
- expect(lzma_index_file_size(a) == stream_size * 2 + 4);
- expect(lzma_index_stream_size(a) > stream_size);
- expect(lzma_index_stream_size(a) < stream_size * 2);
-
- b = create_big();
- c = create_big();
- expect(lzma_index_cat(b, c, NULL, 8) == LZMA_OK);
- expect(lzma_index_cat(a, b, NULL, 12) == LZMA_OK);
- expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
-
- lzma_index_end(a, NULL);
-}
-
-
-static void
-test_locate(void)
-{
- lzma_index_record r;
- lzma_index *i = lzma_index_init(NULL, NULL);
- expect(i != NULL);
-
- // Cannot locate anything from an empty Index.
- expect(lzma_index_locate(i, &r, 0));
- expect(lzma_index_locate(i, &r, 555));
-
- // One empty Record: nothing is found since there's no uncompressed
- // data.
- expect(lzma_index_append(i, NULL, 16, 0) == LZMA_OK);
- expect(lzma_index_locate(i, &r, 0));
-
- // Non-empty Record and we can find something.
- expect(lzma_index_append(i, NULL, 32, 5) == LZMA_OK);
- expect(!lzma_index_locate(i, &r, 0));
- expect(r.total_size == 32);
- expect(r.uncompressed_size == 5);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16);
- expect(r.uncompressed_offset == 0);
-
- // Still cannot find anything past the end.
- expect(lzma_index_locate(i, &r, 5));
-
- // Add the third Record.
- expect(lzma_index_append(i, NULL, 40, 11) == LZMA_OK);
-
- expect(!lzma_index_locate(i, &r, 0));
- expect(r.total_size == 32);
- expect(r.uncompressed_size == 5);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16);
- expect(r.uncompressed_offset == 0);
-
- expect(!lzma_index_read(i, &r));
- expect(r.total_size == 40);
- expect(r.uncompressed_size == 11);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16 + 32);
- expect(r.uncompressed_offset == 5);
-
- expect(!lzma_index_locate(i, &r, 2));
- expect(r.total_size == 32);
- expect(r.uncompressed_size == 5);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16);
- expect(r.uncompressed_offset == 0);
-
- expect(!lzma_index_locate(i, &r, 5));
- expect(r.total_size == 40);
- expect(r.uncompressed_size == 11);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16 + 32);
- expect(r.uncompressed_offset == 5);
-
- expect(!lzma_index_locate(i, &r, 5 + 11 - 1));
- expect(r.total_size == 40);
- expect(r.uncompressed_size == 11);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 16 + 32);
- expect(r.uncompressed_offset == 5);
-
- expect(lzma_index_locate(i, &r, 5 + 11));
- expect(lzma_index_locate(i, &r, 5 + 15));
-
- // Large Index
- i = lzma_index_init(i, NULL);
- expect(i != NULL);
-
- for (size_t n = 4; n <= 4 * 5555; n += 4)
- expect(lzma_index_append(i, NULL, n + 8, n) == LZMA_OK);
-
- expect(lzma_index_count(i) == 5555);
-
- // First Record
- expect(!lzma_index_locate(i, &r, 0));
- expect(r.total_size == 4 + 8);
- expect(r.uncompressed_size == 4);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE);
- expect(r.uncompressed_offset == 0);
-
- expect(!lzma_index_locate(i, &r, 3));
- expect(r.total_size == 4 + 8);
- expect(r.uncompressed_size == 4);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE);
- expect(r.uncompressed_offset == 0);
-
- // Second Record
- expect(!lzma_index_locate(i, &r, 4));
- expect(r.total_size == 2 * 4 + 8);
- expect(r.uncompressed_size == 2 * 4);
- expect(r.stream_offset == LZMA_STREAM_HEADER_SIZE + 4 + 8);
- expect(r.uncompressed_offset == 4);
-
- // Last Record
- expect(!lzma_index_locate(i, &r, lzma_index_uncompressed_size(i) - 1));
- expect(r.total_size == 4 * 5555 + 8);
- expect(r.uncompressed_size == 4 * 5555);
- expect(r.stream_offset == lzma_index_total_size(i)
- + LZMA_STREAM_HEADER_SIZE - 4 * 5555 - 8);
- expect(r.uncompressed_offset
- == lzma_index_uncompressed_size(i) - 4 * 5555);
-
- // Allocation chunk boundaries. See INDEX_GROUP_SIZE in
- // liblzma/common/index.c.
- const size_t group_multiple = 256 * 4;
- const size_t radius = 8;
- const size_t start = group_multiple - radius;
- lzma_vli ubase = 0;
- lzma_vli tbase = 0;
- size_t n;
- for (n = 1; n < start; ++n) {
- ubase += n * 4;
- tbase += n * 4 + 8;
- }
-
- while (n < start + 2 * radius) {
- expect(!lzma_index_locate(i, &r, ubase + n * 4));
-
- expect(r.stream_offset == tbase + n * 4 + 8
- + LZMA_STREAM_HEADER_SIZE);
- expect(r.uncompressed_offset == ubase + n * 4);
-
- tbase += n * 4 + 8;
- ubase += n * 4;
- ++n;
-
- expect(r.total_size == n * 4 + 8);
- expect(r.uncompressed_size == n * 4);
- }
-
- // Do it also backwards since lzma_index_locate() uses relative search.
- while (n > start) {
- expect(!lzma_index_locate(i, &r, ubase + (n - 1) * 4));
-
- expect(r.total_size == n * 4 + 8);
- expect(r.uncompressed_size == n * 4);
-
- --n;
- tbase -= n * 4 + 8;
- ubase -= n * 4;
-
- expect(r.stream_offset == tbase + n * 4 + 8
- + LZMA_STREAM_HEADER_SIZE);
- expect(r.uncompressed_offset == ubase + n * 4);
- }
-
- // Test locating in concatend Index.
- i = lzma_index_init(i, NULL);
- expect(i != NULL);
- for (n = 0; n < group_multiple; ++n)
- expect(lzma_index_append(i, NULL, 8, 0) == LZMA_OK);
- expect(lzma_index_append(i, NULL, 16, 1) == LZMA_OK);
- expect(!lzma_index_locate(i, &r, 0));
- expect(r.total_size == 16);
- expect(r.uncompressed_size == 1);
- expect(r.stream_offset
- == LZMA_STREAM_HEADER_SIZE + group_multiple * 8);
- expect(r.uncompressed_offset == 0);
-
- lzma_index_end(i, NULL);
-}
-
-
-static void
-test_corrupt(void)
-{
- const size_t alloc_size = 128 * 1024;
- uint8_t *buf = malloc(alloc_size);
- expect(buf != NULL);
- lzma_stream strm = LZMA_STREAM_INIT;
-
- lzma_index *i = create_empty();
- expect(lzma_index_append(i, NULL, 0, 1) == LZMA_PROG_ERROR);
- lzma_index_end(i, NULL);
-
- // Create a valid Index and corrupt it in different ways.
- i = create_small();
- expect(lzma_index_encoder(&strm, i) == LZMA_OK);
- succeed(coder_loop(&strm, NULL, 0, buf, 20,
- LZMA_STREAM_END, LZMA_RUN));
- lzma_index_end(i, NULL);
-
- // Wrong Index Indicator
- buf[0] ^= 1;
- expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
- succeed(decoder_loop_ret(&strm, buf, 1, LZMA_DATA_ERROR));
- buf[0] ^= 1;
-
- // Wrong Number of Records and thus CRC32 fails.
- --buf[1];
- expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
- succeed(decoder_loop_ret(&strm, buf, 10, LZMA_DATA_ERROR));
- ++buf[1];
-
- // Padding not NULs
- buf[15] ^= 1;
- expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
- succeed(decoder_loop_ret(&strm, buf, 16, LZMA_DATA_ERROR));
-
- lzma_end(&strm);
- free(buf);
-}
-
-
-int
-main(void)
-{
- test_equal();
-
- test_overflow();
-
- lzma_index *i = create_empty();
- test_many(i);
- lzma_index_end(i, NULL);
-
- i = create_small();
- test_many(i);
- lzma_index_end(i, NULL);
-
- i = create_big();
- test_many(i);
- lzma_index_end(i, NULL);
-
- test_cat();
-
- test_locate();
-
- test_corrupt();
-
- return 0;
-}
diff --git a/Build/source/extra/xz-4.999.9beta/windows/Makefile b/Build/source/extra/xz-4.999.9beta/windows/Makefile
deleted file mode 100644
index db362ef22a1..00000000000
--- a/Build/source/extra/xz-4.999.9beta/windows/Makefile
+++ /dev/null
@@ -1,308 +0,0 @@
-###############################################################################
-#
-# Makefile to build XZ Utils using MinGW
-#
-# Make flags to alter compilation:
-#
-# DEBUG=1 Enable assertions. Don't use this for production builds!
-# You may also want to set CFLAGS="-g -O0" to disable
-# optimizations.
-#
-# W64=1 Build for 64-bit Windows. Make sure that you have 64-bit
-# MinGW in PATH.
-#
-# WINE=1 Shortcut to set CC, AR, and STRIP to use Wine to run Windows
-# versions of MinGW binaries.
-#
-# The usual CPPFLAGS and CFLAGS are supported too.
-#
-###############################################################################
-#
-# Author: Lasse Collin
-#
-# This file has been put into the public domain.
-# You can do whatever you want with this file.
-#
-###############################################################################
-
-ifdef W64
-CC = x86_64-pc-mingw32-gcc
-WINDRES = x86_64-pc-mingw32-windres
-AR = x86_64-pc-mingw32-ar
-STRIP = x86_64-pc-mingw32-strip
-else
-CC = mingw32-gcc
-WINDRES = windres
-AR = ar
-STRIP = strip
-endif
-
-SED = sed
-MKDIR = mkdir
-CP = cp
-RM = rm -f
-
-CFLAGS = -g -Wall -Wextra -O2
-# CFLAGS = -Wall -Wextra -O3 -fomit-frame-pointer -funroll-loops
-
-ALL_CFLAGS = -std=gnu99 -mms-bitfields
-
-ALL_CPPFLAGS = \
- -I. \
- -I../src/common \
- -I../src/liblzma/api \
- -I../src/liblzma/common \
- -I../src/liblzma/check \
- -I../src/liblzma/rangecoder \
- -I../src/liblzma/lz \
- -I../src/liblzma/lzma \
- -I../src/liblzma/delta \
- -I../src/liblzma/simple \
- -I../src/liblzma/subblock
-
-ALL_CPPFLAGS += -DHAVE_CONFIG_H
-
-# This works with Wine too while using native GNU make, sed, and rm.
-ifdef WINE
-ifdef W64
-CC := wine c:/MinGW64/bin/x86_64-pc-mingw32-gcc
-WINDRES := wine c:/MinGW64/bin/x86_64-pc-mingw32-windres
-AR := wine c:/MinGW64/bin/x86_64-pc-mingw32-ar
-STRIP := wine c:/MinGW64/bin/x86_64-pc-mingw32-strip
-else
-CC := wine c:/MinGW/bin/gcc
-WINDRES := wine c:/MinGW/bin/windres
-AR := wine c:/MinGW/bin/ar
-STRIP := wine c:/MinGW/bin/strip
-endif
-endif
-
-ifdef DEBUG
-# Use echo since it works for this purpose on both Windows and POSIX.
-STRIP := echo Skipping strip
-else
-ALL_CPPFLAGS += -DNDEBUG
-endif
-
-ALL_CPPFLAGS += $(CPPFLAGS)
-ALL_CFLAGS += $(CFLAGS)
-
-
-################
-# Common rules #
-################
-
-.PHONY: all clean pkg
-all: liblzma xzdec xz
-clean: liblzma-clean xzdec-clean xz-clean
-
-pkg: all
- $(RM) -r pkg
- $(MKDIR) -p pkg/lib pkg/include/lzma
- $(CP) liblzma.dll xz-dynamic.exe xz.exe xzdec-dynamic.exe xzdec.exe lzmadec-dynamic.exe lzmadec.exe pkg
- $(CP) liblzma.a liblzma.def liblzma_static.lib pkg/lib
- $(CP) ../src/liblzma/api/lzma.h pkg/include
- $(CP) ../src/liblzma/api/lzma/*.h pkg/include/lzma
-
-%.o: %.rc
- $(WINDRES) $(ALL_CPPFLAGS) $< $@
-
-
-###############
-# liblzma.dll #
-###############
-
-.PHONY: liblzma
-liblzma: liblzma.dll liblzma_static.lib
-
-LIBLZMA_SRCS_C = \
- ../src/liblzma/common/alone_decoder.c \
- ../src/liblzma/common/alone_encoder.c \
- ../src/liblzma/common/auto_decoder.c \
- ../src/liblzma/common/block_buffer_decoder.c \
- ../src/liblzma/common/block_buffer_encoder.c \
- ../src/liblzma/common/block_decoder.c \
- ../src/liblzma/common/block_encoder.c \
- ../src/liblzma/common/block_header_decoder.c \
- ../src/liblzma/common/block_header_encoder.c \
- ../src/liblzma/common/block_util.c \
- ../src/liblzma/common/common.c \
- ../src/liblzma/common/easy_buffer_encoder.c \
- ../src/liblzma/common/easy_decoder_memusage.c \
- ../src/liblzma/common/easy_encoder.c \
- ../src/liblzma/common/easy_encoder_memusage.c \
- ../src/liblzma/common/easy_preset.c \
- ../src/liblzma/common/filter_buffer_decoder.c \
- ../src/liblzma/common/filter_buffer_encoder.c \
- ../src/liblzma/common/filter_common.c \
- ../src/liblzma/common/filter_decoder.c \
- ../src/liblzma/common/filter_encoder.c \
- ../src/liblzma/common/filter_flags_decoder.c \
- ../src/liblzma/common/filter_flags_encoder.c \
- ../src/liblzma/common/index.c \
- ../src/liblzma/common/index_decoder.c \
- ../src/liblzma/common/index_encoder.c \
- ../src/liblzma/common/index_hash.c \
- ../src/liblzma/common/stream_buffer_decoder.c \
- ../src/liblzma/common/stream_buffer_encoder.c \
- ../src/liblzma/common/stream_decoder.c \
- ../src/liblzma/common/stream_encoder.c \
- ../src/liblzma/common/stream_flags_common.c \
- ../src/liblzma/common/stream_flags_decoder.c \
- ../src/liblzma/common/stream_flags_encoder.c \
- ../src/liblzma/common/vli_decoder.c \
- ../src/liblzma/common/vli_encoder.c \
- ../src/liblzma/common/vli_size.c \
- ../src/liblzma/check/check.c \
- ../src/liblzma/check/crc32_table.c \
- ../src/liblzma/check/crc64_table.c \
- ../src/liblzma/check/sha256.c \
- ../src/liblzma/rangecoder/price_table.c \
- ../src/liblzma/lz/lz_decoder.c \
- ../src/liblzma/lz/lz_encoder.c \
- ../src/liblzma/lz/lz_encoder_mf.c \
- ../src/liblzma/lzma/fastpos_table.c \
- ../src/liblzma/lzma/lzma2_decoder.c \
- ../src/liblzma/lzma/lzma2_encoder.c \
- ../src/liblzma/lzma/lzma_decoder.c \
- ../src/liblzma/lzma/lzma_encoder.c \
- ../src/liblzma/lzma/lzma_encoder_optimum_fast.c \
- ../src/liblzma/lzma/lzma_encoder_optimum_normal.c \
- ../src/liblzma/lzma/lzma_encoder_presets.c \
- ../src/liblzma/delta/delta_common.c \
- ../src/liblzma/delta/delta_decoder.c \
- ../src/liblzma/delta/delta_encoder.c \
- ../src/liblzma/simple/arm.c \
- ../src/liblzma/simple/armthumb.c \
- ../src/liblzma/simple/ia64.c \
- ../src/liblzma/simple/powerpc.c \
- ../src/liblzma/simple/simple_coder.c \
- ../src/liblzma/simple/simple_decoder.c \
- ../src/liblzma/simple/simple_encoder.c \
- ../src/liblzma/simple/sparc.c \
- ../src/liblzma/simple/x86.c
-
-LIBLZMA_SRCS_ASM =
-
-ifdef W64
-LIBLZMA_SRCS_C += \
- ../src/liblzma/check/crc32_fast.c \
- ../src/liblzma/check/crc64_fast.c
-else
-LIBLZMA_SRCS_ASM += \
- ../src/liblzma/check/crc32_x86.S \
- ../src/liblzma/check/crc64_x86.S
-endif
-
-LIBLZMA_OBJS_C = $(LIBLZMA_SRCS_C:.c=.o)
-LIBLZMA_OBJS_ASM = $(LIBLZMA_SRCS_ASM:.S=.o)
-LIBLZMA_OBJS = \
- $(LIBLZMA_OBJS_C) \
- $(LIBLZMA_OBJS_ASM) \
- ../src/liblzma/liblzma_w32res.o
-
-LIBLZMA_OBJS_STATIC_C = $(LIBLZMA_SRCS_C:.c=-static.o)
-LIBLZMA_OBJS_STATIC_ASM = $(LIBLZMA_SRCS_ASM:.S=-static.o)
-LIBLZMA_OBJS_STATIC = $(LIBLZMA_OBJS_STATIC_C) $(LIBLZMA_OBJS_STATIC_ASM)
-
-# The sed is needed to remove ordinals from the .def file. I'm not going
-# to track the ordinal numbers, so people should link against liblzma.dll
-# only by using symbol names.
-liblzma.dll: $(LIBLZMA_OBJS)
- $(CC) $(ALL_CFLAGS) -shared -o liblzma.dll $(LIBLZMA_OBJS) -Wl,--out-implib,liblzma.a,--output-def,liblzma.def.in
- $(SED) 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
- $(RM) liblzma.def.in
- $(STRIP) --strip-unneeded liblzma.a
- $(STRIP) --strip-all liblzma.dll
-
-$(LIBLZMA_OBJS_C): %.o: %.c
- $(CC) -DDLL_EXPORT $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-$(LIBLZMA_OBJS_ASM): %.o: %.S
- $(CC) -DDLL_EXPORT $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-liblzma_static.lib: $(LIBLZMA_OBJS_STATIC)
- $(RM) $@
- $(AR) rcs $@ $(LIBLZMA_OBJS_STATIC)
- $(STRIP) --strip-unneeded $@
-
-$(LIBLZMA_OBJS_STATIC_C): %-static.o: %.c
- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-$(LIBLZMA_OBJS_STATIC_ASM): %-static.o: %.S
- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-.PHONY: liblzma-clean
-liblzma-clean:
- -$(RM) $(LIBLZMA_OBJS) $(LIBLZMA_OBJS_STATIC) liblzma.def.in liblzma.def liblzma.a liblzma.dll liblzma_static.lib
-
-
-###########################
-# xzdec.exe & lzmadec.exe #
-###########################
-
-.PHONY: xzdec
-xzdec: xzdec-dynamic.exe lzmadec-dynamic.exe xzdec.exe lzmadec.exe
-
-XZDEC_SRCS = ../src/xzdec/xzdec.c
-
-xzdec-dynamic.exe: liblzma.dll $(XZDEC_SRCS) ../src/xzdec/xzdec_w32res.o
- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(XZDEC_SRCS) ../src/xzdec/xzdec_w32res.o -o $@ liblzma.a
- $(STRIP) --strip-all $@
-
-lzmadec-dynamic.exe: liblzma.dll $(XZDEC_SRCS) ../src/xzdec/lzmadec_w32res.o
- $(CC) $(ALL_CPPFLAGS) -DLZMADEC $(ALL_CFLAGS) $(XZDEC_SRCS) ../src/xzdec/lzmadec_w32res.o -o $@ liblzma.a
- $(STRIP) --strip-all $@
-
-xzdec.exe: liblzma_static.lib $(XZDEC_SRCS) ../src/xzdec/xzdec_w32res.o
- $(CC) -DLZMA_API_STATIC $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(XZDEC_SRCS) ../src/xzdec/xzdec_w32res.o -o $@ liblzma_static.lib
- $(STRIP) --strip-all $@
-
-lzmadec.exe: liblzma_static.lib $(XZDEC_SRCS) ../src/xzdec/lzmadec_w32res.o
- $(CC) -DLZMA_API_STATIC $(ALL_CPPFLAGS) -DLZMADEC $(ALL_CFLAGS) $(XZDEC_SRCS) ../src/xzdec/lzmadec_w32res.o -o $@ liblzma_static.lib
- $(STRIP) --strip-all $@
-
-.PHONY: xzdec-clean
-xzdec-clean:
- -$(RM) xzdec-dynamic.exe lzmadec-dynamic.exe xzdec.exe lzmadec.exe ../src/xzdec/xzdec_w32res.o ../src/xzdec/lzmadec_w32res.o
-
-
-##########
-# xz.exe #
-##########
-
-.PHONY: xz
-xz: xz-dynamic.exe xz.exe
-
-XZ_SRCS = \
- ../src/xz/args.c \
- ../src/xz/coder.c \
- ../src/xz/file_io.c \
- ../src/xz/hardware.c \
- ../src/xz/main.c \
- ../src/xz/message.c \
- ../src/xz/options.c \
- ../src/xz/signals.c \
- ../src/xz/suffix.c \
- ../src/xz/util.c
-
-XZ_OBJS = $(XZ_SRCS:.c=.o)
-XZ_OBJS_STATIC = $(XZ_SRCS:.c=-static.o)
-
-$(XZ_OBJS): %.o: %.c
- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-xz-dynamic.exe: liblzma.dll $(XZ_OBJS) ../src/xz/xz_w32res.o
- $(CC) $(ALL_CFLAGS) $(XZ_OBJS) ../src/xz/xz_w32res.o -o $@ liblzma.a
- $(STRIP) --strip-all $@
-
-$(XZ_OBJS_STATIC): %-static.o: %.c
- $(CC) -DLZMA_API_STATIC $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $<
-
-xz.exe: liblzma_static.lib $(XZ_OBJS_STATIC) ../src/xz/xz_w32res.o
- $(CC) $(ALL_CFLAGS) $(XZ_OBJS_STATIC) ../src/xz/xz_w32res.o -o $@ liblzma_static.lib
- $(STRIP) --strip-all $@
-
-.PHONY: xz-clean
-xz-clean:
- -$(RM) $(XZ_OBJS) $(XZ_OBJS_STATIC) ../src/xz/xz_w32res.o xz-dynamic.exe xz.exe
diff --git a/Build/source/extra/xz-4.999.9beta/windows/README b/Build/source/extra/xz-4.999.9beta/windows/README
deleted file mode 100644
index 0e529de9f05..00000000000
--- a/Build/source/extra/xz-4.999.9beta/windows/README
+++ /dev/null
@@ -1,155 +0,0 @@
-
-XZ Utils on Windows
-===================
-
-Introduction
-
- This document explains how to build XZ Utils for Microsoft Windows
- using MinGW (Minimalist GNU for Windows).
-
- This is currently experimental and has got very little testing.
- No ABI stability is promised for liblzma.dll.
-
-
-Why MinGW
-
- XZ Utils code is C99. It should be possible to compile at least
- liblzma using any C99 compiler. Compiling the command line tools may
- need a little extra work to get them built on new systems, because
- they use some features that aren't standardized in POSIX.
-
- MinGW is free software. MinGW runtime provides some functions that
- made porting the command line tools easier. Most(?) of the MinGW
- runtime, which gets linked into the resulting binaries, is in the
- public domain.
-
- While most C compilers nowadays support C99 well enough (including
- most compilers for Windows), MSVC doesn't. It seems that Microsoft
- has no plans to ever support C99. Thus, it is not possible to build
- XZ Utils using MSVC without doing a lot of work to convert the code.
- Using prebuilt liblzma from MSVC is possible though, since the
- liblzma API headers are in C89 and contain some non-standard extra
- hacks required by MSVC.
-
-
-Getting and Installing MinGW
-
- You can download MinGW for 32-bit Windows from Sourceforge:
-
- http://sourceforge.net/project/showfiles.php?group_id=2435
-
- It is enough to pick Automated MinGW Installer and MSYS Base System.
- Using the automated installer, select at least runtime, w32api,
- core compiler, and MinGW make. From MSYS you actually need only
- certain tools, but it is easiest to just install the whole MSYS.
-
- To build for x86-64 version of Windows, you can download a snapshot
- of MinGW targeting for 64-bit Windows:
-
- http://sourceforge.net/project/showfiles.php?group_id=202880
-
- You can use the 32-bit MSYS also for 64-bit build, since we don't
- link against anything in MSYS, just use the tools from it. You may
- use the make tool from 32-bit MinGW (mingw32-make.exe) although
- probably the make.exe from MSYS works too.
-
- Naturally you can pick the components manually, for example to try
- the latest available GCC. It is also possible to use a cross-compiler
- to build Windows binaries for example on GNU/Linux, or use Wine to
- run the Windows binaries. However, these instructions focus on
- building on Windows.
-
-
-Building for 32-bit Windows
-
- Add MinGW and MSYS to PATH (adjust if you installed to non-default
- location):
-
- set PATH=C:\MinGW\bin;C:\MSYS\1.0\bin;%PATH%
-
- Then it should be enough to just run mingw32-make in this directory
- (the directory containing this README):
-
- mingw32-make
-
-
-Building for 64-bit Windows
-
- For 64-bit build the PATH has to point to 64-bit MinGW:
-
- set PATH=C:\MinGW64\bin;C:\MSYS\1.0\bin;%PATH%
-
- You need to pass W64=1 to mingw32-make (or make if you don't have
- mingw32-make):
-
- mingw32-make W64=1
-
-
-Additional Make Flags and Targets
-
- You may want to try some additional optimizations, which may or
- may not make the code faster (and may or may not hit possible
- compiler bugs more easily):
-
- mingw32-make CFLAGS="-O3 -fomit-frame-pointer -funroll-loops"
-
- If you want to enable assertions (the assert() macro), use DEBUG=1.
- You may want to disable optimizations too if you plan to actually
- debug the code. Never use DEBUG=1 for production builds!
-
- mingw32-make DEBUG=1 CFLAGS="-g -O0"
-
- To copy the built binaries and required headers into a clean
- directory, use the pkg target:
-
- mingw32-make pkg
-
- It first removes a possibly existing pkg directory, and then
- recreates it with the required files.
-
- TODO: The pkg target doesn't copy any license or other copyright
- related information into the pkg directory.
-
-
-Creating an Import Library for MSVC
-
- The included Makefile creates import library liblzma.a which works
- only(?) with MinGW. To use liblzma.dll for MSVC, you need to create
- liblzma.lib using the lib command from MSVC:
-
- lib /def:liblzma.def /out:liblzma.lib /machine:ix86
-
- On x86-64, the /machine argument has to naturally be changed:
-
- lib /def:liblzma.def /out:liblzma.lib /machine:x64
-
-
-To Do
-
- - Test Win64 support and add instructions about getting x86-64
- version of MinGW.
-
- - Creating the import library for other compilers/linkers
-
- - Building with other compilers for Windows
-
- - liblzma currently uses cdecl. Would stdcall be more compatible?
-
- - Support building more size-optimized liblzma (the HAVE_SMALL
- define and other things that are needed)
-
- - Support selecting which parts of liblzma to build to make the
- library even smaller.
-
- - Use the configure script on Windows just like it is used on all
- the other systems?
-
-
-Bugs
-
- Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
-
- Take into account that I don't have MSVC and I cannot very easily
- test anything on Windows. As of writing, I have tried MinGW and the
- resulting binaries only under 32-bit Wine.
-
diff --git a/Build/source/extra/xz-4.999.9beta/windows/config.h b/Build/source/extra/xz-4.999.9beta/windows/config.h
deleted file mode 100644
index 4d3371348db..00000000000
--- a/Build/source/extra/xz-4.999.9beta/windows/config.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Define to 1 if using x86 assembler optimizations. */
-/* #undef HAVE_ASM_X86 */
-
-/* Define to 1 if using x86_64 assembler optimizations. */
-/* #undef HAVE_ASM_X86_64 */
-
-/* Define to 1 if crc32 integrity check is enabled. */
-#define HAVE_CHECK_CRC32 1
-
-/* Define to 1 if crc64 integrity check is enabled. */
-#define HAVE_CHECK_CRC64 1
-
-/* Define to 1 if sha256 integrity check is enabled. */
-#define HAVE_CHECK_SHA256 1
-
-/* Define to 1 if decoder components are enabled. */
-#define HAVE_DECODER 1
-
-/* Define to 1 if arm decoder is enabled. */
-#define HAVE_DECODER_ARM 1
-
-/* Define to 1 if armthumb decoder is enabled. */
-#define HAVE_DECODER_ARMTHUMB 1
-
-/* Define to 1 if delta decoder is enabled. */
-#define HAVE_DECODER_DELTA 1
-
-/* Define to 1 if ia64 decoder is enabled. */
-#define HAVE_DECODER_IA64 1
-
-/* Define to 1 if lzma1 decoder is enabled. */
-#define HAVE_DECODER_LZMA1 1
-
-/* Define to 1 if lzma2 decoder is enabled. */
-#define HAVE_DECODER_LZMA2 1
-
-/* Define to 1 if powerpc decoder is enabled. */
-#define HAVE_DECODER_POWERPC 1
-
-/* Define to 1 if sparc decoder is enabled. */
-#define HAVE_DECODER_SPARC 1
-
-/* Define to 1 if subblock decoder is enabled. */
-/* #undef HAVE_DECODER_SUBBLOCK */
-
-/* Define to 1 if x86 decoder is enabled. */
-#define HAVE_DECODER_X86 1
-
-/* Define to 1 if encoder components are enabled. */
-#define HAVE_ENCODER 1
-
-/* Define to 1 if arm encoder is enabled. */
-#define HAVE_ENCODER_ARM 1
-
-/* Define to 1 if armthumb encoder is enabled. */
-#define HAVE_ENCODER_ARMTHUMB 1
-
-/* Define to 1 if delta encoder is enabled. */
-#define HAVE_ENCODER_DELTA 1
-
-/* Define to 1 if ia64 encoder is enabled. */
-#define HAVE_ENCODER_IA64 1
-
-/* Define to 1 if lzma1 encoder is enabled. */
-#define HAVE_ENCODER_LZMA1 1
-
-/* Define to 1 if lzma2 encoder is enabled. */
-#define HAVE_ENCODER_LZMA2 1
-
-/* Define to 1 if powerpc encoder is enabled. */
-#define HAVE_ENCODER_POWERPC 1
-
-/* Define to 1 if sparc encoder is enabled. */
-#define HAVE_ENCODER_SPARC 1
-
-/* Define to 1 if subblock encoder is enabled. */
-/* #undef HAVE_ENCODER_SUBBLOCK */
-
-/* Define to 1 if x86 encoder is enabled. */
-#define HAVE_ENCODER_X86 1
-
-/* Define to 1 if the system supports fast unaligned memory access. */
-#define HAVE_FAST_UNALIGNED_ACCESS 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 to enable bt2 match finder. */
-#define HAVE_MF_BT2 1
-
-/* Define to 1 to enable bt3 match finder. */
-#define HAVE_MF_BT3 1
-
-/* Define to 1 to enable bt4 match finder. */
-#define HAVE_MF_BT4 1
-
-/* Define to 1 to enable hc3 match finder. */
-#define HAVE_MF_HC3 1
-
-/* Define to 1 to enable hc4 match finder. */
-#define HAVE_MF_HC4 1
-
-/* Define to 1 if optimizing for size. */
-/* #undef HAVE_SMALL */
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#define HAVE_STDBOOL_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-#define HAVE_UINTPTR_T 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the `utime' function. */
-#define HAVE_UTIME 1
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
- declarations. */
-#define HAVE_VISIBILITY 0
-
-/* Define to 1 if the system has the type `_Bool'. */
-#define HAVE__BOOL 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "XZ Utils"
-
-/* The size of `size_t', as computed by sizeof. */
-#ifdef _WIN64
-# define SIZEOF_SIZE_T 8
-#else
-# define SIZEOF_SIZE_T 4
-#endif
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-#elif ! defined __LITTLE_ENDIAN__
-/* # undef WORDS_BIGENDIAN */
-#endif