From cf178685aca107aa37c748de11da01562e78c46c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 15 Jun 2024 11:41:34 +0200 Subject: Adding upstream version 5.6.2. Signed-off-by: Daniel Baumann --- AUTHORS | 49 +- CMakeLists.txt | 1115 +- COPYING | 103 +- COPYING.0BSD | 11 + ChangeLog | 17790 ++++++++++---------- INSTALL | 220 +- Makefile.am | 85 +- Makefile.in | 150 +- NEWS | 716 + PACKAGERS | 30 +- README | 57 +- THANKS | 13 +- TODO | 4 - aclocal.m4 | 6 +- autogen.sh | 22 +- build-aux/config.guess | 102 +- build-aux/config.rpath | 2 +- build-aux/config.sub | 239 +- build-aux/ltmain.sh | 361 +- build-aux/manconv.sh | 6 +- build-aux/version.sh | 6 +- cmake/remove-ordinals.cmake | 5 +- cmake/tuklib_common.cmake | 7 +- cmake/tuklib_cpucores.cmake | 7 +- cmake/tuklib_integer.cmake | 76 +- cmake/tuklib_large_file_support.cmake | 7 +- cmake/tuklib_mbstr.cmake | 7 +- cmake/tuklib_physmem.cmake | 7 +- cmake/tuklib_progname.cmake | 7 +- config.h.in | 112 +- configure | 4766 +++--- configure.ac | 316 +- debug/Makefile.am | 9 +- debug/Makefile.in | 29 +- debug/crc32.c | 5 +- debug/full_flush.c | 5 +- debug/hex2bin.c | 5 +- debug/known_sizes.c | 5 +- debug/memusage.c | 5 +- debug/repeat.c | 5 +- debug/sync_flush.c | 5 +- debug/testfilegen-arm64.c | 116 + debug/translation.bash | 5 +- doc/api/annotated.html | 68 - doc/api/base_8h.html | 580 - doc/api/bc_s.png | Bin 675 -> 0 bytes doc/api/bc_sd.png | Bin 604 -> 0 bytes doc/api/bcj_8h.html | 105 - doc/api/block_8h.html | 758 - doc/api/check_8h.html | 340 - doc/api/classes.html | 60 - doc/api/closed.png | Bin 132 -> 0 bytes doc/api/container_8h.html | 1279 -- doc/api/delta_8h.html | 132 - doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html | 104 - doc/api/doc.svg | 12 - doc/api/docd.svg | 12 - doc/api/doxygen.css | 2017 --- doc/api/doxygen.svg | 28 - doc/api/files.html | 74 - doc/api/filter_8h.html | 1342 -- doc/api/folderclosed.svg | 11 - doc/api/folderclosedd.svg | 11 - doc/api/folderopen.svg | 17 - doc/api/folderopend.svg | 12 - doc/api/functions.html | 210 - doc/api/functions_vars.html | 210 - doc/api/globals.html | 272 - doc/api/globals_defs.html | 119 - doc/api/globals_enum.html | 71 - doc/api/globals_eval.html | 103 - doc/api/globals_func.html | 177 - doc/api/globals_type.html | 68 - doc/api/hardware_8h.html | 123 - doc/api/index.html | 53 - doc/api/index_8h.html | 1268 -- doc/api/index__hash_8h.html | 311 - doc/api/lzma12_8h.html | 436 - doc/api/lzma_8h.html | 109 - doc/api/nav_f.png | Bin 167 -> 0 bytes doc/api/nav_fd.png | Bin 144 -> 0 bytes doc/api/nav_g.png | Bin 95 -> 0 bytes doc/api/nav_h.png | Bin 97 -> 0 bytes doc/api/nav_hd.png | Bin 104 -> 0 bytes doc/api/open.png | Bin 121 -> 0 bytes doc/api/splitbar.png | Bin 309 -> 0 bytes doc/api/splitbard.png | Bin 278 -> 0 bytes doc/api/stream__flags_8h.html | 348 - doc/api/structlzma__allocator.html | 153 - doc/api/structlzma__block.html | 347 - doc/api/structlzma__filter.html | 114 - doc/api/structlzma__index__iter.html | 407 - doc/api/structlzma__mt.html | 256 - doc/api/structlzma__options__bcj.html | 95 - doc/api/structlzma__options__delta.html | 113 - doc/api/structlzma__options__lzma.html | 363 - doc/api/structlzma__stream.html | 251 - doc/api/structlzma__stream__flags.html | 134 - doc/api/sync_off.png | Bin 857 -> 0 bytes doc/api/sync_on.png | Bin 851 -> 0 bytes doc/api/tab_a.png | Bin 135 -> 0 bytes doc/api/tab_ad.png | Bin 133 -> 0 bytes doc/api/tab_b.png | Bin 178 -> 0 bytes doc/api/tab_bd.png | Bin 157 -> 0 bytes doc/api/tab_h.png | Bin 179 -> 0 bytes doc/api/tab_hd.png | Bin 168 -> 0 bytes doc/api/tab_s.png | Bin 208 -> 0 bytes doc/api/tab_sd.png | Bin 171 -> 0 bytes doc/api/tabs.css | 62 - doc/api/version_8h.html | 239 - doc/api/vli_8h.html | 323 - doc/examples/01_compress_easy.c | 7 +- doc/examples/02_decompress.c | 5 +- doc/examples/03_compress_custom.c | 5 +- doc/examples/04_compress_easy_mt.c | 5 +- doc/examples/11_file_info.c | 205 + doc/examples/Makefile | 6 +- doc/examples_old/xz_pipe_comp.c | 127 - doc/examples_old/xz_pipe_decomp.c | 123 - doc/lzma-file-format.txt | 16 +- doc/man/pdf-a4/lzmainfo-a4.pdf | Bin 16384 -> 0 bytes doc/man/pdf-a4/xz-a4.pdf | Bin 114746 -> 0 bytes doc/man/pdf-a4/xzdec-a4.pdf | Bin 19978 -> 0 bytes doc/man/pdf-a4/xzdiff-a4.pdf | Bin 17200 -> 0 bytes doc/man/pdf-a4/xzgrep-a4.pdf | Bin 18338 -> 0 bytes doc/man/pdf-a4/xzless-a4.pdf | Bin 15029 -> 0 bytes doc/man/pdf-a4/xzmore-a4.pdf | Bin 15203 -> 0 bytes doc/man/pdf-letter/lzmainfo-letter.pdf | Bin 16394 -> 0 bytes doc/man/pdf-letter/xz-letter.pdf | Bin 115882 -> 0 bytes doc/man/pdf-letter/xzdec-letter.pdf | Bin 19970 -> 0 bytes doc/man/pdf-letter/xzdiff-letter.pdf | Bin 17227 -> 0 bytes doc/man/pdf-letter/xzgrep-letter.pdf | Bin 18322 -> 0 bytes doc/man/pdf-letter/xzless-letter.pdf | Bin 15022 -> 0 bytes doc/man/pdf-letter/xzmore-letter.pdf | Bin 15159 -> 0 bytes doc/man/txt/lzmainfo.txt | 10 +- doc/man/txt/xz.txt | 752 +- doc/man/txt/xzdec.txt | 12 +- doc/man/txt/xzdiff.txt | 49 +- doc/man/txt/xzgrep.txt | 66 +- doc/man/txt/xzless.txt | 13 +- doc/man/txt/xzmore.txt | 31 +- doc/xz-file-format.txt | 33 +- dos/Makefile | 5 +- dos/config.h | 20 +- doxygen/Doxyfile | 2698 +-- doxygen/update-doxygen | 137 +- extra/7z2lzma/7z2lzma.bash | 6 +- extra/scanlzma/scanlzma.c | 2 + lib/Makefile.am | 14 +- lib/Makefile.in | 19 +- lib/getopt-cdefs.h | 72 + lib/getopt-core.h | 98 + lib/getopt-ext.h | 79 + lib/getopt-pfx-core.h | 68 + lib/getopt-pfx-ext.h | 72 + lib/getopt.c | 1142 +- lib/getopt.in.h | 230 +- lib/getopt1.c | 62 +- lib/getopt_int.h | 111 +- m4/ax_check_capsicum.m4 | 85 - m4/ax_pthread.m4 | 2 + m4/build-to-host.m4 | 79 + m4/getopt.m4 | 81 +- m4/gettext.m4 | 93 +- m4/host-cpu-c-abi.m4 | 245 +- m4/iconv.m4 | 38 +- m4/intlmacosx.m4 | 18 +- m4/lib-ld.m4 | 14 +- m4/lib-link.m4 | 34 +- m4/lib-prefix.m4 | 29 +- m4/libtool.m4 | 234 +- m4/ltoptions.m4 | 6 +- m4/ltsugar.m4 | 2 +- m4/ltversion.m4 | 12 +- m4/lt~obsolete.m4 | 2 +- m4/nls.m4 | 2 +- m4/po.m4 | 3 +- m4/posix-shell.m4 | 2 + m4/progtest.m4 | 10 +- m4/tuklib_common.m4 | 11 +- m4/tuklib_cpucores.m4 | 11 +- m4/tuklib_integer.m4 | 45 +- m4/tuklib_mbstr.m4 | 11 +- m4/tuklib_physmem.m4 | 11 +- m4/tuklib_progname.m4 | 13 +- m4/visibility.m4 | 15 +- macosx/build.sh | 113 - po/Makefile.in.in | 24 +- po/Makevars | 57 +- po/POTFILES.in | 4 + po/ca.gmo | Bin 26876 -> 22289 bytes po/ca.po | 554 +- po/cs.gmo | Bin 17576 -> 15436 bytes po/cs.po | 520 +- po/da.gmo | Bin 12015 -> 11042 bytes po/da.po | 516 +- po/de.gmo | Bin 28599 -> 32560 bytes po/de.po | 536 +- po/eo.gmo | Bin 26139 -> 29979 bytes po/eo.po | 567 +- po/es.gmo | Bin 27192 -> 31175 bytes po/es.po | 573 +- po/fi.gmo | Bin 25923 -> 21441 bytes po/fi.po | 554 +- po/fr.gmo | Bin 22307 -> 19342 bytes po/fr.po | 590 +- po/hr.gmo | Bin 26682 -> 30343 bytes po/hr.po | 713 +- po/hu.gmo | Bin 27374 -> 31658 bytes po/hu.po | 549 +- po/it.gmo | Bin 22043 -> 19130 bytes po/it.po | 536 +- po/ko.gmo | Bin 27394 -> 31480 bytes po/ko.po | 658 +- po/pl.gmo | Bin 26643 -> 30611 bytes po/pl.po | 548 +- po/pt.gmo | Bin 21887 -> 18992 bytes po/pt.po | 536 +- po/pt_BR.gmo | Bin 26890 -> 22302 bytes po/pt_BR.po | 554 +- po/ro.gmo | Bin 28538 -> 32640 bytes po/ro.po | 597 +- po/sr.gmo | Bin 27551 -> 23849 bytes po/sr.po | 536 +- po/sv.gmo | Bin 26576 -> 30379 bytes po/sv.po | 565 +- po/tr.gmo | Bin 26545 -> 22029 bytes po/tr.po | 554 +- po/uk.gmo | Bin 35322 -> 40332 bytes po/uk.po | 574 +- po/vi.gmo | Bin 28619 -> 32859 bytes po/vi.po | 570 +- po/xz.pot | 494 +- po/xz.pot-header | 7 + po/zh_CN.gmo | Bin 25247 -> 22476 bytes po/zh_CN.po | 557 +- po/zh_TW.gmo | Bin 24823 -> 20613 bytes po/zh_TW.po | 554 +- po4a/.gitignore | 2 - po4a/de.po | 5372 ++---- po4a/fr.po | 5652 ++----- po4a/ko.po | 5039 ++---- po4a/man/de/lzmainfo.1 | 5 +- po4a/man/de/xz.1 | 364 +- po4a/man/de/xzdec.1 | 7 +- po4a/man/de/xzdiff.1 | 63 +- po4a/man/de/xzgrep.1 | 76 +- po4a/man/de/xzless.1 | 14 +- po4a/man/de/xzmore.1 | 53 +- po4a/man/fr/lzmainfo.1 | 7 +- po4a/man/fr/xz.1 | 537 +- po4a/man/fr/xzdec.1 | 19 +- po4a/man/fr/xzdiff.1 | 43 - po4a/man/fr/xzless.1 | 17 +- po4a/man/fr/xzmore.1 | 41 - po4a/man/ko/lzmainfo.1 | 5 +- po4a/man/ko/xz.1 | 301 +- po4a/man/ko/xzdec.1 | 9 +- po4a/man/ko/xzdiff.1 | 52 +- po4a/man/ko/xzgrep.1 | 63 +- po4a/man/ko/xzless.1 | 12 +- po4a/man/ko/xzmore.1 | 44 +- po4a/man/pt_BR/lzmainfo.1 | 6 +- po4a/man/pt_BR/xz.1 | 388 +- po4a/man/pt_BR/xzdec.1 | 8 +- po4a/man/pt_BR/xzdiff.1 | 44 - po4a/man/pt_BR/xzgrep.1 | 63 - po4a/man/pt_BR/xzless.1 | 16 +- po4a/man/pt_BR/xzmore.1 | 39 - po4a/man/ro/lzmainfo.1 | 36 +- po4a/man/ro/xz.1 | 1205 +- po4a/man/ro/xzdec.1 | 40 +- po4a/man/ro/xzdiff.1 | 73 +- po4a/man/ro/xzgrep.1 | 89 +- po4a/man/ro/xzless.1 | 34 +- po4a/man/ro/xzmore.1 | 63 +- po4a/man/uk/lzmainfo.1 | 5 +- po4a/man/uk/xz.1 | 358 +- po4a/man/uk/xzdec.1 | 7 +- po4a/man/uk/xzdiff.1 | 59 +- po4a/man/uk/xzgrep.1 | 75 +- po4a/man/uk/xzless.1 | 13 +- po4a/man/uk/xzmore.1 | 54 +- po4a/po4a.conf | 16 +- po4a/pt_BR.po | 5226 ++---- po4a/ro.po | 5349 ++---- po4a/uk.po | 5264 ++---- po4a/update-po | 60 +- po4a/xz-man.pot | 3431 ++-- src/Makefile.am | 6 +- src/Makefile.in | 7 +- src/common/common_w32res.rc | 5 +- src/common/mythread.h | 30 +- src/common/sysdefs.h | 18 +- src/common/tuklib_common.h | 27 +- src/common/tuklib_config.h | 2 + src/common/tuklib_cpucores.c | 5 +- src/common/tuklib_cpucores.h | 5 +- src/common/tuklib_exit.c | 5 +- src/common/tuklib_exit.h | 9 +- src/common/tuklib_gettext.h | 5 +- src/common/tuklib_integer.h | 56 +- src/common/tuklib_mbstr.h | 5 +- src/common/tuklib_mbstr_fw.c | 5 +- src/common/tuklib_mbstr_width.c | 5 +- src/common/tuklib_open_stdxxx.c | 5 +- src/common/tuklib_open_stdxxx.h | 5 +- src/common/tuklib_physmem.c | 25 +- src/common/tuklib_physmem.h | 5 +- src/common/tuklib_progname.c | 5 +- src/common/tuklib_progname.h | 5 +- src/liblzma/Makefile.am | 8 +- src/liblzma/Makefile.in | 100 +- src/liblzma/api/Makefile.am | 25 +- src/liblzma/api/Makefile.in | 63 +- src/liblzma/api/lzma.h | 31 +- src/liblzma/api/lzma/base.h | 25 +- src/liblzma/api/lzma/bcj.h | 10 +- src/liblzma/api/lzma/block.h | 5 +- src/liblzma/api/lzma/check.h | 5 +- src/liblzma/api/lzma/container.h | 45 +- src/liblzma/api/lzma/delta.h | 5 +- src/liblzma/api/lzma/filter.h | 11 +- src/liblzma/api/lzma/hardware.h | 5 +- src/liblzma/api/lzma/index.h | 42 +- src/liblzma/api/lzma/index_hash.h | 5 +- src/liblzma/api/lzma/lzma12.h | 7 +- src/liblzma/api/lzma/stream_flags.h | 5 +- src/liblzma/api/lzma/version.h | 9 +- src/liblzma/api/lzma/vli.h | 10 +- src/liblzma/check/Makefile.inc | 15 +- src/liblzma/check/check.c | 5 +- src/liblzma/check/check.h | 5 +- src/liblzma/check/crc32_arm64.h | 122 + src/liblzma/check/crc32_fast.c | 158 +- src/liblzma/check/crc32_small.c | 5 +- src/liblzma/check/crc32_table.c | 34 +- src/liblzma/check/crc32_table_be.h | 4 +- src/liblzma/check/crc32_table_le.h | 4 +- src/liblzma/check/crc32_tablegen.c | 23 +- src/liblzma/check/crc32_x86.S | 5 +- src/liblzma/check/crc64_fast.c | 446 +- src/liblzma/check/crc64_small.c | 5 +- src/liblzma/check/crc64_table.c | 16 +- src/liblzma/check/crc64_table_be.h | 4 +- src/liblzma/check/crc64_table_le.h | 4 +- src/liblzma/check/crc64_tablegen.c | 15 +- src/liblzma/check/crc64_x86.S | 5 +- src/liblzma/check/crc_common.h | 137 + src/liblzma/check/crc_macros.h | 30 - src/liblzma/check/crc_x86_clmul.h | 428 + src/liblzma/check/sha256.c | 19 +- src/liblzma/common/Makefile.inc | 6 +- src/liblzma/common/alone_decoder.c | 5 +- src/liblzma/common/alone_decoder.h | 5 +- src/liblzma/common/alone_encoder.c | 5 +- src/liblzma/common/auto_decoder.c | 5 +- src/liblzma/common/block_buffer_decoder.c | 5 +- src/liblzma/common/block_buffer_encoder.c | 5 +- src/liblzma/common/block_buffer_encoder.h | 5 +- src/liblzma/common/block_decoder.c | 5 +- src/liblzma/common/block_decoder.h | 5 +- src/liblzma/common/block_encoder.c | 5 +- src/liblzma/common/block_encoder.h | 5 +- src/liblzma/common/block_header_decoder.c | 5 +- src/liblzma/common/block_header_encoder.c | 5 +- src/liblzma/common/block_util.c | 5 +- src/liblzma/common/common.c | 5 +- src/liblzma/common/common.h | 5 +- src/liblzma/common/easy_buffer_encoder.c | 5 +- src/liblzma/common/easy_decoder_memusage.c | 5 +- src/liblzma/common/easy_encoder.c | 5 +- src/liblzma/common/easy_encoder_memusage.c | 5 +- src/liblzma/common/easy_preset.c | 5 +- src/liblzma/common/easy_preset.h | 10 +- src/liblzma/common/file_info.c | 5 +- src/liblzma/common/filter_buffer_decoder.c | 7 +- src/liblzma/common/filter_buffer_encoder.c | 5 +- src/liblzma/common/filter_common.c | 16 +- src/liblzma/common/filter_common.h | 5 +- src/liblzma/common/filter_decoder.c | 28 +- src/liblzma/common/filter_decoder.h | 5 +- src/liblzma/common/filter_encoder.c | 54 +- src/liblzma/common/filter_encoder.h | 11 +- src/liblzma/common/filter_flags_decoder.c | 5 +- src/liblzma/common/filter_flags_encoder.c | 5 +- src/liblzma/common/hardware_cputhreads.c | 5 +- src/liblzma/common/hardware_physmem.c | 5 +- src/liblzma/common/index.c | 5 +- src/liblzma/common/index.h | 5 +- src/liblzma/common/index_decoder.c | 16 +- src/liblzma/common/index_decoder.h | 5 +- src/liblzma/common/index_encoder.c | 5 +- src/liblzma/common/index_encoder.h | 5 +- src/liblzma/common/index_hash.c | 5 +- src/liblzma/common/lzip_decoder.c | 5 +- src/liblzma/common/lzip_decoder.h | 5 +- src/liblzma/common/memcmplen.h | 37 +- src/liblzma/common/microlzma_decoder.c | 5 +- src/liblzma/common/microlzma_encoder.c | 5 +- src/liblzma/common/outqueue.c | 5 +- src/liblzma/common/outqueue.h | 10 +- src/liblzma/common/stream_buffer_decoder.c | 5 +- src/liblzma/common/stream_buffer_encoder.c | 5 +- src/liblzma/common/stream_decoder.c | 5 +- src/liblzma/common/stream_decoder.h | 5 +- src/liblzma/common/stream_decoder_mt.c | 5 +- src/liblzma/common/stream_encoder.c | 5 +- src/liblzma/common/stream_encoder_mt.c | 25 +- src/liblzma/common/stream_flags_common.c | 5 +- src/liblzma/common/stream_flags_common.h | 5 +- src/liblzma/common/stream_flags_decoder.c | 5 +- src/liblzma/common/stream_flags_encoder.c | 5 +- src/liblzma/common/string_conversion.c | 26 +- src/liblzma/common/vli_decoder.c | 5 +- src/liblzma/common/vli_encoder.c | 5 +- src/liblzma/common/vli_size.c | 5 +- src/liblzma/delta/Makefile.inc | 6 +- src/liblzma/delta/delta_common.c | 5 +- src/liblzma/delta/delta_common.h | 5 +- src/liblzma/delta/delta_decoder.c | 10 +- src/liblzma/delta/delta_decoder.h | 5 +- src/liblzma/delta/delta_encoder.c | 5 +- src/liblzma/delta/delta_encoder.h | 5 +- src/liblzma/delta/delta_private.h | 5 +- src/liblzma/liblzma.pc.in | 6 +- src/liblzma/liblzma_generic.map | 7 + src/liblzma/liblzma_linux.map | 7 + src/liblzma/liblzma_w32res.rc | 5 +- src/liblzma/lz/Makefile.inc | 6 +- src/liblzma/lz/lz_decoder.c | 48 +- src/liblzma/lz/lz_decoder.h | 116 +- src/liblzma/lz/lz_encoder.c | 13 +- src/liblzma/lz/lz_encoder.h | 21 +- src/liblzma/lz/lz_encoder_hash.h | 5 +- src/liblzma/lz/lz_encoder_hash_table.h | 4 +- src/liblzma/lz/lz_encoder_mf.c | 5 +- src/liblzma/lzma/Makefile.inc | 6 +- src/liblzma/lzma/fastpos.h | 5 +- src/liblzma/lzma/fastpos_table.c | 4 +- src/liblzma/lzma/fastpos_tablegen.c | 17 +- src/liblzma/lzma/lzma2_decoder.c | 5 +- src/liblzma/lzma/lzma2_decoder.h | 5 +- src/liblzma/lzma/lzma2_encoder.c | 8 +- src/liblzma/lzma/lzma2_encoder.h | 5 +- src/liblzma/lzma/lzma_common.h | 41 +- src/liblzma/lzma/lzma_decoder.c | 760 +- src/liblzma/lzma/lzma_decoder.h | 5 +- src/liblzma/lzma/lzma_encoder.c | 18 +- src/liblzma/lzma/lzma_encoder.h | 5 +- src/liblzma/lzma/lzma_encoder_optimum_fast.c | 5 +- src/liblzma/lzma/lzma_encoder_optimum_normal.c | 7 +- src/liblzma/lzma/lzma_encoder_presets.c | 5 +- src/liblzma/lzma/lzma_encoder_private.h | 9 +- src/liblzma/rangecoder/Makefile.inc | 6 +- src/liblzma/rangecoder/price.h | 5 +- src/liblzma/rangecoder/price_table.c | 4 +- src/liblzma/rangecoder/price_tablegen.c | 22 +- src/liblzma/rangecoder/range_common.h | 14 +- src/liblzma/rangecoder/range_decoder.h | 839 +- src/liblzma/rangecoder/range_encoder.h | 5 +- src/liblzma/simple/Makefile.inc | 10 +- src/liblzma/simple/arm.c | 5 +- src/liblzma/simple/arm64.c | 5 +- src/liblzma/simple/armthumb.c | 5 +- src/liblzma/simple/ia64.c | 5 +- src/liblzma/simple/powerpc.c | 5 +- src/liblzma/simple/riscv.c | 755 + src/liblzma/simple/simple_coder.c | 5 +- src/liblzma/simple/simple_coder.h | 22 +- src/liblzma/simple/simple_decoder.c | 5 +- src/liblzma/simple/simple_decoder.h | 5 +- src/liblzma/simple/simple_encoder.c | 5 +- src/liblzma/simple/simple_encoder.h | 5 +- src/liblzma/simple/simple_private.h | 5 +- src/liblzma/simple/sparc.c | 5 +- src/liblzma/simple/x86.c | 16 +- src/liblzma/validate_map.sh | 6 +- src/lzmainfo/Makefile.am | 32 +- src/lzmainfo/Makefile.in | 60 +- src/lzmainfo/lzmainfo.1 | 4 +- src/lzmainfo/lzmainfo.c | 5 +- src/lzmainfo/lzmainfo_w32res.rc | 5 +- src/scripts/Makefile.am | 6 +- src/scripts/Makefile.in | 7 +- src/scripts/xzdiff.1 | 95 +- src/scripts/xzdiff.in | 19 +- src/scripts/xzgrep.1 | 119 +- src/scripts/xzgrep.in | 8 +- src/scripts/xzless.1 | 12 +- src/scripts/xzless.in | 21 +- src/scripts/xzmore.1 | 78 +- src/scripts/xzmore.in | 3 +- src/xz/Makefile.am | 10 +- src/xz/Makefile.in | 57 +- src/xz/args.c | 186 +- src/xz/args.h | 8 +- src/xz/coder.c | 607 +- src/xz/coder.h | 42 +- src/xz/file_io.c | 144 +- src/xz/file_io.h | 21 +- src/xz/hardware.c | 11 +- src/xz/hardware.h | 5 +- src/xz/list.c | 31 +- src/xz/list.h | 5 +- src/xz/main.c | 91 +- src/xz/main.h | 5 +- src/xz/message.c | 94 +- src/xz/message.h | 16 +- src/xz/mytime.c | 105 +- src/xz/mytime.h | 11 +- src/xz/options.c | 7 +- src/xz/options.h | 5 +- src/xz/private.h | 26 +- src/xz/sandbox.c | 355 + src/xz/sandbox.h | 43 + src/xz/signals.c | 29 +- src/xz/signals.h | 5 +- src/xz/suffix.c | 17 +- src/xz/suffix.h | 5 +- src/xz/util.c | 36 +- src/xz/util.h | 19 +- src/xz/xz.1 | 469 +- src/xz/xz_w32res.rc | 5 +- src/xzdec/Makefile.am | 6 +- src/xzdec/Makefile.in | 7 +- src/xzdec/lzmadec_w32res.rc | 5 +- src/xzdec/xzdec.1 | 6 +- src/xzdec/xzdec.c | 180 +- src/xzdec/xzdec_w32res.rc | 5 +- tests/Makefile.am | 21 +- tests/Makefile.in | 65 +- tests/bcj_test.c | 65 - tests/compress_prepared_bcj_sparc | Bin 1240 -> 0 bytes tests/compress_prepared_bcj_x86 | Bin 1388 -> 0 bytes tests/create_compress_files.c | 5 +- tests/files/README | 30 +- tests/files/good-1-sparc-lzma2.xz | Bin 612 -> 0 bytes tests/files/good-1-x86-lzma2.xz | Bin 716 -> 0 bytes tests/ossfuzz/Makefile | 18 +- tests/ossfuzz/config/fuzz.dict | 2 - tests/ossfuzz/config/fuzz.options | 2 - tests/ossfuzz/config/fuzz_decode_alone.options | 5 + tests/ossfuzz/config/fuzz_decode_stream.options | 4 + tests/ossfuzz/config/fuzz_encode_stream.options | 4 + tests/ossfuzz/config/fuzz_lzma.dict | 22 + tests/ossfuzz/config/fuzz_xz.dict | 4 + tests/ossfuzz/fuzz.c | 82 - tests/ossfuzz/fuzz_common.h | 55 + tests/ossfuzz/fuzz_decode_alone.c | 41 + tests/ossfuzz/fuzz_decode_stream.c | 53 + tests/ossfuzz/fuzz_encode_stream.c | 86 + tests/test_bcj_exact_size.c | 5 +- tests/test_block_header.c | 7 +- tests/test_check.c | 5 +- tests/test_compress.sh | 68 +- tests/test_compress_generated_abc | 1 + tests/test_compress_generated_random | 1 + tests/test_compress_generated_text | 1 + tests/test_compress_prepared_bcj_sparc | 3 - tests/test_compress_prepared_bcj_x86 | 3 - tests/test_files.sh | 29 +- tests/test_filter_flags.c | 42 +- tests/test_filter_str.c | 104 +- tests/test_hardware.c | 5 +- tests/test_index.c | 192 +- tests/test_index_hash.c | 5 +- tests/test_lzip_decoder.c | 85 +- tests/test_memlimit.c | 5 +- tests/test_microlzma.c | 568 + tests/test_scripts.sh | 17 +- tests/test_stream_flags.c | 5 +- tests/test_suffix.sh | 192 + tests/test_vli.c | 5 +- tests/tests.cmake | 198 + tests/tests.h | 5 +- tests/tuktest.h | 18 +- windows/INSTALL-MSVC.txt | 44 +- windows/INSTALL-MinGW-w64_with_Autotools.txt | 49 + windows/INSTALL-MinGW-w64_with_CMake.txt | 203 + windows/INSTALL-MinGW.txt | 138 - windows/README-Windows.txt | 116 +- windows/build-with-cmake.bat | 35 + windows/build.bash | 209 +- windows/liblzma-crt-mixing.txt | 70 + windows/vs2013/config.h | 157 - windows/vs2013/liblzma.vcxproj | 363 - windows/vs2013/liblzma_dll.vcxproj | 398 - windows/vs2013/xz_win.sln | 48 - windows/vs2017/config.h | 157 - windows/vs2017/liblzma.vcxproj | 363 - windows/vs2017/liblzma_dll.vcxproj | 398 - windows/vs2017/xz_win.sln | 48 - windows/vs2019/config.h | 157 - windows/vs2019/liblzma.vcxproj | 364 - windows/vs2019/liblzma_dll.vcxproj | 399 - windows/vs2019/xz_win.sln | 51 - 597 files changed, 47897 insertions(+), 68011 deletions(-) create mode 100644 COPYING.0BSD create mode 100644 debug/testfilegen-arm64.c delete mode 100644 doc/api/annotated.html delete mode 100644 doc/api/base_8h.html delete mode 100644 doc/api/bc_s.png delete mode 100644 doc/api/bc_sd.png delete mode 100644 doc/api/bcj_8h.html delete mode 100644 doc/api/block_8h.html delete mode 100644 doc/api/check_8h.html delete mode 100644 doc/api/classes.html delete mode 100644 doc/api/closed.png delete mode 100644 doc/api/container_8h.html delete mode 100644 doc/api/delta_8h.html delete mode 100644 doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html delete mode 100644 doc/api/doc.svg delete mode 100644 doc/api/docd.svg delete mode 100644 doc/api/doxygen.css delete mode 100644 doc/api/doxygen.svg delete mode 100644 doc/api/files.html delete mode 100644 doc/api/filter_8h.html delete mode 100644 doc/api/folderclosed.svg delete mode 100644 doc/api/folderclosedd.svg delete mode 100644 doc/api/folderopen.svg delete mode 100644 doc/api/folderopend.svg delete mode 100644 doc/api/functions.html delete mode 100644 doc/api/functions_vars.html delete mode 100644 doc/api/globals.html delete mode 100644 doc/api/globals_defs.html delete mode 100644 doc/api/globals_enum.html delete mode 100644 doc/api/globals_eval.html delete mode 100644 doc/api/globals_func.html delete mode 100644 doc/api/globals_type.html delete mode 100644 doc/api/hardware_8h.html delete mode 100644 doc/api/index.html delete mode 100644 doc/api/index_8h.html delete mode 100644 doc/api/index__hash_8h.html delete mode 100644 doc/api/lzma12_8h.html delete mode 100644 doc/api/lzma_8h.html delete mode 100644 doc/api/nav_f.png delete mode 100644 doc/api/nav_fd.png delete mode 100644 doc/api/nav_g.png delete mode 100644 doc/api/nav_h.png delete mode 100644 doc/api/nav_hd.png delete mode 100644 doc/api/open.png delete mode 100644 doc/api/splitbar.png delete mode 100644 doc/api/splitbard.png delete mode 100644 doc/api/stream__flags_8h.html delete mode 100644 doc/api/structlzma__allocator.html delete mode 100644 doc/api/structlzma__block.html delete mode 100644 doc/api/structlzma__filter.html delete mode 100644 doc/api/structlzma__index__iter.html delete mode 100644 doc/api/structlzma__mt.html delete mode 100644 doc/api/structlzma__options__bcj.html delete mode 100644 doc/api/structlzma__options__delta.html delete mode 100644 doc/api/structlzma__options__lzma.html delete mode 100644 doc/api/structlzma__stream.html delete mode 100644 doc/api/structlzma__stream__flags.html delete mode 100644 doc/api/sync_off.png delete mode 100644 doc/api/sync_on.png delete mode 100644 doc/api/tab_a.png delete mode 100644 doc/api/tab_ad.png delete mode 100644 doc/api/tab_b.png delete mode 100644 doc/api/tab_bd.png delete mode 100644 doc/api/tab_h.png delete mode 100644 doc/api/tab_hd.png delete mode 100644 doc/api/tab_s.png delete mode 100644 doc/api/tab_sd.png delete mode 100644 doc/api/tabs.css delete mode 100644 doc/api/version_8h.html delete mode 100644 doc/api/vli_8h.html create mode 100644 doc/examples/11_file_info.c delete mode 100644 doc/examples_old/xz_pipe_comp.c delete mode 100644 doc/examples_old/xz_pipe_decomp.c delete mode 100644 doc/man/pdf-a4/lzmainfo-a4.pdf delete mode 100644 doc/man/pdf-a4/xz-a4.pdf delete mode 100644 doc/man/pdf-a4/xzdec-a4.pdf delete mode 100644 doc/man/pdf-a4/xzdiff-a4.pdf delete mode 100644 doc/man/pdf-a4/xzgrep-a4.pdf delete mode 100644 doc/man/pdf-a4/xzless-a4.pdf delete mode 100644 doc/man/pdf-a4/xzmore-a4.pdf delete mode 100644 doc/man/pdf-letter/lzmainfo-letter.pdf delete mode 100644 doc/man/pdf-letter/xz-letter.pdf delete mode 100644 doc/man/pdf-letter/xzdec-letter.pdf delete mode 100644 doc/man/pdf-letter/xzdiff-letter.pdf delete mode 100644 doc/man/pdf-letter/xzgrep-letter.pdf delete mode 100644 doc/man/pdf-letter/xzless-letter.pdf delete mode 100644 doc/man/pdf-letter/xzmore-letter.pdf create mode 100644 lib/getopt-cdefs.h create mode 100644 lib/getopt-core.h create mode 100644 lib/getopt-ext.h create mode 100644 lib/getopt-pfx-core.h create mode 100644 lib/getopt-pfx-ext.h delete mode 100644 m4/ax_check_capsicum.m4 create mode 100644 m4/build-to-host.m4 delete mode 100755 macosx/build.sh create mode 100644 po/xz.pot-header delete mode 100644 po4a/.gitignore delete mode 100644 po4a/man/fr/xzdiff.1 delete mode 100644 po4a/man/fr/xzmore.1 delete mode 100644 po4a/man/pt_BR/xzdiff.1 delete mode 100644 po4a/man/pt_BR/xzgrep.1 delete mode 100644 po4a/man/pt_BR/xzmore.1 create mode 100644 src/liblzma/check/crc32_arm64.h create mode 100644 src/liblzma/check/crc_common.h delete mode 100644 src/liblzma/check/crc_macros.h create mode 100644 src/liblzma/check/crc_x86_clmul.h create mode 100644 src/liblzma/simple/riscv.c create mode 100644 src/xz/sandbox.c create mode 100644 src/xz/sandbox.h delete mode 100644 tests/bcj_test.c delete mode 100644 tests/compress_prepared_bcj_sparc delete mode 100644 tests/compress_prepared_bcj_x86 delete mode 100644 tests/files/good-1-sparc-lzma2.xz delete mode 100644 tests/files/good-1-x86-lzma2.xz delete mode 100644 tests/ossfuzz/config/fuzz.dict delete mode 100644 tests/ossfuzz/config/fuzz.options create mode 100644 tests/ossfuzz/config/fuzz_decode_alone.options create mode 100644 tests/ossfuzz/config/fuzz_decode_stream.options create mode 100644 tests/ossfuzz/config/fuzz_encode_stream.options create mode 100644 tests/ossfuzz/config/fuzz_lzma.dict create mode 100644 tests/ossfuzz/config/fuzz_xz.dict delete mode 100644 tests/ossfuzz/fuzz.c create mode 100644 tests/ossfuzz/fuzz_common.h create mode 100644 tests/ossfuzz/fuzz_decode_alone.c create mode 100644 tests/ossfuzz/fuzz_decode_stream.c create mode 100644 tests/ossfuzz/fuzz_encode_stream.c delete mode 100755 tests/test_compress_prepared_bcj_sparc delete mode 100755 tests/test_compress_prepared_bcj_x86 create mode 100644 tests/test_microlzma.c create mode 100755 tests/test_suffix.sh create mode 100644 tests/tests.cmake create mode 100644 windows/INSTALL-MinGW-w64_with_Autotools.txt create mode 100644 windows/INSTALL-MinGW-w64_with_CMake.txt delete mode 100644 windows/INSTALL-MinGW.txt create mode 100644 windows/build-with-cmake.bat create mode 100644 windows/liblzma-crt-mixing.txt delete mode 100644 windows/vs2013/config.h delete mode 100644 windows/vs2013/liblzma.vcxproj delete mode 100644 windows/vs2013/liblzma_dll.vcxproj delete mode 100644 windows/vs2013/xz_win.sln delete mode 100644 windows/vs2017/config.h delete mode 100644 windows/vs2017/liblzma.vcxproj delete mode 100644 windows/vs2017/liblzma_dll.vcxproj delete mode 100644 windows/vs2017/xz_win.sln delete mode 100644 windows/vs2019/config.h delete mode 100644 windows/vs2019/liblzma.vcxproj delete mode 100644 windows/vs2019/liblzma_dll.vcxproj delete mode 100644 windows/vs2019/xz_win.sln diff --git a/AUTHORS b/AUTHORS index 69bbfc3..5eff238 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,22 +2,20 @@ Authors of XZ Utils =================== - XZ Utils is developed and maintained by Lasse Collin - and Jia Tan . + XZ Utils is developed and maintained by + Lasse Collin . Major parts of liblzma are based on code written by Igor Pavlov, specifically the LZMA SDK . Without this code, XZ Utils wouldn't exist. - The SHA-256 implementation in liblzma is based on the code found from - 7-Zip , which has a modified version of the SHA-256 - code found from Crypto++ . The SHA-256 code - in Crypto++ was written by Kevin Springle and Wei Dai. + The SHA-256 implementation in liblzma is based on code written by + Wei Dai in Crypto++ Library . - Some scripts have been adapted from gzip. The original versions - were written by Jean-loup Gailly, Charles Levert, and Paul Eggert. - Andrew Dudman helped adapting the scripts and their man pages for - XZ Utils. + A few scripts have been adapted from GNU gzip. The original + versions were written by Jean-loup Gailly, Charles Levert, and + Paul Eggert. Andrew Dudman helped adapting the scripts and their + man pages for XZ Utils. The initial version of the threaded .xz decompressor was written by Sebastian Andrzej Siewior. @@ -25,15 +23,36 @@ Authors of XZ Utils The initial version of the .lz (lzip) decoder was written by Michał Górny. - CLMUL-accelerated CRC code was contributed by Ilya Kurdyukov. + Architecture-specific CRC optimizations were contributed by + Ilya Kurdyukov, Hans Jansen, and Chenxi Mao. Other authors: - Jonathan Nieder - Joachim Henke - The GNU Autotools-based build system contains files from many authors, - which I'm not trying to list here. + Special author: Jia Tan was a co-maintainer in 2022-2024. He and + the team behind him inserted a backdoor (CVE-2024-3094) into + XZ Utils 5.6.0 and 5.6.1 releases. He suddenly disappeared when + this was discovered. - Several people have contributed fixes or reported bugs. Most of them - are mentioned in the file THANKS. + Many people have contributed improvements or reported bugs. + Most of these people are mentioned in the file THANKS. + + The translations of the command line tools and man pages have been + contributed by many people via the Translation Project: + + - https://translationproject.org/domain/xz.html + - https://translationproject.org/domain/xz-man.html + + The authors of the translated man pages are in the header comments + of the man page files. In the source package, the authors of the + translations are in po/*.po and po4a/*.po files. + + Third-party code whose authors aren't listed here: + + - GNU getopt_long() in the 'lib' directory is included for + platforms that don't have a usable getopt_long(). + + - The build system files from GNU Autoconf, GNU Automake, + GNU Libtool, GNU Gettext, Autoconf Archive, and related files. diff --git a/CMakeLists.txt b/CMakeLists.txt index b214d71..59ecf01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,32 +1,88 @@ +# SPDX-License-Identifier: 0BSD + ############################################################################# # -# Very limited CMake support for building some parts of XZ Utils +# CMake support for building XZ Utils +# +# The complete CMake-based build hasn't been tested much yet and +# thus it's still slightly experimental. Testing this especially +# outside GNU/Linux and Windows would be great now. +# +# A few things are still missing compared to the Autotools-based build: +# +# - 32-bit x86 assembly code for CRC32 and CRC64 isn't used by default. +# Use the option -DENABLE_X86_ASM=ON on the CMake command line to +# enable the assembly files. They are compatible with Linux, *BSDs, +# Cygwin, MinGW-w64, and Darwin. They are NOT compatible with MSVC. +# +# NOTE: The C code includes a generic version compatible with all +# processors and CLMUL version that requires a new enough processor +# with the PCLMULQDQ instruction. If the 32-bit x86 assembly files +# are used, the CLMUL version in the C code is NOT built. On modern +# processors with CLMUL support, the C code should be faster than +# the assembly code while on old processors the assembly code wins. +# +# - External SHA-256 code isn't supported but it's disabled by +# default in the Autotools build too (--enable-external-sha256). +# +# - Extra compiler warning flags aren't added by default. +# +# About CMAKE_BUILD_TYPE: # -# For now, this is intended to be useful to build static or shared liblzma -# on Windows with MSVC (to avoid the need to maintain Visual Studio project -# files). Building liblzma on a few other platforms should work too but it -# is somewhat experimental and not as portable as using ./configure. +# - CMake's standard choices are fine to use for production builds, +# including "Release" and "RelWithDebInfo". # -# On some platforms this builds also xz and xzdec, but these are -# highly experimental and meant for testing only: -# - No replacement getopt_long(), libc must have it -# - No sandboxing support -# - No translations +# NOTE: While "Release" uses -O3 by default with some compilers, +# this file overrides -O3 to -O2 for "Release" builds if +# CMAKE_C_FLAGS_RELEASE is not defined by the user. At least +# with GCC and Clang/LLVM, -O3 doesn't seem useful for this +# package as it can result in bigger binaries without any +# improvement in speed compared to -O2. # -# Other missing things: -# - No xzgrep or other scripts or their symlinks -# - No xz tests (liblzma tests only) +# - Empty value (the default) is handled slightly specially: It +# adds -DNDEBUG to disable debugging code (assert() and a few +# other things). No optimization flags are added so an empty +# CMAKE_BUILD_TYPE is an easy way to build with whatever +# optimization flags one wants, and so this method is also +# suitable for production builds. # -# NOTE: Even if the code compiles without warnings, the end result may be -# different than via ./configure. Specifically, the list of #defines -# may be different (if so, probably this CMakeLists.txt got them wrong). +# If debugging is wanted when using empty CMAKE_BUILD_TYPE, +# include -UNDEBUG in the CFLAGS environment variable or +# in the CMAKE_C_FLAGS CMake variable to override -DNDEBUG. +# With empty CMAKE_BUILD_TYPE, the -UNDEBUG option will go +# after the -DNDEBUG option on the compiler command line and +# thus NDEBUG will be undefined. +# +# - Non-standard build types like "None" aren't treated specially +# and thus won't have -DNEBUG. Such non-standard build types +# SHOULD BE AVOIDED FOR PRODUCTION BUILDS. Or at least one +# should remember to add -DNDEBUG. +# +# If building from xz.git instead of a release tarball, consider +# the following *before* running cmake: +# +# - To get translated messages, install GNU gettext tools (the +# command msgfmt is needed). Alternatively disable translations +# by setting ENABLE_NLS=OFF. +# +# - To get translated man pages, run po4a/update-po which requires +# the po4a tool. The build works without this step too. # # This file provides the following installation components (if you only # need liblzma, install only its components!): -# - liblzma_Runtime +# - liblzma_Runtime (shared library only) # - liblzma_Development -# - xz (on some platforms only) -# - xzdec (on some platforms only) +# - liblzma_Documentation (examples and Doxygen-generated API docs as HTML) +# - xz_Runtime (xz, the symlinks, and possibly translation files) +# - xz_Documentation (xz man pages and the symlinks) +# - xzdec_Runtime +# - xzdec_Documentation (xzdec *and* lzmadec man pages) +# - lzmadec_Runtime +# - lzmainfo_Runtime +# - lzmainfo_Documentation (lzmainfo man pages) +# - scripts_Runtime (xzdiff, xzgrep, xzless, xzmore) +# - scripts_Documentation (their man pages) +# - Documentation (generic docs like README and licenses) # # To find the target liblzma::liblzma from other packages, use the CONFIG # option with find_package() to avoid a conflict with the FindLibLZMA module @@ -40,12 +96,10 @@ # # Author: Lasse Collin # -# This file has been put into the public domain. -# You can do whatever you want with this file. -# ############################################################################# -cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) +# NOTE: Translation support is disabled with CMake older than 3.20. +cmake_minimum_required(VERSION 3.14...3.29 FATAL_ERROR) include(CMakePushCheckState) include(CheckIncludeFile) @@ -75,9 +129,28 @@ string(REGEX REPLACE .*$" "\\1.\\2.\\3" PACKAGE_VERSION "${PACKAGE_VERSION}") +# With several compilers, CMAKE_BUILD_TYPE=Release uses -O3 optimization +# which results in bigger code without a clear difference in speed. If +# no user-defined CMAKE_C_FLAGS_RELEASE is present, override -O3 to -O2 +# to make it possible to recommend CMAKE_BUILD_TYPE=Release. +if(NOT DEFINED CMAKE_C_FLAGS_RELEASE) + set(OVERRIDE_O3_IN_C_FLAGS_RELEASE ON) +endif() + # Among other things, this gives us variables xz_VERSION and xz_VERSION_MAJOR. project(xz VERSION "${PACKAGE_VERSION}" LANGUAGES C) +if(OVERRIDE_O3_IN_C_FLAGS_RELEASE) + # Looking at CMake's source, there aren't any _FLAGS_RELEASE_INIT + # entries where "-O3" would appear as part of some other option, + # thus a simple search and replace should be fine. + string(REPLACE -O3 -O2 CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + + # Update the cache value while keeping its docstring unchanged. + set_property(CACHE CMAKE_C_FLAGS_RELEASE + PROPERTY VALUE "${CMAKE_C_FLAGS_RELEASE}") +endif() + # We need a compiler that supports enough C99 or newer (variable-length arrays # aren't needed, those are optional in C17). Setting CMAKE_C_STANDARD here # makes it the default for all targets. It doesn't affect the INTERFACE so @@ -86,9 +159,21 @@ project(xz VERSION "${PACKAGE_VERSION}" LANGUAGES C) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) +# Support 32-bit x86 assembly files. +if(NOT MSVC) + option(ENABLE_X86_ASM "Enable 32-bit x86 assembly code" OFF) + if(ENABLE_X86_ASM) + enable_language(ASM) + endif() +endif() + # On Apple OSes, don't build executables as bundles: set(CMAKE_MACOSX_BUNDLE OFF) +# Set CMAKE_INSTALL_LIBDIR and friends. This needs to be done before +# the LOCALEDIR_DEFINITION workaround below. +include(GNUInstallDirs) + # windres from GNU binutils can be tricky with command line arguments # that contain spaces or other funny characters. Unfortunately we need # a space in PACKAGE_NAME. Using \x20 to encode the US-ASCII space seems @@ -116,10 +201,15 @@ if((MINGW OR CYGWIN OR MSYS) AND ( # Keep the original PACKAGE_NAME intact for generation of liblzma.pc. string(APPEND CMAKE_RC_FLAGS " --use-temp-file") string(REPLACE " " "\\x20" PACKAGE_NAME_DEFINITION "${PACKAGE_NAME}") + + # Use octal because "Program Files" would become \x20F. + string(REPLACE " " "\\040" LOCALEDIR_DEFINITION + "${CMAKE_INSTALL_FULL_LOCALEDIR}") else() # Elsewhere a space is safe. This also keeps things compatible with # EBCDIC in case CMake-based build is ever done on such a system. set(PACKAGE_NAME_DEFINITION "${PACKAGE_NAME}") + set(LOCALEDIR_DEFINITION "${CMAKE_INSTALL_FULL_LOCALEDIR}") endif() # Definitions common to all targets: @@ -165,32 +255,80 @@ set(LIBS) # Check for clock_gettime(). Do this before checking for threading so # that we know there if CLOCK_MONOTONIC is available. -if(NOT WIN32) - check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) - - if(NOT HAVE_CLOCK_GETTIME) - # With glibc <= 2.17 or Solaris 10 this needs librt. - # Add librt for the next check for HAVE_CLOCK_GETTIME. If it is - # found after including the library, we know that librt is required. - list(INSERT CMAKE_REQUIRED_LIBRARIES 0 rt) - check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME_LIBRT) - - # If it was found now, add librt to all targets and keep it in - # CMAKE_REQUIRED_LIBRARIES for further tests too. - if(HAVE_CLOCK_GETTIME_LIBRT) - link_libraries(rt) - set(LIBS "-lrt") # For liblzma.pc - else() - list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0) - endif() +check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) + +if(NOT HAVE_CLOCK_GETTIME) + # With glibc <= 2.17 or Solaris 10 this needs librt. + # Add librt for the next check for HAVE_CLOCK_GETTIME. If it is + # found after including the library, we know that librt is required. + list(INSERT CMAKE_REQUIRED_LIBRARIES 0 rt) + check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME_LIBRT) + + # If it was found now, add librt to all targets and keep it in + # CMAKE_REQUIRED_LIBRARIES for further tests too. + if(HAVE_CLOCK_GETTIME_LIBRT) + link_libraries(rt) + set(LIBS "-lrt") # For liblzma.pc + else() + list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0) endif() +endif() - if(HAVE_CLOCK_GETTIME OR HAVE_CLOCK_GETTIME_LIBRT) - add_compile_definitions(HAVE_CLOCK_GETTIME) +if(HAVE_CLOCK_GETTIME OR HAVE_CLOCK_GETTIME_LIBRT) + add_compile_definitions(HAVE_CLOCK_GETTIME) - # Check if CLOCK_MONOTONIC is available for clock_gettime(). - check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC) - tuklib_add_definition_if(ALL HAVE_CLOCK_MONOTONIC) + # Check if CLOCK_MONOTONIC is available for clock_gettime(). + check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC) + tuklib_add_definition_if(ALL HAVE_CLOCK_MONOTONIC) +endif() + +# Translation support requires CMake 3.20 because it added the Intl::Intl +# target so we don't need to play with the individual variables. +# +# The definition ENABLE_NLS is added only to those targets that use it, thus +# it's not done here. (xz has translations, xzdec doesn't.) +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") + find_package(Intl) + find_package(Gettext) + + if(Intl_FOUND) + option(ENABLE_NLS "Native Language Support (translated messages)" ON) + + # If translation support is enabled but neither gettext tools or + # pre-generated .gmo files exist, translation support cannot be + # enabled. + # + # The detection of pre-generated .gmo files is done by only + # checking for the existence of a single .gmo file; Ukrainian + # is one of many translations that gets regular updates. + if(ENABLE_NLS AND NOT GETTEXT_FOUND AND + NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po/uk.gmo") + # This only sets the variable, not the cache variable! + set(ENABLE_NLS OFF) + + # This message is shown only when new enough CMake is used and + # library support for translations was found. The assumptions is + # that in this situation the user might have interest in the + # translations. This also keeps this code simpler. + message(WARNING "Native language support (NLS) has been disabled. " + "NLS support requires either gettext tools or " + "pre-generated .gmo files. The latter are only " + "available in distribution tarballs. " + "To avoid this warning, NLS can be explicitly " + "disabled by passing -DENABLE_NLS=OFF to cmake.") + endif() + + # Warn if NLS is enabled but translated man pages are missing. + if(UNIX AND ENABLE_NLS AND + NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po4a/man") + message(WARNING "Native language support (NLS) has been enabled " + "but pre-generated translated man pages " + "were not found and thus they won't be installed. " + "Run 'po4a/update-po' to generate them.") + endif() + + # The *installed* name of the translation files is "xz.mo". + set(TRANSLATION_DOMAIN "xz") endif() endif() @@ -207,14 +345,69 @@ endif() option(BUILD_SHARED_LIBS "Build liblzma as a shared library instead of static") -add_library(liblzma - src/common/mythread.h - src/common/sysdefs.h - src/common/tuklib_common.h - src/common/tuklib_config.h - src/common/tuklib_integer.h - src/common/tuklib_physmem.c - src/common/tuklib_physmem.h +if(NOT WIN32) + # Symbol versioning only affects ELF shared libraries. The option is + # ignored for static libraries. + # + # Determine the default value so that it's always set with + # shared libraries in mind which helps if the build dir is reconfigured + # from static to shared libs without resetting the cache variables. + set(SYMBOL_VERSIONING_DEFAULT OFF) + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND + (CMAKE_SYSTEM_PROCESSOR MATCHES "[Mm]icro[Bb]laze" OR + CMAKE_C_COMPILER_ID STREQUAL "NVHPC")) + # As a special case, GNU/Linux on MicroBlaze gets the generic + # symbol versioning because GCC 12 doesn't support the __symver__ + # attribute on MicroBlaze. On Linux, CMAKE_SYSTEM_PROCESSOR comes + # from "uname -m" for native builds (should be "microblaze") or from + # the CMake toolchain file (not perfectly standardized but it very + # likely has "microblaze" in lower case or mixed case somewhere in + # the string). + # + # NVIDIA HPC Compiler doesn't support symbol versioning but + # it uses the linked from the system so the linker script + # can still be used to get the generic symbol versioning. + set(SYMBOL_VERSIONING_DEFAULT "generic") + + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # GNU/Linux-specific symbol versioning for shared liblzma. + # This includes a few extra compatibility symbols for RHEL/CentOS 7 + # which are pointless on non-glibc non-Linux systems. + # + # Avoid symvers on Linux with non-glibc like musl and uClibc. + # In Autoconf it's enough to check that $host_os equals linux-gnu + # instead of, for example, linux-musl. CMake doesn't provide such + # a method. + # + # This check is here for now since it's not strictly required + # by anything else. + check_c_source_compiles( + "#include + #if defined(__GLIBC__) && !defined(__UCLIBC__) + int main(void) { return 0; } + #else + compile error + #endif + " + IS_LINUX_WITH_GLIBC) + + if(IS_LINUX_WITH_GLIBC) + set(SYMBOL_VERSIONING_DEFAULT "linux") + endif() + + elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(SYMBOL_VERSIONING_DEFAULT "generic") + endif() + + set(SYMBOL_VERSIONING "${SYMBOL_VERSIONING_DEFAULT}" CACHE STRING + "Enable ELF shared library symbol versioning (OFF, generic, linux)") + + # Show a dropdown menu in CMake GUI: + set_property(CACHE SYMBOL_VERSIONING PROPERTY STRINGS "OFF;generic;linux") +endif() + +set(LIBLZMA_API_HEADERS src/liblzma/api/lzma.h src/liblzma/api/lzma/base.h src/liblzma/api/lzma/bcj.h @@ -230,9 +423,22 @@ add_library(liblzma src/liblzma/api/lzma/stream_flags.h src/liblzma/api/lzma/version.h src/liblzma/api/lzma/vli.h +) + +add_library(liblzma + src/common/mythread.h + src/common/sysdefs.h + src/common/tuklib_common.h + src/common/tuklib_config.h + src/common/tuklib_integer.h + src/common/tuklib_physmem.c + src/common/tuklib_physmem.h + ${LIBLZMA_API_HEADERS} src/liblzma/check/check.c src/liblzma/check/check.h - src/liblzma/check/crc_macros.h + src/liblzma/check/crc_common.h + src/liblzma/check/crc_x86_clmul.h + src/liblzma/check/crc32_arm64.h src/liblzma/common/block_util.c src/liblzma/common/common.c src/liblzma/common/common.h @@ -294,11 +500,16 @@ if(ENABLE_SMALL) target_sources(liblzma PRIVATE src/liblzma/check/crc32_small.c) else() target_sources(liblzma PRIVATE - src/liblzma/check/crc32_fast.c src/liblzma/check/crc32_table.c src/liblzma/check/crc32_table_be.h src/liblzma/check/crc32_table_le.h ) + + if(ENABLE_X86_ASM) + target_sources(liblzma PRIVATE src/liblzma/check/crc32_x86.S) + else() + target_sources(liblzma PRIVATE src/liblzma/check/crc32_fast.c) + endif() endif() if("crc64" IN_LIST ADDITIONAL_CHECK_TYPES) @@ -308,11 +519,16 @@ if("crc64" IN_LIST ADDITIONAL_CHECK_TYPES) target_sources(liblzma PRIVATE src/liblzma/check/crc64_small.c) else() target_sources(liblzma PRIVATE - src/liblzma/check/crc64_fast.c src/liblzma/check/crc64_table.c src/liblzma/check/crc64_table_be.h src/liblzma/check/crc64_table_le.h ) + + if(ENABLE_X86_ASM) + target_sources(liblzma PRIVATE src/liblzma/check/crc64_x86.S) + else() + target_sources(liblzma PRIVATE src/liblzma/check/crc64_fast.c) + endif() endif() endif() @@ -451,6 +667,7 @@ set(SIMPLE_FILTERS powerpc ia64 sparc + riscv ) # The SUPPORTED_FILTERS are shared between Encoders and Decoders @@ -746,6 +963,114 @@ if(LZIP_DECODER) ) endif() + +############## +# Sandboxing # +############## + +# ON Use sandboxing if a supported method is available in the OS. +# OFF Disable sandboxing. +# capsicum Require Capsicum (FreeBSD >= 10.2) and fail if not found. +# pledge Require pledge(2) (OpenBSD >= 5.9) and fail if not found. +# landlock Require Landlock (Linux >= 5.13) and fail if not found. +set(SUPPORTED_SANDBOX_METHODS ON OFF capsicum pledge landlock) + +set(ENABLE_SANDBOX ON CACHE STRING + "Sandboxing method to use in 'xz', 'xzdec', and 'lzmadec'") + +set_property(CACHE ENABLE_SANDBOX + PROPERTY STRINGS "${SUPPORTED_SANDBOX_METHODS}") + +if(NOT ENABLE_SANDBOX IN_LIST SUPPORTED_SANDBOX_METHODS) + message(FATAL_ERROR "'${ENABLE_SANDBOX}' is not a supported " + "sandboxing method") +endif() + +# When autodetecting, the search order is fixed and we must not find +# more than one method. +if(ENABLE_SANDBOX STREQUAL "OFF") + set(SANDBOX_FOUND ON) +else() + set(SANDBOX_FOUND OFF) +endif() + +# Since xz and xzdec can both use sandboxing, the compile definition needed +# to use the sandbox must be added to both targets. +set(SANDBOX_COMPILE_DEFINITION OFF) + +# Sandboxing: Capsicum +if(NOT SANDBOX_FOUND AND ENABLE_SANDBOX MATCHES "^ON$|^capsicum$") + check_symbol_exists(cap_rights_limit sys/capsicum.h + HAVE_CAP_RIGHTS_LIMIT) + if(HAVE_CAP_RIGHTS_LIMIT) + set(SANDBOX_COMPILE_DEFINITION "HAVE_CAP_RIGHTS_LIMIT") + set(SANDBOX_FOUND ON) + endif() +endif() + +# Sandboxing: pledge(2) +if(NOT SANDBOX_FOUND AND ENABLE_SANDBOX MATCHES "^ON$|^pledge$") + check_symbol_exists(pledge unistd.h HAVE_PLEDGE) + if(HAVE_PLEDGE) + set(SANDBOX_COMPILE_DEFINITION "HAVE_PLEDGE") + set(SANDBOX_FOUND ON) + endif() +endif() + +# Sandboxing: Landlock +if(NOT SANDBOX_FOUND AND ENABLE_SANDBOX MATCHES "^ON$|^landlock$") + # A compile check is done here because some systems have + # linux/landlock.h, but do not have the syscalls defined + # in order to actually use Linux Landlock. + check_c_source_compiles(" + #include + #include + #include + + void my_sandbox(void) + { + (void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); + (void)SYS_landlock_create_ruleset; + (void)SYS_landlock_restrict_self; + (void)LANDLOCK_CREATE_RULESET_VERSION; + return; + } + + int main(void) { return 0; } + " + HAVE_LINUX_LANDLOCK) + + if(HAVE_LINUX_LANDLOCK) + set(SANDBOX_COMPILE_DEFINITION "HAVE_LINUX_LANDLOCK") + set(SANDBOX_FOUND ON) + + # Of our three sandbox methods, only Landlock is incompatible + # with -fsanitize. FreeBSD 13.2 with Capsicum was tested with + # -fsanitize=address,undefined and had no issues. OpenBSD (as + # of version 7.4) has minimal support for process instrumentation. + # OpenBSD does not distribute the additional libraries needed + # (libasan, libubsan, etc.) with GCC or Clang needed for runtime + # sanitization support and instead only support + # -fsanitize-minimal-runtime for minimal undefined behavior + # sanitization. This minimal support is compatible with our use + # of the Pledge sandbox. So only Landlock will result in a + # build that cannot compress or decompress a single file to + # standard out. + if(CMAKE_C_FLAGS MATCHES "-fsanitize=") + message(SEND_ERROR + "CMAKE_C_FLAGS or the environment variable CFLAGS " + "contains '-fsanitize=' which is incompatible " + "with Landlock sandboxing. Use -DENABLE_SANDBOX=OFF " + "as an argument to 'cmake' when using '-fsanitize'.") + endif() + endif() +endif() + +if(NOT SANDBOX_FOUND AND NOT ENABLE_SANDBOX MATCHES "^ON$|^OFF$") + message(SEND_ERROR "ENABLE_SANDBOX=${ENABLE_SANDBOX} was used but " + "support for the sandboxing method wasn't found.") +endif() + ### # Put the tuklib functions under the lzma_ namespace. @@ -798,6 +1123,7 @@ if(USE_WIN95_THREADS AND ENABLE_SMALL AND NOT HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR) "__attribute__((__constructor__))") endif() + # cpuid.h check_include_file(cpuid.h HAVE_CPUID_H) tuklib_add_definition_if(liblzma HAVE_CPUID_H) @@ -840,16 +1166,84 @@ calculation if supported by the system" ON) return _mm_clmulepi64_si128(a, b, 0); } int main(void) { return 0; } - " - HAVE_USABLE_CLMUL) + " + HAVE_USABLE_CLMUL) tuklib_add_definition_if(liblzma HAVE_USABLE_CLMUL) endif() endif() -# Support -fvisiblity=hidden when building shared liblzma. -# These lines do nothing on Windows (even under Cygwin). -# HAVE_VISIBILITY should always be defined to 0 or 1. -if(BUILD_SHARED_LIBS) +# ARM64 C Language Extensions define CRC32 functions in arm_acle.h. +# These are supported by at least GCC and Clang which both need +# __attribute__((__target__("+crc"))), unless the needed compiler flags +# are used to support the CRC instruction. +option(ALLOW_ARM64_CRC32 "Allow ARM64 CRC32 instruction if supported by \ +the system" ON) + +if(ALLOW_ARM64_CRC32) + check_c_source_compiles(" + #include + + #ifndef _MSC_VER + #include + #endif + + #if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__) + __attribute__((__target__(\"+crc\"))) + #endif + uint32_t my_crc(uint32_t a, uint64_t b) + { + return __crc32d(a, b); + } + int main(void) { return 0; } + " + HAVE_ARM64_CRC32) + + if(HAVE_ARM64_CRC32) + target_compile_definitions(liblzma PRIVATE HAVE_ARM64_CRC32) + + # Check for ARM64 CRC32 instruction runtime detection. + # getauxval() is supported on Linux. + check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL) + tuklib_add_definition_if(liblzma HAVE_GETAUXVAL) + + # elf_aux_info() is supported on FreeBSD. + check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO) + tuklib_add_definition_if(liblzma HAVE_ELF_AUX_INFO) + + # sysctlbyname("hw.optional.armv8_crc32", ...) is supported on Darwin + # (macOS, iOS, etc.). Note that sysctlbyname() is supported on FreeBSD, + # NetBSD, and possibly others too but the string is specific to + # Apple OSes. The C code is responsible for checking + # defined(__APPLE__) before using + # sysctlbyname("hw.optional.armv8_crc32", ...). + check_symbol_exists(sysctlbyname sys/sysctl.h HAVE_SYSCTLBYNAME) + tuklib_add_definition_if(liblzma HAVE_SYSCTLBYNAME) + endif() +endif() + + +# Symbol visibility support: +# +# The C_VISIBILITY_PRESET property takes care of adding the compiler +# option -fvisibility=hidden (or equivalent) if and only if it is supported. +# +# HAVE_VISIBILITY should always be defined to 0 or 1. It tells liblzma +# if __attribute__((__visibility__("default"))) +# and __attribute__((__visibility__("hidden"))) are supported. +# Those are useful only when the compiler supports -fvisibility=hidden +# or such option so HAVE_VISIBILITY should be 1 only when both option and +# the attribute support are present. HAVE_VISIBILITY is ignored on Windows +# and Cygwin by the liblzma C code; __declspec(dllexport) is used instead. +# +# CMake's GenerateExportHeader module is too fancy since liblzma already +# has the necessary macros. Instead, check CMake's internal variable +# CMAKE_C_COMPILE_OPTIONS_VISIBILITY (it's the C-specific variant of +# CMAKE__COMPILE_OPTIONS_VISIBILITY) which contains the compiler +# command line option for visibility support. It's empty or unset when +# visibility isn't supported. (It was added to CMake 2.8.12 in the commit +# 0e9f4bc00c6b26f254e74063e4026ac33b786513 in 2013.) This way we don't +# set HAVE_VISIBILITY to 1 when visibility isn't actually supported. +if(BUILD_SHARED_LIBS AND CMAKE_C_COMPILE_OPTIONS_VISIBILITY) set_target_properties(liblzma PROPERTIES C_VISIBILITY_PRESET hidden) target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=1) else() @@ -891,8 +1285,7 @@ if(WIN32) # Disable __declspec(dllimport) when linking against static liblzma. target_compile_definitions(liblzma INTERFACE LZMA_API_STATIC) endif() -elseif(BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - # GNU/Linux-specific symbol versioning for shared liblzma. +elseif(BUILD_SHARED_LIBS AND SYMBOL_VERSIONING STREQUAL "linux") # Note that adding link options doesn't affect static builds # but HAVE_SYMBOL_VERSIONS_LINUX must not be used with static builds # because it would put symbol versions into the static library which @@ -908,9 +1301,7 @@ elseif(BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") set_target_properties(liblzma PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map" ) -elseif(BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - # Symbol versioning for shared liblzma for non-GNU/Linux. - # FIXME? What about Solaris? +elseif(BUILD_SHARED_LIBS AND SYMBOL_VERSIONING STREQUAL "generic") target_link_options(liblzma PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_generic.map" ) @@ -975,9 +1366,6 @@ endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" "${LZMA_CONFIG_CONTENTS}") -# Set CMAKE_INSTALL_LIBDIR and friends. -include(GNUInstallDirs) - # Create liblzma.pc. set(prefix "${CMAKE_INSTALL_PREFIX}") set(exec_prefix "${CMAKE_INSTALL_PREFIX}") @@ -1031,19 +1419,204 @@ endif() ############################################################################# -# getopt_long +# Helper functions for installing files ############################################################################# -# The command line tools needs this. +# For each non-empty element in the list LINK_NAMES, creates symbolic links +# ${LINK_NAME}${LINK_SUFFIX} -> ${TARGET_NAME} in the directory ${DIR}. +# The target file should exist because on Cygwin and MSYS2 symlink creation +# can fail under certain conditions if the target doesn't exist. +function(my_install_symlinks COMPONENT DIR TARGET_NAME LINK_SUFFIX LINK_NAMES) + install(CODE "set(D \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DIR}\") + foreach(L ${LINK_NAMES}) + file(CREATE_LINK \"${TARGET_NAME}\" + \"\${D}/\${L}${LINK_SUFFIX}\" + SYMBOLIC) + endforeach()" + COMPONENT "${COMPONENT}") +endfunction() + +# Installs a man page file of a given language ("" for the untranslated file) +# and optionally its alternative names as symlinks. This is a helper function +# for my_install_man() below. +function(my_install_man_lang COMPONENT SRC_FILE MAN_LANG LINK_NAMES) + # Get the man page section from the filename suffix. + string(REGEX REPLACE "^.*\.([^/.]+)$" "\\1" MAN_SECTION "${SRC_FILE}") + + # A few man pages might be missing from translations. + # Don't attempt to install them or create the related symlinks. + if(NOT MAN_LANG STREQUAL "" AND NOT EXISTS "${SRC_FILE}") + return() + endif() + + # Installing the file must be done before creating the symlinks + # due to Cygwin and MSYS2. + install(FILES "${SRC_FILE}" + DESTINATION "${CMAKE_INSTALL_MANDIR}/${MAN_LANG}/man${MAN_SECTION}" + COMPONENT "${COMPONENT}") + + # Get the basename of the file to be used as the symlink target. + get_filename_component(BASENAME "${SRC_FILE}" NAME) + + # LINK_NAMES don't contain the man page filename suffix (like ".1") + # so it needs to be told to my_install_symlinks. + my_install_symlinks("${COMPONENT}" + "${CMAKE_INSTALL_MANDIR}/${MAN_LANG}/man${MAN_SECTION}" + "${BASENAME}" ".${MAN_SECTION}" "${LINK_NAMES}") +endfunction() + +# Installs a man page file and optionally its alternative names as symlinks. +# Does the same for translations if ENABLE_NLS. +function(my_install_man COMPONENT SRC_FILE LINK_NAMES) + my_install_man_lang("${COMPONENT}" "${SRC_FILE}" "" "${LINK_NAMES}") + + if(ENABLE_NLS) + # Find the translated versions of this man page. + get_filename_component(BASENAME "${SRC_FILE}" NAME) + file(GLOB MAN_FILES "po4a/man/*/${BASENAME}") + + foreach(F ${MAN_FILES}) + get_filename_component(MAN_LANG "${F}" DIRECTORY) + get_filename_component(MAN_LANG "${MAN_LANG}" NAME) + my_install_man_lang("${COMPONENT}" "${F}" "${MAN_LANG}" + "${LINK_NAMES}") + endforeach() + endif() +endfunction() + + +############################################################################# +# libgnu (getopt_long) +############################################################################# + +# This mirrors how the Autotools build system handles the getopt_long +# replacement, calling the object library libgnu since the replacement +# version comes from Gnulib. +add_library(libgnu OBJECT) + +# CMake requires that even an object library must have at least once source +# file. So we give it a header file that results in no output files. +# +# NOTE: Using a file outside the lib directory makes it possible to +# delete lib/*.h and lib/*.c and still keep the build working if +# getopt_long replacement isn't needed. It's convenient if one wishes +# to be certain that no GNU LGPL code gets included in the binaries. +target_sources(libgnu PRIVATE src/common/sysdefs.h) + +# The Ninja Generator requires setting the linker language since it cannot +# guess the programming language of just a header file. Setting this +# property avoids needing an empty .c file or an non-empty unnecessary .c +# file. +set_target_properties(libgnu PROPERTIES LINKER_LANGUAGE C) + +# Create /lib directory in the build directory and add it to the include path. +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib") +target_include_directories(libgnu PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/lib") + +# Include /lib from the source directory. It does no harm even if none of +# the Gnulib replacements are used. +target_include_directories(libgnu PUBLIC lib) + +# The command line tools need getopt_long in order to parse arguments. If +# the system does not have a getopt_long implementation we can use the one +# from Gnulib instead. check_symbol_exists(getopt_long getopt.h HAVE_GETOPT_LONG) +if(NOT HAVE_GETOPT_LONG) + # Set the __GETOPT_PREFIX definition to "rpl_" (replacement) to avoid + # name conflicts with libc symbols. The same prefix is set if using + # the Autotools build (m4/getopt.m4). + target_compile_definitions(libgnu PUBLIC "__GETOPT_PREFIX=rpl_") + + # Create a custom copy command to copy the getopt header to the build + # directory and re-copy it if it is updated. (Gnulib does it this way + # because it allows choosing which .in.h files to actually use in the + # build. We need just getopt.h so this is a bit overcomplicated for + # a single header file only.) + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/lib/getopt.h" + COMMAND "${CMAKE_COMMAND}" -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/lib/getopt.in.h" + "${CMAKE_CURRENT_BINARY_DIR}/lib/getopt.h" + MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/lib/getopt.in.h" + VERBATIM) + + target_sources(libgnu PRIVATE + lib/getopt1.c + lib/getopt.c + lib/getopt_int.h + lib/getopt-cdefs.h + lib/getopt-core.h + lib/getopt-ext.h + lib/getopt-pfx-core.h + lib/getopt-pfx-ext.h + "${CMAKE_CURRENT_BINARY_DIR}/lib/getopt.h" + ) +endif() + + +############################################################################# +# xzdec and lzmadec +############################################################################# + +if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)) + foreach(XZDEC xzdec lzmadec) + add_executable("${XZDEC}" + src/common/sysdefs.h + src/common/tuklib_common.h + src/common/tuklib_config.h + src/common/tuklib_exit.c + src/common/tuklib_exit.h + src/common/tuklib_gettext.h + src/common/tuklib_progname.c + src/common/tuklib_progname.h + src/xzdec/xzdec.c + ) + + target_include_directories("${XZDEC}" PRIVATE + src/common + src/liblzma/api + ) + + target_link_libraries("${XZDEC}" PRIVATE liblzma libgnu) + + if(WIN32) + # Add the Windows resource file for xzdec.exe or lzmadec.exe. + target_sources("${XZDEC}" PRIVATE src/xzdec/xzdec_w32res.rc) + set_target_properties("${XZDEC}" PROPERTIES + LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc" + ) + endif() + + if(SANDBOX_COMPILE_DEFINITION) + target_compile_definitions("${XZDEC}" PRIVATE + "${SANDBOX_COMPILE_DEFINITION}") + endif() + + tuklib_progname("${XZDEC}") + + install(TARGETS "${XZDEC}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT "${XZDEC}_Runtime") + endforeach() + + # This is the only build-time difference with lzmadec. + target_compile_definitions(lzmadec PRIVATE "LZMADEC") + + if(UNIX) + # NOTE: This puts the lzmadec.1 symlinks into xzdec_Documentation. + # This isn't great but doing them separately with translated + # man pages would require extra code. So this has to suffice for now. + my_install_man(xzdec_Documentation src/xzdec/xzdec.1 lzmadec) + endif() +endif() + ############################################################################# -# xzdec +# lzmainfo ############################################################################# -if(HAVE_GETOPT_LONG AND HAVE_DECODERS) - add_executable(xzdec +if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)) + add_executable(lzmainfo src/common/sysdefs.h src/common/tuklib_common.h src/common/tuklib_config.h @@ -1052,34 +1625,44 @@ if(HAVE_GETOPT_LONG AND HAVE_DECODERS) src/common/tuklib_gettext.h src/common/tuklib_progname.c src/common/tuklib_progname.h - src/xzdec/xzdec.c + src/lzmainfo/lzmainfo.c ) - target_include_directories(xzdec PRIVATE + target_include_directories(lzmainfo PRIVATE src/common src/liblzma/api ) - target_link_libraries(xzdec PRIVATE liblzma) + target_link_libraries(lzmainfo PRIVATE liblzma libgnu) if(WIN32) - # Add the Windows resource file for xzdec.exe. - target_sources(xzdec PRIVATE src/xzdec/xzdec_w32res.rc) - set_target_properties(xzdec PROPERTIES + # Add the Windows resource file for lzmainfo.exe. + target_sources(lzmainfo PRIVATE src/lzmainfo/lzmainfo_w32res.rc) + set_target_properties(lzmainfo PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc" ) endif() - tuklib_progname(xzdec) + tuklib_progname(lzmainfo) + + # NOTE: The translations are in the "xz" domain and the .mo files are + # installed as part of the "xz" target. + if(ENABLE_NLS) + target_link_libraries(lzmainfo PRIVATE Intl::Intl) - install(TARGETS xzdec + target_compile_definitions(lzmainfo PRIVATE + ENABLE_NLS + PACKAGE="${TRANSLATION_DOMAIN}" + LOCALEDIR="${LOCALEDIR_DEFINITION}" + ) + endif() + + install(TARGETS lzmainfo RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT xzdec) + COMPONENT lzmainfo_Runtime) if(UNIX) - install(FILES src/xzdec/xzdec.1 - DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" - COMPONENT xzdec) + my_install_man(lzmainfo_Documentation src/lzmainfo/lzmainfo.1 "") endif() endif() @@ -1088,7 +1671,7 @@ endif() # xz ############################################################################# -if(NOT MSVC AND HAVE_GETOPT_LONG) +if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900) add_executable(xz src/common/mythread.h src/common/sysdefs.h @@ -1122,6 +1705,8 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) src/xz/options.c src/xz/options.h src/xz/private.h + src/xz/sandbox.c + src/xz/sandbox.h src/xz/signals.c src/xz/signals.h src/xz/suffix.c @@ -1142,7 +1727,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) ) endif() - target_link_libraries(xz PRIVATE liblzma) + target_link_libraries(xz PRIVATE liblzma libgnu) target_compile_definitions(xz PRIVATE ASSUME_RAM=128) @@ -1154,6 +1739,10 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) ) endif() + if(SANDBOX_COMPILE_DEFINITION) + target_compile_definitions(xz PRIVATE "${SANDBOX_COMPILE_DEFINITION}") + endif() + tuklib_progname(xz) tuklib_mbstr(xz) @@ -1212,15 +1801,76 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) endif() endif() + if(ENABLE_NLS) + target_link_libraries(xz PRIVATE Intl::Intl) + + target_compile_definitions(xz PRIVATE + ENABLE_NLS + PACKAGE="${TRANSLATION_DOMAIN}" + LOCALEDIR="${LOCALEDIR_DEFINITION}" + ) + + file(STRINGS po/LINGUAS LINGUAS) + + # Where to find .gmo files. If msgfmt is available, the .po files + # will be converted as part of the build. Otherwise we will use + # the pre-generated .gmo files which are included in XZ Utils + # tarballs by Autotools. + set(GMO_DIR "${CMAKE_CURRENT_SOURCE_DIR}/po") + + if(GETTEXT_FOUND) + # NOTE: gettext_process_po_files' INSTALL_DESTINATION is + # incompatible with how Autotools requires the .po files to + # be named. CMake would require each .po file to be named with + # the translation domain and thus each .po file would need its + # own language-specific directory (like "po/fi/xz.po"). On top + # of this, INSTALL_DESTINATION doesn't allow specifying COMPONENT + # and thus the .mo files go into "Unspecified" component. So we + # can use gettext_process_po_files to convert the .po files but + # installation needs to be done with our own code. + # + # Also, the .gmo files will go to root of the build directory + # instead of neatly into a subdirectory. This is hardcoded in + # CMake's FindGettext.cmake. + foreach(LANG IN LISTS LINGUAS) + gettext_process_po_files("${LANG}" ALL + PO_FILES "${CMAKE_CURRENT_SOURCE_DIR}/po/${LANG}.po") + endforeach() + + set(GMO_DIR "${CMAKE_CURRENT_BINARY_DIR}") + endif() + + foreach(LANG IN LISTS LINGUAS) + install( + FILES "${GMO_DIR}/${LANG}.gmo" + DESTINATION "${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES" + RENAME "${TRANSLATION_DOMAIN}.mo" + COMPONENT xz_Runtime) + endforeach() + endif() + + # This command must be before the symlink creation to keep things working + # on Cygwin and MSYS2 in all cases. + # + # - Cygwin can encode symlinks in multiple ways. This can be + # controlled via the environment variable "CYGWIN". If it contains + # "winsymlinks:nativestrict" then symlink creation will fail if + # the link target doesn't exist. This mode isn't the default though. + # See: https://cygwin.com/faq.html#faq.api.symlinks + # + # - MSYS2 supports the same winsymlinks option in the environment + # variable "MSYS" (not "MSYS2). The default in MSYS2 is to make + # a copy of the file instead of any kind of symlink. Thus the link + # target must exist or the creation of the "symlink" (copy) will fail. + # + # Our installation order must be such that when a symbolic link is created + # its target must already exists. There is no race condition for parallel + # builds because the generated cmake_install.cmake executes serially. install(TARGETS xz RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT xz) + COMPONENT xz_Runtime) if(UNIX) - install(FILES src/xz/xz.1 - DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" - COMPONENT xz) - option(CREATE_XZ_SYMLINKS "Create unxz and xzcat symlinks" ON) option(CREATE_LZMA_SYMLINKS "Create lzma, unlzma, and lzcat symlinks" ON) @@ -1234,150 +1884,165 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) list(APPEND XZ_LINKS "lzma" "unlzma" "lzcat") endif() - # With Windows Cygwin and MSYS2 the symlinking is complicated. Both - # of these environments set the UNIX variable so they will try to - # make the symlinks. The ability for Cygwin and MSYS2 to make - # broken symlinks is determined by the CYGWIN and MSYS2 environment - # variables, respectively. Broken symlinks are needed for the man - # page symlinks and for determining if the xz and lzma symlinks need - # to depend on the xz target or not. If broken symlinks cannot be - # made then the xz binary must be created before the symlinks. - set(ALLOW_BROKEN_SYMLINKS ON) - - if(CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") - # The Cygwin env variable can be set to four possible values: - # - # 1. "lnk". Create symlinks as Windows shortcuts. - # - # 2. "native". Create symlinks as native Windows symlinks - # if supported by the system. Fallback to "lnk" if native - # symlinks are not supported. - # - # 3. "nativestrict". Create symlinks as native Windows symlinks - # if supported by the system. If the target of the symlink - # does not exist or the creation of the symlink fails for any - # reason, do not create the symlink. - # - # 4. "sys". Create symlinks as plain files with a special - # system attribute containing the path to the symlink target. - # - # So, the only case we care about for broken symlinks is - # "nativestrict" since all other values mean that broken - # symlinks are allowed. If the env variable is not set the - # default is "native". If the env variable is set but not - # assigned one of the four values, then the default is the same - # as option 1 "lnk". - string(FIND "$ENV{CYGWIN}" "winsymlinks:nativestrict" SYMLINK_POS) - if(SYMLINK_POS GREATER -1) - set(ALLOW_BROKEN_SYMLINKS OFF) - endif() - elseif(CMAKE_SYSTEM_NAME STREQUAL "MSYS") - # The MSYS env variable behaves similar to the CYGWIN but has a - # different default behavior. If winsymlinks is set but not - # assigned one of the four supported values, the default is to - # *copy* the target to the symlink destination. This will fail - # if the target does not exist so broken symlinks cannot be - # allowed. - string(FIND "$ENV{MSYS}" "winsymlinks" SYMLINK_POS) - if(SYMLINK_POS GREATER -1) - string(FIND "$ENV{MSYS}" "winsymlinks:nativestrict" - SYMLINK_POS) - if(SYMLINK_POS GREATER -1) - set(ALLOW_BROKEN_SYMLINKS OFF) - endif() - else() - set(ALLOW_BROKEN_SYMLINKS OFF) - endif() - endif() - - # Create symlinks in the build directory and then install them. + # On Cygwin, don't add the .exe suffix to the symlinks. # - # The symlinks do not likely need any special extension since - # even on Windows the symlink can still be executed without - # the .exe extension. - foreach(LINK IN LISTS XZ_LINKS) - add_custom_target("create_${LINK}" ALL - "${CMAKE_COMMAND}" -E create_symlink - "$" "${LINK}" - BYPRODUCTS "${LINK}" - VERBATIM) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LINK}" - DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT xz) - - # Only create the man page symlinks if the symlinks can be - # created broken. The symlinks will not be valid until install - # so they cannot be created on these system environments. - if(ALLOW_BROKEN_SYMLINKS) - add_custom_target("create_${LINK}.1" ALL - "${CMAKE_COMMAND}" -E create_symlink "xz.1" "${LINK}.1" - BYPRODUCTS "${LINK}.1" - VERBATIM) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LINK}.1" - DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" - COMPONENT xz) - else() - # Add the xz target as dependency when broken symlinks - # cannot be made. This ensures parallel builds do not fail - # since it will enforce the order of creating xz first, then - # the symlinks. - add_dependencies("create_${LINK}" xz) - endif() - endforeach() + # FIXME? Does this make sense on MSYS & MSYS2 where "ln -s" + # by default makes copies? Inside MSYS & MSYS2 it is possible + # to execute files without the .exe suffix but not outside + # (like in Command Prompt). Omitting the suffix matches + # what configure.ac has done for many years though. + my_install_symlinks(xz_Runtime "${CMAKE_INSTALL_BINDIR}" + "xz${CMAKE_EXECUTABLE_SUFFIX}" "" "${XZ_LINKS}") + + # Install the man pages and (optionally) their symlinks + # and translations. + my_install_man(xz_Documentation src/xz/xz.1 "${XZ_LINKS}") endif() endif() ############################################################################# -# Tests +# Scripts ############################################################################# -include(CTest) - -if(BUILD_TESTING) - set(LIBLZMA_TESTS - test_bcj_exact_size - test_block_header - test_check - test_filter_flags - test_filter_str - test_hardware - test_index - test_index_hash - test_lzip_decoder - test_memlimit - test_stream_flags - test_vli - ) +if(UNIX) + # NOTE: This isn't as sophisticated as in the Autotools build which + # uses posix-shell.m4 but hopefully this doesn't need to be either. + # CMake likely won't be used on as many (old) obscure systems as the + # Autotools-based builds are. + if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND EXISTS "/usr/xpg4/bin/sh") + set(POSIX_SHELL_DEFAULT "/usr/xpg4/bin/sh") + else() + set(POSIX_SHELL_DEFAULT "/bin/sh") + endif() - foreach(TEST IN LISTS LIBLZMA_TESTS) - add_executable("${TEST}" "tests/${TEST}.c") + set(POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING + "Shell to use for scripts (xzgrep and others)") - target_include_directories("${TEST}" PRIVATE - src/common - src/liblzma/api - src/liblzma - ) + # Guess the extra path to add from POSIX_SHELL. Autotools-based build + # has a separate option --enable-path-for-scripts=PREFIX but this is + # enough for Solaris. + set(enable_path_for_scripts) + get_filename_component(POSIX_SHELL_DIR "${POSIX_SHELL}" DIRECTORY) - target_link_libraries("${TEST}" PRIVATE liblzma) + if(NOT POSIX_SHELL_DIR STREQUAL "/bin" AND + NOT POSIX_SHELL_DIR STREQUAL "/usr/bin") + set(enable_path_for_scripts "PATH=${POSIX_SHELL_DIR}:\$PATH") + endif() - # Put the test programs into their own subdirectory so they don't - # pollute the top-level dir which might contain xz and xzdec. - set_target_properties("${TEST}" PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests_bin" - ) + set(XZDIFF_LINKS xzcmp) + set(XZGREP_LINKS xzegrep xzfgrep) + set(XZMORE_LINKS) + set(XZLESS_LINKS) + + if(CREATE_LZMA_SYMLINKS) + list(APPEND XZDIFF_LINKS lzdiff lzcmp) + list(APPEND XZGREP_LINKS lzgrep lzegrep lzfgrep) + list(APPEND XZMORE_LINKS lzmore) + list(APPEND XZLESS_LINKS lzless) + endif() - add_test(NAME "${TEST}" - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/tests_bin/${TEST}" + set(xz "xz") + + foreach(S xzdiff xzgrep xzmore xzless) + configure_file("src/scripts/${S}.in" "${S}" + @ONLY + NEWLINE_STYLE LF) + + install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${S}" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT scripts_Runtime) + endforeach() + + # file(CHMOD ...) would need CMake 3.19 so use execute_process instead. + # Using +x is fine even if umask was 077. If execute bit is set at all + # then "make install" will set it for group and other access bits too. + execute_process(COMMAND chmod +x xzdiff xzgrep xzmore xzless + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + + unset(xz) + unset(POSIX_SHELL) + unset(enable_path_for_scripts) + + my_install_symlinks(scripts_Runtime "${CMAKE_INSTALL_BINDIR}" xzdiff "" + "${XZDIFF_LINKS}") + + my_install_symlinks(scripts_Runtime "${CMAKE_INSTALL_BINDIR}" xzgrep "" + "${XZGREP_LINKS}") + + my_install_symlinks(scripts_Runtime "${CMAKE_INSTALL_BINDIR}" xzmore "" + "${XZMORE_LINKS}") + + my_install_symlinks(scripts_Runtime "${CMAKE_INSTALL_BINDIR}" xzless "" + "${XZLESS_LINKS}") + + my_install_man(scripts_Documentation src/scripts/xzdiff.1 "${XZDIFF_LINKS}") + my_install_man(scripts_Documentation src/scripts/xzgrep.1 "${XZGREP_LINKS}") + my_install_man(scripts_Documentation src/scripts/xzmore.1 "${XZMORE_LINKS}") + my_install_man(scripts_Documentation src/scripts/xzless.1 "${XZLESS_LINKS}") +endif() + + +############################################################################# +# Documentation +############################################################################# + +if(UNIX) + option(ENABLE_DOXYGEN "Use Doxygen to generate liblzma API docs" OFF) + + if (ENABLE_DOXYGEN) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc") + + add_custom_command( + VERBATIM + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/doxygen/update-doxygen" + ARGS "api" + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/doc" + OUTPUT doc/api/index.html + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doxygen/update-doxygen" + "${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile" + ${LIBLZMA_API_HEADERS} ) - # Set srcdir environment variable so that the tests find their - # input files from the source tree. - # - # Set the return code for skipped tests to match Automake convention. - set_tests_properties("${TEST}" PROPERTIES - ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}/tests" - SKIP_RETURN_CODE 77 + add_custom_target( + liblzma-doc-api ALL + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/api/index.html" ) - endforeach() + + install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/api" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT liblzma_Documentation) + endif() endif() + +install(DIRECTORY doc/examples + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT liblzma_Documentation) + +# GPLv2 applies to the scripts. If GNU getopt_long is used then +# LGPLv2.1 applies to the command line tools but, using the +# section 3 of LGPLv2.1, GNU getopt_long can be handled as GPLv2 too. +# Thus GPLv2 should be enough here. +install(FILES AUTHORS + COPYING + COPYING.0BSD + COPYING.GPLv2 + NEWS + README + THANKS + doc/faq.txt + doc/history.txt + doc/lzma-file-format.txt + doc/xz-file-format.txt + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT Documentation) + + +############################################################################# +# Tests +############################################################################# + +# Tests are in a separate file so that it's possible to delete the whole +# "tests" directory and still have a working build, just without the tests. +include(tests/tests.cmake OPTIONAL) diff --git a/COPYING b/COPYING index e54eeac..aed2153 100644 --- a/COPYING +++ b/COPYING @@ -3,74 +3,81 @@ XZ Utils Licensing ================== Different licenses apply to different files in this package. Here - is a rough summary of which licenses apply to which parts of this - package (but check the individual files to be sure!): + is a summary of which licenses apply to which parts of this package: - - liblzma is in the public domain. + - liblzma is under the BSD Zero Clause License (0BSD). - - xz, xzdec, and lzmadec command line tools are in the public - domain unless GNU getopt_long had to be compiled and linked - in from the lib directory. The getopt_long code is under - GNU LGPLv2.1+. + - The command line tools xz, xzdec, lzmadec, and lzmainfo are + under 0BSD except that, on systems that don't have a usable + getopt_long, GNU getopt_long is compiled and linked in from the + 'lib' directory. The getopt_long code is under GNU LGPLv2.1+. - The scripts to grep, diff, and view compressed files have been - adapted from gzip. These scripts and their documentation are - under GNU GPLv2+. + adapted from GNU gzip. These scripts (xzgrep, xzdiff, xzless, + and xzmore) are under GNU GPLv2+. The man pages of the scripts + are under 0BSD; they aren't based on the man pages of GNU gzip. - - All the documentation in the doc directory and most of the - XZ Utils specific documentation files in other directories - are in the public domain. + - Most of the XZ Utils specific documentation that is in + plain text files (like README, INSTALL, PACKAGERS, NEWS, + and ChangeLog) are under 0BSD unless stated otherwise in + the file itself. The files xz-file-format.txt and + lzma-file-format.xt are in the public domain but may + be distributed under the terms of 0BSD too. - Note: The JavaScript files (under the MIT license) have - been removed from the Doxygen-generated HTML version of the - liblzma API documentation. Doxygen itself is under the GNU GPL - but the remaining files generated by Doxygen are not affected - by the licenses used in Doxygen because Doxygen licensing has - the following exception: + - Translated messages and man pages are under 0BSD except that + some old translations are in the public domain. - "Documents produced by doxygen are derivative works - derived from the input used in their production; - they are not affected by this license." + - Test files and test code in the 'tests' directory, and + debugging utilities in the 'debug' directory are under + the BSD Zero Clause License (0BSD). - - Translated messages are in the public domain. + - The GNU Autotools based build system contains files that are + under GNU GPLv2+, GNU GPLv3+, and a few permissive licenses. + These files don't affect the licensing of the binaries being + built. - - The build system contains public domain files, and files that - are under GNU GPLv2+ or GNU GPLv3+. None of these files end up - in the binaries being built. + - The 'extra' directory contains files that are under various + free software licenses. These aren't built or installed as + part of XZ Utils. - - Test files and test code in the tests directory, and debugging - utilities in the debug directory are in the public domain. + For the files under the BSD Zero Clause License (0BSD), if + a copyright notice is needed, the following is sufficient: - - The extra directory may contain public domain files, and files - that are under various free software licenses. + Copyright (C) The XZ Utils authors and contributors - You can do whatever you want with the files that have been put into - the public domain. If you find public domain legally problematic, - take the previous sentence as a license grant. If you still find - the lack of copyright legally problematic, you have too many - lawyers. - - As usual, this software is provided "as is", without any warranty. - - If you copy significant amounts of public domain code from XZ Utils + If you copy significant amounts of 0BSD-licensed code from XZ Utils into your project, acknowledging this somewhere in your software is polite (especially if it is proprietary, non-free software), but - naturally it is not legally required. Here is an example of a good - notice to put into "about box" or into documentation: + it is not legally required by the license terms. Here is an example + of a good notice to put into "about box" or into documentation: This software includes code from XZ Utils . The following license texts are included in the following files: + - COPYING.0BSD: BSD Zero Clause License - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 - COPYING.GPLv2: GNU General Public License version 2 - COPYING.GPLv3: GNU General Public License version 3 - Note that the toolchain (compiler, linker etc.) may add some code - pieces that are copyrighted. Thus, it is possible that e.g. liblzma - binary wouldn't actually be in the public domain in its entirety - even though it contains no copyrighted code from the XZ Utils source - package. - - If you have questions, don't hesitate to ask the author(s) for more - information. + A note about old XZ Utils releases: + + XZ Utils releases 5.4.6 and older and 5.5.1alpha have a + significant amount of code put into the public domain and + that obviously remains so. The switch from public domain to + 0BSD for newer releases was made in Febrary 2024 because + public domain has (real or perceived) legal ambiguities in + some jurisdictions. + + There is very little *practical* difference between public + domain and 0BSD. The main difference likely is that one + shouldn't claim that 0BSD-licensed code is in the public + domain; 0BSD-licensed code is copyrighted but available under + an extremely permissive license. Neither 0BSD nor public domain + require retaining or reproducing author, copyright holder, or + license notices when distributing the software. (Compare to, + for example, BSD 2-Clause "Simplified" License which does have + such requirements.) + + If you have questions, don't hesitate to ask for more information. + The contact information is in the README file. diff --git a/COPYING.0BSD b/COPYING.0BSD new file mode 100644 index 0000000..4322122 --- /dev/null +++ b/COPYING.0BSD @@ -0,0 +1,11 @@ +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/ChangeLog b/ChangeLog index 4dd0978..c779597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11756 +1,12662 @@ -commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9 -Author: Jia Tan -Date: 2023-10-31 22:30:29 +0800 +commit 3ec664d3f652133136587a51d4505b1abe1acdd7 +Author: Lasse Collin +Date: 2024-05-29 18:03:51 +0300 - Bump version and soname for 5.4.5. + Bump version and soname for 5.6.2 src/liblzma/Makefile.am | 2 +- src/liblzma/api/lzma/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -commit 84c0cfc556287628df871703672879e530d0391f -Author: Jia Tan -Date: 2023-11-01 20:18:30 +0800 +commit 3cc0aa702e50b786c52c6f3d3f831a635c4df197 +Author: Lasse Collin +Date: 2024-05-29 18:03:04 +0300 - Add NEWS for 5.4.5. + Add NEWS for 5.6.2 - NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 74 insertions(+) + NEWS | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 130 insertions(+) -commit d90ed84db9770712e2421e170076b43bda9b64a7 +commit 526d3f7f2c2d5e134157d08b37fb5fd0b125799e Author: Lasse Collin -Date: 2023-10-31 21:41:09 +0200 +Date: 2024-05-29 18:03:04 +0300 - liblzma: Fix compilation of fastpos_tablegen.c. - - The macro lzma_attr_visibility_hidden has to be defined to make - fastpos.h usable. The visibility attribute is irrelevant to - fastpos_tablegen.c so simply #define the macro to an empty value. - - fastpos_tablegen.c is never built by the included build systems - and so the problem wasn't noticed earlier. It's just a standalone - program for generating fastpos_table.c. - - Fixes: https://github.com/tukaani-project/xz/pull/69 - Thanks to GitHub user Jamaika1. + Add NEWS for 5.4.7 - src/liblzma/lzma/fastpos_tablegen.c | 2 ++ - 1 file changed, 2 insertions(+) + NEWS | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 89 insertions(+) -commit 9b1268538b0b2c6c0a121f95165de65fc71ad23c -Author: Jia Tan -Date: 2023-10-31 21:51:40 +0800 +commit 660b09279e8f544acf120d29194d5c3051b484eb +Author: Lasse Collin +Date: 2024-05-29 18:03:04 +0300 - Build: Fix text wrapping in an output message. + Add NEWS for 5.2.13 - configure.ac | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) + NEWS | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 115 insertions(+) -commit 068ee436f4a8a706125ef43e8228b30001b1554e +commit 7d76282dac766c0ced8ae24e0f7ce0005f3e377d Author: Lasse Collin -Date: 2023-10-22 17:59:11 +0300 +Date: 2024-05-29 17:47:13 +0300 - liblzma: Use lzma_always_inline in memcmplen.h. + Translations: Run po4a/update-po + + Now the files are in the new formatting without source file + line numbers. Future updates should keep the diffs much smaller. - src/liblzma/common/memcmplen.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + po4a/de.po | 1592 ++++++++++--------- + po4a/fr.po | 4450 +++++++++++++++++----------------------------------- + po4a/ko.po | 1592 ++++++++++--------- + po4a/pt_BR.po | 4817 ++++++++++++++++++--------------------------------------- + po4a/ro.po | 1592 ++++++++++--------- + po4a/uk.po | 1592 ++++++++++--------- + 6 files changed, 6114 insertions(+), 9521 deletions(-) -commit 6cdf0a7b7974baf58c1fd20ec3278f3b84ae56e5 +commit 4470c3f7d8954bb47b280ec07ad0bd4be2223083 Author: Lasse Collin -Date: 2023-10-30 17:43:03 +0200 +Date: 2024-05-29 17:44:53 +0300 - liblzma: #define lzma_always_inline in common.h. + Translations: Run "make -C po update-po" + + In the past this wasn't done before releases; the Git repository + just contained the files from the Translation Project. But this + way it is clearer when comparing release tarballs against the + Git repository. In future releases this might no longer be necessary + within a stable branch as the .po files won't change so easily anymore + when creating a tarball. - src/liblzma/common/common.h | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) + po/ca.po | 567 +++++++++++++++++++++++++--------------- + po/cs.po | 821 +++++++++++++++++++++++++++++++++++++-------------------- + po/da.po | 809 +++++++++++++++++++++++++++++++++++--------------------- + po/de.po | 403 ++++++++++++++-------------- + po/eo.po | 403 ++++++++++++++-------------- + po/es.po | 403 ++++++++++++++-------------- + po/fi.po | 578 +++++++++++++++++++++++++--------------- + po/fr.po | 538 +++++++++++++++++++++++--------------- + po/hr.po | 403 ++++++++++++++-------------- + po/hu.po | 403 ++++++++++++++-------------- + po/it.po | 854 +++++++++++++++++++++++++++++++++++++++--------------------- + po/ko.po | 403 ++++++++++++++-------------- + po/pl.po | 403 ++++++++++++++-------------- + po/pt.po | 842 +++++++++++++++++++++++++++++++++++++++-------------------- + po/pt_BR.po | 567 +++++++++++++++++++++++++--------------- + po/ro.po | 403 ++++++++++++++-------------- + po/sr.po | 838 ++++++++++++++++++++++++++++++++++++++-------------------- + po/sv.po | 403 ++++++++++++++-------------- + po/tr.po | 567 +++++++++++++++++++++++++--------------- + po/uk.po | 403 ++++++++++++++-------------- + po/vi.po | 403 ++++++++++++++-------------- + po/zh_CN.po | 417 +++++++++++++++-------------- + po/zh_TW.po | 558 ++++++++++++++++++++++++--------------- + 23 files changed, 7257 insertions(+), 5132 deletions(-) -commit 33daad3961a4f07f3902b40f13e823e6e43e85da +commit 33b8a85face5392b5ac843bdbe3a72f024cad6ef Author: Lasse Collin -Date: 2023-10-22 17:15:32 +0300 +Date: 2024-05-29 16:33:24 +0300 - liblzma: Use lzma_attr_visibility_hidden on private extern declarations. + Build: Update po/*.po files only when needed - These variables are internal to liblzma and not exposed in the API. + When po/xz.pot doesn't exist, running "make" or "make dist" will + create it. Then the .po files will be updated but only if they + actually would change more than the POT-Creation-Date line. + Then the .gmo files would be generated from the .po files. + This is the case before and after this commit. + + However, "make dist" and thus "make mydist" did a forced update + to the files, updating them even if the only change was the + POT-Creation-Date line. This had pros and cons: It made it clear + that the .po file really is in sync with the recent strings in + the package. On the other hand, it added noise in form of changed + files in the source tree and distribution tarballs. It can be + ignored with something like "diff -I'^"POT-Creation-Date: '" but + it's still a minor annoyance *if* there's not enough value in + having the most recent timestamp. + + Setting DIST_DEPENDS_ON_UPDATE_PO = no means that such forced + update won't happen in "make dist" anymore. However, the "mydist" + target will use xz.pot-update target which is the same target that + is run when xz.pot doesn't exist at all yet. Thus "mydist" will + ensure that the translations are up to date, without noise from + changes that would affect only the POT-Creation-Date line. + + Note that po4a always uses msgmerge with --update, so POT-Creation-Date + in the man page translations is never the only change in .po files. + In that sense this commit makes the message translations behave more + similarly to the man page translations. + + Distribution tarballs will still have non-reproducible POT-Creation-Date + in po/xz.pot and po4a/xz-man.pot but those are just two files. Even they + could be made reproducible from a Git timestamp if desired. + + (cherry picked from commit 9284f1aea31f0eb23e2ea72f7218b271e2234762) - src/liblzma/check/check.h | 7 +++++++ - src/liblzma/common/stream_flags_common.h | 3 +++ - src/liblzma/lz/lz_encoder_hash.h | 1 + - src/liblzma/lzma/fastpos.h | 1 + - src/liblzma/rangecoder/price.h | 1 + - 5 files changed, 13 insertions(+) + Makefile.am | 3 ++- + po/Makevars | 6 +++++- + 2 files changed, 7 insertions(+), 2 deletions(-) -commit 6961a5ac7df178bfc2b7a181c40575847bc3035f +commit 09daebd66b55799bbc495b84310a86c91bbfc1c8 Author: Lasse Collin -Date: 2023-10-22 17:08:39 +0300 +Date: 2024-05-28 21:10:33 +0300 - liblzma: #define lzma_attr_visibility_hidden in common.h. - - In ELF shared libs: + po4a/update-po: Disable wrapping in .pot and .po files - -fvisibility=hidden affects definitions of symbols but not - declarations.[*] This doesn't affect direct calls to functions - inside liblzma as a linker can replace a call to lzma_foo@plt - with a call directly to lzma_foo when -fvisibility=hidden is used. - - [*] It has to be like this because otherwise every installed - header file would need to explictly set the symbol visibility - to default. + The .po files from the Translation Project come with unwrapped + strings so this matches it. - When accessing extern variables that aren't defined in the - same translation unit, compiler assumes that the variable has - the default visibility and thus indirection is needed. Unlike - function calls, linker cannot optimize this. + This may reduce the noise in diffs too. When the beginning of + a paragraph had changed, the rest of the lines got rewrapped + in msgsid. Now it's just one very long line that changes when + a paragraph has been edited. - Using __attribute__((__visibility__("hidden"))) with the extern - variable declarations tells the compiler that indirection isn't - needed because the definition is in the same shared library. + The --add-location=file option was removed as redundant. The line + numbers don't exist in the .pot file due to --porefs file and thus + they cannot get copied to the .po files either. - About 15+ years ago, someone told me that it would be good if - the CRC tables would be defined in the same translation unit - as the C code of the CRC functions. While I understood that it - could help a tiny amount, I didn't want to change the code because - a separate translation unit for the CRC tables was needed for the - x86 assembly code anyway. But when visibility attributes are - supported, simply marking the extern declaration with the - hidden attribute will get identical result. When there are only - a few affected variables, this is trivial to do. I wish I had - understood this back then already. + (cherry picked from commit 4beba1cd62d7f8f7a6f1e899b68292d94c53b599) - src/liblzma/common/common.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + po4a/update-po | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) -commit 5b9e16764905d06fa8e8339ba185ddfee304e5fb +commit 51ad72dae4e516e9292f6f399bd1e4970b77f7c1 Author: Lasse Collin -Date: 2023-09-30 22:54:28 +0300 +Date: 2024-05-28 18:36:53 +0300 - liblzma: Refer to MinGW-w64 instead of MinGW in the API headers. + Update contact info in README - MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project - at ) has GCC 9.2.0 as the - most recent GCC package (released 2021-02-02). The project might - still be alive but majority of people have switched to MinGW-w64. - Thus it seems clearer to refer to MinGW-w64 in our API headers too. - Building with MinGW is likely to still work but I haven't tested it - in the recent years. + (cherry picked from commit b14c130a58a649f9a73392eeb122cb252327c569) - src/liblzma/api/lzma.h | 4 ++-- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + README | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) -commit 36fabdbe67c8a8fbdc3ac695a91fc443a1328cc4 +commit 18463917f9b255b8f925fa54ab9388319735b14a Author: Lasse Collin -Date: 2023-09-27 00:58:17 +0300 +Date: 2024-05-28 13:25:07 +0300 - CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed. + Translations: Use --package-name=xz-man with po4a - A CMake option LARGE_FILE_SUPPORT is created if and only if - -D_FILE_OFFSET_BITS=64 affects sizeof(off_t). + This is to match reality. See the added comment. - This is needed on many 32-bit platforms and even with 64-bit builds - with MinGW-w64 to get support for files larger than 2 GiB. + (cherry picked from commit 75f5f2e014b0ee646963f36bc6a9c840fb272353) - CMakeLists.txt | 7 ++++- - cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++ - 2 files changed, 58 insertions(+), 1 deletion(-) + po4a/update-po | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit 989c8c354cbd2d20fbae4a432a3e31f5bc1cb9bf +commit 26bbcb13cd2bbb56fe406544a484b4edfc7e0837 Author: Lasse Collin -Date: 2023-09-30 02:14:25 +0300 +Date: 2024-05-28 13:03:40 +0300 - CMake: Generate and install liblzma.pc if not using MSVC. + Translations: Omit --package-name from po/Makevars - Autotools based build uses -pthread and thus adds it to Libs.private - in liblzma.pc. CMake doesn't use -pthread at all if pthread functions - are available in libc so Libs.private doesn't get -pthread either. + This is closer to the reality in the po/*.po files. + + (cherry picked from commit eb217d016cfbbba1babc19a61095b3ea25898af6) - CMakeLists.txt | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) + po/Makevars | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit 983f3b458dc79c5976a4237fdfe4f8079f8d8830 +commit c35ee804b89556d15bc8cdc16867f4316e69392f Author: Lasse Collin -Date: 2023-09-30 01:13:13 +0300 +Date: 2024-05-28 01:17:45 +0300 - CMake: Rearrange the PACKAGE_ variables. + Translations: Omit man page line numbers from .pot and .po files - The windres workaround now replaces spaces with \x20 so - the package name isn't repeated. + (cherry picked from commit 9114267038deaecf4832a5cacb5acbe6591ac839) + + po4a/update-po | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 0f4429d47f9cfe2cdfbad115a7bc2f11221cb217 +Author: Lasse Collin +Date: 2024-05-28 01:06:30 +0300 + + Translations: Use the xgettext option --add-location=file - These changes will help with creation of liblzma.pc. + (cherry picked from commit 093490b58271e9424ce38a7b1b38bcf61b9c86c6) - CMakeLists.txt | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) + po/Makevars | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 4083c8e9501a48934a5fb563d2c3ce2ae143cd27 +commit a93e2c2d1d34a6f609d24a8e62072ce78df7a734 Author: Lasse Collin -Date: 2023-09-29 20:46:11 +0300 +Date: 2024-05-28 00:43:53 +0300 - liblzma: Add Cflags.private to liblzma.pc.in for MSYS2. + Translations: Use the msgmerge option --add-location=file - It properly adds -DLZMA_API_STATIC when compiling code that - will be linked against static liblzma. Having it there on - systems other than Windows does no harm. + This way the PO file diffs are less noisy but the locations of the + strings are still present at file level, just without line numbers. - See: https://www.msys2.org/docs/pkgconfig/ + The option is available since gettext 0.19 (2014). + configure.ac requires 0.19.6. + + (cherry picked from commit fccebe2b4fd513488fc920e4dac32562ed3c7637) - src/liblzma/liblzma.pc.in | 1 + - 1 file changed, 1 insertion(+) + po/Makevars | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 661549ecb7a9b136d72a01c137d9776c75d52d51 +commit d4389895592e9a8e0f6391fdad816ae0537bb07b Author: Lasse Collin -Date: 2023-09-27 22:46:20 +0300 +Date: 2024-05-27 12:22:08 +0300 - CMake: Create liblzma.def when building liblzma.dll with MinGW-w64. + Build: Use $(SHELL) instead of sh to run scripts in Makefile.am + + (cherry picked from commit f361d9ae85707a87eb28db400eb7229cec103d58) - CMakeLists.txt | 20 ++++++++++++++++++++ - cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++ - 2 files changed, 46 insertions(+) + Makefile.am | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit 0e546eb4da05c52b7d257e5bd85e15c51c4d86a3 +commit 5781414b6e3120098b0060d073aa2b0580ff6f40 Author: Lasse Collin -Date: 2023-10-26 21:44:42 +0300 +Date: 2024-05-23 17:25:13 +0300 - CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR. + Translations: Change the home page URLs in man page translations - In this case they have identical values. + Since the source strings have changed, these would get marked as + fuzzy and the original string would be used instead. The original + and translated strings are identical in this case so it wouldn't + matter. But patching the translations helps still because then + po4a will show the correct translation percentage. + + (cherry picked from commit a26dece34793a09aac2476f954d162d03e9cf62b) - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po4a/de.po | 8 ++++---- + po4a/fr.po | 4 ++-- + po4a/ko.po | 4 ++-- + po4a/pt_BR.po | 4 ++-- + po4a/ro.po | 8 ++++---- + po4a/uk.po | 8 ++++---- + 6 files changed, 18 insertions(+), 18 deletions(-) -commit da4d04e4d6e199d28b58bd2e0df4e120c52dd5d7 +commit 3670e0616eb9d86e7519d2b76242fd32c6e0c1ae Author: Lasse Collin -Date: 2023-10-01 19:10:57 +0300 +Date: 2024-05-23 15:15:18 +0300 - CMake/Windows: Fix the import library filename. + CMake: Add manual support for 32-bit x86 assembly files - Both PREFIX and IMPORT_PERFIX have to be set to "" to get - liblzma.dll and liblzma.dll.a. + One has to pass -DENABLE_X86_ASM=ON to cmake to enable the + CRC assembly code. Autodetection isn't done. Looking at + CMAKE_SYSTEM_PROCESSOR might not work as it comes from uname + unless cross-compilation is done using a CMake toolchain file. + + On top of this, if the code is run on modern processors that support + the CLMUL instruction, then the C code should be faster (but then + one should also be using a x86-64 build if possible). + + (cherry picked from commit 24387c234b4eed1ef9a7eaa107391740b4095568) - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 34 +++++++++++++++++++++++++++++++--- + 1 file changed, 31 insertions(+), 3 deletions(-) -commit 007558a358c48a0175cc8d47d11798d7967282ab +commit c1b001b09e902ecacabb8a2ae1fc991018a4d1f8 Author: Lasse Collin -Date: 2023-10-11 19:47:44 +0300 +Date: 2024-05-23 14:26:45 +0300 - CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable. + CMake: Rename USE_DOXYGEN to ENABLE_DOXYGEN - Using set(ENABLE_THREADS "posix") is confusing because it sets - a new normal variable and leaves the cache entry with the same - name unchanged. The intent wasn't to change the cache entry so - this switches to a different variable name. + It's more consistent with the other option() uses. + + (cherry picked from commit 0fb3c9c3f684f5a25bd425ed079a20a79f0c969d) - CMakeLists.txt | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 7d01de67ee3dd76cfc12c23220e2e4cdc59708f1 +commit 7213fe39c717d4623c92af715484a71d9a6ff8d0 Author: Lasse Collin -Date: 2023-10-09 21:12:31 +0300 +Date: 2024-05-22 15:21:53 +0300 - CMake: Edit threading related messages. + Use more confident language in COPYING - It's mostly to change from "thread method" to "threading method". + (cherry picked from commit 62733592a1cc6f0b41f46ef52e06d1a6fe1ff38a) - CMakeLists.txt | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) + COPYING | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit f8edcf3da689aad4b21e139197725450f2c456a0 +commit 15358be94a4e3f9c20f331b64b3980f3e5283760 Author: Lasse Collin -Date: 2023-10-09 20:59:24 +0300 +Date: 2024-04-29 17:16:38 +0300 - CMake: Use FATAL_ERROR if user-supplied options aren't understood. + Add SPDX license identifiers to files under tests/ossfuzz - This way typos are caught quickly and compounding error messages - are avoided (a single typo could cause more than one error). + (cherry picked from commit 9ae2ebc1e504a1814b0788de95fb5c58c0328dde) + + tests/ossfuzz/Makefile | 2 ++ + tests/ossfuzz/config/fuzz_decode_alone.options | 2 ++ + tests/ossfuzz/config/fuzz_decode_stream.options | 2 ++ + tests/ossfuzz/config/fuzz_encode_stream.options | 2 ++ + tests/ossfuzz/config/fuzz_lzma.dict | 2 ++ + tests/ossfuzz/config/fuzz_xz.dict | 2 ++ + 6 files changed, 12 insertions(+) + +commit 1aa92c7ffd0bf8f9738ebf3bd1263bd6f5f096a2 +Author: Lasse Collin +Date: 2024-04-29 17:16:06 +0300 + + Add SPDX license identifier to .codespellrc - This keeps using SEND_ERROR when the system is lacking a feature - (like threading library or sandboxing method). This way the whole - configuration log will be generated in case someone wishes to - report a problem upstream. + (cherry picked from commit 9000d70eb9815bd7f43ffddc1c3316c507aa0e05) - CMakeLists.txt | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) + .codespellrc | 2 ++ + 1 file changed, 2 insertions(+) -commit 1695021e4a233a9388ddd428654c1447f0ea3bfb -Author: Jia Tan -Date: 2023-10-19 16:09:01 +0800 +commit 3c7e400fdcabc0a1b78863948fc17964667a9401 +Author: Lasse Collin +Date: 2024-05-22 15:12:09 +0300 - CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL. + Move entries po4a/.gitignore to the top level .gitignore - The option is enabled by default, but will only be visible to a user - listing cache variables or using a CMake GUI application if the - immintrin.h header file is found. + The po4a directory is in EXTRA_DIST and thus all files there + are included in the package. .gitignore doesn't belong in the + package so keep that file out of the po4a directory. - This mirrors our Autotools build --disable-clmul-crc functionality. + (cherry picked from commit 903c16fcfa5bfad0cdb2a7383d941243bcb12e76) - CMakeLists.txt | 40 +++++++++++++++++++++++----------------- - 1 file changed, 23 insertions(+), 17 deletions(-) + .gitignore | 4 ++++ + po4a/.gitignore | 3 --- + 2 files changed, 4 insertions(+), 3 deletions(-) -commit 5056bc51071d1a07097c5667a0d5bd85242e31b9 +commit 8a99272d4a9358dabdb5bc0b72f4c5240a9dc066 Author: Lasse Collin -Date: 2023-10-14 17:56:59 +0300 +Date: 2024-05-20 16:55:00 +0300 - tuklib_integer: Revise unaligned reads and writes on strict-align archs. + CMake: Add comments - In XZ Utils context this doesn't matter much because - unaligned reads and writes aren't used in hot code - when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined. + (cherry picked from commit 9d997d6f9d4f042412e45c7b7a23a14ad2e4f9aa) - src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------ - 1 file changed, 189 insertions(+), 67 deletions(-) + tests/tests.cmake | 2 ++ + 1 file changed, 2 insertions(+) -commit 9e14743ee5ba79181076bc33952245d5b18fbc58 +commit c35259c9e2400f6f88c269d95ecafdb223ff45d2 Author: Lasse Collin -Date: 2023-09-23 02:21:49 +0300 +Date: 2024-05-20 16:55:00 +0300 - tuklib_integer: Add missing write64be and write64le fallback functions. + CMake: Remove the note that some tests aren't run + + They are now in the common build configurations. + + (cherry picked from commit d35368b33e54bad2f566df99fac29ffea38e34de) - src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) -commit 4cc91ceb3992ef4f51302b56178c3b2c2aeaaaad -Author: Jia Tan -Date: 2023-10-12 20:12:18 +0800 +commit 30982a215395f19b3837c3da540e1cb3f913569f +Author: Lasse Collin +Date: 2024-05-20 16:55:00 +0300 - Build: Update visibility.m4 from Gnulib. + CMake: Add support for test_files.sh - Updating from version 6 -> 8 from upstream. Declarations for variables - and function bodies were added to avoid unnecessary failures with - -Werror. + (cherry picked from commit dc232d584619b2819a9c52d6ad5d8b5d56b392ba) - m4/visibility.m4 | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + tests/tests.cmake | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) -commit 1824a6007cb1c8d5d7abcc7bf649148bc06fa72c +commit 3a8f81e0ad4cd1c102a03ff09e703cf8cb074afc Author: Lasse Collin -Date: 2023-10-06 19:36:35 +0300 +Date: 2024-05-20 16:55:00 +0300 - Update THANKS. + Tests: Make test_files.sh more flexible + + Add a new optional argument to specify the directory of the xz and + xzdec executables. + + If ../config.h doesn't exist, assume that all encoders and decoders + are available. + + (cherry picked from commit a7e9230af9d1f87f474fe38886eb977d4149dc9b) - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_files.sh | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) -commit 8fdc71a27d07b10a3da52432432e080b6d577642 -Author: Jia Tan -Date: 2023-09-29 20:14:39 +0800 +commit 0644675c829143112c85455f8a6aa91bfc4e1bbb +Author: Lasse Collin +Date: 2024-05-20 16:55:00 +0300 - CMake: Rename xz and man page symlink custom targets. + CMake: Add support for test_compress.sh tests - The Ninja Generator for CMake cannot have a custom target and its - BYPRODUCTS have the same name. This has prevented Ninja builds on - Unix-like systems since the xz symlinks were introduced in - 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. + (cherry picked from commit b40e6efbb48d740b9b5b303e59e344801cbb5bd8) - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + tests/tests.cmake | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) -commit 38171492ded6426ddf53d0c200fa8c93fcd02a60 +commit dcc02a6ca0e0ac4e330e820683754badbcf9815b Author: Lasse Collin -Date: 2023-09-27 19:54:35 +0300 +Date: 2024-05-20 16:55:00 +0300 - CMake: Fix Windows build with Clang/LLVM 17. + Tests: Make test_compress.sh more flexible - llvm-windres 17.0.0 has more accurate emulation of GNU windres, so - the hack for GNU windres must now be used with llvm-windres too. + Add a new optional second argument: directory of the xz and xzdec + executables. This is need with the CMake build where the binaries + end up in the top-level build directory. - LLVM 16.0.6 has the old behavior and there likely won't be more - 16.x releases. So we can simply check for >= 17.0.0. + If ../config.h doesn't exist, assume that all encoders and decoders + are available. This will make this script usable from CMake in the + most common build configuration. - The workaround must not be used with Clang that is acting in - MSVC mode. This checks for the known environments that need - the workaround instead of using "NOT MSVC". + NOTE: Since the existence of ../config.h is checked, the working + directory of the test script must be a subdir in the build tree! + Otherwise ../config.h would look outside the build tree. - See also: - https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47 + Use the default check type instead of forcing CRC32 or CRC64. + Now the script doesn't need to check if CRC64 is available. + + (cherry picked from commit ac3222d2cb1ff3a15eb6d58f9ea9bc78e8bc3bb2) - CMakeLists.txt | 26 ++++++++++++++------------ - 1 file changed, 14 insertions(+), 12 deletions(-) + tests/test_compress.sh | 41 +++++++++++++++++++++++++++++------------ + 1 file changed, 29 insertions(+), 12 deletions(-) -commit 1bce6fe48334b5df33d0487a9cbe41950122230e -Author: Jia Tan -Date: 2023-09-27 00:02:11 +0800 +commit c761b7051fb2ebb6da3cbecafe695fb5af7b2c9c +Author: Lasse Collin +Date: 2024-05-20 16:55:00 +0300 - liblzma: Avoid compiler warning without creating extra symbol. + CMake: Prepare to support the test_*.sh tests - When the generic fast crc64 method is used, then we omit - lzma_crc64_table[][]. + This is a bit hacky since the scripts grep config.h to know which + features were built but the CMake build doesn't create config.h. + So instead those test scripts will be run only when all relevant + features have been enabled. - The C standards don't allow an empty translation unit which can be - avoided by declaring something, without exporting any symbols. + (cherry picked from commit 006040b29c83104403621e950ada0c8956c56b3d) - src/liblzma/check/crc64_table.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + tests/tests.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) -commit dce95a593e6cd9779110aa1e314abd8b35c75f6b +commit a71bc2d75b95f85fe046f0fd1fb25d36be2b20ba Author: Lasse Collin -Date: 2023-09-26 17:24:15 +0300 +Date: 2024-05-20 16:55:00 +0300 - Build: Update the comment about -Werror usage in checks. + Tests: test_suffix.sh: Add a comment + + (cherry picked from commit 6167607a6ea72fb74eefb943c4566e3cab528cd2) - configure.ac | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + tests/test_suffix.sh | 3 +++ + 1 file changed, 3 insertions(+) -commit f3c32762ae309afa2fe330e7fb397acfdedc4d37 +commit 8fda5ce872632e464a1f9660b3ab8dac939a03c6 Author: Lasse Collin -Date: 2023-09-26 13:51:31 +0300 +Date: 2024-05-18 00:34:07 +0300 - Build: Fix underquoted AC_LANG_SOURCE. + Fix typos - It made no practical difference in this case. + Thanks to xx on #tukaani. + + (cherry picked from commit 4e9023857d287f624562156b60dc23d2b64c0f10) - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/common/mythread.h | 2 +- + src/common/tuklib_integer.h | 2 +- + src/liblzma/api/lzma/base.h | 2 +- + src/liblzma/common/filter_buffer_decoder.c | 2 +- + src/liblzma/common/filter_common.c | 2 +- + src/scripts/xzgrep.in | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) -commit 7dd57f2f2c8fde93fa42b4dbf6d9860717723b41 +commit 2729079bcb8dd1c3ab1a79426690d17f6f8e6f7d Author: Lasse Collin -Date: 2023-09-26 13:14:37 +0300 +Date: 2024-05-18 00:23:52 +0300 - Build: Silence Autoconf warning. - - There was a use of AC_COMPILE_IFELSE that didn't use - AC_LANG_SOURCE and Autoconf warned about this. The omission - had been intentional but it turned out that this didn't do - what I thought it would. - - Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE - inserts all #defines that have been made with AC_DEFINE so - far (confdefs.h). The idea was that omitting AC_LANG_SOURCE - would mean that only the exact code included in the - AC_COMPILE_IFELSE call would be compiled. - - With C programs this is not true: the #defines get added without - AC_LANG_SOURCE too. There seems to be no neat way to avoid this. - Thus, with the C language at least, adding AC_LANG_SOURCE makes - no other difference than silencing a warning from Autoconf. The - generated "configure" remains identical. (Docs of AC_LANG_CONFTEST - say that the #defines have been inserted since Autoconf 2.63b and - that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is - documented if one also reads the docs of macros that one isn't - calling directly.) + liblzma: Fix white space - Any extra code, including #defines, can cause problems for - these two tests because these tests must use -Werror. - CC=clang CFLAGS=-Weverything is the most extreme example. - It enables -Wreserved-macro-identifier which warns about - It's possible to write a test file that passes -Weverything but - it becomes impossible when Autoconf inserts confdefs.h. + Thanks to xx on #tukaani. - So this commit adds AC_LANG_SOURCE to silence Autoconf warnings. - A different solution is needed for -Werror tests. + (cherry picked from commit b14d08fbbc254485ace9ccfe7908674f608a62ae) - configure.ac | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + src/liblzma/simple/simple_coder.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit edec253e418562f3164a01ecc8805295fa022efa -Author: Jia Tan -Date: 2023-09-26 00:47:26 +0800 +commit a289c4dfeb3ded35e129c48b13f46605f0138704 +Author: Lasse Collin +Date: 2024-05-13 17:15:04 +0300 - Build: Remove Gnulib dependency from tests. + xz: Document the static function get_chains_memusage() - The tests do not use any Gnulib replacements so they do not need to link - libgnu.a or have /lib in the include path. + (cherry picked from commit 142e670a413a7bce1a2647f1cf1f33f8ee2dbe88) - tests/Makefile.am | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) + src/xz/coder.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) -commit 46cb133ce7360496eecca1255b364c05f0205855 -Author: Jia Tan -Date: 2023-09-26 00:43:43 +0800 +commit 6f0db31713845386ce2419c55b2df89b53b80dd3 +Author: Lasse Collin +Date: 2024-05-13 17:07:22 +0300 - CMake: Remove /lib from tests include path. + xz: Rename filters_memusage_max() to get_chains_memusage() - The tests never included anything from /lib, so this was not needed. + (cherry picked from commit 78e984399a64bfee5d11e7308e0bdbc1006db2ca) - CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) + src/xz/coder.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) -commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1 +commit d7e2bf7e2dc9289a7a5dd0311d19d10de6d7ea1b Author: Lasse Collin -Date: 2023-09-24 16:32:32 +0300 +Date: 2024-05-13 17:04:05 +0300 - sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO. + xz: Rename filter_memusages to chains_memusages + + (cherry picked from commit 54c3db0a83d3e67d89aba92a0957f2dce9b111a7) - src/common/sysdefs.h | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + src/xz/coder.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6 +commit 58f200b6d1dc4cbc1ab3315a359120ab6eb84878 Author: Lasse Collin -Date: 2023-09-22 02:33:29 +0300 +Date: 2024-05-12 22:26:30 +0300 - xz: Windows: Don't (de)compress to special files like "con" or "nul". - - Before this commit, the following writes "foo" to the - console and deletes the input file: + xz: Simplify the memory usage scaling code - echo foo | xz > con_xz - xz --suffix=_xz --decompress con_xz - - It cannot happen without --suffix because names like con.xz - are also special and so attempting to decompress con.xz - (or compress con to con.xz) will already fail when opening - the input file. + This is closer to what it was before the --filtersX support was added, + just extended to support for scaling all filter chains. The method + before this commit was an extended version of the original too but + it was done in a more complex way for no clear reason. In case of + an error, the complex version printed fewer informative messages + (a good thing) but it's not a sigificant benefit. - Similar thing is possible when compressing. The following - writes to "nul" and the input file "n" is deleted. + In the limit is too low even for single-threaded mode, the required + amount of memory is now reported like in 5.4.x instead of like in + 5.5.1alpha - 5.6.1 which showed the original non-scaled usage. It + had been a FIXME in the old code but it's not clear what message + makes the most sense. - echo foo | xz > n - xz --suffix=ul n + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + (cherry picked from commit d9e1ae79ec90d6a7eafeaceaf0ece4f0c83d4417) + + src/xz/coder.c | 163 ++++++++++++++++++++------------------------------------- + 1 file changed, 57 insertions(+), 106 deletions(-) + +commit 41bdc9fa5cc2fc2a70f4331329ac724773cc2f26 +Author: Lasse Collin +Date: 2024-05-13 12:14:00 +0300 + + xz: Edit comments - Now xz checks if the destination is a special file before - continuing. DOS/DJGPP version had a check for this but - Windows (and OS/2) didn't. + (cherry picked from commit 0ee56983d198b776878432703de664049b1be32e) - src/xz/file_io.c | 35 ++++++++++++++++++++++++++++------- - 1 file changed, 28 insertions(+), 7 deletions(-) + src/xz/coder.h | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) -commit b7ce6e80786fc0c08ed129e8ee262ea96a5473a1 +commit 52e40c1912dfdbf8c7aa85e3a4c3eb138fa73d5d Author: Lasse Collin -Date: 2023-09-21 20:42:52 +0300 +Date: 2024-05-13 12:03:51 +0300 - CMake: Wrap two overlong lines that are possible to wrap. + xz: Rename chain_idx to chain_num + + (cherry picked from commit ec82a49c3553f7206104582dbfb8b64fa433b491) - CMakeLists.txt | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + src/xz/coder.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 1595f454d5c8257c668cccd6a86dd68175d5c430 +commit 8a019633319c694423691f58c55fa23a46e45ded Author: Lasse Collin -Date: 2023-09-21 20:36:31 +0300 +Date: 2024-05-12 22:29:11 +0300 - CMake: Add a comment about threads on Cygwin. + xz: Edit coding style + + (cherry picked from commit a731a6993c34bbbd55abaf9c166718682b1da24f) - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5be6275f19784cdd5a954f0188045c8ff4934d54 +commit e3ad7eda74caea29849e2e9ec01212f5f7d0f574 Author: Lasse Collin -Date: 2023-09-12 21:12:34 +0300 +Date: 2024-05-12 22:16:05 +0300 - CMake: Bump maximum policy version to 3.27. + xz: Edit comments - There are several new policies. CMP0149 may affect the Windows SDK - version that CMake will choose by default. The new behavior is more - predictable, always choosing the latest SDK version by default. + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + (cherry picked from commit 32eb176b89243fce3112347fe43a8ad14a9fd2be) + + src/xz/coder.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit 09cabae2ab47a06f6eee02419a815d4bfd0d9490 +Author: Lasse Collin +Date: 2024-05-12 21:57:49 +0300 + + xz: Fix grammar in a comment - The other new policies shouldn't affect this package. + Fixes: cb3111e3ed84152912b5138d690c8d9f00c6ef02 + (cherry picked from commit b90339f4daa510d2b1b8c550f855a99667f1d004) - CMakeLists.txt | 2 +- + src/xz/coder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit e515643d7524851d1eb7dab73453e26d8521324c +commit c10b66fbf9b2442741a1f052bdb4ce7009af9cda Author: Lasse Collin -Date: 2023-09-08 19:08:57 +0300 +Date: 2024-05-12 21:46:56 +0300 - Doxygen: Add more C macro names to PREDEFINED. + xz: Rename filter_memusages to encoder_memusages + + (cherry picked from commit 4c0bdaf13d651b22ba13bd93f8379724d6ccdc13) - doxygen/Doxyfile | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/xz/coder.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) -commit e3478ae4f36cd06522a2fef023860893f068434d +commit 9132ce3564b2c003bffd6de6294a3d98dccf314e Author: Lasse Collin -Date: 2023-09-11 18:47:26 +0300 +Date: 2024-05-12 21:42:05 +0300 - liblzma: Move a few __attribute__ uses in function declarations. + xz: Edit coding style - The API headers have many attributes but these were left - as is for now. + (cherry picked from commit b54aa023e0ec291b06e976e5f094ab0549e7b09b) - src/liblzma/common/common.c | 6 ++++-- - src/liblzma/common/common.h | 8 ++++---- - src/liblzma/common/memcmplen.h | 3 ++- - 3 files changed, 10 insertions(+), 7 deletions(-) + src/xz/coder.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit b71b8922ef3971e5ccffd1e213888d44abe21d11 +commit d642e13874e93b03959d1de523f1c8ebe9428838 Author: Lasse Collin -Date: 2023-09-11 19:03:35 +0300 +Date: 2024-05-12 21:31:02 +0300 - xz, xzdec, lzmainfo: Use tuklib_attr_noreturn. + xz: Rename filters_index to chain_num - For compatibility with C23's [[noreturn]], tuklib_attr_noreturn - must be at the beginning of declaration (before "extern" or - "static", and even before any GNU C's __attribute__). + The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68. - This commit also moves all other function attributes to - the beginning of function declarations. "extern" is kept - at the beginning of a line so the attributes are listed on - separate lines before "extern" or "static". + (cherry picked from commit 49f67d3d3f42b640a7dfc4ca04c8934f658e10ce) - src/lzmainfo/lzmainfo.c | 6 ++++-- - src/xz/coder.c | 3 ++- - src/xz/hardware.h | 3 ++- - src/xz/message.h | 30 +++++++++++++++++------------- - src/xz/options.c | 3 ++- - src/xz/util.h | 8 ++++---- - src/xzdec/xzdec.c | 9 ++++++--- - 7 files changed, 37 insertions(+), 25 deletions(-) + src/xz/args.c | 8 ++++---- + src/xz/coder.c | 8 ++++---- + src/xz/coder.h | 2 +- + 3 files changed, 9 insertions(+), 9 deletions(-) -commit 359e5c6cb128dab64ea6070d21d1c240f96cea6b +commit 47599f3b73f0a2bc18e0a8367d723f1eb0f11b63 Author: Lasse Collin -Date: 2023-09-11 18:53:31 +0300 +Date: 2024-05-12 21:22:43 +0300 - Remove incorrect uses of __attribute__((__malloc__)). - - xrealloc() is obviously incorrect, modern GCC docs even - mention realloc() as an example where this attribute - cannot be used. + xz: Replace a few uint32_t with "unsigned" to reduce the number of casts - liblzma's lzma_alloc() and lzma_alloc_zero() would be - correct uses most of the time but custom allocators - may use a memory pool or otherwise hold the pointer - so aliasing issues could happen in theory. + These hold only tiny values. - The xstrdup() case likely was correct but I removed it anyway. - Now there are no __malloc__ attributes left in the code. - The allocations aren't in hot paths so this should make - no practical difference. + (cherry picked from commit ff9e8b3d069ecfa52ec43dcdb198542d1692a492) - src/liblzma/common/common.c | 4 ++-- - src/liblzma/common/common.h | 4 ++-- - src/xz/util.h | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) + src/xz/args.c | 2 +- + src/xz/coder.c | 17 ++++++++--------- + src/xz/coder.h | 2 +- + 3 files changed, 10 insertions(+), 11 deletions(-) -commit 589b4cba22fccb1dbc919df5d134aefb2b5a6b01 +commit 8f5ab75c454ea8676ed09c7f6eda8afe87b008ad Author: Lasse Collin -Date: 2023-09-19 14:03:45 +0300 +Date: 2024-05-12 21:10:45 +0300 - Update THANKS. + xz: Rename filters_used_mask to chains_used_mask + + The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68. + + (cherry picked from commit b5e6c1113b1ba02c282bd9163eccdb521c937a78) - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) -commit 43728ed2267e921fbdfa699ee1e91b105ab0e98b +commit 3eb7cf9dd5b90a074f741234225d7de51ad88774 Author: Lasse Collin -Date: 2023-09-14 16:35:46 +0300 +Date: 2024-05-12 17:14:43 +0300 - Update THANKS. + xz: Move the setting of "check" in coder_set_compression_settings() + + It's more logical to do it in the beginning instead of in the middle + of the filter chain handling. + + Fixes: d6af7f347077b22403133239592e478931307759 + (cherry picked from commit 32500dfaadae2ea36fda2e17b49ae7d9ac1acf52) - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) -commit caf00e0988ba47842cfd93dfbb17f7d30120d6e7 +commit 067961ee0e1adaa66a43fbf8c3be31697554a839 Author: Lasse Collin -Date: 2023-09-14 16:34:07 +0300 +Date: 2024-05-12 17:09:17 +0300 - liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)). + xz: Rename "filters" to "chains" - Thanks to Agostino Sarubbo. - Fixes: https://github.com/tukaani-project/xz/issues/62 + The convention is that + + lzma_filter filters[LZMA_FILTERS_MAX + 1]; + + contains the filters of a single filter chain. + It was so here as well before the commit + d6af7f347077b22403133239592e478931307759. + It changes "filters" to a ten-element array of filter chains. + It's clearer to call this array-of-arrays "chains". + + This also renames "filter_idx" to "chain_idx" which is used + as an index as in chains[chain_idx]. + + (cherry picked from commit ad146b1f42bbb678175a503a45ce525e779f9b8b) - src/liblzma/check/crc64_fast.c | 8 ++++++++ - 1 file changed, 8 insertions(+) + src/xz/coder.c | 68 +++++++++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 34 deletions(-) -commit a70e96d2da761b8b3a77bf14e08002d871e5950b -Author: Jia Tan -Date: 2023-09-12 22:36:12 +0800 +commit 6822f6f891d43c97ea379a51223ce8ea69439161 +Author: Lasse Collin +Date: 2024-05-12 16:56:15 +0300 - CMake: Fix time.h checks not running on second CMake run. + xz: Clean up a comment - If CMake was configured more than once, HAVE_CLOCK_GETTIME and - HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check - for librt being needed to provide HAVE_CLOCK_GETTIME was also - simplified. + (cherry picked from commit 5a4ae4e4d0105404184e9a82ee08f94e1b7783e0) - CMakeLists.txt | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) + src/xz/coder.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) -commit d5275d83bd2a9701c5feb8666785007c074b1359 -Author: Jia Tan -Date: 2023-09-12 22:34:06 +0800 +commit 0e5e3e7bdcfcdc4b4607665ff0f6ad794e5195af +Author: Lasse Collin +Date: 2024-05-12 16:52:09 +0300 - CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC. + xz: Add clarifying assertions - If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always - added as a compile definition even if the check for it failed. + (cherry picked from commit 2de80494ed9a4dc7db395a32a5efb770ce769804) - CMakeLists.txt | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) + src/xz/coder.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit 1f6e7c68fbdeeaa9482fc77de090be63d90912fd +commit 77bcf6b76a26833923e62b2dec717474d5d44700 Author: Lasse Collin -Date: 2023-08-31 19:50:05 +0300 +Date: 2024-05-10 20:23:33 +0300 - xz: Refactor thousand separator detection and disable it on MSVC. + xz: Add a clarifying assertion - Now the two variations of the format strings are created with - a macro, and the whole detection code can be easily disabled - on platforms where thousand separator formatting is known to - not work (MSVC has no support, and on DJGPP 2.05 it can have - problems in some cases). + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + (cherry picked from commit 1eaad004bf7748976324672db028e34f42802e61) - src/xz/util.c | 89 ++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 45 insertions(+), 44 deletions(-) + src/xz/coder.c | 1 + + 1 file changed, 1 insertion(+) -commit ef71f83973a20cc28a3221f85681922026ea33f5 +commit df3efc058a256629ea0153b4750d3df308757038 Author: Lasse Collin -Date: 2023-08-31 18:14:43 +0300 +Date: 2024-05-12 16:47:17 +0300 - xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX. + xz: Clarify a comment - SSIZE_MAX isn't readily available on MSVC. Removing it means - that there is one thing less to worry when porting to MSVC. + (cherry picked from commit 605094329b986244833c967c04963cacc41a868d) - src/xz/file_io.c | 5 ++--- - src/xz/file_io.h | 4 ++-- - 2 files changed, 4 insertions(+), 5 deletions(-) + src/xz/coder.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit cf8ba7c3a89e37736b926dfbe85dffeff725db47 -Author: Jia Tan -Date: 2023-08-28 23:14:45 +0800 +commit 4ebfe11cd33439675f03e1e3725abf03d6f8251b +Author: Lasse Collin +Date: 2024-05-12 16:28:25 +0300 - Tests: Improve invalid unpadded size check in test_lzma_index_append(). + xz: Use the info collected in parse_block_list() - This check was extended to test the code added to fix a failing assert - in 68bda971bb8b666a009331455fcedb4e18d837a4. + This is slightly simpler and it avoids looping through + the opt_block_list array. + + (cherry picked from commit 8fac2577f2dbb9491afd8500f60d004c9071df3b) - tests/test_index.c | 26 +++++++++++++++++++++++--- - 1 file changed, 23 insertions(+), 3 deletions(-) + src/xz/coder.c | 95 ++++++++++++++++++++++++---------------------------------- + 1 file changed, 39 insertions(+), 56 deletions(-) -commit 4a4180ce74788e97e90b9aab579bfd7c6dce3f59 -Author: Jia Tan -Date: 2023-08-28 21:54:41 +0800 +commit bfea6913618357a7034a1d79079bccb688262124 +Author: Lasse Collin +Date: 2024-05-12 15:48:45 +0300 - Tests: Improve comments in test_index.c. + xz: Remember the filter chains and the largest Block in parse_block_list() + + (cherry picked from commit 81d350dab864b985b740742772f3b132d4c52914) - tests/test_index.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/xz/args.c | 18 ++++++++++++++++++ + src/xz/coder.c | 2 ++ + src/xz/coder.h | 13 +++++++++++++ + 3 files changed, 33 insertions(+) -commit 4b23b84b89e39a5117e16f66c3b01db4f08ed3e7 -Author: Jia Tan -Date: 2023-08-28 21:52:54 +0800 +commit d4e33e73922427a0f5277b91b239af538fd41c06 +Author: Lasse Collin +Date: 2024-05-12 15:38:48 +0300 - Update THANKS. + xz: Update a comment and initialization of filters_used_mask + + (cherry picked from commit 46ab56968f7dfdac187710a1223659d832fa1565) - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit 773f1e8622cb1465df528cb16a749517650acd93 -Author: Jia Tan -Date: 2023-08-28 21:50:16 +0800 +commit 3c130737c9bb4a5021bb14eb19e9ceae30ffef3a +Author: Lasse Collin +Date: 2024-05-12 15:08:10 +0300 - liblzma: Update assert in vli_ceil4(). + xz: parse_block_list: Edit integer type casting - The argument to vli_ceil4() should always guarantee the return value - is also a valid lzma_vli. Thus the highest three valid lzma_vli values - are invalid arguments. All uses of the function ensure this so the - assert is updated to match this. + (cherry picked from commit e89293a0baeb8663707c6b4a74fbb310ec698a8f) - src/liblzma/common/index.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) -commit 68bda971bb8b666a009331455fcedb4e18d837a4 -Author: Jia Tan -Date: 2023-08-28 21:31:25 +0800 +commit 40c8513b4ee42b8c0fae9b2a229e078ac7e0f87a +Author: Lasse Collin +Date: 2024-05-12 14:51:37 +0300 - liblzma: Add overflow check for Unpadded size in lzma_index_append(). + xz: Make filter_memusages a local variable - This was not a security bug since there was no path to overflow - UINT64_MAX in lzma_index_append() or when it calls index_file_size(). - The bug was discovered by a failing assert() in vli_ceil4() when called - from index_file_size() when unpadded_sum (the sum of the compressed size - of current Stream and the unpadded_size parameter) exceeds LZMA_VLI_MAX. + (cherry picked from commit 87011e40c168255cd2edea129ee68c901770603b) + + src/xz/coder.c | 35 +++++++++++++++++++++-------------- + 1 file changed, 21 insertions(+), 14 deletions(-) + +commit cacaf25aa71cd1110cc049d037c11e4075602c35 +Author: Lasse Collin +Date: 2024-05-10 20:33:08 +0300 + + xz: Remove unused code and simplify - Previously, the unpadded_size parameter was checked to be not greater - than UNPADDED_SIZE_MAX, but no check was done once compressed_base was - added. + opt_mode == MODE_COMPRESS isn't possible when HAVE_ENCODERS isn't + defined. Thus, when *encoding*, the message about *decoder* memory + usage is possible to show only when both encoder and decoder have + been built. - This could not have caused an integer overflow in index_file_size() when - called by lzma_index_append(). The calculation for file_size breaks down - into the sum of: + Since the message is shown only at V_DEBUG, skip the memusage + calculation if verbosity level isn't high enough. - - Compressed base from all previous Streams - - 2 * LZMA_STREAM_HEADER_SIZE (size of the current Streams header and - footer) - - stream_padding (can be set by lzma_index_stream_padding()) - - Compressed base from the current Stream - - Unpadded size (parameter to lzma_index_append()) + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + (cherry picked from commit 347b412a9374e0456bef9da0d7d79174c0b6f1a5) + + src/xz/coder.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +commit 3495a6b291f49079485854bb185a52c29d06cd2f +Author: Lasse Collin +Date: 2024-05-10 20:22:58 +0300 + + xz: Fix integer type from uint64_t to uint32_t - The sum of everything except for Unpadded size must be less than - LZMA_VLI_MAX. This is guarenteed by overflow checks in the functions - that can set these values including lzma_index_stream_padding(), - lzma_index_append(), and lzma_index_cat(). The maximum value for - Unpadded size is enforced by lzma_index_append() to be less than or - equal UNPADDED_SIZE_MAX. Thus, the sum cannot exceed UINT64_MAX since - LZMA_VLI_MAX is half of UINT64_MAX. + lzma_options_lzma.dict_size is uint32_t so use it here too. - Thanks to Joona Kannisto for reporting this. + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + (cherry picked from commit 31358c057c9de9d6aba96bae112b2d17942de7cb) - src/liblzma/common/index.c | 6 ++++++ - 1 file changed, 6 insertions(+) + src/xz/coder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b41bb79c602481d7ea93d65f5b3e3f08dc54233b -Author: Jia Tan -Date: 2023-08-28 22:18:29 +0800 +commit 2861d856deb557734f067c5c471d670f0b0c6684 +Author: Lasse Collin +Date: 2024-05-08 21:40:07 +0300 - Translations: Update the Esperanto translation. + debug/translation.bash: Remove an outdated test command + + Since 5.3.5beta, "xz --lzma2=mf=bt4,nice=2" works even though bt4 needs + at least nice=4. It is rounded up internally by liblzma when needed. + + Fixes: 5cd9f0df78cc4f8a7807bf6104adea13034fbb45 + (cherry picked from commit 3f71e0f3a118e1012526f94fd640a626d30cb599) - po/eo.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + debug/translation.bash | 1 - + 1 file changed, 1 deletion(-) -commit 6614e6d4bf8e2b5af6eb73930148e0ffc8d2265a -Author: Jia Tan -Date: 2023-08-09 20:55:36 +0800 +commit 54546babc3feb2786e541b80f9e7216b8f1bd543 +Author: Lasse Collin +Date: 2024-05-07 20:41:28 +0300 - Docs: Update INSTALL for --enable-threads method win95. + Fix the date of NEWS for 5.4.5 - The Autotools build allows win95 threads and --enable-small together now - if the compiler supports __attribute__((__constructor__)). + (cherry picked from commit b05a516830095a0e1937aeb31c937fb0400408b6) - INSTALL | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + NEWS | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit bfb623ad96fa6f1dbc0c560403c4296e3c8e26c9 -Author: Jia Tan -Date: 2023-08-09 20:54:15 +0800 +commit a7e58d1fdb493d58854ac599347cf64da0cecca4 +Author: Lasse Collin +Date: 2024-05-07 16:21:15 +0300 - CMake: Conditionally allow win95 threads and --enable-small. + Build: Update visibility.m4 from Gnulib + + This fixes the syntax of the "serial" line and renames + a temporary variable. + + (cherry picked from commit 6d336aeb97b69c496ddc626af403f6f21c753658) - CMakeLists.txt | 27 +++++++++++++++++++-------- - 1 file changed, 19 insertions(+), 8 deletions(-) + m4/visibility.m4 | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) -commit e919ebb29ac9f5270cd7176a39d0d3b4cea875a9 -Author: Jia Tan -Date: 2023-08-09 20:35:16 +0800 +commit 07a9cda037042b262ba6c8c18fae4a5b3333d508 +Author: Lasse Collin +Date: 2024-05-07 15:05:21 +0300 - Build: Conditionally allow win95 threads and --enable-small. + po4a/update-po: Delete the *.po.authors files - When the compiler supports __attribute__((__constructor__)) - mythread_once() is never used, even with --enable-small. A configuration - with win95 threads and --enable-small will compile and be thread safe so - it can be allowed. + These are temporary files that are needed only when running po4a. + The top-level Makefile.am puts the whole po4a directory into + distribution tarball (it's simpler) so deleting these temporary + files is needed to prevent them from getting into tarballs. - This isn't a very common configuration since MSVC does not support - __attribute__((__constructor__)), but MINGW32 and CLANG32 environments - for MSYS2 can use win95 threads and have - __attribute__((__constructor__)) support. + (cherry picked from commit ab51e8ee610e2a893906859848f93d5cb0d5ba83) - configure.ac | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) + po4a/update-po | 4 ++++ + 1 file changed, 4 insertions(+) -commit c0c0cd4a483a672b66a13761583bc4f84d86d501 -Author: Jamaika1 -Date: 2023-08-08 14:07:59 +0200 +commit 1b4e7dca243d8ef297a245b5ee3ce9cd1ca20f56 +Author: Lasse Collin +Date: 2024-05-07 13:12:17 +0300 - mythread.h: Fix typo error in Vista threads mythread_once(). + xz: Edit comments and coding style - The "once_" variable was accidentally referred to as just "once". This - prevented building with Vista threads when - HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR was not defined. + (cherry picked from commit e4780244a17420cc95d5498cd6e02ad10eac6e5f) - src/common/mythread.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/coder.c | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) -commit d93fbefcc48a8737fdf5678ce66d1c1d605752a0 -Author: Jia Tan -Date: 2023-08-03 20:10:21 +0800 +commit 18683525a78e96ec6d7c2b4e841e94ad39be7096 +Author: Lasse Collin +Date: 2024-05-06 23:08:22 +0300 - Tests: Style fixes to test_lzip_decoder.c. + xz: Omit an incorrect comment + + It likely was a leftover from a development version of the code. + + Fixes: 183819bfd9efac8c184d9bf123325719b7eee30f + (cherry picked from commit fe4d8b0c80eaeca3381be302eeb89aba871a7e7c) - tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------ - 1 file changed, 24 insertions(+), 12 deletions(-) + src/xz/coder.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) -commit 65981d8e45741fd1502e007609469e1d60312e69 -Author: Jia Tan -Date: 2023-08-03 15:56:20 +0800 +commit 005f0398645b0342c9c1915d422743c77ec1d435 +Author: Lasse Collin +Date: 2024-05-06 23:04:31 +0300 - Translations: Update the Chinese (simplified) translation. + xz: Add braces to a for-statement and to an if-statement + + No functional changes. + + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + Fixes: 479fd58d60622331fcbe48fddf756927b9f80d9a + (cherry picked from commit 9bef5b8d17dd5e009d6a6b2becc2dc535da53937) - po/zh_CN.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/coder.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit a108ed589171d683c34238a87e358b87f69e39a0 +commit 34be4e6aa62376314fde250ea4f142c18274272f Author: Lasse Collin -Date: 2023-08-02 17:15:12 +0300 +Date: 2024-05-06 23:00:09 +0300 - xz: Omit an empty paragraph on the man page. + liblzma: Omit an unneeded array from the x86 filter + + Fixes: 6aa2a6deeba04808a0fe4461396e7fb70277f3d4 + (cherry picked from commit de06b9f0c0a3f72569829ecadbc9c0a3ef099f57) - src/xz/xz.1 | 1 - - 1 file changed, 1 deletion(-) + src/liblzma/simple/x86.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) -commit 03c51c5c08fe3579d8bbc8eea8251a1128001330 -Author: Jia Tan -Date: 2023-08-02 20:32:20 +0800 +commit 79e329b771210c30ea317dd4d99e8968f3e6f9b2 +Author: Lasse Collin +Date: 2024-05-06 22:56:31 +0300 - Bump version and soname for 5.4.4. + CMake: Add test_suffix.sh to the tests + + (cherry picked from commit 7da488cb933fdf51cfc14cb5810beb0766224380) - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + tests/tests.cmake | 13 +++++++++++++ + 1 file changed, 13 insertions(+) -commit d7fa3f1b58a77f79b1a4e12452418b5555632e18 -Author: Jia Tan -Date: 2023-08-02 20:30:07 +0800 +commit 86f33bb90c6cfe6950f1d36c9e5dd7fdc9798124 +Author: Lasse Collin +Date: 2024-05-06 22:55:54 +0300 - Add NEWS for 5.4.4. + Test: Add CMake support to test_suffix.sh + + It needs to find the xz executable from a different directory + and work without config.h. + + (cherry picked from commit a805594ed0b4cbf7b81aa28ff46a8ab3c83c6876) - NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) + tests/test_suffix.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) -commit 6a1093c0004c42eeaef312456c295671496dd67a +commit 1e243ab378e8f78ebb3af741fb38354954cf20f9 Author: Lasse Collin -Date: 2023-08-02 15:19:43 +0300 +Date: 2024-05-06 20:45:34 +0300 - build-aux/manconv.sh: Fix US-ASCII and UTF-8 output. + Update INSTALL about MINIX 3 - groff defaults to SGR escapes. Using -P-c passes -c to grotty - which restores the old behavior. Perhaps there is a better way to - get pure plain text output but this works for now. + The latest stable is 3.3.0 and it's from 2014. + Don't mention the older versions in INSTALL. + 3.3.0 ships with Clang already. + + Testing with 3.4.0beta6 shows that tuklib_physmem + works too so omit comments about that from INSTALL. + Visibility warnigns weren't a problem either. + + Thus it's enough to mention the need for --disable-threads + as configure doesn't autodetect the lack of pthreads. + + (cherry picked from commit 50e19489387774bab3c4a988397d0d9c7a142a46) - build-aux/manconv.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + INSTALL | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) -commit f6f9f5651a7e2d89f588981533155ab850e063f7 +commit 8595b5ab3ba766eb6daed890bfe91a16fe329c2c Author: Lasse Collin -Date: 2023-08-01 19:10:43 +0300 +Date: 2024-05-02 23:00:16 +0300 - Update THANKS. + Windows: Remove the "doc/api" line from README-Windows.txt + + Fixes: 252aa1d67bc015eeba462803ab72edeb7744d864 + (cherry picked from commit 68d18aea1422a2b86b98b71d0b019233d84e01b0) - THANKS | 1 + - 1 file changed, 1 insertion(+) + windows/README-Windows.txt | 2 -- + 1 file changed, 2 deletions(-) -commit 0dd83ba8767dad722e0f0f94e0e4146e290a28cb +commit a3f163a4ad97189744107e964e4dea505fbcc252 Author: Lasse Collin -Date: 2023-08-01 18:22:24 +0300 +Date: 2024-05-02 22:59:04 +0300 - Update THANKS. + Build: Don't copy doc/api from source tree to distribution tarball + + It was copied if it existed. This was intentional when autogen.sh + still built liblzma API docs with Doxygen. + + Fixes: d3a77ebc04bf1db8d52de2d9b0f07877bc4fd139 + (cherry picked from commit 8ede961374613aa302a13571d662cfaea1cf91f7) - THANKS | 1 + - 1 file changed, 1 insertion(+) + Makefile.am | 5 ----- + 1 file changed, 5 deletions(-) -commit 4170a80785cc69edfc5fdfe498bed5f40db6a7ef -Author: ChanTsune <41658782+ChanTsune@users.noreply.github.com> -Date: 2023-08-01 18:17:17 +0300 +commit cb0e847fe07099c1ef6d8076f6a46e17bc431acb +Author: Sam James +Date: 2024-05-02 13:26:40 +0100 - mythread.h: Disable signal functions in builds targeting Wasm + WASI. - - signal.h in WASI SDK doesn't currently provide sigprocmask() - or sigset_t. liblzma doesn't need them so this change makes - liblzma and xzdec build against WASI SDK. xz doesn't build yet - and the tests don't either as tuktest needs setjmp() which - isn't (yet?) implemented in WASI SDK. + ci: add SPDX headers - Closes: https://github.com/tukaani-project/xz/pull/57 - See also: https://github.com/tukaani-project/xz/pull/56 + I've checked over each of these and they're straightforward applications + of the relevant Github Actions. - (The original commit was edited a little by Lasse Collin.) + (cherry picked from commit 9a6761aa35ed84d30bd2fda2333a4fdf3f46ecdc) - src/common/mythread.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/workflows/freebsd.yml | 2 ++ + .github/workflows/netbsd.yml | 2 ++ + .github/workflows/openbsd.yml | 2 ++ + 3 files changed, 6 insertions(+) -commit 0db6fbe0be1545a4f25fcd6993371155b37bbb26 -Author: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> -Date: 2023-07-31 14:02:21 +0200 +commit c3c854dc759fe0c5549aa0a730be9e259243edb6 +Author: Yaroslav Halchenko +Date: 2024-03-29 14:37:24 -0400 - Docs: Fix typos found by codespell + codespell: Ignore the THANKS file and debbugs.gnu.org URL + + This way "codespell -i 0" is silent. + + This is the first commit from + https://github.com/tukaani-project/xz/pull/93 + with trivial edits by Lasse Collin. + + (cherry picked from commit 81efe6119f86e3274e512c9eca5ec22b2196c2b3) - CMakeLists.txt | 4 ++-- - NEWS | 2 +- - configure.ac | 2 +- - src/liblzma/api/lzma/container.h | 4 ++-- - src/liblzma/api/lzma/filter.h | 2 +- - src/liblzma/api/lzma/lzma12.h | 4 ++-- - src/liblzma/common/block_buffer_encoder.c | 2 +- - src/liblzma/common/common.h | 2 +- - src/liblzma/common/file_info.c | 2 +- - src/liblzma/common/lzip_decoder.c | 2 +- - src/liblzma/common/stream_decoder_mt.c | 8 ++++---- - src/liblzma/common/string_conversion.c | 6 +++--- - src/liblzma/lz/lz_encoder.h | 2 +- - src/liblzma/lzma/lzma_encoder.c | 4 ++-- - src/xz/hardware.c | 4 ++-- - tests/test_filter_flags.c | 4 ++-- - tests/test_index.c | 2 +- - tests/test_vli.c | 2 +- - 18 files changed, 29 insertions(+), 29 deletions(-) + .codespellrc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -commit 84a3a1f4e4f146b3b5fa73fe708cacb0d9f829f3 -Author: Jia Tan -Date: 2023-07-26 20:26:23 +0800 +commit 3216301aa20fcf9d5a7485e35a295d5c451d9658 +Author: Lasse Collin +Date: 2024-04-30 14:37:11 +0300 - Update .gitignore. + Add .gitattributes to clean up git-archive output + + (cherry picked from commit 905bfc74fe2670fd9c39014803017ab53d325401) - .gitignore | 4 ++++ - 1 file changed, 4 insertions(+) + .gitattributes | 7 +++++++ + 1 file changed, 7 insertions(+) -commit 962b3d41e0c27355ba3052ef7b7d9a887de807e5 -Author: Jia Tan -Date: 2023-07-28 22:03:08 +0800 +commit f99e7c69ada9e0db0ee1ebbc38c8ce9390cd9788 +Author: Lasse Collin +Date: 2024-04-19 12:11:09 +0300 - CMake: Conditionally allow the creation of broken symlinks. + xzdec: Support Landlock ABI version 4 - The CMake build will try to create broken symlinks on Unix and Unix-like - platforms. Cygwin and MSYS2 are Unix-like, but may not be able to create - broken symlinks. The value of the CYGWIN or MSYS environment variables - determine if broken symlinks are valid. + This was added to xz in 02e3505991233901575b7eabc06b2c6c62a96899 + but I forgot to do the same in xzdec. - The default for MSYS2 does not allow for broken symlinks, so the CMake - build has been broken for MSYS2 since commit - 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. + The Landlock sandbox in xzdec could be stricter as now it's + active only for the last file being decompressed. In xz, + read-only sandbox is used for multi-file case. On the other hand, + xz doesn't go to the strictest mode when processing the last file + when more than one file was specified; xzdec does. + + (cherry picked from commit 3334c71d3d4294a4f6569df3ba9bcf2443dfa501) - CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 75 insertions(+), 7 deletions(-) + src/xzdec/xzdec.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) -commit 19899340cf74d98304f9f5b726c72e85c7017d72 -Author: Jia Tan -Date: 2023-07-24 21:43:44 +0800 +commit bfe9be7a46cfd3b3069c15f7ba1432192bca1f5b +Author: Lasse Collin +Date: 2024-04-30 22:22:45 +0300 - liblzma: Prevent an empty translation unit in Windows builds. + liblzma: Fix incorrect function type error from sanitizer - To workaround Automake lacking Windows resource compiler support, an - empty source file is compiled to overwrite the resource files for static - library builds. Translation units without an external declaration are - not allowed by the C standard and result in a warning when used with - -Wempty-translation-unit (Clang) or -pedantic (GCC). + Clang 17 with -fsanitize=address,undefined: + + src/liblzma/common/filter_common.c:366:8: runtime error: + call to function encoder_find through pointer to incorrect + function type 'const lzma_filter_coder *(*)(unsigned long)' + src/liblzma/common/filter_encoder.c:187: note: + encoder_find defined here + + Use a wrapper function to get the correct type neatly. + This reduces the number of casts needed too. + + This issue could be a problem with control flow integrity (CFI) + methods that check the function type on indirect function calls. + + Fixes: 3b34851de1eaf358cf9268922fa0eeed8278d680 + (cherry picked from commit 278563ef8f2b8d98d7f2c85e1a64ec1bc21d26d8) - src/liblzma/Makefile.am | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/liblzma/common/filter_decoder.c | 15 ++++++++++++--- + src/liblzma/common/filter_encoder.c | 17 +++++++++++++---- + 2 files changed, 25 insertions(+), 7 deletions(-) -commit ef7fbe83937abd7f55f1637c1d08b559f1d3d6cc -Author: Jia Tan -Date: 2023-07-21 18:05:44 +0800 +commit 882eadc5b820b6b1495fc91ba3573ac2aa6c1df3 +Author: Lasse Collin +Date: 2024-04-30 21:41:11 +0300 - Tests: Skip .lz files in test_files.sh if not configured. + xz: Avoid arithmetic on a null pointer - Previously if the lzip decoder was not configured then test_files.sh - would pass the lzip tests instead of skipping them. + It's undefined behavior. The result wasn't ever used as it occurred + in the last iteration of a loop. + + Clang 17 with -fsanitize=address,undefined: + + $ src/xz/xz --block-list=123 + src/xz/args.c:164:12: runtime error: applying non-zero offset 1 + to null pointer + + Fixes: 88ccf47205d7f3aa314d358c72ef214f10f68b43 + Co-authored-by: Sam James + (cherry picked from commit 77c8f60547decefca8f2d0c905d9c708c38ee8ff) - tests/test_files.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) -commit e49815ba7aa610b72e8724025eceee23c27e7b23 -Author: Jia Tan -Date: 2023-07-20 22:11:13 +0800 +commit ec5458e1c9b2beb416781e81ad4ff22b0149b99d +Author: Lasse Collin +Date: 2024-04-27 20:42:00 +0300 - Tests: Add ARM64 filter test to test_compress.sh. + CMake: Support building liblzma API docs using Doxygen + + This is disabled by default to match the default in Autotools. + Use -DUSE_DOXYGEN=ON to enable Doxygen usage. + + This uses the update-doxygen script, thus this is under if(UNIX) + although Doxygen itself can run on Windows too. + + (cherry picked from commit 64503cc2b76a388ced4ec5f68234a07f0dcddcd5) - tests/test_compress.sh | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 40 +++++++++++++++++++++++++++++++--------- + 1 file changed, 31 insertions(+), 9 deletions(-) -commit db5b57b827c2b084586c51da1b8a3ab0984bdb40 -Author: Jia Tan -Date: 2023-07-22 18:37:56 +0800 +commit 8c93ced56bcb23df723dab23b7477d580720f522 +Author: Lasse Collin +Date: 2024-04-20 23:36:39 +0300 - Translations: Update the Vietnamese translation. + CMake: List API headers in LIBLZMA_API_HEADERS variable + + This way the same list will be usable in more than one location. + + (cherry picked from commit 0a7f5a80d8532a1d8cfa0a902c9d1ad7651eca37) - po/vi.po | 45 ++++++++++++++++++++++++++++----------------- - 1 file changed, 28 insertions(+), 17 deletions(-) + CMakeLists.txt | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) -commit e6ba5014081c98cb068253b3e5f9e372dd157f3c -Author: Jia Tan -Date: 2023-07-20 20:30:05 +0800 +commit f7c9bab0372db357511e42c9c610a2cfe5fca9b1 +Author: Lasse Collin +Date: 2024-04-19 15:16:42 +0300 - Translations: Update the Croatian translation. + PACKAGERS: Document the optional Doxygen usage + + Also add a note that packagers should check the licensing + of the Doxygen output. + + (cherry picked from commit 541406bee3f09e9813103c6406b10fc6ab2e0d30) - po/hr.po | 49 ++++++++++++++++++++++++++++++------------------- - 1 file changed, 30 insertions(+), 19 deletions(-) + PACKAGERS | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) -commit 82657a1f10a25050a3e9c246c41deb785cccba3a -Author: Jia Tan -Date: 2023-07-20 20:28:32 +0800 +commit 28e7d130cb843e96d7e6b0358f8dd58bd1b2a275 +Author: Lasse Collin +Date: 2024-04-27 17:47:09 +0300 - Translations: Update the Korean man page translations. + Build: Add --enable-doxygen to generate and install API docs + + It requires Doxygen. This option is disabled by default. + + (cherry picked from commit e21efdf96f39378fe417479f89e97046680406f5) - po4a/ko.po | 1255 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 629 insertions(+), 626 deletions(-) + INSTALL | 6 ++++++ + configure.ac | 10 +++++++++- + src/liblzma/api/Makefile.am | 19 +++++++++++++++++++ + 3 files changed, 34 insertions(+), 1 deletion(-) -commit fab35907d13efbe7c457e00a310123335d7bae3e -Author: Jia Tan -Date: 2023-07-20 20:25:24 +0800 +commit cca7e6c05bc6cc51c0271c36856b7fe29f65c648 +Author: Lasse Collin +Date: 2024-04-19 15:15:17 +0300 - Translations: Update the Korean translation. + Doxygen: update-doxygen: Support out-of-tree builds + + Also, now $0 is used to refer to the script itself. + + (cherry picked from commit 0ece09a575d7e542bda8825808ddd6cf7de8cc4b) - po/ko.po | 45 ++++++++++++++++++++++++++++----------------- - 1 file changed, 28 insertions(+), 17 deletions(-) + doxygen/update-doxygen | 110 ++++++++++++++++++++++++++++++------------------- + 1 file changed, 68 insertions(+), 42 deletions(-) -commit f530fe1964c34797fa3b775ec5804d68007c1579 -Author: Jia Tan -Date: 2023-07-20 20:24:05 +0800 +commit 8090d3dc7f0eea4a3a61f4f6d46a0d0866e345fe +Author: Lasse Collin +Date: 2024-04-28 21:08:00 +0300 - Translations: Update the Polish translation. + Doxygen: Simplify Doxyfile and add SPDX license identifier + + This omits all comments and a few non-default options that weren't + needed. Now it contains no copyrighted content from Doxygen itself. + + (cherry picked from commit 2c519f641f266fd897edf680827d9c905f411440) - po/pl.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + doxygen/Doxyfile | 2698 +----------------------------------------------------- + 1 file changed, 25 insertions(+), 2673 deletions(-) -commit 10b3500cc2617aabdbc802a63164ce0a3683ad2b -Author: Jia Tan -Date: 2023-07-20 20:22:23 +0800 +commit 0721b8bfe558502669f06c97601fe59ad0d52541 +Author: Lasse Collin +Date: 2024-04-19 15:14:02 +0300 - Translations: Update the German man page translations. + Doxygen: Don't strip JavaScript anymore + + The stripping method worked well with Doxygen 1.8 and 1.9 but + it doesn't work with Doxygen 1.10 anymore. Since we won't ship + pre-generated liblzma API docs anymore, the extra bloat and + extra license info of the JavaScript files won't affect the + upstream source package anymore. + + (cherry picked from commit bdba39a57530d11b88440df8024002be3d09e4a1) - po4a/de.po | 1255 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 629 insertions(+), 626 deletions(-) + doxygen/update-doxygen | 21 --------------------- + 1 file changed, 21 deletions(-) -commit 3d14e8a34dba176f975326924ae28a3ab5fee165 -Author: Jia Tan -Date: 2023-07-20 20:18:44 +0800 +commit 1ddb40f6fd286c3c6ef510735112db1ac1b60936 +Author: Lasse Collin +Date: 2024-04-19 17:26:41 +0300 - Translations: Update the German translation. + Build: Remove old Doxygen rules from top-level Makefile.am + + (cherry picked from commit d3a77ebc04bf1db8d52de2d9b0f07877bc4fd139) - po/de.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + Makefile.am | 12 ------------ + 1 file changed, 12 deletions(-) -commit bdcc180a2da15039c47455c1cafd1ce9aff442e4 -Author: Jia Tan -Date: 2023-07-20 20:17:10 +0800 +commit 092af76234b1bc79380427456b3215aa0b80f339 +Author: Lasse Collin +Date: 2024-04-19 15:10:06 +0300 - Translations: Update the Chinese (simplified) translation. + Update COPYING to match the autogen.sh and mydist changes + + (cherry picked from commit fd7faa4c338a42a6a40e854b837d285ae2e8c609) - po/zh_CN.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + COPYING | 11 ----------- + 1 file changed, 11 deletions(-) -commit 844240350d33cb46ba8827b74dc8758e2abed9e5 -Author: Jia Tan -Date: 2023-07-20 20:15:47 +0800 +commit 77bce9a0a250cfb20333ee0dca036b3193dd4941 +Author: Lasse Collin +Date: 2024-04-19 17:23:43 +0300 - Translations: Update the Swedish translation. + Build: Don't run update-doxygen as part of "make mydist" + + (cherry picked from commit b2bc55d8a0a9f2f59bfd4302067300e650f6baa3) - po/sv.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + Makefile.am | 1 - + 1 file changed, 1 deletion(-) -commit bdc7952bcfbc20c134f723ff5cbf84ab690fb4fc -Author: Jia Tan -Date: 2023-07-20 20:14:00 +0800 +commit 3a2fc62f59b2e8cc45f8d8fd9988b4305efe4bff +Author: Lasse Collin +Date: 2024-04-19 15:09:48 +0300 - Translations: Update the Ukrainian man page translations. + autogen.sh: Don't generated Doxygen docs anymore + + (cherry picked from commit e9be74f5b129fe8a5388d588e68b1b7f5168a310) - po4a/uk.po | 1253 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 628 insertions(+), 625 deletions(-) + autogen.sh | 18 +++--------------- + 1 file changed, 3 insertions(+), 15 deletions(-) -commit 143396e070c8d8afb56e3a5f688b214222cf71e0 -Author: Jia Tan -Date: 2023-07-20 20:09:15 +0800 +commit b04c16f9a5a8675a87783305568cadfa3f17d999 +Author: Lasse Collin +Date: 2024-04-19 17:41:36 +0300 - Translations: Update the Ukrainian translation. + windows/build.bash: Omit Doxygen docs from the package + + They will be omitted from the source tarball and I don't want + to make Doxygen a dependency of build.bash. + + (cherry picked from commit 252aa1d67bc015eeba462803ab72edeb7744d864) - po/uk.po | 45 ++++++++++++++++++++++++++++----------------- - 1 file changed, 28 insertions(+), 17 deletions(-) + windows/build.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 1b8146d64eaac51b40079f5788b85c1eb79e35de -Author: Jia Tan -Date: 2023-07-20 20:06:57 +0800 +commit d4dd3c8f6169adf50cad8fe6872e0f5fcb82475c +Author: Lasse Collin +Date: 2024-04-19 14:14:47 +0300 - Translations: Update the Spanish translation. + README: Don't mention PDF man pages anymore + + (cherry picked from commit 634095364d87444d62d8ec54c134c0cd4705f5d7) - po/es.po | 47 +++++++++++++++++++++++++++++------------------ - 1 file changed, 29 insertions(+), 18 deletions(-) + README | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit f947ce09d79ef8fa6549d350c4d72e4a8a9fa697 -Author: Jia Tan -Date: 2023-07-20 20:05:19 +0800 +commit be90720d6cd7fbb1b170794445815f579b444a6f +Author: Lasse Collin +Date: 2024-04-19 14:10:39 +0300 - Translations: Update the Romanian translation. + Build: Omit PDF man pages from the package + + pdf-local rule was added to create the PDFs still with "make pdf". + The install rules are missing but that likely doesn't matter at all. + + (cherry picked from commit dc684bf76ea23574ee9d88382057381e04e6089a) - po/ro.po | 48 ++++++++++++++++++++++++++++++------------------ - 1 file changed, 30 insertions(+), 18 deletions(-) + Makefile.am | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) -commit f681301a368def3f597a7c7bea7cb3f7a2f933e7 -Author: Jia Tan -Date: 2023-07-20 20:02:56 +0800 +commit f724552d0c1ae2e3aa693d80d8d0da962dfac4e8 +Author: Lasse Collin +Date: 2024-04-19 13:54:39 +0300 - Translations: Update the Romanian man page translations. + windows/build.bash: Don't copy PDF man pages to the package + + (cherry picked from commit e3531ab4125cbd5c01ebd3200791350960547189) - po4a/ro.po | 1254 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 629 insertions(+), 625 deletions(-) + windows/README-Windows.txt | 2 +- + windows/build.bash | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit 8bc3146c6be920b56283f4ee846456cb34ae4b6f -Author: Jia Tan -Date: 2023-07-13 21:26:47 +0800 +commit 00e774819c6550a8eac219e9f6f083ab2b155505 +Author: Lasse Collin +Date: 2024-04-28 01:34:50 +0300 - xz: Update man page Authors and date. + Tests: test_index: Fix failures when features are disabled + + Fixes: cd88423e76d54eb72aea037364f3ebb21f122503 + (cherry picked from commit 710a4573ef2cbd19c66318c3b2d1388e418e26c7) - src/xz/xz.1 | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + tests/test_index.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) -commit c2905540ef905412b54c76488758712d3e2a0f9d -Author: Jia Tan -Date: 2023-07-18 23:19:09 +0800 +commit 51133ad71eecc19bdb3ab287a0732fd9441753f4 +Author: Lasse Collin +Date: 2024-04-20 17:09:11 +0300 - xz: Slight reword in xz man page for consistency. + CMake: Keep the build working if the "tests" directory is missing - Changed will print => prints in xz --robot --version description to - match --robot --info-memory description. + This moves the tests section as is from CMakeLists.txt into + tests/tests.cmake. CMakeLists.txt now includes tests/tests.cmake + if the latter file exists. + + Now it's possible to delete the whole "tests" directory and + building with CMake will still work normally, just without + the tests. This way the tests are readily available for those + who want them, and those who won't run the tests anyway have + a straightforward way to ensure that nothing from the "tests" + directory can affect the build process. + + (cherry picked from commit aaff75c3486c4489ce88b0efb36b41cf138af7c3) - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 76 ++--------------------------------------------- + tests/Makefile.am | 1 + + tests/tests.cmake | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 92 insertions(+), 73 deletions(-) -commit 2600d3352449faf57d9cb3fa00cbe40548a1310f -Author: Jia Tan -Date: 2023-07-18 22:49:57 +0800 +commit 85b5595b67f0081b2a900104ed7589de4bb75e12 +Author: Lasse Collin +Date: 2024-04-20 13:12:50 +0300 - liblzma: Improve comment in string_conversion.c. + Tests: Remove x86 and SPARC BCJ tests - The comment used "flag" when referring to decoder options. Just - referring to them as options is more clear and consistent. + These are very old but the exact test file isn't easy to reproduce + as it was compiled from a short C program (bcj_test.c) long ago. + These tests weren't very good anyway, just a little better than nothing. + + (cherry picked from commit a5f2aa5618fe9183706c9c514c3067985f6c338b) - src/liblzma/common/string_conversion.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + tests/Makefile.am | 7 ---- + tests/bcj_test.c | 64 --------------------------------- + tests/compress_prepared_bcj_sparc | Bin 1240 -> 0 bytes + tests/compress_prepared_bcj_x86 | Bin 1388 -> 0 bytes + tests/files/README | 8 ----- + tests/files/good-1-sparc-lzma2.xz | Bin 612 -> 0 bytes + tests/files/good-1-x86-lzma2.xz | Bin 716 -> 0 bytes + tests/test_compress_prepared_bcj_sparc | 4 --- + tests/test_compress_prepared_bcj_x86 | 4 --- + 9 files changed, 87 deletions(-) -commit 98fc14541eec3e1dcf694075c8533f19a3cee552 -Author: Jia Tan -Date: 2023-05-13 21:21:54 +0800 +commit d8228d1ea08155a17acaadd76ed95805d3b0a929 +Author: Lasse Collin +Date: 2024-04-27 18:30:40 +0300 - liblzma: Reword lzma_str_list_filters() documentation. + Tests: test_index: Edit a misleading test - Reword "options required" to "options read". The previous wording - may have suggested that the options listed were all required when - the filters are used for encoding or decoding. Now it should be - more clear that the options listed are the ones relevant for - encoding or decoding. + (cherry picked from commit d879686469c9c4bf2a7c0bb6420ebe4530fc8f07) - src/liblzma/api/lzma/filter.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_index.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -commit 1ac79b4cbaecf3f4930a5d8ce6f7e1f2b63c2a01 +commit 2358ef8238f166c49e66f438e7494d4d352eb113 Author: Lasse Collin -Date: 2023-07-18 17:37:33 +0300 +Date: 2024-04-27 16:46:01 +0300 - xz: Translate the second "%s: " in message.c since French needs "%s : ". + Tests: test_index: Use minimal values to test integer overflow - This string is used to print a filename when using "xz -v" and - stderr isn't a terminal. + (cherry picked from commit 612005bbdb0dea9dc09e9e2e9cc16a15c1480acd) - src/xz/message.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_index.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 97851be2c6c64494f23c3a735601c13d4387820b +commit 54f4a4162aae8796580489013583d6148be5a473 Author: Lasse Collin -Date: 2023-07-18 14:35:33 +0300 +Date: 2024-04-27 15:13:39 +0300 - xz: Make "%s: %s" translatable because French needs "%s : %s". + Tests: test_index: Test lzma_index_buffer_decode() more + + (cherry picked from commit 4ad88b2544c2aaf8de8f38af54587098cbe66c1d) - src/xz/args.c | 5 ++++- - src/xz/coder.c | 8 ++++---- - src/xz/file_io.c | 8 ++++---- - src/xz/list.c | 11 ++++++----- - 4 files changed, 18 insertions(+), 14 deletions(-) + tests/test_index.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) -commit b406828a6dfd3caa4f77efe3ff3e3eea263eee62 +commit 85ab59a6b70db33f320a3ea7a854249cb693dea2 Author: Lasse Collin -Date: 2023-07-18 13:57:54 +0300 +Date: 2024-04-27 15:08:29 +0300 - liblzma: Tweak #if condition in memcmplen.h. + Tests: test_index: Test that *i = NULL is done on LZMA_PROG_ERROR - Maybe ICC always #defines _MSC_VER on Windows but now - it's very clear which code will get used. + On LZMA_DATA_ERROR from lzma_index_buffer_decode(), *i = NULL was + already done but this adds a test for that case too. + + (cherry picked from commit 575b11b0d291e66c5fce31ce7a72f11436d57c83) - src/liblzma/common/memcmplen.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + tests/test_index.c | 31 +++++++++++++++++++++++++++---- + 1 file changed, 27 insertions(+), 4 deletions(-) -commit ef4a07ad9434f81417395f6fe0bb331e027a703b +commit fb42599e44dde417305c7d92fd782147ca923079 Author: Lasse Collin -Date: 2023-07-18 13:49:43 +0300 +Date: 2024-04-27 15:01:25 +0300 - liblzma: Omit unnecessary parenthesis in a preprocessor directive. + Tests: test_index: Test lzma_index_buffer_encode() with empty output buf + + (cherry picked from commit 2c970debdb285823f01f75e875561d893345ac2b) - src/liblzma/common/memcmplen.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + tests/test_index.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 64ee0caaea06654b28afaee850fb187a11bf9cb2 -Author: Jia Tan -Date: 2023-06-28 20:22:38 +0800 +commit 20cac20f63a96a39391f2d613bef0f7bd6553495 +Author: Lasse Collin +Date: 2024-04-27 14:59:55 +0300 - liblzma: Prevent warning for MSYS2 Windows build. + Tests: test_index: Replace if-statements with tuktest assertions - In lzma_memcmplen(), the header file is only included if - _MSC_VER and _M_X64 are both defined but _BitScanForward64() was - previously used if _M_X64 was defined. GCC for MSYS2 defines _M_X64 but - not _MSC_VER so _BitScanForward64() was used without including - . - - Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as - expected. + (cherry picked from commit cd88423e76d54eb72aea037364f3ebb21f122503) - src/liblzma/common/memcmplen.h | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + tests/test_index.c | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) -commit ba177057643dae6e9c167ee26471181c199c8a00 -Author: Jia Tan -Date: 2023-07-14 23:20:33 +0800 +commit 91e3ea8735752db5d0373991e84607196070aeaa +Author: Lasse Collin +Date: 2024-04-27 14:56:16 +0300 - Docs: Add a new section to INSTALL for Tests. + Tests: test_index: Make it clear that my_alloc() has no integer overflows - The new Tests section describes basic information about the tests, how - to run them, and important details when cross compiling. We have had a - few questions about how to compile the tests without running them, so - hopefully this information will help others with the same question in the - future. + liblzma guarantees that the product of the allocation size arguments + will fit in size_t. - Fixes: https://github.com/tukaani-project/xz/issues/54 + Putting the pre-increment in the if-statement was clearly wrong + although in practice it didn't matter here as the function is + called only a couple of times. + + (cherry picked from commit 7f865577a6224fbbb5f5ca52574b62ea8ac9bf51) - INSTALL | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 64 insertions(+), 17 deletions(-) + tests/test_index.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -commit 0745b900fafa5ac2c31e8ec3cfba3053457c8b1f -Author: Jia Tan -Date: 2023-07-14 21:10:27 +0800 +commit df1659a6c8367db69e82e2ea59ad5f959cf4e615 +Author: Lasse Collin +Date: 2024-04-27 14:51:52 +0300 - Docs: Update README. + Tests: test_index: Verify also iter.block.number_in_stream - This adds an entry to "Other implementations of the .xz format" for - XZ for Java. + (cherry picked from commit 12313a3b6596cdcf012e180597f84d231f8730d3) - README | 4 ++++ - 1 file changed, 4 insertions(+) + tests/test_index.c | 2 ++ + 1 file changed, 2 insertions(+) -commit c972d44103c4edf88e73917ef08bde69db9d06cb -Author: Jia Tan -Date: 2023-07-18 13:27:46 +0300 +commit e083e95dbfda73900109cca4c82c8713d0a1da21 +Author: Lasse Collin +Date: 2024-04-27 14:51:06 +0300 - xz: Fix typo in man page. + Tests: test_index: Check cases that aren't a multiple of 4 bytes - The Memory limit information section described three output - columns when it actually has six. This was reworded to - "multiple" to make it more future proof. + (cherry picked from commit ad2654010d9d641ce1601beeff00630027e6bcd4) - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_index.c | 33 +++++++++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 8 deletions(-) -commit 6e21f1b4e2c580b64d258e3b81ac9e44d53b9283 -Author: Jia Tan -Date: 2023-07-14 21:30:25 +0800 +commit b0d3b86ecf1881d10e6614b64b0fcc6c16a3b08f +Author: Lasse Collin +Date: 2024-04-27 14:40:25 +0300 - Tests: Improve feature testing for skipping. - - Fixed a bug where test_compress_* would all fail if arm64 or armthumb - filters were enabled for compression but arm was disabled. Since the - grep tests only checked for "define HAVE_ENCODER_ARM", this would match - on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB. + Tests: test_index: Edit comments and white space - Now the config.h feature test requires " 1" at the end to prevent the - prefix problem. have_feature() was also updated for this even though - there were known current bugs affecting it. This is just in case future - features have a similar prefix problem. + (cherry picked from commit 2524fcf2b68b662035437cee8edbe80067c0c240) - tests/test_compress.sh | 4 ++-- - tests/test_files.sh | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + tests/test_index.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) -commit 26c37d290c0884a4518a26b949575420a77fb938 -Author: Jia Tan -Date: 2023-07-10 20:56:28 +0800 +commit bae288ea6ffb976c36e2387c03d75ce84a8a1034 +Author: Lasse Collin +Date: 2024-04-27 14:33:38 +0300 - Translations: Update the Chinese (traditional) translation. + liblzma: index_decoder: Fix missing initializations on LZMA_PROG_ERROR + + If the arguments to lzma_index_decoder() or lzma_index_buffer_decode() + were such that LZMA_PROG_ERROR was returned, the lzma_index **i + argument wasn't touched even though the API docs say that *i = NULL + is done if an error occurs. This obviously won't be done even now + if i == NULL but otherwise it is best to do it due to the wording + in the API docs. + + In practice this matters very little: The problem can occur only + if the functions are called with invalid arguments, that is, + the calling application must already have a bug. + + (cherry picked from commit 71eed2520e2eecae89bade9dceea16e56cfa2ea0) - po/zh_TW.po | 659 ++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 377 insertions(+), 282 deletions(-) + src/liblzma/common/index_decoder.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 2ec65181e28335692a3a4fac4fefc4303111d355 -Author: Jia Tan -Date: 2023-07-08 20:03:59 +0800 +commit f10cb93f335900a29e50f990b751996ef026b3a3 +Author: Lasse Collin +Date: 2024-04-26 18:25:18 +0300 - Translations: Update the Vietnamese translation. + CMake: Bump maximum policy version to 3.29 + + (cherry picked from commit 0478473953f50716a2bc37b619b1c7dc2682b1ad) - po/vi.po | 620 +++++++++++++++++++++++++++++++++++---------------------------- - 1 file changed, 349 insertions(+), 271 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit c44c7e7590db1b89c97e106f5c516bf69189e233 -Author: Jia Tan -Date: 2023-06-28 20:46:31 +0800 +commit 59055d70cdd3df091264ae9da793821bfd65314d +Author: Sam James +Date: 2024-04-13 22:30:44 +0100 - Tests: Fix memory leaks in test_index. + ci: add NetBSD - Several tests were missing calls to lzma_index_end() to clean up the - lzma_index structs. The memory leaks were discovered by using - -fsanitize=address with GCC. + (cherry picked from commit a607e2b40d23f7d998dbaba76692aa30b4c3d9d3) - tests/test_index.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) + .github/workflows/netbsd.yml | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) -commit b9499c94fccc03eba5311b5305f04149a7c5af65 -Author: Jia Tan -Date: 2023-06-28 20:43:29 +0800 +commit 812c1f95f37751aaa1e020fc2360949a674842fd +Author: Sam James +Date: 2024-04-13 23:49:26 +0100 - Tests: Fix memory leaks in test_block_header. + ci: add FreeBSD - test_block_header was not properly freeing the filter options between - calls to lzma_block_header_decode(). The memory leaks were discovered by - using -fsanitize=address with GCC. + (cherry picked from commit 72c210336de26fb87a928160d025fa10a638d23b) - tests/test_block_header.c | 38 ++++++++++++++++++++++---------------- - 1 file changed, 22 insertions(+), 16 deletions(-) + .github/workflows/freebsd.yml | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) -commit 1155471651ad456c5f90aee6435931fae65682bf -Author: Jia Tan -Date: 2023-06-28 20:31:11 +0800 +commit d2a4f963c28b864aa179464f7827cc10c6e1365d +Author: Sam James +Date: 2024-04-13 23:16:08 +0100 - liblzma: Prevent uninitialzed warning in mt stream encoder. + ci: add OpenBSD - This change only impacts the compiler warning since it was impossible - for the wait_abs struct in stream_encode_mt() to be used before it was - initialized since mythread_condtime_set() will always be called before - mythread_cond_timedwait(). + (cherry picked from commit b526ec2dbfb5889845ea60548c4f5b1f97d84ab2) + + .github/workflows/openbsd.yml | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +commit 493bc57c33385bda5ad32d01ab73dcfe8f5e7ced +Author: Sam James +Date: 2024-04-15 05:53:01 +0100 + + liblzma: outqueue: add header guard - Since the mythread.h code is different between the POSIX and - Windows versions, this warning was only present on Windows builds. + Reported by github's codeql. - Thanks to Arthur S for reporting the warning and providing an initial - patch. + (cherry picked from commit c7ef767c49351743d8d011574abb9e200bf6b24f) - src/liblzma/common/stream_encoder_mt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/common/outqueue.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit 62dd1c9bf0c66679ceeebc8b99bca136ca43bcb9 -Author: Jia Tan -Date: 2023-06-07 00:10:38 +0800 +commit cede418d4f8e1fb4c8a30839fa5d3b14743e83d4 +Author: Sam James +Date: 2024-04-15 05:53:56 +0100 - Update THANKS. + liblzma: easy_preset: add header guard + + Reported by github's codeql. + + (cherry picked from commit 55dcae3056d95cb2ddb8b560c12ba7596bc79f2c) - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/easy_preset.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit d04eb78ab3892d3678c180437dd66379efa051fd -Author: Benjamin Buch -Date: 2023-06-06 15:32:45 +0200 +commit 6e76a25df28b47407a201bf0381fa6d3c80cb0bb +Author: Lasse Collin +Date: 2024-04-25 14:00:57 +0300 - CMake: Protects against double find_package + tuklib_integer: Rename bswapXX to byteswapXX - Boost iostream uses `find_package` in quiet mode and then again uses - `find_package` with required. This second call triggers a - `add_library cannot create imported target "LibLZMA::LibLZMA" - because another target with the same name already exists.` + The __builtin_bswapXX from GCC and Clang are preferred when + they are available. This can allow compilers to emit the x86 MOVBE + instruction instead of doing a load + byteswap as two instructions + (which would happen if the byteswapping is done in inline asm). - This can simply be fixed by skipping the alias part on secondary - `find_package` runs. + bswap16, bswap32, and bswap64 exist in system headers on *BSDs + and Darwin. #defining bswap16 on NetBSD results in a warning about + macro redefinition. It's safest to avoid this namespace conflict + completely. + + No OS supported by tuklib_integer.h uses byteswapXX names and + a web search doesn't immediately find any obvious danger of + namespace conflicts. So let's try these still-pretty-short names + for the macros. + + Thanks to Sam James for pointing out the compiler warning on + NetBSD 10.0. + + (cherry picked from commit 4ffc60f32397371769b7d6b5e3ed8626292d58df) - CMakeLists.txt | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) + src/common/tuklib_integer.h | 47 ++++++++++++++++++++------------------ + src/liblzma/check/crc32_fast.c | 4 ++-- + src/liblzma/check/crc32_tablegen.c | 2 +- + src/liblzma/check/crc64_fast.c | 4 ++-- + src/liblzma/check/crc64_tablegen.c | 2 +- + 5 files changed, 31 insertions(+), 28 deletions(-) -commit 12ea1fb29763dd72376aca73d69621aff01eaa7f -Author: Jia Tan -Date: 2023-05-31 20:26:42 +0800 +commit 0ca14871f306b97ce81bfe44c4a39b6b2af31bb3 +Author: Lasse Collin +Date: 2024-04-24 01:20:26 +0300 - Translations: Update the Esperanto translation. + liblzma: API doc cleanups + + (cherry picked from commit 08ab0966a75b501aa7c717622223f0c13a113c75) - po/eo.po | 185 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 92 insertions(+), 93 deletions(-) + src/liblzma/api/lzma/container.h | 2 +- + src/liblzma/api/lzma/index.h | 6 +++--- + src/liblzma/api/lzma/vli.h | 5 ++--- + 3 files changed, 6 insertions(+), 7 deletions(-) -commit a4d45c07c1e4aa0ea9410b4eed7301c97e960319 -Author: Jia Tan -Date: 2023-05-31 20:25:00 +0800 +commit 94a462850bc8718f5dd5b30116bce2165b2403c2 +Author: Lasse Collin +Date: 2024-04-23 16:35:33 +0300 - Translations: Update the Croatian translation. + Tests: test_filter_str: Add a few assertions + + (cherry picked from commit 3ac8a9bb4cccbee88350696dc9c645c48d77c989) - po/hr.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_filter_str.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit f51b7bcea6f948db9529b3e6d850e76a30cc0e96 -Author: Jia Tan -Date: 2023-05-31 20:15:53 +0800 +commit 72058ca22a7f3c9c67ed58be624f8302c6337cd7 +Author: Lasse Collin +Date: 2024-04-23 16:35:08 +0300 - Translations: Update the Chinese (simplified) translation. + Tests: test_filter_str: Move one assertion and add a comment + + (cherry picked from commit 26c69be80523b05c84dea86c47c4ddd9a10945d7) - po/zh_CN.po | 317 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 157 insertions(+), 160 deletions(-) + tests/test_filter_str.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit d5b81c19a7594fbb913bb3450360bc2145f29568 -Author: Jia Tan -Date: 2023-05-17 23:12:13 +0800 +commit c59ebbe1c6dd18b78a046aae3133702dd52c352e +Author: Lasse Collin +Date: 2024-04-23 16:26:06 +0300 - Translations: Update German translation of man pages. + Tests: test_filter_str: Tweak comments and white space + + (cherry picked from commit 4f6af853bc99904efb8b6c28a0af7b81a8476c1b) - po4a/de.po | 52 ++++++++++++---------------------------------------- - 1 file changed, 12 insertions(+), 40 deletions(-) + tests/test_filter_str.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 36860a3e30d5675b4dba3a343159458d8864bceb -Author: Jia Tan -Date: 2023-05-17 23:09:18 +0800 +commit ceda860934b0272689d0722ceeb490cf9c559956 +Author: Lasse Collin +Date: 2024-04-23 16:25:22 +0300 - Translations: Update the German translation. + Tests: test_filter_str: Add missing RISC-V case + + Fixes: 89ea1a22f4ed3685b053b7260bc5acf6c75d1664 + (cherry picked from commit c92663aa1bd576e0615498a4189acf0df12e84b9) - po/de.po | 189 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 94 insertions(+), 95 deletions(-) + tests/test_filter_str.c | 3 +++ + 1 file changed, 3 insertions(+) -commit f05641ef0d4990c4c58f459039d412475b94b37d -Author: Jia Tan -Date: 2023-05-17 20:30:01 +0800 +commit 2234b7cc472e62f3401216a71261579342fa2959 +Author: Lasse Collin +Date: 2024-04-22 22:23:32 +0300 - Translations: Update the Croatian translation. + Tests: test_filter_str: Test *error_pos more thoroughly + + (cherry picked from commit b0366df1d7ed26268101f9303a001c91c0806dfc) - po/hr.po | 187 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 93 insertions(+), 94 deletions(-) + tests/test_filter_str.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 76 insertions(+), 1 deletion(-) -commit b852f6f11d43cafce871cd158c80488f86619a63 -Author: Jia Tan -Date: 2023-05-17 20:26:54 +0800 +commit 3ba3ef57f929670adb1f9c5e5207a81a29374237 +Author: Lasse Collin +Date: 2024-04-22 21:54:39 +0300 - Translations: Update Korean translation of man pages. + liblzma: lzma_str_to_filters: Set *error_pos on all errors + + The API docs clearly say that if error_pos isn't NULL then *error + is always set on any error. However, it wasn't touched if str == NULL + or filters == NULL or unsupported flags were specified. + + Fixes: cedeeca2ea6ada5b0411b2ae10d7a859e837f203 + (cherry picked from commit 70d12dd069bb9bb0d6bb1c8fafc4e6f77780263d) - po4a/ko.po | 3015 ++++++++++++------------------------------------------------ - 1 file changed, 568 insertions(+), 2447 deletions(-) + src/liblzma/common/string_conversion.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit fdcb78fb6f5313eda363869690685471d7ab9731 -Author: Jia Tan -Date: 2023-05-17 20:13:01 +0800 +commit 57ad820e15381344a812c78ce9b67a77a60b9cf3 +Author: Lasse Collin +Date: 2024-04-22 20:31:25 +0300 - Translations: Update the Korean translation. + liblzma: Clean up white space + + (cherry picked from commit ed8e552395701fbf046027cebc8be4a6755b263f) - po/ko.po | 319 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 158 insertions(+), 161 deletions(-) + src/liblzma/lz/lz_encoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 9e39cebe3ccdd4bc320ce6e7eea989bdd167c8b2 -Author: Jia Tan -Date: 2023-05-16 23:49:09 +0800 +commit ba0b5bfe7cb3cdbd9a4e3c268e10c304cb834e8a +Author: Lasse Collin +Date: 2024-04-22 18:35:19 +0300 - Translations: Update the Spanish translation. + Tests: test_filter_flags: Edit comments and style + + (cherry picked from commit 2f06920f20b1ad63b7953dc09569e1d424998849) - po/es.po | 319 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 158 insertions(+), 161 deletions(-) + tests/test_filter_flags.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) -commit 7a578d1d8293fc1cf7c6f9df76bc6a0e55c51a14 -Author: Jia Tan -Date: 2023-05-16 23:47:23 +0800 +commit d2ed6759596185ac6a9c69ea713c27cd4bd1d9ba +Author: Lasse Collin +Date: 2024-04-22 16:39:44 +0300 - Translations: Update the Romanian translation. + Tests: Fix C99/C11 compatibility when features are disabled + + The array could become empty and then the initializer would be + simply {} which is allowed only in GNU-C and C23. + + (cherry picked from commit b101e1d1dbc81577c0c9aa0cb89cf2e46a15eb82) - po/ro.po | 195 ++++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 98 insertions(+), 97 deletions(-) + tests/test_filter_flags.c | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) -commit 362320fea5383bae179763763625532bad6d10e8 -Author: Jia Tan -Date: 2023-05-16 23:45:43 +0800 +commit 9a70e93fef3fd5943484e56f1881a7c6e3296027 +Author: Lasse Collin +Date: 2024-04-21 20:32:16 +0300 - Translations: Update Romanian translation of man pages. + DOS: Omit useless defines from config.h + + (cherry picked from commit f8f3a220ac8afcb8cb2812917d3b77e00c2eab0d) - po4a/ro.po | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) + dos/config.h | 12 ------------ + 1 file changed, 12 deletions(-) -commit 29c5a870be23d0a565b959404b34a8b1babef7df -Author: Jia Tan -Date: 2023-05-16 23:43:51 +0800 +commit dc4740f720e08bdd496aa2736db3b7aea6dd3d1e +Author: Lasse Collin +Date: 2024-04-21 20:27:50 +0300 - Translations: Update Ukrainian translation of man pages. + Build: Omit useless checks for fcntl.h, limits.h, and sys/time.h + + (cherry picked from commit fc1921b04b8840caaa777c2bd5340d41b259da20) - po4a/uk.po | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) -commit 5ee57572773207371712b1bbcd9b5b8c1baad2cc -Author: Jia Tan -Date: 2023-05-16 23:37:54 +0800 +commit 6e210d5766b25d36729152a13c5889bb0605a1e3 +Author: Lasse Collin +Date: 2024-04-19 22:04:21 +0300 - Translations: Update the Ukrainian translation. + liblzma: Silence a warning from Coverity static analysis + + It is logical why it cannot know for sure that the value has + to be at most 4 if it is less than 16. + + The x86 filter is based on a very old LZMA SDK version. Newer + ones have quite a different implementation for the same filter. + + Thanks to Sam James. + + (cherry picked from commit 6aa2a6deeba04808a0fe4461396e7fb70277f3d4) - po/uk.po | 321 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 159 insertions(+), 162 deletions(-) + src/liblzma/simple/x86.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) -commit dfc257bdb224780d3c8cdeca5a8e52848b9adc0a -Author: Jia Tan -Date: 2023-05-16 23:07:35 +0800 +commit 4019b012f29008ea6545aba6fe6c141a2d920ae2 +Author: Lasse Collin +Date: 2024-04-19 23:18:19 +0300 - Translations: Update the Polish translation. + Update .gitignore + + (cherry picked from commit e89d3e83b4496d0b5410870634970c0aa9721d59) - po/pl.po | 316 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 155 insertions(+), 161 deletions(-) + .gitignore | 21 ++++++++------------- + 1 file changed, 8 insertions(+), 13 deletions(-) -commit f6df4c4ab7378d2971ae1606f4eecc011ea5fc6d -Author: Jia Tan -Date: 2023-05-16 22:52:14 +0800 +commit 09a0311a1e8cdefbcfab9e490cdd41c97a459d24 +Author: Lasse Collin +Date: 2024-04-19 20:53:24 +0300 - Translations: Update the Swedish translation. + Tests: test_lzip_decoder: Tweak coding style and comments + + (cherry picked from commit 86fc4ee859709da0ff9617a1490f13ddac0a109b) - po/sv.po | 319 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 158 insertions(+), 161 deletions(-) + tests/test_lzip_decoder.c | 58 +++++++++++++++++++++++------------------------ + 1 file changed, 28 insertions(+), 30 deletions(-) -commit 25da22e0521ec698dae4eb5e994b4cd3f4708b60 -Author: Jia Tan -Date: 2023-05-16 21:21:38 +0800 +commit 3117336a0291309ddd2a54d2966a589f9f806850 +Author: Lasse Collin +Date: 2024-04-19 20:51:36 +0300 - Translations: Update the Esperanto translation. + Tests: test_lzip_decoder: Remove redundant initializations + + (cherry picked from commit 38be573a279bd7b608ee7d8509ec10884e6fb0d5) - po/eo.po | 34 +++++++++++++++++----------------- - 1 file changed, 17 insertions(+), 17 deletions(-) + tests/test_lzip_decoder.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) -commit 4f57a9c9915b7b9267885cf9fca58e5c8208458d -Author: Jia Tan -Date: 2023-05-11 23:49:23 +0800 +commit f78081eb12c804ec4f5a3dc569b859646b16e9e5 +Author: Lasse Collin +Date: 2024-04-19 20:47:24 +0300 - liblzma: Adds lzma_nothrow to MicroLZMA API functions. + Tests: test_lzip_decoder: Remove unneeded tuktest_malloc() calls - None of the liblzma functions may throw an exception, so this - attribute should be applied to all liblzma API functions. + (cherry picked from commit d7e4bc53eacfab9f3de95d8252bdfdc9419079c9) - src/liblzma/api/lzma/container.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + tests/test_lzip_decoder.c | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) -commit 238b4e5458b4bd2cadefb768b8ea7c6b70a191ac -Author: Jia Tan -Date: 2023-05-04 20:38:52 +0800 +commit 7413383e4280065b79ca70abe4d8ebc78055b35a +Author: Lasse Collin +Date: 2024-04-15 20:35:07 +0300 - Translations: Update the Croatian translation. + xz: Fix white space error. + + Thanks to xx on #tukaani. + + (cherry picked from commit eeca8f7c5baf1ad69606bb734d5001763466d58f) - po/hr.po | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/xz/args.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 0cee63c3c6c4f9084a5e7fa7c15a1863ac8e5ffc -Author: Jia Tan -Date: 2023-05-04 19:50:42 +0800 +commit eed2f26c0edb6e31a50d48bab4ff619778690a1e +Author: Sam James +Date: 2024-04-11 23:01:44 +0100 - Bump version and soname for 5.4.3. + xz: add missing noreturn for message_filters_help + + Fixes: a165d7df1964121eb9df715e6f836a31c865beef + (cherry picked from commit 462ca9409940a19f743daee6b3bcc611277d0007) - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xz/message.h | 1 + + 1 file changed, 1 insertion(+) -commit 01f937ea9a49005c5091c0165fa0c1e572dd1749 -Author: Jia Tan -Date: 2023-05-02 20:39:56 +0800 +commit 2633d8df616405bd54fd748d7bf887ebc4505b88 +Author: Sam James +Date: 2024-04-11 19:34:04 +0100 - Add NEWS for 5.4.3. + xz: signals: suppress -Wsign-conversion on macOS + + On macOS, we get: + ``` + signals.c: In function 'signals_init': + signals.c:76:17: error: conversion to 'sigset_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Werror=sign-conversion] + 76 | sigaddset(&hooked_signals, sigs[i]); + | ^~~~~~~~~ + signals.c:81:17: error: conversion to 'sigset_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Werror=sign-conversion] + 81 | sigaddset(&hooked_signals, message_progress_sigs[i]); + | ^~~~~~~~~ + signals.c:86:9: error: conversion to 'sigset_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Werror=sign-conversion] + 86 | sigaddset(&hooked_signals, SIGTSTP); + | ^~~~~~~~~ + ``` + + We use `int` for `hooked_signals` but we can't just cast to whatever + `sigset_t` is because `sigset_t` is an opaque type. It's an unsigned int + on macOS. On macOS, `sigaddset` is implemented as a macro. + + Just suppress -Wsign-conversion for `signals_init` for macOS given + there's no real nice way of fixing this. + + (cherry picked from commit 863f13d2828b99b0539ce73f9cf85bde32358034) - NEWS | 10 ++++++++++ - 1 file changed, 10 insertions(+) + src/xz/signals.c | 7 +++++++ + 1 file changed, 7 insertions(+) -commit e9b9ea953179502d5245b4e6ca4f5ffe9d5797b1 +commit 50fb269c7a9cf62a9f3fe08859e2aa4348b600a7 Author: Lasse Collin -Date: 2023-05-03 22:46:42 +0300 +Date: 2024-04-13 22:19:40 +0300 - tuklib_integer.h: Fix a recent copypaste error in Clang detection. + Tests: test_microlzma: Add a "FIXME?" about LZMA_FINISH handling - Wrong line was changed in 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7. - Also, this has >= instead of == since ints larger than 32 bits would - work too even if not relevant in practice. + (cherry picked from commit fcbd0d199933a69713cb293cbd7409a757d854cd) - src/common/tuklib_integer.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + tests/test_microlzma.c | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit be6e39a8622f0d905072874ec25b1ffd155b12e1 -Author: Jia Tan -Date: 2023-04-20 20:15:00 +0800 +commit 3e2ff2d38c54c8fc7ce15aaf91185dc105d9c92c +Author: Lasse Collin +Date: 2024-04-13 18:05:31 +0300 - Update THANKS. + Tests: test_microlzma: Tweak comments, coding style, and minor details + + A few lines were reordered, a few ARRAY_SIZE were changed to sizeof, + and a few uint32_t were changed to size_t. No real functional changes + were intended. + + (cherry picked from commit 0fe2dfa68355d2b165544b2bc8babf77dcc2039e) - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_microlzma.c | 149 +++++++++++++++++++++++++++---------------------- + 1 file changed, 83 insertions(+), 66 deletions(-) -commit 9e343a46cf87a345799222c0b0b3a6f3358dde0c -Author: Jia Tan -Date: 2023-04-19 22:22:16 +0800 +commit ebc8b8de19d641c37ab7959a224bcd0ff4c0833f +Author: Ryan Carsten Schmidt +Date: 2024-04-12 19:31:13 -0500 - Windows: Include when needed. + CI: Use only the active CPUs on macOS - Legacy Windows did not need to #include to use the MSVC - intrinsics. Newer versions likely just issue a warning, but the MSVC - documentation says to include the header file for the intrinsics we use. + hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts + only the active CPUs. - GCC and Clang can "pretend" to be MSVC on Windows, so extra checks are - needed in tuklib_integer.h to only include when it will is - actually needed. + (cherry picked from commit 97f0ee0f1f903f4e7c4ea23e9b89d687025d2992) - src/common/tuklib_integer.h | 6 ++++++ - src/liblzma/common/memcmplen.h | 10 ++++++++++ - 2 files changed, 16 insertions(+) + build-aux/ci_build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 12321a9390acc076b414035a46df9d7545ac379f -Author: Jia Tan -Date: 2023-04-19 21:59:03 +0800 +commit 1e63f7d53648beb6dd5acb5771850d7c4bc30477 +Author: Sam James +Date: 2024-04-10 18:33:55 +0100 - tuklib_integer: Use __builtin_clz() with Clang. + ci: rename ci_build.sh -> ci_build.bash - Clang has support for __builtin_clz(), but previously Clang would - fallback to either the MSVC intrinsic or the regular C code. This was - discovered due to a bug where a new version of Clang required the - header file in order to use the MSVC intrinsics. + We discussed the name and it's less cognitive load to just call it '.bash' + so you don't have an immediate question about if bashisms are OK. - Thanks to Anton Kochkov for notifying us about the bug. + (cherry picked from commit 73f629e321b74f68c9954728fa4f19261afccf46) - src/common/tuklib_integer.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + .github/workflows/ci.yml | 52 ++++++++++++++++---------------- + .github/workflows/windows-ci.yml | 20 ++++++------ + build-aux/{ci_build.sh => ci_build.bash} | 0 + 3 files changed, 36 insertions(+), 36 deletions(-) -commit d1f0e01c395960efd6c29ff144eda4f4c8c1c6d3 -Author: Lasse Collin -Date: 2023-04-14 18:42:33 +0300 +commit aea54a4724414466a20afd7493156d40d0a2741c +Author: Sam James +Date: 2024-04-10 17:42:23 +0100 - liblzma: Update project maintainers in lzma.h. + ci: build in parallel by default - AUTHORS was updated earlier, lzma.h was simply forgotten. + (cherry picked from commit 8709407a9ef8e7e8aec117879400e4dd3e227ada) - src/liblzma/api/lzma.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + build-aux/ci_build.sh | 2 ++ + 1 file changed, 2 insertions(+) -commit 8204c5d1304e1e3b7487801b4acaf8e3179a6c52 -Author: Jia Tan -Date: 2023-04-13 20:45:19 +0800 +commit 4381fcf00b2fabb6dcc9fd5cf35d520feb9e775a +Author: Sam James +Date: 2024-04-10 15:41:08 +0100 - liblzma: Cleans up old commented out code. + ci: default to -O2 + + We need this for when we're passing sanitizer flags or -gdwarf-4 for Clang + with Valgrind. Just always start with -O2 if CFLAGS isn't set in the + environment and append what was passed on the command line. + + (cherry picked from commit 65bf7e0a1ca6386f17608e8afb84ac470c18d23f) - src/liblzma/common/alone_encoder.c | 11 ----------- - 1 file changed, 11 deletions(-) + build-aux/ci_build.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 32980d1562bc031013306be1c787761fa63da87d -Author: Jia Tan -Date: 2023-03-28 22:32:40 +0800 +commit 752ba5ed99ec754bafbdc4d87a2876cb2566ecc4 +Author: Sam James +Date: 2024-04-10 15:17:47 +0100 - CMake: Update liblzma-config.cmake generation. + ci: make automake's test runner verbose on failures - Now that the threading is configurable, the liblzma CMake package only - needs the threading library when using POSIX threads. + This is a lot easier to work with than the save-logs thing the action + tries to do... + + (cherry picked from commit bc899f9e0700ad153bd65f4804c4de7515c8a847) - CMakeLists.txt | 33 ++++++++++++++++++++++----------- - 1 file changed, 22 insertions(+), 11 deletions(-) + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 023907faa965476fb921a6344253c50e0ba795f9 -Author: Jia Tan -Date: 2023-03-28 22:25:33 +0800 +commit cc21af171599ffe0419fc32a30edd3ef7d479865 +Author: Sam James +Date: 2024-04-10 12:38:51 +0100 - CMake: Allows setting thread method. + ci: make UBSAN abort on errors - The thread method is now configurable for the CMake build. It matches - the Autotools build by allowing ON (pick the best threading method), - OFF (no threading), posix, win95, and vista. If both Windows and - posix threading are both available, then ON will choose Windows - threading. Windows threading will also not use: + Unfortunately, UBSAN doesn't do this by default. See also the change + I made in Meson for this in October [0]. - target_link_libraries(liblzma Threads::Threads) + [0] https://github.com/mesonbuild/meson/commit/7b7d2e060b447de9c2642848847370a58711ac1c - since on systems like MinGW-w64 it would link the posix threads - without purpose. + (cherry picked from commit b5e3470442531717b2457b40ab412740296af1bc) - CMakeLists.txt | 144 +++++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 104 insertions(+), 40 deletions(-) + .github/workflows/ci.yml | 1 + + 1 file changed, 1 insertion(+) -commit ba176d77cbb164b13006516660fc1ff6c59dedb5 -Author: Jia Tan -Date: 2023-03-24 20:05:59 +0800 +commit 2d2d5f14b392cd1aeddab7ce34fd50ba5422e5b5 +Author: Sam James +Date: 2024-04-10 11:43:10 +0100 - CMake: Only build xzdec if decoders are enabled. + ci: test Valgrind + + Using `--trace-children=yes` has a trade-off here, as it makes + `test_scripts.sh` pretty slow when calling various non-xz utilities. + + But I also feel like it's not useless to have Valgrind used there and it's + not easy to exclude Valgrind just for that one test... + + I did consider using AX_VALGRIND_CHECK [0][1] but I couldn't get it working + immediately with some conditionally-built tests and I wondered if it was + worth spending time on at least while we're debating xz's future build + system situation. + + [0] https://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html + [1] https://tecnocode.co.uk/2014/12/23/automatically-valgrinding-code-with-ax_valgrind_check/ + + (cherry picked from commit 6c095a98fbec70b790253a663173ecdb669108c4) - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/workflows/ci.yml | 11 ++++++++++- + build-aux/ci_build.sh | 8 +++++--- + 2 files changed, 15 insertions(+), 4 deletions(-) -commit c99d697df800e9bc47e09facf88bcfdb9e0264a5 -Author: Jia Tan -Date: 2023-03-22 15:42:04 +0800 +commit 5d20a612051fac3ca6d99abe3cd7e0e3370e5b67 +Author: Lasse Collin +Date: 2024-04-10 23:20:02 +0300 - Build: Removes redundant check for LZMA1 filter support. + liblzma: CRC: Simplify table omission macros + + A macro is useful to prevent a single #if directive from + getting too ugly but only one macro is needed for all archs. + + (cherry picked from commit 6286c1900c2d2ca33d9b1b397122c7bcdb9a4d59) - src/liblzma/lzma/Makefile.inc | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) + src/liblzma/check/crc32_table.c | 10 ++++------ + src/liblzma/check/crc64_table.c | 4 ++-- + src/liblzma/check/crc_common.h | 5 +++-- + 3 files changed, 9 insertions(+), 10 deletions(-) -commit 54a2fd8c850e626343b79c4cc8fcac2f638ec890 +commit 2a80827e23169c624560ac89714bf5084cbead43 Author: Lasse Collin -Date: 2023-03-23 15:14:29 +0200 +Date: 2024-04-10 23:09:40 +0300 - CMake: Bump maximum policy version to 3.26. + liblzma: ARM64 CRC: Fix omission of CRC32 table - It adds only one new policy related to FOLDERS which we don't use. - This makes it clear that the code is compatible with the policies - up to 3.26. + The macro name had an odd typo so the table wasn't omitted + when it should have. + + Fixes: 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad + (cherry picked from commit 45da936c879acf4f053a3055665bf1b10ded4462) - CMakeLists.txt | 2 +- + src/liblzma/check/crc32_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 622d0fdc02d5f565c2872d79bc70c669c95c8284 -Author: Jia Tan -Date: 2023-03-21 23:36:00 +0800 +commit a54117377151356c1e2494ba1febc245cb71b51c +Author: Lasse Collin +Date: 2024-04-10 22:21:51 +0300 - CMake: Conditionally build xz list.* files if decoders are enabled. + Build: If ARM64 feature detection func is found, stop looking for others + + This can speed up configure a tiny bit. + + Fixes: c5f6d79cc9515a7f22d7ea4860c6cc394b295732 + (cherry picked from commit 308a9af85400b0e2019f0f012c8354e831d06d65) - CMakeLists.txt | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 3e2dc523c596cd770a6a7c58cacc0d0d8761e853 -Author: Jia Tan -Date: 2023-02-25 11:46:50 +0800 +commit 9223ad6e78a666cc9f9aba135d1755fec184a24a +Author: Lasse Collin +Date: 2024-04-10 22:04:27 +0300 - CMake: Allow configuring features as cache variables. + liblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD - This allows users to change the features they build either in - CMakeCache.txt or by using a CMake GUI. The sources built for - liblzma are affected by this too, so only the necessary files - will be compiled. + I didn't test this but it shouldn't change any functionality. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 + (cherry picked from commit fc43cecd32bf9d5f8caa599206b15c9569af1eb6) - CMakeLists.txt | 528 ++++++++++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 391 insertions(+), 137 deletions(-) + src/liblzma/check/crc32_arm64.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit 0c053f97337fa4ead77acefb577e8e86f8ef388d +commit 32ceb2c36a0e450037bbe906c2a1ea42607b9d21 Author: Lasse Collin -Date: 2023-03-21 14:07:51 +0200 +Date: 2024-04-10 21:59:27 +0300 - Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69. + liblzma: ARM64 CRC32: Add error checking to FreeBSD-specific code - It's obsolete in Autoconf >= 2.70 and just an alias for AC_PROG_CC - but Autoconf 2.69 requires AC_PROG_CC_C99 to get a C99 compiler. + Also add parenthesis to the return statement. + + I didn't test this. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 + (cherry picked from commit 1024cd4cd966b998fedec51e385e9ee9a49b3c57) - configure.ac | 3 +++ - 1 file changed, 3 insertions(+) + src/liblzma/check/crc32_arm64.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit 915d4f6058d52f84d2b58b0a5f3c8272eaa6c1bd +commit 42915101e914dba353c236925bc1d5e4826d3f7a Author: Lasse Collin -Date: 2023-03-21 14:04:37 +0200 +Date: 2024-04-10 21:56:33 +0300 - Build: configure.ac: Use AS_IF and AS_CASE where required. + liblzma: ARM64 CRC32: Use negation instead of subtracting from 8 - This makes no functional difference in the generated configure - (at least with the Autotools versions I have installed) but this - change might prevent future bugs like the one that was just - fixed in the commit 5a5bd7f871818029d5ccbe189f087f591258c294. + Subtracting from 0 is negation, this just keeps warnings away. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 + (cherry picked from commit 2337f7021c860b026e3e849e60a9ae8d09ec0ea0) - configure.ac | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) + src/liblzma/check/crc32_arm64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b848c039586ed2cddb6fb033680dac107cc5143f +commit 42a9482b48f0171852fbaddbdc729a56f2daa547 Author: Lasse Collin -Date: 2023-03-21 13:12:03 +0200 +Date: 2024-04-10 21:55:10 +0300 - Update THANKS. + liblzma: ARM64 CRC32: Tweak coding style and comments + + (cherry picked from commit d8fffd01aa1a3c18e437a222abd34699e23ff5e7) - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_arm64.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit c775ba1602a74f29dbc2088bbe4d02c23fc32ba1 +commit 38a3ec5a7e2ddeee3686be64b037aa1377f31fd1 Author: Lasse Collin -Date: 2023-03-21 13:11:49 +0200 +Date: 2024-04-09 17:47:01 +0300 - Build: Fix --disable-threads breaking the building of shared libs. - - This is broken in the releases 5.2.6 to 5.4.2. A workaround - for these releases is to pass EGREP='grep -E' as an argument - to configure in addition to --disable-threads. - - The problem appeared when m4/ax_pthread.m4 was updated in - the commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad which - introduced the use of AC_EGREP_CPP. AC_EGREP_CPP calls - AC_REQUIRE([AC_PROG_EGREP]) to set the shell variable EGREP - but this was only executed if POSIX threads were enabled. - Libtool code also has AC_REQUIRE([AC_PROG_EGREP]) but Autoconf - omits it as AC_PROG_EGREP has already been required earlier. - Thus, if not using POSIX threads, the shell variable EGREP - would be undefined in the Libtool code in configure. - - ax_pthread.m4 is fine. The bug was in configure.ac which called - AX_PTHREAD conditionally in an incorrect way. Using AS_CASE - ensures that all AC_REQUIREs get always run. + CI: Remove ifunc support. - Thanks to Frank Busse for reporting the bug. - Fixes: https://github.com/tukaani-project/xz/issues/45 + (cherry picked from commit 986865ea2f9d1f8dbef4a130926df106b0f6d41a) - configure.ac | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + .github/workflows/ci.yml | 13 +++---------- + build-aux/ci_build.sh | 5 +---- + 2 files changed, 4 insertions(+), 14 deletions(-) -commit 0673c9ec98b6bae12b33dc295564514aaa26e2fc +commit 34d1252f093944ff350a88a6196539f95902ad41 Author: Lasse Collin -Date: 2023-03-19 22:45:59 +0200 +Date: 2024-04-09 17:43:16 +0300 - liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h. + liblzma: Remove ifunc support. - Thanks to Christian Hesse for reporting the issue. - Fixes: https://github.com/tukaani-project/xz/issues/44 + This is *NOT* done for security reasons even though the backdoor + relied on the ifunc code. Instead, the reason is that in this + project ifunc provides little benefits but it's quite a bit of + extra code to support it. The only case where ifunc *might* matter + for performance is if the CRC functions are used directly by an + application. In normal compression use it's completely irrelevant. + + (cherry picked from commit 689ae2427342a2ea1206eb5ca08301baf410e7e0) - src/liblzma/common/memcmplen.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 79 --------------------------------------- + INSTALL | 8 ---- + configure.ac | 79 --------------------------------------- + src/liblzma/check/crc32_fast.c | 48 +++--------------------- + src/liblzma/check/crc64_fast.c | 21 ----------- + src/liblzma/check/crc_common.h | 9 +---- + src/liblzma/check/crc_x86_clmul.h | 11 +----- + 7 files changed, 8 insertions(+), 247 deletions(-) -commit 6ca8046ecbc7a1c81ee08f544bfd1414819fb2e8 -Author: Jia Tan -Date: 2023-03-18 23:22:06 +0800 +commit a594b39685051cd1ec866360bc4dd6c22f301bb4 +Author: Lasse Collin +Date: 2024-04-08 22:04:41 +0300 - Bump version and soname for 5.4.2. + tests/files/README: Update the main heading. + + (cherry picked from commit 6b4c859059a7eb9b0547590c081668e14ecf8af6) - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + tests/files/README | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit ce4f246600db10e77fc93d492ea045b4c9830bc6 -Author: Jia Tan -Date: 2023-03-18 22:10:57 +0800 +commit fa76e3ef597ee2e9d150461a42d270a386204042 +Author: Lasse Collin +Date: 2024-04-08 22:02:45 +0300 - Add NEWS for 5.4.2. + tests/files/README: Explain how to recreate the ARM64 test files. + + (cherry picked from commit 2a851e06b891ce894f918faff32a6cca6fdecee6) - NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) + tests/files/README | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) -commit 3634fe330788fc0df217acdb6581031a851600a3 +commit 112fa0aba6be30968811c9131f1b995cf9e92e75 Author: Lasse Collin -Date: 2023-03-18 16:00:54 +0200 +Date: 2024-04-08 21:51:55 +0300 - Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3. + debug: Add generator for the ARM64 test file data. + + (cherry picked from commit 3d09b721b94e18fe1f853a04799697f5de10b291) - COPYING.GPLv3 | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + debug/Makefile.am | 3 +- + debug/testfilegen-arm64.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 118 insertions(+), 1 deletion(-) -commit 97679d25ce7cb014328f1455bb338903c003d54f +commit 1a1f3d0323d5991a3238566e8f517d5116358b5c Author: Lasse Collin -Date: 2023-03-18 15:51:57 +0200 +Date: 2024-04-08 21:19:38 +0300 - Change a few HTTP URLs to HTTPS. + xz man page: Use .ft CR instead of CW to silence warnings from groff. - The xz man page timestamp was intentionally left unchanged. + (cherry picked from commit 31ef676567c9d6fcc4ec9fc833c312f7a7c21c48) - INSTALL | 2 +- - README | 8 ++++---- - configure.ac | 2 +- - dos/INSTALL.txt | 4 ++-- - src/liblzma/api/lzma.h | 8 ++++---- - src/liblzma/check/sha256.c | 2 +- - src/xz/xz.1 | 2 +- - windows/INSTALL-MinGW.txt | 10 +++++----- - 8 files changed, 19 insertions(+), 19 deletions(-) + src/xz/xz.1 | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) -commit 01a67e89a56c3ebf5f6681bd06f0edc22a1ae594 -Author: Jia Tan -Date: 2023-03-18 00:40:28 +0800 +commit 9f9203f574f895c40a86a83c45c6bb79c25bb5d2 +Author: Lasse Collin +Date: 2024-04-08 19:28:35 +0300 - CMake: Fix typo in a comment. + Fix NEWS for 5.6.0 and 5.6.1. + + (cherry picked from commit 780cbf29d5a88db2b546e9b7b019c4c33ca72685) - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + NEWS | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 5dca3f5cbab31105196c89cd6df0a9bbc3307c05 +commit 12876b33c79e36d7e51e8ba6ab7162bd2129cb5b Author: Lasse Collin -Date: 2023-03-17 18:36:22 +0200 +Date: 2024-04-08 19:22:26 +0300 - Windows: build.bash: Copy liblzma API docs to the output package. + Remove the XZ logo. + + (cherry picked from commit bfd0c7c478e93a1911b845459549ff94587b6ea2) - windows/build.bash | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + COPYING | 5 - + COPYING.CC-BY-SA-4.0 | 427 --------------------------------------------------- + Makefile.am | 2 - + README | 2 - + doc/xz-logo.png | Bin 6771 -> 0 bytes + doxygen/Doxyfile | 6 +- + doxygen/footer.html | 13 -- + 7 files changed, 3 insertions(+), 452 deletions(-) -commit ae252862b30b509ab88b2bbcaa08e8d51b57e928 +commit 879295d91f06c241fd8a8fc1ca95776dbeb45f93 Author: Lasse Collin -Date: 2023-03-17 08:53:38 +0200 +Date: 2024-04-08 18:27:39 +0300 - Windows: Add microlzma_*.c to the VS project files. + Update maintainer and author info. - These should have been included in 5.3.2alpha already. + The other maintainer suddenly disappeared. + + (cherry picked from commit 77a294d98a9d2d48f7e4ac273711518bf689f5c4) - windows/vs2013/liblzma.vcxproj | 2 ++ - windows/vs2013/liblzma_dll.vcxproj | 2 ++ - windows/vs2017/liblzma.vcxproj | 2 ++ - windows/vs2017/liblzma_dll.vcxproj | 2 ++ - windows/vs2019/liblzma.vcxproj | 2 ++ - windows/vs2019/liblzma_dll.vcxproj | 2 ++ - 6 files changed, 12 insertions(+) + AUTHORS | 9 +++++++-- + README | 10 +++------- + THANKS | 1 - + src/liblzma/api/lzma.h | 2 +- + 4 files changed, 11 insertions(+), 11 deletions(-) -commit 147d282cc3733e2723df82622b6540ddfb52635e +commit 859617d30d81317236e004b323fed0883f932dcf Author: Lasse Collin -Date: 2023-03-17 08:43:51 +0200 +Date: 2024-04-08 18:05:32 +0300 - CMake: Add microlzma_*.c to the build. + Docs: Update .xz file format specification to 1.2.1. - These should have been included in 5.3.2alpha already. + This only reverts the XZ URL changes. + + (cherry picked from commit 8dd03d4484ccf80022722a16d0ed9b37f2b58072) - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) + doc/xz-file-format.txt | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) -commit 4523a5ee29f45c0256af67a15771bc8bbd25ba53 +commit eeb74fba1f6ea334a519015938b4a26c6ba5d4eb Author: Lasse Collin -Date: 2023-03-17 08:41:36 +0200 +Date: 2024-04-08 17:33:56 +0300 - Build: Update comments about unaligned access to mention 64-bit. + Update website URLs back to tukaani.org. + + The XZ projects were moved back to their original URLs. + + (cherry picked from commit 17aa2e1a796d3f758802df29afc89dcf335db567) - cmake/tuklib_integer.cmake | 7 +++---- - m4/tuklib_integer.m4 | 4 ++-- - 2 files changed, 5 insertions(+), 6 deletions(-) + CMakeLists.txt | 2 +- + COPYING | 3 +-- + README | 4 ++-- + configure.ac | 2 +- + doc/faq.txt | 2 +- + doc/lzma-file-format.txt | 12 ++++++------ + dos/config.h | 2 +- + src/liblzma/api/lzma.h | 2 +- + src/xz/xz.1 | 6 +++--- + src/xzdec/xzdec.1 | 4 ++-- + windows/README-Windows.txt | 2 +- + 11 files changed, 20 insertions(+), 21 deletions(-) -commit 82aacb40367dc580b09c5a7b270f6c98b63e49b9 +commit a7b9cd70004bfc1abadc7e865dfce765f7b8b59d Author: Lasse Collin -Date: 2023-03-17 00:02:30 +0200 +Date: 2024-04-08 17:07:08 +0300 - Tests: Update .gitignore. + xzdec: Tweak coding style and comments. + + (cherry picked from commit 2739db981023373a2ddabc7b456c7e658bb4f582) - .gitignore | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/xzdec/xzdec.c | 32 +++++++++++++++++++++----------- + 1 file changed, 21 insertions(+), 11 deletions(-) -commit 5d022c24921eec938604a8cb10d70aa08dbd8575 +commit ebe9d6d8cb27168706078009b3f64da8fde63833 Author: Lasse Collin -Date: 2023-03-14 20:04:03 +0200 +Date: 2024-04-08 15:53:46 +0300 - po4a/update-po: Display the script name consistently in error messages. + tests/ossfuzz: Tiny fix to a comment. + + (cherry picked from commit 408b6adb2a07d07c6535f859571cca38837caaf3) - po4a/update-po | 2 +- + tests/ossfuzz/fuzz_decode_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 896295117324f323c0b8db6a31ad6ebfaa88793d -Author: Jia Tan -Date: 2023-03-17 01:30:36 +0800 +commit 78ab47d65d916207233abbcdb0ccfd6efb946c05 +Author: Lasse Collin +Date: 2024-03-30 14:36:28 +0200 - Doc: Rename Doxygen HTML doc directory name liblzma => api. + CMake: Fix sabotaged Landlock sandbox check. - When the docs are installed, calling the directory "liblzma" is - confusing since multiple other files in the doc directory are for - liblzma. This should also make it more natural for distros when they - package the documentation. + It never enabled it. + + (cherry picked from commit f9cf4c05edd14dedfe63833f8ccbe41b55823b00) - .gitignore | 2 +- - Makefile.am | 18 +++++++++--------- - PACKAGERS | 4 ++-- - doxygen/Doxyfile | 2 +- - doxygen/update-doxygen | 18 +++++++++--------- - 5 files changed, 22 insertions(+), 22 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 94097157fae308b2c1a5edb4e8597c68b45eeaea -Author: Jia Tan -Date: 2023-03-16 22:07:15 +0800 +commit 5f178c364c3b5c6fe87099b7624d5c76995ff8e6 +Author: Lasse Collin +Date: 2024-05-22 14:08:33 +0300 - liblzma: Remove note from lzma_options_bcj about the ARM64 exception. + Delete SECURITY.md from v5.6 - This was left in by mistake since an early version of the ARM64 filter - used a different struct for its options. + It's too easily out of date in the stable branches. + It's not included in the release packages anyway. - src/liblzma/api/lzma/bcj.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/SECURITY.md | 29 ----------------------------- + 1 file changed, 29 deletions(-) -commit da16d0b73b79d7785ece6f78a577fadd1fb59d0e +commit b3a756188004a16de5956c368e3b0efd1a9bccb0 Author: Lasse Collin -Date: 2023-03-15 19:19:13 +0200 +Date: 2024-03-22 17:46:30 +0200 - COPYING: Add a note about the included Doxygen-generated HTML. + liblzma: memcmplen.h: Add a comment why subtraction is used. + + (cherry picked from commit 0b99783d63f27606936bb79a16c52d0d70c0b56f) - COPYING | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/liblzma/common/memcmplen.h | 13 +++++++++++++ + 1 file changed, 13 insertions(+) -commit e57c74f9ef19201f72c106f2c347596f40229936 -Author: Jia Tan -Date: 2023-03-16 21:41:09 +0800 +commit 94939a145f362ff8b09fb37fc72901743f7f5cb2 +Author: Lasse Collin +Date: 2024-03-15 17:43:39 +0200 - Doc: Update PACKAGERS with details about liblzma API docs install. + INSTALL: Document arguments of --enable-symbol-versions. + + (cherry picked from commit 8a25ba024d55610c448c6e4f1400a00bae51b493) - PACKAGERS | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) + INSTALL | 43 +++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 39 insertions(+), 4 deletions(-) -commit 7e2fa48bb73edb25457232e2e62a4f81c6b95281 -Author: Jia Tan -Date: 2023-03-16 21:38:32 +0800 +commit fa14c8aaf0d0266b7e0c3b7c766159299c1a0f18 +Author: Lasse Collin +Date: 2024-03-15 17:15:50 +0200 - liblzma: Add set lzma.h as the main page for Doxygen documentation. + Build: Use only the generic symbol versioning with NVIDIA HPC Compiler. - The \mainpage command is used in the first block of comments in lzma.h. - This changes the previously nearly empty index.html to use the first - comment block in lzma.h for its contents. + This does the previous commit with CMake. - lzma.h is no longer documented separately, but this is for the better - since lzma.h only defined a few macros that users do not need to use. - The individual API header files all have a disclaimer that they should - not be #included directly, so there should be no confusion on the fact - that lzma.h should be the only header used by applications. + AC_EGREP_CPP uses AC_REQUIRE so the outermost if-commands must + be changed to AS_IF to ensure that things wont break some day. + See 5a5bd7f871818029d5ccbe189f087f591258c294. - Additionally, the note "See ../lzma.h for information about liblzma as - a whole." was removed since lzma.h is now the main page of the - generated HTML and does not have its own page anymore. So it would be - confusing in the HTML version and was only a "nice to have" when - browsing the source files. + (cherry picked from commit 49324b711f9d42b3543bf2f3ae598eaa03360bd5) - src/liblzma/api/lzma.h | 1 + - src/liblzma/api/lzma/base.h | 2 -- - 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/container.h | 2 -- - src/liblzma/api/lzma/delta.h | 2 -- - src/liblzma/api/lzma/filter.h | 2 -- - src/liblzma/api/lzma/hardware.h | 2 -- - src/liblzma/api/lzma/index.h | 2 -- - src/liblzma/api/lzma/index_hash.h | 4 +--- - src/liblzma/api/lzma/lzma12.h | 2 -- - src/liblzma/api/lzma/stream_flags.h | 2 -- - src/liblzma/api/lzma/version.h | 2 -- - src/liblzma/api/lzma/vli.h | 2 -- - 15 files changed, 2 insertions(+), 29 deletions(-) + configure.ac | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) -commit d42977c7acfdf7fd9acc8803cf411eca7dc10478 -Author: Jia Tan -Date: 2023-03-16 21:37:32 +0800 +commit 73baa8d99b51c7623ed95afe6411302d9ff56864 +Author: Lasse Collin +Date: 2024-03-15 16:36:35 +0200 - Build: Generate doxygen documentation in autogen.sh. + CMake: Use only the generic symbol versioning with NVIDIA HPC Compiler. - Another command line option (--no-doxygen) was added to disable - creating the doxygen documenation in cases where it not wanted or - if the doxygen tool is not installed. + It doesn't support the __symver__ attribute or __asm__(".symver ..."). + The generic symbol versioning can still be used since it only needs + linker support. + + (cherry picked from commit c273123ed0ebaebf49994057a7fe98aae7f42c40) - autogen.sh | 35 +++++++++++++++++++++++++++++------ - 1 file changed, 29 insertions(+), 6 deletions(-) + CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -commit 8fc712fcf41d821069c670f22b8bf628e7a4a877 -Author: Jia Tan -Date: 2023-03-16 21:35:55 +0800 +commit 886633f42376f4648d931917733c8a59fb2e1f6c +Author: Lasse Collin +Date: 2024-03-13 21:38:24 +0200 - Build: Create doxygen/update-doxygen script. - - This is a helper script to generate the Doxygen documentation. It can be - run in 'liblzma' or 'internal' mode by setting the first argument. It - will default to 'liblzma' mode and only generate documentation for the - liblzma API header files. + Update THANKS. - The helper script will be run during the custom mydist hook when we - create releases. This hook already alters the source directory, so its - fine to do it here too. This way, we can include the Doxygen generated - files in the distrubtion and when installing. + (cherry picked from commit df7f487648d18a3992386a59b8a061edca862d17) + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 760f622f0d73632df2347aaca7ac7ff5761e98b6 +Author: Lasse Collin +Date: 2024-03-13 21:30:18 +0200 + + liblzma: Minor comment edits. - In 'liblzma' mode, the JavaScript is stripped from the .html files and - the .js files are removed. This avoids license hassle from jQuery and - other libraries that Doxygen 1.9.6 puts into jquery.js in minified form. + (cherry picked from commit 3217b82b3ec023bf8338249134a076bea0ea30ec) - Makefile.am | 1 + - doxygen/update-doxygen | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 112 insertions(+) + src/liblzma/common/string_conversion.c | 4 ++-- + src/liblzma/delta/delta_decoder.c | 2 ++ + 2 files changed, 4 insertions(+), 2 deletions(-) -commit 77d2c025d19fbac7277c63239cfb1338f02c66c0 -Author: Jia Tan -Date: 2023-03-16 21:34:36 +0800 +commit 403b4c78b81f67bc3787542f55f555407253316c +Author: Sergey Kosukhin +Date: 2024-03-13 13:07:13 +0100 - Build: Install Doxygen docs and include in distribution if generated. + liblzma: Fix building with NVHPC (NVIDIA HPC SDK). - Added a install-data-local target to install the Doxygen documentation - only when it has been generated. In order to correctly remove the docs, - a corresponding uninstall-local target was added. + NVHPC compiler has several issues that make it impossible to + build liblzma: + - the compiler cannot handle unions that contain pointers that + are not the first members; + - the compiler cannot handle the assembler code in range_decoder.h + (LZMA_RANGE_DECODER_CONFIG has to be set to zero); + - the compiler fails to produce valid code for delta_decode if the + vectorization is enabled, which results in failed tests. - If the doxygen docs exist in the source tree, they will also be included - in the distribution now too. + This introduces NVHPC-specific workarounds that address the issues. + + (cherry picked from commit 096bc0e3f8fb4bfc4d2f3f64a7f219401ffb4c31) - Makefile.am | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + src/liblzma/common/string_conversion.c | 6 ++++-- + src/liblzma/delta/delta_decoder.c | 3 +++ + src/liblzma/rangecoder/range_decoder.h | 1 + + 3 files changed, 8 insertions(+), 2 deletions(-) -commit 9af8f6f947a43974a4ff025f4c896f2fb4c91b4f -Author: Jia Tan -Date: 2023-01-03 20:37:30 +0800 +commit 1888fb49f629340758e98e69d5aa328f6f73c5e1 +Author: Lasse Collin +Date: 2024-03-13 21:17:10 +0200 - Doxygen: Refactor Doxyfile.in to doxygen/Doxyfile. + CMake: Disable symbol versioning on non-glibc Linux. - Instead of having Doxyfile.in configured by Autoconf, the Doxyfile - can have the tags that need to be configured piped into the doxygen - command through stdin with the overrides after Doxyfile's contents. + This better matches what configure.ac does. For example, musl has + only basic symbol versioning support: - Going forward, the documentation should be generated in two different - modes: liblzma or internal. + https://wiki.musl-libc.org/functional-differences-from-glibc.html#Symbol_versioning - liblzma is useful for most users. It is the documentation for just - the liblzma API header files. This is the default. + configure.ac tries to enable symbol versioning only with glibc + so now CMake does the same. - internal is for people who want to understand how xz and liblzma work. - It might be useful for people who want to contribute to the project. + (cherry picked from commit 2ad7fad67080e88fa7fc191f9d613d8b7add9c62) - .gitignore | 3 +- - Doxyfile.in | 1234 ------------------------- - Makefile.am | 1 - - configure.ac | 1 - - doxygen/Doxyfile | 2684 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 2686 insertions(+), 1237 deletions(-) + CMakeLists.txt | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) -commit 1c558a26928b753fcf1c0d4bce9c0643285edd86 -Author: Jia Tan -Date: 2023-02-28 23:22:36 +0800 +commit 4b3c84e8eebbcf712fc2396dbb8117cce2d72464 +Author: Lasse Collin +Date: 2024-03-13 20:32:46 +0200 - Tests: Remove unused macros and functions. + CMake: Make symbol versioning configurable. + + (cherry picked from commit 82f0c0d39eb2c026b1d96ee706f70ace868d4ed4) - tests/tests.h | 75 ----------------------------------------------------------- - 1 file changed, 75 deletions(-) + CMakeLists.txt | 62 +++++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 42 insertions(+), 20 deletions(-) -commit 7479a69a45a1b8fdb9a209e11f247dce11ac1ba0 -Author: Jia Tan -Date: 2023-01-12 22:29:07 +0800 +commit 69d1e20208eb9bd1f4f1c8ee4e49cc82d681a877 +Author: Lasse Collin +Date: 2024-03-13 19:47:36 +0200 - Tests: Refactors existing lzma_index tests. + Build: Style tweaks to configure.ac. - Converts the existing lzma_index tests into tuktests and covers every - API function from index.h except for lzma_file_info_decoder, which can - be tested in the future. + The AC_MSG_ERROR line is overlong anyway as are a few other + AC_MSG_ERROR lines already. + + (cherry picked from commit 45d33bfc45e4295b8ad743bc2ae61cc724f98076) - tests/test_index.c | 2036 ++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 1492 insertions(+), 544 deletions(-) + configure.ac | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +commit 051d6b5c85a874c78249693865fd751088f403a2 +Author: Sergey Kosukhin +Date: 2024-03-12 20:03:49 +0100 + + Build: Let the users override the symbol versioning variant. + + There are cases when the users want to decide themselves whether + they want to have the generic (even on GNU/Linux) or the linux + (even if we do not recommend that) symbol versioning variant. + The former might be needed to circumvent compiler issues (i.e. + the compiler does not support all features that are required + for the linux versioning), the latter might help in overriding + the assumptions made in the configure script. + + (cherry picked from commit f56ed6fac6619b56b005878d3b5210e2f0d721c0) -commit fd56d5353360279c10e8e5e05f5bc6ea03f64584 + configure.ac | 91 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 50 insertions(+), 41 deletions(-) + +commit 95dcea4b5df0b180af461e4584d2bcf7725e3aef Author: Lasse Collin -Date: 2023-03-07 19:59:23 +0200 +Date: 2024-04-09 18:22:16 +0300 - xz: Make Capsicum sandbox more strict with stdin and stdout. + Update THANKS. - src/xz/file_io.c | 8 ++++++++ - 1 file changed, 8 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit d1bdaaebc68cae7f0ba457fa990b520df2186fd1 +commit 1107712e372f7593ad729764c0c2644d0e4aa675 Author: Lasse Collin -Date: 2023-03-11 19:31:40 +0200 +Date: 2024-04-08 15:32:58 +0300 - xz: Don't fail if Capsicum is enabled but kernel doesn't support it. + Remove the backdoor found in 5.6.0 and 5.6.1 (CVE-2024-3094). + + While the backdoor was inactive (and thus harmless) without inserting + a small trigger code into the build system when the source package was + created, it's good to remove this anyway: + + - The executable payloads were embedded as binary blobs in + the test files. This was a blatant violation of the + Debian Free Software Guidelines. - (This commit combines related commits from the master branch.) + - On machines that see lots bots poking at the SSH port, the backdoor + noticeably increased CPU load, resulting in degraded user experience + and thus overwhelmingly negative user feedback. - If Capsicum support is missing from the kernel or xz is being run - in an emulator that lacks Capsicum suport, the syscalls will fail - and set errno to ENOSYS. Previously xz would display and error and - exit, making xz unusable. Now it will check for ENOSYS and run - without sandbox support. Other tools like ssh behave similarly. + - The maintainer who added the backdoor has disappeared. - Displaying a warning for missing Capsicum support was considered - but such extra output would quickly become annoying. It would also - break test_scripts.sh in "make check". + - Backdoors are bad for security. - Also move cap_enter() to be the first step instead of the last one. - This matches the example in the cap_rights_limit(2) man page. With - the current code it shouldn't make any practical difference though. + This reverts the following without making any other changes: - Thanks to Xin Li for the bug report, suggesting a fix, and testing: - https://github.com/tukaani-project/xz/pull/43 + 6e636819 Tests: Update two test files. + a3a29bbd Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz. + 0b4ccc91 Tests: Update RISC-V test files. + 8c9b8b20 liblzma: Fix typos in crc32_fast.c and crc64_fast.c. + 82ecc538 liblzma: Fix false Valgrind error report with GCC. + cf44e4b7 Tests: Add a few test files. + 3060e107 Tests: Use smaller dictionary size in RISC-V test files. + e2870db5 Tests: Add two RISC-V Filter test files. - Thanks to Jia Tan for most of the original commits. + The RISC-V test files also have real content that tests the filter + but the real content would fit into much smaller files. A generator + program would need to be available as well. + + Thanks to Andres Freund for finding and reporting it and making + it public quickly so others could act without a delay. + See: https://www.openwall.com/lists/oss-security/2024/03/29/4 - src/xz/file_io.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) + src/liblzma/check/crc32_fast.c | 7 +++++-- + src/liblzma/check/crc64_fast.c | 4 +++- + src/liblzma/check/crc_common.h | 25 ------------------------- + tests/files/README | 27 --------------------------- + tests/files/bad-3-corrupt_lzma2.xz | Bin 512 -> 0 bytes + tests/files/bad-dict_size.lzma | Bin 41 -> 0 bytes + tests/files/good-1-riscv-lzma2-1.xz | Bin 7424 -> 0 bytes + tests/files/good-1-riscv-lzma2-2.xz | Bin 7432 -> 0 bytes + tests/files/good-2cat.xz | Bin 136 -> 0 bytes + tests/files/good-large_compressed.lzma | Bin 35421 -> 0 bytes + tests/files/good-small_compressed.lzma | Bin 258 -> 0 bytes + tests/test_files.sh | 11 ----------- + 12 files changed, 8 insertions(+), 66 deletions(-) -commit 5d351c69c19d212ddd2cf1f3bdb24900820c6776 +commit fd1b975b7851e081ed6e5cf63df946cd5cbdbb94 Author: Jia Tan -Date: 2023-02-04 21:06:35 +0800 +Date: 2024-03-09 11:42:50 +0800 - Build: Adjust CMake version search regex. - - Now, the LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, and LZMA_VERSION_PATCH - macros do not need to be on consecutive lines in version.h. They can be - separated by more whitespace, comments, or even other content, as long - as they appear in the proper order (major, minor, patch). + Bump version and soname for 5.6.1. - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit b82d4831e3f2339c4cdbc47776c99462088c11b7 +commit a2cda572498e96163fe4e2bde096d5dd7b814668 Author: Jia Tan -Date: 2023-01-26 09:50:21 +0800 +Date: 2024-03-09 11:27:27 +0800 - liblzma: Improve documentation for version.h. - - Specified parameter and return values for API functions and documented - a few more of the macros. + Add NEWS for 5.6.1 - src/liblzma/api/lzma/version.h | 29 ++++++++++++++++++++++------- - 1 file changed, 22 insertions(+), 7 deletions(-) + NEWS | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) -commit 2caba3efe3e0c2d7c6dca00e22c56812326a34e6 +commit 8583c6021124e388bce044a09f00ebabfd6165a7 Author: Jia Tan -Date: 2023-02-24 23:46:23 +0800 +Date: 2024-03-09 10:43:20 +0800 - liblzma: Clarify lzma_lzma_preset() documentation in lzma12.h. - - lzma_lzma_preset() does not guarentee that the lzma_options_lzma are - usable in an encoder even if it returns false (success). If liblzma - is built with default configurations, then the options will always be - usable. However if the match finders hc3, hc4, or bt4 are disabled, then - the options may not be usable depending on the preset level requested. - - The documentation was updated to reflect this complexity, since this - behavior was unclear before. + Translations: Add missing --riscv option to man page translations. - src/liblzma/api/lzma/lzma12.h | 5 +++++ - 1 file changed, 5 insertions(+) + po4a/de.po | 702 +++++++++++++++++++++++++++++----------------------------- + po4a/fr.po | 549 ++++++++++++++++++++++----------------------- + po4a/ko.po | 702 +++++++++++++++++++++++++++++----------------------------- + po4a/pt_BR.po | 641 +++++++++++++++++++++++++++-------------------------- + po4a/ro.po | 702 +++++++++++++++++++++++++++++----------------------------- + po4a/uk.po | 702 +++++++++++++++++++++++++++++----------------------------- + 6 files changed, 2024 insertions(+), 1974 deletions(-) -commit 594f904673ba55a833adfa60bbab6b60d4902d08 -Author: Lasse Collin -Date: 2023-02-27 18:38:35 +0200 +commit 74b138d2a6529f2c07729d7c77b1725a8e8b16f1 +Author: Jia Tan +Date: 2024-03-09 10:18:29 +0800 - CMake: Require that the C compiler supports C99 or a newer standard. + Tests: Update two test files. - Thanks to autoantwort for reporting the issue and suggesting - a different patch: - https://github.com/tukaani-project/xz/pull/42 + The original files were generated with random local to my machine. + To better reproduce these files in the future, a constant seed was used + to recreate these files. - CMakeLists.txt | 8 ++++++++ - 1 file changed, 8 insertions(+) + tests/files/bad-3-corrupt_lzma2.xz | Bin 484 -> 512 bytes + tests/files/good-large_compressed.lzma | Bin 35430 -> 35421 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) -commit 88101143cb774bca6b7006c8335b09dc3f334140 +commit 3ec6dfd656bdd40ede2a5f11e6be338988e38be4 Author: Jia Tan -Date: 2023-02-24 18:10:37 +0800 +Date: 2024-03-09 10:08:32 +0800 - Tests: Small tweak to test-vli.c. + Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz. - The static global variables can be disabled if encoders and decoders - are not built. If they are not disabled and -Werror is used, it will - cause an usused warning as an error. + The first stream in this file is valid, so this tests that xz properly + stops after decompressing it. - tests/test_vli.c | 2 ++ - 1 file changed, 2 insertions(+) + tests/test_files.sh | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 4042dbf03a06e019ccdd1e9d1b94cf613d62d5a9 +commit a67dcce6109c2f932a0a86abb0d7a95d3c31fb3e Author: Jia Tan -Date: 2023-02-06 21:46:43 +0800 +Date: 2024-03-09 10:05:32 +0800 - liblzma: Replace '\n' -> newline in filter.h documentation. + Tests: Update RISC-V test files. - The '\n' renders as a newline when the comments are converted to html - by Doxygen. + This increases code coverage and tests for possible shifting bugs. - src/liblzma/api/lzma/filter.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/files/good-1-riscv-lzma2-1.xz | Bin 7512 -> 7424 bytes + tests/files/good-1-riscv-lzma2-2.xz | Bin 7512 -> 7432 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) -commit 3971f5c5024750ce8286891c6f79ae1661047483 +commit 058337b0f1da9f166049ecc972fa5c499c1af08c Author: Jia Tan -Date: 2023-02-06 21:45:37 +0800 +Date: 2024-03-09 09:52:32 +0800 - liblzma: Shorten return description for two functions in filter.h. - - Shorten the description for lzma_raw_encoder_memusage() and - lzma_raw_decoder_memusage(). + liblzma: Fix typos in crc32_fast.c and crc64_fast.c. - src/liblzma/api/lzma/filter.h | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + src/liblzma/check/crc32_fast.c | 4 ++-- + src/liblzma/check/crc64_fast.c | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) -commit 5e61b39432752b6cd1a7b518f0f9e4f0c3f0f242 +commit cd5de9c1bbab3dd41b34b37a89c193fb6ff51ca5 Author: Jia Tan -Date: 2023-02-06 21:44:45 +0800 +Date: 2024-03-09 09:49:55 +0800 - liblzma: Reword a few lines in filter.h + Tests: Replace HAVE_MICROLZMA usage in CMake and Autotools builds. + + This reverts commit adaacafde6661496ca2814b1e94a3ba5186428cb. - src/liblzma/api/lzma/filter.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + CMakeLists.txt | 15 ++++++++++----- + configure.ac | 9 ++------- + tests/Makefile.am | 9 ++++++--- + tests/test_microlzma.c | 12 ++++-------- + 4 files changed, 22 insertions(+), 23 deletions(-) -commit 8a53533869defa1191b41f176a0312cb53a139e2 +commit 651a1545c8b6150051a0b44857136efd419afc6f Author: Jia Tan -Date: 2023-02-06 21:35:06 +0800 +Date: 2024-03-09 09:20:57 +0800 - liblzma: Improve documentation in filter.h. + liblzma: Fix false Valgrind error report with GCC. - All functions now explicitly specify parameter and return values. - The notes and code annotations were moved before the parameter and - return value descriptions for consistency. + With GCC and a certain combination of flags, Valgrind will falsely + trigger an invalid write. This appears to be due to the omission of + instructions to properly save, set up, and restore the frame pointer. - Also, the description above lzma_filter_encoder_is_supported() about - not being able to list available filters was removed since - lzma_str_list_filters() will do this. + The IFUNC resolver is a leaf function since it only calls a function + that is inlined. So sometimes GCC omits the frame pointer instructions + in the resolver unless this optimization is explictly disabled. + + This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2267598. - src/liblzma/api/lzma/filter.h | 226 ++++++++++++++++++++++++++---------------- - 1 file changed, 143 insertions(+), 83 deletions(-) + src/liblzma/check/crc32_fast.c | 9 +++------ + src/liblzma/check/crc64_fast.c | 7 +++---- + src/liblzma/check/crc_common.h | 25 +++++++++++++++++++++++++ + 3 files changed, 31 insertions(+), 10 deletions(-) -commit 6d05b08b17ac8cb93165ee8f310fdd925b0b258f +commit 6e97b299f1b22e366ec42ba5dc5b9d0746e87b84 Author: Lasse Collin -Date: 2023-02-23 20:46:16 +0200 +Date: 2024-03-05 23:21:26 +0200 - Update THANKS. + liblzma: Fix a typo in a comment in the RISC-V filter. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/simple/riscv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit dfc9a54082e0fc7b3b796ea15336b5075acc79d5 -Author: Lasse Collin -Date: 2023-02-21 22:57:10 +0200 +commit 4e1c97052b5f14f4d6dda99d12cbbd01e66e3712 +Author: Jia Tan +Date: 2024-03-05 00:34:46 +0800 - liblzma: Avoid null pointer + 0 (undefined behavior in C). + liblzma: Use attribute no_profile_instrument_function with ifunc. - In the C99 and C17 standards, section 6.5.6 paragraph 8 means that - adding 0 to a null pointer is undefined behavior. As of writing, - "clang -fsanitize=undefined" (Clang 15) diagnoses this. However, - I'm not aware of any compiler that would take advantage of this - when optimizing (Clang 15 included). It's good to avoid this anyway - since compilers might some day infer that pointer arithmetic implies - that the pointer is not NULL. That is, the following foo() would then - unconditionally return 0, even for foo(NULL, 0): + Thanks to Sam James for determining this was the attribute needed to + workaround the GCC bug and for his version of the patch in Gentoo. + + src/liblzma/check/crc32_fast.c | 5 +++++ + src/liblzma/check/crc64_fast.c | 3 +++ + 2 files changed, 8 insertions(+) + +commit ed957d39426695e948b06de0ed952a2fbbe84bd1 +Author: Jia Tan +Date: 2024-03-05 00:27:31 +0800 + + Build: Require attribute no_profile_instrument_function for ifunc usage. - void bar(char *a, char *b); + Using __attribute__((__no_profile_instrument_function__)) on the ifunc + resolver works around a bug in GCC -fprofile-generate: + it adds profiling code even to ifunc resolvers which can make + the ifunc resolver crash at program startup. This attribute + was not introduced until GCC 7 and Clang 13, so ifunc won't + be used with prior versions of these compilers. - int foo(char *a, size_t n) - { - bar(a, a + n); - return a == NULL; - } + This bug was brought to our attention by: - In contrast to C, C++ explicitly allows null pointer + 0. So if - the above is compiled as C++ then there is no undefined behavior - in the foo(NULL, 0) call. + https://bugs.gentoo.org/925415 - To me it seems that changing the C standard would be the sane - thing to do (just add one sentence) as it would ensure that a huge - amount of old code won't break in the future. Based on web searches - it seems that a large number of codebases (where null pointer + 0 - occurs) are being fixed instead to be future-proof in case compilers - will some day optimize based on it (like making the above foo(NULL, 0) - return 0) which in the worst case will cause security bugs. + And was reported to upstream GCC by: - Some projects don't plan to change it. For example, gnulib and thus - many GNU tools currently require that null pointer + 0 is defined: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11411 + + CMakeLists.txt | 7 +++++++ + configure.ac | 7 +++++++ + 2 files changed, 14 insertions(+) + +commit e98ddaf85a1a8fb3cc863637f83356cc9db31e13 +Author: Lasse Collin +Date: 2024-03-04 19:23:18 +0200 + + liblzma: Fix a comment in the RISC-V filter. + + src/liblzma/simple/riscv.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 319cec142f67fe294e0486402f1569f223d9a83d +Author: Lasse Collin +Date: 2024-02-29 16:35:52 +0200 + + CMake: Warn if translated man pages are missing. + + CMakeLists.txt | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 46c3e113d8eeb1a731a60829fa7f5d1b519f7f26 +Author: Lasse Collin +Date: 2024-02-29 16:35:52 +0200 + + CMake: Warn if gettext tools and pre-created .gmo files are missing. - https://lists.gnu.org/archive/html/bug-gnulib/2021-11/msg00000.html + It's only done with CMake >= 3.20 and if library support + for translation was already found. - https://www.gnu.org/software/gnulib/manual/html_node/Other-portability-assumptions.html + Sort of fixes: https://github.com/tukaani-project/xz/issues/82 + + CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +commit 86bec8334bb1dcb6d9293a11cdccd895b17f364b +Author: Lasse Collin +Date: 2024-02-28 18:26:25 +0200 + + xz: Add comments. + + src/xz/coder.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 5c91b454c24e043ca8f2cc7d2b09bd091dafe655 +Author: Jia Tan +Date: 2024-02-27 23:42:41 +0800 + + xz: Change logging level for thread reduction to highest verbosity only. - In XZ Utils null pointer + 0 issue should be fixed after this - commit. This adds a few if-statements and thus branches to avoid - null pointer + 0. These check for size > 0 instead of ptr != NULL - because this way bugs where size > 0 && ptr == NULL will likely - get caught quickly. None of them are in hot spots so it shouldn't - matter for performance. + Now that multi threaded encoding is the default, users do not need to + see a warning message everytime the number of threads is reduced. On + some machines, this could happen very often. It is not unreasonable for + users to need to set double verbose mode to see this kind of + information. - A little less readable version would be replacing + To see these warning messages -vv or --verbose --verbose must be passed + to set xz into the highest possible verbosity mode. - ptr + offset + These warnings had caused automated testing frameworks to fail when they + expected no output to stderr. - with + Thanks to Sebastian Andrzej Siewior for reporting this and for the + initial version of the patch. + + src/xz/coder.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d0e57b2f159f8fd03a9a89f2f593a768d0487898 +Author: Lasse Collin +Date: 2024-02-26 23:06:13 +0200 + + Fix sorting in THANKS. + + THANKS | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d416be55ac02af1144fed455fb18b710147bb490 +Author: Jia Tan +Date: 2024-02-26 23:39:29 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit f06b33edd2aeabdb11836a2bf0b681768dad29d3 +Author: Chien Wong +Date: 2024-02-25 21:38:13 +0800 + + xz: Add missing RISC-V on the filter list in the man page - offset != 0 ? ptr + offset : ptr + Signed-off-by: Chien Wong + + src/xz/xz.1 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit a100f9111c8cc7f5b5f0e4a5e8af3de7161c7975 +Author: Jia Tan +Date: 2024-02-26 23:02:06 +0800 + + Build: Fix Linux Landlock feature test in Autotools and CMake builds. - or creating a macro for it: + The previous Linux Landlock feature test assumed that having the + linux/landlock.h header file was enough. The new feature tests also + requires that prctl() and the required Landlock system calls are + supported. + + CMakeLists.txt | 25 ++++++++++++++++++++++--- + configure.ac | 27 ++++++++++++++++++++++++++- + src/xz/sandbox.c | 2 +- + src/xz/sandbox.h | 2 +- + src/xzdec/xzdec.c | 8 ++++---- + 5 files changed, 54 insertions(+), 10 deletions(-) + +commit d85efdc8911e6e8964ec920af44c8a6fe0a4c3c2 +Author: Jia Tan +Date: 2024-02-26 20:06:10 +0800 + + Tests: Add test_microlzma to .gitignore and CMakeLists.txt. + + .gitignore | 1 + + CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) + +commit 42ee4256739779005a7f921946c8a8e483d1f2ed +Author: Jia Tan +Date: 2024-02-26 19:56:25 +0800 + + Tests: Correct license header in test_microlzma.c. + + tests/test_microlzma.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit c83349dfd9cf9c495005b6d30e2fd34a9cafc18a +Author: Jia Tan +Date: 2024-02-25 21:41:55 +0800 + + Fix typos in NEWS and CMakeLists. + + CMakeLists.txt | 2 +- + NEWS | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 2d7d862e3ffa8cec4fd3fdffcd84e984a17aa429 +Author: Jia Tan +Date: 2024-02-24 15:55:08 +0800 + + Bump version and soname for 5.6.0. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 6 +++--- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +commit a18fb1edef0d0aac12a09eed05e9c448c777af7b +Author: Jia Tan +Date: 2024-02-24 15:50:36 +0800 + + Add NEWS for 5.6.0. + + NEWS | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 143 insertions(+) + +commit 24355c5280bc95e3d594432d60bb8432aa6af173 +Author: Jia Tan +Date: 2024-02-22 22:27:01 +0800 + + Translations: Remove obsolete and fuzzy matches from some translations. - #define my_ptr_add(ptr, offset) \ - ((offset) != 0 ? ((ptr) + (offset)) : (ptr)) + The French and Brazilian Portuguese man page translations have not been + updated since the switch from public domain to 0BSD. The old GPLv2 + strings have now been removed from these files. + + po4a/fr.po | 4702 +++++++++++++++++++++++++++++++++++++---------------- + po4a/pt_BR.po | 4987 ++++++++++++++++++++++++++++++++++++++++----------------- + 2 files changed, 6832 insertions(+), 2857 deletions(-) + +commit 02ca4a7d7b703e2ec63e00b70feec825e919dbc1 +Author: Jia Tan +Date: 2024-02-21 00:31:54 +0800 + + Translations: Patch man pages to avoid fuzzy matches. - Checking for offset != 0 instead of ptr != NULL allows GCC >= 8.1, - Clang >= 7, and Clang-based ICX to optimize it to the very same code - as ptr + offset. That is, it won't create a branch. So for hot code - this could be a good solution to avoid null pointer + 0. Unfortunately - other compilers like ICC 2021 or MSVC 19.33 (VS2022) will create a - branch from my_ptr_add(). + This will be fixed in the next round of translations, but this avoids + having a fuzzy match or not fixing the English version. + + po4a/de.po | 2 +- + po4a/ko.po | 2 +- + po4a/ro.po | 2 +- + po4a/uk.po | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +commit 898aad9fc711e03452d24d9e2c5b7f77a6f9ce64 +Author: Jia Tan +Date: 2024-02-21 00:30:43 +0800 + + xzmore: Fix typo in xzmore.1. - Thanks to Marcin Kowalczyk for reporting the problem: - https://github.com/tukaani-project/xz/issues/36 + Thanks to Yuri Chornoivan. - src/liblzma/common/block_decoder.c | 5 ++++- - src/liblzma/common/block_encoder.c | 7 +++++-- - src/liblzma/common/common.c | 20 ++++++++++++++------ - src/liblzma/common/index_decoder.c | 13 ++++++++++--- - src/liblzma/common/index_encoder.c | 11 +++++++++-- - src/liblzma/common/index_hash.c | 13 ++++++++++--- - src/liblzma/common/lzip_decoder.c | 6 +++++- - src/liblzma/delta/delta_decoder.c | 7 ++++++- - src/liblzma/delta/delta_encoder.c | 12 ++++++++++-- - src/liblzma/simple/simple_coder.c | 6 ++++-- - 10 files changed, 77 insertions(+), 23 deletions(-) + src/scripts/xzmore.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f6dce49cb656b358e2fb2a3032e35e20af34dc84 +commit 5631aa206c8d16b4eeab85a46b8b698f4fc4cdba Author: Jia Tan -Date: 2023-02-07 00:00:44 +0800 +Date: 2024-02-24 12:12:16 +0800 - liblzma: Adjust container.h for consistency with filter.h. + Translations: Update the Vietnamese translation. - src/liblzma/api/lzma/container.h | 20 +++++++++----------- - 1 file changed, 9 insertions(+), 11 deletions(-) + po/vi.po | 505 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 309 insertions(+), 196 deletions(-) -commit 173d240bb4763aedc8c01df4d9c83e311d954c33 +commit a65fd7ce9d6228e87faf61dc56a35984d0088248 Author: Jia Tan -Date: 2023-02-07 00:00:09 +0800 +Date: 2024-02-24 12:06:40 +0800 - liblzma: Fix small typos and reword a few things in filter.h. + Translations: Update the Esperanto translation. - src/liblzma/api/lzma/container.h | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) + po/eo.po | 502 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 306 insertions(+), 196 deletions(-) -commit 17797bacde3f7264048ef0976c137a600148d6cf +commit cf44e4b7f5dfdbf8c78aef377c10f71e274f63c0 Author: Jia Tan -Date: 2023-02-06 23:42:08 +0800 +Date: 2024-02-23 23:09:59 +0800 - liblzma: Convert list of flags in lzma_mt to bulleted list. + Tests: Add a few test files. - src/liblzma/api/lzma/container.h | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + tests/files/README | 19 +++++++++++++++++++ + tests/files/bad-3-corrupt_lzma2.xz | Bin 0 -> 484 bytes + tests/files/bad-dict_size.lzma | Bin 0 -> 41 bytes + tests/files/good-2cat.xz | Bin 0 -> 136 bytes + tests/files/good-large_compressed.lzma | Bin 0 -> 35430 bytes + tests/files/good-small_compressed.lzma | Bin 0 -> 258 bytes + 6 files changed, 19 insertions(+) -commit 37da0e727161b401b8bfd8dccf163a4b2fc0460b +commit 39f4a1a86ad80b2d064b812cee42668e6c8b8c73 Author: Jia Tan -Date: 2023-01-26 23:17:41 +0800 +Date: 2024-02-23 20:58:36 +0800 - liblzma: Fix typo in documentation in container.h - - lzma_microlzma_decoder -> lzma_microlzma_encoder + Tests: Add MicroLZMA test. - src/liblzma/api/lzma/container.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/Makefile.am | 4 +- + tests/test_microlzma.c | 548 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 551 insertions(+), 1 deletion(-) -commit b8331077c626e6bf14f4671d09b561146eaf816a +commit adaacafde6661496ca2814b1e94a3ba5186428cb Author: Jia Tan -Date: 2023-01-26 23:16:34 +0800 +Date: 2024-02-23 20:57:59 +0800 - liblzma: Improve documentation for container.h + Build: Define HAVE_MICROLZMA when it is configured. + + CMakeLists.txt | 4 ++++ + configure.ac | 9 +++++++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +commit eea78216d27182ca917bf00e02feaab058a4d21e +Author: Jia Tan +Date: 2024-02-23 20:27:15 +0800 + + xz: Fix Capsicum sandbox compile error. - Standardizing each function to always specify parameters and return - values. Also moved the parameters and return values to the end of each - function description. + user_abort_pipe[] was still being used instead of the parameters. - src/liblzma/api/lzma/container.h | 146 +++++++++++++++++++++++++-------------- - 1 file changed, 93 insertions(+), 53 deletions(-) + src/xz/sandbox.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit b9a3511bb61d3b6ce49abd33dce6155a573f5272 +commit 32b0a3ce19224f9074d01a4ffbc1655b05fcb82d Author: Jia Tan -Date: 2023-02-22 20:59:41 +0800 +Date: 2024-02-23 16:12:32 +0800 - CMake: Add LZIP decoder test to list of tests. + Build: Fix ARM64 CRC32 instruction feature test. + + Old versions of Clang reported the unsupported function attribute and + __crc32d() function as warnings instead of errors, so the feature test + passed when it shouldn't have, causing a compile error at build time. + -Werror was added to this feature test to fix this. The change is not + needed for CMake because check_c_source_compiles() also performs + linking and the error is caught then. + + Thanks to Sebastian Andrzej Siewior for reporting this. - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit cd82ef2fb48b174c57cd03b84a9a0f978772cb89 +commit 4c81c9611f8b2e1ad65eb7fa166afc570c58607e Author: Lasse Collin -Date: 2023-02-17 20:56:49 +0200 +Date: 2024-02-22 19:16:35 +0200 - Update THANKS. + CMake: Add LOCALEDIR to the windres workaround. + + LOCALEDIR may contain spaces like in "C:\Program Files". - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) -commit 076e911ba25cadf2cbdfbd0f65991a002e210c0b +commit de4337fd89ca7db5feb97b5c40143404f6e22986 Author: Lasse Collin -Date: 2023-02-17 20:48:28 +0200 +Date: 2024-02-22 15:18:25 +0200 - Build: Use only the generic symbol versioning on MicroBlaze. + xz: Landlock: Fix error message if input file is a directory. - On MicroBlaze, GCC 12 is broken in sense that - __has_attribute(__symver__) returns true but it still doesn't - support the __symver__ attribute even though the platform is ELF - and symbol versioning is supported if using the traditional - __asm__(".symver ...") method. Avoiding the traditional method is - good because it breaks LTO (-flto) builds with GCC. + If xz is given a directory, it should look like this: - See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 + $ xz /usr/bin + xz: /usr/bin: Is a directory, skipping - For now the only extra symbols in liblzma_linux.map are the - compatibility symbols with the patch that spread from RHEL/CentOS 7. - These require the use of __symver__ attribute or __asm__(".symver ...") - in the C code. Compatibility with the patch from CentOS 7 doesn't - seem valuable on MicroBlaze so use liblzma_generic.map on MicroBlaze - instead. It doesn't require anything special in the C code and thus - no LTO issues either. + The Landlock rules didn't allow opening directories for reading: - An alternative would be to detect support for __symver__ - attribute in configure.ac and CMakeLists.txt and fall back - to __asm__(".symver ...") but then LTO would be silently broken - on MicroBlaze. It sounds likely that MicroBlaze is a special - case so let's treat it as a such because that is simpler. If - a similar issue exists on some other platform too then hopefully - someone will report it and this can be reconsidered. + $ xz /usr/bin + xz: /usr/bin: Permission denied - (This doesn't do the same fix in CMakeLists.txt. Perhaps it should - but perhaps CMake build of liblzma doesn't matter much on MicroBlaze. - The problem breaks the build so it's easy to notice and can be fixed - later.) + The simplest fix was to allow opening directories for reading. + While it's a bit silly to allow it solely for the error message, + it shouldn't make the sandbox significantly weaker. - Thanks to Vincent Fazio for reporting the problem and proposing - a patch (in the end that solution wasn't used): - https://github.com/tukaani-project/xz/pull/32 + The single-file use case (like when called from GNU tar) is + still as strict as possible: all Landlock restrictions are + enabled before (de)compression starts. - configure.ac | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + src/xz/sandbox.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) -commit bc34e5ac9996667d2c1ec9a7895ec5931ac4caea +commit 120da10ae139ea52ca4275452adf8eda02d07cc8 Author: Lasse Collin -Date: 2023-02-16 21:09:00 +0200 +Date: 2024-02-22 14:41:29 +0200 - liblzma: Very minor API doc tweaks. + liblzma: Disable branchless C version in range decoder. - Use "member" to refer to struct members as that's the term used - by the C standard. + Thanks to Sebastian Andrzej Siewior and Sam James for + benchmarking on various systems. + + src/liblzma/rangecoder/range_decoder.h | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +commit 00440f52be9ac2c7438c7b0cb1082f12399632c6 +Author: Lasse Collin +Date: 2024-02-21 17:41:32 +0200 + + INSTALL: Clarify that --disable-assembler affects only 32-bit x86. + + INSTALL | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit 11405be84ea294497e12d03d7219f607063f4a00 +Author: Lasse Collin +Date: 2024-02-19 18:41:37 +0200 + + Windows: build.bash: Include COPYING.0BSD in the package. + + windows/build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c27cf64e3e27f4968431d65be7098a12a3a80d30 +Author: Lasse Collin +Date: 2024-02-18 17:59:46 +0200 + + Windows: build.bash: include liblzma-crt-mixing.txt in the package. + + windows/build.bash | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 8d38941baed05de4ff7cc775de14833108f62184 +Author: Lasse Collin +Date: 2024-02-18 17:17:43 +0200 + + Windows: Major update to Windows build instructions. + + INSTALL | 68 ++++----- + windows/INSTALL-MSVC.txt | 23 +-- + windows/INSTALL-MinGW-w64_with_Autotools.txt | 49 +++++++ + windows/INSTALL-MinGW-w64_with_CMake.txt | 203 +++++++++++++++++++++++++++ + windows/INSTALL-MinGW.txt | 138 ------------------ + windows/README-Windows.txt | 2 + + windows/build-with-cmake.bat | 35 +++++ + windows/liblzma-crt-mixing.txt | 70 +++++++++ + 8 files changed, 404 insertions(+), 184 deletions(-) + +commit 4b5b0d352348ff510ffb50a3b5b71788857d37a1 +Author: Lasse Collin +Date: 2024-02-18 15:15:04 +0200 + + Windows: Update windows/README-Windows.txt. - Use lzma_options_delta.dist and such in docs so that in Doxygen's - HTML output they will link to the doc of the struct member. + It's for binary packages built with windows/build.bash. + + windows/README-Windows.txt | 104 ++++++++++++++++++--------------------------- + 1 file changed, 41 insertions(+), 63 deletions(-) + +commit 1ee716f74085223c8fbcae1d5a384e6bf53c0f6a +Author: Lasse Collin +Date: 2024-02-18 15:15:04 +0200 + + Windows: Update windows/build.bash. - Clean up a few trailing white spaces too. + Support for the old MinGW was dropped. Only MinGW-w64 with GCC + is supported now. + + The script now supports also cross-compilation from GNU/Linux + (tests are not run). MSYS2 and also the old MSYS 1.0.11 work + for building on Windows. The i686 and x86_64 toolchains must + be in PATH to build both 32-bit and 64-bit versions. + + Parallel builds are done if "nproc" from GNU coreutils is available. + + MinGW-w64 runtime copyright information file was renamed from + COPYING-Windows.txt to COPYING.MinGW-w64-runtime.txt which + is the filename used by MinGW-w64 itself. Its existence + is now mandatory, it's checked at the beginning of the script. + + The file TODO is no longer copied to the package. - src/liblzma/api/lzma/block.h | 6 +++--- - src/liblzma/api/lzma/delta.h | 6 +++--- - src/liblzma/api/lzma/index.h | 10 +++++----- - src/liblzma/api/lzma/stream_flags.h | 6 +++--- - 4 files changed, 14 insertions(+), 14 deletions(-) + windows/build.bash | 191 +++++++++++++++++++++++++++++++---------------------- + 1 file changed, 112 insertions(+), 79 deletions(-) -commit d31fbd28be5b79eb682db50004b0fb7aad5299ec +commit 60462e42609a1d961868a1d1ebecc713c6d27e2e Author: Jia Tan -Date: 2023-02-17 00:54:33 +0800 +Date: 2024-02-20 23:32:22 +0800 - liblzma: Adjust spacing in doc headers in bcj.h. + Translations: Update the Romanian man page translations. - src/liblzma/api/lzma/bcj.h | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) + po4a/ro.po | 1715 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 875 insertions(+), 840 deletions(-) -commit 701e9be6bede19771895f756082db0c017f86f07 +commit 10d733e5b8929c642e00891cfa9ead9c2cdd2e05 Author: Jia Tan -Date: 2023-02-17 00:44:44 +0800 +Date: 2024-02-20 23:30:25 +0800 - liblzma: Adjust documentation in bcj.h for consistent style. + Translations: Update the Korean man page translations. - src/liblzma/api/lzma/bcj.h | 43 ++++++++++++++++++++++--------------------- - 1 file changed, 22 insertions(+), 21 deletions(-) + po4a/ko.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 762c4d0b62d2694cf3a01e030fdfe68e09e7b503 +commit 797a34b72ac6baff237d7a546fa941d8f78f2f62 Author: Jia Tan -Date: 2023-02-17 00:36:05 +0800 +Date: 2024-02-20 21:03:53 +0800 - liblzma: Rename field => member in documentation. - - Also adjusted preset value => preset level. + Translations: Update the Spanish translation. - src/liblzma/api/lzma/base.h | 18 +++++++-------- - src/liblzma/api/lzma/block.h | 44 ++++++++++++++++++------------------- - src/liblzma/api/lzma/container.h | 26 +++++++++++----------- - src/liblzma/api/lzma/delta.h | 12 +++++----- - src/liblzma/api/lzma/index.h | 30 ++++++++++++------------- - src/liblzma/api/lzma/lzma12.h | 28 +++++++++++------------ - src/liblzma/api/lzma/stream_flags.h | 32 +++++++++++++-------------- - 7 files changed, 95 insertions(+), 95 deletions(-) + po/es.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 5c3751d019f023e091df9a653e2bb1f6ea8b0d49 +Author: Jia Tan +Date: 2024-02-20 20:18:07 +0800 + + Translations: Update the Romanian translation. + + po/ro.po | 470 ++++++++++++++++++++++++++++++--------------------------------- + 1 file changed, 227 insertions(+), 243 deletions(-) + +commit e2d31154ecc750935436e8b62c6b073b2cfa84e3 +Author: Jia Tan +Date: 2024-02-20 20:15:50 +0800 + + Translations: Update the Croatian translation. + + po/hr.po | 648 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 355 insertions(+), 293 deletions(-) + +commit 704500f994d5ac271bfcfd592275c5a7da4dc8d2 +Author: Jia Tan +Date: 2024-02-20 20:05:44 +0800 + + Translations: Update the German man page translations. + + po4a/de.po | 1696 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 873 insertions(+), 823 deletions(-) + +commit 1cfd3dca3fef321b06db73c3c9e13f347c2e2f5f +Author: Jia Tan +Date: 2024-02-20 19:58:25 +0800 + + Translations: Update the German translation. + + po/de.po | 427 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 225 insertions(+), 202 deletions(-) + +commit 28b9b3f16cc7c6e5b42e691994569c17f4561c9a +Author: Jia Tan +Date: 2024-02-20 19:56:52 +0800 + + Translations: Update the Hungarian translation. -commit 0ce1db0223854d94b4a0d17737ac0486a75d9e6a + po/hu.po | 556 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 338 insertions(+), 218 deletions(-) + +commit 00b06cd0af6ad2ee93d3006bf80417db060c2b04 Author: Lasse Collin -Date: 2023-02-16 17:59:50 +0200 +Date: 2024-02-19 16:48:05 +0200 - liblzma: Silence a warning from MSVC. + CMake: Fix building of lzmainfo when translations are enabled. + + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit b0d1422b6037bfea6f6723683bd82a8e6d77026c +Author: Lasse Collin +Date: 2024-02-19 13:38:42 +0200 + + CMake: Don't assume that -fvisibility=hidden is supported outside Windows. - It gives C4146 here since unary minus with unsigned integer - is still unsigned (which is the intention here). Doing it - with substraction makes it clearer and avoids the warning. + The original code was good enough for supporting GNU/Linux + and a few others but it wasn't very portable. - Thanks to Nathan Moinvaziri for reporting this. + CMake doesn't support Solaris Studio's -xldscope=hidden. + If it ever does, things should still work with this commit + as Solaris Studio supports not only its own __global but also + the GNU C __attribute__((visibility("default"))). Support for the + attribute was added in 2007 to Sun Studio 12 compiler version 5.9. - src/liblzma/check/crc64_fast.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 26 ++++++++++++++++++++++---- + 1 file changed, 22 insertions(+), 4 deletions(-) -commit d83da006b3e8dbad9112e6cde6b27049d193c9ec -Author: Jia Tan -Date: 2023-02-16 21:04:54 +0800 +commit 2ced9d34bef4dce52ecbbf84d0903ab0aae1442c +Author: Lasse Collin +Date: 2024-02-19 12:20:59 +0200 - liblzma: Improve documentation for stream_flags.h + CMake: Revise the component splitting. + + CMakeLists.txt | 57 +++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 31 insertions(+), 26 deletions(-) + +commit 426bdc709c169d39b31dec410016779de117ef69 +Author: Lasse Collin +Date: 2024-02-17 21:45:07 +0200 + + CMake: Update the main comment and document CMAKE_BUILD_TYPE=Release. + + CMakeLists.txt | 79 ++++++++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 63 insertions(+), 16 deletions(-) + +commit 4430e075f7ccfc47972d6ca0aa1c3779fc265e10 +Author: Lasse Collin +Date: 2024-02-17 21:27:48 +0200 + + CMake: Use -O2 instead of -O3 in CMAKE_BUILD_TYPE=Release. - Standardizing each function to always specify parameters and return - values. Also moved the parameters and return values to the end of each - function description. + -O3 doesn't seem useful for speed but it makes the code bigger. + CMake makes is difficult for users to simply override the + optimization level: CFLAGS / CMAKE_C_FLAGS aren't helpful because + they go before CMAKE_C_FLAGS_RELEASE. Of course, users can override + CMAKE_C_FLAGS_RELEASE directly but then they have to remember to + add also -DNDEBUG to disable assertions. - A few small things were reworded and long sentences broken up. + This commit changes -O3 to -O2 in CMAKE_C_FLAGS_RELEASE if and only if + CMAKE_C_FLAGS_RELEASE cache variable doesn't already exist. So if + a custom value is passed on the command line (or reconfiguring an + already-configured build), the cache variable won't be modified. - src/liblzma/api/lzma/stream_flags.h | 76 ++++++++++++++++++++++--------------- - 1 file changed, 46 insertions(+), 30 deletions(-) + CMakeLists.txt | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) -commit 2796bb4736f645d34939b5d62d5958f534e41e69 -Author: Jia Tan -Date: 2023-02-14 21:50:16 +0800 +commit 025eb6d7879e4c4e8cb29716b371e0f4c1aea660 +Author: Lasse Collin +Date: 2024-02-18 14:59:52 +0200 - liblzma: Improve documentation in lzma12.h. + CMake: Handle symbol versioning on MicroBlaze specially. - All functions now explicitly specify parameter and return values. + This is to match configure.ac. - src/liblzma/api/lzma/lzma12.h | 32 +++++++++++++++++++++++--------- - 1 file changed, 23 insertions(+), 9 deletions(-) + CMakeLists.txt | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) -commit ebebaa8d9381afea440eb1b01917117551adf68f -Author: Jia Tan -Date: 2023-01-27 22:44:06 +0800 +commit 2edd1a35b2507d1ce68b52dbaebe23c4850a74ce +Author: Lasse Collin +Date: 2024-02-17 22:18:12 +0200 - liblzma: Improve documentation in check.h. + CMake: Keep build working even if lib/*.[ch] are removed. + + CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit d753e2ce4715552884afadc4ed6fbf8ccca6efac +Author: Lasse Collin +Date: 2024-02-17 18:10:40 +0200 + + CMake: Install documentation. + + CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +commit 7a0405bea9cb0df9318b70f779f82b2c473e98ac +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Bump maximum policy version to 3.28. - All functions now explicitly specify parameter and return values. - Also moved the note about SHA-256 functions not being exported to the - top of the file. + CMP0154 doesn't affect us since we don't use FILE_SET. - src/liblzma/api/lzma/check.h | 41 ++++++++++++++++++++++++++++------------- - 1 file changed, 28 insertions(+), 13 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 765fa2865aab97ea713c1715922e322b3cf599a7 -Author: Jia Tan -Date: 2023-02-08 21:33:52 +0800 +commit c2264ffbe3892d28930b89b0123efc369cabc143 +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Build lzmainfo. + + CMakeLists.txt | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 54 insertions(+) + +commit 998d0b29536094a89cf385a3b894e157db1ccefe +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Build lzmadec. + + CMakeLists.txt | 76 ++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 42 insertions(+), 34 deletions(-) + +commit 74e8bc7417a0f37ca7ed5ee0127d33c69b3100b9 +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Add test_scripts.sh to the tests. + + In contrast to Automake, skipping of this test when decoders + are disabled is handled at CMake side instead of test_scripts.sh + because CMake-build doesn't create config.h. + + CMakeLists.txt | 14 ++++++++++++++ + tests/test_scripts.sh | 13 ++++++++----- + 2 files changed, 22 insertions(+), 5 deletions(-) + +commit 4808f238a731befcd46c2117c62a1caaf4403989 +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 - liblzma: Improve documentation in index.h + CMake: Install scripts. - All functions now explicitly specify parameter and return values. + Compared to the Autotools-based build, this has simpler handling + for the shell (@POSIX_SHELL@) and extra PATH entry for the scripts + (configure has --enable-path-for-scripts=PREFIX). The simpler + metho should be enough for non-ancient systems and Solaris. - src/liblzma/api/lzma/index.h | 177 ++++++++++++++++++++++++++++++------------- - 1 file changed, 126 insertions(+), 51 deletions(-) + CMakeLists.txt | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 82 insertions(+), 1 deletion(-) -commit 918e208af5960728b6def01e692b395f7d8e3701 -Author: Jia Tan -Date: 2023-02-08 20:35:32 +0800 +commit 3462362ebd94d835c664e94ad8f414cfe7590ca7 +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 - liblzma: Reword a comment in index.h. + Scripts: Use @PACKAGE_VERSION@ instead of @VERSION@. + + PACKAGE_VERSION was already used in liblzma.pc.in. + This way only one version @foo@ is used. - src/liblzma/api/lzma/index.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/scripts/xzdiff.in | 2 +- + src/scripts/xzgrep.in | 2 +- + src/scripts/xzless.in | 2 +- + src/scripts/xzmore.in | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) -commit 1f157d214bc09338876d2467b549935679abc0bf -Author: Jia Tan -Date: 2023-02-08 20:30:23 +0800 +commit 67610c245ba6c68cf65991693bab9312b7dc987b +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 - liblzma: Omit lzma_index_iter's internal field from Doxygen docs. + CMake: Simplify symlink creation and install translated man pages. - Add \private above this field and its sub-fields since it is not meant - to be modified by users. + It helps that cmake_install.cmake doesn't parallelize installation + so symlinks can be created so that the target is always known to + exist (a requirement on Windows in some cases). + + This bumps the minimum CMake version from 3.13 to 3.14 to use + file(CREATE_LINK ...). It could be made to work on 3.13 by + calling "cmake -E create_symlink" but it's uglier code and + slower in "make install". 3.14 should be a reasonable version + to require nowadays, especially since the Autotools build + is still the primary build system for most OSes. - src/liblzma/api/lzma/index.h | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) + CMakeLists.txt | 195 +++++++++++++++++++++++++++++---------------------------- + 1 file changed, 98 insertions(+), 97 deletions(-) -commit 28757fa46d8e0f0a9c17628b2b6af9bcb3cd96fc -Author: Jia Tan -Date: 2023-01-21 21:32:03 +0800 +commit 50cc1d8a5a8154428bf240c7e4972e32b17d99bf +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 - liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR. + CMake: Add support for building and installing xz with translations. - LZMA_MEMLIMIT_ERROR was missing the "<" character needed to put - documentation after a member. + If gettext tools are available, the .po files listed in po/LINGUAS + are converted using msgfmt. This allows building with translations + directly from xz.git without Autotools. + + If gettext tools aren't available, the Autotools-created .gmo files + in the "po" directory will be used. This allows CMake-based build + to use translations from Autotools-generated tarball. + + If translation support is found (Intl_FOUND) but both the + gettext tools and the pre-generated .gmo files are missing, + then "make" will fail. - src/liblzma/api/lzma/base.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 66 insertions(+), 2 deletions(-) -commit 135d5a1a65a9e199b9a5550c1f788cf43cd81018 -Author: Jia Tan -Date: 2023-01-21 00:29:38 +0800 +commit 746c471643009947f94a3494a1148f74c7381b56 +Author: Lasse Collin +Date: 2024-02-19 11:58:33 +0200 - liblzma: Improve documentation for base.h. - - Standardizing each function to always specify params and return values. - Also fixed a small grammar mistake. + liblzma: Remove commented-out code. - src/liblzma/api/lzma/base.h | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) + src/liblzma/rangecoder/range_decoder.h | 3 --- + 1 file changed, 3 deletions(-) -commit 2287d5668384e289d51e72724997dc920483768e -Author: Jia Tan -Date: 2023-02-14 00:08:33 +0800 +commit 4ce300ce0884c6e552de2af9ae8050b47b01f0e7 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 - liblzma: Minor improvements to vli.h. + xz: Delete old commented-out code. + + src/xz/message.c | 19 ------------------- + 1 file changed, 19 deletions(-) + +commit cae9a5e0bf422e6c5e64180805904f7ed02dc3aa +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + xz: Use stricter pledge(2) and Landlock sandbox. - Added [out] annotations to parameters that are pointers and can have - their value changed. Also added a clarification to lzma_vli_is_valid. + This makes these sandboxing methods stricter when no files are + created or deleted. That is, it's a middle ground between the + initial sandbox and the strictest single-file-to-stdout sandbox: + this allows opening files for reading but output has to go to stdout. - src/liblzma/api/lzma/vli.h | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) + src/xz/main.c | 46 +++++++++++++++++++++++++++++++++------------- + src/xz/sandbox.c | 32 ++++++++++++++++++++++++++++++++ + src/xz/sandbox.h | 4 ++++ + 3 files changed, 69 insertions(+), 13 deletions(-) -commit 7124b8a16ae60cb2e93218ff531868eebd673bde -Author: Jia Tan -Date: 2023-02-10 21:38:02 +0800 +commit 02e3505991233901575b7eabc06b2c6c62a96899 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 - liblzma: Add comments for macros in delta.h. + xz: Support Landlock ABI version 4. - Document LZMA_DELTA_DIST_MIN and LZMA_DELTA_DIST_MAX for completeness - and to avoid Doxygen warnings. + Linux 6.7 added support for ABI version 4 which restricts + TCP connections which xz won't need and thus those can be + forbidden now. Since the ABI version is handled at runtime, + supporting version 4 won't cause any compatibility issues. + + Note that new enough kernel headers are required to get + version 4 support enabled at build time. - src/liblzma/api/lzma/delta.h | 8 ++++++++ - 1 file changed, 8 insertions(+) + src/xz/sandbox.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) -commit 59c7bb8931159fdb1a31bbbeaed0e6984e2d3c81 -Author: Jia Tan -Date: 2023-02-10 21:35:23 +0800 +commit 374868d81d473ab56556a1cfd6b1b36a1fab348b +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 - liblzma: Improve documentation in index_hash.h. + xz: Move sandboxing code to sandbox.c and improve Landlock sandbox. - All functions now explicitly specify parameter and return values. - Also reworded the description of lzma_index_hash_init() for readability. + Landlock is now always used just like pledge(2) is: first in more + permissive mode and later (under certain common conditions) in + a strict mode that doesn't allow opening more files. + + I put pledge(2) first in sandbox.c because it's the simplest API + to use and still somewhat fine-grained for basic applications. + So it's the simplest thing to understand for anyone reading sandbox.c. - src/liblzma/api/lzma/index_hash.h | 36 +++++++++++++++++++++++++++--------- - 1 file changed, 27 insertions(+), 9 deletions(-) + CMakeLists.txt | 2 + + src/xz/Makefile.am | 2 + + src/xz/file_io.c | 170 +----------------------------- + src/xz/file_io.h | 6 -- + src/xz/main.c | 50 +++------ + src/xz/private.h | 6 +- + src/xz/sandbox.c | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/xz/sandbox.h | 39 +++++++ + 8 files changed, 357 insertions(+), 213 deletions(-) -commit e970c28ac3cb2e8051925f81db2fe953664c2645 -Author: Jia Tan -Date: 2023-02-03 00:33:32 +0800 +commit 7312dfbb02197c7f990c7a3cefd027a9387d1473 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 - liblzma: Fix bug in lzma_str_from_filters() not checking filters[] length. + xz: Tweak comments. + + src/xz/main.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit c701a5909ad9882469fbab4fab5d2d5556d3ba78 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + xz: Fix message_init() description. - The bug is only a problem in applications that do not properly terminate - the filters[] array with LZMA_VLI_UNKNOWN or have more than - LZMA_FILTERS_MAX filters. This bug does not affect xz. + Also explicitly initialize progress_automatic to make it clear + that it can be read before message_init() sets it. Static variable + was initialized to false by default already so this is only for + clarity. - src/liblzma/common/string_conversion.c | 7 +++++++ - 1 file changed, 7 insertions(+) + src/xz/main.c | 3 ++- + src/xz/message.c | 2 +- + src/xz/message.h | 5 ++++- + 3 files changed, 7 insertions(+), 3 deletions(-) -commit 85e01266a96689448abb249da6c6abc3afcd4a4e -Author: Jia Tan -Date: 2023-02-03 00:32:47 +0800 +commit 9466306719f3b76e92fac4e55fbfd89ec92295fa +Author: Lasse Collin +Date: 2024-02-17 19:35:47 +0200 - Tests: Create test_filter_str.c. + Build: Makefile.am: Sort EXTRA_DIST. - Tests lzma_str_to_filters(), lzma_str_from_filters(), and - lzma_str_list_filters() API functions. + Dirs first, then files in case-sensitive ASCII order. - CMakeLists.txt | 1 + - tests/Makefile.am | 2 + - tests/test_filter_str.c | 593 ++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 596 insertions(+) + Makefile.am | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) -commit 3fa0f3ba12dd3383f62dbfa18a864f9b4217fa0a -Author: Jia Tan -Date: 2023-01-22 08:49:00 +0800 +commit f3440e78c9517db75bfa52e1a378fad60b073bbe +Author: Lasse Collin +Date: 2024-02-17 19:25:05 +0200 - liblzma: Fix typos in comments in string_conversion.c. + Build: Don't install TODO. - src/liblzma/common/string_conversion.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 32dbe045d74e94f75c53236fa2a6c0454d7b6d9e +commit a7a3b62e2ab03c82b2bd5c78da1d1fb8b8490381 Author: Jia Tan -Date: 2023-02-03 00:20:20 +0800 +Date: 2024-02-18 01:09:11 +0800 - liblzma: Clarify block encoder and decoder documentation. - - Added a few sentences to the description for lzma_block_encoder() and - lzma_block_decoder() to highlight that the Block Header must be coded - before calling these functions. + Translations: Update the Korean man page translations. - src/liblzma/api/lzma/block.h | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) + po4a/ko.po | 1707 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 871 insertions(+), 836 deletions(-) -commit ccf12acbfa7331b1bbb99ec55879186eb35f879f +commit 9b315db2d5e74700f3dc0755eb86c27947c0b393 Author: Jia Tan -Date: 2023-02-03 00:12:24 +0800 +Date: 2024-02-18 01:08:32 +0800 - Update lzma_block documentation for lzma_block_uncomp_encode(). + Translations: Update the Korean translation. - src/liblzma/api/lzma/block.h | 3 +++ - 1 file changed, 3 insertions(+) + po/ko.po | 423 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 223 insertions(+), 200 deletions(-) -commit 6a0b168dd9dc1ef437255c4bfdc6eff8b96fdb24 -Author: Jia Tan -Date: 2023-02-03 00:11:37 +0800 +commit 56246607dff177b0410d140fcca4a42c865723dc +Author: Lasse Collin +Date: 2024-02-17 16:23:14 +0200 - liblzma: Minor edits to lzma_block header_size documentation. + Build: Install translated lzmainfo man pages. + + All other translated man pages were being installed but + lzmainfo had been forgotten. - src/liblzma/api/lzma/block.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/lzmainfo/Makefile.am | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) -commit 84ce36f90e68471fec1f0e61cd93ac7ed9ab4883 -Author: Jia Tan -Date: 2023-02-03 00:11:07 +0800 +commit f1d6b88aefcced538403c5c2606ba57065b16e70 +Author: Lasse Collin +Date: 2024-02-17 16:01:32 +0200 - liblzma: Enumerate functions that read version in lzma_block. + liblzma: Avoid implementation-defined behavior in the RISC-V filter. + + GCC docs promise that it works and a few other compilers do + too. Clang/LLVM is documented source code only but unsurprisingly + it behaves the same as others on x86-64 at least. But the + certainly-portable way is good enough here so use that. - src/liblzma/api/lzma/block.h | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) + src/liblzma/simple/riscv.c | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) -commit d6620774682830d606f57109861b6763805b3492 -Author: Jia Tan -Date: 2023-02-03 00:10:34 +0800 +commit 843ddc5f617b91ae132d6bab0f2f2d9c9fcd214a +Author: Lasse Collin +Date: 2024-02-17 15:48:28 +0200 - liblzma: Clarify comment in block.h. + liblzma: Wrap a line exceeding 80 chars. - src/liblzma/api/lzma/block.h | 3 ++- + src/liblzma/rangecoder/range_decoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -commit 880adb5aa25f66a53d81c2f3acc716f7a4d373d1 -Author: Jia Tan -Date: 2023-02-03 00:07:23 +0800 +commit e9053c907250c70d98b319d95fa54cb94fc76869 +Author: Sebastian Andrzej Siewior +Date: 2024-02-16 21:50:15 +0100 - liblzma: Improve documentation for block.h. + liblzma/rangecoder: Exclude x32 from the x86-64 optimisation. - Standardizing each function to always specify params and return values. - Output pointer parameters are also marked with doxygen style [out] to - make it clear. Any note sections were also moved above the parameter and - return sections for consistency. + The x32 port has a x86-64 ABI in term of all registers but uses only + 32bit pointer like x86-32. The assembly optimisation fails to compile on + x32. Given the state of x32 I suggest to exclude it from the + optimisation rather than trying to fix it. + + Signed-off-by: Sebastian Andrzej Siewior - src/liblzma/api/lzma/block.h | 96 ++++++++++++++++++++++++++++++++++---------- - 1 file changed, 75 insertions(+), 21 deletions(-) + src/liblzma/rangecoder/range_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b5b1b1f061c342271e4977ce5cba604a19c0ca52 +commit 3d198fb13b87f8803442e5799d465f7434a70555 Author: Jia Tan -Date: 2023-02-01 23:38:30 +0800 +Date: 2024-02-17 21:05:07 +0800 - liblzma: Clarify a comment about LZMA_STR_NO_VALIDATION. - - The flag description for LZMA_STR_NO_VALIDATION was previously confusing - about the treatment for filters than cannot be used with .xz format - (lzma1) without using LZMA_STR_ALL_FILTERS. Now, it is clear that - LZMA_STR_NO_VALIDATION is not a super set of LZMA_STR_ALL_FILTERS. + Translations: Update the Spanish translation. - src/liblzma/api/lzma/filter.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + po/es.po | 427 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 226 insertions(+), 201 deletions(-) -commit e904e778b82b14f2779aab80d6c8f3c01a3fc54b +commit cf278bfe60a25b54b3786f06503bc61272970820 Author: Jia Tan -Date: 2023-01-27 20:14:51 +0800 +Date: 2024-02-17 20:43:29 +0800 - Translations: Add Brazilian Portuguese translation of man pages. - - Thanks to Rafael Fontenelle. + Translations: Update the Swedish translation. - po4a/po4a.conf | 2 +- - po4a/pt_BR.po | 3677 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 3678 insertions(+), 1 deletion(-) + po/sv.po | 434 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 230 insertions(+), 204 deletions(-) -commit e9c47e79c9584ba1126f5fa0dbe6c96e67411aa6 +commit b0f1a41be50560cc6cb528e8e96b02b2067c52c2 Author: Jia Tan -Date: 2023-01-24 20:48:50 +0800 +Date: 2024-02-17 20:41:38 +0800 - liblzma: Fix documentation in filter.h for lzma_str_to_filters() - - The previous documentation for lzma_str_to_filters() was technically - correct, but misleading. lzma_str_to_filters() returns NULL on success, - which is in practice always defined to 0. This is the same value as - LZMA_OK, but lzma_str_to_filters() does not return lzma_ret so we should - be more clear. + Translations: Update the Polish translation. - src/liblzma/api/lzma/filter.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/pl.po | 424 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 224 insertions(+), 200 deletions(-) -commit 99575947a58a60416c570eb78038d18a1ea4cef4 +commit d74ed48b30c631b6a4c7e7858b06828293bf8520 Author: Jia Tan -Date: 2023-01-07 21:55:06 +0800 +Date: 2024-02-17 20:41:02 +0800 - xz: Refactor duplicated check for custom suffix when using --format=raw + Translations: Update the Ukrainian translation. - src/xz/args.c | 8 ++++++++ - src/xz/suffix.c | 26 ++++++++------------------ - src/xz/suffix.h | 8 ++++++++ - 3 files changed, 24 insertions(+), 18 deletions(-) + po/uk.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 76dec92fcca4a9ccd2063ed6d5d9e3474665baad -Author: Jia Tan -Date: 2023-01-20 21:53:14 +0800 +commit 711e22d5c5f3bac39ac904efb3ede874a66e2045 +Author: Lasse Collin +Date: 2024-02-16 17:53:34 +0200 - liblzma: Set documentation on all reserved fields to private. - - This prevents the reserved fields from being part of the generated - Doxygen documentation. + Translations: Use the same sentence in xz.pot-header that the TP uses. - src/liblzma/api/lzma/base.h | 17 +++++++++++++++ - src/liblzma/api/lzma/block.h | 43 +++++++++++++++++++++++++++++++++++++ - src/liblzma/api/lzma/container.h | 24 +++++++++++++++++++++ - src/liblzma/api/lzma/delta.h | 12 +++++++++++ - src/liblzma/api/lzma/index.h | 27 +++++++++++++++++++++++ - src/liblzma/api/lzma/lzma12.h | 22 +++++++++++++++++++ - src/liblzma/api/lzma/stream_flags.h | 28 ++++++++++++++++++++++++ - 7 files changed, 173 insertions(+) + po/xz.pot-header | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit bd213d06ebf92cf42eeb97e7c578bddc857f8ea8 +commit fb5f6aaf18584672d0fee5dbe41fd30fc6bf5422 Author: Jia Tan -Date: 2022-12-21 23:59:43 +0800 +Date: 2024-02-16 22:53:46 +0800 - liblzma: Highlight liblzma API headers should not be included directly. - - This improves the generated Doxygen HTML files to better highlight - how to properly use the liblzma API header files. + Fix typos discovered by codespell. - src/liblzma/api/lzma/base.h | 5 +++-- - src/liblzma/api/lzma/bcj.h | 5 +++-- - src/liblzma/api/lzma/block.h | 5 +++-- - src/liblzma/api/lzma/check.h | 5 +++-- - src/liblzma/api/lzma/container.h | 5 +++-- - src/liblzma/api/lzma/delta.h | 5 +++-- - src/liblzma/api/lzma/filter.h | 5 +++-- - src/liblzma/api/lzma/hardware.h | 5 +++-- - src/liblzma/api/lzma/index.h | 5 +++-- - src/liblzma/api/lzma/index_hash.h | 5 +++-- - src/liblzma/api/lzma/lzma12.h | 5 +++-- - src/liblzma/api/lzma/stream_flags.h | 5 +++-- - src/liblzma/api/lzma/version.h | 5 +++-- - src/liblzma/api/lzma/vli.h | 5 +++-- - 14 files changed, 42 insertions(+), 28 deletions(-) + AUTHORS | 2 +- + NEWS | 2 +- + src/liblzma/rangecoder/range_decoder.h | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) -commit 257dbff0ba1a7bc45a74d203ece015c9f70c88cd +commit c64723bbb094e29b4edd98f6fcce866e1b569b42 Author: Jia Tan -Date: 2023-01-19 20:35:09 +0800 +Date: 2024-02-16 22:52:41 +0800 - tuklib_physmem: Silence warning from -Wcast-function-type on MinGW-w64. - - tuklib_physmem depends on GetProcAddress() for both MSVC and MinGW-w64 - to retrieve a function address. The proper way to do this is to cast the - return value to the type of function pointer retrieved. Unfortunately, - this causes a cast-function-type warning, so the best solution is to - simply ignore the warning. + Translations: Update the Ukrainian man page translations. - src/common/tuklib_physmem.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + po4a/uk.po | 1710 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 873 insertions(+), 837 deletions(-) -commit 720ad4a44282a7ee59aa9920eaf495d85d245d97 +commit 2895195ed0f68b245c7bd568c126ba6e685fa1d6 Author: Jia Tan -Date: 2023-01-16 21:35:45 +0800 +Date: 2024-02-16 22:51:04 +0800 - xz: Add missing comment for coder_set_compression_settings() + Translations: Update the Ukrainian translation. - src/xz/coder.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + po/uk.po | 466 ++++++++++++++++++++++++++++++--------------------------------- + 1 file changed, 225 insertions(+), 241 deletions(-) -commit 88dc19163421282369c0989e997c05f9a447edc6 -Author: Jia Tan -Date: 2023-01-16 20:55:10 +0800 +commit 4c20781f4c8f04879b64d631a4f44b4909147bde +Author: Lasse Collin +Date: 2024-02-15 22:32:52 +0200 - xz: Do not set compression settings with raw format in list mode. - - Calling coder_set_compression_settings() in list mode with verbose mode - on caused the filter chain and memory requirements to print. This was - unnecessary since the command results in an error and not consistent - with other formats like lzma and alone. + Translations: Omit the generic copyright line from man page headers. - src/xz/args.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + po4a/update-po | 1 + + 1 file changed, 1 insertion(+) -commit 039e0ab13efb144642f9d99eeeb9c668e76bb430 +commit 4323bc3e0c1e1d2037d5e670a3bf6633e8a3031e Author: Jia Tan -Date: 2023-01-13 20:37:06 +0800 +Date: 2024-02-15 22:26:43 +0800 - Translations: Update the Brazilian Portuguese translation. + Update m4/.gitignore. - po/pt_BR.po | 603 ++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 344 insertions(+), 259 deletions(-) + m4/.gitignore | 1 + + 1 file changed, 1 insertion(+) -commit 718f7a60e740b26b8353965edaaddc7d4deb4d85 +commit 5394a1665b7a108a54cb8b4ef3ebe59d3dbcca3a Author: Lasse Collin -Date: 2023-01-12 13:04:05 +0200 +Date: 2024-02-14 21:11:49 +0200 - Build: Omit -Wmissing-noreturn from the default warnings. + Tests: tuktest.h: Treat Clang separately from GCC. - It's not that important. It can be annoying in builds that - disable many features since in those cases the tests programs - will correctly trigger this warning with Clang. + Don't assume that Clang defines __GNUC__ as the extensions + are available in clang-cl as well (and possibly in some other + Clang variants?). - configure.ac | 1 - - 1 file changed, 1 deletion(-) + tests/tuktest.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 3ccedb09724c998c39d708c945f6da5852c39e13 +commit cce7330b9f23485a0879422e0c3395a7065439ac Author: Lasse Collin -Date: 2023-01-12 06:05:58 +0200 +Date: 2024-02-14 21:11:03 +0200 - xz: Use ssize_t for the to-be-ignored return value from write(fd, ptr, 1). - - It makes no difference here as the return value fits into an int - too and it then gets ignored but this looks better. + Tests: tuktest.h: Add a missing word to a comment. - src/xz/file_io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/tuktest.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 09fbd2f0527def89e839c8907de4fe7ef6bc5019 +commit 5dd8fc9452a3373cedc27379067ce638f992c741 Author: Lasse Collin -Date: 2023-01-12 06:01:12 +0200 +Date: 2024-02-14 21:10:10 +0200 - xz: Silence warnings from -Wsign-conversion in a 32-bit build. + Tests: tuktest.h: Fix the comment about STest. - src/common/tuklib_mbstr_fw.c | 2 +- - src/xz/list.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + tests/tuktest.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 683d3f178ef1487b5418be49f331b0131a101b40 -Author: Lasse Collin -Date: 2023-01-12 05:38:48 +0200 +commit 6f1790254a03c5edf0f2976f773220f070450acd +Author: Jia Tan +Date: 2024-02-15 01:53:40 +0800 - liblzma: Silence another warning from -Wsign-conversion in a 32-bit build. - - It doesn't warn on a 64-bit system because truncating - a ptrdiff_t (signed long) to uint32_t is diagnosed under - -Wconversion by GCC and -Wshorten-64-to-32 by Clang. + Bump version for 5.5.2beta. - src/liblzma/lz/lz_encoder_mf.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + src/liblzma/api/lzma/version.h | 4 ++-- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) -commit 2b8062ef94a38d0f9ad0d1b309e8748db52f5c15 +commit 924fdeedf48113fb1e0646d86bd89a356d21a055 Author: Lasse Collin -Date: 2023-01-12 04:46:45 +0200 +Date: 2024-02-14 19:46:11 +0200 - liblzma: Silence a warning from -Wsign-conversion in a 32-bit build. + liblzma: Fix validate_map.sh. + + Adding the SPDX license identifier changed the line numbers. - src/common/mythread.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/liblzma/validate_map.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b16b9c0d22227012518595c2222facc73bd833a8 +commit 22140a2df6161b0110e6b4afa5ea0a07c5b60b01 Author: Lasse Collin -Date: 2023-01-12 04:17:24 +0200 +Date: 2024-02-14 19:38:34 +0200 - Build: Make configure add more warning flags for GCC and Clang. - - -Wstrict-aliasing was removed from the list since it is enabled - by -Wall already. - - A normal build is clean with these on GNU/Linux x86-64 with - GCC 12.2.0 and Clang 14.0.6. + Build: Start the generated ChangeLog from around 5.4.0 instead of 5.2.0. - configure.ac | 36 +++++++++++++++++++++++++++++++----- - 1 file changed, 31 insertions(+), 5 deletions(-) + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit c47ecd6d3909d0d3ff48dfd6e2ee41e7c7130b94 +commit 0b8cefa136c21d403a01b78517f4decb50172bdb Author: Lasse Collin -Date: 2023-01-12 04:14:18 +0200 +Date: 2024-02-14 19:27:46 +0200 - Tests: Fix warnings from clang --Wassign-enum. - - Explicitly casting the integer to lzma_check silences the warning. - Since such an invalid value is needed in multiple tests, a constant - INVALID_LZMA_CHECK_ID was added to tests.h. - - The use of 0x1000 for lzma_block.check wasn't optimal as if - the underlying type is a char then 0x1000 will be truncated to 0. - However, in these test cases the value is ignored, thus even with - such truncation the test would have passed. + Fixed NEWS for 5.5.2beta. - tests/test_block_header.c | 6 +++--- - tests/test_check.c | 2 +- - tests/test_stream_flags.c | 8 ++++---- - tests/tests.h | 9 +++++++++ - 4 files changed, 17 insertions(+), 8 deletions(-) + NEWS | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit 34e13ce015232968731de2a9ec3440a08b0084b1 +commit a4557bad96361d93ea171ed859ac5a696fca824f Author: Lasse Collin -Date: 2023-01-12 03:51:07 +0200 +Date: 2024-02-14 19:21:45 +0200 - Tests: Silence warnings from -Wsign-conversion. - - Note that assigning an unsigned int to lzma_check doesn't warn - on GNU/Linux x86-64 since the enum type is unsigned on that - platform. The enum can be signed on some other platform though - so it's best to use enumeration type lzma_check in these situations. + liblzma: Silence warnings in --enable-small build. - tests/test_check.c | 6 +++--- - tests/test_stream_flags.c | 10 +++++----- - 2 files changed, 8 insertions(+), 8 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 2 ++ + src/liblzma/rangecoder/range_decoder.h | 1 + + 2 files changed, 3 insertions(+) -commit 6671d0fe46b77f0fafce860836b7a12dc3cda14a +commit 38edf473236d00b3e100dc4c4f0bf43a4993fed2 Author: Lasse Collin -Date: 2023-01-12 03:19:59 +0200 +Date: 2024-02-14 19:15:58 +0200 - liblzma: Silence warnings from clang -Wconditional-uninitialized. - - This is similar to 2ce4f36f179a81d0c6e182a409f363df759d1ad0. - The actual initialization of the variables is done inside - mythread_sync() macro. Clang doesn't seem to see that - the initialization code inside the macro is always executed. + Build: Install COPYING.0BSD as part of docs. - src/liblzma/common/stream_decoder_mt.c | 8 +++++--- - src/liblzma/common/stream_encoder_mt.c | 2 +- - 2 files changed, 6 insertions(+), 4 deletions(-) + Makefile.am | 1 + + 1 file changed, 1 insertion(+) -commit d3e833ca1d2abda54648494c33aca73a40a47efe +commit b74e10bd839bcdc239afb5300ffaee195f34c217 Author: Lasse Collin -Date: 2023-01-12 03:11:40 +0200 +Date: 2024-02-14 19:14:05 +0200 - Fix warnings from clang -Wdocumentation. + Docs: List COPYING.0BSD in README. - src/liblzma/check/check.h | 4 ---- - src/liblzma/lz/lz_encoder_mf.c | 4 ++-- - src/xz/options.c | 4 ++-- - 3 files changed, 4 insertions(+), 8 deletions(-) + README | 1 + + 1 file changed, 1 insertion(+) -commit 977dd2e26bc50efec8d30fb90380394042d24558 +commit dfdb60ffe933a1f1497d300dbb4513ed17ec6f0e Author: Lasse Collin -Date: 2023-01-12 03:04:28 +0200 +Date: 2024-02-14 19:11:48 +0200 - Tests: test_lzip_decoder: Remove trailing white-space. + Docs: Include doc/examples/11_file_info.c in tarballs. + + It was added in 2017 in c2e29f06a7d1e3ba242ac2fafc69f5d6e92f62cd + but it never got into any release tarballs because it was + forgotten to be added to Makefile.am. - tests/test_lzip_decoder.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Makefile.am | 1 + + 1 file changed, 1 insertion(+) -commit c55157ed7437ab14f2afb7fecf331e321f2edf9a +commit 160b6862646d95dfdbd73ab7f1031ede0f54992d Author: Lasse Collin -Date: 2023-01-12 03:03:55 +0200 +Date: 2024-02-14 19:05:58 +0200 - Tests: test_lzip_decoder: Silence warnings from -Wsign-conversion. + liblzma: Silence a warning. - tests/test_lzip_decoder.c | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) + src/liblzma/rangecoder/range_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 18b845e69752c975dfeda418ec00eda22605c2ee +commit eeedd4d0925ea417add04ceb42a6c0829244b50c Author: Lasse Collin -Date: 2023-01-11 18:52:54 +0200 +Date: 2024-02-14 18:32:27 +0200 - Bump version and soname for 5.4.1. + Add NEWS for 5.5.2beta. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + NEWS | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 60 insertions(+) -commit 4080bbb844fb36701ffb978f0c41ea2c2c9f8960 -Author: Jia Tan -Date: 2023-01-11 23:58:16 +0800 +commit 8af7db854f903068d72a9a0d21103cb0c5027fa8 +Author: Lasse Collin +Date: 2024-02-13 14:32:47 +0200 - Add NEWS for 5.4.1. + xz: Mention lzmainfo if trying to use 'lzma --list'. + + This kind of fixes the problem reported here: + https://bugs.launchpad.net/ubuntu/+source/xz-utils/+bug/1291020 - NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 70 insertions(+) + src/xz/list.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) -commit 674c89fdb8c457ebc3a0652e235d8b6cd7b7dee2 +commit 0668907ff736e4cd16738c10d39a2bc9e851aefb Author: Lasse Collin -Date: 2023-01-10 11:56:11 +0200 +Date: 2024-02-14 14:58:36 +0200 - sysdefs.h: Don't include strings.h anymore. - - On some platforms src/xz/suffix.c may need for - strcasecmp() but suffix.c includes the header when it needs it. - - Unless there is an old system that otherwise supports enough C99 - to build XZ Utils but doesn't have C89/C90-compatible , - there should be no need to include in sysdefs.h. + liblzma: Add comments. - src/common/sysdefs.h | 6 ------ - 1 file changed, 6 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 9 +++++++++ + src/liblzma/rangecoder/range_decoder.h | 11 +++++++++-- + 2 files changed, 18 insertions(+), 2 deletions(-) -commit 2a6b938084fac9ddb39cd69c9beeed15c3b6f6f6 +commit 109f1913d4824c8214d5bbd38ebebf62c37572da Author: Lasse Collin -Date: 2023-01-10 11:23:41 +0200 +Date: 2024-02-13 17:00:17 +0200 - xz: Include in suffix.c if needed for strcasecmp(). - - SUSv2 and POSIX.1‐2017 declare only a few functions in . - Of these, strcasecmp() is used on some platforms in suffix.c. - Nothing else in the project needs (at least if - building on a modern system). - - sysdefs.h currently includes if HAVE_STRINGS_H is - defined and suffix.c relied on this. - - Note that dos/config.h doesn't #define HAVE_STRINGS_H even though - DJGPP does have strings.h. It isn't needed with DJGPP as strcasecmp() - is also in in DJGPP. + Scripts: Add lz4 support to xzgrep and xzdiff. - src/xz/suffix.c | 3 +++ - 1 file changed, 3 insertions(+) + src/scripts/xzdiff.1 | 8 +++++--- + src/scripts/xzdiff.in | 14 +++++++++----- + src/scripts/xzgrep.1 | 6 ++++-- + src/scripts/xzgrep.in | 1 + + 4 files changed, 19 insertions(+), 10 deletions(-) -commit aea639e81beb548e3114c74b6d9a894d6e036189 -Author: Jia Tan -Date: 2023-01-11 22:46:48 +0800 +commit de55485cb23af56c5adbe3239b935c957ff8ac4f +Author: Lasse Collin +Date: 2024-02-13 14:05:13 +0200 - xz: Fix warning -Wformat-nonliteral on clang in message.c. - - clang and gcc differ in how they handle -Wformat-nonliteral. gcc will - allow a non-literal format string as long as the function takes its - format arguments as a va_list. + liblzma: Choose the range decoder variants using a bitmask macro. - src/xz/message.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + src/liblzma/rangecoder/range_decoder.h | 64 ++++++++++++++++++++++++++++------ + 1 file changed, 53 insertions(+), 11 deletions(-) -commit e3b42bfcb0f67988beee7c7022fed0361282be45 -Author: Jia Tan -Date: 2023-01-11 20:58:31 +0800 +commit 0709c2b2d7c1d8f437b003f691880fd7810e5be5 +Author: Lasse Collin +Date: 2024-02-13 11:38:10 +0200 - Tests: Fix test_filter_flags copy/paste error. + xz: Fix outdated threading related info on the man page. - tests/test_filter_flags.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/xz/xz.1 | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) -commit 21625b7e11d004788e40eb5eb88d9d89f65fe347 -Author: Jia Tan -Date: 2023-01-11 20:42:29 +0800 +commit 3182a330c1512cc1f5c87b5c5a272578e60a5158 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - Tests: Fix type-limits warning in test_filter_flags. + liblzma: Range decoder: Add x86-64 inline assembly. - This only occurs in test_filter_flags when the BCJ filters are not - configured and built. In this case, ARRAY_SIZE() returns 0 and causes a - type-limits warning with the loop variable since an unsigned number will - always be >= 0. + It's compatible with GCC and Clang. - tests/test_filter_flags.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) + src/liblzma/rangecoder/range_decoder.h | 491 +++++++++++++++++++++++++++++++++ + 1 file changed, 491 insertions(+) -commit c337983e928682d56ce3470b286a8d5b8646e0ad +commit cba2edc991dffba7cd4891dbc1bd26cb950cf053 Author: Lasse Collin -Date: 2023-01-10 22:14:03 +0200 +Date: 2024-02-12 17:09:10 +0200 - liblzma: CLMUL CRC64: Work around a bug in MSVC, second attempt. + liblzma: Range decoder: Add branchless C code. - This affects only 32-bit x86 builds. x86-64 is OK as is. - - I still cannot easily test this myself. The reporter has tested - this and it passes the tests included in the CMake build and - performance is good: raw CRC64 is 2-3 times faster than the - C version of the slice-by-four method. (Note that liblzma doesn't - include a MSVC-compatible version of the 32-bit x86 assembly code - for the slice-by-four method.) - - Thanks to Iouri Kharon for figuring out a fix, testing, and - benchmarking. + It's used only for basic bittrees and fixed-size reverse bittree + because those showed a clear benefit on x86-64 with GCC and Clang. + The other methods were more mixed and thus are commented out but + they should be tested on other archs. - src/liblzma/check/crc64_fast.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + src/liblzma/rangecoder/range_decoder.h | 76 ++++++++++++++++++++++++++++++++++ + 1 file changed, 76 insertions(+) -commit b7fb438ea0e3ee02e3a164f3b72fae456cbe34d7 -Author: Jia Tan -Date: 2023-01-11 01:18:50 +0800 +commit e290a72d6dee71faf3a90c9678b2f730083666a7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - Tests: Fix unused function warning in test_block_header. - - One of the global arrays of filters was only used in a test that - required both encoders and decoders to be configured in the build. + liblzma: Clarify a comment. - tests/test_block_header.c | 4 ++++ - 1 file changed, 4 insertions(+) + src/liblzma/lzma/lzma_decoder.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) -commit 68e9ef036d18d7c3952bff0b391d5989b86934da -Author: Jia Tan -Date: 2023-01-11 01:08:03 +0800 +commit 5e04706b91ca90d6befd4da24a588a55e631d4a9 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - Tests: Fix unused function warning in test_index_hash. + liblzma: LZMA decoder: Optimize loop comparison. - test_index_hash does not use fill_index_hash() unless both encoders - and decoders are configured in the build. + But now it needs one more local variable. - tests/test_index_hash.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 5 ++--- + src/liblzma/rangecoder/range_decoder.h | 10 +++++++++- + 2 files changed, 11 insertions(+), 4 deletions(-) -commit a387707cd8cdefbffb5b7429bda4b7fcc192954a +commit 88276f9f2cb4871c7eb86952d93d07c1cf6caa66 Author: Lasse Collin -Date: 2023-01-10 00:33:14 +0200 +Date: 2024-02-12 17:09:10 +0200 - Windows: Update INSTALL-MSVC.txt to recommend CMake over project files. + liblzma: Optimize literal_subcoder() macro slightly. - windows/INSTALL-MSVC.txt | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) + src/liblzma/lzma/lzma_common.h | 22 ++++++++++++---------- + src/liblzma/lzma/lzma_decoder.c | 12 ++++++------ + src/liblzma/lzma/lzma_encoder.c | 6 +++--- + src/liblzma/lzma/lzma_encoder_optimum_normal.c | 2 +- + src/liblzma/lzma/lzma_encoder_private.h | 4 ++-- + 5 files changed, 24 insertions(+), 22 deletions(-) -commit 52902ad69518255a14b0144f0a2379e06fde5b6e +commit 5938f6de4d8ec9656776cd69e78ddfd6c3ad84e5 Author: Lasse Collin -Date: 2023-01-10 12:47:16 +0200 +Date: 2024-02-12 17:09:10 +0200 - Revert "liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022)." - - This reverts commit 36edc65ab4cf10a131f239acbd423b4510ba52d5. - - It was reported that it wasn't a good enough fix and MSVC - still produced (different kind of) bad code when building - for 32-bit x86 if optimizations are enabled. - - Thanks to Iouri Kharon. + liblzma: LZ decoder: Add unlikely(). - src/liblzma/check/crc64_fast.c | 6 ------ - 1 file changed, 6 deletions(-) + src/liblzma/lz/lz_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e81b9fc48ca70f9228308d3f1871cd81f9a5a496 +commit 9c252e3ed086c6b72590b2531586c42596d4a9d9 Author: Lasse Collin -Date: 2023-01-10 10:05:13 +0200 +Date: 2024-02-12 17:09:10 +0200 - sysdefs.h: Fix a comment. + liblzma: LZ decoder: Remove a useless unlikely(). - src/common/sysdefs.h | 2 +- + src/liblzma/lz/lz_decoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 6e89ab58b031aa046308a0b3504ff0a5be042571 +commit f3872a59475456c5d365cad9f1c5be514cfa54b5 Author: Lasse Collin -Date: 2023-01-10 10:04:06 +0200 +Date: 2024-02-12 17:09:10 +0200 - sysdefs.h: Don't include memory.h anymore even if it were available. + liblzma: Optimize LZ decoder slightly. - It quite probably was never needed, that is, any system where memory.h - was required likely couldn't compile XZ Utils for other reasons anyway. + Now extra buffer space is reserved so that repeating bytes for + any single match will never need to copy from two places (both + the beginning and the end of the buffer). This simplifies + dict_repeat() and helps a little with speed. - XZ Utils 5.2.6 and later source packages were generated using - Autoconf 2.71 which no longer defines HAVE_MEMORY_H. So the code - being removed is no longer used anyway. + This seems to reduce .lzma decompression time about 2 %, so + with .xz and CRC it could be slightly less. The small things + add up still. - src/common/sysdefs.h | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + src/liblzma/lz/lz_decoder.c | 43 ++++++++++++----- + src/liblzma/lz/lz_decoder.h | 101 +++++++++++++++++++++------------------- + src/liblzma/lzma/lzma_decoder.c | 4 +- + 3 files changed, 88 insertions(+), 60 deletions(-) -commit 65c59ad429aa59f9df0326d9fc82931ba4a9d123 +commit eb518446e578acf079abae5f1ce28db7b6e59bc1 Author: Lasse Collin -Date: 2023-01-10 08:50:26 +0200 +Date: 2024-02-12 17:09:10 +0200 - CMake/Windows: Add a workaround for windres from GNU binutils. + liblzma: LZMA decoder: Get rid of next_state[]. - This is combined from the following commits in the master branch: - 443dfebced041adc88f10d824188eeef5b5821a9 - 6b117d3b1fe91eb26d533ab16a2e552f84148d47 - 5e34774c31d1b7509b5cb77a3be9973adec59ea0 + It's not completely obvious if this is better in the decoder. + It should be good if compiler can avoid creating a branch + (like using CMOV on x86). - Thanks to Iouri Kharon for the bug report, the original patch, - and testing. + This also makes lzma_encoder.c use the new macros. - CMakeLists.txt | 32 +++++++++++++++++++++++++++++++- - 1 file changed, 31 insertions(+), 1 deletion(-) + src/liblzma/lzma/lzma_common.h | 14 ++++++++++++++ + src/liblzma/lzma/lzma_decoder.c | 30 ++++++++---------------------- + src/liblzma/lzma/lzma_encoder.c | 4 ++-- + 3 files changed, 24 insertions(+), 24 deletions(-) -commit 43521e77acc907863fa4f94aae276366172cb9ee +commit e0c0ee475c0800c08291ae45e0d66aa00d5ce604 Author: Lasse Collin -Date: 2023-01-06 22:53:38 +0200 +Date: 2024-02-12 17:09:10 +0200 - Tests: test_filter_flags: Clean up minor issues. - - Here are the list of the most significant issues addressed: - - Avoid using internal common.h header. It's not good to copy the - constants like this but common.h cannot be included for use outside - of liblzma. This is the quickest thing to do that could be fixed later. - - - Omit the INIT_FILTER macro. Initialization should be done with just - regular designated initializers. - - - Use start_offset = 257 for BCJ tests. It demonstrates that Filter - Flags encoder and decoder don't validate the options thoroughly. - 257 is valid only for the x86 filter. This is a bit silly but - not a significant problem in practice because the encoder and - decoder initialization functions will catch bad alignment still. - Perhaps this should be fixed but it's not urgent and doesn't need - to be in 5.4.x. + liblzma: LZMA decoder improvements. - - Various tweaks to comments such as filter id -> Filter ID + This adds macros for bittree decoding which prepares the code + for alternative C versions and inline assembly. - tests/test_filter_flags.c | 153 +++++++++++++++++++++++----------------------- - 1 file changed, 78 insertions(+), 75 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 264 ++++++++++----------------------- + src/liblzma/rangecoder/range_common.h | 4 + + src/liblzma/rangecoder/range_decoder.h | 142 ++++++++++++++++-- + 3 files changed, 210 insertions(+), 200 deletions(-) -commit 6b44cead95d767414272dc3a67898a36bfdf95b3 +commit de5c5e417645ad8906ef914bc059d08c1462fc29 Author: Jia Tan -Date: 2022-12-29 23:33:33 +0800 +Date: 2024-02-12 17:09:10 +0200 - Tests: Refactors existing filter flags tests. + liblzma: Creates Non-resumable and Resumable modes for lzma_decoder. - Converts the existing filter flags tests into tuktests. + The new decoder resumes the first decoder loop in the Resumable mode. + Then, the code executes in Non-resumable mode until it detects that it + cannot guarantee to have enough input/output to decode another symbol. + + The Resumable mode is how the decoder has always worked. Before decoding + every input bit, it checks if there is enough space and will save its + location to be resumed later. When the decoder has more input/output, + it jumps back to the correct sequence in the Resumable mode code. + + When the input/output buffers are large, the Resumable mode is much + slower than the Non-resumable because it has more branches and is harder + for the compiler to optimize since it is in a large switch block. + + Early benchmarking shows significant time improvement (8-10% on gcc and + clang x86) by using the Non-resumable code as much as possible. - tests/test_filter_flags.c | 655 ++++++++++++++++++++++++++++++++-------------- - 1 file changed, 457 insertions(+), 198 deletions(-) + src/liblzma/lz/lz_decoder.h | 14 +- + src/liblzma/lzma/lzma_decoder.c | 720 ++++++++++++++++++++++++++++------------ + 2 files changed, 521 insertions(+), 213 deletions(-) -commit 1bbefa9659b202ba31bd244a9d0e4f0d37ff3ed7 -Author: Lasse Collin -Date: 2023-01-08 00:32:29 +0200 +commit e446ab7a18abfde18f8d1cf02a914df72b1370e3 +Author: Jia Tan +Date: 2024-02-12 17:09:10 +0200 - Tests: tuktest.h: Support tuktest_malloc(0). + liblzma: Creates separate "safe" range decoder mode. - It's not needed in XZ Utils at least for now. It's good to support - it still because if such use is needed later, it wouldn't be - caught on GNU/Linux since malloc(0) from glibc returns non-NULL. + The new "safe" range decoder mode is the same as old range decoder, but + now the default behavior of the range decoder will not check if there is + enough input or output to complete the operation. When the buffers are + close to fully consumed, the "safe" operations must be used instead. This + will improve speed because it will reduce the number of branches needed + for most of the range decoder operations. - tests/tuktest.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 108 ++++++++------------------------- + src/liblzma/rangecoder/range_decoder.h | 77 +++++++++++++++++------ + 2 files changed, 82 insertions(+), 103 deletions(-) -commit ce3a3fbc7c2c399aeed644d54f3bd56ac914dfee +commit 7f6d9ca329ff3e01d4b0be7366eb4f5c93da41b9 Author: Lasse Collin -Date: 2023-01-07 21:57:11 +0200 +Date: 2024-02-12 17:09:10 +0200 - CMake: Update cmake_minimum_required from 3.13...3.16 to 3.13...3.25. + doxygen/footer.html: Add missing closing tags and don't open a new tab. - The changes listed on cmake-policies(7) for versions 3.17 to 3.25 - shouldn't affect this project. + The footer template from Doxygen has the closing + as Doxygen doesn't add them otherwise. + + target="_blank" was omitted as it's not useful here but + it can be slightly annoying as one cannot just go back + in the browser history. + + Since the footer links to the license file in the same + directory and not to CC website, the rel attributes + can be omitted. - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + doxygen/footer.html | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit 99fcd57f2ea35eaa94e09f674d5364329c880fa2 +commit 26d1527d34d52b0f5d632d4fb636fb33d0867e92 Author: Lasse Collin -Date: 2023-01-08 00:24:23 +0200 +Date: 2024-02-13 13:19:10 +0200 - Update THANKS. + Tweak the expressions in AUTHORS. - THANKS | 1 + - 1 file changed, 1 insertion(+) + AUTHORS | 31 +++++++++++++++++++++++-------- + 1 file changed, 23 insertions(+), 8 deletions(-) -commit c0c13d9d82eb8a4302c8bbb8b4c5178d285fe9ab +commit d231d56580175fa040fdd3c6207a58243ce6217b Author: Lasse Collin -Date: 2023-01-07 19:50:35 +0200 +Date: 2024-02-13 13:07:33 +0200 - Update THANKS. + Translations: Add the man page translators into man page header comment. + + It looked odd to only have the original English authors listed + in the header comments of the translated files. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po4a/.gitignore | 1 + + po4a/po4a.conf | 14 +++++++------- + po4a/update-po | 18 ++++++++++++++++++ + 3 files changed, 26 insertions(+), 7 deletions(-) -commit 3d45987451b1c3bb42697b29341824c0e5484cba +commit 6d35fcb936474fca1acaebfd9502c097b6fde88e Author: Lasse Collin -Date: 2023-01-09 11:27:24 +0200 +Date: 2024-02-12 17:09:10 +0200 - CMake: Fix a copypaste error in xzdec Windows resource file handling. + Translations: Translate also messages of lzmainfo. - It was my mistake. Thanks to Iouri Kharon for the bug report. + lzmainfo has had translation support since 2009 at least but + it was never added to po/POTFILES.in so the messages weren't + translated. It's a very rarely needed tool so it's not too bad. + + This also adds src/xz/mytime.c to po/POTFILES.in although there + are no translatable strings. It's simpler this way so that it + won't be forgotten if strings were ever added to that file. - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + po/POTFILES.in | 2 ++ + 1 file changed, 2 insertions(+) -commit 706bce5018d7cf83094e13454a0731169ec119b5 +commit a9f369dd54b05f9ac4e00ead9d765d04fc259868 Author: Lasse Collin -Date: 2023-01-07 19:50:03 +0200 +Date: 2024-02-12 17:09:10 +0200 - CMake/Windows: Add resource files to xz.exe and xzdec.exe. - - The command line tools cannot be built with MSVC for now but - they can be built with MinGW-w64. + Translations: Add custom .pot header with SPDX license identifier. - Thanks to Iouri Kharon for the bug report and the original patch. + The same is used for both po/xz.pot and po4a/xz-man.pot. - CMakeLists.txt | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) + Makefile.am | 1 + + po/xz.pot-header | 7 +++++++ + po4a/update-po | 8 ++++++++ + 3 files changed, 16 insertions(+) -commit e96dee55df04113c33b387ccdb6cb70935422d91 +commit 469cd6653bb96e83c5cf1031c204d34566b15f44 Author: Lasse Collin -Date: 2023-01-09 12:22:05 +0200 +Date: 2024-02-12 17:09:10 +0200 - liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022). - - I haven't tested with MSVC myself and there doesn't seem to be - information about the problem online, so I'm relying on the bug report. + Translations: po4a/update-po: Add copyright notice to xz-man.pot. - Thanks to Iouri Kharon for the bug report and the patch. + All man pages are under 0BSD now so this is simple now. - src/liblzma/check/crc64_fast.c | 6 ++++++ - 1 file changed, 6 insertions(+) + po4a/update-po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 52bc1ee34dda9bb6fb40175e5952863066681b77 +commit 28ce45e38fbed4b5f54f2013e38dab47d22bf699 Author: Lasse Collin -Date: 2023-01-07 19:31:15 +0200 +Date: 2024-02-12 17:09:10 +0200 - Build: Require that _mm_set_epi64x() is usable to enable CLMUL support. - - VS2013 doesn't have _mm_set_epi64x() so this way CLMUL gets - disabled with VS2013. - - Thanks to Iouri Kharon for the bug report. + Update COPYING about the man pages of the scripts. - CMakeLists.txt | 3 ++- - configure.ac | 8 ++++++-- - 2 files changed, 8 insertions(+), 3 deletions(-) + COPYING | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit bad44cfe19e8be8ae76755369be2a34abcd2b4fa -Author: Jia Tan -Date: 2022-12-29 00:25:18 +0800 +commit e48287bf51afd5184ea74de1dcade9e153f873f7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - Tests: Creates test_index_hash.c + xzdiff, xzgrep, and xzmore: Rewrite the man pages. - Tests all API functions exported from index_hash.h. Does not have a - dedicated test for lzma_index_hash_end. + The main reason is a kind of silly one: + + xz-man.pot contains strings from all man pages in XZ Utils. + The man pages of xzdiff, xzgrep, and xzmore were under GPLv2 + and the rest under 0BSD. Thus xz-man.pot contained strings + under two licences. po4a creates the translated man pages + from the combined 0BSD+GPLv2 xz-man.pot. - [Minor edits were made by Lasse Collin.] + I haven't liked this mixing in xz-man.pot but the + Translation Project requires that all man pages must be + in the same .pot file. So a separate xz-man-gpl.pot + wasn't an option. + + Since these man pages are short, rewriting them was quick enough. + Now xz-man.pot is entirely under 0BSD and marking the per-file + licenses is simpler. + + As a bonus, some wording hopefully is now slightly better + although it's perhaps a matter of taste. + + NOTE: In xzgrep.1, the EXIT STATUS section was written by me + in the commit d796b6d7fdb8b7238b277056cf9146cce25db604 so that's + why that section could be taken as is from the old xzgrep.1. - .gitignore | 1 + - CMakeLists.txt | 2 + - tests/Makefile.am | 3 + - tests/test_index_hash.c | 388 ++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 394 insertions(+) + src/scripts/xzdiff.1 | 94 ++++++++++++++++++++++++----------------- + src/scripts/xzgrep.1 | 116 ++++++++++++++++++++++++++++++++------------------- + src/scripts/xzmore.1 | 79 ++++++++++++++++++++--------------- + 3 files changed, 173 insertions(+), 116 deletions(-) -commit 692ccdf5516dfe55fb6e9c5cdfb31f4c02c1ecd1 -Author: Jia Tan -Date: 2023-01-05 20:57:25 +0800 +commit 3e551b111b8ae8150f1a1040364dbafc034f22be +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - liblzma: Remove common.h include from common/index.h. - - common/index.h is needed by liblzma internally and tests. common.h will - include and define many things that are not needed by the tests. + xzless: Update man page slightly. - Also, this prevents include order problems because both common.h and - lzma.h define LZMA_API. On most platforms it results only in a warning - but on Windows it would break the build as the definition in common.h - must be used only for building liblzma itself. + The xz tool can decompress three file formats and xzless + has always supported uncompressed files too. - src/liblzma/common/index.c | 1 + - src/liblzma/common/index.h | 9 +++++++-- - src/liblzma/common/index_decoder.h | 1 + - src/liblzma/common/stream_buffer_encoder.c | 1 + - 4 files changed, 10 insertions(+), 2 deletions(-) + src/scripts/xzless.1 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit 2ac7bafc8f07c1edefe96a4a7a040ddfff0eb5bb -Author: Jia Tan -Date: 2022-08-17 20:20:16 +0800 +commit 40f36da2262d13d6e1ba8449caa855512ae626d7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 - liblzma: Add NULL check to lzma_index_hash_append. - - This is for consistency with lzma_index_append. + Translations: Change po/Makevars to add a copyright notice to po/xz.pot. - src/liblzma/common/index_hash.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/Makevars | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 24192854e2ea5c06997431a98bda3c36c5da1497 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Translations: Update po/Makevars to use the template from gettext 0.22.4. + + Also add SPDX license identifier now that there is a known license. + + po/Makevars | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 46 insertions(+), 5 deletions(-) + +commit b94154957370116480b43bcabca25fc52deb9853 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Include the SPDX license identifier 0BSD to generated files. + + Perhaps the generated files aren't even copyrightable but + using the same license for them as for the rest of the liblzma + keeps things more consistent for tools that look for license info. + + src/liblzma/check/crc32_table_be.h | 4 +++- + src/liblzma/check/crc32_table_le.h | 4 +++- + src/liblzma/check/crc32_tablegen.c | 16 ++++++++++------ + src/liblzma/check/crc64_table_be.h | 4 +++- + src/liblzma/check/crc64_table_le.h | 4 +++- + src/liblzma/check/crc64_tablegen.c | 8 +++++--- + src/liblzma/lz/lz_encoder_hash_table.h | 4 +++- + src/liblzma/lzma/fastpos_table.c | 4 +++- + src/liblzma/lzma/fastpos_tablegen.c | 12 +++++++----- + src/liblzma/rangecoder/price_table.c | 4 +++- + src/liblzma/rangecoder/price_tablegen.c | 12 +++++++----- + 11 files changed, 50 insertions(+), 26 deletions(-) + +commit 8e4ec794836bc1701d8c9bd5e347b8ce8cc5bbb4 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Fix compilation of price_tablegen.c. + + It is built and run only manually so this didn't matter + unless one wanted to regenerate the price_table.c. + + src/liblzma/rangecoder/price_tablegen.c | 5 +++++ + src/liblzma/rangecoder/range_common.h | 5 ++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +commit e99bff3ffbcdf2634fd5bd13887627ec7dbfecaf +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Add SPDX license identifiers to GPL, LGPL, and FSFULLR files. + + extra/scanlzma/scanlzma.c | 2 ++ + lib/Makefile.am | 2 ++ + lib/getopt-cdefs.h | 2 ++ + lib/getopt-core.h | 2 ++ + lib/getopt-ext.h | 2 ++ + lib/getopt-pfx-core.h | 2 ++ + lib/getopt-pfx-ext.h | 2 ++ + lib/getopt.c | 2 ++ + lib/getopt.in.h | 2 ++ + lib/getopt1.c | 2 ++ + lib/getopt_int.h | 2 ++ + m4/ax_pthread.m4 | 2 ++ + m4/getopt.m4 | 2 ++ + m4/posix-shell.m4 | 2 ++ + m4/visibility.m4 | 2 ++ + src/scripts/xzdiff.1 | 3 +-- + src/scripts/xzdiff.in | 1 + + src/scripts/xzgrep.1 | 3 +-- + src/scripts/xzgrep.in | 1 + + src/scripts/xzless.in | 1 + + src/scripts/xzmore.1 | 3 +-- + src/scripts/xzmore.in | 1 + + 22 files changed, 37 insertions(+), 6 deletions(-) + +commit 22af94128b89a131f5e58ae69bee5e50227c15da +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Add SPDX license identifier into 0BSD source code files. + + .github/workflows/ci.yml | 2 ++ + .github/workflows/windows-ci.yml | 2 ++ + CMakeLists.txt | 2 ++ + Makefile.am | 3 +-- + autogen.sh | 1 + + build-aux/ci_build.sh | 3 ++- + build-aux/manconv.sh | 3 ++- + build-aux/version.sh | 3 ++- + cmake/remove-ordinals.cmake | 2 ++ + cmake/tuklib_common.cmake | 4 ++++ + cmake/tuklib_cpucores.cmake | 4 ++++ + cmake/tuklib_integer.cmake | 4 ++++ + cmake/tuklib_large_file_support.cmake | 4 ++++ + cmake/tuklib_mbstr.cmake | 4 ++++ + cmake/tuklib_physmem.cmake | 4 ++++ + cmake/tuklib_progname.cmake | 4 ++++ + configure.ac | 4 +++- + debug/Makefile.am | 3 +-- + debug/crc32.c | 2 ++ + debug/full_flush.c | 2 ++ + debug/hex2bin.c | 2 ++ + debug/known_sizes.c | 2 ++ + debug/memusage.c | 2 ++ + debug/repeat.c | 2 ++ + debug/sync_flush.c | 2 ++ + debug/translation.bash | 1 + + doc/examples/01_compress_easy.c | 2 ++ + doc/examples/02_decompress.c | 2 ++ + doc/examples/03_compress_custom.c | 2 ++ + doc/examples/04_compress_easy_mt.c | 2 ++ + doc/examples/11_file_info.c | 2 ++ + doc/examples/Makefile | 3 +-- + dos/Makefile | 2 ++ + dos/config.h | 2 ++ + doxygen/update-doxygen | 3 ++- + extra/7z2lzma/7z2lzma.bash | 3 ++- + m4/tuklib_common.m4 | 8 ++++++-- + m4/tuklib_cpucores.m4 | 8 ++++++-- + m4/tuklib_integer.m4 | 8 ++++++-- + m4/tuklib_mbstr.m4 | 8 ++++++-- + m4/tuklib_physmem.m4 | 8 ++++++-- + m4/tuklib_progname.m4 | 8 ++++++-- + po/POTFILES.in | 2 ++ + po4a/po4a.conf | 2 ++ + po4a/update-po | 3 ++- + src/Makefile.am | 3 +-- + src/common/common_w32res.rc | 2 ++ + src/common/mythread.h | 2 ++ + src/common/sysdefs.h | 2 ++ + src/common/tuklib_common.h | 2 ++ + src/common/tuklib_config.h | 2 ++ + src/common/tuklib_cpucores.c | 2 ++ + src/common/tuklib_cpucores.h | 2 ++ + src/common/tuklib_exit.c | 2 ++ + src/common/tuklib_exit.h | 2 ++ + src/common/tuklib_gettext.h | 2 ++ + src/common/tuklib_integer.h | 2 ++ + src/common/tuklib_mbstr.h | 2 ++ + src/common/tuklib_mbstr_fw.c | 2 ++ + src/common/tuklib_mbstr_width.c | 2 ++ + src/common/tuklib_open_stdxxx.c | 2 ++ + src/common/tuklib_open_stdxxx.h | 2 ++ + src/common/tuklib_physmem.c | 2 ++ + src/common/tuklib_physmem.h | 2 ++ + src/common/tuklib_progname.c | 2 ++ + src/common/tuklib_progname.h | 2 ++ + src/liblzma/Makefile.am | 3 +-- + src/liblzma/api/Makefile.am | 3 +-- + src/liblzma/api/lzma.h | 2 ++ + src/liblzma/api/lzma/base.h | 2 ++ + 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/container.h | 2 ++ + src/liblzma/api/lzma/delta.h | 2 ++ + src/liblzma/api/lzma/filter.h | 2 ++ + src/liblzma/api/lzma/hardware.h | 2 ++ + src/liblzma/api/lzma/index.h | 2 ++ + src/liblzma/api/lzma/index_hash.h | 2 ++ + src/liblzma/api/lzma/lzma12.h | 2 ++ + src/liblzma/api/lzma/stream_flags.h | 2 ++ + src/liblzma/api/lzma/version.h | 2 ++ + src/liblzma/api/lzma/vli.h | 2 ++ + src/liblzma/check/Makefile.inc | 4 ++-- + src/liblzma/check/check.c | 2 ++ + src/liblzma/check/check.h | 2 ++ + src/liblzma/check/crc32_arm64.h | 2 ++ + src/liblzma/check/crc32_fast.c | 2 ++ + src/liblzma/check/crc32_small.c | 2 ++ + src/liblzma/check/crc32_table.c | 2 ++ + src/liblzma/check/crc32_tablegen.c | 2 ++ + src/liblzma/check/crc32_x86.S | 2 ++ + src/liblzma/check/crc64_fast.c | 2 ++ + src/liblzma/check/crc64_small.c | 2 ++ + src/liblzma/check/crc64_table.c | 2 ++ + src/liblzma/check/crc64_tablegen.c | 2 ++ + src/liblzma/check/crc64_x86.S | 2 ++ + src/liblzma/check/crc_common.h | 2 ++ + src/liblzma/check/crc_x86_clmul.h | 2 ++ + src/liblzma/check/sha256.c | 2 ++ + src/liblzma/common/Makefile.inc | 3 +-- + src/liblzma/common/alone_decoder.c | 2 ++ + src/liblzma/common/alone_decoder.h | 2 ++ + src/liblzma/common/alone_encoder.c | 2 ++ + src/liblzma/common/auto_decoder.c | 2 ++ + src/liblzma/common/block_buffer_decoder.c | 2 ++ + src/liblzma/common/block_buffer_encoder.c | 2 ++ + src/liblzma/common/block_buffer_encoder.h | 2 ++ + src/liblzma/common/block_decoder.c | 2 ++ + src/liblzma/common/block_decoder.h | 2 ++ + src/liblzma/common/block_encoder.c | 2 ++ + src/liblzma/common/block_encoder.h | 2 ++ + src/liblzma/common/block_header_decoder.c | 2 ++ + src/liblzma/common/block_header_encoder.c | 2 ++ + src/liblzma/common/block_util.c | 2 ++ + src/liblzma/common/common.c | 2 ++ + src/liblzma/common/common.h | 2 ++ + src/liblzma/common/easy_buffer_encoder.c | 2 ++ + src/liblzma/common/easy_decoder_memusage.c | 2 ++ + src/liblzma/common/easy_encoder.c | 2 ++ + src/liblzma/common/easy_encoder_memusage.c | 2 ++ + src/liblzma/common/easy_preset.c | 2 ++ + src/liblzma/common/easy_preset.h | 2 ++ + src/liblzma/common/file_info.c | 2 ++ + src/liblzma/common/filter_buffer_decoder.c | 2 ++ + src/liblzma/common/filter_buffer_encoder.c | 2 ++ + src/liblzma/common/filter_common.c | 2 ++ + src/liblzma/common/filter_common.h | 2 ++ + src/liblzma/common/filter_decoder.c | 2 ++ + src/liblzma/common/filter_decoder.h | 2 ++ + src/liblzma/common/filter_encoder.c | 2 ++ + src/liblzma/common/filter_encoder.h | 2 ++ + src/liblzma/common/filter_flags_decoder.c | 2 ++ + src/liblzma/common/filter_flags_encoder.c | 2 ++ + src/liblzma/common/hardware_cputhreads.c | 2 ++ + src/liblzma/common/hardware_physmem.c | 2 ++ + src/liblzma/common/index.c | 2 ++ + src/liblzma/common/index.h | 2 ++ + src/liblzma/common/index_decoder.c | 2 ++ + src/liblzma/common/index_decoder.h | 2 ++ + src/liblzma/common/index_encoder.c | 2 ++ + src/liblzma/common/index_encoder.h | 2 ++ + src/liblzma/common/index_hash.c | 2 ++ + src/liblzma/common/lzip_decoder.c | 2 ++ + src/liblzma/common/lzip_decoder.h | 2 ++ + src/liblzma/common/memcmplen.h | 2 ++ + src/liblzma/common/microlzma_decoder.c | 2 ++ + src/liblzma/common/microlzma_encoder.c | 2 ++ + src/liblzma/common/outqueue.c | 2 ++ + src/liblzma/common/outqueue.h | 2 ++ + src/liblzma/common/stream_buffer_decoder.c | 2 ++ + src/liblzma/common/stream_buffer_encoder.c | 2 ++ + src/liblzma/common/stream_decoder.c | 2 ++ + src/liblzma/common/stream_decoder.h | 2 ++ + src/liblzma/common/stream_decoder_mt.c | 2 ++ + src/liblzma/common/stream_encoder.c | 2 ++ + src/liblzma/common/stream_encoder_mt.c | 2 ++ + src/liblzma/common/stream_flags_common.c | 2 ++ + src/liblzma/common/stream_flags_common.h | 2 ++ + src/liblzma/common/stream_flags_decoder.c | 2 ++ + src/liblzma/common/stream_flags_encoder.c | 2 ++ + src/liblzma/common/string_conversion.c | 2 ++ + src/liblzma/common/vli_decoder.c | 2 ++ + src/liblzma/common/vli_encoder.c | 2 ++ + src/liblzma/common/vli_size.c | 2 ++ + src/liblzma/delta/Makefile.inc | 3 +-- + src/liblzma/delta/delta_common.c | 2 ++ + src/liblzma/delta/delta_common.h | 2 ++ + src/liblzma/delta/delta_decoder.c | 2 ++ + src/liblzma/delta/delta_decoder.h | 2 ++ + src/liblzma/delta/delta_encoder.c | 2 ++ + src/liblzma/delta/delta_encoder.h | 2 ++ + src/liblzma/delta/delta_private.h | 2 ++ + src/liblzma/liblzma.pc.in | 3 +-- + src/liblzma/liblzma_generic.map | 2 ++ + src/liblzma/liblzma_linux.map | 2 ++ + src/liblzma/liblzma_w32res.rc | 2 ++ + src/liblzma/lz/Makefile.inc | 3 +-- + src/liblzma/lz/lz_decoder.c | 2 ++ + src/liblzma/lz/lz_decoder.h | 2 ++ + src/liblzma/lz/lz_encoder.c | 2 ++ + src/liblzma/lz/lz_encoder.h | 2 ++ + src/liblzma/lz/lz_encoder_hash.h | 2 ++ + src/liblzma/lz/lz_encoder_mf.c | 2 ++ + src/liblzma/lzma/Makefile.inc | 3 +-- + src/liblzma/lzma/fastpos.h | 2 ++ + src/liblzma/lzma/fastpos_tablegen.c | 2 ++ + src/liblzma/lzma/lzma2_decoder.c | 2 ++ + src/liblzma/lzma/lzma2_decoder.h | 2 ++ + src/liblzma/lzma/lzma2_encoder.c | 2 ++ + src/liblzma/lzma/lzma2_encoder.h | 2 ++ + src/liblzma/lzma/lzma_common.h | 2 ++ + src/liblzma/lzma/lzma_decoder.c | 2 ++ + src/liblzma/lzma/lzma_decoder.h | 2 ++ + src/liblzma/lzma/lzma_encoder.c | 2 ++ + src/liblzma/lzma/lzma_encoder.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_presets.c | 2 ++ + src/liblzma/lzma/lzma_encoder_private.h | 2 ++ + src/liblzma/rangecoder/Makefile.inc | 3 +-- + src/liblzma/rangecoder/price.h | 2 ++ + src/liblzma/rangecoder/price_tablegen.c | 2 ++ + src/liblzma/rangecoder/range_common.h | 2 ++ + src/liblzma/rangecoder/range_decoder.h | 2 ++ + src/liblzma/rangecoder/range_encoder.h | 2 ++ + src/liblzma/simple/Makefile.inc | 3 +-- + src/liblzma/simple/arm.c | 2 ++ + src/liblzma/simple/arm64.c | 2 ++ + src/liblzma/simple/armthumb.c | 2 ++ + src/liblzma/simple/ia64.c | 2 ++ + src/liblzma/simple/powerpc.c | 2 ++ + src/liblzma/simple/riscv.c | 2 ++ + src/liblzma/simple/simple_coder.c | 2 ++ + src/liblzma/simple/simple_coder.h | 2 ++ + src/liblzma/simple/simple_decoder.c | 2 ++ + src/liblzma/simple/simple_decoder.h | 2 ++ + src/liblzma/simple/simple_encoder.c | 2 ++ + src/liblzma/simple/simple_encoder.h | 2 ++ + src/liblzma/simple/simple_private.h | 2 ++ + src/liblzma/simple/sparc.c | 2 ++ + src/liblzma/simple/x86.c | 2 ++ + src/liblzma/validate_map.sh | 1 + + src/lzmainfo/Makefile.am | 3 +-- + src/lzmainfo/lzmainfo.c | 2 ++ + src/lzmainfo/lzmainfo_w32res.rc | 2 ++ + src/scripts/Makefile.am | 3 +-- + src/xz/Makefile.am | 3 +-- + src/xz/args.c | 2 ++ + src/xz/args.h | 2 ++ + src/xz/coder.c | 2 ++ + src/xz/coder.h | 2 ++ + src/xz/file_io.c | 2 ++ + src/xz/file_io.h | 2 ++ + src/xz/hardware.c | 2 ++ + src/xz/hardware.h | 2 ++ + src/xz/list.c | 2 ++ + src/xz/list.h | 2 ++ + src/xz/main.c | 2 ++ + src/xz/main.h | 2 ++ + src/xz/message.c | 2 ++ + src/xz/message.h | 2 ++ + src/xz/mytime.c | 2 ++ + src/xz/mytime.h | 2 ++ + src/xz/options.c | 2 ++ + src/xz/options.h | 2 ++ + src/xz/private.h | 2 ++ + src/xz/signals.c | 2 ++ + src/xz/signals.h | 2 ++ + src/xz/suffix.c | 2 ++ + src/xz/suffix.h | 2 ++ + src/xz/util.c | 2 ++ + src/xz/util.h | 2 ++ + src/xz/xz_w32res.rc | 2 ++ + src/xzdec/Makefile.am | 3 +-- + src/xzdec/lzmadec_w32res.rc | 2 ++ + src/xzdec/xzdec.c | 2 ++ + src/xzdec/xzdec_w32res.rc | 2 ++ + tests/Makefile.am | 3 +-- + tests/bcj_test.c | 2 ++ + tests/code_coverage.sh | 1 + + tests/create_compress_files.c | 2 ++ + tests/ossfuzz/fuzz_common.h | 2 ++ + tests/ossfuzz/fuzz_decode_alone.c | 2 ++ + tests/ossfuzz/fuzz_decode_stream.c | 2 ++ + tests/ossfuzz/fuzz_encode_stream.c | 2 ++ + tests/test_bcj_exact_size.c | 2 ++ + tests/test_block_header.c | 2 ++ + tests/test_check.c | 2 ++ + tests/test_compress.sh | 1 + + tests/test_compress_generated_abc | 1 + + tests/test_compress_generated_random | 1 + + tests/test_compress_generated_text | 1 + + tests/test_compress_prepared_bcj_sparc | 1 + + tests/test_compress_prepared_bcj_x86 | 1 + + tests/test_files.sh | 1 + + tests/test_filter_flags.c | 2 ++ + tests/test_filter_str.c | 2 ++ + tests/test_hardware.c | 2 ++ + tests/test_index.c | 2 ++ + tests/test_index_hash.c | 2 ++ + tests/test_lzip_decoder.c | 2 ++ + tests/test_memlimit.c | 2 ++ + tests/test_scripts.sh | 1 + + tests/test_stream_flags.c | 2 ++ + tests/test_suffix.sh | 1 + + tests/test_vli.c | 2 ++ + tests/tests.h | 2 ++ + tests/tuktest.h | 2 ++ + windows/build.bash | 3 ++- + 290 files changed, 588 insertions(+), 58 deletions(-) + +commit 23de53421ea258cde6a3c33a038b1e9d08f771d1 +Author: Lasse Collin +Date: 2024-02-12 23:25:54 +0200 + + liblzma: Sync the AUTHORS fix about SHA-256 to lzma.h. + + src/liblzma/api/lzma.h | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) -commit db714d30e0c74d1dd4af1a23ed62b44e0e8e4efc +commit 689e0228baeb95232430e90d628379db89583d71 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Change most public domain parts to 0BSD. + + Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt + were not touched. + + COPYING.0BSD was added. + + .github/workflows/ci.yml | 3 - + .github/workflows/windows-ci.yml | 3 - + CMakeLists.txt | 3 - + COPYING | 112 ++++++++++++++----------- + COPYING.0BSD | 11 +++ + Makefile.am | 3 - + PACKAGERS | 11 +-- + autogen.sh | 3 - + build-aux/ci_build.sh | 3 - + build-aux/manconv.sh | 3 - + build-aux/version.sh | 3 - + cmake/remove-ordinals.cmake | 3 - + cmake/tuklib_common.cmake | 3 - + cmake/tuklib_cpucores.cmake | 3 - + cmake/tuklib_integer.cmake | 3 - + cmake/tuklib_large_file_support.cmake | 3 - + cmake/tuklib_mbstr.cmake | 3 - + cmake/tuklib_physmem.cmake | 3 - + cmake/tuklib_progname.cmake | 3 - + configure.ac | 3 - + debug/Makefile.am | 3 - + debug/crc32.c | 3 - + debug/full_flush.c | 3 - + debug/hex2bin.c | 3 - + debug/known_sizes.c | 3 - + debug/memusage.c | 3 - + debug/repeat.c | 3 - + debug/sync_flush.c | 3 - + debug/translation.bash | 3 - + doc/examples/01_compress_easy.c | 3 - + doc/examples/02_decompress.c | 3 - + doc/examples/03_compress_custom.c | 3 - + doc/examples/04_compress_easy_mt.c | 3 - + doc/examples/11_file_info.c | 3 - + doc/examples/Makefile | 3 - + dos/Makefile | 3 - + doxygen/update-doxygen | 3 - + extra/7z2lzma/7z2lzma.bash | 3 - + m4/tuklib_common.m4 | 3 - + m4/tuklib_cpucores.m4 | 3 - + m4/tuklib_integer.m4 | 3 - + m4/tuklib_mbstr.m4 | 3 - + m4/tuklib_physmem.m4 | 3 - + m4/tuklib_progname.m4 | 3 - + po4a/update-po | 3 - + src/Makefile.am | 3 - + src/common/common_w32res.rc | 3 - + src/common/mythread.h | 3 - + src/common/sysdefs.h | 3 - + src/common/tuklib_common.h | 3 - + src/common/tuklib_cpucores.c | 3 - + src/common/tuklib_cpucores.h | 3 - + src/common/tuklib_exit.c | 3 - + src/common/tuklib_exit.h | 3 - + src/common/tuklib_gettext.h | 3 - + src/common/tuklib_integer.h | 3 - + src/common/tuklib_mbstr.h | 3 - + src/common/tuklib_mbstr_fw.c | 3 - + src/common/tuklib_mbstr_width.c | 3 - + src/common/tuklib_open_stdxxx.c | 3 - + src/common/tuklib_open_stdxxx.h | 3 - + src/common/tuklib_physmem.c | 3 - + src/common/tuklib_physmem.h | 3 - + src/common/tuklib_progname.c | 3 - + src/common/tuklib_progname.h | 3 - + src/liblzma/Makefile.am | 3 - + src/liblzma/api/Makefile.am | 3 - + src/liblzma/api/lzma.h | 13 ++- + src/liblzma/api/lzma/base.h | 3 - + src/liblzma/api/lzma/bcj.h | 3 - + src/liblzma/api/lzma/block.h | 3 - + src/liblzma/api/lzma/check.h | 3 - + src/liblzma/api/lzma/container.h | 3 - + src/liblzma/api/lzma/delta.h | 3 - + src/liblzma/api/lzma/filter.h | 3 - + src/liblzma/api/lzma/hardware.h | 3 - + src/liblzma/api/lzma/index.h | 3 - + src/liblzma/api/lzma/index_hash.h | 3 - + src/liblzma/api/lzma/lzma12.h | 3 - + src/liblzma/api/lzma/stream_flags.h | 3 - + src/liblzma/api/lzma/version.h | 3 - + src/liblzma/api/lzma/vli.h | 3 - + src/liblzma/check/Makefile.inc | 3 - + src/liblzma/check/check.c | 3 - + src/liblzma/check/check.h | 3 - + src/liblzma/check/crc32_arm64.h | 3 - + src/liblzma/check/crc32_fast.c | 3 - + src/liblzma/check/crc32_small.c | 3 - + src/liblzma/check/crc32_table.c | 3 - + src/liblzma/check/crc32_tablegen.c | 3 - + src/liblzma/check/crc32_x86.S | 3 - + src/liblzma/check/crc64_fast.c | 3 - + src/liblzma/check/crc64_small.c | 3 - + src/liblzma/check/crc64_table.c | 3 - + src/liblzma/check/crc64_tablegen.c | 3 - + src/liblzma/check/crc64_x86.S | 3 - + src/liblzma/check/crc_common.h | 3 - + src/liblzma/check/crc_x86_clmul.h | 3 - + src/liblzma/check/sha256.c | 3 - + src/liblzma/common/Makefile.inc | 3 - + src/liblzma/common/alone_decoder.c | 3 - + src/liblzma/common/alone_decoder.h | 3 - + src/liblzma/common/alone_encoder.c | 3 - + src/liblzma/common/auto_decoder.c | 3 - + src/liblzma/common/block_buffer_decoder.c | 3 - + src/liblzma/common/block_buffer_encoder.c | 3 - + src/liblzma/common/block_buffer_encoder.h | 3 - + src/liblzma/common/block_decoder.c | 3 - + src/liblzma/common/block_decoder.h | 3 - + src/liblzma/common/block_encoder.c | 3 - + src/liblzma/common/block_encoder.h | 3 - + src/liblzma/common/block_header_decoder.c | 3 - + src/liblzma/common/block_header_encoder.c | 3 - + src/liblzma/common/block_util.c | 3 - + src/liblzma/common/common.c | 3 - + src/liblzma/common/common.h | 3 - + src/liblzma/common/easy_buffer_encoder.c | 3 - + src/liblzma/common/easy_decoder_memusage.c | 3 - + src/liblzma/common/easy_encoder.c | 3 - + src/liblzma/common/easy_encoder_memusage.c | 3 - + src/liblzma/common/easy_preset.c | 3 - + src/liblzma/common/easy_preset.h | 3 - + src/liblzma/common/file_info.c | 3 - + src/liblzma/common/filter_buffer_decoder.c | 3 - + src/liblzma/common/filter_buffer_encoder.c | 3 - + src/liblzma/common/filter_common.c | 3 - + src/liblzma/common/filter_common.h | 3 - + src/liblzma/common/filter_decoder.c | 3 - + src/liblzma/common/filter_decoder.h | 3 - + src/liblzma/common/filter_encoder.c | 3 - + src/liblzma/common/filter_encoder.h | 3 - + src/liblzma/common/filter_flags_decoder.c | 3 - + src/liblzma/common/filter_flags_encoder.c | 3 - + src/liblzma/common/hardware_cputhreads.c | 3 - + src/liblzma/common/hardware_physmem.c | 3 - + src/liblzma/common/index.c | 3 - + src/liblzma/common/index.h | 3 - + src/liblzma/common/index_decoder.c | 3 - + src/liblzma/common/index_decoder.h | 3 - + src/liblzma/common/index_encoder.c | 3 - + src/liblzma/common/index_encoder.h | 3 - + src/liblzma/common/index_hash.c | 3 - + src/liblzma/common/lzip_decoder.c | 3 - + src/liblzma/common/lzip_decoder.h | 3 - + src/liblzma/common/memcmplen.h | 3 - + src/liblzma/common/microlzma_decoder.c | 3 - + src/liblzma/common/microlzma_encoder.c | 3 - + src/liblzma/common/outqueue.c | 3 - + src/liblzma/common/outqueue.h | 3 - + src/liblzma/common/stream_buffer_decoder.c | 3 - + src/liblzma/common/stream_buffer_encoder.c | 3 - + src/liblzma/common/stream_decoder.c | 3 - + src/liblzma/common/stream_decoder.h | 3 - + src/liblzma/common/stream_decoder_mt.c | 3 - + src/liblzma/common/stream_encoder.c | 3 - + src/liblzma/common/stream_encoder_mt.c | 3 - + src/liblzma/common/stream_flags_common.c | 3 - + src/liblzma/common/stream_flags_common.h | 3 - + src/liblzma/common/stream_flags_decoder.c | 3 - + src/liblzma/common/stream_flags_encoder.c | 3 - + src/liblzma/common/string_conversion.c | 3 - + src/liblzma/common/vli_decoder.c | 3 - + src/liblzma/common/vli_encoder.c | 3 - + src/liblzma/common/vli_size.c | 3 - + src/liblzma/delta/Makefile.inc | 3 - + src/liblzma/delta/delta_common.c | 3 - + src/liblzma/delta/delta_common.h | 3 - + src/liblzma/delta/delta_decoder.c | 3 - + src/liblzma/delta/delta_decoder.h | 3 - + src/liblzma/delta/delta_encoder.c | 3 - + src/liblzma/delta/delta_encoder.h | 3 - + src/liblzma/delta/delta_private.h | 3 - + src/liblzma/liblzma.pc.in | 3 - + src/liblzma/liblzma_w32res.rc | 3 - + src/liblzma/lz/Makefile.inc | 3 - + src/liblzma/lz/lz_decoder.c | 3 - + src/liblzma/lz/lz_decoder.h | 3 - + src/liblzma/lz/lz_encoder.c | 3 - + src/liblzma/lz/lz_encoder.h | 3 - + src/liblzma/lz/lz_encoder_hash.h | 3 - + src/liblzma/lz/lz_encoder_mf.c | 3 - + src/liblzma/lzma/Makefile.inc | 3 - + src/liblzma/lzma/fastpos.h | 3 - + src/liblzma/lzma/fastpos_tablegen.c | 3 - + src/liblzma/lzma/lzma2_decoder.c | 3 - + src/liblzma/lzma/lzma2_decoder.h | 3 - + src/liblzma/lzma/lzma2_encoder.c | 3 - + src/liblzma/lzma/lzma2_encoder.h | 3 - + src/liblzma/lzma/lzma_common.h | 3 - + src/liblzma/lzma/lzma_decoder.c | 3 - + src/liblzma/lzma/lzma_decoder.h | 3 - + src/liblzma/lzma/lzma_encoder.c | 3 - + src/liblzma/lzma/lzma_encoder.h | 3 - + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 3 - + src/liblzma/lzma/lzma_encoder_optimum_normal.c | 3 - + src/liblzma/lzma/lzma_encoder_presets.c | 3 - + src/liblzma/lzma/lzma_encoder_private.h | 3 - + src/liblzma/rangecoder/Makefile.inc | 3 - + src/liblzma/rangecoder/price.h | 3 - + src/liblzma/rangecoder/price_tablegen.c | 3 - + src/liblzma/rangecoder/range_common.h | 3 - + src/liblzma/rangecoder/range_decoder.h | 3 - + src/liblzma/rangecoder/range_encoder.h | 3 - + src/liblzma/simple/Makefile.inc | 3 - + src/liblzma/simple/arm.c | 3 - + src/liblzma/simple/arm64.c | 3 - + src/liblzma/simple/armthumb.c | 3 - + src/liblzma/simple/ia64.c | 3 - + src/liblzma/simple/powerpc.c | 3 - + src/liblzma/simple/riscv.c | 3 - + src/liblzma/simple/simple_coder.c | 3 - + src/liblzma/simple/simple_coder.h | 3 - + src/liblzma/simple/simple_decoder.c | 3 - + src/liblzma/simple/simple_decoder.h | 3 - + src/liblzma/simple/simple_encoder.c | 3 - + src/liblzma/simple/simple_encoder.h | 3 - + src/liblzma/simple/simple_private.h | 3 - + src/liblzma/simple/sparc.c | 3 - + src/liblzma/simple/x86.c | 3 - + src/liblzma/validate_map.sh | 3 - + src/lzmainfo/Makefile.am | 3 - + src/lzmainfo/lzmainfo.1 | 4 +- + src/lzmainfo/lzmainfo.c | 3 - + src/lzmainfo/lzmainfo_w32res.rc | 3 - + src/scripts/Makefile.am | 3 - + src/scripts/xzless.1 | 4 +- + src/xz/Makefile.am | 3 - + src/xz/args.c | 3 - + src/xz/args.h | 3 - + src/xz/coder.c | 3 - + src/xz/coder.h | 3 - + src/xz/file_io.c | 3 - + src/xz/file_io.h | 3 - + src/xz/hardware.c | 3 - + src/xz/hardware.h | 3 - + src/xz/list.c | 3 - + src/xz/list.h | 3 - + src/xz/main.c | 3 - + src/xz/main.h | 3 - + src/xz/message.c | 3 - + src/xz/message.h | 3 - + src/xz/mytime.c | 3 - + src/xz/mytime.h | 3 - + src/xz/options.c | 3 - + src/xz/options.h | 3 - + src/xz/private.h | 3 - + src/xz/signals.c | 3 - + src/xz/signals.h | 3 - + src/xz/suffix.c | 3 - + src/xz/suffix.h | 3 - + src/xz/util.c | 3 - + src/xz/util.h | 3 - + src/xz/xz.1 | 4 +- + src/xz/xz_w32res.rc | 3 - + src/xzdec/Makefile.am | 3 - + src/xzdec/lzmadec_w32res.rc | 3 - + src/xzdec/xzdec.1 | 4 +- + src/xzdec/xzdec.c | 3 - + src/xzdec/xzdec_w32res.rc | 3 - + tests/Makefile.am | 3 - + tests/bcj_test.c | 3 - + tests/code_coverage.sh | 3 - + tests/create_compress_files.c | 3 - + tests/files/README | 3 +- + tests/ossfuzz/fuzz_common.h | 3 - + tests/ossfuzz/fuzz_decode_alone.c | 3 - + tests/ossfuzz/fuzz_decode_stream.c | 3 - + tests/ossfuzz/fuzz_encode_stream.c | 3 - + tests/test_bcj_exact_size.c | 3 - + tests/test_block_header.c | 3 - + tests/test_check.c | 3 - + tests/test_compress.sh | 3 - + tests/test_files.sh | 3 - + tests/test_filter_flags.c | 3 - + tests/test_filter_str.c | 3 - + tests/test_hardware.c | 3 - + tests/test_index.c | 3 - + tests/test_index_hash.c | 3 - + tests/test_lzip_decoder.c | 3 - + tests/test_memlimit.c | 3 - + tests/test_scripts.sh | 3 - + tests/test_stream_flags.c | 3 - + tests/test_suffix.sh | 3 - + tests/test_vli.c | 3 - + tests/tests.h | 3 - + tests/tuktest.h | 3 - + windows/README-Windows.txt | 11 +-- + windows/build.bash | 3 - + 288 files changed, 100 insertions(+), 911 deletions(-) + +commit 76946dc4336c831fe2cc26696a035d807dd3cf13 +Author: Lasse Collin +Date: 2024-02-09 17:20:31 +0200 + + Fix SHA-256 authors. + + The initial commit 5d018dc03549c1ee4958364712fb0c94e1bf2741 + in 2007 had a comment in sha256.c that the code is based on + Crypto++ Library 5.5.1. In 2009 the Authors list in sha256.c + and the AUTHORS file was updated with information that the + code had come from Crypto++ but via 7-Zip. I know I had viewed + 7-Zip's SHA-256 code but back then the C code has been identical + enough with Crypto++, so I don't why I thought the author info + would need that extra step via 7-Zip for this single file. + + Another error is that I had mixed sha.* and shacal2.* files + when checking for author info in Crypto++. The shacal2.* files + aren't related to liblzma's sha256.c and thus Kevin Springle's + code in Crypto++ isn't either. + + AUTHORS | 6 ++---- + src/liblzma/check/sha256.c | 14 ++++---------- + 2 files changed, 6 insertions(+), 14 deletions(-) + +commit 21d9cbae9eecca28ce373d3d9464defd2cf5d851 +Author: Lasse Collin +Date: 2024-02-09 17:20:31 +0200 + + Remove macosx/build.sh. + + It was last updated in 2013. + + Makefile.am | 1 - + macosx/build.sh | 113 -------------------------------------------------------- + 2 files changed, 114 deletions(-) + +commit eac2c3c67f9113a225fb6667df862edd30366931 +Author: Lasse Collin +Date: 2024-02-09 17:20:31 +0200 + + Doc: Remove doc/examples_old. + + It was good to keep these around in parallel with the newer examples + but I think it's OK to remove the old ones at this point. + + Makefile.am | 5 -- + doc/examples_old/xz_pipe_comp.c | 127 -------------------------------------- + doc/examples_old/xz_pipe_decomp.c | 123 ------------------------------------ + 3 files changed, 255 deletions(-) + +commit 89ea1a22f4ed3685b053b7260bc5acf6c75d1664 +Author: Jia Tan +Date: 2024-02-13 22:38:58 +0800 + + Tests: Add RISC-V filter support in a few places. + + tests/test_filter_flags.c | 6 ++++++ + tests/test_filter_str.c | 6 ++++++ + 2 files changed, 12 insertions(+) + +commit 45663443eb2b377e6171529380fee312f1adcdf4 +Author: Jia Tan +Date: 2024-02-13 22:37:07 +0800 + + liblzma: Fix build error if only RISC-V BCJ filter is enabled. + + If any other BCJ filter was enabled for encoding or decoding, then this + was not a problem. + + src/liblzma/common/string_conversion.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 2f15597d677bc35743c777d4cf3bfa698b478681 Author: Jia Tan -Date: 2022-08-17 17:59:51 +0800 +Date: 2024-02-13 22:56:24 +0800 - liblzma: Replaced hardcoded 0x0 index indicator byte with macro + Translations: Update the Korean translation. - src/liblzma/common/index.h | 3 +++ - src/liblzma/common/index_decoder.c | 2 +- - src/liblzma/common/index_encoder.c | 2 +- - src/liblzma/common/index_hash.c | 2 +- - src/liblzma/common/stream_decoder.c | 3 ++- - src/liblzma/common/stream_decoder_mt.c | 2 +- - 6 files changed, 9 insertions(+), 5 deletions(-) + po/ko.po | 526 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 284 insertions(+), 242 deletions(-) -commit 39d2585dcd3e827cfc3c46025ab6708c4aeb36c6 +commit df873143ad1615c6d6aaa1bf8808b1676091dfe3 Author: Jia Tan -Date: 2023-01-06 20:43:31 +0800 +Date: 2024-02-13 01:55:53 +0800 - Style: Change #if !defined() to #ifndef in mythread.h. + Translations: Update the Korean man page translations. - src/common/mythread.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po4a/ko.po | 1375 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 770 insertions(+), 605 deletions(-) -commit 3f0130aa288e4ed57ace609517db9700a41223af +commit b3f415eddb150341865a1af47959c3baba076b33 Author: Jia Tan -Date: 2023-01-06 20:35:55 +0800 +Date: 2024-02-13 01:53:33 +0800 - Build: Add missing stream_decoder_mt.c to .vcxproj files. - - The line in the .vcxproj files for building with was missing in 5.4.0. - Thank to Hajin Jang for reporting the issue. + Translations: Update the Chinese (simplified) translation. - windows/vs2013/liblzma.vcxproj | 1 + - windows/vs2013/liblzma_dll.vcxproj | 1 + - windows/vs2017/liblzma.vcxproj | 1 + - windows/vs2017/liblzma_dll.vcxproj | 1 + - windows/vs2019/liblzma.vcxproj | 1 + - windows/vs2019/liblzma_dll.vcxproj | 1 + - 6 files changed, 6 insertions(+) + po/zh_CN.po | 424 ++++++++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 268 insertions(+), 156 deletions(-) -commit f204d1050a515d17851eed9049862ce5a9c729c1 +commit 9860d418d296eb3c721e5384fb367c0499b579c8 Author: Lasse Collin -Date: 2023-01-04 22:40:54 +0200 +Date: 2024-02-09 23:21:01 +0200 - Update THANKS. + xzless: Use ||- in LESSOPEN with with "less" 451 and newer. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/scripts/xzless.in | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit 34a9c2d650d6c30bd88e1b21910dd863209aa884 +commit fd0692b0525e6c26b496492be9e2c865cab734f8 Author: Lasse Collin -Date: 2023-01-04 18:40:28 +0200 +Date: 2024-02-09 23:00:05 +0200 - Tests: Adjust style in test_compress.sh. + xzless: Use --show-preproc-errors with "less" 632 and newer. + + This makes "less" show a warning if a decompression error occurred. - tests/test_compress.sh | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) + src/scripts/xzless.in | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) -commit 761c208d58e0c3daa0f46e68b406adfc318d2a46 +commit adb073da76a920b5a81e6b32254f4ddb054dc57a Author: Jia Tan -Date: 2023-01-04 23:58:58 +0800 +Date: 2024-02-09 23:59:54 +0800 - Tests: Replace non portable shell parameter expansion - - The shell parameter expansion using # and ## is not supported in - Solaris 10 Bourne shell (/bin/sh). Even though this is POSIX, it is not fully - portable, so we should avoid it. + liblzma: Fix typo discovered by codespell. - tests/create_compress_files.c | 2 +- - tests/test_compress.sh | 20 +++++++++++++------- - tests/test_compress_prepared_bcj_sparc | 2 +- - tests/test_compress_prepared_bcj_x86 | 2 +- - 4 files changed, 16 insertions(+), 10 deletions(-) + src/liblzma/check/crc32_arm64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8a7cbc074547e55e57f4f3696f69bedeb05e14c4 +commit 55d9fc883d221cbace951a370f1fb144698f8c2e Author: Jia Tan -Date: 2023-01-03 21:02:38 +0800 +Date: 2024-02-09 20:01:06 +0800 - Translations: Add Korean translation of man pages. - - Thanks to Seong-ho Cho + Translations: Update the Swedish translation. - po4a/ko.po | 5552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po4a/po4a.conf | 2 +- - 2 files changed, 5553 insertions(+), 1 deletion(-) + po/sv.po | 420 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 254 insertions(+), 166 deletions(-) -commit ca2af49bb8be5995eb0e6a3abf457622626d49a7 +commit 55ba4a1ea321499c805eedfa811ffde690bae311 Author: Jia Tan -Date: 2023-01-03 20:47:27 +0800 +Date: 2024-02-08 20:09:04 +0800 - Translations: Update the Esperanto translation. + Translations: Update the Spanish translation. - po/eo.po | 620 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 332 insertions(+), 288 deletions(-) + po/es.po | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) -commit bfba3394aed03311fe9a746d3141b2e16d8b9325 -Author: Lasse Collin -Date: 2023-01-02 17:05:07 +0200 +commit 7f2293cd804a89d3c3b2d3ed573560ca9e1520ae +Author: Jia Tan +Date: 2024-02-07 21:34:35 +0800 - Build: Fix config.h comments. + Translations: Update the Spanish translation. - configure.ac | 2 +- - m4/tuklib_progname.m4 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + po/es.po | 419 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 253 insertions(+), 166 deletions(-) -commit 507648ad114c2ae0cd6d181063e1ac07e8106718 +commit f4af2036bc625739d6d33d9e1fede583a25c3828 Author: Jia Tan -Date: 2023-01-02 22:33:48 +0800 +Date: 2024-02-07 21:28:32 +0800 - Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1. - - HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to - HAVE_PROGRAM_INVOCATION_NAME. Previously, - HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when - building with autotools. CMake would only set this when it was 1, and the - dos/config.h did not define it. The new macro definition is consistent - across build systems. + Translations: Update the Polish translation. - cmake/tuklib_progname.cmake | 5 ++--- - m4/tuklib_progname.m4 | 5 ++++- - src/common/tuklib_progname.c | 2 +- - src/common/tuklib_progname.h | 2 +- - 4 files changed, 8 insertions(+), 6 deletions(-) + po/pl.po | 411 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 249 insertions(+), 162 deletions(-) -commit ab5229d32adfec1f3fbc95228d9dd6f560732ab5 -Author: Lasse Collin -Date: 2022-12-30 20:10:08 +0200 +commit e5e93bb816043c559cddf03a3b7ba13bec353ee4 +Author: Jia Tan +Date: 2024-02-07 19:40:12 +0800 - Tests: test_check: Test corner cases of CLMUL CRC64. + Translations: Update the German translation. - tests/test_check.c | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) + po/de.po | 396 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 242 insertions(+), 154 deletions(-) -commit 8791826f31733fda0a13b411c2ed930faaeb25aa -Author: Lasse Collin -Date: 2022-12-30 19:36:49 +0200 +commit 28f18ff8e26902762fb007c13be235b4ac1ac071 +Author: Jia Tan +Date: 2024-02-07 19:27:25 +0800 - Tests: Clarify a comment in test_lzip_decoder.c. + Translations: Update the German man page translations. - tests/test_lzip_decoder.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + po4a/de.po | 1353 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 752 insertions(+), 601 deletions(-) -commit c410d812ea12bfc74f6b727c1a799478c79f19ca +commit cabfbc7947da05aa5dfe39bec9759e076f940e3c Author: Jia Tan -Date: 2022-12-29 01:55:19 +0800 +Date: 2024-02-06 23:44:06 +0800 - xz: Includes and conditionally in mytime.c. - - Previously, mytime.c depended on mythread.h for to be included. + Translations: Update the Romanian translation. - src/xz/mytime.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + po/ro.po | 416 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 252 insertions(+), 164 deletions(-) -commit 501c6013d4a59fae5d4368e9657c4885493db809 +commit bf20c94f5d748cea2147779f4fa7e2fd2eb8555e Author: Jia Tan -Date: 2022-12-29 01:15:27 +0800 +Date: 2024-02-06 23:45:02 +0800 - liblzma: Includes sys/time.h conditionally in mythread - - Previously, was always included, even if mythread only used - clock_gettime. is still needed even if clock_gettime is not used - though because struct timespec is needed for mythread_condtime. + Translations: Update the Romanian man page translations. - src/common/mythread.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + po4a/ro.po | 1759 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 966 insertions(+), 793 deletions(-) -commit 9e3cb514b5b95bd235dcdff3db4436f57444ee4f +commit 7c25ec9feb0241e4affb7432681cc4f5696f3a96 Author: Jia Tan -Date: 2022-12-29 01:10:53 +0800 +Date: 2024-02-07 20:56:57 +0800 - Build: No longer require HAVE_DECL_CLOCK_MONOTONIC to always be set. - - Previously, if threading was enabled HAVE_DECL_CLOCK_MONOTONIC would always - be set to 0 or 1. However, this macro was needed in xz so if xz was not - built with threading and HAVE_DECL_CLOCK_MONOTONIC was not defined but - HAVE_CLOCK_GETTIME was, it caused a warning during build. Now, - HAVE_DECL_CLOCK_MONOTONIC has been renamed to HAVE_CLOCK_MONOTONIC and - will only be set if it is 1. + Translations: Update the Ukrainian translation. + + po/uk.po | 397 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 242 insertions(+), 155 deletions(-) + +commit b3523250e9eef10b017473754c1e1c9e31f10374 +Author: Jia Tan +Date: 2024-02-06 23:30:03 +0800 + + Translations: Update the Ukrainian man page translations. + + po4a/uk.po | 1363 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 764 insertions(+), 599 deletions(-) + +commit a5c177f514f4c90e0d2f6045636fca6c2e80a20d +Author: Jia Tan +Date: 2024-02-02 01:39:28 +0800 + + Update AUTHORS. + + AUTHORS | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 7f68a68c19d0ae57bd0e802be0ea8f974e41299f +Author: Jia Tan +Date: 2024-02-02 01:38:51 +0800 + + liblzma: Update Authors list in crc32_arm64.h. + + src/liblzma/check/crc32_arm64.h | 1 + + 1 file changed, 1 insertion(+) + +commit 97f9ba50b84e67b3dcb5b17dd5d3e1d14f9ad1d0 +Author: Jia Tan +Date: 2024-02-01 16:07:03 +0800 - CMakeLists.txt | 8 +++----- - configure.ac | 5 ++++- - src/common/mythread.h | 4 ++-- - src/xz/mytime.c | 5 ++--- - 4 files changed, 11 insertions(+), 11 deletions(-) + liblzma: Check HAVE_USABLE_CLMUL before omitting CRC32 table. + + This was split from the prior commit so it could be easily applied to + the 5.4 branch. + + Closes: https://github.com/tukaani-project/xz/pull/77 -commit 6fc3e5467911572fa9af4021ea46396261aae796 + src/liblzma/check/crc32_table.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ca9015f4dead2c97b48f5a6933631b0a448b65b9 Author: Jia Tan -Date: 2022-12-28 01:14:07 +0800 +Date: 2024-02-01 16:06:29 +0800 - Translations: Add Ukrainian translations of man pages. + liblzma: Check HAVE_USABLE_CLMUL before omitting CRC64 table. - Thanks to Yuri Chornoivan + If liblzma is configured with --disable-clmul-crc + CFLAGS="-msse4.1 -mpclmul", then it will fail to compile because the + generic version must be used but the CRC tables were not included. - po4a/po4a.conf | 2 +- - po4a/uk.po | 3676 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 3677 insertions(+), 1 deletion(-) + src/liblzma/check/crc64_table.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit e84f2ab7f8bc38cd8f8befa0bb398656c3c11f8e +commit 2f1552a91c825e87013925e1a67a0930e7aef592 Author: Jia Tan -Date: 2022-12-22 23:14:53 +0800 +Date: 2024-01-23 18:02:13 +0800 - liblzma: Update documentation for lzma_filter_encoder. + liblzma: Only use ifunc in crcXX_fast.c if its needed. + + The code was using HAVE_FUNC_ATTRIBUTE_IFUNC instead of CRC_USE_IFUNC. + With ARM64, ifunc is incompatible because it requires non-inline + function calls for runtime detection. - src/liblzma/common/filter_encoder.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/liblzma/check/crc32_fast.c | 6 +++--- + src/liblzma/check/crc64_fast.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) -commit b14b8dbba9a3b232787ae218b46430b9246383dd +commit 30a25f3742287697bc57a1bef86c19ecf5129322 Author: Jia Tan -Date: 2022-12-21 21:12:03 +0800 +Date: 2024-01-22 22:08:45 +0800 - Tests: Adds lzip decoder tests + Docs: Add --disable-arm64-crc32 description to INSTALL. - .gitignore | 1 + - tests/Makefile.am | 2 + - tests/test_lzip_decoder.c | 471 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 474 insertions(+) + INSTALL | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) -commit 09a114805e1d4f9a02a06cee7dbf2f5014d1f710 -Author: Jia Cheong Tan -Date: 2022-12-20 22:05:21 +0800 +commit 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad +Author: Jia Tan +Date: 2024-01-22 21:36:09 +0800 - Doxygen: Update .gitignore for generating docs for in source build. + liblzma: Omit CRC tables when not needed with ARM64 optimizations. - In source builds are not recommended, but we should still ignore - the generated artifacts. + This is similar to the existing x86-64 CLMUL conditions to omit the + tables. They were slightly refactored to improve readability. - .gitignore | 2 ++ - 1 file changed, 2 insertions(+) + src/liblzma/check/crc32_table.c | 18 +++++++++++++++--- + src/liblzma/check/crc64_table.c | 7 ++++++- + src/liblzma/check/crc_common.h | 5 ++++- + 3 files changed, 25 insertions(+), 5 deletions(-) -commit d3e6fe44196bf9478ad193522e2b48febf2eca6b +commit 761f5b69a4c778c8bcb09279b845b07c28790575 Author: Jia Tan -Date: 2022-12-20 20:46:44 +0800 +Date: 2024-01-22 20:54:56 +0800 - liblzma: Fix lzma_microlzma_encoder() return value. + liblzma: Rename crc32_aarch64.h to crc32_arm64.h. - Using return_if_error on lzma_lzma_lclppb_encode was improper because - return_if_error is expecting an lzma_ret value, but - lzma_lzma_lclppb_encode returns a boolean. This could result in - lzma_microlzma_encoder, which would be misleading for applications. + Even though the proper name for the architecture is aarch64, this + project uses ARM64 throughout. So the rename is for consistency. + + Additionally, crc32_arm64.h was slightly refactored for the following + changes: + + * Added MSVC, FreeBSD, and macOS support in + is_arch_extension_supported(). + + * crc32_arch_optimized() now checks the size when aligning the + buffer. + + * crc32_arch_optimized() loop conditions were slightly modified to + avoid both decrementing the size and incrementing the buffer + pointer. + + * Use the intrinsic wrappers defined in because GCC and + Clang name them differently. + + * Minor spacing and comment changes. - src/liblzma/common/microlzma_encoder.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 2 +- + src/liblzma/check/Makefile.inc | 2 +- + src/liblzma/check/crc32_aarch64.h | 109 ---------------------------------- + src/liblzma/check/crc32_arm64.h | 119 ++++++++++++++++++++++++++++++++++++++ + src/liblzma/check/crc32_fast.c | 3 +- + src/liblzma/check/crc64_fast.c | 3 - + 6 files changed, 122 insertions(+), 116 deletions(-) -commit b55a27b46f52524a4a8d9cdef03e6689cefc1375 -Author: Lasse Collin -Date: 2022-12-16 18:30:02 +0200 +commit 455a08609caa3223066a717fb01bfa42c5dba47d +Author: Jia Tan +Date: 2024-01-22 20:49:30 +0800 - liblzma: Update authors list in arm64.c. + liblzma: Refactor crc_common.h. + + The CRC_GENERIC is now split into CRC32_GENERIC and CRC64_GENERIC, since + the ARM64 optimizations will be different between CRC32 and CRC64. + + For the same reason, CRC_ARCH_OPTIMIZED is split into + CRC32_ARCH_OPTIMIZED and CRC64_ARCH_OPTIMIZED. + + ifunc will only be used with x86-64 CLMUL because the runtime detection + methods needed with ARM64 are not compatible with ifunc. - src/liblzma/simple/arm64.c | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_fast.c | 8 +-- + src/liblzma/check/crc64_fast.c | 8 +-- + src/liblzma/check/crc_common.h | 108 ++++++++++++++++++++++++++++------------- + 3 files changed, 82 insertions(+), 42 deletions(-) -commit 2fd28d2b7cec3468324a6f15eff7e73c285b1d7d +commit 61908e816049af7a9f43ea804a57ee8570e2e644 Author: Jia Tan -Date: 2022-12-16 20:58:55 +0800 +Date: 2024-01-22 00:42:28 +0800 - CMake: Update .gitignore for CMake artifacts from in source build. - - In source builds are not recommended, but we can make it easier - by ignoring the generated artifacts from CMake. + CMake: Add support for ARM64 CRC32 instruction detection. - .gitignore | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) + CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) -commit b69da6d4bb6bb11fc0cf066920791990d2b22a06 -Author: Lasse Collin -Date: 2022-12-13 20:37:17 +0200 +commit c5f6d79cc9515a7f22d7ea4860c6cc394b295732 +Author: Jia Tan +Date: 2024-01-22 00:36:47 +0800 - Bump version to 5.4.0 and soname to 5.4.0. + Build: Add support for ARM64 CRC32 instruction detection. + + This adds --enable-arm64-crc32/--disable-arm64-crc32 (enabled by + default) for using the ARM64 CRC32 instruction. This can be disabled if + one knows the binary will never need to run on an ARM64 machine + with this instruction extension. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 6 +++--- - src/liblzma/liblzma_generic.map | 2 +- - src/liblzma/liblzma_linux.map | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) + configure.ac | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 52 insertions(+) -commit 20869eb3fb280ff4f271ef527b12b6bf68b05e19 -Author: Lasse Collin -Date: 2022-12-13 20:29:39 +0200 +commit 849d0f282a6a890c5cf5a0e0f02980b12d9ebb0f +Author: Chenxi Mao +Date: 2024-01-09 17:23:11 +0800 - Update INSTALL: CMake on Windows isn't experimental anymore. + Speed up CRC32 calculation on ARM64 - Using CMake to build liblzma should work on a few other OSes - but building the command line tools is still subtly broken. + The CRC32 instructions in ARM64 can calculate the CRC32 result + for 8 bytes in a single operation, making the use of ARM64 + instructions much faster compared to the general CRC32 algorithm. - It is known that shared library versioning may differ between - CMake and Libtool builds on some OSes, most notably Darwin. + Optimized CRC32 will be enabled if ARM64 has CRC extension + running on Linux. + + Signed-off-by: Chenxi Mao - INSTALL | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) + CMakeLists.txt | 1 + + src/liblzma/check/Makefile.inc | 3 +- + src/liblzma/check/crc32_aarch64.h | 109 ++++++++++++++++++++++++++++++++++++++ + src/liblzma/check/crc32_fast.c | 5 +- + src/liblzma/check/crc64_fast.c | 5 +- + src/liblzma/check/crc_common.h | 16 +++--- + 6 files changed, 130 insertions(+), 9 deletions(-) -commit cbbd84451944e3e8c63acfaa3c923f6d8aff7852 -Author: Lasse Collin -Date: 2022-12-13 19:47:53 +0200 +commit b43c3e48bf6097095eef36d44cdbec811074940a +Author: Jia Tan +Date: 2024-01-26 19:05:51 +0800 - Add NEWS for 5.4.0. + Bump version number for 5.5.1alpha. - NEWS | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 202 insertions(+) + src/liblzma/api/lzma/version.h | 2 +- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) -commit c3e94d37e8d10a3e96019864b6f5d7b578db2c14 -Author: Lasse Collin -Date: 2022-12-13 17:41:20 +0200 +commit c7a7ae1500ea90bd3c2d54533e4f433933eb598f +Author: Jia Tan +Date: 2024-01-26 19:00:52 +0800 - Fix a typo in NEWS. + Add NEWS for 5.5.1alpha - NEWS | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + NEWS | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 80 insertions(+) -commit 0d2a2e0a545c3da2b3e9500f1e531eb903087245 -Author: Lasse Collin -Date: 2022-12-13 17:41:03 +0200 +commit 0ef8192e8d5af4e6200d5d4aee22d1f177f7a2df +Author: Jia Tan +Date: 2024-01-26 18:54:24 +0800 - Add NEWS for 5.2.10. + Add NEWS for 5.4.6. - NEWS | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + NEWS | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) -commit 177ece1c8eb007188fb1b04eff09ca2193fbdea6 +commit 93de7e751d17731315a899264f2a7239d7d2d316 Author: Lasse Collin -Date: 2022-12-13 12:30:45 +0200 +Date: 2024-01-24 20:00:57 +0200 - Tests: Fix a typo in tests/files/README. + Move doc/logo/xz-logo.png to "doc" and Doxygen footer to "doxygen". + + The footer isn't a complete HTML file so having it in the doxygen + directory is a tiny bit clearer. - tests/files/README | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Makefile.am | 2 +- + doc/{logo => }/xz-logo.png | Bin + doxygen/Doxyfile | 4 ++-- + doc/logo/copyright.html => doxygen/footer.html | 0 + 4 files changed, 3 insertions(+), 3 deletions(-) -commit 60f45bdbaa6b07558b3f4baac285739b0c6342f5 -Author: Lasse Collin -Date: 2022-12-13 12:30:09 +0200 +commit 00fa01698df51c58ae2acf8c7fa4e1fb159f75a9 +Author: Jia Tan +Date: 2024-01-09 17:05:01 +0800 - Tests: Add two ARM64 test files. + README: Add COPYING.CC-BY-SA-4.0 entry to section 1.1. + + The Overall documentation section (1.1) table spacing had to be adjusted + since the filename was very long. - tests/files/README | 7 +++++++ - tests/files/good-1-arm64-lzma2-1.xz | Bin 0 -> 512 bytes - tests/files/good-1-arm64-lzma2-2.xz | Bin 0 -> 488 bytes - tests/test_files.sh | 5 +++++ - 4 files changed, 12 insertions(+) + README | 38 ++++++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 18 deletions(-) -commit f5e419550619c548c7c35d7e367cf00580a56521 -Author: Lasse Collin -Date: 2022-12-12 22:44:21 +0200 +commit e280470040b27c5e58d78b25b9e2bb71fc6c3882 +Author: Jia Tan +Date: 2024-01-09 16:56:16 +0800 - Translations: Update the Catalan translation. + Build: Add the logo and license to the release. - po/ca.po | 657 +++++++++++++++++++++++++++++---------------------------------- - 1 file changed, 306 insertions(+), 351 deletions(-) + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) -commit 0fb9d355da3789b1757040af475b4e6bbc8b8af8 -Author: Lasse Collin -Date: 2022-12-12 19:18:12 +0200 +commit b1ee6cf259bb49ce91abe9f622294524e37edf4c +Author: Jia Tan +Date: 2024-01-09 16:44:42 +0800 - Update THANKS. + COPYING: Add the license for the XZ logo. - THANKS | 1 + - 1 file changed, 1 insertion(+) + COPYING | 5 + + COPYING.CC-BY-SA-4.0 | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 432 insertions(+) -commit e5b6c161c61a37c54dcb76a99bbb83ac4abe02dc -Author: Lasse Collin -Date: 2022-12-12 19:07:58 +0200 +commit 31293ae7074802cc7286089a89c7b552d930c97f +Author: Jia Tan +Date: 2024-01-09 16:40:56 +0800 - Update AUTHORS. + Doxygen: Added the XZ logo and copyright information. + + The PROJECT_LOGO field is now used to include the XZ logo. The footer + of each page now lists the copyright information instead of the default + footer. The license is also copied to statisfy the copyright and so the + link in the documentation can be local. - AUTHORS | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + doc/logo/copyright.html | 11 +++++++++++ + doc/logo/xz-logo.png | Bin 0 -> 6771 bytes + doxygen/Doxyfile | 6 +++--- + 3 files changed, 14 insertions(+), 3 deletions(-) -commit f2d98e691099d82054d5f3071ef6f5e809932e44 +commit 6daa4d0ea46a8441f21f609149f3633158bf4704 Author: Lasse Collin -Date: 2022-12-12 15:31:14 +0200 +Date: 2024-01-23 18:29:28 +0200 - Docs: Omit multi-threaded decompress from TODO. + xz: Use threaded mode by defaut (as if --threads=0 was used). + + This hopefully does more good than bad: + + + It's faster by default. + + + Only the threaded compressor creates files that + can be decompressed in threaded mode. - The TODO file outdated still. + - Compression ratio is worse, usually not too much though. + When it matters, -T1 must be used. + + - Memory usage increases. + + - Scripts that assume single-threaded mode but don't use -T1 will + possibly use too much resources, for example, if they run + multiple xz processes in parallel to compress multiple files. + + - Output from single-threaded and multi-threaded compressors + differ but such changes could happen for other reasons too + (they just haven't happened since 5.0.0). - TODO | 2 -- - 1 file changed, 2 deletions(-) + src/xz/hardware.c | 6 +++++- + src/xz/message.c | 4 ++-- + src/xz/xz.1 | 9 +++++++++ + 3 files changed, 16 insertions(+), 3 deletions(-) -commit b42908c42a4cc091db45a7e5ba0e0ecceaa3f6da -Author: Lasse Collin -Date: 2022-12-11 21:16:09 +0200 +commit a2dd2dc8e5307a7280bb99868bc478560facba2c +Author: Jia Tan +Date: 2024-01-23 23:52:49 +0800 - Docs: Update xz-file-format.txt to 1.1.0 for ARM64 filter. + CI: Use RISC-V filter when building with BCJ support. - doc/xz-file-format.txt | 29 ++++++++++++++++++++++------- - 1 file changed, 22 insertions(+), 7 deletions(-) + build-aux/ci_build.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 854f2f5946b353cb0963fd6dfd54d363adc89b9f -Author: Lasse Collin -Date: 2022-12-11 21:13:57 +0200 +commit 3060e1070b2421b26c0e17794c1307ec5622f11d +Author: Jia Tan +Date: 2024-01-23 23:52:14 +0800 - xz: Rename --experimental-arm64 to --arm64. + Tests: Use smaller dictionary size in RISC-V test files. - src/xz/args.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/files/good-1-riscv-lzma2-1.xz | Bin 7512 -> 7512 bytes + tests/files/good-1-riscv-lzma2-2.xz | Bin 7516 -> 7512 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) -commit 31dbd1e5fb65831915a7bbb531c3f19aea8d57a5 -Author: Lasse Collin -Date: 2022-12-11 21:13:06 +0200 +commit 44ff2fa5c94dc345c4dd69195a19fc5238df60b3 +Author: Jia Tan +Date: 2024-01-23 23:50:57 +0800 - liblzma: Change LZMA_FILTER_ARM64 to the official Filter ID 0x0A. + Tests: Skip RISC-V test files if decoder was not built. - src/liblzma/api/lzma/bcj.h | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) + tests/test_files.sh | 5 +++++ + 1 file changed, 5 insertions(+) -commit 01b3549e523edac899ec4925b282ceddd20da116 +commit 6133a3f30049d3beaf7d22535b1e5d38e109be4e Author: Lasse Collin -Date: 2022-12-08 19:24:22 +0200 +Date: 2024-01-23 16:11:54 +0200 - xz: Make args_info.files_name a const pointer. + xz: Man page: Add more examples of LZMA2 options with BCJ filters. - src/xz/args.c | 2 +- - src/xz/args.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xz/xz.1 | 38 +++++++++++++++++++++++++++++++------- + 1 file changed, 31 insertions(+), 7 deletions(-) -commit bc665b84ea6bf7946394a08122177efe41b26a5f +commit 50255feeaabcc7e7db22b858a6bd64a9b5b4f16d Author: Lasse Collin -Date: 2022-12-08 19:18:16 +0200 +Date: 2024-01-23 00:09:48 +0200 - xz: Don't modify argv[]. + liblzma: RISC-V filter: Use byte-by-byte access. - The code that parses --memlimit options and --block-list modified - the argv[] when parsing the option string from optarg. This was - visible in "ps auxf" and such and could be confusing. I didn't - understand it back in the day when I wrote that code. Now a copy - is allocated when modifiable strings are needed. + Not all RISC-V processors support fast unaligned access so + it's better to read only one byte in the main loop. This can + be faster even on x86-64 when compared to reading 32 bits at + a time as half the time the address is only 16-bit aligned. + + The downside is larger code size on archs that do support + fast unaligned access. - src/xz/args.c | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) + src/liblzma/simple/riscv.c | 114 +++++++++++++++++++++++++++++++++------------ + 1 file changed, 84 insertions(+), 30 deletions(-) -commit a13064e1c290de7933db72b6dffbd65cfce59c9f -Author: Lasse Collin -Date: 2022-12-08 18:18:57 +0200 +commit db5eb5f563e8baa8d912ecf576f53391ff861596 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 - Translations: Update the German man page translations. + xz: Update xz -lvv for RISC-V filter. + + Version 5.6.0 will be shown, even though upcoming alphas and betas + will be able to support this filter. 5.6.0 looks nicer in the output and + people shouldn't be encouraged to use an unstable version in production + in any way. - po4a/de.po | 4570 ++++++++++++++++++------------------------------------------ - 1 file changed, 1374 insertions(+), 3196 deletions(-) + src/xz/list.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 8bdbe42a8d0d75dff70206b923fc4bce5c69a40a +commit e2870db5be1503e6a489fc3d47daf950d6f62723 Author: Jia Tan -Date: 2022-12-06 23:05:56 +0800 +Date: 2024-01-22 23:33:39 +0800 - Translations: Update the German translation. + Tests: Add two RISC-V Filter test files. + + These test files achieve 100% code coverage in + src/liblzma/simple/riscv.c. They contain all of the instructions that + should be filtered and a few cases that should not. + + tests/files/README | 8 ++++++++ + tests/files/good-1-riscv-lzma2-1.xz | Bin 0 -> 7512 bytes + tests/files/good-1-riscv-lzma2-2.xz | Bin 0 -> 7516 bytes + 3 files changed, 8 insertions(+) - po/de.po | 586 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 315 insertions(+), 271 deletions(-) +commit b26a89869315ece2f6d9d10d32d45f672550f245 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + xz: Update message in --long-help for RISC-V Filter. + + src/xz/message.c | 1 + + 1 file changed, 1 insertion(+) -commit 5c304b57c24ef40ff57f864301065f0244c05bde +commit 283f778908873eca61388029fc418fa800c9d7d7 Author: Jia Tan -Date: 2022-12-06 23:04:25 +0800 +Date: 2024-01-22 23:33:39 +0800 - Translations: Update the Turkish translation. + xz: Update the man page for the RISC-V Filter. + + A special note was added to suggest using four-byte alignment when the + compressed instruction extension is not present in a RISC-V binary. - po/tr.po | 221 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 108 insertions(+), 113 deletions(-) + src/xz/xz.1 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 6d86781fdb937970486500447ebb49b98244235b +commit ac3691ccca051d67f60b4a3b05b88e511d0b1b28 Author: Jia Tan -Date: 2022-12-06 23:02:11 +0800 +Date: 2024-01-22 23:33:39 +0800 - Translations: Update the Croatian translation. + Tests: Add RISC-V Filter test in test_compress.sh. - po/hr.po | 228 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 113 insertions(+), 115 deletions(-) + tests/test_compress.sh | 1 + + 1 file changed, 1 insertion(+) -commit 7a5b4b8075eb36026b1796f04ffed5830c42396a +commit 2959dbc7358efcf421ce51bc9cd7eae8fdd8fec4 Author: Jia Tan -Date: 2022-12-06 22:56:30 +0800 +Date: 2024-01-22 23:33:39 +0800 - Translations: Add Romanian translation of man pages. - - Thanks to Remus-Gabriel Chelu. + liblzma: Update string_conversion.c to support RISC-V Filter. - po4a/po4a.conf | 2 +- - po4a/ro.po | 3692 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 3693 insertions(+), 1 deletion(-) + src/liblzma/common/string_conversion.c | 5 +++++ + 1 file changed, 5 insertions(+) -commit c6977e7400088177556e8771bcb839eb7d90caa3 +commit 34372a5adbe5a7f6bf29498410ba3a463a720966 Author: Jia Tan -Date: 2022-12-06 22:52:13 +0800 +Date: 2024-01-22 23:33:39 +0800 - Translations: Update the Romanian translation. + CMake: Support RISC-V BCJ Filter for encoding and decoding. - po/ro.po | 294 +++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 147 insertions(+), 147 deletions(-) + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) -commit ac2a747e939c2cbccff7a49c399769af5e02d2ab -Author: Lasse Collin -Date: 2022-12-08 17:30:09 +0200 +commit 440a2eccb082dc13400c09e22308a58fef85146c +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 - liblzma: Check for unexpected NULL pointers in block_header_decode(). + liblzma: Add RISC-V BCJ filter. + + The new Filter ID is 0x0B. - The API docs gave an impression that such checks are done - but they actually weren't done. In practice it made little - difference since the calling code has a bug if these are NULL. + Thanks to Chien Wong for the initial version of the Filter, + the xz CLI updates, and the Autotools build system modifications. - Thanks to Jia Tan for the original patch that checked for - block->filters == NULL. + Thanks to Igor Pavlov for his many contributions to the design of + the filter. - src/liblzma/common/block_header_decoder.c | 4 ++++ - 1 file changed, 4 insertions(+) + configure.ac | 4 +- + src/liblzma/api/lzma/bcj.h | 5 + + src/liblzma/common/filter_common.c | 9 + + src/liblzma/common/filter_decoder.c | 8 + + src/liblzma/common/filter_encoder.c | 10 + + src/liblzma/simple/Makefile.inc | 4 + + src/liblzma/simple/riscv.c | 688 ++++++++++++++++++++++++++++++++++++ + src/liblzma/simple/simple_coder.h | 9 + + src/xz/args.c | 7 + + 9 files changed, 742 insertions(+), 2 deletions(-) -commit 24790f49ae66938c1c7574315e1c0aba1ed5ed25 -Author: Lasse Collin -Date: 2022-12-01 20:59:32 +0200 +commit 5540f4329bbdb4deb4850d4af48b18ad074bba19 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 - Bump version number for 5.3.5beta. + Docs: Update .xz file format specification to 1.2.0. - This also sorts the symbol names alphabetically in liblzma_*.map. + The new RISC-V filter was added to the specification, in addition to + updating the specification URL. - src/liblzma/api/lzma/version.h | 4 ++-- - src/liblzma/liblzma_generic.map | 10 +++++----- - src/liblzma/liblzma_linux.map | 10 +++++----- - 3 files changed, 12 insertions(+), 12 deletions(-) + doc/xz-file-format.txt | 29 +++++++++++++++++------------ + 1 file changed, 17 insertions(+), 12 deletions(-) -commit 7e53c5bcb3c2c17f47c096c06ff6b1481e6ecafa -Author: Lasse Collin -Date: 2022-12-01 20:57:26 +0200 +commit 22d86192f8cf00902a1f90ee2a83ca600794459b +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 - Add NEWS for 5.3.5beta. + xz: Update website URLs in the man pages. - NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) + src/xz/xz.1 | 6 +++--- + src/xzdec/xzdec.1 | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) -commit 5865f2aaac326fcbd9f8a7d62defa230e4cb644e -Author: Lasse Collin -Date: 2022-12-01 20:57:09 +0200 +commit 6b63c4c6139fa1bb21b570521d3d2b4a608bc34d +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 - Update THANKS. + liblzma: Update website URL. - THANKS | 3 +++ - 1 file changed, 3 insertions(+) + dos/config.h | 2 +- + src/liblzma/api/lzma.h | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) -commit 62b270988ec67314d69976df484d2974c6eacfda -Author: Lasse Collin -Date: 2022-12-01 20:04:17 +0200 +commit fce4758018f3a3589236f3fe7999fd9dd08c77e9 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 - liblzma: Use __has_attribute(__symver__) to fix Clang detection. - - If someone sets up Clang to define __GNUC__ to 10 or greater - then symvers broke. __has_attribute is supported by such GCC - and Clang versions that don't support __symver__ so this should - be much better and simpler way to detect if __symver__ is - actually supported. - - Thanks to Tomasz Gajc for the bug report. + Docs: Update website URLs. - src/liblzma/common/common.h | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) + .github/SECURITY.md | 2 +- + COPYING | 3 ++- + README | 4 ++-- + doc/faq.txt | 2 +- + doc/lzma-file-format.txt | 18 +++++++++--------- + windows/README-Windows.txt | 3 ++- + 6 files changed, 17 insertions(+), 15 deletions(-) -commit f9ca7d45162664ddd9fb70e19335c2426e5d75bb -Author: Lasse Collin -Date: 2022-12-01 18:51:52 +0200 +commit c26812c5b2c8a2a47f43214afe6b0b840c73e4f5 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 - liblzma: Omit zero-skipping from ARM64 filter. - - It has some complicated downsides and its usefulness is more limited - than I originally thought. So this change is bad for certain very - specific situations but a generic solution that works for other - filters (and is otherwise better too) is planned anyway. And this - way 7-Zip can use the same compatible filter for the .7z format. - - This is still marked as experimental with a new temporary Filter ID. + Build: Update website URL. - src/liblzma/api/lzma/bcj.h | 2 +- - src/liblzma/simple/arm64.c | 81 +++++++++++++--------------------------------- - 2 files changed, 24 insertions(+), 59 deletions(-) + CMakeLists.txt | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit 5baec3f0a9c85e6abf45c0f652f699b074129a8b +commit fbb3ce541ef79cad1710e88a27a5babb5f6f8e5b Author: Lasse Collin -Date: 2022-12-01 18:13:27 +0200 +Date: 2024-01-11 15:01:50 +0200 - xz: Omit the special notes about ARM64 filter on the man page. + liblzma: CRC: Add a comment to crc_x86_clmul.h about BUILDING_ macros. - src/xz/xz.1 | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + src/liblzma/check/crc_x86_clmul.h | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 0c3627b51862eb0dcdd4fc283d046250571991c6 +commit 4f518c1b6b7b7ce5dcefea81acd44d7a086a8882 Author: Lasse Collin -Date: 2022-12-01 18:12:03 +0200 +Date: 2024-01-11 15:22:36 +0200 - liblzma: Don't be over-specific in lzma_str_to_filters API doc. + liblzma: CRC: Remove crc_always_inline, use lzma_always_inline instead. + + Now crc_simd_body() in crc_x86_clmul.h is only called once + in a translation unit, we no longer need to be so cautious + about ensuring the always-inline behavior. - src/liblzma/api/lzma/filter.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + src/liblzma/check/crc_common.h | 20 -------------------- + src/liblzma/check/crc_x86_clmul.h | 2 +- + 2 files changed, 1 insertion(+), 21 deletions(-) -commit 94adf057f27b1970f493dc99cd166407d7255639 +commit 35c03ec6bf66f1b159964c9721a2dce0e2859b20 Author: Lasse Collin -Date: 2022-12-01 17:54:23 +0200 +Date: 2024-01-11 14:39:46 +0200 - liblzma: Silence unused variable warning when BCJ filters are disabled. - - Thanks to Jia Tan for the original patch. + liblzma: CRC: Update CLMUL comments to more generic wording. - src/liblzma/common/string_conversion.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) + src/liblzma/check/crc32_fast.c | 16 ++++++++-------- + src/liblzma/check/crc64_fast.c | 10 +++++----- + 2 files changed, 13 insertions(+), 13 deletions(-) -commit c68af4441744e5ffc41a472e1be9c9d53a1d9780 +commit 66f080e8016129576536482ac377e2ecac7a2b90 Author: Lasse Collin -Date: 2022-12-01 17:38:03 +0200 +Date: 2024-01-10 18:23:31 +0200 - Translations: Update the Chinese (simplified) translation. + liblzma: Rename arch-specific CRC functions and macros. + + CRC_CLMUL was split to CRC_ARCH_OPTIMIZED and CRC_X86_CLMUL. + CRC_ARCH_OPTIMIZED is defined when an arch-optimized version is used. + Currently the x86 CLMUL implementations are the only arch-optimized + versions, and these also use the CRC_x86_CLMUL macro to tell when + crc_x86_clmul.h needs to be included. + + is_clmul_supported() was renamed to is_arch_extension_supported(). + crc32_clmul() and crc64_clmul() were renamed to + crc32_arch_optimized() and crc64_arch_optimized(). + This way the names make sense with arch-specific non-CLMUL + implementations as well. - po/zh_CN.po | 608 ++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 348 insertions(+), 260 deletions(-) + src/liblzma/check/crc32_fast.c | 13 +++++++------ + src/liblzma/check/crc64_fast.c | 13 +++++++------ + src/liblzma/check/crc_common.h | 9 ++++++--- + src/liblzma/check/crc_x86_clmul.h | 21 +++++++++++---------- + 4 files changed, 31 insertions(+), 25 deletions(-) -commit 3be6942e5c27d29995d41da52fbe274e4ce4a537 +commit 3dbed75b0b9c7087c76fe687acb5cf582cd57b99 Author: Lasse Collin -Date: 2022-11-30 18:55:03 +0200 +Date: 2024-01-10 18:19:21 +0200 - Add NEWS for 5.2.9. + liblzma: Fix a comment in crc_common.h. - NEWS | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) + src/liblzma/check/crc_common.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 7c16e312cb2f40b81154c0e5be13a3c6b8da485d -Author: Jia Tan -Date: 2022-11-30 23:33:08 +0800 +commit 419f55f9dfc2df8792902b8953d50690121afeea +Author: Lasse Collin +Date: 2023-10-20 23:35:10 +0300 - xz: Remove message_filters_to_str function prototype from message.h. + liblzma: Avoid extern lzma_crc32_clmul() and lzma_crc64_clmul(). + + A CLMUL-only build will have the crcxx_clmul() inlined into + lzma_crcxx(). Previously a jump to the extern lzma_crcxx_clmul() + was needed. Notes about shared liblzma on ELF platforms: + + - On platforms that support ifunc and -fvisibility=hidden, this + was silly because CLMUL-only build would have that single extra + jump instruction of extra overhead. + + - On platforms that support neither -fvisibility=hidden nor linker + version script (liblzma*.map), jumping to lzma_crcxx_clmul() + would go via PLT so a few more instructions of overhead (still + not a big issue but silly nevertheless). + + There was a downside with static liblzma too: if an application only + needs lzma_crc64(), static linking would make the linker include the + CLMUL code for both CRC32 and CRC64 from crc_x86_clmul.o even though + the CRC32 code wouldn't be needed, thus increasing code size of the + executable (assuming that -ffunction-sections isn't used). + + Also, now compilers are likely to inline crc_simd_body() + even if they don't support the always_inline attribute + (or MSVC's __forceinline). Quite possibly all compilers + that build the code do support such an attribute. But now + it likely isn't a problem even if the attribute wasn't supported. + + Now all x86-specific stuff is in crc_x86_clmul.h. If other archs + The other archs can then have their own headers with their own + is_clmul_supported() and crcxx_clmul(). + + Another bonus is that the build system doesn't need to care if + crc_clmul.c is needed. - This was forgotten from 7484744af6cbabe81e92af7d9e061dfd597fff7b. + is_clmul_supported() stays as inline function as it's not needed + when doing a CLMUL-only build (avoids a warning about unused function). - src/xz/message.h | 16 ---------------- - 1 file changed, 16 deletions(-) + CMakeLists.txt | 7 +- + configure.ac | 1 - + src/liblzma/check/Makefile.inc | 6 +- + src/liblzma/check/crc32_fast.c | 9 ++- + src/liblzma/check/crc64_fast.c | 9 ++- + src/liblzma/check/crc_common.h | 64 ---------------- + src/liblzma/check/{crc_clmul.c => crc_x86_clmul.h} | 86 ++++++++++++++++++---- + 7 files changed, 91 insertions(+), 91 deletions(-) -commit 764955e2d4f2a5e8d6d6fec63af694f799e050e7 +commit e3833e297dfb5021a197bda34ba2a795e30aaf8a Author: Lasse Collin -Date: 2022-11-30 18:08:34 +0200 +Date: 2023-10-21 00:06:52 +0300 - Change the bug report address. + liblzma: crc_clmul.c: Add crc_attr_target macro. - It forwards to me and Jia Tan. - - Also update the IRC reference in README as #tukaani was moved - to Libera Chat long ago. + This reduces the number of the complex #if directives. - CMakeLists.txt | 2 +- - README | 11 +++++------ - configure.ac | 2 +- - dos/config.h | 2 +- - windows/README-Windows.txt | 2 +- - 5 files changed, 9 insertions(+), 10 deletions(-) + src/liblzma/check/crc_clmul.c | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) -commit c21983c76031e01da01ad3c6cc716fe4b8a75070 +commit d164ac0e62904126f7920c25f9a2875c8cd28b97 Author: Lasse Collin -Date: 2022-11-30 17:50:17 +0200 +Date: 2023-10-20 22:49:48 +0300 - Build: Add string_conversion.c to CMake, DOS, and VS files. + liblzma: Simplify existing cases with lzma_attr_no_sanitize_address. - CMakeLists.txt | 1 + - dos/Makefile | 1 + - windows/vs2013/liblzma.vcxproj | 1 + - windows/vs2013/liblzma_dll.vcxproj | 1 + - windows/vs2017/liblzma.vcxproj | 1 + - windows/vs2017/liblzma_dll.vcxproj | 1 + - windows/vs2019/liblzma.vcxproj | 1 + - windows/vs2019/liblzma_dll.vcxproj | 1 + - 8 files changed, 8 insertions(+) + src/liblzma/check/crc_clmul.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) -commit 30be0c35d24eb5175459d69dbf7d92e2b087ef82 +commit 9523c1300d22fa715765c181cf991d14d6112fb1 Author: Lasse Collin -Date: 2022-11-30 17:38:32 +0200 +Date: 2023-10-20 21:53:35 +0300 - Update to HTTPS URLs in AUTHORS. + liblzma: #define crc_attr_no_sanitize_address in crc_common.h. - AUTHORS | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/liblzma/check/crc_common.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 0a72b9ca2fe20082da9b7128fe0d908af947a851 -Author: Jia Tan -Date: 2022-11-30 00:52:06 +0800 +commit 93d144f0930821590524247bd174afd38003d7f0 +Author: Lasse Collin +Date: 2023-10-20 23:25:14 +0300 - liblzma: Improve documentation for string to filter functions. + liblzma: CRC: Add empty lines. + + And remove one too. - src/liblzma/api/lzma/filter.h | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) + src/liblzma/check/crc32_fast.c | 2 ++ + src/liblzma/check/crc64_fast.c | 3 +++ + src/liblzma/check/crc_clmul.c | 1 - + 3 files changed, 5 insertions(+), 1 deletion(-) -commit a6e21fcede3b196160a52dd294d965c508a4bb33 +commit 0c7e854ffd27f1cec2e9b0e61601d6f90bfa10ae Author: Lasse Collin -Date: 2022-11-29 22:27:42 +0200 +Date: 2023-10-20 23:19:33 +0300 - liblzma: Two fixes to lzma_str_list_filters() API docs. + liblzma: crc_clmul.c: Tidy up the location of MSVC pragma. - Thanks to Jia Tan. + It makes no difference in practice. - src/liblzma/api/lzma/filter.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/liblzma/check/crc_clmul.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 7484744af6cbabe81e92af7d9e061dfd597fff7b +commit 15cf3f04f270d707a5c91cc0208b23b6db42b774 Author: Lasse Collin -Date: 2022-11-28 21:57:47 +0200 +Date: 2023-12-20 21:16:24 +0200 - xz: Use lzma_str_from_filters(). - - Two uses: Displaying encoder filter chain when compressing with -vv, - and displaying the decoder filter chain in --list -vv. + Update THANKS. - src/xz/list.c | 28 ++++++--- - src/xz/message.c | 175 +++---------------------------------------------------- - 2 files changed, 28 insertions(+), 175 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit cedeeca2ea6ada5b0411b2ae10d7a859e837f203 +commit cd64dd70d5665b6048829c45772d08606f44672e Author: Lasse Collin -Date: 2022-11-28 21:37:48 +0200 +Date: 2023-12-20 21:15:16 +0200 - liblzma: Add lzma_str_to_filters, _from_filters, and _list_filters. + liblzma: Use 8-byte method in memcmplen.h on ARM64. + + It requires fast unaligned access to 64-bit integers + and a fast instruction to count leading zeros in + a 64-bit integer (__builtin_ctzll()). This perhaps + should be enabled on some other archs too. + + Thanks to Chenxi Mao for the original patch: + https://github.com/tukaani-project/xz/pull/75 (the first commit) + According to the numbers there, this may improve encoding + speed by about 3-5 %. - lzma_str_to_filters() uses static error messages which makes - them not very precise. It tells the position in the string - where an error occurred though which helps quite a bit if - applications take advantage of it. Dynamic error messages can - be added later with a new flag if it seems important enough. + This enables the 8-byte method on MSVC ARM64 too which + should work but wasn't tested. - src/liblzma/api/lzma/filter.h | 258 +++++++ - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/string_conversion.c | 1302 ++++++++++++++++++++++++++++++++ - src/liblzma/liblzma_generic.map | 3 + - src/liblzma/liblzma_linux.map | 3 + - 5 files changed, 1567 insertions(+) + src/liblzma/common/memcmplen.h | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) -commit 072ebf7b1335421193ffa9d4a70d5533786b8995 +commit 12c90c00f05e19da3c0c91d8cd8e0d0d45965606 Author: Lasse Collin -Date: 2022-11-28 21:02:19 +0200 +Date: 2023-12-20 21:01:06 +0200 - liblzma: Make lzma_validate_chain() available outside filter_common.c. + liblzma: Check also for __clang__ in memcmplen.h. + + This change hopefully makes no practical difference as Clang + likely was detected via __GNUC__ or _MSC_VER already. - src/liblzma/common/filter_common.c | 8 ++++---- - src/liblzma/common/filter_common.h | 3 +++ - 2 files changed, 7 insertions(+), 4 deletions(-) + src/liblzma/common/memcmplen.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 5f22bd2d37e3bd01a5d701b51750eb51f09c11bf -Author: Lasse Collin -Date: 2022-11-28 10:51:03 +0200 +commit 133c5851eb917c6d99d0b623c1689c8518e65f38 +Author: Jia Tan +Date: 2023-12-21 21:39:08 +0800 - liblzma: Remove lzma_lz_decoder_uncompressed() as it's now unused. + Translations: Update the French translation. - src/liblzma/lz/lz_decoder.c | 14 -------------- - src/liblzma/lz/lz_decoder.h | 3 --- - 2 files changed, 17 deletions(-) + po/fr.po | 632 +++++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 370 insertions(+), 262 deletions(-) -commit cee83206465b95729ab649aa2f57fdbde8dcaf89 -Author: Lasse Collin -Date: 2022-11-28 10:48:53 +0200 +commit 710cbc186cad0ac601c38bd6bf31167648a5581e +Author: Jia Tan +Date: 2023-12-21 16:39:53 +0800 - liblzma: Use LZMA1EXT feature in lzma_microlzma_decoder(). + xz: Add a comment to Capsicum sandbox setup. - Here too this avoids the slightly ugly method to set - the uncompressed size. + This comment is repeated in xzdec.c to help remind us why all the + capabilities are removed from stdin in certain situations. + + src/xz/file_io.c | 1 + + 1 file changed, 1 insertion(+) + +commit 4e1c695676bafbaecc9fb307f6ee94138ae72c12 +Author: Jia Tan +Date: 2023-12-20 22:19:19 +0800 + + Docs: Update --enable-sandbox option in INSTALL. - Also moved the setting of dict_size to the struct initializer. + xzdec now also uses the sandbox when its configured. - src/liblzma/common/microlzma_decoder.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) + INSTALL | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) -commit e310e8b6a490dfb468f4ed68feff246d776b323c -Author: Lasse Collin -Date: 2022-11-28 10:28:20 +0200 +commit ebddf20214143a8e002ab897e95e880bb4c5ac44 +Author: Jia Tan +Date: 2023-12-20 22:39:13 +0800 - liblzma: Use LZMA1EXT feature in lzma_alone_decoder(). + CMake: Move sandbox detection outside of xz section. - This avoids the need to use the slightly ugly method to - set the uncompressed size. + The sandbox is now enabled for xzdec as well, so it no longer belongs + in just the xz section. xz and xzdec are always built, except for older + MSVC versions, so there isn't a need to conditionally show the sandbox + configuration. CMake will do a little unecessary work on older MSVC + versions that can't build xz or xzdec, but this is a very small + downside. - src/liblzma/common/alone_decoder.c | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) + CMakeLists.txt | 178 +++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 98 insertions(+), 80 deletions(-) -commit 33b8a24b6646a9dbfd8358405aec466b13078559 -Author: Lasse Collin -Date: 2022-11-27 23:16:21 +0200 +commit 5feb09266fd2928ec0a4dcb98c1dc7f053111316 +Author: Jia Tan +Date: 2023-12-20 22:43:44 +0800 + + Build: Allow sandbox to be configured for just xzdec. + + If xz is disabled, then xzdec can still use the sandbox. + + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit d74fb5f060b76db709b50f5fd37490394e52f975 +Author: Jia Tan +Date: 2023-12-19 21:18:28 +0800 - liblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker. + xzdec: Add sandbox support for Pledge, Capsicum, and Landlock. - Some file formats need support for LZMA1 streams that don't use - the end of payload marker (EOPM) alias end of stream (EOS) marker. - So far liblzma API has supported decompressing such streams via - lzma_alone_decoder() when .lzma header specifies a known - uncompressed size. Encoding support hasn't been available in the API. + A very strict sandbox is used when the last file is decompressed. The + likely most common use case of xzdec is to decompress a single file. + The Pledge sandbox is applied to the entire process with slightly more + relaxed promises, until the last file is processed. - Instead of adding a new LZMA1-only API for this purpose, this commit - adds a new filter ID for use with raw encoder and decoder. The main - benefit of this approach is that then also filter chains are possible, - for example, if someone wants to implement support for .7z files that - use the x86 BCJ filter with LZMA1 (not BCJ2 as that isn't supported - in liblzma). + Thanks to Christian Weisgerber for the initial patch adding Pledge + sandboxing. - src/liblzma/api/lzma/lzma12.h | 123 ++++++++++++++++++++++++++++++-- - src/liblzma/common/filter_common.c | 7 ++ - src/liblzma/common/filter_decoder.c | 6 ++ - src/liblzma/common/filter_encoder.c | 9 +++ - src/liblzma/lzma/lzma2_encoder.c | 2 +- - src/liblzma/lzma/lzma_decoder.c | 26 ++++++- - src/liblzma/lzma/lzma_encoder.c | 40 +++++++++-- - src/liblzma/lzma/lzma_encoder.h | 3 +- - src/liblzma/lzma/lzma_encoder_private.h | 3 + - 9 files changed, 204 insertions(+), 15 deletions(-) + src/xzdec/xzdec.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 139 insertions(+), 7 deletions(-) -commit 9a304bf1e45b3ddf61aaeaa7c764915b34618ede -Author: Lasse Collin -Date: 2022-11-27 18:43:07 +0200 +commit b34b6a9912d6165e34ba0db151b7f9941d2e06d5 +Author: Jia Tan +Date: 2023-12-20 21:31:34 +0800 - liblzma: Avoid unneeded use of void pointer in LZMA decoder. + liblzma: Initialize lzma_lz_encoder pointers with NULL. + + This fixes the recent change to lzma_lz_encoder that used memzero + instead of the NULL constant. On some compilers the NULL constant + (always 0) may not equal the NULL pointer (this only needs to guarentee + to not point to valid memory address). + + Later code compares the pointers to the NULL pointer so we must + initialize them with the NULL pointer instead of 0 to guarentee + code correctness. - src/liblzma/lzma/lzma_decoder.c | 3 +-- - src/liblzma/lzma/lzma_decoder.h | 2 +- - 2 files changed, 2 insertions(+), 3 deletions(-) + src/liblzma/lz/lz_encoder.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -commit 218394958c7683f892275bb40eae880620feebcc -Author: Lasse Collin -Date: 2022-11-27 18:20:33 +0200 +commit 183a62f0b540ff4d23cc19b2b6bc2525f0bd64df +Author: Jia Tan +Date: 2023-12-16 20:51:38 +0800 - liblzma: Pass the Filter ID to LZ encoder and decoder. + liblzma: Set all values in lzma_lz_encoder to NULL after allocation. - This allows using two Filter IDs with the same - initialization function and data structures. + The first member of lzma_lz_encoder doesn't necessarily need to be set + to NULL since it will always be set before anything tries to use it. + However the function pointer members must be set to NULL since other + functions rely on this NULL value to determine if this behavior is + supported or not. + + This fixes a somewhat serious bug, where the options_update() and + set_out_limit() function pointers are not set to NULL. This seems to + have been forgotten since these function pointers were added many years + after the original two (code() and end()). + + The problem is that by not setting this to NULL we are relying on the + memory allocation to zero things out if lzma_filters_update() is called + on a LZMA1 encoder. The function pointer for set_out_limit() is less + serious because there is not an API function that could call this in an + incorrect way. set_out_limit() is only called by the MicroLZMA encoder, + which must use LZMA1 where set_out_limit() is always set. Its currently + not possible to call set_out_limit() on an LZMA2 encoder at this time. + + So calling lzma_filters_update() on an LZMA1 encoder had undefined + behavior since its possible that memory could be manipulated so the + options_update member pointed to a different instruction sequence. + + This is unlikely to be a bug in an existing application since it relies + on calling lzma_filters_update() on an LZMA1 encoder in the first place. + For instance, it does not affect xz because lzma_filters_update() can + only be used when encoding to the .xz format. + + This is fixed by using memzero() to set all members of lzma_lz_encoder + to NULL after it is allocated. This ensures this mistake will not occur + here in the future if any additional function pointers are added. - src/liblzma/common/alone_decoder.c | 1 + - src/liblzma/common/alone_encoder.c | 1 + - src/liblzma/common/common.h | 7 +++++-- - src/liblzma/common/lzip_decoder.c | 1 + - src/liblzma/common/microlzma_decoder.c | 1 + - src/liblzma/common/microlzma_encoder.c | 1 + - src/liblzma/lz/lz_decoder.c | 5 +++-- - src/liblzma/lz/lz_decoder.h | 3 ++- - src/liblzma/lz/lz_encoder.c | 5 +++-- - src/liblzma/lz/lz_encoder.h | 3 ++- - src/liblzma/lzma/lzma2_decoder.c | 3 ++- - src/liblzma/lzma/lzma2_encoder.c | 3 ++- - src/liblzma/lzma/lzma_decoder.c | 2 +- - src/liblzma/lzma/lzma_encoder.c | 2 +- - 14 files changed, 26 insertions(+), 12 deletions(-) + src/liblzma/lz/lz_encoder.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) -commit 1663c7676b76f4c514031797f3db1896e8100f7f -Author: Lasse Collin -Date: 2022-11-27 01:03:16 +0200 +commit 1a1bb381db7a20cf86cb45a350e5cca35224d017 +Author: Jia Tan +Date: 2023-12-16 20:30:55 +0800 - liblzma: Remove two FIXME comments. + liblzma: Tweak a comment. - src/liblzma/common/filter_encoder.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/liblzma/lz/lz_encoder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 11fe708db783ac36ebeeb85da164e29e8c300910 -Author: Lasse Collin -Date: 2022-11-26 22:25:30 +0200 +commit 55810780e04f759747b02683fb8020b8cd022a85 +Author: Jia Tan +Date: 2023-12-16 20:28:21 +0800 - xz: Use lzma_filters_free(). + liblzma: Make parameter names in function definition match declaration. + + lzma_raw_encoder() and lzma_raw_encoder_init() used "options" as the + parameter name instead of "filters" (used by the declaration). "filters" + is more clear since the parameter represents the list of filters passed + to the raw encoder, each of which contains filter options. - src/xz/list.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + src/liblzma/common/filter_encoder.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit e782af9110d8499c7ac2929bc871540eefea5ea1 -Author: Lasse Collin -Date: 2022-11-26 22:21:13 +0200 +commit 5dad6f628af742bab826819760deb677597445f7 +Author: Jia Tan +Date: 2023-12-16 20:18:47 +0800 - liblzma: Use lzma_filters_free() in more places. + liblzma: Improve lzma encoder init function consistency. + + lzma_encoder_init() did not check for NULL options, but + lzma2_encoder_init() did. This is more of a code style improvement than + anything else to help make lzma_encoder_init() and lzma2_encoder_init() + more similar. - src/liblzma/common/block_header_decoder.c | 20 ++------------------ - src/liblzma/common/stream_decoder.c | 4 +--- - src/liblzma/common/stream_decoder_mt.c | 22 +++++----------------- - 3 files changed, 8 insertions(+), 38 deletions(-) + src/liblzma/lzma/lzma_encoder.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 90caaded2dc6db1d6a55b01160d7e87f4a423628 -Author: Lasse Collin -Date: 2022-11-25 18:04:37 +0200 +commit e1b1a9d6370b788bd6078952c6c201e12bc27cbf +Author: Jia Tan +Date: 2023-12-16 11:20:20 +0800 - liblzma: Omit simple coder init functions if they are disabled. + Docs: Update repository URL in Changelog. - src/liblzma/simple/arm.c | 4 ++++ - src/liblzma/simple/armthumb.c | 4 ++++ - src/liblzma/simple/ia64.c | 4 ++++ - src/liblzma/simple/powerpc.c | 4 ++++ - src/liblzma/simple/sparc.c | 4 ++++ - src/liblzma/simple/x86.c | 4 ++++ - 6 files changed, 24 insertions(+) + ChangeLog | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5cd9f0df78cc4f8a7807bf6104adea13034fbb45 -Author: Lasse Collin -Date: 2022-11-24 23:24:59 +0200 +commit f9b82bc64a9405e486575c65c1729229eb0a8198 +Author: Jia Tan +Date: 2023-12-15 16:56:31 +0800 - xz: Allow nice_len 2 and 3 even if match finder requires 3 or 4. - - Now that liblzma accepts these, we avoid the extra check and - there's one message less for translators too. + CI: Update Upload Artifact Action. - src/xz/options.c | 5 ----- - 1 file changed, 5 deletions(-) + .github/workflows/ci.yml | 2 +- + .github/workflows/windows-ci.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit 3be88ae071371caa279b44e13f4836fb178fe4ae -Author: Lasse Collin -Date: 2022-11-24 23:23:55 +0200 +commit d0b24efe6cdc47db5b0fdf6306f70a2e0e63e49e +Author: Jia Tan +Date: 2023-12-07 21:48:07 +0800 - liblzma: Allow nice_len 2 and 3 even if match finder requires 3 or 4. + Tests: Silence -Wsign-conversion warning on GCC version < 10. - That is, if the specified nice_len is smaller than the minimum - of the match finder, silently use the match finder's minimum value - instead of reporting an error. The old behavior is annoying to users - and it complicates xz options handling too. - - src/liblzma/lz/lz_encoder.c | 14 +++++++++----- - src/liblzma/lz/lz_encoder.h | 9 +++++++++ - src/liblzma/lzma/lzma_encoder.c | 11 ++++++++--- - 3 files changed, 26 insertions(+), 8 deletions(-) - -commit 93439cfafe1768b3b18d67d2356ef7e7559bba59 -Author: Lasse Collin -Date: 2022-11-24 16:25:10 +0200 - - liblzma: Add lzma_filters_update() support to the multi-threaded encoder. + Since GCC version 10, GCC no longer complains about simple implicit + integer conversions with Arithmetic operators. + + For instance: + + uint8_t a = 5; + uint32_t b = a + 5; - A tiny downside of this is that now a 1-4 tiny allocations are made - for every Block because each worker thread needs its own copy of - the filter chain. + Give a warning on GCC 9 and earlier but this: + + uint8_t a = 5; + uint32_t b = (a + 5) * 2; + + Gives a warning with GCC 10+. - src/liblzma/api/lzma/filter.h | 36 +++++++------ - src/liblzma/common/stream_encoder_mt.c | 96 +++++++++++++++++++++++++++++++--- - 2 files changed, 109 insertions(+), 23 deletions(-) + tests/test_block_header.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 17ac51e689794eb41cab3e80946fec689caea2d2 -Author: Lasse Collin -Date: 2022-11-24 14:53:22 +0200 +commit 4a972a8ee3ed88ac14067c1d2f15b78988e5dae8 +Author: Jia Tan +Date: 2023-12-06 18:39:03 +0800 Update THANKS. THANKS | 1 + 1 file changed, 1 insertion(+) -commit 06824396b2b6c84f3a235cb7c19c2a9701167797 -Author: Lasse Collin -Date: 2022-11-24 14:52:44 +0200 +commit ee2f48350099201694a7586e41d7aa2f09fc74da +Author: Jia Tan +Date: 2023-12-06 18:30:25 +0800 - Build: Don't put GNU/Linux-specific symbol versions into static liblzma. + Tests: Minor cleanups to OSS-Fuzz files. - It not only makes no sense to put symbol versions into a static library - but it can also cause breakage. + Most of these fixes are small typos and tweaks. A few were caused by bad + advice from me. Here is the summary of what is changed: - By default Libtool #defines PIC if building a shared library and - doesn't define it for static libraries. This is documented in the - Libtool manual. It can be overriden using --with-pic or --without-pic. - configure.ac detects if --with-pic or --without-pic is used and then - gives an error if neither --disable-shared nor --disable-static was - used at the same time. Thus, in normal situations it works to build - both shared and static library at the same time on GNU/Linux, - only --with-pic or --without-pic requires that only one type of - library is built. + - Author line edits - Thanks to John Paul Adrian Glaubitz from Debian for reporting - the problem that occurred on ia64: - https://www.mail-archive.com/xz-devel@tukaani.org/msg00610.html - - CMakeLists.txt | 5 +- - configure.ac | 143 +++++++++++++++++++++++++++++--------------- - src/liblzma/common/common.h | 12 ++++ - 3 files changed, 111 insertions(+), 49 deletions(-) - -commit e1acf7107291f8b3d6d609a7133331ff36d35d14 -Author: Lasse Collin -Date: 2022-11-24 01:32:16 +0200 - - liblzma: Refactor to use lzma_filters_free(). + - Small comment changes/additions + + - Using the return value in the error messages in the fuzz targets' + coder initialization code - lzma_filters_free() sets the options to NULL and ids to - LZMA_VLI_UNKNOWN so there is no need to do it by caller; - the filter arrays will always be left in a safe state. + - Removed fuzz_encode_stream.options. This set a max length, which may + prevent some worthwhile code paths from being properly exercised. - Also use memcpy() instead of a loop to copy a filter chain - when it is known to be safe to copy LZMA_FILTERS_MAX + 1 - (even if the elements past the terminator might be uninitialized). + - Removed the max_len option from fuzz_decode_stream.options for the + same reason as fuzz_encode_stream. The alone decoder fuzz target still + has this restriction. + + - Altered the dictionary contents for fuzz_lzma.dict. Instead of keeping + the properties static and varying the dictionary size, the properties + are varied and the dictionary size is kept small. The dictionary size + doesn't have much impact on the code paths but the properties do. + + Closes: https://github.com/tukaani-project/xz/pull/73 - src/liblzma/common/stream_encoder.c | 16 ++++------------ - src/liblzma/common/stream_encoder_mt.c | 11 ++--------- - 2 files changed, 6 insertions(+), 21 deletions(-) + tests/ossfuzz/Makefile | 3 ++ + tests/ossfuzz/config/fuzz_decode_stream.options | 1 - + tests/ossfuzz/config/fuzz_lzma.dict | 34 +++++++++++----------- + tests/ossfuzz/fuzz_common.h | 16 +++++------ + tests/ossfuzz/fuzz_decode_alone.c | 15 +++++----- + tests/ossfuzz/fuzz_decode_stream.c | 15 +++++----- + tests/ossfuzz/fuzz_encode_stream.c | 38 +++++++++++++++---------- + 7 files changed, 66 insertions(+), 56 deletions(-) -commit cb05dbcf8b868441ec805016222f3fd77f1c5caa -Author: Lasse Collin -Date: 2022-11-24 01:26:37 +0200 +commit 483bb90eec7c83e1c2bcd06287714afd62d8c17d +Author: Maksym Vatsyk +Date: 2023-12-05 16:31:09 +0100 - liblzma: Fix another invalid free() after memory allocation failure. - - This time it can happen when lzma_stream_encoder_mt() is used - to reinitialize an existing multi-threaded Stream encoder - and one of 1-4 tiny allocations in lzma_filters_copy() fail. + Tests: Add fuzz_encode_stream ossfuzz target. - It's very similar to the previous bug - 10430fbf3820dafd4eafd38ec8be161a6978ed2b, happening with - an array of lzma_filter structures whose old options are freed - but the replacement never arrives due to a memory allocation - failure in lzma_filters_copy(). + This fuzz target handles .xz stream encoding. The first byte of input + is used to dynamically set the preset level in order to increase the + fuzz coverage of complex critical code paths. - src/liblzma/common/stream_encoder_mt.c | 4 ++++ - 1 file changed, 4 insertions(+) + tests/ossfuzz/config/fuzz_encode_stream.options | 2 + + tests/ossfuzz/fuzz_encode_stream.c | 79 +++++++++++++++++++++++++ + 2 files changed, 81 insertions(+) -commit 75f1a6c26df4ce329da0882786403e3ccf5cd898 -Author: Jia Tan -Date: 2022-05-05 20:53:42 +0800 +commit 7ca8c9869df82756c3128c4fcf1058da4d18aa48 +Author: Maksym Vatsyk +Date: 2023-12-04 17:23:24 +0100 - liblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder. + Tests: Add fuzz_decode_alone OSS-Fuzz target - The documentation mentions that lzma_block_encoder() supports - LZMA_SYNC_FLUSH but it was never added to supported_actions[] - in the internal structure. Because of this, LZMA_SYNC_FLUSH could - not be used with the Block encoder unless it was the next coder - after something like stream_encoder() or stream_encoder_mt(). + This fuzz target that handles LZMA alone decoding. A new fuzz + dictionary .dict was also created with common LZMA header values to + help speed up the discovery of valid headers. - src/liblzma/common/block_encoder.c | 1 + - 1 file changed, 1 insertion(+) + tests/ossfuzz/config/fuzz_decode_alone.options | 3 ++ + tests/ossfuzz/config/fuzz_lzma.dict | 22 ++++++++++++++ + tests/ossfuzz/fuzz_decode_alone.c | 41 ++++++++++++++++++++++++++ + 3 files changed, 66 insertions(+) -commit d0901645170b638c517f5c50866b6ef48f491c65 -Author: Lasse Collin -Date: 2022-11-24 01:02:50 +0200 +commit 37581a77ad5a49615325b1d1925fdc402b1e1d5a +Author: Maksym Vatsyk +Date: 2023-12-04 17:21:29 +0100 - liblzma: Add new API function lzma_filters_free(). + Tests: Update OSS-Fuzz Makefile. - This is small but convenient and should have been added - a long time ago. + All .c files can be built as separate fuzz targets. This simplifies + the Makefile by allowing us to use wildcards instead of having a + Makefile target for each fuzz target. - src/liblzma/api/lzma/filter.h | 21 +++++++++++++++++++++ - src/liblzma/common/filter_common.c | 26 ++++++++++++++++++++++++++ - src/liblzma/liblzma_generic.map | 1 + - src/liblzma/liblzma_linux.map | 1 + - 4 files changed, 49 insertions(+) + tests/ossfuzz/Makefile | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) -commit ae1f8a723dcde2f2c5cf444bcbb5fc5026b3c3c5 -Author: Lasse Collin -Date: 2022-11-24 00:02:31 +0200 +commit 28ce6a1c2a74866c51f7996a6869679c236d3c94 +Author: Maksym Vatsyk +Date: 2023-12-04 17:20:08 +0100 - CMake: Don't use symbol versioning with static library. + Tests: Move common OSS-Fuzz target code to .h file. - CMakeLists.txt | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) + tests/ossfuzz/fuzz_common.h | 56 ++++++++++++++++++++++++++++++++++++ + tests/ossfuzz/fuzz_decode_stream.c | 59 ++++++++++---------------------------- + 2 files changed, 71 insertions(+), 44 deletions(-) -commit 48c1b99dc537a27e1ca929d8837e778e5ba32191 -Author: Lasse Collin -Date: 2022-11-23 21:55:22 +0200 +commit bf0521ea1591c25b9d510c1b8be86073e9d847c6 +Author: Maksym Vatsyk +Date: 2023-12-04 17:18:20 +0100 - liblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy(). + Tests: Rename OSS-Fuzz files. - src/liblzma/api/lzma/filter.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + tests/ossfuzz/config/fuzz.options | 2 -- + tests/ossfuzz/config/fuzz_decode_stream.options | 3 +++ + tests/ossfuzz/config/{fuzz.dict => fuzz_xz.dict} | 0 + tests/ossfuzz/{fuzz.c => fuzz_decode_stream.c} | 0 + 4 files changed, 3 insertions(+), 2 deletions(-) -commit 10430fbf3820dafd4eafd38ec8be161a6978ed2b -Author: Lasse Collin -Date: 2022-11-23 21:26:21 +0200 +commit 685094b8e1c1aa1bf934de0366ca42ef599d25f7 +Author: Jia Tan +Date: 2023-11-30 23:10:43 +0800 - liblzma: Fix invalid free() after memory allocation failure. - - The bug was in the single-threaded .xz Stream encoder - in the code that is used for both re-initialization and for - lzma_filters_update(). To trigger it, an application had - to either re-initialize an existing encoder instance with - lzma_stream_encoder() or use lzma_filters_update(), and - then one of the 1-4 tiny allocations in lzma_filters_copy() - (called from stream_encoder_update()) must fail. An error - was correctly reported but the encoder state was corrupted. - - This is related to the recent fix in - f8ee61e74eb40600445fdb601c374d582e1e9c8a which is good but - it wasn't enough to fix the main problem in stream_encoder.c. + Update THANKS. - src/liblzma/common/stream_encoder.c | 39 +++++++++++++++++++++++++++++-------- - 1 file changed, 31 insertions(+), 8 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit cafd6dc397ca8b5b5f7775e8d6876b8fe70f8e70 -Author: Lasse Collin -Date: 2022-11-22 16:37:15 +0200 +commit 3b3023e00b0071e10f589bbc3674e0ec432b8add +Author: Kian-Meng Ang +Date: 2023-11-30 23:01:19 +0800 - liblzma: Fix language in a comment. + Tests: Fix typos - src/liblzma/common/stream_encoder.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_index.c | 2 +- + tests/test_lzip_decoder.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit c392bf8ccba857baaf50399c4b460119befacd54 -Author: Lasse Collin -Date: 2022-11-22 11:20:17 +0200 +commit 424d46ead8cbc0da57f406b76926ec4ed47437f5 +Author: Kian-Meng Ang +Date: 2023-11-30 22:59:47 +0800 - liblzma: Fix infinite loop in LZMA encoder init with dict_size >= 2 GiB. - - The encoder doesn't support dictionary sizes larger than 1536 MiB. - This is validated, for example, when calculating the memory usage - via lzma_raw_encoder_memusage(). It is also enforced by the LZ - part of the encoder initialization. However, LZMA encoder with - LZMA_MODE_NORMAL did an unsafe calculation with dict_size before - such validation and that results in an infinite loop if dict_size - was 2 << 30 or greater. + xz: Fix typo - src/liblzma/lzma/lzma_encoder.c | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) + src/xz/file_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f50534c973a591ccf65485adfc827a8a7126ca6c -Author: Lasse Collin -Date: 2022-11-21 13:02:33 +0200 +commit 35558adf9c45e5597f2c8dbd969885dd484038d2 +Author: Jia Tan +Date: 2023-11-30 20:41:00 +0800 - liblzma: Fix two Doxygen commands in the API headers. - - These were caught by clang -Wdocumentation. + Update THANKS. - src/liblzma/api/lzma/hardware.h | 2 +- - src/liblzma/api/lzma/index_hash.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 649d4872ed2f55196114a061d45b416fc4353569 -Author: Lasse Collin -Date: 2022-11-19 19:09:55 +0200 +commit fd170e8557727bed6bec0518c16415064d972e4e +Author: Jia Tan +Date: 2023-11-22 21:20:12 +0800 - xz: Refactor duplicate code from hardware_memlimit_mtenc_get(). + CI: Test musl libc builds on Ubuntu runner. - src/xz/hardware.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/workflows/ci.yml | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) -commit d327743bb547a53364e5951a16e5f1663fe4b9ff -Author: Lasse Collin -Date: 2022-11-19 19:06:13 +0200 +commit db2b4aa068a492c0013279a4ed43803e8ff9bb3e +Author: Jia Tan +Date: 2023-11-22 21:12:15 +0800 - xz: Add support --threads=+N so that -T+1 gives threaded mode. + CI: Allow ci_build.sh to set a different C compiler. - src/xz/args.c | 18 +++++++++++++++--- - src/xz/hardware.c | 17 +++++++++++++++-- - src/xz/hardware.h | 1 + - src/xz/xz.1 | 21 ++++++++++++++++++++- - 4 files changed, 51 insertions(+), 6 deletions(-) + build-aux/ci_build.sh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) -commit a11a2b8b5e830ba682c1d81aaa7078842b296995 +commit ff7badef53c2cd698d4b72b945f34dfd0835e13c Author: Jia Tan -Date: 2022-11-19 23:18:04 +0800 +Date: 2023-11-24 21:19:12 +0800 - CMake: Adds test_memlimit to CMake tests + CMake: Use consistent indentation with check_c_source_compiles(). - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 2af8d9e9b3f44f62d19e7c39297ec63af2e8c64f -Author: Lasse Collin -Date: 2022-11-15 19:10:21 +0200 +commit d4af167570f2c14b002ee18a39d5b1e7e5a892b1 +Author: Jia Tan +Date: 2023-11-22 20:33:36 +0800 - Translations: Update the Korean translation. + CMake: Change __attribute__((__ifunc__())) detection. + + This renames ALLOW_ATTR_IFUNC to USE_ATTR_IFUNC and applies the ifunc + detection changes that were made to the Autotools build. + + Fixes: https://github.com/tukaani-project/xz/issues/70 - po/ko.po | 652 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 371 insertions(+), 281 deletions(-) + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 45 insertions(+), 8 deletions(-) -commit 16ac05677292f7e21a4feaddcfb2ab062ea5f385 -Author: Lasse Collin -Date: 2022-11-15 19:09:28 +0200 +commit 20ecee40a0053fd16371ef0628046bf45e548d72 +Author: Jia Tan +Date: 2023-11-24 20:19:11 +0800 - Translations: Update the Turkish translation. + Docs: Update INSTALL for --enable_ifunc change. - po/tr.po | 568 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 310 insertions(+), 258 deletions(-) + INSTALL | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit b9a67d9a5fa207062d4aa8a01639234609315d31 -Author: Lasse Collin -Date: 2022-11-15 10:58:39 +0200 +commit ffb456593d695d70052a2f71c7a2e6269217d194 +Author: Jia Tan +Date: 2023-11-21 20:56:55 +0800 - Bump version number for 5.3.4alpha. + Build: Change --enable-ifunc handling. + + Some compilers support __attribute__((__ifunc__())) even though the + dynamic linker does not. The compiler is able to create the binary + but it will fail on startup. So it is not enough to just test if + the attribute is supported. + + The default value for enable_ifunc is now auto, which will attempt + to compile a program using __attribute__((__ifunc__())). There are + additional checks in this program if glibc is being used or if it + is running on FreeBSD. + + Setting --enable-ifunc will skip this test and always enable + __attribute__((__ifunc__())), even if is not supported. - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma_generic.map | 2 +- - src/liblzma/liblzma_linux.map | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + configure.ac | 61 +++++++++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 44 insertions(+), 17 deletions(-) -commit 5b999ba289b3280457b7386b9ac65dbbdf1575a5 +commit 12b89bcc9915090eb42ae638e565af44b6832a23 Author: Lasse Collin -Date: 2022-11-15 10:54:40 +0200 +Date: 2023-11-23 17:39:10 +0200 - Add NEWS for 5.3.4alpha. + xz: Tweak a comment. - NEWS | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 96 insertions(+) + src/xz/util.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit ce8db9e37da4f6c87691c5066f51f91f2411c44a -Author: Lasse Collin -Date: 2022-11-15 10:54:08 +0200 +commit 2ab2e4b5a542eab93902985ce4e642719a8b7a4e +Author: Jia Tan +Date: 2023-11-23 22:13:39 +0800 - Add NEWS for 5.2.8. + xz: Use is_tty() in message.c. - NEWS | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 79 insertions(+) + src/xz/message.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) -commit b56bc8251d2736224af6bdaaae734ceb8926a879 -Author: Lasse Collin -Date: 2022-11-14 23:19:57 +0200 +commit 584e3a258f32d579b1d07f99b4dc6e856c10ac7e +Author: Jia Tan +Date: 2023-11-23 22:04:35 +0800 - Revert "liblzma: Simple/BCJ filters: Allow disabling generic BCJ options." + xz: Create separate is_tty() function. + + The new is_tty() will report if a file descriptor is a terminal or not. + On POSIX systems, it is a wrapper around isatty(). However, the native + Windows implementation of isatty() will return true for all character + devices, not just terminals. So is_tty() has a special case for Windows + so it can use alternative Windows API functions to determine if a file + descriptor is a terminal. + + This fixes a bug with MSVC and MinGW-w64 builds that refused to read from + or write to non-terminal character devices because xz thought it was a + terminal. For instance: - This reverts commit 177bdc922cb17bd0fd831ab8139dfae912a5c2b8 - and also does equivalent change to arm64.c. + xz foo -c > /dev/null - Now that ARM64 filter will use lzma_options_bcj, this change - is not needed anymore. + would fail because /dev/null was assumed to be a terminal. - src/liblzma/simple/arm.c | 2 +- - src/liblzma/simple/arm64.c | 2 +- - src/liblzma/simple/armthumb.c | 2 +- - src/liblzma/simple/ia64.c | 2 +- - src/liblzma/simple/powerpc.c | 2 +- - src/liblzma/simple/simple_coder.c | 4 ++-- - src/liblzma/simple/simple_private.h | 2 +- - src/liblzma/simple/sparc.c | 2 +- - src/liblzma/simple/x86.c | 3 +-- - 9 files changed, 10 insertions(+), 11 deletions(-) + src/xz/util.c | 30 +++++++++++++++++++++++------- + src/xz/util.h | 14 ++++++++++++++ + 2 files changed, 37 insertions(+), 7 deletions(-) -commit 8370ec8edf9ddf8d1d9fef03d8d1027503ec4c35 -Author: Lasse Collin -Date: 2022-11-14 23:14:41 +0200 +commit 6b05f827f50e686537e9a23c49c5aa4c0aa6b23d +Author: Jia Tan +Date: 2023-11-22 20:39:41 +0800 - Replace the experimental ARM64 filter with a new experimental version. + tuklib_integer: Fix typo discovered by codespell. - This is incompatible with the previous version. - - This has space/tab fixes in filter_*.c and bcj.h too. + Based on internet dictionary searches, 'choise' is an outdated spelling + of 'choice'. - src/liblzma/api/lzma/bcj.h | 41 +----- - src/liblzma/common/filter_common.c | 14 +- - src/liblzma/common/filter_decoder.c | 12 +- - src/liblzma/common/filter_encoder.c | 17 +-- - src/liblzma/simple/arm64.c | 283 ++++++++++++++---------------------- - src/liblzma/simple/simple_decoder.h | 4 - - src/liblzma/simple/simple_encoder.h | 2 - - src/xz/args.c | 2 +- - src/xz/message.c | 13 +- - src/xz/options.c | 39 ----- - src/xz/options.h | 7 - - 11 files changed, 147 insertions(+), 287 deletions(-) + src/common/tuklib_integer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f644473a211394447824ea00518d0a214ff3f7f2 +commit 659aca0d695807c0762d4101765189e4e33d1e2c Author: Lasse Collin -Date: 2022-11-14 21:34:57 +0200 +Date: 2023-11-17 19:35:19 +0200 - liblzma: Add fast CRC64 for 32/64-bit x86 using SSSE3 + SSE4.1 + CLMUL. + xz: Move the check for --suffix with --format=raw a few lines earlier. - It also works on E2K as it supports these intrinsics. + Now it reads from argv[] instead of args->arg_names. + + src/xz/args.c | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +commit ca278eb2b7f5a4940f5ab18955297b398d423824 +Author: Jia Tan +Date: 2023-11-17 20:35:11 +0800 + + Tests: Create test_suffix.sh. - On x86-64 runtime detection is used so the code keeps working on - older processors too. A CLMUL-only build can be done by using - -msse4.1 -mpclmul in CFLAGS and this will reduce the library - size since the generic implementation and its 8 KiB lookup table - will be omitted. + This tests some complicated interactions with the --suffix= option. + The suffix option must be used with --format=raw, but can optionally + be used to override the default .xz suffix. - On 32-bit x86 this isn't used by default for now because by default - on 32-bit x86 the separate assembly file crc64_x86.S is used. - If --disable-assembler is used then this new CLMUL code is used - the same way as on 64-bit x86. However, a CLMUL-only build - (-msse4.1 -mpclmul) won't omit the 8 KiB lookup table on - 32-bit x86 due to a currently-missing check for disabled - assembler usage. + This test also verifies some recent bugs have been correctly solved + and to hopefully avoid further regressions in the future. + + tests/Makefile.am | 2 + + tests/test_suffix.sh | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 191 insertions(+) + +commit 2a732aba22da1b0d4a1241cb32280ed010ba03ce +Author: Jia Tan +Date: 2023-11-17 20:19:26 +0800 + + xz: Fix a bug with --files and --files0 in raw mode without a suffix. - The configure.ac check should be such that the code won't be - built if something in the toolchain doesn't support it but - --disable-clmul-crc option can be used to unconditionally - disable this feature. + The following command caused a segmentation fault: - CLMUL speeds up decompression of files that have compressed very - well (assuming CRC64 is used as a check type). It is know that - the CLMUL code is significantly slower than the generic code for - tiny inputs (especially 1-8 bytes but up to 16 bytes). If that - is a real-world problem then there is already a commented-out - variant that uses the generic version for small inputs. + xz -Fraw --lzma1 --files=foo - Thanks to Ilya Kurdyukov for the original patch which was - derived from a white paper from Intel [1] (published in 2009) - and public domain code from [2] (released in 2016). + when foo was a valid file. The usage of --files or --files0 was not + being checked when compressing or decompressing in raw mode without a + suffix. The suffix checking code was meant to validate that all files + to be processed are "-" (if not writing to standard out), meaning the + data is only coming from standard in. In this case, there were no file + names to check since --files and --files0 store their file name in a + different place. - [1] https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf - [2] https://github.com/rawrunprotected/crc + Later code assumed the suffix was set and caused a segmentation fault. + Now, the above command results in an error. - CMakeLists.txt | 26 ++- - INSTALL | 12 ++ - configure.ac | 59 +++++- - src/liblzma/check/crc64_fast.c | 449 +++++++++++++++++++++++++++++++++++++++- - src/liblzma/check/crc64_table.c | 21 +- - 5 files changed, 554 insertions(+), 13 deletions(-) + src/xz/args.c | 5 +++++ + 1 file changed, 5 insertions(+) -commit 3b466bc79672bb2b06d1245a500588e6026e0ba0 -Author: Lasse Collin -Date: 2022-11-14 20:14:34 +0200 +commit 299920bab9ae258a247366339264e8aefca9e3ce +Author: Jia Tan +Date: 2023-11-17 20:04:58 +0800 - Translations: Update the Swedish translation one more time. + Tests: Fix typo in a comment. - po/sv.po | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + tests/test_files.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e963379a8622ebdff6ce78e76b803bcd1e1d16d6 -Author: Lasse Collin -Date: 2022-11-14 19:34:15 +0200 +commit f481523baac946fa3bc13d79186ffaf0c0b818a7 +Author: Jia Tan +Date: 2023-11-15 23:40:13 +0800 - Translations: Update the Swedish translation again. + xz: Refactor suffix test with raw format. + + The previous version set opt_stdout, but this caused an issue with + copying an input file to standard out when decompressing an unknown file + type. The following needs to result in an error: + + echo foo | xz -df + + since -c, --stdout is not used. This fixes the previous error by not + setting opt_stdout. - po/sv.po | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + src/xz/args.c | 38 +++++++++++++------------------------- + 1 file changed, 13 insertions(+), 25 deletions(-) -commit a4bc689a823a2254f29ac9d233170add5121b307 -Author: Lasse Collin -Date: 2022-11-14 19:07:45 +0200 +commit 837ea40b1c9d4998cac4500b55171bf33e0c31a6 +Author: Jia Tan +Date: 2023-11-14 20:27:46 +0800 - Translations: Update the Swedish translation. + xz: Move suffix check after stdout mode is detected. + + This fixes a bug introduced in cc5aa9ab138beeecaee5a1e81197591893ee9ca0 + when the suffix check was initially moved. This caused a situation that + previously worked: + + echo foo | xz -Fraw --lzma1 | wc -c + + to fail because the old code knew that this would write to standard out + so a suffix was not needed. - po/sv.po | 671 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 382 insertions(+), 289 deletions(-) + src/xz/args.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit bbf2073d824ab4ba33bed4b77f467435abd333a5 -Author: Lasse Collin -Date: 2022-11-14 18:58:09 +0200 +commit d4f4a4d040ef47a5e82dffd0f067e92716606ddf +Author: Jia Tan +Date: 2023-11-14 20:27:04 +0800 - Translations: Update the Ukrainian translation. + xz: Detect when all data will be written to standard out earlier. + + If the -c, --stdout argument is not used, then we can still detect when + the data will be written to standard out if all of the provided + filenames are "-" (denoting standard in) or if no filenames are + provided. - po/uk.po | 618 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 354 insertions(+), 264 deletions(-) + src/xz/args.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) -commit ac10b1b3622e70881595586edfb8a3ebdcd76bb6 -Author: Lasse Collin -Date: 2022-11-14 17:58:07 +0200 +commit 2ade7246e7ba729a91460d2fab0f4c7b89d3998b +Author: Jia Tan +Date: 2023-11-09 01:21:53 +0800 - Build: Omit x86_64 from --enable-assembler. - - It didn't do anything. There are only 32-bit x86 assembly files - and it feels likely that new files won't be added as intrinsics - in C are more portable across toolchains and OSes. + liblzma: Add missing comments to lz_encoder.h. - configure.ac | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + src/liblzma/lz/lz_encoder.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -commit eb0f1450ad9f23dac03050d9c8375980240aee21 -Author: Lasse Collin -Date: 2022-11-14 16:00:52 +0200 +commit 5fe1450603dc625340b8b7866fb4a83ff748ad06 +Author: Jia Tan +Date: 2023-11-01 20:18:30 +0800 - liblzma: Use __attribute__((__constructor__)) if available. - - This uses it for CRC table initializations when using --disable-small. - It avoids mythread_once() overhead. It also means that then - --disable-small --disable-threads is thread-safe if this attribute - is supported. + Add NEWS for 5.4.5. - CMakeLists.txt | 15 +++++++++++++++ - INSTALL | 4 +++- - configure.ac | 31 ++++++++++++++++++++++++++++--- - src/liblzma/check/crc32_small.c | 7 +++++++ - src/liblzma/check/crc64_small.c | 5 +++++ - src/liblzma/lz/lz_encoder.c | 2 +- - 6 files changed, 59 insertions(+), 5 deletions(-) + NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) -commit 6553f49b11dafad35c73b05f12e14865ea1fd8a1 +commit 46007049cd42e606543dbe650feb17bdf4469c29 Author: Lasse Collin -Date: 2022-11-12 21:19:52 +0200 +Date: 2023-10-31 21:41:09 +0200 - Translations: Update the Romanian translation. + liblzma: Fix compilation of fastpos_tablegen.c. + + The macro lzma_attr_visibility_hidden has to be defined to make + fastpos.h usable. The visibility attribute is irrelevant to + fastpos_tablegen.c so simply #define the macro to an empty value. + + fastpos_tablegen.c is never built by the included build systems + and so the problem wasn't noticed earlier. It's just a standalone + program for generating fastpos_table.c. + + Fixes: https://github.com/tukaani-project/xz/pull/69 + Thanks to GitHub user Jamaika1. - po/ro.po | 651 +++++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 380 insertions(+), 271 deletions(-) + src/liblzma/lzma/fastpos_tablegen.c | 2 ++ + 1 file changed, 2 insertions(+) -commit db97e69e12393becc29f8febd53133d0d36989bd -Author: Lasse Collin -Date: 2022-11-12 21:17:45 +0200 +commit 148e20607e95781558bdfc823ecba07b7af4b590 +Author: Jia Tan +Date: 2023-10-31 21:51:40 +0800 - Translations: Update the Hungarian translation. + Build: Fix text wrapping in an output message. - po/hu.po | 625 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 357 insertions(+), 268 deletions(-) + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) -commit 2bbb9c0f3829a8b121b36998d273a6c6f92000f4 +commit 8c36ab79cbf23104ce7a3d533d5ac98cd492e57c Author: Lasse Collin -Date: 2022-11-11 17:58:57 +0200 +Date: 2023-10-30 18:09:53 +0200 - Translations: Update the Finnish translation. + liblzma: Add a note why crc_always_inline exists for now. + + Solaris Studio is a possible example (not tested) which + supports the always_inline attribute but might not get + detected by the common.h #ifdefs. - po/fi.po | 610 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 348 insertions(+), 262 deletions(-) + src/liblzma/check/crc_common.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit 3c8cbb8137b6f8ed9416c1209d73cdbcb015251f +commit e7a86b94cd247435ac96bc79ba528b690b9ca388 Author: Lasse Collin -Date: 2022-11-11 17:58:18 +0200 +Date: 2023-10-22 17:59:11 +0300 - Translations: Update the Croatian translation. + liblzma: Use lzma_always_inline in memcmplen.h. - po/hr.po | 680 +++++++++++++++++++++++++++++++++++---------------------------- - 1 file changed, 381 insertions(+), 299 deletions(-) + src/liblzma/common/memcmplen.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit 26c3359eac0988d6f3986735cd1363bec1678e8e +commit dcfe5632992fb7f06f921da13fcdd84f83d0d285 Author: Lasse Collin -Date: 2022-11-11 17:57:18 +0200 +Date: 2023-10-30 17:43:03 +0200 - Translations: Update the Polish translation. + liblzma: #define lzma_always_inline in common.h. - po/pl.po | 569 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 309 insertions(+), 260 deletions(-) + src/liblzma/common/common.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) -commit 577e467b137c735afb8de6ae71ac7a73c2960cc4 +commit 41113fe30a47f6fd3e30cb4494dd538e86212edf Author: Lasse Collin -Date: 2022-11-11 17:56:44 +0200 +Date: 2023-10-22 17:15:32 +0300 - Translations: Update the Spanish translation. + liblzma: Use lzma_attr_visibility_hidden on private extern declarations. + + These variables are internal to liblzma and not exposed in the API. - po/es.po | 598 ++++++++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 344 insertions(+), 254 deletions(-) + src/liblzma/check/check.h | 7 +++++++ + src/liblzma/common/stream_flags_common.h | 3 +++ + src/liblzma/lz/lz_encoder_hash.h | 1 + + src/liblzma/lzma/fastpos.h | 1 + + src/liblzma/rangecoder/price.h | 1 + + 5 files changed, 13 insertions(+) -commit f9b4ff6e9a0f1678650775582d3e4fe782abce97 +commit a2f5ca706acc6f7715b8d260a8c6ed50d7717478 Author: Lasse Collin -Date: 2022-11-11 17:16:03 +0200 +Date: 2023-10-22 17:08:39 +0300 - Update THANKS. + liblzma: #define lzma_attr_visibility_hidden in common.h. + + In ELF shared libs: + + -fvisibility=hidden affects definitions of symbols but not + declarations.[*] This doesn't affect direct calls to functions + inside liblzma as a linker can replace a call to lzma_foo@plt + with a call directly to lzma_foo when -fvisibility=hidden is used. + + [*] It has to be like this because otherwise every installed + header file would need to explictly set the symbol visibility + to default. + + When accessing extern variables that aren't defined in the + same translation unit, compiler assumes that the variable has + the default visibility and thus indirection is needed. Unlike + function calls, linker cannot optimize this. + + Using __attribute__((__visibility__("hidden"))) with the extern + variable declarations tells the compiler that indirection isn't + needed because the definition is in the same shared library. + + About 15+ years ago, someone told me that it would be good if + the CRC tables would be defined in the same translation unit + as the C code of the CRC functions. While I understood that it + could help a tiny amount, I didn't want to change the code because + a separate translation unit for the CRC tables was needed for the + x86 assembly code anyway. But when visibility attributes are + supported, simply marking the extern declaration with the + hidden attribute will get identical result. When there are only + a few affected variables, this is trivial to do. I wish I had + understood this back then already. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/common.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit a39961ef211e1bf030b17edeea3cff29fe263b67 +commit 2c7ee92e44e1e66f0a427555233eb22c78f6c4f8 Author: Lasse Collin -Date: 2022-11-11 17:15:25 +0200 +Date: 2023-09-30 22:54:28 +0300 - liblzma: Fix building with Intel ICC (the classic compiler). - - It claims __GNUC__ >= 10 but doesn't support __symver__ attribute. + liblzma: Refer to MinGW-w64 instead of MinGW in the API headers. - Thanks to Stephen Sachs. + MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project + at ) has GCC 9.2.0 as the + most recent GCC package (released 2021-02-02). The project might + still be alive but majority of people have switched to MinGW-w64. + Thus it seems clearer to refer to MinGW-w64 in our API headers too. + Building with MinGW is likely to still work but I haven't tested it + in the recent years. - src/liblzma/common/common.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma.h | 4 ++-- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit c715f683dcb1a817d565da292cddfbceda643e12 +commit 597f49b61475438a43a417236989b2acc968a686 Author: Lasse Collin -Date: 2022-11-11 14:35:58 +0200 +Date: 2023-09-27 00:58:17 +0300 - liblzma: Fix incorrect #ifdef for x86 SSE2 support. + CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed. - __SSE2__ is the correct macro for SSE2 support with GCC, Clang, - and ICC. __SSE2_MATH__ means doing floating point math with SSE2 - instead of 387. Often the latter macro is defined if the first - one is but it was still a bug. - - src/liblzma/common/memcmplen.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit bd334ae56afe7f642ad4d0f1ac19e74e82daa1ce -Author: Lasse Collin -Date: 2022-11-11 13:27:06 +0200 - - Add NEWS for 5.2.7 (forgotten cherry-pick from v5.2). - - NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 74 insertions(+) - -commit 3c7860cf49de6f81046b3a4034a89f3a4803a576 -Author: Lasse Collin -Date: 2022-11-11 13:16:21 +0200 - - xzdiff: Add support for .lz files. + A CMake option LARGE_FILE_SUPPORT is created if and only if + -D_FILE_OFFSET_BITS=64 affects sizeof(off_t). - The other scripts don't need changes for .lz support because - in those scripts it is enough that xz supports .lz. + This is needed on many 32-bit platforms and even with 64-bit builds + with MinGW-w64 to get support for files larger than 2 GiB. - src/scripts/xzdiff.in | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + CMakeLists.txt | 7 ++++- + cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 1 deletion(-) -commit d76c752a6d77052e5ad57ade555082585f7ac5d8 +commit 1bc548b8210366e44ba35b0b11577a8e328c1228 Author: Lasse Collin -Date: 2022-11-11 12:23:58 +0200 +Date: 2023-09-30 02:14:25 +0300 - Scripts: Ignore warnings from xz. + CMake: Generate and install liblzma.pc if not using MSVC. - In practice this means making the scripts work when - the input files have an unsupported check type which - isn't a problem in practice unless support for - some check types has been disabled at build time. + Autotools based build uses -pthread and thus adds it to Libs.private + in liblzma.pc. CMake doesn't use -pthread at all if pthread functions + are available in libc so Libs.private doesn't get -pthread either. - src/scripts/xzdiff.in | 5 +++-- - src/scripts/xzgrep.in | 2 +- - src/scripts/xzless.in | 4 ++-- - src/scripts/xzmore.in | 4 ++-- - 4 files changed, 8 insertions(+), 7 deletions(-) + CMakeLists.txt | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) -commit 6552535afd1fe29d726ab6e68cf14ce3624fd48c +commit 2add71966f891d315105d6245f724ed4f43a4eff Author: Lasse Collin -Date: 2022-11-10 12:34:43 +0200 +Date: 2023-09-30 01:13:13 +0300 - Translations: Rename poa4/fr_FR.po to po4a/fr.po. + CMake: Rearrange the PACKAGE_ variables. - That's how it is preferred at the Translation Project. - On my system /usr/share/man/fr_FR doesn't contain any - other man pages than XZ Utils while /usr/share/man/fr - has quite a few, so this will fix that too. + The windres workaround now replaces spaces with \x20 so + the package name isn't repeated. - Thanks to Benno Schulenberg from the Translation Project. + These changes will help with creation of liblzma.pc. - po4a/{fr_FR.po => fr.po} | 0 - po4a/po4a.conf | 2 +- - 2 files changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) -commit 0918159ce4c75bfb60aff0193b559f8a9f41d25a +commit a7d1b2825c49dc83f1910eeb8ba0f1dfbd886d91 Author: Lasse Collin -Date: 2022-11-09 18:48:50 +0200 +Date: 2023-09-29 20:46:11 +0300 - xz: Update the man page about BCJ filters, including upcoming --arm64. + liblzma: Add Cflags.private to liblzma.pc.in for MSYS2. - The --arm64 isn't actually implemented yet in the form - described in this commit. + It properly adds -DLZMA_API_STATIC when compiling code that + will be linked against static liblzma. Having it there on + systems other than Windows does no harm. - Thanks to Jia Tan. + See: https://www.msys2.org/docs/pkgconfig/ - src/xz/xz.1 | 66 +++++++++++++++++++++++++++---------------------------------- - 1 file changed, 29 insertions(+), 37 deletions(-) + src/liblzma/liblzma.pc.in | 1 + + 1 file changed, 1 insertion(+) -commit ba2ae3596f6be1587495f33b367488f6e00e56f1 +commit 80e0750e3996c1c659e972ce9cf789ca2e99f702 Author: Lasse Collin -Date: 2022-11-09 18:14:14 +0200 +Date: 2023-09-27 22:46:20 +0300 - xz: Add --arm64 to --long-help and omit endianness from ARM(-Thumb). - - Modern 32-bit ARM in big endian mode use little endian for - instruction encoding still, so the filters work on such - executables too. It's likely less confusing for users this way. - - The --arm64 option hasn't been implemented yet (there is - --experimental-arm64 but it's different). The --arm64 option - is added now anyway because this is the likely result and the - strings need to be ready for translators. - - Thanks to Jia Tan. + CMake: Create liblzma.def when building liblzma.dll with MinGW-w64. - src/xz/message.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + CMakeLists.txt | 20 ++++++++++++++++++++ + cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+) -commit 802d57d9215d9c81dbee86edb43c9e93a7f7ec55 +commit 08d12595f486890cf601b87f36ee0ddbce57728e Author: Lasse Collin -Date: 2022-11-09 15:12:13 +0200 +Date: 2023-10-26 21:44:42 +0300 - Windows: Update the VS project files for ARM64 and .lz support. + CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR. + + In this case they have identical values. - windows/vs2013/config.h | 9 +++++++++ - windows/vs2013/liblzma.vcxproj | 5 ++++- - windows/vs2013/liblzma_dll.vcxproj | 5 ++++- - windows/vs2017/config.h | 9 +++++++++ - windows/vs2017/liblzma.vcxproj | 3 +++ - windows/vs2017/liblzma_dll.vcxproj | 3 +++ - windows/vs2019/config.h | 9 +++++++++ - windows/vs2019/liblzma.vcxproj | 5 ++++- - windows/vs2019/liblzma_dll.vcxproj | 5 ++++- - 9 files changed, 49 insertions(+), 4 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5846aeda05972bc803c6094821ae836229ebe691 +commit e67aaf698de75c73443a5ec786781cbf2034461d Author: Lasse Collin -Date: 2022-11-09 14:57:48 +0200 +Date: 2023-10-01 19:10:57 +0300 - DOS: Update Makefile and config.h to include ARM64 and .lz support. + CMake/Windows: Fix the import library filename. + + Both PREFIX and IMPORT_PERFIX have to be set to "" to get + liblzma.dll and liblzma.dll.a. - dos/Makefile | 2 ++ - dos/config.h | 9 +++++++++ - 2 files changed, 11 insertions(+) + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) -commit 781da8d6c44de6aa278c916375250668a0b107f2 +commit 88588b1246d8c26ffbc138b3e5c413c5f14c3179 Author: Lasse Collin -Date: 2022-11-09 14:45:05 +0200 +Date: 2023-10-25 19:13:25 +0300 - CMake: Add lzip decoder files and #define to the build. + Build: Detect -fsanitize= in CFLAGS and incompatible build options. + + Now configure will fail if -fsanitize= is found in CFLAGS + and sanitizer-incompatible ifunc or Landlock sandboxing + would be used. These are incompatible with one or more sanitizers. + It's simpler to reject all -fsanitize= uses instead of trying to + pass those that might not cause problems. + + CMake-based build was updated similarly. It lets the configuration + finish (SEND_ERROR instead of FATAL_ERROR) so that both error + messages can be seen at once. - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) + CMakeLists.txt | 29 +++++++++++++++++++++++++++++ + configure.ac | 37 +++++++++++++++++++++++++++++++++---- + 2 files changed, 62 insertions(+), 4 deletions(-) -commit df8ad4af65a9c4846b108550d0083770a69dee64 -Author: Lasse Collin -Date: 2022-11-09 14:41:56 +0200 +commit 5e3d890f8862a7d4fbef5e38e11b6c9fbd98f468 +Author: Jia Tan +Date: 2023-10-24 00:50:08 +0800 - Docs: Update INSTALL and also add new prohibited options to PACKAGERS. + CI: Disable sandboxing in fsanitize=address,undefined job. + + The sandboxing on Linux now supports Landlock, which restricts all + supported filesystem actions after xz opens the files it needs. The + sandbox is only enabled when one file is input and we are writing to + standard out. With fsanitize=address,undefined, the instrumentation + needs to read additional files after the sandbox is in place. This + forces all xz based test to fail, so the sandbox must instead be + disabled. - INSTALL | 49 +++++++++++++++++++++++++++++++++++++++++-------- - PACKAGERS | 2 ++ - 2 files changed, 43 insertions(+), 8 deletions(-) + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit c8ef089c149afaab413c3a51be827dd1d11afe0e -Author: Lasse Collin -Date: 2022-10-20 17:39:06 +0300 +commit b1408987ea832e2760e478ae960a636df17a1363 +Author: Jia Tan +Date: 2023-10-24 00:15:39 +0800 - Tests: Test the .lz files in test_files.sh. + CI: Allow disabling the sandbox in ci_build.sh. - tests/test_files.sh | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) + build-aux/ci_build.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -commit c8f70ebb4628ceb6cb29cc9195d9deadf69d2bd7 +commit 91c435cf1c7a1e893706d4d716dfd361621ed824 Author: Lasse Collin -Date: 2022-10-20 15:35:59 +0300 +Date: 2023-10-11 19:47:44 +0300 - Tests: Add .lz (lzip) test files. + CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable. + + Using set(ENABLE_THREADS "posix") is confusing because it sets + a new normal variable and leaves the cache entry with the same + name unchanged. The intent wasn't to change the cache entry so + this switches to a different variable name. - tests/files/README | 109 +++++++++++++++++++++++++++++---- - tests/files/bad-1-v0-uncomp-size.lz | Bin 0 -> 42 bytes - tests/files/bad-1-v1-crc32.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-dict-1.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-dict-2.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-magic-1.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-magic-2.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-member-size.lz | Bin 0 -> 50 bytes - tests/files/bad-1-v1-trailing-magic.lz | Bin 0 -> 54 bytes - tests/files/bad-1-v1-uncomp-size.lz | Bin 0 -> 50 bytes - tests/files/good-1-v0-trailing-1.lz | Bin 0 -> 59 bytes - tests/files/good-1-v0.lz | Bin 0 -> 42 bytes - tests/files/good-1-v1-trailing-1.lz | Bin 0 -> 67 bytes - tests/files/good-1-v1-trailing-2.lz | Bin 0 -> 70 bytes - tests/files/good-1-v1.lz | Bin 0 -> 50 bytes - tests/files/good-2-v0-v1.lz | Bin 0 -> 78 bytes - tests/files/good-2-v1-v0.lz | Bin 0 -> 78 bytes - tests/files/good-2-v1-v1.lz | Bin 0 -> 86 bytes - tests/files/unsupported-1-v234.lz | Bin 0 -> 50 bytes - 19 files changed, 98 insertions(+), 11 deletions(-) + CMakeLists.txt | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) -commit 731db13e6fa3ad3e3fc786c0ccf6eac4cce6865f +commit fa1609eb9393ecd30decfed4891c907829f06710 Author: Lasse Collin -Date: 2022-10-19 22:32:51 +0300 +Date: 2023-10-09 22:28:49 +0300 - xz: Remove the commented-out FORMAT_GZIP, gzip, .gz, and .tgz. + Docs: Update INSTALL about sandboxing support. - src/xz/args.c | 2 -- - src/xz/coder.h | 1 - - src/xz/suffix.c | 9 --------- - 3 files changed, 12 deletions(-) + INSTALL | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -commit 3176f992c55b8d788c4633809aaf9447376a5a12 +commit 8276c7f41c671eee4aa3239490658b23dcfd3021 Author: Lasse Collin -Date: 2022-10-08 21:28:15 +0300 +Date: 2023-10-09 22:07:52 +0300 - xz: Add .lz (lzip) decompression support. + xz: Support basic sandboxing with Linux Landlock (ABI versions 1-3). - If configured with --disable-lzip-decoder then --long-help will - still list `lzip' in --format but I left it like that since - due to translations it would be messy to have two help strings. - Features are disabled only in special situations so wrong help - in such a situation shouldn't matter much. + It is enabled only when decompressing one file to stdout, + similar to how Capsicum is used. - Thanks to Michał Górny for the original patch. + Landlock was added in Linux 5.13. - src/xz/args.c | 9 ++++++++ - src/xz/coder.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- - src/xz/coder.h | 3 +++ - src/xz/message.c | 2 +- - src/xz/suffix.c | 26 ++++++++++++++++++---- - src/xz/xz.1 | 46 +++++++++++++++++++++++++++++++++----- - 6 files changed, 141 insertions(+), 13 deletions(-) + CMakeLists.txt | 12 +++++++++++- + configure.ac | 11 ++++++++--- + src/xz/file_io.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/xz/main.c | 19 +++++++++++++++++++ + src/xz/private.h | 3 ++- + 5 files changed, 98 insertions(+), 5 deletions(-) -commit 034086e1ae1459210837a24e04878435c86dc41b +commit 3a1e9fd031b9320d769d63b503ef4e82e1b6ea8c Author: Lasse Collin -Date: 2022-10-08 00:29:20 +0300 +Date: 2023-10-09 21:12:31 +0300 - liblzma: Add .lz support to lzma_auto_decoder(). + CMake: Edit threading related messages. - Thanks to Michał Górny for the original patch. + It's mostly to change from "thread method" to "threading method". - src/liblzma/api/lzma/container.h | 10 ++++++---- - src/liblzma/common/Makefile.inc | 3 ++- - src/liblzma/common/auto_decoder.c | 23 +++++++++++++++++------ - src/liblzma/common/lzip_decoder.h | 22 ++++++++++++++++++++++ - 4 files changed, 47 insertions(+), 11 deletions(-) + CMakeLists.txt | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) -commit 0538db038f3cdc352007dacb42454aa1806b8e40 +commit bf011352528ae3539ea7b780b45b96736ee57a99 Author: Lasse Collin -Date: 2022-10-06 15:50:20 +0300 +Date: 2023-10-09 20:59:24 +0300 - liblzma: Add .lz (lzip) decompression support (format versions 0 and 1). - - Support for format version 0 was removed from lzip 1.18 for some - reason. .lz format version 0 files are rare (and old) but some - source packages were released in this format, and some people might - have personal files in this format too. It's very little extra code - to support it along side format version 1 so this commits adds - support for both. - - The Sync Flush marker extentension to the original .lz format - version 1 isn't supported. It would require changes to the - LZMA decoder itself. Such files are very rare anyway. + CMake: Use FATAL_ERROR if user-supplied options aren't understood. - See the API doc for lzma_lzip_decoder() for more details about - the .lz format support. + This way typos are caught quickly and compounding error messages + are avoided (a single typo could cause more than one error). - Thanks to Michał Górny for the original patch. + This keeps using SEND_ERROR when the system is lacking a feature + (like threading library or sandboxing method). This way the whole + configuration log will be generated in case someone wishes to + report a problem upstream. - configure.ac | 21 ++ - src/liblzma/api/lzma/container.h | 62 +++++- - src/liblzma/common/Makefile.inc | 5 + - src/liblzma/common/lzip_decoder.c | 413 ++++++++++++++++++++++++++++++++++++++ - src/liblzma/liblzma_generic.map | 1 + - src/liblzma/liblzma_linux.map | 1 + - 6 files changed, 501 insertions(+), 2 deletions(-) + CMakeLists.txt | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) -commit 633d48a075b9ce4b9c08a7a56a7eb4cabc18100c +commit 3f53870c249945d657ca3d75e0993e6267d71f75 Author: Lasse Collin -Date: 2022-11-09 14:17:23 +0200 +Date: 2023-10-09 18:37:32 +0300 - liblzma: Add the missing Makefile.inc change for --disable-microlzma. - - This was forgotten from commit 59c4d6e1390f6f4176f43ac1dad1f7ac03c449b8. + CMake: Add sandboxing support. - src/liblzma/common/Makefile.inc | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + CMakeLists.txt | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 49 insertions(+), 1 deletion(-) -commit 724285dadbdc88765c8fb83eab9816575a260966 +commit 2e2cd11535ad77364cf021297e0b3f162fa3a3d0 Author: Lasse Collin -Date: 2022-11-09 14:10:52 +0200 +Date: 2023-10-09 18:13:08 +0300 - xz: Add comments about stdin and src_st.st_size. + Simplify detection of Capsicum support. - "xz -v < regular_file > out.xz" doesn't display the percentage - and estimated remaining time because it doesn't even try to - check the input file size when input is read from stdin. - This could be improved but for now there's just a comment - to remind about it. - - src/xz/coder.c | 9 +++++++++ - src/xz/file_io.c | 4 ++++ - 2 files changed, 13 insertions(+) - -commit f723eec68b0e44234910f669a29119de33018967 -Author: Lasse Collin -Date: 2022-11-09 12:48:22 +0200 - - xz: Fix displaying of file sizes in progress indicator in passthru mode. + This removes support for FreeBSD 10.0 and 10.1 which used + instead of . Support for + FreeBSD 10.1 ended on 2016-12-31. So now FreeBSD >= 10.2 is + required to enable Capsicum support. - It worked for one input file since the counters are zero when - xz starts but they weren't reset when starting a new file in - passthru mode. For example, if files A, B, and C are one byte each, - then "xz -dcvf A B C" would show file sizes as 1, 2, and 3 bytes - instead of 1, 1, and 1 byte. + This also removes support for Capsicum on Linux (libcaprights) + which seems to have been unmaintained since 2017 and Linux 4.11: + https://github.com/google/capsicum-linux - src/xz/coder.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + configure.ac | 4 +-- + m4/ax_check_capsicum.m4 | 85 ------------------------------------------------- + src/xz/Makefile.am | 2 +- + src/xz/file_io.c | 14 +++----- + src/xz/private.h | 2 +- + 5 files changed, 9 insertions(+), 98 deletions(-) -commit 69265d0f223ddf1d66f799b8b047df22923e376f +commit c57858b60e186d020b2dbaf7aabd9b32c71da824 Author: Lasse Collin -Date: 2022-11-09 11:27:20 +0200 +Date: 2023-09-25 01:46:36 +0300 - xz: Add a comment why --to-stdout is not in --help. + xz/Windows: Allow clock_gettime with POSIX threads. - It is on the man page still. - - src/xz/message.c | 3 +++ - 1 file changed, 3 insertions(+) - -commit fe6b8852a3c6a0eb5a3c33512e0a69af257d3bc7 -Author: Lasse Collin -Date: 2022-11-08 23:05:37 +0200 - - xz: Make xz -lvv show that the upcoming --arm64 needs 5.4.0 to decompress. - - src/xz/list.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -commit fb3f05ac9f2b4b0e3643401960fbeab31997ac7a -Author: Lasse Collin -Date: 2022-11-08 22:26:54 +0200 - - Docs: Update faq.txt a little. - - doc/faq.txt | 66 ++++++++++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 43 insertions(+), 23 deletions(-) - -commit 05331f091ec3b68eccbfb2a9a7a576072768fb4b -Author: Lasse Collin -Date: 2022-11-08 16:57:17 +0200 - - Translations: Update Turkish translation. + If winpthreads are used for threading, it's OK to use clock_gettime() + from winpthreads too. - po/tr.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ed3a4822963b4940d84e6f44d47277c394fc046d -Author: Lasse Collin -Date: 2022-11-08 14:55:32 +0200 - - Translations: Update Croatian translation. - - po/hr.po | 190 ++++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 96 insertions(+), 94 deletions(-) - -commit 4746f5ec721316bc4c6fec9905b2902e0360e0af -Author: Lasse Collin -Date: 2022-11-08 14:13:03 +0200 - - liblzma: Update API docs about decoder flags. - - src/liblzma/api/lzma/container.h | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -commit 8779a9db5d0cec00c9dc9e9965dd2dda04f9d80d -Author: Lasse Collin -Date: 2022-11-08 14:01:50 +0200 - - liblzma: Use the return_if_error() macro in alone_decoder.c. - - src/liblzma/common/alone_decoder.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + src/xz/mytime.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) -commit 3f4990b6822961e75cd9b4e2e82b1df63f6f8fcc +commit dd32f628bb5541ef4e8ce66966ef456a1934084c Author: Lasse Collin -Date: 2022-11-08 14:00:58 +0200 +Date: 2023-09-25 01:39:26 +0300 - liblzma: Fix a comment in auto_decoder.c. + mythread.h: Make MYTHREAD_POSIX compatible with MinGW-w64's winpthreads. + + This might be almost useless but it doesn't need much extra code either. - src/liblzma/common/auto_decoder.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/common/mythread.h | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) -commit 026a5897c72a2041ae08ceec54ce8b1cdeb51334 +commit 680e52cdd086e92691d8a0bca2c98815565f60ca Author: Lasse Collin -Date: 2022-11-08 13:43:19 +0200 +Date: 2023-09-23 03:06:36 +0300 - xz: Initialize the pledge(2) sandbox at the very beginning of main(). + CMake: Check for clock_gettime() even on Windows. - It feels better that the initializations are sandboxed too. - They don't do anything that the pledge() call wouldn't allow. + This mirrors configure.ac although currently MinGW-w64 builds + don't use clock_gettime() even if it is found. - src/xz/main.c | 27 ++++++++++++++------------- - 1 file changed, 14 insertions(+), 13 deletions(-) + CMakeLists.txt | 44 +++++++++++++++++++++----------------------- + 1 file changed, 21 insertions(+), 23 deletions(-) -commit 49a59f6ca001c3ce9affa2c162b437aad021b4d5 +commit 1c1a8c3ee4dad0064dbe63b8dbc4ac4bc679f419 Author: Lasse Collin -Date: 2022-11-07 22:51:16 +0200 +Date: 2023-09-23 03:23:32 +0300 - xz: Extend --robot --info-memory output. + Build: Check for clock_gettime() even if not using POSIX threads. + + See the new comment in the code. - Now it includes everything that the human-readable --info-memory shows. + This also makes the check for clock_gettime() run with MinGW-w64 + with which we don't want to use clock_gettime(). The previous + commit already took care of this situation. - src/xz/hardware.c | 24 +++++++++++++++--------- - src/xz/xz.1 | 47 +++++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 56 insertions(+), 15 deletions(-) + configure.ac | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) -commit 5e2450c75cbac966c62cf2231c824f2cc91ddba8 +commit 46fd991cd2808ef62554853864c946232e7547f0 Author: Lasse Collin -Date: 2022-11-07 17:22:04 +0200 +Date: 2023-09-24 22:58:53 +0300 - liblzma: Include cached memory in reported memusage in threaded decoder. + xz/Windows: Ensure that clock_gettime() isn't used with MinGW-w64. - This affects lzma_memusage() and lzma_memlimit_set() when used - with the threaded decompressor. Now all allocations are reported - by lzma_memusage() (so it's not misleading) and lzma_memlimit_set() - cannot lower the limit below that value. + This commit alone doesn't change anything in the real-world: - The alternative would have been to allow lowering the limit if - doing so is possible by freeing the cached memory but since - the primary use case of lzma_memlimit_set() is to increase - memlimit after LZMA_MEMLIMIT_ERROR this simple approach - was selected. + - configure.ac currently checks for clock_gettime() only + when using pthreads. - The cached memory was always included when enforcing - the memory usage limit while decoding. + - CMakeLists.txt doesn't check for clock_gettime() on Windows. - Thanks to Jia Tan. - - src/liblzma/common/stream_decoder_mt.c | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -commit 1fc6e7dd1fabdb60124d449b99273330ccab3ff1 -Author: Jia Tan -Date: 2022-11-07 16:24:14 +0200 - - xz: Avoid a compiler warning in progress_speed() in message.c. + So clock_gettime() wasn't used with MinGW-w64 before either. - This should be smaller too since it avoids the string constants. + clock_gettime() provides monotonic time and it's better than + gettimeofday() in this sense. But clock_gettime() is defined + in winpthreads, and liblzma or xz needs nothing else from + winpthreads. By avoiding clock_gettime(), we avoid the dependency on + libwinpthread-1.dll or the need to link against the static version. + + As a bonus, GetTickCount64() and MinGW-w64's gettimeofday() can be + faster than clock_gettime(CLOCK_MONOTONIC, &tv). The resolution + is more than good enough for the progress indicator in xz. - src/xz/message.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) + src/xz/mytime.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -commit cf118c014683069b5dbe91898acdc40f2f0a1f5d +commit cdb4d91f2464b50c985ef7b9517314ea237ddda7 Author: Lasse Collin -Date: 2022-10-31 16:26:05 +0200 +Date: 2023-09-24 00:21:22 +0300 - Build: Clarify comment in configure.ac about SSE2. + xz/Windows: Use GetTickCount64() with MinGW-w64 if using Vista threads. - configure.ac | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/xz/mytime.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) -commit aad3c609ffb72f581a7a2b67be3ad70b2b327840 -Author: Lasse Collin -Date: 2022-10-31 16:16:37 +0200 +commit 988e09f27b9b04a43d45d10f92782e0092ee27a9 +Author: Jia Tan +Date: 2023-10-20 19:17:46 +0800 - Build: Remove obsolete commented-out lines from configure.ac. + liblzma: Move is_clmul_supported() back to crc_common.h. + + This partially reverts creating crc_clmul.c + (8c0f9376f58c0696d5d6719705164d35542dd891) where is_clmul_supported() + was moved, extern'ed, and renamed to lzma_is_clmul_supported(). This + caused a problem when the function call to lzma_is_clmul_supported() + results in a call through the PLT. ifunc resolvers run very early in + the dynamic loading sequence, so the PLT may not be setup properly at + this point. Whether the PLT is used or not for + lzma_is_clmul_supported() depened upon the compiler-toolchain used and + flags. + + In liblzma compiled with GCC, for instance, GCC will go through the PLT + for function calls internal to liblzma if the version scripts and + symbol visibility hiding are not used. If lazy-binding is disabled, + then it would have made any program linked with liblzma fail during + dynamic loading in the ifunc resolver. - configure.ac | 4 ---- - 1 file changed, 4 deletions(-) + src/liblzma/check/crc32_fast.c | 2 +- + src/liblzma/check/crc64_fast.c | 2 +- + src/liblzma/check/crc_clmul.c | 45 ------------------------------------ + src/liblzma/check/crc_common.h | 52 +++++++++++++++++++++++++++++++++++++++--- + 4 files changed, 51 insertions(+), 50 deletions(-) -commit e53e0e2186c6b8ce866bd19aec52f1c318ed31ba -Author: Lasse Collin -Date: 2022-10-31 13:31:58 +0200 +commit 105c7ca90d4152942e0798580a37f736d02faa22 +Author: Jia Tan +Date: 2023-10-19 16:23:32 +0800 - Windows: Fix mythread_once() macro with Vista threads. - - Don't call InitOnceComplete() if initialization was already done. + Build: Remove check for COND_CHECK_CRC32 in check/Makefile.inc. - So far mythread_once() has been needed only when building - with --enable-small. windows/build.bash does this together - with --disable-threads so the Vista-specific mythread_once() - is never needed by those builds. VS project files or - CMake-builds don't support HAVE_SMALL builds at all. + Currently crc32 is always enabled, so COND_CHECK_CRC32 must always be + set. Because of this, it makes the recent change to conditionally + compile check/crc_clmul.c appear wrong since that file has CLMUL + implementations for both CRC32 and CRC64. - src/common/mythread.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + src/liblzma/check/Makefile.inc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 48dde3bab9dc04081acb5aa7cf7c5044b8a49f58 -Author: Lasse Collin -Date: 2022-10-31 11:54:44 +0200 +commit 139757170468f0f1fafdf0a8ffa74363d1ea1d0c +Author: Jia Tan +Date: 2023-10-19 16:09:01 +0800 - liblzma: Silence -Wconversion warning from crc64_fast.c. + CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL. + + The option is enabled by default, but will only be visible to a user + listing cache variables or using a CMake GUI application if the + immintrin.h header file is found. + + This mirrors our Autotools build --disable-clmul-crc functionality. - src/liblzma/check/crc64_fast.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + CMakeLists.txt | 44 +++++++++++++++++++++++++------------------- + 1 file changed, 25 insertions(+), 19 deletions(-) -commit a243c617ff249d915ac123de4f536b80322c1fdb -Author: Lasse Collin -Date: 2022-10-31 11:49:47 +0200 +commit c60b25569d414bb73b705977a4dd342f8f9f1965 +Author: Jia Tan +Date: 2023-10-19 00:22:50 +0800 - CMake: Sync tuklib_cpucores.cmake with tuklib_cpucores.m4. + liblzma: Fix -fsanitize=address failure with crc_clmul functions. + + After forcing crc_simd_body() to always be inlined it caused + -fsanitize=address to fail for lzma_crc32_clmul() and + lzma_crc64_clmul(). The __no_sanitize_address__ attribute was added + to lzma_crc32_clmul() and lzma_crc64_clmul(), but not removed from + crc_simd_body(). ASAN and inline functions behavior has changed over + the years for GCC specifically, so while strictly required we will + keep __attribute__((__no_sanitize_address__)) on crc_simd_body() in + case this becomes a requirement in the future. - This was forgotten from commit 2611c4d90535652d3eb7ef4a026a6691276fab43. + Older GCC versions refuse to inline a function with ASAN if the + caller and callee do not agree on sanitization flags + (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89124#c3). If the + function was forced to be inlined, it will not compile if the callee + function has __no_sanitize_address__ but the caller doesn't. - cmake/tuklib_cpucores.cmake | 5 +++++ - 1 file changed, 5 insertions(+) + src/liblzma/check/crc_clmul.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 05c72de06fcaaedc78f8abba7d5ec568ddcf1e75 +commit 9a78971261bc67622cbd7dae02f6966968ac1393 Author: Lasse Collin -Date: 2022-10-27 15:49:18 +0300 +Date: 2023-10-14 20:16:13 +0300 - Tests: test_files.sh: Make it not fail if features were disabled at build. - - It now tries to test as many files as easily possible. - The exit status indicates skipping if any of the files were - skipped. This way it is easy to notice if something is being - skipped when it isn't expected. + tuklib_integer: Update the CMake test for fast unaligned access. - tests/test_files.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 46 insertions(+), 4 deletions(-) + cmake/tuklib_integer.cmake | 69 ++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 54 insertions(+), 15 deletions(-) -commit b3459327a51f4b8239d19e6c34b4e0c6bc2d81de +commit 2f81ac852bc5aafc91c8e2adc66b5114761703c4 Author: Lasse Collin -Date: 2022-10-27 15:30:13 +0300 +Date: 2023-09-23 23:28:48 +0300 - Tests: test_files.sh: Suppress an expected warning from the log. + Build: Enabled unaligned access by default on PowerPC64LE and some RISC-V. + + PowerPC64LE wasn't tested but it seems like a safe change. + POWER8 supports unaligned access in little endian mode. Testing + on godbolt.org shows that GCC uses unaligned access by default. + + The RISC-V macro __riscv_misaligned_fast is very new and not + in any stable compiler release yet. + + Documentation in INSTALL was updated to match. - xz (but not xzdec) will normally warn about unsupported check - but since we are testing specifically such a file, it's better - to silence that warning so that it doesn't look suspicious in - test_files.sh.log. + Documentation about an autodetection bug when using ARM64 GCC + with -mstrict-align was added to INSTALL. - The use of -q and -Q in xzdec is just for consistency and - doesn't affect the result at least for now. + CMake files weren't updated yet. - tests/test_files.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + INSTALL | 39 +++++++++++++++++++++++++++++++++++++-- + m4/tuklib_integer.m4 | 34 +++++++++++++++++++++++++++------- + 2 files changed, 64 insertions(+), 9 deletions(-) -commit 798c86e4231e0835ab76ccd0810c8ea30833b2ce +commit c8f715f1bca4c30db814fcf1fd2fe88b8992ede2 Author: Lasse Collin -Date: 2022-10-27 15:27:50 +0300 +Date: 2023-10-14 17:56:59 +0300 - Tests: test_files.sh: Print the reason for skipping if xz & xzdec missing. + tuklib_integer: Revise unaligned reads and writes on strict-align archs. + + In XZ Utils context this doesn't matter much because + unaligned reads and writes aren't used in hot code + when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined. - tests/test_files.sh | 1 + - 1 file changed, 1 insertion(+) + src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------ + 1 file changed, 189 insertions(+), 67 deletions(-) -commit c1dd8524e1af07f16b790463899de06a6a5fcc08 +commit 6828242735cbf61b93d140383336e1e51a006f2d Author: Lasse Collin -Date: 2022-10-27 01:12:40 +0300 +Date: 2023-09-23 02:21:49 +0300 - Tests: Keep test_compress_* working when some filters are unavailable. + tuklib_integer: Add missing write64be and write64le fallback functions. - tests/test_compress.sh | 34 ++++++++++++++++++++-------------- - 1 file changed, 20 insertions(+), 14 deletions(-) + src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) -commit ce30ada91951d0746879ae438da11f1ee8a90aa0 +commit 1c8884f0af28b3a4690bb573cdf3240a8ec73416 Author: Jia Tan -Date: 2022-10-23 21:01:08 +0800 +Date: 2023-10-18 19:57:10 +0800 - Tests: test_bcj_exact_size skips properly now if PowerPC filter disabled. + liblzma: Set the MSVC optimization fix to only cover lzma_crc64_clmul(). + + After testing a 32-bit Release build on MSVC, only lzma_crc64_clmul() + has the bug. crc_simd_body() and lzma_crc32_clmul() do not need the + optimizations disabled. - tests/test_bcj_exact_size.c | 3 +++ - 1 file changed, 3 insertions(+) + src/liblzma/check/crc_clmul.c | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) -commit 89c5cfcacaca7130509fac836e2f30c46b824502 +commit 5ce0f7a48bdf5c3b45430850a4487307afac6143 Author: Lasse Collin -Date: 2022-10-26 00:05:57 +0300 +Date: 2023-10-18 14:30:00 +0300 - Tests: Test also unsupported-*.xz. + liblzma: CRC_USE_GENERIC_FOR_SMALL_INPUTS cannot be used with ifunc. - tests/test_files.sh | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) + src/liblzma/check/crc_common.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit a4b214b93ac741edef9c41e55865b0b867ca2587 +commit 27735380491bb5ce0d0f41d5244d89c1d0825f6b Author: Lasse Collin -Date: 2022-10-25 23:45:03 +0300 +Date: 2023-10-17 21:53:11 +0300 - Build: Use AC_CONFIG_HEADERS instead of the ancient AC_CONFIG_HEADER. + liblzma: Include common.h in crc_common.h. - We require Autoconf >= 2.69 and that has AC_CONFIG_HEADERS. - - There is a warning about AC_PROG_CC_C99 being obsolete but - it cannot be removed because it is needed with Autoconf 2.69. + crc_common.h depends on common.h. The headers include common.h except + when there is a reason to not do so. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/check/crc_clmul.c | 1 - + src/liblzma/check/crc_common.h | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) -commit 04f299b64e73f50afc188c2590ebebc6b73ed744 -Author: Lasse Collin -Date: 2022-10-25 23:31:44 +0300 +commit e13b7947b92355c334edd594295d3a2c99c4bca1 +Author: Jia Tan +Date: 2023-10-18 01:23:26 +0800 - Build: Update m4/ax_pthread.m4 from Autoconf Archive. + liblzma: Add include guards to crc_common.h. - m4/ax_pthread.m4 | 29 ++++++++++++++++++++++------- - 1 file changed, 22 insertions(+), 7 deletions(-) + src/liblzma/check/crc_common.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit 59c4d6e1390f6f4176f43ac1dad1f7ac03c449b8 -Author: Lasse Collin -Date: 2022-10-25 23:28:34 +0300 +commit 40abd88afcc61a8157fcd12d78d491caeb8e12be +Author: Jia Tan +Date: 2023-10-18 22:50:25 +0800 - Build: Add configure option --disable-microlzma. + liblzma: Add the crc_always_inline macro to crc_simd_body(). - MicroLZMA was made for EROFS and used by erofs-utils. - It might be used by something else in the future but - those wanting a smaller build for specific situations - can now disable this rarely-needed feature. + Forcing this to be inline has a significant speed improvement at the + cost of a few repeated instructions. The compilers tested on did not + inline this function since it is large and is used twice in the same + translation unit. - configure.ac | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) + src/liblzma/check/crc_clmul.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 054ccd6d14b2cc6eddc56897af280d3221414150 -Author: Lasse Collin -Date: 2022-10-25 23:09:11 +0300 +commit a5966c276bd6fa975f0389f8a8dc61393de750b0 +Author: Jia Tan +Date: 2023-10-18 22:48:19 +0800 - xz: Fix --single-stream with an empty .xz Stream. - - Example: + liblzma: Create crc_always_inline macro. - $ xz -dc --single-stream good-0-empty.xz - xz: good-0-empty.xz: Internal error (bug) + This macro must be used instead of the inline keyword. On MSVC, it is + a replacement for __forceinline which is an MSVC specific keyword that + should not be used with inline (it will issue a warning if it is). - The code, that is tries to catch some input file issues early, - didn't anticipate LZMA_STREAM_END which is possible in that - code only when --single-stream is used. + It does not use a build system check to determine if + __attribute__((__always_inline__)) since all compilers that can use + CLMUL extensions (except the special case for MSVC) should support this + attribute. If this assumption is incorrect then it will result in a bug + report instead of silently producing slow code. - src/xz/coder.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + src/liblzma/check/crc_common.h | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) -commit 563288ea705e83ff5cb292adf794650c263bca1d -Author: Lasse Collin -Date: 2022-10-25 21:11:58 +0300 +commit 96b663f67c0e738a99ba8f35d9f4ced9add74544 +Author: Jia Tan +Date: 2023-10-14 13:23:23 +0800 - xz: Add support for OpenBSD's pledge() sandbox. + liblzma: Refactor CRC comments. + + A detailed description of the three dispatch methods was added. Also, + duplicated comments now only appear in crc32_fast.c or were removed from + both crc32_fast.c and crc64_fast.c if they appeared in crc_clmul.c. - configure.ac | 12 +++++++++--- - src/xz/file_io.c | 11 +++++++++++ - src/xz/main.c | 13 +++++++++++++ - src/xz/private.h | 2 +- - 4 files changed, 34 insertions(+), 4 deletions(-) + src/liblzma/check/crc32_fast.c | 64 +++++++++++++++++++++++++++++------------- + src/liblzma/check/crc64_fast.c | 61 ++++++---------------------------------- + 2 files changed, 53 insertions(+), 72 deletions(-) -commit f9913e8ee2ba0b1e4ff4d0aa4c001aae305ed944 -Author: Lasse Collin -Date: 2022-10-25 19:07:17 +0300 +commit 8c0f9376f58c0696d5d6719705164d35542dd891 +Author: Jia Tan +Date: 2023-10-14 12:17:57 +0800 - xz: Fix decompressor behavior if input uses an unsupported check type. + liblzma: Create crc_clmul.c. - Now files with unsupported check will make xz display - a warning, set the exit status to 2 (unless --no-warn is used), - and then decompress the file normally. This is how it was - supposed to work since the beginning but this was broken by - the commit 231c3c7098f1099a56abb8afece76fc9b8699f05, that is, - a little before 5.0.0 was released. The buggy behavior displayed - a message, set exit status 1 (error), and xz didn't attempt to - to decompress the file. + Both crc32_clmul() and crc64_clmul() are now exported from + crc32_clmul.c as lzma_crc32_clmul() and lzma_crc64_clmul(). This + ensures that is_clmul_supported() (now lzma_is_clmul_supported()) is + not duplicated between crc32_fast.c and crc64_fast.c. - This doesn't matter today except for special builds that disable - CRC64 or SHA-256 at build time (but such builds should be used - in special situations only). The bug matters if new check type - is added in the future and an old xz version is used to decompress - such a file; however, it's likely that such files would use a new - filter too and an old xz wouldn't be able to decompress the file - anyway. + Also, it encapsulates the complexity of the CLMUL implementations into a + single file and reduces the complexity of crc32_fast.c and crc64_fast.c. + Before, CLMUL code was present in crc32_fast.c, crc64_fast.c, and + crc_common.h. - The first hunk in the commit is the actual fix. The second hunk - is a cleanup since LZMA_TELL_ANY_CHECK isn't used in xz. + During the conversion, various cleanups were applied to code (thanks to + Lasse Collin) including: - There is a test file for unsupported check type but it wasn't - used by test_files.sh, perhaps due to different behavior between - xz and the simpler xzdec. - - src/xz/coder.c | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) + - Require using semicolons with MASK_/L/H/LH macros. + - Variable typing and const handling improvements. + - Improvements to comments. + - Fixes to the pragmas used. + - Removed unneeded variables. + - Whitespace improvements. + - Fixed CRC_USE_GENERIC_FOR_SMALL_INPUTS handling. + - Silenced warnings and removed the need for some #pragmas -commit aa4fe145b9486adc454f44fd3e09be9add808a0f -Author: Lasse Collin -Date: 2022-10-25 18:36:19 +0300 - - xz: Clarify the man page: input file isn't removed if an error occurs. - - src/xz/xz.1 | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + CMakeLists.txt | 6 +- + configure.ac | 6 +- + src/liblzma/check/Makefile.inc | 3 + + src/liblzma/check/crc32_fast.c | 120 +----------- + src/liblzma/check/crc64_fast.c | 128 +------------ + src/liblzma/check/crc_clmul.c | 414 +++++++++++++++++++++++++++++++++++++++++ + src/liblzma/check/crc_common.h | 190 +------------------ + 7 files changed, 444 insertions(+), 423 deletions(-) -commit 8b46ae8cdeddfd7dc01fec92971b8696e9a96c5d -Author: Lasse Collin -Date: 2022-10-25 18:30:55 +0300 +commit a3ebc2c516b09616638060806c841bd4bcf7bce3 +Author: Jia Tan +Date: 2023-10-14 10:23:03 +0800 - xz: Refactor to remove is_empty_filename(). + liblzma: Define CRC_USE_IFUNC in crc_common.h. - Long ago it was used in list.c too but nowadays it's needed - only in io_open_src() so it's nicer to avoid a separate function. + When ifunc is supported, we can define a simpler macro instead of + repeating the more complex check in both crc32_fast.c and crc64_fast.c. - src/xz/file_io.c | 4 +++- - src/xz/util.c | 12 ------------ - src/xz/util.h | 4 ---- - 3 files changed, 3 insertions(+), 17 deletions(-) + src/liblzma/check/crc32_fast.c | 3 +-- + src/liblzma/check/crc64_fast.c | 3 +-- + src/liblzma/check/crc_common.h | 5 +++++ + 3 files changed, 7 insertions(+), 4 deletions(-) -commit 85624015978b0de294cff3df79006df987c552b1 -Author: Lasse Collin -Date: 2022-10-25 18:23:54 +0300 +commit f1cd9d7194f005cd66ec03c6635ceae75f90ef17 +Author: Hans Jansen +Date: 2023-10-12 19:37:01 +0200 - xz: If input file cannot be removed, treat it as a warning, not error. - - Treating it as a warning (message + exit status 2) matches gzip - and it seems more logical as at that point the output file has - already been successfully closed. When it's a warning it is - possible to suppress it with --no-warn. + liblzma: Added crc32_clmul to crc32_fast.c. - src/xz/file_io.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/liblzma/check/crc32_fast.c | 247 ++++++++++++++++++++++++++++++++++++++-- + src/liblzma/check/crc32_table.c | 19 +++- + 2 files changed, 255 insertions(+), 11 deletions(-) -commit fda9f85f52c546f7ca0313cf89481da4707fecb3 -Author: Lasse Collin -Date: 2022-10-24 16:25:09 +0300 +commit 93e6fb08b22c7c13be2dd1e7274fe78413436254 +Author: Hans Jansen +Date: 2023-10-12 19:23:40 +0200 - liblzma: Threaded decoder: Stop the worker threads on errors. + liblzma: Moved CLMUL CRC logic to crc_common.h. - It's waste of CPU time and electricity to leave the unfinished - worker threads running when it is known that their output will - get ignored. + crc64_fast.c was updated to use the code from crc_common.h instead. - src/liblzma/common/stream_decoder_mt.c | 33 ++++++++++++++++++++++++++------- - 1 file changed, 26 insertions(+), 7 deletions(-) + src/liblzma/check/crc64_fast.c | 257 ++--------------------------------------- + src/liblzma/check/crc_common.h | 230 +++++++++++++++++++++++++++++++++++- + 2 files changed, 240 insertions(+), 247 deletions(-) -commit 2611c4d90535652d3eb7ef4a026a6691276fab43 -Author: Lasse Collin -Date: 2022-10-20 20:22:50 +0300 - - tuklib_cpucores: Use HW_NCPUONLINE on OpenBSD. - - On OpenBSD the number of cores online is often less - than what HW_NCPU would return because OpenBSD disables - simultaneous multi-threading (SMT) by default. - - Thanks to Christian Weisgerber. +commit 233885a437f8b55a5c8442984ebc0aaa579e92de +Author: Hans Jansen +Date: 2023-10-12 19:07:50 +0200 - m4/tuklib_cpucores.m4 | 5 +++++ - src/common/tuklib_cpucores.c | 9 +++++++++ - 2 files changed, 14 insertions(+) + liblzma: Rename crc_macros.h to crc_common.h. -commit 424ac91c7e0419393ff2bde4f62e21fa611c776d -Author: Lasse Collin -Date: 2022-10-19 19:39:35 +0300 + CMakeLists.txt | 2 +- + src/liblzma/check/Makefile.inc | 2 +- + src/liblzma/check/crc32_fast.c | 2 +- + src/liblzma/check/crc64_fast.c | 2 +- + src/liblzma/check/{crc_macros.h => crc_common.h} | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) - Tests: Skip tests in test_*.sh if encoders and/or decoders are disabled. +commit 37947d4a7565b87e4cec8b89229d35b0a3f8d2cd +Author: Gabriela Gutierrez +Date: 2023-09-26 15:55:13 +0000 + + CI: Bump and ref actions by commit SHA in windows-ci.yml + + Referencing actions by commit SHA in GitHub workflows guarantees you are using an immutable version. Actions referenced by tags and branches are more vulnerable to attacks, such as the tag being moved to a malicious commit or a malicious commit being pushed to the branch. - This isn't perfect as the scripts can still fail if only - certain filters are disabled. This is still an improvement - as now "make check" has better behavior when all encoders - or decoders are disabled. + It's important to make sure the SHA's are from the original repositories and not forks. - Grepping ../config.h is simple and fairly clean but it only - works if config.h was created. CMake builds don't create - config.h but they don't use these test scripts either. + For reference: - Thanks to Sebastian Andrzej Siewior for reporting the problem. - Thanks to Jia Tan for the original patch which grepped xz - error messages instead of config.h. + https://github.com/msys2/setup-msys2/releases/tag/v2.20.1 + https://github.com/msys2/setup-msys2/commit/27b3aa77f672cb6b3054121cfd80c3d22ceebb1d + + https://github.com/actions/checkout/releases/tag/v4.1.0 + https://github.com/actions/checkout/commit/8ade135a41bc03ea155e62e844d188df1ea18608 + + https://github.com/actions/upload-artifact/releases/tag/v3.1.3 + https://github.com/actions/upload-artifact/commit/a8a3f3ad30e3422c9c7b888a15615d19a852ae32 + + Signed-off-by: Gabriela Gutierrez - tests/test_compress.sh | 12 ++++++++++++ - tests/test_files.sh | 11 +++++++++++ - tests/test_scripts.sh | 11 +++++++++++ - 3 files changed, 34 insertions(+) + .github/workflows/windows-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit ca8bf9d7c5a30be8ba1eeb106fd892f19e83ed09 -Author: Lasse Collin -Date: 2022-10-19 18:54:34 +0300 +commit f28cc9bd481ce493da11f98c18526d324211599a +Author: Gabriela Gutierrez +Date: 2023-09-26 14:35:08 +0000 - Test: Remove the (exit 1) lines. + CI: Bump and ref actions by commit SHA in ci.yml + + Referencing actions by commit SHA in GitHub workflows guarantees you are using an immutable version. Actions referenced by tags and branches are more vulnerable to attacks, such as the tag being moved to a malicious commit or a malicious commit being pushed to the branch. + + It's important to make sure the SHA's are from the original repositories and not forks. + + For reference: - I suspect that I used these in the original version because - Autoconf's manual describes that such a trick is needed in - some specific situations for portability reasons. None of those - situations listed on Autoconf 2.71 manual apply to these test - scripts though so this cleans them up. + https://github.com/actions/checkout/releases/tag/v4.1.0 + https://github.com/actions/checkout/commit/8ade135a41bc03ea155e62e844d188df1ea18608 + + https://github.com/actions/upload-artifact/releases/tag/v3.1.3 + https://github.com/actions/upload-artifact/commit/a8a3f3ad30e3422c9c7b888a15615d19a852ae32 + + Signed-off-by: Gabriela Gutierrez - tests/test_compress.sh | 10 ---------- - tests/test_files.sh | 9 --------- - tests/test_scripts.sh | 6 ------ - 3 files changed, 25 deletions(-) + .github/workflows/ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 82fcb7cfc17ce62f79ebc7ca2374e1daca5e4d5e -Author: Lasse Collin -Date: 2022-10-19 17:14:57 +0300 +commit f74f1740067b75042497edbfa6ea457ff75484b9 +Author: Jia Tan +Date: 2023-10-12 20:12:18 +0800 - Tests: Fix a warning in test_memlimit.c when decoders are disabled. + Build: Update visibility.m4 from Gnulib. + + Updating from version 6 -> 8 from upstream. Declarations for variables + and function bodies were added to avoid unnecessary failures with + -Werror. - tests/test_memlimit.c | 3 +++ - 1 file changed, 3 insertions(+) + m4/visibility.m4 | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -commit b5f8271b45b9b0e59485ffba3640ca3418835ec4 +commit 5c4bca521e6fb435898a0012b3276eee70a6dadf Author: Lasse Collin -Date: 2022-10-19 17:11:46 +0300 +Date: 2023-10-06 19:36:35 +0300 - Tests: Add test_memlimit to .gitignore. - - Thanks to Jia Tan. + Update THANKS. - .gitignore | 1 + + THANKS | 1 + 1 file changed, 1 insertion(+) -commit 6a86e81cab202d0a812a7b2e9efacaf70c58ba38 -Author: Jia Tan -Date: 2022-10-06 21:53:09 +0300 +commit d91cb6e884c73d0b05d7e7d68ad4e6eb29f4b44b +Author: Lasse Collin +Date: 2023-10-06 18:55:57 +0300 - Tests: Refactor test_stream_flags.c. - - Converts test_stream_flags to tuktest. Also the test will now - compile and skip properly if encoders or decoders are disabled. + CMake/Windows: Fix when the windres workaround is applied. - Thanks to Sebastian Andrzej Siewior. - - tests/test_stream_flags.c | 533 ++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 416 insertions(+), 117 deletions(-) - -commit 827ac5b4821491fd3afe0d0e1ddac326253aeb66 -Author: Jia Tan -Date: 2022-10-06 17:00:38 +0800 - - Tests: Refactor test_block_header.c. + CMake doesn't set WIN32 on CYGWIN but the workaround is + probably needed on Cygwin too. Same for MSYS and MSYS2. - test_block_header now achieves higher test coverage. Also the - test will now compile and skip properly if encoders or decoders - are disabled. + The workaround must not be used with Clang that is acting in + MSVC mode. This fixes it by checking for the known environments + that need the workaround instead of using "NOT MSVC". - Thanks to Sebastian Andrzej Siewior. + Thanks to Martin Storsjö. + https://github.com/tukaani-project/xz/commit/0570308ddd9c0e39e85597ebc0e31d4fc81d436f#commitcomment-129098431 - tests/test_block_header.c | 486 +++++++++++++++++++++++++++++++++++----------- - 1 file changed, 370 insertions(+), 116 deletions(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 84963318952064a93bfc52edd6b0ef70593384ee +commit 01e34aa1171b04f8b28960b1cc6135a903e0c13d Author: Jia Tan -Date: 2022-10-05 23:54:12 +0800 +Date: 2023-09-29 22:11:54 +0800 - Tests: Fix compilation issues. + CI: Disable CLANG64 MSYS2 environment until bug is resolved. - test_bcj_exact_size, test_check, test_hardware, and test_index will - all now compile and skip properly if encoders or decoders are disabled. + lld 17.0.1 searches for libraries to link first in the toolchain + directories before the local directory when building. The is a problem + for us because liblzma.a is installed in MSYS2 CLANG64 by default and + xz.exe will thus use the installed library instead of the one being + built. - Also fixed a small typo (disabed -> disabled). + This causes tests to fail when they are expecting features to be + disabled. More importantly, it will compile xz.exe with an incorrect + liblzma and could cause unexpected behavior by being unable to update + liblzma code in static builds. The CLANG64 environment can be tested + again once this is fixed. - Thanks to Sebastian Andrzej Siewior. - - tests/test_bcj_exact_size.c | 20 ++++++++++++++------ - tests/test_check.c | 8 +++++++- - tests/test_hardware.c | 2 +- - tests/test_index.c | 6 ++++++ - tests/test_memlimit.c | 16 +++++++++++++++- - tests/test_vli.c | 13 +++++++++++++ - 6 files changed, 56 insertions(+), 9 deletions(-) - -commit 7dcabeec63d46b436fa5f043c3d1f09d0e15be16 -Author: Lasse Collin -Date: 2022-10-05 16:20:47 +0300 + Link to bug: https://github.com/llvm/llvm-project/issues/67779. - Tests: Include mythread.h in the tests that use MYTHREAD_ENABLED. - - tests/test_check.c | 1 + - tests/test_hardware.c | 1 + - tests/test_memlimit.c | 1 + - 3 files changed, 3 insertions(+) + .github/workflows/windows-ci.yml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) -commit 14af758a770c7781af18fb66d6d21ee5b1c27f04 +commit 30d0c35327f3639cb11224872aa58fdbf0b1526e Author: Jia Tan -Date: 2022-10-05 20:57:16 +0800 +Date: 2023-09-29 20:14:39 +0800 - liblzma: Fix a compilation issue when encoders are disabled. + CMake: Rename xz and man page symlink custom targets. - When encoders were disabled and threading enabled, outqueue.c and - outqueue.h were not compiled. The multi threaded decoder required - these files, so compilation failed. + The Ninja Generator for CMake cannot have a custom target and its + BYPRODUCTS have the same name. This has prevented Ninja builds on + Unix-like systems since the xz symlinks were introduced in + 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. - src/liblzma/common/Makefile.inc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 6ca5c354bd4620aa7f81da68870eef1b1f26288f +commit 506d03127a8565442b028ec991e1578124fd3025 Author: Jia Tan -Date: 2022-10-05 16:41:38 +0800 +Date: 2023-09-29 19:58:44 +0800 - Tests: Fix compilation error when threading support has been disabled. - - Now tests that require threading are skipped when threading - support has been disabled. + CMake: Specify LINKER_LANGUAGE for libgnu target to fix Ninja Generator. - Thanks to Sebastian Andrzej Siewior. + CMake is unable to guess the linker language for just a header file so + it must be explicitly set. - tests/test_check.c | 4 ++++ - tests/test_hardware.c | 4 ++++ - tests/test_memlimit.c | 4 ++++ - 3 files changed, 12 insertions(+) + CMakeLists.txt | 6 ++++++ + 1 file changed, 6 insertions(+) -commit fae37ad2affd8fe8871f4ff93d5cab5ec14d5e58 +commit 0570308ddd9c0e39e85597ebc0e31d4fc81d436f Author: Lasse Collin -Date: 2022-10-05 14:26:00 +0300 +Date: 2023-09-27 19:54:35 +0300 - tuklib_integer: Add 64-bit endianness-converting reads and writes. + CMake: Fix Windows build with Clang/LLVM 17. + + llvm-windres 17.0.0 has more accurate emulation of GNU windres, so + the hack for GNU windres must now be used with llvm-windres too. - Also update the comment in liblzma's memcmplen.h. + LLVM 16.0.6 has the old behavior and there likely won't be more + 16.x releases. So we can simply check for >= 17.0.0. - Thanks to Michał Górny for the original patch for the reads. + See also: + https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47 - m4/tuklib_integer.m4 | 8 ++++---- - src/common/tuklib_integer.h | 46 ++++++++++++++++++++++++++++++++++++++++-- - src/liblzma/common/memcmplen.h | 9 +++------ - 3 files changed, 51 insertions(+), 12 deletions(-) + CMakeLists.txt | 26 ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) -commit 508a44372c5b0dede8863fd0d358d4a9d8645c95 +commit 5a9af95f85a7e5d4f9c10cb8cf737651a921f1d1 Author: Lasse Collin -Date: 2022-09-30 12:06:13 +0300 +Date: 2023-09-26 21:47:13 +0300 - liblzma: Add API doc note about the .xz decoder LZMA_MEMLIMIT_ERROR bug. + liblzma: Update a comment. - The bug was fixed in 660739f99ab211edec4071de98889fb32ed04e98. + The C standards don't allow an empty translation unit which can be + avoided by declaring something, without exporting any symbols. + + When I committed f644473a211394447824ea00518d0a214ff3f7f2 I had + a feeling that some specific toolchain somewhere didn't like + empty object files (assembler or maybe "ar" complained) but + I cannot find anything to confirm this now. Quite likely I + remembered nonsense. I leave this here as a note to my future self. :-) - src/liblzma/api/lzma/base.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/liblzma/check/crc64_table.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit 8cc9874a7974cd575aee44f218836f7acdbeb0ed +commit 8ebaf3f665ddc7e4f19c613005050dde5ccbe499 Author: Jia Tan -Date: 2022-09-21 16:15:50 +0800 +Date: 2023-09-27 00:02:11 +0800 - liblzma: Add dest and src NULL checks to lzma_index_cat. + liblzma: Avoid compiler warning without creating extra symbol. - The documentation states LZMA_PROG_ERROR can be returned from - lzma_index_cat. Previously, lzma_index_cat could not return - LZMA_PROG_ERROR. Now, the validation is similar to - lzma_index_append, which does a NULL check on the index - parameter. + When the generic fast crc64 method is used, then we omit + lzma_crc64_table[][]. Similar to + d9166b52cf3458a4da3eb92224837ca8fc208d79, we can avoid compiler warnings + with -Wempty-translation-unit (Clang) or -pedantic (GCC) by creating a + never used typedef instead of an extra symbol. - src/liblzma/common/index.c | 3 +++ - 1 file changed, 3 insertions(+) + src/liblzma/check/crc64_table.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit afd5a8bf5374eba82804a999e1ea7af680784086 -Author: Jia Tan -Date: 2022-09-21 20:29:28 +0800 +commit 092d21db2e5eea19fe079264ce48c178989c7606 +Author: Lasse Collin +Date: 2023-09-26 17:24:15 +0300 - Tests: Create a test for the lzma_index_cat bug. + Build: Update the comment about -Werror usage in checks. - tests/test_index.c | 43 ++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 42 insertions(+), 1 deletion(-) + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) -commit 3d5a99ca373a4e86faf671226ca6487febb9eeac -Author: Jia Tan -Date: 2022-09-21 19:28:53 +0800 +commit a37a2763383e6c204fe878e1416dd35e7711d3a9 +Author: Lasse Collin +Date: 2023-09-26 15:00:43 +0300 - liblzma: Fix copying of check type statistics in lzma_index_cat(). + Build: Fix __attribute__((ifunc(...))) detection with clang -Wall. - The check type of the last Stream in dest was never copied to - dest->checks (the code tried to copy it but it was done too late). - This meant that the value returned by lzma_index_checks() would - only include the check type of the last Stream when multiple - lzma_indexes had been concatenated. + Now if user-supplied CFLAGS contains -Wall -Wextra -Wpedantic + the two checks that need -Werror will still work. - In xz --list this meant that the summary would only list the - check type of the last Stream, so in this sense this was only - a visual bug. However, it's possible that some applications - use this information for purposes other than merely showing - it to the users in an informational message. I'm not aware of - such applications though and it's quite possible that such - applications don't exist. + At CMake side there is add_compile_options(-Wall -Wextra) + but it didn't affect the -Werror tests. So with both Autotools + and CMake only user-supplied CFLAGS could make the checks fail + when they shouldn't. - Regular streamed decompression in xz or any other application - doesn't use lzma_index_cat() and so this bug cannot affect them. + This is not a full fix as things like -Wunused-macros in + user-supplied CFLAGS will still cause problems with both + GCC and Clang. - src/liblzma/common/index.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + CMakeLists.txt | 8 ++++++++ + configure.ac | 8 ++++++++ + 2 files changed, 16 insertions(+) -commit a61d32172789735350a941e23baf6b587c49e5d9 +commit 9c42f936939b813f25d0ff4e99c3eb9c2d17a0d2 Author: Lasse Collin -Date: 2022-09-28 12:20:41 +0300 +Date: 2023-09-26 13:51:31 +0300 - tuklib_physmem: Fix Unicode builds on Windows. + Build: Fix underquoted AC_LANG_SOURCE. - Thanks to ArSaCiA Game. + It made no practical difference in this case. - src/common/tuklib_physmem.c | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5a4d3548ab214fdca364d5c734baf1d1fab47308 -Author: Lasse Collin -Date: 2022-09-28 11:12:07 +0300 - - Tests: Add test_memlimit.c to test restarting after LZMA_MEMLIMIT_ERROR. - - tests/Makefile.am | 2 + - tests/test_memlimit.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 153 insertions(+) - -commit 660739f99ab211edec4071de98889fb32ed04e98 +commit 9f1444a8a5c0e724b2c7ef83424f642f07a95982 Author: Lasse Collin -Date: 2022-09-28 11:05:15 +0300 +Date: 2023-09-26 13:14:37 +0300 - liblzma: Stream decoder: Fix restarting after LZMA_MEMLIMIT_ERROR. + Build: Silence two Autoconf warnings. - If lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible - to use lzma_memlimit_set() to increase the limit and continue - decoding. This was supposed to work from the beginning but - there was a bug. With other decoders (.lzma or threaded .xz) - this already worked correctly. - - src/liblzma/common/stream_decoder.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -commit 7e68fda58c74ad9e5b876cc22fcbe80fc0e4747b -Author: Lasse Collin -Date: 2022-09-28 11:00:23 +0300 - - liblzma: Stream decoder: Fix comments. + There were two uses of AC_COMPILE_IFELSE that didn't use + AC_LANG_SOURCE and Autoconf warned about these. The omission + had been intentional but it turned out that this didn't do + what I thought it would. + + Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE + inserts all #defines that have been made with AC_DEFINE so + far (confdefs.h). The idea was that omitting AC_LANG_SOURCE + would mean that only the exact code included in the + AC_COMPILE_IFELSE call would be compiled. + + With C programs this is not true: the #defines get added without + AC_LANG_SOURCE too. There seems to be no neat way to avoid this. + Thus, with the C language at least, adding AC_LANG_SOURCE makes + no other difference than silencing a warning from Autoconf. The + generated "configure" remains identical. (Docs of AC_LANG_CONFTEST + say that the #defines have been inserted since Autoconf 2.63b and + that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is + documented if one also reads the docs of macros that one isn't + calling directly.) + + Any extra code, including #defines, can cause problems for + these two tests because these tests must use -Werror. + CC=clang CFLAGS=-Weverything is the most extreme example. + It enables -Wreserved-macro-identifier which warns about + #define __EXTENSIONS__ 1 because it begins with two underscores. + It's possible to write a test file that passes -Weverything but + it becomes impossible when Autoconf inserts confdefs.h. + + So this commit adds AC_LANG_SOURCE to silence Autoconf warnings. + A different solution is needed for -Werror tests. - src/liblzma/common/stream_decoder.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) + configure.ac | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) -commit f664cb25841fc1c478b819034a224a558e2ac6e7 -Author: Lasse Collin -Date: 2022-09-20 16:58:22 +0300 +commit 519e47c2818acde571fadc79551294527fe6cc22 +Author: Jia Tan +Date: 2023-09-26 01:17:11 +0800 - liblzma: ARM64: Add comments. + CMake: Remove accidental extra newline. - src/liblzma/simple/arm64.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) -commit b557b4a0eea05470fae8ba5ef4ad5a6dfb36ac41 -Author: Lasse Collin -Date: 2022-09-20 16:27:50 +0300 +commit bbb42412da6a02705ba3e668e90840c2683e4e67 +Author: Jia Tan +Date: 2023-09-26 00:47:26 +0800 - liblzma: ARM64: Fix wrong comment in API doc. + Build: Remove Gnulib dependency from tests. - Thanks to Jia Tan. + The tests do not use any Gnulib replacements so they do not need to link + libgnu.a or have /lib in the include path. - src/liblzma/api/lzma/bcj.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + tests/Makefile.am | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) -commit d5b0906fa55157f48c200188a3951d80df9cb308 -Author: Lasse Collin -Date: 2022-09-19 20:24:26 +0300 +commit d265f6b75691c6c8fa876eb5320c3ff5aed17dfa +Author: Jia Tan +Date: 2023-09-26 00:43:43 +0800 - xz: Add --experimental-arm64[=width=WIDTH]. - - It will be renamed to --arm64 once it is stable. + CMake: Remove /lib from tests include path. - Man page or --long-help weren't updated yet. + The tests never included anything from /lib, so this was not needed. - src/xz/args.c | 7 +++++++ - src/xz/message.c | 7 +++++++ - src/xz/options.c | 39 +++++++++++++++++++++++++++++++++++++++ - src/xz/options.h | 7 +++++++ - 4 files changed, 60 insertions(+) + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) -commit ecb966de308c255bb4735a7307ef9901c643a9de -Author: Lasse Collin -Date: 2022-09-19 19:34:56 +0300 +commit 9fb5de41f2fb654ca952d4bda15cf3777c2b720f +Author: Jia Tan +Date: 2023-09-24 22:10:41 +0800 - liblzma: Add experimental ARM64 BCJ filter with a temporary Filter ID. - - That is, the Filter ID will be changed once the design is final. - The current version will be removed. So files created with the - tempoary Filter ID won't be supported in the future. + Scripts: Change quoting style from `...' to '...'. - CMakeLists.txt | 3 + - configure.ac | 4 +- - src/liblzma/api/lzma/bcj.h | 35 +++++- - src/liblzma/common/filter_common.c | 9 ++ - src/liblzma/common/filter_decoder.c | 8 ++ - src/liblzma/common/filter_encoder.c | 11 ++ - src/liblzma/simple/Makefile.inc | 4 + - src/liblzma/simple/arm64.c | 227 ++++++++++++++++++++++++++++++++++++ - src/liblzma/simple/simple_coder.h | 9 ++ - src/liblzma/simple/simple_decoder.h | 4 + - src/liblzma/simple/simple_encoder.h | 2 + - 11 files changed, 313 insertions(+), 3 deletions(-) + src/scripts/xzdiff.in | 2 +- + src/scripts/xzgrep.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit 177bdc922cb17bd0fd831ab8139dfae912a5c2b8 -Author: Lasse Collin -Date: 2022-09-17 22:42:18 +0300 +commit eaebdef4d4de3c088b0905f42626b74e0d23abf3 +Author: Jia Tan +Date: 2023-09-24 22:10:18 +0800 - liblzma: Simple/BCJ filters: Allow disabling generic BCJ options. - - This will be needed for the ARM64 BCJ filter as it will use - its own options struct. + xz: Change quoting style from `...' to '...'. - src/liblzma/simple/arm.c | 2 +- - src/liblzma/simple/armthumb.c | 2 +- - src/liblzma/simple/ia64.c | 2 +- - src/liblzma/simple/powerpc.c | 2 +- - src/liblzma/simple/simple_coder.c | 4 ++-- - src/liblzma/simple/simple_private.h | 2 +- - src/liblzma/simple/sparc.c | 2 +- - src/liblzma/simple/x86.c | 3 ++- - 8 files changed, 10 insertions(+), 9 deletions(-) + src/xz/args.c | 6 +++--- + src/xz/file_io.c | 2 +- + src/xz/main.c | 4 ++-- + src/xz/message.c | 14 +++++++------- + src/xz/options.c | 2 +- + src/xz/suffix.c | 2 +- + src/xz/util.c | 6 +++--- + 7 files changed, 18 insertions(+), 18 deletions(-) -commit c3592d0a55114144686ecf960cb516d6b31c98e9 -Author: Lasse Collin -Date: 2022-09-16 17:08:53 +0300 +commit f6667702bf075a05fbe336dbf3576ad1a82ec645 +Author: Jia Tan +Date: 2023-09-24 22:09:47 +0800 - Tests: Add a test file for lzma_index_append() integer overflow bug. - - This test fails before commit 18d7facd3802b55c287581405c4d49c98708c136. + liblzma: Change quoting style from `...' to '...'. - test_files.sh now runs xz -l for bad-3-index-uncomp-overflow.xz - because only then the previously-buggy code path gets tested. - Normal decompression doesn't use lzma_index_append() at all. - Instead, lzma_index_hash functions are used and those already - did the overflow check. + This was done for both internal and API headers. - tests/files/README | 10 ++++++++++ - tests/files/bad-3-index-uncomp-overflow.xz | Bin 0 -> 132 bytes - tests/test_files.sh | 8 ++++++++ - 3 files changed, 18 insertions(+) + src/liblzma/api/lzma/base.h | 18 +++++++++--------- + src/liblzma/api/lzma/container.h | 10 +++++----- + src/liblzma/api/lzma/filter.h | 6 +++--- + src/liblzma/api/lzma/index.h | 8 ++++---- + src/liblzma/api/lzma/lzma12.h | 2 +- + src/liblzma/lz/lz_encoder.h | 2 +- + src/liblzma/rangecoder/range_decoder.h | 2 +- + 7 files changed, 24 insertions(+), 24 deletions(-) -commit 982b29f828079a2a26253a40e975127a40a7d2bd -Author: Lasse Collin -Date: 2022-09-16 15:10:07 +0300 +commit be012b8097a4eaee335b51357d6befa745f753ce +Author: Jia Tan +Date: 2023-09-24 22:09:16 +0800 - Translations: Add Turkish translation. + Build: Change quoting style from `...' to '...'. - po/LINGUAS | 1 + - po/tr.po | 977 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 978 insertions(+) + configure.ac | 18 +++++++++--------- + dos/config.h | 6 +++--- + m4/getopt.m4 | 2 +- + m4/tuklib_progname.m4 | 2 +- + windows/build.bash | 2 +- + 5 files changed, 15 insertions(+), 15 deletions(-) -commit 1fc088d9f6d1697924aaeac8cd1fb9918d1532e2 -Author: Lasse Collin -Date: 2022-09-16 14:09:07 +0300 +commit ce162db07f03495bd333696e66883c8f36abdc1e +Author: Jia Tan +Date: 2023-09-24 22:05:02 +0800 - Update THANKS. + Docs: Change quoting style from `...' to '...'. + + These days the ` and ' do not look symmetric. This quoting style has + been changed in various apps over the years including the GNU tools. - THANKS | 1 + - 1 file changed, 1 insertion(+) + INSTALL | 6 +++--- + doc/examples/01_compress_easy.c | 2 +- + doc/examples/11_file_info.c | 16 ++++++++-------- + 3 files changed, 12 insertions(+), 12 deletions(-) -commit 097c7b67ce86ff16a7cef7631b39e5ca4ee3d420 -Author: Lasse Collin -Date: 2022-09-16 14:07:03 +0300 +commit db17656721e43939bfa4ec13506e7c76f4b86da6 +Author: Jia Tan +Date: 2023-09-24 21:25:01 +0800 - xzgrep: Fix compatibility with old shells. - - Running the current xzgrep on Slackware 10.1 with GNU bash 3.00.15: - - xzgrep: line 231: syntax error near unexpected token `;;' - - On SCO OpenServer 5.0.7 with Korn Shell 93r: - - syntax error at line 231 : `;;' unexpected - - Turns out that some old shells don't like apostrophes (') inside - command substitutions. For example, the following fails: - - x=$(echo foo - # asdf'zxcv - echo bar) - printf '%s\n' "$x" - - The problem was introduced by commits - 69d1b3fc29677af8ade8dc15dba83f0589cb63d6 (2022-03-29), - bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5 (2022-07-18), and - a648978b20495b7aa4a8b029c5a810b5ad9d08ff (2022-07-19). - 5.2.6 is the only stable release that included - this problem. - - Thanks to Kevin R. Bulgrien for reporting the problem - on SCO OpenServer 5.0.7 and for providing the fix. + lib: Silence -Wsign-conversion in getopt.c. - src/scripts/xzgrep.in | 6 +++--- + lib/getopt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -commit f2d084fe3f0d6d71488bfc6987f26542f67bfd99 -Author: Lasse Collin -Date: 2022-09-09 14:12:30 +0300 +commit a6234f677d66888f435010bc0b67de6a32fefcf6 +Author: Jia Tan +Date: 2023-09-24 20:48:52 +0800 - Tests: Silence warnings about unused functions from tuktest.h. - - Warnings about unused tuktest_run_test conveniently tell which - test programs haven't been converted to tuktest.h yet but I - silenced that warning too for now anyway. + Build: Update getopt.m4 from Gnulib. - It is fine to use __attribute__((__unused__)) even when the - function is actually used because the attribute only means - that the function might be unused. + This file was modified from upstream since we do not need to replace + getopt() and can avoid complexity and feature tests. - tests/tuktest.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) + m4/getopt.m4 | 79 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 39 insertions(+), 40 deletions(-) -commit f8ee61e74eb40600445fdb601c374d582e1e9c8a -Author: Lasse Collin -Date: 2022-09-09 13:51:57 +0300 +commit 84808b68f1075e8603a8ef95d361a61fdc6a5b10 +Author: Jia Tan +Date: 2023-09-26 00:09:53 +0800 - liblzma: lzma_filters_copy: Keep dest[] unmodified if an error occurs. - - lzma_stream_encoder() and lzma_stream_encoder_mt() always assumed - this. Before this patch, failing lzma_filters_copy() could result - in free(invalid_pointer) or invalid memory reads in stream_encoder.c - or stream_encoder_mt.c. - - To trigger this, allocating memory for a filter options structure - has to fail. These are tiny allocations so in practice they very - rarely fail. - - Certain badness in the filter chain array could also make - lzma_filters_copy() fail but both stream_encoder.c and - stream_encoder_mt.c validate the filter chain before - trying to copy it, so the crash cannot occur this way. + CMake: Add /lib to include path. - src/liblzma/api/lzma/filter.h | 4 +++- - src/liblzma/common/filter_common.c | 18 ++++++++++++------ - 2 files changed, 15 insertions(+), 7 deletions(-) + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) -commit 18d7facd3802b55c287581405c4d49c98708c136 +commit 01804a0b4b64e0f33568e947e0579263808c59d3 Author: Jia Tan -Date: 2022-09-02 20:18:55 +0800 +Date: 2023-09-24 20:36:34 +0800 - liblzma: lzma_index_append: Add missing integer overflow check. - - The documentation in src/liblzma/api/lzma/index.h suggests that - both the unpadded (compressed) size and the uncompressed size - are checked for overflow, but only the unpadded size was checked. - The uncompressed check is done first since that is more likely to - occur than the unpadded or index field size overflows. + CMake: Update libgnu target with new header files. - src/liblzma/common/index.c | 4 ++++ - 1 file changed, 4 insertions(+) + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) -commit 9ac06cb5b85274d18f9f70d82cf2d8c9c1151bd4 -Author: Lasse Collin -Date: 2022-09-08 15:11:08 +0300 +commit d34558388fe1d8929f6478d61dc322eb4f2900af +Author: Jia Tan +Date: 2023-09-23 00:47:52 +0800 - Update THANKS. + lib: Update Makefile.am for new header files. - THANKS | 1 + - 1 file changed, 1 insertion(+) + lib/Makefile.am | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) -commit ba3e4ba2de034ae93a513f9c3a0823b80cdb66dc +commit 52bf644bdf536e20fcc743b712cede135e05eec5 Author: Jia Tan -Date: 2022-09-08 15:07:00 +0300 - - CMake: Clarify a comment about Windows symlinks without file extension. - - CMakeLists.txt | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 17485e884ce5c74315f29a8a1507bc706cd5cd1d -Author: Lasse Collin -Date: 2022-09-08 15:02:41 +0300 - - CMake: Update for liblzma_*.map files and fix wrong common_w32res.rc dep. - - The previous commit split liblzma.map into liblzma_linux.map and - liblzma_generic.map. This commit updates the CMake build for those. - - common_w32res.rc dependency was listed under Linux/FreeBSD while - obviously it belongs to Windows when building a DLL. - - CMakeLists.txt | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -commit 913ddc5572b9455fa0cf299be2e35c708840e922 -Author: Lasse Collin -Date: 2022-09-04 23:23:00 +0300 - - liblzma: Vaccinate against an ill patch from RHEL/CentOS 7. - - RHEL/CentOS 7 shipped with 5.1.2alpha, including the threaded - encoder that is behind #ifdef LZMA_UNSTABLE in the API headers. - In 5.1.2alpha these symbols are under XZ_5.1.2alpha in liblzma.map. - API/ABI compatibility tracking isn't done between development - releases so newer releases didn't have XZ_5.1.2alpha anymore. - - Later RHEL/CentOS 7 updated xz to 5.2.2 but they wanted to keep - the exported symbols compatible with 5.1.2alpha. After checking - the ABI changes it turned out that >= 5.2.0 ABI is backward - compatible with the threaded encoder functions from 5.1.2alpha - (but not vice versa as fixes and extensions to these functions - were made between 5.1.2alpha and 5.2.0). - - In RHEL/CentOS 7, XZ Utils 5.2.2 was patched with - xz-5.2.2-compat-libs.patch to modify liblzma.map: - - - XZ_5.1.2alpha was added with lzma_stream_encoder_mt and - lzma_stream_encoder_mt_memusage. This matched XZ Utils 5.1.2alpha. - - - XZ_5.2 was replaced with XZ_5.2.2. It is clear that this was - an error; the intention was to keep using XZ_5.2 (XZ_5.2.2 - has never been used in XZ Utils). So XZ_5.2.2 lists all - symbols that were listed under XZ_5.2 before the patch. - lzma_stream_encoder_mt and _mt_memusage are included too so - they are listed both here and under XZ_5.1.2alpha. - - The patch didn't add any __asm__(".symver ...") lines to the .c - files. Thus the resulting liblzma.so exports the threaded encoder - functions under XZ_5.1.2alpha only. Listing the two functions - also under XZ_5.2.2 in liblzma.map has no effect without - matching .symver lines. - - The lack of XZ_5.2 in RHEL/CentOS 7 means that binaries linked - against unpatched XZ Utils 5.2.x won't run on RHEL/CentOS 7. - This is unfortunate but this alone isn't too bad as the problem - is contained within RHEL/CentOS 7 and doesn't affect users - of other distributions. It could also be fixed internally in - RHEL/CentOS 7. - - The second problem is more serious: In XZ Utils 5.2.2 the API - headers don't have #ifdef LZMA_UNSTABLE for obvious reasons. - This is true in RHEL/CentOS 7 version too. Thus now programs - using new APIs can be compiled without an extra #define. However, - the programs end up depending on symbol version XZ_5.1.2alpha - (and possibly also XZ_5.2.2) instead of XZ_5.2 as they would - with an unpatched XZ Utils 5.2.2. This means that such binaries - won't run on other distributions shipping XZ Utils >= 5.2.0 as - they don't provide XZ_5.1.2alpha or XZ_5.2.2; they only provide - XZ_5.2 (and XZ_5.0). (This includes RHEL/CentOS 8 as the patch - luckily isn't included there anymore with XZ Utils 5.2.4.) - - Binaries built by RHEL/CentOS 7 users get distributed and then - people wonder why they don't run on some other distribution. - Seems that people have found out about the patch and been copying - it to some build scripts, seemingly curing the symptoms but - actually spreading the illness further and outside RHEL/CentOS 7. - - The ill patch seems to be from late 2016 (RHEL 7.3) and in 2017 it - had spread at least to EasyBuild. I heard about the events only - recently. :-( - - This commit splits liblzma.map into two versions: one for - GNU/Linux and another for other OSes that can use symbol versioning - (FreeBSD, Solaris, maybe others). The Linux-specific file and the - matching additions to .c files add full compatibility with binaries - that have been built against a RHEL/CentOS-patched liblzma. Builds - for OSes other than GNU/Linux won't get the vaccine as they should - be immune to the problem (I really hope that no build script uses - the RHEL/CentOS 7 patch outside GNU/Linux). - - The RHEL/CentOS compatibility symbols XZ_5.1.2alpha and XZ_5.2.2 - are intentionally put *after* XZ_5.2 in liblzma_linux.map. This way - if one forgets to #define HAVE_SYMBOL_VERSIONS_LINUX when building, - the resulting liblzma.so.5 will have lzma_stream_encoder_mt@@XZ_5.2 - since XZ_5.2 {...} is the first one that lists that function. - Without HAVE_SYMBOL_VERSIONS_LINUX @XZ_5.1.2alpha and @XZ_5.2.2 - will be missing but that's still a minor problem compared to - only having lzma_stream_encoder_mt@@XZ_5.1.2alpha! - - The "local: *;" line was moved to XZ_5.0 so that it doesn't need - to be moved around. It doesn't matter where it is put. - - Having two similar liblzma_*.map files is a bit silly as it is, - at least for now, easily possible to generate the generic one - from the Linux-specific file. But that adds extra steps and - increases the risk of mistakes when supporting more than one - build system. So I rather maintain two files in parallel and let - validate_map.sh check that they are in sync when "make mydist" - is run. - - This adds .symver lines for lzma_stream_encoder_mt@XZ_5.2.2 and - lzma_stream_encoder_mt_memusage@XZ_5.2.2 even though these - weren't exported by RHEL/CentOS 7 (only @@XZ_5.1.2alpha was - for these two). I added these anyway because someone might - misunderstand the RHEL/CentOS 7 patch and think that @XZ_5.2.2 - (@@XZ_5.2.2) versions were exported too. - - At glance one could suggest using __typeof__ to copy the function - prototypes when making aliases. However, this doesn't work trivially - because __typeof__ won't copy attributes (lzma_nothrow, lzma_pure) - and it won't change symbol visibility from hidden to default (done - by LZMA_API()). Attributes could be copied with __copy__ attribute - but that needs GCC 9 and a fallback method would be needed anyway. - - This uses __symver__ attribute with GCC >= 10 and - __asm__(".symver ...") with everything else. The attribute method - is required for LTO (-flto) support with GCC. Using -flto with - GCC older than 10 is now broken on GNU/Linux and will not be fixed - (can silently result in a broken liblzma build that has dangerously - incorrect symbol versions). LTO builds with Clang seem to work - with the traditional __asm__(".symver ...") method. - - Thanks to Boud Roukema for reporting the problem and discussing - the details and testing the fix. - - configure.ac | 23 +++- - src/liblzma/Makefile.am | 10 +- - src/liblzma/common/block_buffer_encoder.c | 18 ++++ - src/liblzma/common/common.c | 14 +++ - src/liblzma/common/common.h | 28 +++++ - src/liblzma/common/hardware_cputhreads.c | 12 +++ - src/liblzma/common/stream_encoder_mt.c | 42 ++++++++ - src/liblzma/{liblzma.map => liblzma_generic.map} | 6 +- - src/liblzma/liblzma_linux.map | 131 +++++++++++++++++++++++ - src/liblzma/validate_map.sh | 113 +++++++++++++++++-- - 10 files changed, 382 insertions(+), 15 deletions(-) - -commit 80a1a8bb838842a2be343bd88ad1462c21c5e2c9 -Author: Lasse Collin -Date: 2022-08-31 16:42:04 +0300 - - CMake: Add xz symlinks. - - These are a minor thing especially since the xz build has - some real problems still like lack of large file support - on 32-bit systems but I'll commit this since the code exists. - - Thanks to Jia Tan. - - CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++++++- - 1 file changed, 37 insertions(+), 1 deletion(-) - -commit a4193bb6d85d7765b1b87faeab3e50106d3ab2e9 -Author: Lasse Collin -Date: 2022-08-31 16:29:38 +0300 - - CMake: Put xz man page install under if(UNIX) like is for xzdec. - - Thanks to Jia Tan. - - CMakeLists.txt | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) +Date: 2023-09-24 20:34:03 +0800 -commit c1555b1a221a1427d4d650647531016d754bc4da -Author: Lasse Collin -Date: 2022-08-22 18:16:40 +0300 + lib: Update getopt1.c from Gnulib. + + The only difference was maintaining the conditional inclusion for + config.h. - Bump version number for 5.3.3alpha. + lib/getopt1.c | 56 ++++++++++++++++++++++---------------------------------- + 1 file changed, 22 insertions(+), 34 deletions(-) - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) +commit 7e884c00d0093c38339f17fb1d280eec493f42ca +Author: Jia Tan +Date: 2023-09-23 03:27:00 +0800 -commit 44fedddc11c3f6ec2f7fe35a3e38f15ca93f90eb -Author: Lasse Collin -Date: 2022-08-22 18:13:56 +0300 + lib: Update getopt.in.h from Gnulib with modifications. + + We can still avoid modifying the contents of this file during + configuration to simplify the build systems. Gnulib added replacements + for inclusions guards for Cygwin. Cygwin should not need getopt_long + replacement so this feature can be omitted. + + is conditionally included to avoid MSVC since it is not + available. + + The definition for _GL_ARG_NONNULL was also copied into this file from + Gnulib since this stage is usually done during gnulib-tool. - Add NEWS for 5.3.3alpha. + lib/getopt.in.h | 228 +++++++------------------------------------------------- + 1 file changed, 29 insertions(+), 199 deletions(-) - NEWS | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 119 insertions(+) +commit cff05f82066ca3ce9425dafdb086325a8eef8de3 +Author: Jia Tan +Date: 2023-09-23 00:31:55 +0800 -commit a93e235d7ca764cc19f8f9f9063b40ff361c3cfa -Author: Lasse Collin -Date: 2022-07-12 17:59:41 +0300 + lib: Update getopt_int.h from Gnulib. + + lib/getopt_int.h | 109 ++++++++++++++++++++++++------------------------------- + 1 file changed, 48 insertions(+), 61 deletions(-) + +commit 04bd86a4b010d43c6a016a3857ecb38dc1d5b024 +Author: Jia Tan +Date: 2023-09-23 00:27:23 +0800 - Translations: Add Portuguese translation. + lib: Update getopt.c from Gnulib with modifications. - Jia Tan made white-space changes and also changed "Language: pt_BR\n" - to pt. The translator wasn't reached so I'm hoping these changes - are OK and will commit it without translator's approval. + The code maintains the prior modifications of conditionally including + config.h and disabling NLS support. - Thanks to Pedro Albuquerque and Jia Tan. + _GL_UNUSED is repalced with the simple cast to void trick. _GL_UNUSED + is only used for these two parameters so its simpler than having to + define it. - po/LINGUAS | 1 + - po/pt.po | 1001 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1002 insertions(+) + lib/getopt.c | 1134 +++++++++++++++++++--------------------------------------- + 1 file changed, 377 insertions(+), 757 deletions(-) -commit e7cf5a946f25e40d77f45e41f0dee7d42a04e9ae -Author: Lasse Collin -Date: 2022-07-10 21:16:40 +0300 +commit 56b42be7287844db20b3a3bc1372c6ae8c040d63 +Author: Jia Tan +Date: 2023-09-23 00:18:56 +0800 - Translations: Add Serbian translation. + lib: Add getopt-cdefs.h for getopt_long update. - Quite a few white-space changes were made by Jia Tan to make - this look good. Contacting the translator didn't succeed so - I'm committing this without getting translator's approval. - - Thanks to Мирослав Николић (Miroslav Nikolic) and Jia Tan. + This was modified slightly from Gnulib. In Gnulib, it expects the + @HAVE_SYS_CDEFS_H@ to be replaced. Instead, we can set HAVE_SYS_CDEFS_H + on systems that have it and avoid copying another file into the build + directory. Since we are not using gnulib-tool, copying extra files + requires extra build system updates (and special handling with CMake) so + we should avoid when possible. - po/LINGUAS | 1 + - po/sr.po | 987 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 988 insertions(+) + lib/getopt-cdefs.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 70 insertions(+) -commit cc8617ab53b1f2a4da212fa76c92fe538269c5de -Author: Lasse Collin -Date: 2022-07-04 23:51:36 +0300 +commit 9834e591a4cf9dc2f49e42e26bf28d1d247bc196 +Author: Jia Tan +Date: 2023-09-23 00:15:25 +0800 - Translations: Add Swedish translation. + lib: Copy new header files from Gnulib without modification. - Thanks to Sebastian Rasmussen and Jia Tan. + The getopt related files have changed from Gnulib by splitting up + getopt.in.h into more modular header files. We could have kept + everything in just getopt.in.h, but this will help us continue to update + in the future. - po/LINGUAS | 1 + - po/sv.po | 983 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 984 insertions(+) + lib/getopt-core.h | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ + lib/getopt-ext.h | 77 +++++++++++++++++++++++++++++++++++++++++ + lib/getopt-pfx-core.h | 66 +++++++++++++++++++++++++++++++++++ + lib/getopt-pfx-ext.h | 70 +++++++++++++++++++++++++++++++++++++ + 4 files changed, 309 insertions(+) -commit c613598c358b640682d0ca2aed38fa7df763e8c7 +commit 5b7a6f06e93d99d6635a740fd2e12fab66096c93 Author: Lasse Collin -Date: 2022-07-04 23:40:27 +0300 +Date: 2023-09-22 21:16:52 +0300 - Translations: Add Esperanto translation. - - Thanks to Keith Bowes and Jia Tan. + Windows: Update the version requirement comments from Win95 to W2k. - po/LINGUAS | 1 + - po/eo.po | 984 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 985 insertions(+) + windows/README-Windows.txt | 10 ++++------ + windows/build.bash | 6 +++--- + 2 files changed, 7 insertions(+), 9 deletions(-) -commit 659a587d678f21e98e91d2751c31d4ce050c081a +commit e582f8e0fee46e7cd967f42f465d6bb608b73bc1 Author: Lasse Collin -Date: 2022-07-01 00:22:33 +0300 +Date: 2023-09-22 21:12:54 +0300 - Translations: Add Catalan translation. - - Thanks to Jordi Mas and Jia Tan. + tuklib_physmem: Comment out support for Windows versions older than 2000. - po/LINGUAS | 1 + - po/ca.po | 1076 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1077 insertions(+) + src/common/tuklib_physmem.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) -commit 739fd8c9bdf1d85f57d56642aad87148d4779530 +commit 7d73d1f0e08f96c4ab7aac91b958e37a3dadf07a Author: Lasse Collin -Date: 2022-06-30 17:47:08 +0300 +Date: 2023-09-24 16:32:32 +0300 - Translations: Add Ukrainian translation. - - Thanks to Yuri Chornoivan and Jia Tan. + sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO. - po/LINGUAS | 1 + - po/uk.po | 996 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 997 insertions(+) + src/common/sysdefs.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) -commit 73280550b111930c62a667e56add8fd574f80bc8 +commit 2a9929af0ab7e6c0ab725565034afe3293e51d71 Author: Lasse Collin -Date: 2022-06-30 17:45:26 +0300 +Date: 2023-09-22 02:33:29 +0300 - Translators: Add Romanian translation. + xz: Windows: Don't (de)compress to special files like "con" or "nul". + + Before this commit, the following writes "foo" to the + console and deletes the input file: + + echo foo | xz > con_xz + xz --suffix=_xz --decompress con_xz + + It cannot happen without --suffix because names like con.xz + are also special and so attempting to decompress con.xz + (or compress con to con.xz) will already fail when opening + the input file. + + Similar thing is possible when compressing. The following + writes to "nul" and the input file "n" is deleted. + + echo foo | xz > n + xz --suffix=ul n - Thanks to Remus-Gabriel Chelu and Jia Tan. + Now xz checks if the destination is a special file before + continuing. DOS/DJGPP version had a check for this but + Windows (and OS/2) didn't. - po/LINGUAS | 1 + - po/ro.po | 1016 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1017 insertions(+) + src/xz/file_io.c | 35 ++++++++++++++++++++++++++++------- + 1 file changed, 28 insertions(+), 7 deletions(-) -commit 2465f5b825152714b2c357d96c2422c31109d320 +commit 01311b81f03cce1c0ce847a3d556f84dbd439343 Author: Lasse Collin -Date: 2022-06-29 18:33:32 +0300 +Date: 2023-09-21 20:42:52 +0300 - Translations: Update Brazilian Portuguese translation. - - One msgstr was changed. The diff is long due to changes - in the source code line numbers in the comments. - - Thanks to Rafael Fontenelle. + CMake: Wrap two overlong lines that are possible to wrap. - po/pt_BR.po | 186 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 92 insertions(+), 94 deletions(-) + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit 434e1ffd3e62719d509da10b646216f5ef53fe4d +commit 152d0771ddd0cffcac9042ad1a66f110d228eee2 Author: Lasse Collin -Date: 2022-06-29 18:04:44 +0300 +Date: 2023-09-21 20:36:31 +0300 - Translations: Add Croatian translation. - - Thanks to Božidar Putanec and Jia Tan. + CMake: Add a comment about threads on Cygwin. - po/LINGUAS | 1 + - po/hr.po | 987 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 988 insertions(+) + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) -commit 0732d0f7065c9bd48bfe4f5983144ae970c4a499 +commit 6df988cceffaa3100b428ed816fad334935b27bf Author: Lasse Collin -Date: 2022-06-29 17:58:48 +0300 +Date: 2023-09-12 23:53:25 +0300 - Translations: Add Spanish translation. + MSVC: Remove Visual Studio project files and update INSTALL-MSVC.txt. - Thanks to Cristian Othón Martínez Vera and Jia Tan. + CMake is now the preferred build file generator when building + with MSVC. - po/LINGUAS | 1 + - po/es.po | 984 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 985 insertions(+) + windows/INSTALL-MSVC.txt | 37 ++-- + windows/vs2013/config.h | 157 --------------- + windows/vs2013/liblzma.vcxproj | 363 --------------------------------- + windows/vs2013/liblzma_dll.vcxproj | 398 ------------------------------------ + windows/vs2013/xz_win.sln | 48 ----- + windows/vs2017/config.h | 157 --------------- + windows/vs2017/liblzma.vcxproj | 363 --------------------------------- + windows/vs2017/liblzma_dll.vcxproj | 398 ------------------------------------ + windows/vs2017/xz_win.sln | 48 ----- + windows/vs2019/config.h | 157 --------------- + windows/vs2019/liblzma.vcxproj | 364 --------------------------------- + windows/vs2019/liblzma_dll.vcxproj | 399 ------------------------------------- + windows/vs2019/xz_win.sln | 51 ----- + 13 files changed, 12 insertions(+), 2928 deletions(-) -commit 9899b0f82bc130998d1f1f618a6ab805b73f2696 +commit edd563daf0da1d00018684614803c77ab62efcd6 Author: Lasse Collin -Date: 2022-06-29 17:49:43 +0300 +Date: 2023-09-21 19:17:40 +0300 - Translations: Add Korean translation. + CMake: Require VS2015 or later for building xzdec. - Thanks to Seong-ho Cho and Jia Tan. + xzdec might build with VS2013 but it hasn't been tested. + It was never supported before and VS2013 is old anyway + so for simplicity only liblzma is supported with VS2013. - po/LINGUAS | 1 + - po/ko.po | 972 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 973 insertions(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 65217eaf6bd195f3ef027d4ac55d57b7d133d69f +commit daea64d158a7151ca6c255a0e4554c6d521cd589 Author: Lasse Collin -Date: 2020-03-16 21:57:21 +0200 +Date: 2023-09-12 23:43:49 +0300 - Translations: Rebuild cs.po to avoid incorrect fuzzy strings. + CMake: Allow building xz with Visual Studio 2015 and later. - "make dist" updates the .po files and the fuzzy strings would - result in multiple very wrong translations. + Building the command line tools xz and xzdec with the combination + of CMake + Visual Studio 2015/2017/2019/2022 works now. + + VS2013 update 2 should still be able to build liblzma. + VS2013 cannot build the xz command line tool because xz + needs snprintf() that roughly conforms to C99. + VS2013 is old and no extra code will be added to support it. + + Thanks to Kelvin Lee and Jia Tan for testing. - po/cs.po | 592 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 322 insertions(+), 270 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e56ff423ee7af9e648e16b132f0d835d2cb4db26 +commit 8c2d197c940d246849b2ec48109bb22e54036927 Author: Lasse Collin -Date: 2020-03-16 17:30:39 +0200 +Date: 2023-09-12 23:34:31 +0300 - Translations: Add partial Danish translation. + MSVC: #define inline and restrict only when needed. - I made a few minor white space changes without getting them - approved by the Danish translation team. + This also drops the check for _WIN32 as that shouldn't be needed. - po/LINGUAS | 1 + - po/da.po | 896 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 897 insertions(+) + src/common/sysdefs.h | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) -commit 43e09c62e77cb8807d932c81de4decbdb956e184 +commit af66cd585902045e5689a0418103ec81f19f1d0a Author: Lasse Collin -Date: 2020-03-11 22:37:54 +0200 +Date: 2023-09-12 22:16:56 +0300 - Translations: Add hu, zh_CN, and zh_TW. + CMake: Add support for replacement getopt_long (lib/getopt*). - I made a few white space changes to these without getting them - approved by the translation teams. (I tried to contact the hu and - zh_TW teams but didn't succeed. I didn't contact the zh_CN team.) + Thanks to Jia Tan for the initial work. I added the libgnu target + and made a few related minor edits. - po/LINGUAS | 3 + - po/hu.po | 985 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po/zh_CN.po | 963 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po/zh_TW.po | 956 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 2907 insertions(+) + CMakeLists.txt | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 47 insertions(+), 7 deletions(-) -commit 982b6b198ae1ffe6093236dd8a3d03d1415b912b +commit e3288fdb45c580cb849f6799cf419c4922004ae5 Author: Lasse Collin -Date: 2020-03-11 14:33:30 +0200 +Date: 2023-09-12 21:12:34 +0300 - Translations: Update vi.po to match the file from the TP. + CMake: Bump maximum policy version to 3.27. + + There are several new policies. CMP0149 may affect the Windows SDK + version that CMake will choose by default. The new behavior is more + predictable, always choosing the latest SDK version by default. - The translated strings haven't been updated but word wrapping - is different. + The other new policies shouldn't affect this package. - po/vi.po | 407 ++++++++++++++++++++++++++++----------------------------------- - 1 file changed, 179 insertions(+), 228 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 801f39691fc4abc6dd33d7653d498781b593f3eb +commit aff1b479c7b168652bd20305ceed4317d5db6661 Author: Lasse Collin -Date: 2020-03-11 14:18:03 +0200 +Date: 2023-09-12 20:55:10 +0300 - Translations: Add fi and pt_BR, and update de, fr, it, and pl. + lib/getopt*.c: Include only HAVE_CONFIG_H is defined. + + The CMake-based build doesn't use config.h. - The German translation isn't identical to the file in - the Translation Project but the changes (white space changes - only) were approved by the translator Mario Blättermann. + Up-to-date getopt_long in Gnulib is LGPLv2 so at some + point it could be included in XZ Utils too but for now + this commit is enough to make CMake-based build possible. - po/LINGUAS | 2 + - po/de.po | 476 ++++++++++++++-------------- - po/fi.po | 974 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po/fr.po | 272 ++++++++-------- - po/it.po | 479 ++++++++++++---------------- - po/pl.po | 239 +++++++------- - po/pt_BR.po | 1001 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 7 files changed, 2697 insertions(+), 746 deletions(-) + lib/getopt.c | 4 +++- + lib/getopt1.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) -commit 311e4f85ede5d2f0bb71f3ad70b5b7db1b5adf33 +commit aa0cd585d2ed1455d35732798e0d90e3520e8ba5 Author: Lasse Collin -Date: 2022-08-22 17:27:19 +0300 +Date: 2023-09-08 19:08:57 +0300 - xz: Try to clarify --memlimit-mt-decompress vs. --memlimit-compress. + Doxygen: Add more C macro names to PREDEFINED. - src/xz/xz.1 | 31 +++++++++++++++++++------------ - 1 file changed, 19 insertions(+), 12 deletions(-) + doxygen/Doxyfile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -commit df23c31000283c00e5ef1ca32a0bc3bb757bd707 +commit ee7709bae53637e1765ce142ef102914f1423cb5 Author: Lasse Collin -Date: 2022-08-22 16:46:18 +0300 +Date: 2023-09-11 18:47:26 +0300 - CMake: Add liblzma tests. + liblzma: Move a few __attribute__ uses in function declarations. - Thanks to Jia Tan for the patch. + The API headers have many attributes but these were left + as is for now. - CMakeLists.txt | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 52 insertions(+), 1 deletion(-) + src/liblzma/common/common.c | 6 ++++-- + src/liblzma/common/common.h | 8 ++++---- + src/liblzma/common/memcmplen.h | 3 ++- + 3 files changed, 10 insertions(+), 7 deletions(-) -commit 02a777f9c422d3b5ec895078530bb1a2b6f7bdf5 +commit 217958d88713b5dc73d366d24dd64b2b311b86fe Author: Lasse Collin -Date: 2022-08-19 23:32:22 +0300 +Date: 2023-09-11 19:03:35 +0300 - xz: Revise --info-memory output. + xz, xzdec, lzmainfo: Use tuklib_attr_noreturn. - The strings could be more descriptive but it's good - to have some version of this committed now. + For compatibility with C23's [[noreturn]], tuklib_attr_noreturn + must be at the beginning of declaration (before "extern" or + "static", and even before any GNU C's __attribute__). - --robot mode wasn't changed yet. + This commit also moves all other function attributes to + the beginning of function declarations. "extern" is kept + at the beginning of a line so the attributes are listed on + separate lines before "extern" or "static". - src/xz/hardware.c | 32 ++++++++++++++++++++++++++------ - src/xz/xz.1 | 1 + - 2 files changed, 27 insertions(+), 6 deletions(-) + src/lzmainfo/lzmainfo.c | 6 ++++-- + src/xz/coder.c | 3 ++- + src/xz/hardware.h | 3 ++- + src/xz/message.h | 30 +++++++++++++++++------------- + src/xz/options.c | 3 ++- + src/xz/util.h | 8 ++++---- + src/xzdec/xzdec.c | 9 ++++++--- + 7 files changed, 37 insertions(+), 25 deletions(-) -commit f864f6d42eab57ea8ed82cc2dd19a03b51377442 +commit 18a66fbac031c98f9c2077fc88846e4d07849197 Author: Lasse Collin -Date: 2022-08-19 23:12:02 +0300 +Date: 2023-09-11 18:53:31 +0300 - xz: Update the man page for threaded decompression and memlimits. + Remove incorrect uses of __attribute__((__malloc__)). + + xrealloc() is obviously incorrect, modern GCC docs even + mention realloc() as an example where this attribute + cannot be used. - This documents the changes made in commits - 6c6da57ae2aa962aabde6892442227063d87e88c, - cad299008cf73ec566f0662a9cf2b94f86a99659, and - 898faa97287a756231c663a3ed5165672b417207. + liblzma's lzma_alloc() and lzma_alloc_zero() would be + correct uses most of the time but custom allocators + may use a memory pool or otherwise hold the pointer + so aliasing issues could happen in theory. - The --info-memory bit hasn't been finished yet - even though it's already mentioned in this commit - under --memlimit-mt-decompress and --threads. + The xstrdup() case likely was correct but I removed it anyway. + Now there are no __malloc__ attributes left in the code. + The allocations aren't in hot paths so this should make + no practical difference. - src/xz/xz.1 | 148 +++++++++++++++++++++++++++++++++++++++++++++++++----------- - 1 file changed, 121 insertions(+), 27 deletions(-) + src/liblzma/common/common.c | 4 ++-- + src/liblzma/common/common.h | 4 ++-- + src/xz/util.h | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) -commit d13bfcc0056617dd648f655a01653932fad7067f +commit 74b0e900c92d5b222b36f474f1efa431f8e262f7 Author: Lasse Collin -Date: 2022-08-18 17:49:16 +0300 +Date: 2023-09-08 18:41:25 +0300 - Build: Include the CMake files in the distribution. - - This was supposed to be done in 2020 with 5.2.5 release - already but it was noticed only today. 5.2.5 and 5.2.6 - even mention experiemental CMake support in the NEWS entries. - - Thanks to Olivier B. for reporting the problem. + Build: Omit -Wc99-c11-compat since it warns about _Noreturn. - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) + configure.ac | 1 - + 1 file changed, 1 deletion(-) -commit e66787bcfefdb93f19c974f895f65969a77937b0 +commit 90c94dddfd57b7d744bfad64c54e10d15778144b Author: Lasse Collin -Date: 2022-08-18 17:38:05 +0300 +Date: 2023-09-08 18:19:26 +0300 - Windows: Fix broken liblzma.dll build with Visual Studio project files. + tuklib: Update tuklib_attr_noreturn for C11/C17 and C23. - The bug was introduced in 352ba2d69af2136bc814aa1df1a132559d445616 - "Windows: Fix building of resource files when config.h isn't used." + This makes no difference for GCC or Clang as they support + GNU C's __attribute__((__noreturn__)) but this helps with MSVC: - That commit fixed liblzma.dll build with CMake while keeping it - working with Autotools on Windows but the VS project files were - forgotten. + - VS 2019 version 16.7 and later support _Noreturn if the + options /std:c11 or /std:c17 are used. This gets handled + with the check for __STDC_VERSION__ >= 201112. - I haven't tested these changes. + - When MSVC isn't in C11/C17 mode, __declspec(noreturn) is used. - Thanks to Olivier B. for reporting the bug and for the initial patch. + C23 will deprecate _Noreturn (and ) + for [[noreturn]]. This commit anticipates that but + the final __STDC_VERSION__ value isn't known yet. - windows/vs2013/liblzma_dll.vcxproj | 6 ++++++ - windows/vs2017/liblzma_dll.vcxproj | 6 ++++++ - windows/vs2019/liblzma_dll.vcxproj | 6 ++++++ - 3 files changed, 18 insertions(+) + src/common/tuklib_common.h | 22 +++++++++++++++++++++- + src/common/tuklib_exit.h | 4 ++-- + 2 files changed, 23 insertions(+), 3 deletions(-) -commit c4e8e5fb311225b8b48d34157891a640b2535e0c +commit 189f72581329ab281ad6af37f60135910cb1b146 Author: Lasse Collin -Date: 2022-08-18 17:16:49 +0300 +Date: 2023-09-11 17:22:44 +0300 - liblzma: Threaded decoder: Improve LZMA_FAIL_FAST when LZMA_FINISH is used. - - It will now return LZMA_DATA_ERROR (not LZMA_OK or LZMA_BUF_ERROR) - if LZMA_FINISH is used and there isn't enough input to finish - decoding the Block Header or the Block. The use of LZMA_DATA_ERROR - is simpler and the less risky than LZMA_BUF_ERROR but this might - be changed before 5.4.0. + Update THANKS. - src/liblzma/api/lzma/container.h | 6 +++++ - src/liblzma/common/stream_decoder_mt.c | 42 ++++++++++++++++++++++++++++++++++ - 2 files changed, 48 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 6dcf606e7efa2b259f0262f9e2f61e00116842d3 +commit 79334e7f20f2bf9e0de095835b48868f1238f584 Author: Lasse Collin -Date: 2022-08-12 18:31:47 +0300 +Date: 2023-09-05 22:42:10 +0300 - Add NEWS for 5.2.6. + MSVC: xz: Make file_io.c and file_io.h compatible with MSVC. + + Thanks to Kelvin Lee for the original patches + and testing the modifications I made. - NEWS | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 121 insertions(+) + src/xz/file_io.c | 26 ++++++++++++++++++++++++++ + src/xz/file_io.h | 10 ++++++++++ + 2 files changed, 36 insertions(+) -commit 413b86fcf8934fae5a004f378a9483d37d8fcaab +commit c660b8d78b7bda43b12b285550d8c70e8ccec698 Author: Lasse Collin -Date: 2022-08-12 14:28:41 +0300 +Date: 2023-09-05 21:33:35 +0300 - Add Jia Tan to AUTHORS. + MSVC: xz: Use GetTickCount64() to implement mytime_now(). + + It's available since Windows Vista. - AUTHORS | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/mytime.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) -commit 352672732c346c546ff3c26d0605bc0ed1c8b7c7 -Author: Lasse Collin -Date: 2022-07-25 19:28:26 +0300 +commit 5c6f892d411670e3060f4bc309402617a209e57c +Author: Kelvin Lee +Date: 2023-09-05 15:05:09 +0300 - Build: Start the generated ChangeLog from around 5.2.0 instead of 5.0.0. - - This makes ChangeLog smaller. + MSVC: xz: Use _stricmp() instead of strcasecmp() in suffix.c. - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/suffix.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) -commit 6f6d11225d6016be2bbb55d845b66f6b04d048df -Author: Lasse Collin -Date: 2022-07-25 19:11:05 +0300 +commit e241051f50044259d174e8b4633dd9a1c4478408 +Author: Kelvin Lee +Date: 2023-09-05 15:01:10 +0300 - Translations: Change the copyright comment string to use with po4a. - - This affects the second line in po4a/xz-man.pot. The man pages of - xzdiff, xzgrep, and xzmore are from GNU gzip and under GNU GPLv2+ - while the rest of the man pages are in the public domain. + MSVC: xz: Use _isatty() from to implement isatty(). - po4a/update-po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/message.c | 5 +++++ + src/xz/util.c | 5 +++++ + 2 files changed, 10 insertions(+) -commit 61f8ec804abdb4c5dac01e8ae9b90c7be58a5c24 -Author: Jia Tan -Date: 2022-07-25 18:30:05 +0300 +commit d14bba8fc2be02a9fed8c9bcaaf61103451755f8 +Author: Kelvin Lee +Date: 2023-09-05 15:10:31 +0300 - liblzma: Refactor lzma_mf_is_supported() to use a switch-statement. + MSVC: xz: Use _fileno() instead of fileno(). - src/liblzma/lz/lz_encoder.c | 32 ++++++++++++++------------------ - 1 file changed, 14 insertions(+), 18 deletions(-) + src/xz/private.h | 4 ++++ + 1 file changed, 4 insertions(+) -commit 4d80b463a1251aa22eabc87d2732fec13b1adda6 -Author: Jia Tan -Date: 2022-07-25 18:20:01 +0300 +commit c4edd367678e6a38c42b149856159bf417da7fe1 +Author: Kelvin Lee +Date: 2023-09-05 15:00:07 +0300 - Build: Don't allow empty LIST in --enable-match-finders=LIST. - - It's enforced only when a match finder is needed, that is, - when LZMA1 or LZMA2 encoder is enabled. + MSVC: xzdec: Use _fileno and _setmode. - configure.ac | 4 ++++ + src/xzdec/xzdec.c | 4 ++++ 1 file changed, 4 insertions(+) -commit 9cc721af5436908f2d5a828aebbc4050a32a3487 -Author: Lasse Collin -Date: 2022-07-24 13:27:48 +0300 +commit cfd1054b9b539ee92524901e95d7bb5a1fe670a0 +Author: Kelvin Lee +Date: 2023-09-05 14:37:50 +0300 - xz: Update the man page that change to --keep will be in 5.2.6. + MSVC: Don't #include . - src/xz/xz.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + lib/getopt.c | 4 +++- + lib/getopt.in.h | 4 +++- + src/xz/private.h | 5 ++++- + src/xzdec/xzdec.c | 5 ++++- + 4 files changed, 14 insertions(+), 4 deletions(-) -commit b81bf0c7d1873e52a4086a9abb494471d652cb55 +commit adef92f23563a2cc088b31ddee9040ecc96bc996 Author: Lasse Collin -Date: 2022-07-19 23:23:54 +0300 +Date: 2023-09-19 14:03:45 +0300 Update THANKS. THANKS | 1 + 1 file changed, 1 insertion(+) -commit 340cf1ec3927767046b8293a49da3db4e393f426 -Author: Nicholas Jackson -Date: 2022-07-17 17:39:23 -0700 +commit 953e775941a25bfcfa353f802b13e66acb1edf2c +Author: Jia Tan +Date: 2023-09-14 21:13:23 +0800 - CMake: Add missing source file to liblzma build + CI: Enable CLMUL in address sanitization test. + + The crc64_clmul() function should be ignored by the address sanitizer + now so these builds should still pass. - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) + .github/workflows/ci.yml | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) -commit d796b6d7fdb8b7238b277056cf9146cce25db604 +commit f167e79bc98f3f56af2e767b83aa81c2d2b9ed77 Author: Lasse Collin -Date: 2022-07-19 23:19:49 +0300 +Date: 2023-09-14 16:35:46 +0300 - xzgrep man page: Document exit statuses. + Update THANKS. - src/scripts/xzgrep.1 | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 923bf96b55e5216a6c8df9d8331934f54784390e +commit 4f44ef86758a41a8ec814096f4cb6ee6de04c82e Author: Lasse Collin -Date: 2022-07-19 23:13:24 +0300 +Date: 2023-09-14 16:34:07 +0300 - xzgrep: Improve error handling, especially signals. - - xzgrep wouldn't exit on SIGPIPE or SIGQUIT when it clearly - should have. It's quite possible that it's not perfect still - but at least it's much better. - - If multiple exit statuses compete, now it tries to pick - the largest of value. - - Some comments were added. - - The exit status handling of signals is still broken if the shell - uses values larger than 255 in $? to indicate that a process - died due to a signal ***and*** their "exit" command doesn't take - this into account. This seems to work well with the ksh and yash - versions I tried. However, there is a report in gzip/zgrep that - OpenSolaris 5.11 (not 5.10) has a problem with "exit" truncating - the argument to 8 bits: - - https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22900#25 + liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)). - Such a bug would break xzgrep but I didn't add a workaround - at least for now. 5.11 is old and I don't know if the problem - exists in modern descendants, or if the problem exists in other - ksh implementations in use. + Thanks to Agostino Sarubbo. + Fixes: https://github.com/tukaani-project/xz/issues/62 - src/scripts/xzgrep.in | 72 +++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 53 insertions(+), 19 deletions(-) + src/liblzma/check/crc64_fast.c | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit a648978b20495b7aa4a8b029c5a810b5ad9d08ff -Author: Lasse Collin -Date: 2022-07-19 00:10:55 +0300 +commit 7379bb3eed428c0ae734d0cc4a1fd04359d53f08 +Author: Jia Tan +Date: 2023-09-12 22:36:12 +0800 - xzgrep: Make the fix for ZDI-CAN-16587 more robust. + CMake: Fix time.h checks not running on second CMake run. - I don't know if this can make a difference in the real world - but it looked kind of suspicious (what happens with sed - implementations that cannot process very long lines?). - At least this commit shouldn't make it worse. + If CMake was configured more than once, HAVE_CLOCK_GETTIME and + HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check + for librt being needed to provide HAVE_CLOCK_GETTIME was also + simplified. - src/scripts/xzgrep.in | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + CMakeLists.txt | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) -commit bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5 -Author: Lasse Collin -Date: 2022-07-18 21:52:31 +0300 +commit 5d691fe58286b92d704c0dc5cd0c4df22881c6c6 +Author: Jia Tan +Date: 2023-09-12 22:34:06 +0800 - xzgrep: Use grep -H --label when available (GNU, *BSDs). - - It avoids the use of sed for prefixing filenames to output lines. - Using sed for that is slower and prone to security bugs so now - the sed method is only used as a fallback. - - This also fixes an actual bug: When grepping a binary file, - GNU grep nowadays prints its diagnostics to stderr instead of - stdout and thus the sed-method for prefixing the filename doesn't - work. So with this commit grepping binary files gives reasonable - output with GNU grep now. + CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC. - This was inspired by zgrep but the implementation is different. + If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always + added as a compile definition even if the check for it failed. - src/scripts/xzgrep.in | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) -commit b56729af9f1a596e57aeefd7570d8d7dce5c9f52 +commit eccf12866527b8d24c7d7f92f755142be8ef9b11 Author: Lasse Collin -Date: 2022-07-18 21:10:25 +0300 +Date: 2023-08-31 19:50:05 +0300 - xzgrep: Use -e to specify the pattern to grep. + xz: Refactor thousand separator detection and disable it on MSVC. - Now we don't need the separate test for adding the -q option - as it can be added directly in the two places where it's needed. + Now the two variations of the format strings are created with + a macro, and the whole detection code can be easily disabled + on platforms where thousand separator formatting is known to + not work (MSVC has no support, and on DJGPP 2.05 it can have + problems in some cases). - src/scripts/xzgrep.in | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) + src/xz/util.c | 89 ++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 45 insertions(+), 44 deletions(-) -commit bad61b5997e6647911974022bfb72f3d4818a594 +commit f7093cd9d130477c234b40aeda613964171f8f21 Author: Lasse Collin -Date: 2022-07-18 19:18:48 +0300 +Date: 2023-08-31 18:14:43 +0300 - Scripts: Use printf instead of echo in a few places. + xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX. - It's a good habbit as echo has some portability corner cases - when the string contents can be anything. + SSIZE_MAX isn't readily available on MSVC. Removing it means + that there is one thing less to worry when porting to MSVC. - src/scripts/xzdiff.in | 6 +++--- - src/scripts/xzgrep.in | 4 ++-- - src/scripts/xzless.in | 4 ++-- - src/scripts/xzmore.in | 8 ++++---- - 4 files changed, 11 insertions(+), 11 deletions(-) + src/xz/file_io.c | 5 ++--- + src/xz/file_io.h | 4 ++-- + 2 files changed, 4 insertions(+), 5 deletions(-) -commit 6a4a4a7d2667837dc824c26fcb19ed6ca5aff645 -Author: Lasse Collin -Date: 2022-07-17 21:36:25 +0300 +commit 74c3449d8b816a724b12ebce7417e00fb597309a +Author: Jia Tan +Date: 2023-08-28 23:14:45 +0800 - xzgrep: Add more LC_ALL=C to avoid bugs with multibyte characters. - - Also replace one use of expr with printf. - - The rationale for LC_ALL=C was already mentioned in - 69d1b3fc29677af8ade8dc15dba83f0589cb63d6 that fixed a security - issue. However, unrelated uses weren't changed in that commit yet. - - POSIX says that with sed and such tools one should use LC_ALL=C - to ensure predictable behavior when strings contain byte sequences - that aren't valid multibyte characters in the current locale. See - under "Application usage" in here: + Tests: Improve invalid unpadded size check in test_lzma_index_append(). - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html + This check was extended to test the code added to fix a failing assert + in ae5c07b22a6b3766b84f409f1b6b5c100469068a. + + tests/test_index.c | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +commit 2544274a8b8a27f4ea6c457d2c4c32eb1e4cd336 +Author: Jia Tan +Date: 2023-08-28 21:54:41 +0800 + + Tests: Improve comments in test_index.c. + + tests/test_index.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 49be29d6380b94e6fb26e511dd2cdbd9afce0f8b +Author: Jia Tan +Date: 2023-08-28 21:52:54 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 721e3d9f7a82f59f32795d5fb97e0210d1aa839a +Author: Jia Tan +Date: 2023-08-28 21:50:16 +0800 + + liblzma: Update assert in vli_ceil4(). - With GNU sed invalid multibyte strings would work without this; - it's documented in its Texinfo manual. Some other implementations - aren't so forgiving. + The argument to vli_ceil4() should always guarantee the return value + is also a valid lzma_vli. Thus the highest three valid lzma_vli values + are invalid arguments. All uses of the function ensure this so the + assert is updated to match this. - src/scripts/xzgrep.in | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) + src/liblzma/common/index.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b48f9d615f2c2e8d2f6e253d0e48ee66d0652b68 -Author: Lasse Collin -Date: 2022-07-17 20:55:16 +0300 +commit ae5c07b22a6b3766b84f409f1b6b5c100469068a +Author: Jia Tan +Date: 2023-08-28 21:31:25 +0800 - xzgrep: Fix parsing of certain options. + liblzma: Add overflow check for Unpadded size in lzma_index_append(). + + This was not a security bug since there was no path to overflow + UINT64_MAX in lzma_index_append() or when it calls index_file_size(). + The bug was discovered by a failing assert() in vli_ceil4() when called + from index_file_size() when unpadded_sum (the sum of the compressed size + of current Stream and the unpadded_size parameter) exceeds LZMA_VLI_MAX. - Fix handling of "xzgrep -25 foo" (in GNU grep "grep -25 foo" is - an alias for "grep -C25 foo"). xzgrep would treat "foo" as filename - instead of as a pattern. This bug was fixed in zgrep in gzip in 2012. + Previously, the unpadded_size parameter was checked to be not greater + than UNPADDED_SIZE_MAX, but no check was done once compressed_base was + added. - Add -E, -F, -G, and -P to the "no argument required" list. + This could not have caused an integer overflow in index_file_size() when + called by lzma_index_append(). The calculation for file_size breaks down + into the sum of: - Add -X to "argument required" list. It is an - intentionally-undocumented GNU grep option so this isn't - an important option for xzgrep but it seems that other grep - implementations (well, those that I checked) don't support -X - so I hope this change is an improvement still. + - Compressed base from all previous Streams + - 2 * LZMA_STREAM_HEADER_SIZE (size of the current Streams header and + footer) + - stream_padding (can be set by lzma_index_stream_padding()) + - Compressed base from the current Stream + - Unpadded size (parameter to lzma_index_append()) - grep -d (grep --directories=ACTION) requires an argument. In - contrast to zgrep, I kept -d in the "no argument required" list - because it's not supported in xzgrep (or zgrep). This way - "xzgrep -d" gives an error about option being unsupported instead - of telling that it requires an argument. Both zgrep and xzgrep - tell that it's unsupported if an argument is specified. + The sum of everything except for Unpadded size must be less than + LZMA_VLI_MAX. This is guarenteed by overflow checks in the functions + that can set these values including lzma_index_stream_padding(), + lzma_index_append(), and lzma_index_cat(). The maximum value for + Unpadded size is enforced by lzma_index_append() to be less than or + equal UNPADDED_SIZE_MAX. Thus, the sum cannot exceed UINT64_MAX since + LZMA_VLI_MAX is half of UINT64_MAX. - Add comments. + Thanks to Joona Kannisto for reporting this. - src/scripts/xzgrep.in | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) + src/liblzma/common/index.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 2d2201bc6315deda4d43625aa510972467bd51d4 -Author: Lasse Collin -Date: 2022-07-14 20:33:05 +0300 +commit 1057765aaabfe0f1397b8094531846655376ae38 +Author: Jia Tan +Date: 2023-08-28 22:18:29 +0800 - Tests: Add the .lzma files to test_files.sh. + Translations: Update the Esperanto translation. - tests/test_files.sh | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + po/eo.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit ce5549a591bf126300618879f5b24023351baff6 -Author: Lasse Collin -Date: 2022-07-14 19:37:42 +0300 +commit f2e94d064f305bb8ad77ca70f91d93e55f5cf856 +Author: Jia Tan +Date: 2023-08-26 20:10:23 +0800 - Tests: Add .lzma test files. + Translations: Update the Esperanto translation. - tests/files/README | 63 ++++++++++++++++----- - tests/files/bad-too_big_size-with_eopm.lzma | Bin 0 -> 37 bytes - tests/files/bad-too_small_size-without_eopm-1.lzma | Bin 0 -> 31 bytes - tests/files/bad-too_small_size-without_eopm-2.lzma | Bin 0 -> 31 bytes - tests/files/bad-too_small_size-without_eopm-3.lzma | Bin 0 -> 36 bytes - tests/files/bad-unknown_size-without_eopm.lzma | Bin 0 -> 31 bytes - tests/files/good-known_size-with_eopm.lzma | Bin 0 -> 37 bytes - tests/files/good-known_size-without_eopm.lzma | Bin 0 -> 31 bytes - tests/files/good-unknown_size-with_eopm.lzma | Bin 0 -> 37 bytes - 9 files changed, 50 insertions(+), 13 deletions(-) + po/eo.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit 107c93ee5cad51a6ea0cee471209bfe8d76deaa3 -Author: Lasse Collin -Date: 2022-07-14 18:12:38 +0300 +commit 2b871f4dbffe3801d0da3f89806b5935f758d5f3 +Author: Jia Tan +Date: 2023-08-09 20:55:36 +0800 - liblzma: Rename a variable and improve a comment. + Docs: Update INSTALL for --enable-threads method win95. + + The Autotools build allows win95 threads and --enable-small together now + if the compiler supports __attribute__((__constructor__)). - src/liblzma/lzma/lzma_decoder.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) + INSTALL | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit 511feb5eadb988d641b025d597f4fac7502003b8 -Author: Lasse Collin -Date: 2022-07-13 22:24:41 +0300 +commit 356ad5b26b4196f085ce3afa1869154ca81faad8 +Author: Jia Tan +Date: 2023-08-09 20:54:15 +0800 - Update THANKS. + CMake: Conditionally allow win95 threads and --enable-small. - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) -commit 9595a3119b9faf0ce01375329cad8bbf85c35ea2 -Author: Lasse Collin -Date: 2022-07-13 22:24:07 +0300 +commit de574404c4c2f87aca049f232c38526e3ce092aa +Author: Jia Tan +Date: 2023-08-09 20:35:16 +0800 - liblzma: Add optional autodetection of LZMA end marker. - - Turns out that this is needed for .lzma files as the spec in - LZMA SDK says that end marker may be present even if the size - is stored in the header. Such files are rare but exist in the - real world. The code in liblzma is so old that the spec didn't - exist in LZMA SDK back then and I had understood that such - files weren't possible (the lzma tool in LZMA SDK didn't - create such files). + Build: Conditionally allow win95 threads and --enable-small. - This modifies the internal API so that LZMA decoder can be told - if EOPM is allowed even when the uncompressed size is known. - It's allowed with .lzma and not with other uses. + When the compiler supports __attribute__((__constructor__)) + mythread_once() is never used, even with --enable-small. A configuration + with win95 threads and --enable-small will compile and be thread safe so + it can be allowed. - Thanks to Karl Beldan for reporting the problem. + This isn't a very common configuration since MSVC does not support + __attribute__((__constructor__)), but MINGW32 and CLANG32 environments + for MSYS2 can use win95 threads and have + __attribute__((__constructor__)) support. - doc/lzma-file-format.txt | 11 +++- - src/liblzma/common/alone_decoder.c | 2 +- - src/liblzma/common/microlzma_decoder.c | 2 +- - src/liblzma/lz/lz_decoder.c | 10 +++- - src/liblzma/lz/lz_decoder.h | 8 +-- - src/liblzma/lzma/lzma2_decoder.c | 2 +- - src/liblzma/lzma/lzma_decoder.c | 99 ++++++++++++++++++++++++---------- - 7 files changed, 95 insertions(+), 39 deletions(-) + configure.ac | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) -commit 0c0f8e9761eb6eaf199082cf144db7ac5f9d8cb2 -Author: Lasse Collin -Date: 2022-07-12 18:53:04 +0300 +commit 6bf33b704cd31dccf25e68480464aa22d3fcad5a +Author: Jamaika1 +Date: 2023-08-08 14:07:59 +0200 - xz: Document the special memlimit case of 2000 MiB on MIPS32. + mythread.h: Fix typo error in Vista threads mythread_once(). - See commit fc3d3a7296ef58bb799a73943636b8bfd95339f7. + The "once_" variable was accidentally referred to as just "once". This + prevented building with Vista threads when + HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR was not defined. - src/xz/xz.1 | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit d1bfa3dc703325ecd974167e864a8712fdfe936e +commit 80cb961e5380a3878246d41341ff91378ca59e05 Author: Jia Tan -Date: 2022-07-01 21:19:26 +0800 +Date: 2023-08-04 22:17:11 +0800 - Created script to generate code coverage reports. + codespell: Add .codespellrc to set default options. - The script uses lcov and genhtml after running the tests - to show the code coverage statistics. The script will create - a coverage directory where it is run. It can be run both in - and out of the source directory. + The .codespellrc allows setting default options to avoid false positive + matches, set additional dictionaries, etc. For now, codespell can be + used locally before committing doc and comment changes. + + It should help prevent silly errors and fix up commits in the future. - .gitignore | 4 +++ - tests/code_coverage.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 83 insertions(+) + .codespellrc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) -commit 86a30b0255d8064169fabfd213d907016d2f9f2a +commit cd678a6077358935249b64a4a16fe8d17434f9c9 Author: Jia Tan -Date: 2022-06-16 17:32:19 +0300 +Date: 2023-08-03 20:10:21 +0800 - Tests: Add more tests into test_check. + Tests: Style fixes to test_lzip_decoder.c. - tests/test_check.c | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++-- - tests/tests.h | 23 +++++ - 2 files changed, 295 insertions(+), 7 deletions(-) + tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) -commit 82e30fed66a89706388a8c15dc954d84e63f38fa -Author: Lasse Collin -Date: 2022-06-16 15:02:57 +0300 +commit 1cac5ed4fa45c9861d745b02d80575cb2ff01d81 +Author: Jia Tan +Date: 2023-08-03 15:56:20 +0800 - Tests: Use char[][24] array for enum_strings_lzma_ret. - - Array of pointers to short strings is a bit pointless here - and now it's fully const. + Translations: Update the Chinese (simplified) translation. - tests/tests.h | 2 +- + po/zh_CN.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5ba9459e6c4a29f6870ca78ce8ac6e519d59c41e -Author: Lasse Collin -Date: 2022-06-16 14:12:14 +0300 - - Tests: tuktest.h: Add tuktest_error_impl to help with error conditions. - - tests/tuktest.h | 72 +++++++++++++++++++++++++-------------------------------- - 1 file changed, 32 insertions(+), 40 deletions(-) - -commit b339892668da20aea22a93668c82b87a38e4a97f -Author: Lasse Collin -Date: 2022-06-16 13:29:59 +0300 - - Tests: tuktest.h: Rename file_from_* and use tuktest_malloc there. - - tests/test_bcj_exact_size.c | 4 +--- - tests/tuktest.h | 52 +++++++++++++++++++++------------------------ - 2 files changed, 25 insertions(+), 31 deletions(-) - -commit d8b63a0ad68d1c461eb373466679ebc41fbc207d +commit 16068f6c30b888cdb873f6285af941d00f95741d Author: Lasse Collin -Date: 2022-06-16 13:08:19 +0300 +Date: 2023-08-02 17:15:12 +0300 - Tests: tuktest.h: Add malloc wrapper with automatic freeing. + xz: Omit an empty paragraph on the man page. - tests/tuktest.h | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 124 insertions(+) + src/xz/xz.1 | 1 - + 1 file changed, 1 deletion(-) -commit 1d51536a4b19a8fae768f8eb462fc2238cb36d53 -Author: Lasse Collin -Date: 2022-06-16 11:47:37 +0300 +commit 9ae4371b5106189486e850ce777e40f7b6021c0b +Author: Jia Tan +Date: 2023-08-02 20:30:07 +0800 - Tests: tuktest.h: Move a function. + Add NEWS for 5.4.4. - tests/tuktest.h | 44 ++++++++++++++++++++++---------------------- - 1 file changed, 22 insertions(+), 22 deletions(-) + NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) -commit 70c7555f6403553ee35539e869de0025592d8564 +commit e8c2203b2c76466d8d3387c5212b46151de8e605 Author: Lasse Collin -Date: 2022-06-14 22:21:15 +0300 +Date: 2023-08-02 15:19:43 +0300 - Tests: test_vli: Remove an invalid test-assertion. + build-aux/manconv.sh: Fix US-ASCII and UTF-8 output. - lzma_vli is unsigned so trying a signed value results in - a compiler warning from -Wsign-conversion. (lzma_vli)-1 - equals to LZMA_VLI_UNKNOWN anyway which is the next assertion. + groff defaults to SGR escapes. Using -P-c passes -c to grotty + which restores the old behavior. Perhaps there is a better way to + get pure plain text output but this works for now. - tests/test_vli.c | 2 -- - 1 file changed, 2 deletions(-) + build-aux/manconv.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 154b73c5a1092c3f785e01666b564ad7ff1be555 +commit 9a706167b0d903d92fd134895acb4bc6a5e3e688 Author: Lasse Collin -Date: 2022-06-14 22:10:10 +0300 +Date: 2023-08-01 19:10:43 +0300 - Tests: test_vli: Add const where appropriate. + Update THANKS. - tests/test_vli.c | 53 ++++++++++++++++++++++++++++------------------------- - 1 file changed, 28 insertions(+), 25 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 0354d6cce3ff98ea6f927107baf216253f6ce2bb -Author: Jia Tan -Date: 2022-06-13 20:27:03 +0800 +commit 33e25a0f5650754c38bed640deedefe3b4fec5ef +Author: Lasse Collin +Date: 2023-08-01 18:22:24 +0300 - Added vli tests to .gitignore + Update THANKS. - .gitignore | 1 + + THANKS | 1 + 1 file changed, 1 insertion(+) -commit a08f5ccf6bdc20ef70e41f6f3321618ef146f96e -Author: Jia Tan -Date: 2022-06-12 11:31:40 +0800 +commit 81db3b889830132334d1f2129bdc93177ac2ca7d +Author: ChanTsune <41658782+ChanTsune@users.noreply.github.com> +Date: 2023-08-01 18:17:17 +0300 - Created tests for all functions exported in vli.h + mythread.h: Disable signal functions in builds targeting Wasm + WASI. - Achieved 100% code coverage vli_encoder.c, vli_decoder.c, and vli_size.c - - tests/Makefile.am | 4 +- - tests/test_vli.c | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 311 insertions(+), 1 deletion(-) - -commit 1e3eb61815a91c0a1bfbb802e2d95593f523491f -Author: jiat75 -Date: 2022-06-03 21:24:54 +0800 - - Added parallel test artifacts to .gitignore + signal.h in WASI SDK doesn't currently provide sigprocmask() + or sigset_t. liblzma doesn't need them so this change makes + liblzma and xzdec build against WASI SDK. xz doesn't build yet + and the tests don't either as tuktest needs setjmp() which + isn't (yet?) implemented in WASI SDK. + + Closes: https://github.com/tukaani-project/xz/pull/57 + See also: https://github.com/tukaani-project/xz/pull/56 + + (The original commit was edited a little by Lasse Collin.) - .gitignore | 2 ++ - 1 file changed, 2 insertions(+) + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 00e3613f1212eaa84e721585fdb4de6967cf2476 -Author: Lasse Collin -Date: 2022-06-14 21:29:21 +0300 +commit 71c638c611324e606d324c8189fef8fe79db6991 +Author: Jia Tan +Date: 2023-08-01 21:58:51 +0800 - Tests: Use good-1-empty-bcj-lzma2.xz in test_bcj_exact_size. + Add newline to end of .gitignore. - It's much nicer this way so that the test data isn't a hardcoded - table inside the C file. + Newline was accidentally removed in commit + 01cbb7f023ee7fda8ddde04bd17cf7d3c2418706. - tests/test_bcj_exact_size.c | 19 +++++++------------ - 1 file changed, 7 insertions(+), 12 deletions(-) + .gitignore | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 86bab755be252bfd3e0a9aee8e7b83a9bbb23ed0 -Author: Lasse Collin -Date: 2022-06-14 21:26:13 +0300 +commit 42df7c7aa1cca385e509eb33c65136e61890f0bf +Author: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> +Date: 2023-07-31 14:02:21 +0200 - Tests: Add file reading helpers to tuktest.h. + Docs: Fix typos found by codespell - tests/tuktest.h | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 176 insertions(+), 7 deletions(-) + CMakeLists.txt | 4 ++-- + NEWS | 2 +- + configure.ac | 2 +- + src/liblzma/api/lzma/container.h | 4 ++-- + src/liblzma/api/lzma/filter.h | 2 +- + src/liblzma/api/lzma/lzma12.h | 4 ++-- + src/liblzma/common/block_buffer_encoder.c | 2 +- + src/liblzma/common/common.h | 2 +- + src/liblzma/common/file_info.c | 2 +- + src/liblzma/common/lzip_decoder.c | 2 +- + src/liblzma/common/stream_decoder_mt.c | 8 ++++---- + src/liblzma/common/string_conversion.c | 6 +++--- + src/liblzma/lz/lz_encoder.h | 2 +- + src/liblzma/lzma/lzma_encoder.c | 4 ++-- + src/xz/hardware.c | 4 ++-- + tests/test_filter_flags.c | 4 ++-- + tests/test_index.c | 2 +- + tests/test_vli.c | 2 +- + 18 files changed, 29 insertions(+), 29 deletions(-) -commit 83d2337b72dbf391c6f3b41889eea99e51679105 -Author: Lasse Collin -Date: 2022-06-14 18:21:57 +0300 +commit 01cbb7f023ee7fda8ddde04bd17cf7d3c2418706 +Author: Jia Tan +Date: 2023-07-26 20:26:23 +0800 - Tests: tuktest.h: Move a printf from a macro to a helper function. + Update .gitignore. - tests/tuktest.h | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) + .gitignore | 4 ++++ + 1 file changed, 4 insertions(+) -commit f9e8176ea7d520797a2db2d49a5a632c285674a8 -Author: Lasse Collin -Date: 2022-06-14 17:20:49 +0300 +commit f97a1afd564c48ad9cb94682e10972a72e11fa08 +Author: Jia Tan +Date: 2023-07-28 22:03:08 +0800 - Tests: Add test file good-1-empty-bcj-lzma2.xz. + CMake: Conditionally allow the creation of broken symlinks. + + The CMake build will try to create broken symlinks on Unix and Unix-like + platforms. Cygwin and MSYS2 are Unix-like, but may not be able to create + broken symlinks. The value of the CYGWIN or MSYS environment variables + determine if broken symlinks are valid. - This is from test_bcj_exact_size.c. - It's good to have it as a standalone file. + The default for MSYS2 does not allow for broken symlinks, so the CMake + build has been broken for MSYS2 since commit + 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. - tests/files/README | 5 +++++ - tests/files/good-1-empty-bcj-lzma2.xz | Bin 0 -> 52 bytes - 2 files changed, 5 insertions(+) + CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 75 insertions(+), 7 deletions(-) -commit aa75c5563a760aea3aa23d997d519e702e82726b +commit 7190f4cc7c9ade5b9b3675d0cbfa3b6d6ec9cb4f Author: Jia Tan -Date: 2022-06-10 21:35:18 +0800 +Date: 2023-07-28 21:56:48 +0800 - Tests: Created tests for hardware functions. + CI: Fix windows-ci dependency installation. - Created tests for all API functions exported in - src/liblzma/api/lzma/hardware.h. The tests are fairly trivial - but are helpful because they will inform users if their machines - cannot support these functions. They also improve the code - coverage metrics. + All of the MSYS2 environments need make, and it does not come with the + toolchain package. The toolchain package will install the needed + compiler toolchains since without this package CMake cannot properly + generate the Makefiles. - .gitignore | 1 + - tests/Makefile.am | 2 ++ - tests/test_hardware.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 48 insertions(+) + .github/workflows/windows-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 5c8ffdca20813939818843476fb212dfae8838a3 -Author: Lasse Collin -Date: 2022-06-02 21:01:45 +0300 +commit a048f472cd9a2245265cb292853cbbcdd4f02001 +Author: Jia Tan +Date: 2023-07-28 21:54:22 +0800 - Tests: Convert test_check to tuktest. + CI: Update ci_build.sh CMake to always make Unix Makefiles. - Thanks to Jia Tan for help with all the tests. + The default for many of the MSYS2 environments is for CMake to create + Ninja build files. This would complicate the build script since we would + need a different command to run the tests. Its simpler to always use + Unix Makefiles so that "make test" is always a usable target for + testing. - tests/test_check.c | 67 +++++++++++++++++++++++++++--------------------------- - 1 file changed, 33 insertions(+), 34 deletions(-) + build-aux/ci_build.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit faf5ff8899d539b4dcd2a7e5280cb820a4746c86 -Author: Lasse Collin -Date: 2022-06-02 20:31:03 +0300 +commit 7870396a0ca945473aa0d1d790f4cbef456610bd +Author: Jia Tan +Date: 2023-07-25 20:17:23 +0800 - Tests: Convert test_block_header to tuktest. + CI: Test CMake builds and test framework with MSYS2. - tests/test_block_header.c | 89 +++++++++++++++++++++++++++-------------------- - 1 file changed, 52 insertions(+), 37 deletions(-) + .github/workflows/windows-ci.yml | 32 ++++++++++++++++++++------------ + 1 file changed, 20 insertions(+), 12 deletions(-) -commit 754d39fbebee3782258d42f154a223d3c5770ec7 -Author: Lasse Collin -Date: 2022-06-02 20:28:23 +0300 +commit 6497d1f8875cb7e3007f714336cc09c06fed235b +Author: Jia Tan +Date: 2023-07-25 20:14:53 +0800 - Tests: Convert test_bcj_exact_size to tuktest. + CI: Windows CI rename system matrix variable -> msys2_env. - The compress() and decompress() functions were merged because - the later depends on the former so they need to be a single - test case. + Calling the MSYS2 environment "system" was a bit vague and should be + more specific. - tests/test_bcj_exact_size.c | 75 +++++++++++++++++++++++++-------------------- - 1 file changed, 41 insertions(+), 34 deletions(-) + .github/workflows/windows-ci.yml | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) -commit 96da21470f9570cd08286906a050a7c22631775b -Author: Lasse Collin -Date: 2022-06-02 20:27:00 +0300 +commit 785e4121d9b2921ad36bd3af1cf61fa20a9265bd +Author: Jia Tan +Date: 2023-07-24 23:11:45 +0800 - Tests: Include tuktest.h in tests.h. - - This breaks -Werror because none of the tests so far use - tuktest.h and thus there are warnings about unused variables - and functions. + CI: Add Clang64 MSYS2 environment to Windows CI. - tests/tests.h | 47 +++++++++++++++++++++++------------------------ - 1 file changed, 23 insertions(+), 24 deletions(-) + .github/workflows/windows-ci.yml | 1 + + 1 file changed, 1 insertion(+) -commit df71ba1c991f60c3269aaadd398247e632714626 -Author: Lasse Collin -Date: 2022-06-02 20:25:21 +0300 +commit d9166b52cf3458a4da3eb92224837ca8fc208d79 +Author: Jia Tan +Date: 2023-07-24 21:43:44 +0800 - Tests: Add tuktest.h mini-test-framework. + liblzma: Prevent an empty translation unit in Windows builds. + + To workaround Automake lacking Windows resource compiler support, an + empty source file is compiled to overwrite the resource files for static + library builds. Translation units without an external declaration are + not allowed by the C standard and result in a warning when used with + -Wempty-translation-unit (Clang) or -pedantic (GCC). - tests/Makefile.am | 1 + - tests/tuktest.h | 752 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 753 insertions(+) + src/liblzma/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -commit 4773608554d1b684a05ff9c1d879cf5c42266d33 -Author: Lasse Collin -Date: 2022-05-23 21:31:36 +0300 +commit db5019d691f980d622fb56fdcf383af2c3519c98 +Author: Jia Tan +Date: 2023-07-22 18:37:56 +0800 - Build: Enable Automake's parallel test harness. - - It has been the default for quite some time already and - the old serial harness isn't discouraged. The downside is - that with parallel tests one cannot print progress info or - other diagnostics to the terminal; all output from the tests - will be in the log files only. But now that the compression - tests are separated the parallel tests will speed things up. + Translations: Update the Vietnamese translation. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/vi.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) -commit 9a6dd6d46f7f256a5573e5d874c1052033ed7b05 -Author: Lasse Collin -Date: 2022-05-23 21:17:47 +0300 +commit f3a055f762ba5b71b746fc2d44a6ababde2c61b5 +Author: Jia Tan +Date: 2023-07-22 14:55:42 +0800 - Tests: Split test_compress.sh into separate test unit for each file. + CI: Add Windows runner for Autotools builds with MSYS2. - test_compress.sh now takes one command line argument: - a filename to be tested. If it begins with "compress_generated_" - the file will be created with create_compress_files. + Only a subset of the tests run by the Linux and MacOS Autotools builds + are run. The most interesting tests are the ones that disable threads, + encoders, and decoders. - This will allow parallel execution of the slow tests. - - tests/Makefile.am | 11 +++- - tests/test_compress.sh | 91 +++++++++++++++++++--------------- - tests/test_compress_generated_abc | 3 ++ - tests/test_compress_generated_random | 3 ++ - tests/test_compress_generated_text | 3 ++ - tests/test_compress_prepared_bcj_sparc | 3 ++ - tests/test_compress_prepared_bcj_x86 | 3 ++ - 7 files changed, 77 insertions(+), 40 deletions(-) - -commit c7758ac9c734707514dd34f254173ebac5eea7f8 -Author: Lasse Collin -Date: 2022-05-23 20:32:49 +0300 - - Test: Make create_compress_files.c a little more flexible. + The Windows runner will only be run manually since these tests will + likely take much longer than the Linux and MacOS runners. This runner + should be used before merging any large features and before releases. - If a command line argument is given, then only the test file - of that type is created. It's quite dumb in sense that unknown - names don't give an error but it's good enough here. + Currently the clang64 environment fails to due to a warning and + -Werror is enabled for the CI tests. This is still an early version + since the CMake build can be done for MSVC and optionally each of the + MSYS2 environments. GitHub does not allow manually running the CI tests + unless the workflow is checked on the default branch so checking in a + minimum version is a good idea. - Also use EXIT_FAILURE instead of 1 as exit status for errors. - - tests/create_compress_files.c | 25 +++++++++++++++---------- - 1 file changed, 15 insertions(+), 10 deletions(-) - -commit 4a8e4a7b0ad4b03c0ac6862716c3457452cdaf8c -Author: Lasse Collin -Date: 2022-05-23 20:17:42 +0300 - - Tests: Remove unneeded commented lines from test_compress.sh. + Thanks to Arthur S for the original proposing the original patch. + + Closes: https://github.com/tukaani-project/xz/pull/34 - tests/test_compress.sh | 13 ------------- - 1 file changed, 13 deletions(-) + .github/workflows/windows-ci.yml | 119 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 119 insertions(+) -commit 2ee50d150ee009f36135540b459e6ff328549725 -Author: Lasse Collin -Date: 2022-05-23 20:16:00 +0300 +commit 556536a3525df9e5ed78b8c7057991cfa9edfac8 +Author: Jia Tan +Date: 2023-07-21 22:11:01 +0800 - Tests: Remove progress indicator from test_compress.sh. - - It will be useless with Automake's parallel tests. + CI: Add argument to ci_build.sh to pass flags to autogen.sh. - tests/test_compress.sh | 9 --------- - 1 file changed, 9 deletions(-) + build-aux/ci_build.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -commit 2ce4f36f179a81d0c6e182a409f363df759d1ad0 -Author: Lasse Collin -Date: 2022-05-23 19:37:18 +0300 +commit 39a32d36fc465c4e70f13192eea380e518ba6e8a +Author: Jia Tan +Date: 2023-07-21 18:05:44 +0800 - liblzma: Silence a warning. + Tests: Skip .lz files in test_files.sh if not configured. - The actual initialization is done via mythread_sync and seems - that GCC doesn't necessarily see that it gets initialized there. + Previously if the lzip decoder was not configured then test_files.sh + would pass the lzip tests instead of skipping them. - src/liblzma/common/stream_decoder_mt.c | 2 +- + tests/test_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5d8f3764ef43c35910e6d7003c0900a961ef6544 -Author: Lasse Collin -Date: 2022-04-14 20:53:16 +0300 - - xz: Fix build with --disable-threads. - - src/xz/hardware.c | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 1d592897278b172d8549aa29c3a1f3a4f432a9b9 -Author: Lasse Collin -Date: 2022-04-14 14:50:17 +0300 +commit 194d12724b30fe42789d12a0184f9d412c449347 +Author: Jia Tan +Date: 2023-07-20 22:11:13 +0800 - xz: Change the cap of the default -T0 memlimit for 32-bit xz. - - The SIZE_MAX / 3 was 1365 MiB. 1400 MiB gives little more room - and it looks like a round (artificial) number in --info-memory - once --info-memory is made to display it. - - Also, using #if avoids useless code on 64-bit builds. + Tests: Add ARM64 filter test to test_compress.sh. - src/xz/hardware.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + tests/test_compress.sh | 1 + + 1 file changed, 1 insertion(+) -commit c77fe55ddb7752ed0fec46967c5ec9a72632ea0c -Author: Lasse Collin -Date: 2022-04-14 14:20:46 +0300 +commit d850365c444368102c69beaddf849ed463c33467 +Author: Jia Tan +Date: 2023-07-20 20:30:05 +0800 - xz: Add a default soft memory usage limit for --threads=0. - - This is a soft limit in sense that it only affects the number of - threads. It never makes xz fail and it never makes xz change - settings that would affect the compressed output. - - The idea is to make -T0 have more reasonable behavior when - the system has very many cores or when a memory-hungry - compression options are used. This also helps with 32-bit xz, - preventing it from running out of address space. - - The downside of this commit is that now the number of threads - might become too low compared to what the user expected. I - hope this to be an acceptable compromise as the old behavior - has been a source of well-argued complaints for a long time. + Translations: Update the Croatian translation. - src/xz/coder.c | 28 ++++++++++++++++++++++++++-- - src/xz/hardware.c | 38 +++++++++++++++++++++++++++++--------- - src/xz/hardware.h | 27 +++++++++++++++++++++++++++ - 3 files changed, 82 insertions(+), 11 deletions(-) + po/hr.po | 49 ++++++++++++++++++++++++++++++------------------- + 1 file changed, 30 insertions(+), 19 deletions(-) -commit 0adc13bfe32c14f3e4c6ce9f2d4fdf4112ab53f4 -Author: Lasse Collin -Date: 2022-04-14 12:59:09 +0300 +commit 24049eb7acf6d42a60f00efe4e7289fe8e1797fe +Author: Jia Tan +Date: 2023-07-20 20:28:32 +0800 - xz: Make -T0 use multithreaded mode on single-core systems. - - The main problem withi the old behavior is that the compressed - output is different on single-core systems vs. multicore systems. - This commit fixes it by making -T0 one thread in multithreaded mode - on single-core systems. - - The downside of this is that it uses more memory. However, if - --memlimit-compress is used, xz can (thanks to the previous commit) - drop to the single-threaded mode still. + Translations: Update the Korean man page translations. - src/xz/coder.c | 18 +++++++++--------- - src/xz/hardware.c | 14 ++++++++++++++ - src/xz/hardware.h | 4 ++++ - 3 files changed, 27 insertions(+), 9 deletions(-) + po4a/ko.po | 1255 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 626 deletions(-) -commit 898faa97287a756231c663a3ed5165672b417207 -Author: Lasse Collin -Date: 2022-04-14 12:38:00 +0300 +commit 4d4a4fa07de6cb9d913fb2f97712fddda2527b49 +Author: Jia Tan +Date: 2023-07-20 20:25:24 +0800 - xz: Changes to --memlimit-compress and --no-adjust. - - In single-threaded mode, --memlimit-compress can make xz scale down - the LZMA2 dictionary size to meet the memory usage limit. This - obviously affects the compressed output. However, if xz was in - threaded mode, --memlimit-compress could make xz reduce the number - of threads but it wouldn't make xz switch from multithreaded mode - to single-threaded mode or scale down the LZMA2 dictionary size. - This seemed illogical and there was even a "FIXME?" about it. - - Now --memlimit-compress can make xz switch to single-threaded - mode if one thread in multithreaded mode uses too much memory. - If memory usage is still too high, then the LZMA2 dictionary - size can be scaled down too. - - The option --no-adjust was also changed so that it no longer - prevents xz from scaling down the number of threads as that - doesn't affect compressed output (only performance). After - this commit --no-adjust only prevents adjustments that affect - compressed output, that is, with --no-adjust xz won't switch - from multithreaded mode to single-threaded mode and won't - scale down the LZMA2 dictionary size. - - The man page wasn't updated yet. + Translations: Update the Korean translation. - src/xz/coder.c | 63 +++++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 43 insertions(+), 20 deletions(-) + po/ko.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) -commit cad299008cf73ec566f0662a9cf2b94f86a99659 -Author: Lasse Collin -Date: 2022-04-11 22:20:49 +0300 +commit 237f06d9c55cf438a7538a598354bcf103f23711 +Author: Jia Tan +Date: 2023-07-20 20:24:05 +0800 - xz: Add --memlimit-mt-decompress along with a default limit value. - - --memlimit-mt-decompress allows specifying the limit for - multithreaded decompression. This matches memlimit_threading in - liblzma. This limit can only affect the number of threads being - used; it will never prevent xz from decompressing a file. The - old --memlimit-decompress option is still used at the same time. - - If the value of --memlimit-decompress (the default value or - one specified by the user) is less than the value of - --memlimit-mt-decompress , then --memlimit-mt-decompress is - reduced to match --memlimit-decompress. - - Man page wasn't updated yet. + Translations: Update the Polish translation. - src/xz/args.c | 24 +++++++++++++++------- - src/xz/coder.c | 34 ++++++++++--------------------- - src/xz/hardware.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++----- - src/xz/hardware.h | 17 ++++++++++------ - src/xz/message.c | 4 +++- - 5 files changed, 97 insertions(+), 42 deletions(-) + po/pl.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit fe87b4cd5364f5bbb6a75a0299f1500c852d7c9a -Author: Lasse Collin -Date: 2022-04-06 23:11:59 +0300 +commit 80c2c832136656d5ac7a1bca8bc42d95e13d281a +Author: Jia Tan +Date: 2023-07-20 20:22:23 +0800 - liblzma: Threaded decoder: Improve setting of pending_error. - - It doesn't need to be done conditionally. The comments try - to explain it. + Translations: Update the German man page translations. - src/liblzma/common/stream_decoder_mt.c | 51 +++++++++++++++++++++++----------- - 1 file changed, 35 insertions(+), 16 deletions(-) + po4a/de.po | 1255 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 626 deletions(-) -commit 90621da7f6e1bfd6d91d60415eae04b2bca274c2 -Author: Lasse Collin -Date: 2022-04-06 12:39:49 +0300 +commit fdbde14503ca03069d3649aa51926f5f796b89d8 +Author: Jia Tan +Date: 2023-07-20 20:18:44 +0800 - liblzma: Add a new flag LZMA_FAIL_FAST for threaded decoder. - - In most cases if the input file is corrupt the application won't - care about the uncompressed content at all. With this new flag - the threaded decoder will return an error as soon as any thread - has detected an error; it won't wait to copy out the data before - the location of the error. - - I don't plan to use this in xz to keep the behavior consistent - between single-threaded and multi-threaded modes. + Translations: Update the German translation. - src/liblzma/api/lzma/container.h | 25 ++++++++++++++++- - src/liblzma/common/common.h | 7 +++-- - src/liblzma/common/stream_decoder_mt.c | 50 +++++++++++++++++++--------------- - 3 files changed, 56 insertions(+), 26 deletions(-) + po/de.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit 64b6d496dc815a176d8307f418f6834a26783484 -Author: Lasse Collin -Date: 2022-04-05 12:24:57 +0300 +commit 9f3bf5ff5b2b5cf0b252a2bf381238ca49dc4101 +Author: Jia Tan +Date: 2023-07-20 20:17:10 +0800 - liblzma: Threaded decoder: Always wait for output if LZMA_FINISH is used. - - This makes the behavior consistent with the single-threaded - decoder when handling truncated .xz files. - - Thanks to Jia Tan for finding this issue. + Translations: Update the Chinese (simplified) translation. - src/liblzma/common/stream_decoder_mt.c | 26 ++++++++++++++++++++++++-- - 1 file changed, 24 insertions(+), 2 deletions(-) + po/zh_CN.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit e671bc8828b9c0c5406c3a22c541301d0eb54518 -Author: Lasse Collin -Date: 2022-04-02 21:49:59 +0300 +commit 376938c588011567c74f1d5a160c0ccce6336d46 +Author: Jia Tan +Date: 2023-07-20 20:15:47 +0800 - liblzma: Threaded decoder: Support zpipe.c-style decoding loop. - - This makes it possible to call lzma_code() in a loop that only - reads new input when lzma_code() didn't fill the output buffer - completely. That isn't the calling style suggested by the - liblzma example program 02_decompress.c so perhaps the usefulness - of this feature is limited. - - Also, it is possible to write such a loop so that it works - with the single-threaded decoder but not with the threaded - decoder even after this commit, or so that it works only if - lzma_mt.timeout = 0. - - The zlib tutorial is a well-known - example of a loop where more input is read only when output isn't - full. Porting this as is to liblzma would work with the - single-threaded decoder (if LZMA_CONCATENATED isn't used) but it - wouldn't work with threaded decoder even after this commit because - the loop assumes that no more output is possible when it cannot - read more input ("if (strm.avail_in == 0) break;"). This cannot - be fixed at liblzma side; the loop has to be modified at least - a little. - - I'm adding this in any case because the actual code is simple - and short and should have no harmful side-effects in other - situations. + Translations: Update the Swedish translation. - src/liblzma/common/stream_decoder_mt.c | 77 +++++++++++++++++++++++++++++----- - 1 file changed, 67 insertions(+), 10 deletions(-) + po/sv.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit 2ba8173e27be4793edb46497e499ac2ae753a316 -Author: Lasse Collin -Date: 2022-03-31 00:05:07 +0300 +commit 26b0bc6eb82c84559936a7c7080de5c71c8276f8 +Author: Jia Tan +Date: 2023-07-20 20:14:00 +0800 - Update THANKS. + Translations: Update the Ukrainian man page translations. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po4a/uk.po | 1253 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 628 insertions(+), 625 deletions(-) -commit 69d1b3fc29677af8ade8dc15dba83f0589cb63d6 -Author: Lasse Collin -Date: 2022-03-29 19:19:12 +0300 +commit 2d02c8b7640b54f3c5aa1c8b5990ba56f322393b +Author: Jia Tan +Date: 2023-07-20 20:09:15 +0800 - xzgrep: Fix escaping of malicious filenames (ZDI-CAN-16587). - - Malicious filenames can make xzgrep to write to arbitrary files - or (with a GNU sed extension) lead to arbitrary code execution. - - xzgrep from XZ Utils versions up to and including 5.2.5 are - affected. 5.3.1alpha and 5.3.2alpha are affected as well. - This patch works for all of them. - - This bug was inherited from gzip's zgrep. gzip 1.12 includes - a fix for zgrep. - - The issue with the old sed script is that with multiple newlines, - the N-command will read the second line of input, then the - s-commands will be skipped because it's not the end of the - file yet, then a new sed cycle starts and the pattern space - is printed and emptied. So only the last line or two get escaped. - - One way to fix this would be to read all lines into the pattern - space first. However, the included fix is even simpler: All lines - except the last line get a backslash appended at the end. To ensure - that shell command substitution doesn't eat a possible trailing - newline, a colon is appended to the filename before escaping. - The colon is later used to separate the filename from the grep - output so it is fine to add it here instead of a few lines later. - - The old code also wasn't POSIX compliant as it used \n in the - replacement section of the s-command. Using \ is the - POSIX compatible method. - - LC_ALL=C was added to the two critical sed commands. POSIX sed - manual recommends it when using sed to manipulate pathnames - because in other locales invalid multibyte sequences might - cause issues with some sed implementations. In case of GNU sed, - these particular sed scripts wouldn't have such problems but some - other scripts could have, see: - - info '(sed)Locale Considerations' - - This vulnerability was discovered by: - cleemy desu wayo working with Trend Micro Zero Day Initiative - - Thanks to Jim Meyering and Paul Eggert discussing the different - ways to fix this and for coordinating the patch release schedule - with gzip. + Translations: Update the Ukrainian translation. - src/scripts/xzgrep.in | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) + po/uk.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) -commit bd93b776c1bd15e90661033c918cdeb354dbcc38 -Author: Lasse Collin -Date: 2022-03-26 01:02:44 +0200 +commit f881018b503fd334331c24a09075429558abbce1 +Author: Jia Tan +Date: 2023-07-20 20:06:57 +0800 - liblzma: Fix a deadlock in threaded decoder. - - If a worker thread has consumed all input so far and it's - waiting on thr->cond and then the main thread enables - partial update for that thread, the code used to deadlock. - This commit allows one dummy decoding pass to occur in this - situation which then also does the partial update. - - As part of the fix, this moves thr->progress_* updates to - avoid the second thr->mutex locking. - - Thanks to Jia Tan for finding, debugging, and reporting the bug. + Translations: Update the Spanish translation. - src/liblzma/common/stream_decoder_mt.c | 71 +++++++++++++++++++++++++--------- - 1 file changed, 52 insertions(+), 19 deletions(-) + po/es.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) -commit e0394e94230f208682ac1e1f4c41f22f9ad79916 -Author: Lasse Collin -Date: 2022-03-23 16:34:00 +0200 +commit 791fe6d3ffd6877fa5f852be69d9251397dfaa31 +Author: Jia Tan +Date: 2023-07-20 20:05:19 +0800 - Update THANKS. + Translations: Update the Romanian translation. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/ro.po | 48 ++++++++++++++++++++++++++++++------------------ + 1 file changed, 30 insertions(+), 18 deletions(-) -commit 487c77d48760564b1949c5067630b675b87be4de -Author: Lasse Collin -Date: 2022-03-23 16:28:55 +0200 +commit 8827e90704f699fe08bb5bed56b1717a2bc0eb77 +Author: Jia Tan +Date: 2023-07-20 20:02:56 +0800 - liblzma: Threaded decoder: Don't stop threads on LZMA_TIMED_OUT. - - LZMA_TIMED_OUT is not an error and thus stopping threads on - LZMA_TIMED_OUT breaks the decoder badly. - - Thanks to Jia Tan for finding the bug and for the patch. + Translations: Update the Romanian man page translations. - src/liblzma/common/stream_decoder_mt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po4a/ro.po | 1254 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 625 deletions(-) -commit 6c6da57ae2aa962aabde6892442227063d87e88c -Author: Lasse Collin -Date: 2022-03-07 00:36:16 +0200 +commit 0184d344fa4f215cd345bb131db9068e077c69b8 +Author: Jia Tan +Date: 2023-07-19 23:36:00 +0800 - xz: Add initial support for threaded decompression. + liblzma: Suppress -Wunused-function warning. - If threading support is enabled at build time, this will - use lzma_stream_decoder_mt() even for single-threaded mode. - With memlimit_threading=0 the behavior should be identical. + Clang 16.0.0 and earlier have a bug that the ifunc resolver function + triggers the -Wunused-function warning. The resolver function is static + and only "used" by the __attribute__((__ifunc()__)). - This needs some work like adding --memlimit-threading=LIMIT. + At this time, the bug is still unresolved, but has been reported: + https://github.com/llvm/llvm-project/issues/63957 - The original patch from Sebastian Andrzej Siewior included - a method to get currently available RAM on Linux. It might - be one way to go but as it is Linux-only, the available-RAM - approach needs work for portability or using a fallback method - on other OSes. - - The man page wasn't updated yet. + This is not a problem in GCC. - src/xz/coder.c | 36 +++++++++++++++++++++++++++++++++++- - 1 file changed, 35 insertions(+), 1 deletion(-) + src/liblzma/check/crc64_fast.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 4cce3e27f529af33e0e7749a8cbcec59954946b5 -Author: Lasse Collin -Date: 2022-03-06 23:36:20 +0200 +commit 43845fa70fc751736c44c18f4cee42d49bfd1392 +Author: Jia Tan +Date: 2023-07-18 22:52:25 +0800 - liblzma: Add threaded .xz decompressor. - - I realize that this is about a decade late. + liblzma: Reword lzma_str_list_filters() documentation. - Big thanks to Sebastian Andrzej Siewior for the original patch. - I made a bunch of smaller changes but after a while quite a few - things got rewritten. So any bugs in the commit were created by me. + This further improves the documentation from commit + f36ca7982f6bd5e9827219ed4f3c5a1fbf5d7bdf. The previous wording of + "supported options" was slightly misleading since the options that are + printed are the ones that are relevant for encoding/decoding. It is not + about which options can or must be specified. - src/liblzma/api/lzma/container.h | 90 +- - src/liblzma/common/Makefile.inc | 5 + - src/liblzma/common/common.h | 4 + - src/liblzma/common/stream_decoder_mt.c | 1814 ++++++++++++++++++++++++++++++++ - src/liblzma/liblzma.map | 1 + - 5 files changed, 1907 insertions(+), 7 deletions(-) + src/liblzma/api/lzma/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 717631b9788dc9c100ee0c87d3c14a2782638ff4 -Author: Lasse Collin -Date: 2022-03-06 16:54:23 +0200 +commit 818701ba1c9dff780b7fbf28f9ab8eb11a25dd67 +Author: Jia Tan +Date: 2023-07-18 22:49:57 +0800 - liblzma: Fix docs: lzma_block_decoder() cannot return LZMA_UNSUPPORTED_CHECK. + liblzma: Improve comment in string_conversion.c. - If Check is unsupported, it will be silently ignored. - It's the caller's job to handle it. + The comment used "flag" when referring to decoder options. Just + referring to them as options is more clear and consistent. - src/liblzma/api/lzma/block.h | 3 --- - 1 file changed, 3 deletions(-) + src/liblzma/common/string_conversion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 1a4bb97a00936535e30ac61945aeee38882b5d1a +commit b6b7d065853cd4c3f5b8d9be8aea0b6dcb0fe090 Author: Lasse Collin -Date: 2022-03-06 16:41:19 +0200 +Date: 2023-07-18 17:37:33 +0300 - liblzma: Add new output queue (lzma_outq) features. - - Add lzma_outq_clear_cache2() which may leave one buffer allocated - in the cache. - - Add lzma_outq_outbuf_memusage() to get the memory needed for - a single lzma_outbuf. This is now used internally in outqueue.c too. - - Track both the total amount of memory allocated and the amount of - memory that is in active use (not in cache). - - In lzma_outbuf, allow storing the current input position that - matches the current output position. This way the main thread - can notice when no more output is possible without first providing - more input. + xz: Translate the second "%s: " in message.c since French needs "%s : ". - Allow specifying return code for lzma_outq_read() in a finished - lzma_outbuf. + This string is used to print a filename when using "xz -v" and + stderr isn't a terminal. - src/liblzma/common/outqueue.c | 43 +++++++++++++++++++++++++++++++++++------- - src/liblzma/common/outqueue.h | 44 ++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 79 insertions(+), 8 deletions(-) + src/xz/message.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit ddbc6f58c2de388eed24cd7ea91b523d397da5f4 +commit be644042c3066d8e7a2834f989671ba74d27f749 Author: Lasse Collin -Date: 2022-03-06 15:18:58 +0200 +Date: 2023-07-18 14:35:33 +0300 - liblzma: Index hash: Change return value type of hash_append() to void. + xz: Make "%s: %s" translatable because French needs "%s : %s". - src/liblzma/common/index_hash.c | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) + src/xz/args.c | 5 ++++- + src/xz/coder.c | 8 ++++---- + src/xz/file_io.c | 8 ++++---- + src/xz/list.c | 11 ++++++----- + 4 files changed, 18 insertions(+), 14 deletions(-) -commit 20e7a33e2d59c6a814447d3991f21e2702174b20 +commit 97fd5cb669ee0afc48d2087675ab166aff89eaa2 Author: Lasse Collin -Date: 2022-02-22 03:42:57 +0200 +Date: 2023-07-18 13:57:54 +0300 - liblzma: Minor addition to lzma_vli_size() API doc. + liblzma: Tweak #if condition in memcmplen.h. - Thanks to Jia Tan. + Maybe ICC always #defines _MSC_VER on Windows but now + it's very clear which code will get used. - src/liblzma/api/lzma/vli.h | 2 ++ - 1 file changed, 2 insertions(+) + src/liblzma/common/memcmplen.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 4f78f5fcf63592f2d77e921cfe0d5de300867374 +commit 40392c19f71985852d75997f109dea97177d6f3f Author: Lasse Collin -Date: 2022-02-22 02:04:18 +0200 +Date: 2023-07-18 13:49:43 +0300 - liblzma: Check the return value of lzma_index_append() in threaded encoder. - - If lzma_index_append() failed (most likely memory allocation failure) - it could have gone unnoticed and the resulting .xz file would have - an incorrect Index. Decompressing such a file would produce the - correct uncompressed data but then an error would occur when - verifying the Index field. + liblzma: Omit unnecessary parenthesis in a preprocessor directive. - src/liblzma/common/stream_encoder_mt.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/liblzma/common/memcmplen.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 5313ad66b40aab822ddca3e9905254cb99a4080d -Author: Lasse Collin -Date: 2022-02-22 01:37:39 +0200 +commit abc1d5601b7e419ebc28a1ab4b268613b52e6f98 +Author: Jia Tan +Date: 2023-07-18 00:51:48 +0800 - Update THANKS. + xz: Update Authors list in a few files. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/args.c | 3 ++- + src/xz/args.h | 3 ++- + src/xz/coder.c | 3 ++- + src/xz/coder.h | 3 ++- + src/xz/message.c | 3 ++- + 5 files changed, 10 insertions(+), 5 deletions(-) -commit 865e0a3689a25a7ee8eecae1a34c1775e3aa676e -Author: Ed Maste -Date: 2022-02-11 15:25:46 +0000 +commit 289034a168878baa9df6ff6e159110aade69cba5 +Author: Jia Tan +Date: 2023-07-14 23:20:33 +0800 - liblzma: Use non-executable stack on FreeBSD as on Linux + Docs: Add a new section to INSTALL for Tests. + + The new Tests section describes basic information about the tests, how + to run them, and important details when cross compiling. We have had a + few questions about how to compile the tests without running them, so + hopefully this information will help others with the same question in the + future. + + Fixes: https://github.com/tukaani-project/xz/issues/54 - src/liblzma/check/crc32_x86.S | 4 ++-- - src/liblzma/check/crc64_x86.S | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + INSTALL | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 64 insertions(+), 17 deletions(-) -commit 1c9a5786d206b4abc8e427326651c8174baea753 -Author: Lasse Collin -Date: 2022-02-20 20:36:27 +0200 +commit 1119e5f5a519b0ab71c81fc4dc84c0cc72abe513 +Author: Jia Tan +Date: 2023-07-14 21:10:27 +0800 - liblzma: Make Block decoder catch certain types of errors better. - - Now it limits the input and output buffer sizes that are - passed to a raw decoder. This way there's no need to check - if the sizes can grow too big or overflow when updating - Compressed Size and Uncompressed Size counts. This also means - that a corrupt file cannot cause the raw decoder to process - useless extra input or output that would exceed the size info - in Block Header (and thus cause LZMA_DATA_ERROR anyway). - - More importantly, now the size information is verified more - carefully in case raw decoder returns LZMA_OK. This doesn't - really matter with the current single-threaded .xz decoder - as the errors would be detected slightly later anyway. But - this helps avoiding corner cases in the upcoming threaded - decompressor, and it might help other Block decoder uses - outside liblzma too. + Docs: Update README. - The test files bad-1-lzma2-{9,10,11}.xz test these conditions. - With the single-threaded .xz decoder the only difference is - that LZMA_DATA_ERROR is detected in a difference place now. + This adds an entry to "Other implementations of the .xz format" for + XZ for Java. - src/liblzma/common/block_decoder.c | 79 ++++++++++++++++++++++++++------------ - 1 file changed, 54 insertions(+), 25 deletions(-) + README | 4 ++++ + 1 file changed, 4 insertions(+) -commit 555de11873eb00c9b94a8be70645db502e5a9dbd -Author: Lasse Collin -Date: 2022-02-20 19:38:55 +0200 +commit f99e2e4e53b7ea89e4eef32ddd4882e0416357c9 +Author: Jia Tan +Date: 2023-07-13 23:32:10 +0800 - Tests: Add bad-1-lzma2-11.xz. + xz: Fix typo in man page. + + The Memory limit information section described three output + columns when it actually has six. This was reworded to + "multiple" to make it more future proof. - tests/files/README | 5 +++++ - tests/files/bad-1-lzma2-11.xz | Bin 0 -> 64 bytes - 2 files changed, 5 insertions(+) + src/xz/xz.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f0da507f22e7f4e3edb75b45b74d344244ca03fb -Author: Lasse Collin -Date: 2022-02-18 18:51:10 +0200 +commit f907705eb1f6c5edaafc9668a34c51a989932f1d +Author: Jia Tan +Date: 2023-07-13 21:46:12 +0800 - Translations: Fix po4a failure with the French man page translations. + xz: Minor clean up for coder.c - Thanks to Mario Blättermann for the patch. + * Moved max_block_list_size from a global to local variable. + * Reworded error message in validate_block_list_filter(). + * Removed helper function filter_chain_error(). + * Changed 1 << X to 1U << X in many places - po4a/fr_FR.po | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + src/xz/coder.c | 53 +++++++++++++++++++++-------------------------------- + 1 file changed, 21 insertions(+), 32 deletions(-) -commit f7711d228c3c32395460c82498c60a9f730d0239 -Author: Lasse Collin -Date: 2022-02-07 01:14:37 +0200 +commit 9adc9e56157ecbf2948e5036df8567809b9ae177 +Author: Jia Tan +Date: 2023-07-13 21:26:47 +0800 - Translations: Add French translation of man pages. - - This matches xz-utils 5.2.5-2 in Debian. - - The translation was done by "bubu", proofread by the debian-l10n-french - mailing list contributors, and submitted to me on the xz-devel mailing - list by Jean-Pierre Giraud. Thanks to everyone! + xz: Update man page Authors and date. - po4a/fr_FR.po | 3541 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po4a/po4a.conf | 2 +- - 2 files changed, 3542 insertions(+), 1 deletion(-) + src/xz/xz.1 | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 6468f7e41a8e9c611e4ba8d34e2175c5dacdbeb4 -Author: jiat75 -Date: 2022-01-28 20:47:55 +0800 +commit c12e429f2635da8d8f5749e5f733f451baca6945 +Author: Jia Tan +Date: 2023-06-20 20:32:59 +0800 - liblzma: Add NULL checks to LZMA and LZMA2 properties encoders. - - Previously lzma_lzma_props_encode() and lzma_lzma2_props_encode() - assumed that the options pointers must be non-NULL because the - with these filters the API says it must never be NULL. It is - good to do these checks anyway. + xz: Add a section to man page for robot mode --filters-help. - src/liblzma/lzma/lzma2_encoder.c | 3 +++ - src/liblzma/lzma/lzma_encoder.c | 3 +++ - 2 files changed, 6 insertions(+) + src/xz/xz.1 | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) -commit 2523c30705f49eabd27b854aa656ae87cc224808 -Author: Lasse Collin -Date: 2022-02-06 23:19:32 +0200 +commit e10f2db5d10300c16fa482a136ed31c1aa6e8e8d +Author: Jia Tan +Date: 2023-06-19 23:11:41 +0800 - liblzma: Fix uint64_t vs. size_t confusion. - - This broke 32-bit builds due to a pointer type mismatch. - - This bug was introduced with the output-size-limited encoding - in 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c. + xz: Slight reword in xz man page for consistency. - Thanks to huangqinjin for the bug report. + Changed will print => prints in xz --robot --version description to + match --robot --info-memory description. - src/liblzma/rangecoder/range_encoder.h | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) + src/xz/xz.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 2bd36c91d03e03b31a4f12fd0afc100ae32d66e2 -Author: huangqinjin -Date: 2021-12-13 20:49:21 +0800 +commit f5dc172a402fa946f3c45a16929d7fe14c9f5e81 +Author: Jia Tan +Date: 2023-06-19 23:07:10 +0800 - CMake: Keep compatible with Windows 95 for 32-bit build. + xz: Reorder robot mode subsections in the man page. + + The order is now consistent with the order the command line arguments + are documented earlier in the man page. The new order is: + 1. --list + 2. --info-memory + 3. --version + + Instead of the previous order: + 1. --version + 2. --info-memory + 3. --list - CMakeLists.txt | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + src/xz/xz.1 | 192 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 96 insertions(+), 96 deletions(-) -commit 2024fbf2794885277d05378d40b2b8015a7c3b40 -Author: Lasse Collin -Date: 2021-11-13 21:04:05 +0200 +commit 9628be23aef2784249fd9f3199799d785d2ec5cc +Author: Jia Tan +Date: 2023-05-13 00:46:50 +0800 - xzgrep: Update man page timestamp. + xz: Update man page for new --filters-help option. - src/scripts/xzgrep.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/xz.1 | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 400e7a239a53282cedaad927a41f3463d7f542e5 -Author: Lasse Collin -Date: 2021-11-13 18:23:24 +0200 +commit a165d7df1964121eb9df715e6f836a31c865beef +Author: Jia Tan +Date: 2023-05-13 00:44:41 +0800 - Update THANKS. + xz: Add a new --filters-help option. + + The --filters-help can be used to help create filter chains with the + --filters and --filtersX options. The message in --long-help is too + short to fully explain the syntax to construct complex filter chains. + + In --robot mode, xz will only print the output from liblzma function + lzma_str_list_filters. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/args.c | 8 ++++++++ + src/xz/message.c | 30 ++++++++++++++++++++++++++++++ + src/xz/message.h | 5 +++++ + 3 files changed, 43 insertions(+) -commit 3a512c7787b2642ca946f4adc6e9a0a5d9b0d5a0 -Author: Ville Skyttä -Date: 2021-11-13 10:11:57 +0200 +commit 95f1a414b156ee35d3e71862a14915fdd138f913 +Author: Jia Tan +Date: 2023-04-21 20:28:11 +0800 - xzgrep: use `grep -E/-F` instead of `egrep` and `fgrep` + xz: Update the man page for --block-list and --filtersX - `egrep` and `fgrep` have been deprecated in GNU grep since 2007, and in - current post 3.7 Git they have been made to emit obsolescence warnings: - https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 + The --block-list option description needed updating since the new + --filtersX option changes how it can be used. The new entry for + --filters1=FILTERS ... --filter9=FILTERS was created right after + the --filters option. - src/scripts/xzgrep.1 | 8 ++++---- - src/scripts/xzgrep.in | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) + src/xz/xz.1 | 106 +++++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 80 insertions(+), 26 deletions(-) -commit edf525e2b1840dcaf377df472c67d8f11f8ace1b -Author: Lasse Collin -Date: 2021-10-28 23:02:11 +0300 +commit 47a63cad2aa778280e0c1926b7159427ea028cb1 +Author: Jia Tan +Date: 2023-04-21 19:50:14 +0800 - Bump the version number for 5.3.2alpha. + xz: Update --long-help for the new --filtersX option. - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xz/message.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) -commit ea8c948655a86290524efe59cff067e06a886709 -Author: Lasse Collin -Date: 2021-10-28 22:59:52 +0300 +commit 8b9913a13daca2550d02dfdcdc9be15f55ca4d13 +Author: Jia Tan +Date: 2023-06-17 20:46:21 +0800 - Add NEWS for 5.3.2alpha. + xz: Ignore filter chains that are set but never used in --block-list. + + If a filter chain is set but not used in --block-list, it introduced + unexpected behavior such as requiring an unneeded amount of memory to + compress, reducing the number of threads in multi-threaded encoding, and + printing an incorrect amount of memory needed to decompress. + + This also renames filters_init_mask => filters_used_mask. A filter is + assumed to be used if it is specified in --filtersX until + coder_set_compression_settings() determines which filters are referenced + in --block-list. - NEWS | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 86 insertions(+) + src/xz/coder.c | 66 ++++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 48 insertions(+), 18 deletions(-) -commit 52435f302f4724157ec50b4210cbe42b285c3cbc -Author: Lasse Collin -Date: 2021-10-27 23:27:48 +0300 +commit 183819bfd9efac8c184d9bf123325719b7eee30f +Author: Jia Tan +Date: 2023-05-13 20:11:13 +0800 - Update THANKS. + xz: Set the Block size for mt encoding correctly. + + When opt_block_size is not used, the Block size for mt encoder is + derived from the minimum of the largest Block specified by + --block-list and the recommended Block size on all filter chains + calculated by lzma_mt_block_size(). This avoids using unnecessary + memory and ensures that all Blocks are large enough for the most memory + needy filter chain. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 67 insertions(+), 1 deletion(-) -commit f2aea1d5a504b2021bf47a238390e4f12bdd518d -Author: Lasse Collin -Date: 2021-10-27 23:23:11 +0300 +commit afb2dbec3d857b026486b75e42a4728e12d234cb +Author: Jia Tan +Date: 2023-05-11 00:09:41 +0800 - xz: Change the coding style of the previous commit. - - It isn't any better now but it's consistent with - the rest of the code base. + xz: Validate --flush-timeout for all specified filter chains. - src/xz/file_io.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) + src/xz/coder.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) -commit 892b16cc282f5b4e1c49871b326f4db25c5b4d81 -Author: Alexander Bluhm -Date: 2021-10-05 23:33:16 +0200 +commit 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a +Author: Jia Tan +Date: 2023-05-13 19:54:33 +0800 - xz: Avoid fchown(2) failure. - - OpenBSD does not allow to change the group of a file if the user - does not belong to this group. In contrast to Linux, OpenBSD also - fails if the new group is the same as the old one. Do not call - fchown(2) in this case, it would change nothing anyway. + xz: Allows --block-list filters to scale down memory usage. - This fixes an issue with Perl Alien::Build module. - https://github.com/PerlAlien/Alien-Build/issues/62 + Previously, only the default filter chain could have its memory usage + adjusted. The filter chains specified with --filtersX were not checked + for memory usage. Now, all used filter chains will be adjusted if + necessary. - src/xz/file_io.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + src/xz/coder.c | 269 +++++++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 214 insertions(+), 55 deletions(-) -commit 2b509c868cae3988bf21cd693fbf9021cdc85628 -Author: Lasse Collin -Date: 2021-09-17 17:31:11 +0300 +commit 479fd58d60622331fcbe48fddf756927b9f80d9a +Author: Jia Tan +Date: 2023-05-10 21:50:33 +0800 - liblzma: Fix liblzma.map for the lzma_microlzma_* symbols. - - This should have been part of d267d109c370a40b502e73f8664b154b15e4f253. + xz: Do not include block splitting if encoders are disabled. - Thanks to Gao Xiang. + The block splitting logic and split_block() function are not needed if + encoders are disabled. This will help slightly reduce the binary size + when built without encoders and allow split_block() to use functions + that require encoders being enabled. - src/liblzma/liblzma.map | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/xz/coder.c | 29 ++++++++++++++++++++--------- + 1 file changed, 20 insertions(+), 9 deletions(-) -commit cacb06a954b58255dfc084a0bc9708f43a0fd6d6 -Author: Lasse Collin -Date: 2021-09-09 22:21:07 +0300 +commit f86ede22500f7ae024ec3ec3f3489ab5a857a3b3 +Author: Jia Tan +Date: 2023-05-10 22:38:59 +0800 - Update THANKS. + xz: Free filters[] in debug mode. + + This will only free filter chains created with --filters1-9 since the + default filter chain may be set from a static function variable. The + complexity to free the default filter chain is not worth the burden on + code maintenance. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 6928aac9da6ba612780b9f72ba1d6ecbe1e8b54e -Author: Lasse Collin -Date: 2021-09-09 21:41:51 +0300 +commit f281cd0d692ac0c70fc7669b80dddb863ea947e1 +Author: Jia Tan +Date: 2023-05-13 19:28:23 +0800 - liblzma: Use _MSVC_LANG to detect when "noexcept" can be used with MSVC. - - By default, MSVC always sets __cplusplus to 199711L. The real - C++ standard version is available in _MSVC_LANG (or one could - use /Zc:__cplusplus to set __cplusplus correctly). - - Fixes . + xz: Add a message if --block-list is used outside of xz compresssion. - Thanks to Dan Weiss. + --block-list is only supported with compression in xz format. This avoids + silently ignoring when --block-list is unused. - src/liblzma/api/lzma.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/xz/args.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit d267d109c370a40b502e73f8664b154b15e4f253 -Author: Lasse Collin -Date: 2021-09-05 20:38:12 +0300 +commit d6af7f347077b22403133239592e478931307759 +Author: Jia Tan +Date: 2023-04-18 20:29:09 +0800 - liblzma: Rename EROFS LZMA to MicroLZMA. + xz: Create command line options for filters[1-9]. - It still exists primarily for EROFS but MicroLZMA is - a more generic name (that hopefully doesn't clash with - something that already exists). + The new command line options are meant to be combined with --block-list. + They work as an optional extension to --block-list to specify a custom + filter chain for each block listed. The new options allow the creation + of up to 9 reusable filter chains. For instance: + + xz --block-list=1:10MiB,3:5MiB,,2:5MiB,1:0 --filters1=delta--lzma2 \ + --filters2=x86--lzma2 --filters3=arm64--lzma2 + + Will create the following blocks: + 1. A block of size 10 MiB with filter chain delta, lzma2. + 2. A block of size 5 MiB with filter chain arm64, lzma2. + 3. A block of size 5 MiB with filter chain arm64, lzma2. + 4. A block of size 5 MiB with filter chain x86, lzma2. + 5. A block containing the rest of the file contents with filter chain + delta, lzma2. - src/liblzma/api/lzma/container.h | 33 +++++++++++++--------- - src/liblzma/common/Makefile.inc | 4 +-- - .../{erofs_decoder.c => microlzma_decoder.c} | 32 ++++++++++----------- - .../{erofs_encoder.c => microlzma_encoder.c} | 30 ++++++++++---------- - 4 files changed, 52 insertions(+), 47 deletions(-) + src/xz/args.c | 82 ++++++++++++++++++++++--- + src/xz/coder.c | 188 ++++++++++++++++++++++++++++++++++++++++++--------------- + src/xz/coder.h | 20 +++++- + 3 files changed, 230 insertions(+), 60 deletions(-) -commit 3247e95115acb95bc27f41e8cf4501db5b0b4309 -Author: Lasse Collin -Date: 2021-06-04 19:02:38 +0300 +commit 072d29250113268536719ad0e040ab8a66fb6435 +Author: Jia Tan +Date: 2023-05-13 19:36:09 +0800 - xzdiff: Update the man page about the exit status. + xz: Use lzma_filters_free() in forget_filter_chain(). - This was forgotten from 194029ffaf74282a81f0c299c07f73caca3232ca. + This is a little cleaner than the previous implementation of + forget_filter_chain(). It is also more consistent since + lzma_str_to_filters() will always terminate the filter chain so there + is no need to terminate it later in coder_set_compression_settings(). - src/scripts/xzdiff.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/xz/coder.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) -commit 96f5a28a46fc93ac4e296808ac0f8631d05498bc -Author: Lasse Collin -Date: 2021-06-04 18:52:48 +0300 +commit 3d21da5cff4b511633cb6e0d8a1090485c0c1059 +Author: Jia Tan +Date: 2023-04-17 22:22:45 +0800 - xzless: Fix less(1) version detection when it contains a dot. + xz: Separate string to filter conversion into a helper function. - Sometimes the version number from "less -V" contains a dot, - sometimes not. xzless failed detect the version number when - it does contain a dot. This fixes it. - - Thanks to nick87720z for reporting this. Apparently it had been - reported here in 2013. + Converting from string to filter will also need to be done for block + specific filter chains. - src/scripts/xzless.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/coder.c | 33 ++++++++++++++++++++------------- + 1 file changed, 20 insertions(+), 13 deletions(-) -commit 5fb5212d816addbc523d0798cb482fdd0484f8fa -Author: Lasse Collin -Date: 2021-04-11 19:58:10 +0300 +commit a6583726e5f950278f96abcf79c04f1056810be6 +Author: Jia Tan +Date: 2023-01-06 00:03:35 +0800 - Update THANKS. + Tests: Use new --filters option in test_compress.sh - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + tests/test_compress.sh | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) -commit fc3d3a7296ef58bb799a73943636b8bfd95339f7 -Author: Ivan A. Melnikov -Date: 2021-04-09 11:45:10 +0300 +commit 5f3b898d07cc9b7160c7c88b3120b7edabb8a5b0 +Author: Jia Tan +Date: 2023-01-06 00:03:06 +0800 - Reduce maximum possible memory limit on MIPS32 - - Due to architectural limitations, address space available to a single - userspace process on MIPS32 is limited to 2 GiB, not 4, even on systems - that have more physical RAM -- e.g. 64-bit systems with 32-bit - userspace, or systems that use XPA (an extension similar to x86's PAE). - - So, for MIPS32, we have to impose stronger memory limits. I've chosen - 2000MiB to give the process some headroom. + xz: Update --long-help and man page for new --filters option. - src/xz/hardware.c | 6 ++++++ - 1 file changed, 6 insertions(+) + src/xz/message.c | 6 ++++++ + src/xz/xz.1 | 41 ++++++++++++++++++++++++++++++++++++----- + 2 files changed, 42 insertions(+), 5 deletions(-) -commit e7da44d5151e21f153925781ad29334ae0786101 -Author: Lasse Collin -Date: 2021-02-13 23:31:27 +0200 +commit 9ded880a0221f4d1256845fc4ab957ffd377c760 +Author: Jia Tan +Date: 2023-01-06 00:02:29 +0800 - CMake: Use interface library for better FindLibLZMA compatibility. - - https://www.mail-archive.com/xz-devel@tukaani.org/msg00446.html + xz: Add --filters option to CLI. - Thanks to Markus Rickert. + The --filters option uses the new lzma_str_to_filters() function + to convert a string into a full filter chain. Using this option + will reset all previous filters set by --preset, --[filter], or + --filters. - CMakeLists.txt | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) + src/xz/args.c | 9 +++++++-- + src/xz/coder.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- + src/xz/coder.h | 3 +++ + 3 files changed, 58 insertions(+), 4 deletions(-) -commit a61dd82ada39030f41b4ffca9ea551714908bedc -Author: Lasse Collin -Date: 2021-01-30 18:36:04 +0200 +commit 2c189bb00af73dc7ba1a67a9d274d5be03ee3a88 +Author: Jia Tan +Date: 2023-07-14 21:30:25 +0800 - CMake: Try to improve compatibility with the FindLibLZMA module. - - The naming conflict with FindLibLZMA module gets worse. - Not avoiding it in the first place was stupid. - - Normally find_package(LibLZMA) will use the module and - find_package(liblzma 5.2.5 REQUIRED CONFIG) will use the config - file even with a case insensitive file system. However, if - CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE and the file system - is case insensitive, find_package(LibLZMA) will find our liblzma - config file instead of using FindLibLZMA module. - - One big problem with this is that FindLibLZMA uses - LibLZMA::LibLZMA and we use liblzma::liblzma as the target - name. With target names CMake happens to be case sensitive. - To workaround this, this commit adds - - add_library(LibLZMA::LibLZMA ALIAS liblzma::liblzma) - - to the config file. Then both spellings work. - - To make the behavior consistent between case sensitive and - insensitive file systems, the config and related files are - renamed from liblzmaConfig.cmake to liblzma-config.cmake style. - With this style CMake looks for lowercase version of the package - name so find_package(LiBLzmA 5.2.5 REQUIRED CONFIG) will work - to find our config file. - - There are other differences between our config file and - FindLibLZMA so it's still possible that things break for - reasons other than the spelling of the target name. Hopefully - those situations aren't too common. + Tests: Improve feature testing for skipping. - When the config file is available, it should always give as good or - better results as FindLibLZMA so this commit doesn't affect the - recommendation to use find_package(liblzma 5.2.5 REQUIRED CONFIG) - which explicitly avoids FindLibLZMA. + Fixed a bug where test_compress_* would all fail if arm64 or armthumb + filters were enabled for compression but arm was disabled. Since the + grep tests only checked for "define HAVE_ENCODER_ARM", this would match + on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB. - Thanks to Markus Rickert. + Now the config.h feature test requires " 1" at the end to prevent the + prefix problem. have_feature() was also updated for this even though + there were known current bugs affecting it. This is just in case future + features have a similar prefix problem. - CMakeLists.txt | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) + tests/test_compress.sh | 4 ++-- + tests/test_files.sh | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit 5b7bc1b8ae766a76710ca1b99f909cf52c697f05 -Author: Lasse Collin -Date: 2021-01-29 21:19:43 +0200 +commit 80a6b9bcad016c99c9ba3f3eeb4a619fcadfd357 +Author: Jia Tan +Date: 2023-07-10 20:56:28 +0800 - Update THANKS. + Translations: Update the Chinese (traditional) translation. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/zh_TW.po | 659 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 377 insertions(+), 282 deletions(-) -commit 6c6f0db340dcb8bb424411cedba713405d55f6b8 -Author: Lasse Collin -Date: 2021-01-29 21:19:08 +0200 +commit 17f8844e6fc355abf997d77637a7447c4f7bbcbd +Author: Jia Tan +Date: 2023-07-08 21:24:19 +0800 - liblzma: Fix unitialized variable. - - This was introduced two weeks ago in the commit - 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c. + liblzma: Remove non-portable empty initializer. - Thanks to Nathan Moinvaziri. + Commit 78704f36e74205857c898a351c757719a6c8b666 added an empty + initializer {} to prevent a warning. The empty initializer is a GNU + extension and results in a build failure on MSVC. The -wpedantic flag + warns about empty initializers. - src/liblzma/lzma/lzma_encoder.c | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/stream_encoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit bb1d5c1fdd30550d4221ecd336e0be1206132a5c -Author: Lasse Collin -Date: 2021-01-24 22:32:41 +0200 +commit 3aca4f629cd577f0c54f594d5d88722edf0b0413 +Author: Jia Tan +Date: 2023-07-08 20:03:59 +0800 - Tests: Add bad-1-lzma2-10.xz and also modify -9.xz. + Translations: Update the Vietnamese translation. - tests/files/README | 11 +++++++++-- - tests/files/bad-1-lzma2-10.xz | Bin 0 -> 60 bytes - tests/files/bad-1-lzma2-9.xz | Bin 72 -> 72 bytes - 3 files changed, 9 insertions(+), 2 deletions(-) + po/vi.po | 620 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 349 insertions(+), 271 deletions(-) -commit 6b8abc84a5469792e0355d0bfc0784d41cfdfef7 -Author: Lasse Collin -Date: 2021-01-24 19:22:35 +0200 +commit 66bdcfa85fef2911cc80f5f30fed3f9610faccb4 +Author: Jia Tan +Date: 2023-06-28 20:46:31 +0800 - liblzma: Fix a wrong comment in stream_encoder_mt.c. + Tests: Fix memory leaks in test_index. + + Several tests were missing calls to lzma_index_end() to clean up the + lzma_index structs. The memory leaks were discovered by using + -fsanitize=address with GCC. - src/liblzma/common/stream_encoder_mt.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) + tests/test_index.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 939fc5ed654aac25fe0c8684b2df8dbeadb2de1e -Author: Lasse Collin -Date: 2021-01-24 18:51:51 +0200 +commit fe3bd438fb119f9bad3f08dc29d331e4956196e1 +Author: Jia Tan +Date: 2023-06-28 20:43:29 +0800 - Tests: Add bad-1-lzma2-9.xz. + Tests: Fix memory leaks in test_block_header. + + test_block_header was not properly freeing the filter options between + calls to lzma_block_header_decode(). The memory leaks were discovered by + using -fsanitize=address with GCC. - tests/files/README | 4 ++++ - tests/files/bad-1-lzma2-9.xz | Bin 0 -> 72 bytes - 2 files changed, 4 insertions(+) + tests/test_block_header.c | 38 ++++++++++++++++++++++---------------- + 1 file changed, 22 insertions(+), 16 deletions(-) -commit fdd30032f8531ac89519b48c21d810ecf06825f6 -Author: Lasse Collin -Date: 2021-01-24 17:02:00 +0200 +commit 78704f36e74205857c898a351c757719a6c8b666 +Author: Jia Tan +Date: 2023-06-28 20:31:11 +0800 - Tests: Add bad-1-check-crc32-2.xz. + liblzma: Prevent uninitialzed warning in mt stream encoder. + + This change only impacts the compiler warning since it was impossible + for the wait_abs struct in stream_encode_mt() to be used before it was + initialized since mythread_condtime_set() will always be called before + mythread_cond_timedwait(). + + Since the mythread.h code is different between the POSIX and + Windows versions, this warning was only present on Windows builds. + + Thanks to Arthur S for reporting the warning and providing an initial + patch. - tests/files/README | 7 +++++++ - tests/files/bad-1-check-crc32-2.xz | Bin 0 -> 72 bytes - 2 files changed, 7 insertions(+) + src/liblzma/common/stream_encoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit db465419ae26ec7fb9b9472183911ff521620c77 -Author: Lasse Collin -Date: 2021-01-17 19:20:50 +0200 +commit e3356a204c5ae02db3ec4552b6c1be354e9b6142 +Author: Jia Tan +Date: 2023-06-28 20:22:38 +0800 - liblzma: In EROFS LZMA decoder, verify that comp_size matches at the end. + liblzma: Prevent warning for MSYS2 Windows build. + + In lzma_memcmplen(), the header file is only included if + _MSC_VER and _M_X64 are both defined but _BitScanForward64() was + previously used if _M_X64 was defined. GCC for MSYS2 defines _M_X64 but + not _MSC_VER so _BitScanForward64() was used without including + . - When the uncompressed size is known to be exact, after decompressing - the stream exactly comp_size bytes of input must have been consumed. - This is a minor improvement to error detection. + Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as + expected. - src/liblzma/common/erofs_decoder.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + src/liblzma/common/memcmplen.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit 774cc0118ba2496581cb2621505a04bb6598cc75 -Author: Lasse Collin -Date: 2021-01-17 18:53:34 +0200 +commit 45e250a9e9f3c3e8e8af2983366b170bf54f890e +Author: Jia Tan +Date: 2023-06-28 21:01:22 +0800 - liblzma: Make EROFS LZMA decoder work when exact uncomp_size isn't known. + CI: Add test with -fsanitize=address,undefined. - The caller must still not specify an uncompressed size bigger - than the actual uncompressed size. + ci_build.sh was updated to accept disabling of __attribute__ ifunc + and CLMUL. This will allow -fsanitize=address to pass because ifunc + is incompatible with -fsanitize=address. The CLMUL implementation has + optimizations that potentially read past the buffer and mask out the + unwanted bytes. - As a downside, this now needs the exact compressed size. + This test will only run on Autotools Linux. - src/liblzma/api/lzma/container.h | 23 ++++++++--- - src/liblzma/common/erofs_decoder.c | 80 ++++++++++++++++++++++++++++++++++---- - 2 files changed, 91 insertions(+), 12 deletions(-) + .github/workflows/ci.yml | 23 +++++++++++++++++++---- + build-aux/ci_build.sh | 8 +++++++- + 2 files changed, 26 insertions(+), 5 deletions(-) -commit 421b0aa352da244075db10205cf33712f91b9835 -Author: Lasse Collin -Date: 2021-01-14 20:57:11 +0200 +commit 596ee722cd7ddf0afae584fc06365adc0e735977 +Author: Jia Tan +Date: 2023-06-28 20:16:04 +0800 - liblzma: Fix missing normalization in rc_encode_dummy(). - - Without this fix it could attempt to create too much output. + CI: Upgrade checkout action from v2 to v3. - src/liblzma/rangecoder/range_encoder.h | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + .github/workflows/ci.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 601ec0311e769fc704daaaa7dac0ca840aff080e -Author: Lasse Collin -Date: 2021-01-14 20:07:01 +0200 +commit 86118ea320f867e09e98a8682cc08cbbdfd640e2 +Author: Jia Tan +Date: 2023-06-27 23:38:32 +0800 - liblzma: Add EROFS LZMA encoder and decoder. - - Right now this is just a planned extra-compact format for use - in the EROFS file system in Linux. At this point it's possible - that the format will either change or be abandoned and removed - completely. - - The special thing about the encoder is that it uses the - output-size-limited encoding added in the previous commit. - EROFS uses fixed-sized blocks (e.g. 4 KiB) to hold compressed - data so the compressors must be able to create valid streams - that fill the given block size. + Update THANKS. - src/liblzma/api/lzma/container.h | 76 +++++++++++++++++++ - src/liblzma/common/Makefile.inc | 2 + - src/liblzma/common/erofs_decoder.c | 148 +++++++++++++++++++++++++++++++++++++ - src/liblzma/common/erofs_encoder.c | 139 ++++++++++++++++++++++++++++++++++ - src/liblzma/liblzma.map | 2 + - 5 files changed, 367 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c -Author: Lasse Collin -Date: 2021-01-13 19:16:32 +0200 +commit 3d1fdddf92321b516d55651888b9c669e254634e +Author: Jia Tan +Date: 2023-06-27 17:27:09 +0300 - liblzma: Add rough support for output-size-limited encoding in LZMA1. - - With this it is possible to encode LZMA1 data without EOPM so that - the encoder will encode as much input as it can without exceeding - the specified output size limit. The resulting LZMA1 stream will - be a normal LZMA1 stream without EOPM. The actual uncompressed size - will be available to the caller via the uncomp_size pointer. - - One missing thing is that the LZMA layer doesn't inform the LZ layer - when the encoding is finished and thus the LZ may read more input - when it won't be used. However, this doesn't matter if encoding is - done with a single call (which is the planned use case for now). - For proper multi-call encoding this should be improved. - - This commit only adds the functionality for internal use. - Nothing uses it yet. + Docs: Document the configure option --disable-ifunc in INSTALL. - src/liblzma/common/common.h | 11 +++ - src/liblzma/lz/lz_encoder.c | 16 ++++ - src/liblzma/lz/lz_encoder.h | 4 + - src/liblzma/lzma/lzma_encoder.c | 127 +++++++++++++++++++++++--------- - src/liblzma/lzma/lzma_encoder_private.h | 12 +++ - src/liblzma/rangecoder/range_encoder.h | 111 ++++++++++++++++++++++++++++ - 6 files changed, 246 insertions(+), 35 deletions(-) + INSTALL | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit 9cdabbeea891e8f1e7741b076f7db6ac05ae392a +commit b4cf7a2822e8d30eb2b12a1a07fd04383b10ade3 Author: Lasse Collin -Date: 2021-01-11 23:57:11 +0200 +Date: 2023-06-27 17:24:49 +0300 - Scripts: Add zstd support to xzdiff. + Minor tweaks to style and comments. - src/scripts/xzdiff.1 | 6 ++++-- - src/scripts/xzdiff.in | 16 +++++++++++----- - 2 files changed, 15 insertions(+), 7 deletions(-) + CMakeLists.txt | 8 ++++---- + configure.ac | 9 +++++---- + 2 files changed, 9 insertions(+), 8 deletions(-) -commit d9ec3add97cf4c999a7f594c6529680227b6c274 +commit 23fb9e3a329117c2968c1e7388b6ef07c782dba1 Author: Lasse Collin -Date: 2021-01-11 23:41:30 +0200 +Date: 2023-06-27 17:19:49 +0300 - Update THANKS. + CMake: Rename CHECK_ATTR_IFUNC to ALLOW_ATTR_IFUNC. + + It's so that there's a clear difference in wording compared + to liblzma's integrity check types. - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 074259f4f3966aeac6edb205fecbc1a8d2b58bb2 +commit ee44863ae88e377a5df10db007ba9bfadde3d314 Author: Lasse Collin -Date: 2021-01-11 23:41:16 +0200 +Date: 2023-06-27 17:05:23 +0300 - xz: Make --keep accept symlinks, hardlinks, and setuid/setgid/sticky. + liblzma: Add ifunc implementation to crc64_fast.c. - Previously this required using --force but that has other - effects too which might be undesirable. Changing the behavior - of --keep has a small risk of breaking existing scripts but - since this is a fairly special corner case I expect the - likehood of breakage to be low enough. + The ifunc method avoids indirection via the function pointer + crc64_func. This works on GNU/Linux and probably on FreeBSD too. + The previous __attribute((__constructor__)) method is kept for + compatibility with ELF platforms which do support ifunc. - I think the new behavior is more logical. The only reason for - the old behavior was to be consistent with gzip and bzip2. + The ifunc method has some limitations, for example, building + liblzma with -fsanitize=address will result in segfaults. + The configure option --disable-ifunc must be used for such builds. - Thanks to Vincent Lefevre and Sebastian Andrzej Siewior. + Thanks to Hans Jansen for the original patch. + Closes: https://github.com/tukaani-project/xz/pull/53 - src/xz/file_io.c | 9 +++++---- - src/xz/xz.1 | 16 +++++++++++++++- - 2 files changed, 20 insertions(+), 5 deletions(-) + src/liblzma/check/crc64_fast.c | 35 ++++++++++++++++++++++++++--------- + 1 file changed, 26 insertions(+), 9 deletions(-) -commit 73c555b3077c19dda29b6f4592ced2af876f8333 -Author: Lasse Collin -Date: 2021-01-11 23:28:52 +0200 +commit b72d21202402a603db6d512fb9271cfa83249639 +Author: Hans Jansen +Date: 2023-06-22 19:49:30 +0200 - Scripts: Fix exit status of xzgrep. - - Omit the -q option from xz, gzip, and bzip2. With xz this shouldn't - matter. With gzip it's important because -q makes gzip replace SIGPIPE - with exit status 2. With bzip2 it's important because with -q bzip2 - is completely silent if input is corrupt while other decompressors - still give an error message. + Add ifunc check to CMakeLists.txt - Avoiding exit status 2 from gzip is important because bzip2 uses - exit status 2 to indicate corrupt input. Before this commit xzgrep - didn't recognize corrupt .bz2 files because xzgrep was treating - exit status 2 as SIGPIPE for gzip compatibility. - - zstd still needs -q because otherwise it is noisy in normal - operation. - - The code to detect real SIGPIPE didn't check if the exit status - was due to a signal (>= 128) and so could ignore some other exit - status too. + CMake build system will now verify if __attribute__((__ifunc__())) can be + used in the build system. If so, HAVE_FUNC_ATTRIBUTE_IFUNC will be + defined to 1. - src/scripts/xzgrep.in | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) + CMakeLists.txt | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) -commit 194029ffaf74282a81f0c299c07f73caca3232ca -Author: Lasse Collin -Date: 2021-01-11 22:01:51 +0200 +commit 23b5c36fb71904bfbe16bb20f976da38dadf6c3b +Author: Hans Jansen +Date: 2023-06-22 19:46:55 +0200 - Scripts: Fix exit status of xzdiff/xzcmp. - - This is a minor fix since this affects only the situation when - the files differ and the exit status is something else than 0. - In such case there could be SIGPIPE from a decompression tool - and that would result in exit status of 2 from xzdiff/xzcmp - while the correct behavior would be to return 1 or whatever - else diff or cmp may have returned. + Add ifunc check to configure.ac - This commit omits the -q option from xz/gzip/bzip2/lzop arguments. - I'm not sure why the -q was used in the first place, perhaps it - hides warnings in some situation that I cannot see at the moment. - Hopefully the removal won't introduce a new bug. - - With gzip the -q option was harmful because it made gzip return 2 - instead of >= 128 with SIGPIPE. Ignoring exit status 2 (warning - from gzip) isn't practical because bzip2 uses exit status 2 to - indicate corrupt input file. It's better if SIGPIPE results in - exit status >= 128. - - With bzip2 the removal of -q seems to be good because with -q - it prints nothing if input is corrupt. The other tools aren't - silent in this situation even with -q. On the other hand, if - zstd support is added, it will need -q since otherwise it's - noisy in normal situations. - - Thanks to Étienne Mollier and Sebastian Andrzej Siewior. + configure.ac will now verify if __attribute__((__ifunc__())) can be used in + the build system. If so, HAVE_FUNC_ATTRIBUTE_IFUNC will be defined to 1. - src/scripts/xzdiff.in | 35 +++++++++++++++++++++-------------- - 1 file changed, 21 insertions(+), 14 deletions(-) + configure.ac | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) -commit f7fa309e1f7178d04c7bedc03b73077639371e97 -Author: Lasse Collin -Date: 2021-01-09 21:14:36 +0200 +commit dbb3a536ed9873ffa0870321f6873e564c6a9da8 +Author: Jia Tan +Date: 2023-06-07 00:18:30 +0800 - liblzma: Make lzma_outq usable for threaded decompression too. + CI: Add apt update command before installing dependencies. - Before this commit all output queue buffers were allocated as - a single big allocation. Now each buffer is allocated separately - when needed. Used buffers are cached to avoid reallocation - overhead but the cache will keep only one buffer size at a time. - This should make things work OK in the decompression where most - of the time the buffer sizes will be the same but with some less - common files the buffer sizes may vary. - - While this should work fine, it's still a bit preliminary - and may even get reverted if it turns out to be useless for - decompression. + Without the extra command, all of the CI tests were automatically + failing because the Ubuntu servers could not be reached properly. - src/liblzma/common/outqueue.c | 268 +++++++++++++++++++++------------ - src/liblzma/common/outqueue.h | 138 ++++++++++++----- - src/liblzma/common/stream_encoder_mt.c | 52 ++++--- - 3 files changed, 301 insertions(+), 157 deletions(-) + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit a35a69d693ce37d4ba7c1855bda7d9cfa13d1778 -Author: Lasse Collin -Date: 2020-12-23 17:15:49 +0200 +commit 6bcd516812331de42b347922913230895bebad34 +Author: Jia Tan +Date: 2023-06-07 00:10:38 +0800 Update THANKS. THANKS | 1 + 1 file changed, 1 insertion(+) -commit 4fd79b90c52396d70e0b1206ceb1a873a0ad2589 -Author: H.J. Lu -Date: 2020-12-23 06:49:04 -0800 +commit 0d94ba69220d894d2a86081821d2d7a89df5a10b +Author: Benjamin Buch +Date: 2023-06-06 15:32:45 +0200 - liblzma: Enable Intel CET in x86 CRC assembly codes + CMake: Protects against double find_package - When Intel CET is enabled, we need to include in assembly codes - to mark Intel CET support and add _CET_ENDBR to indirect jump targets. + Boost iostream uses `find_package` in quiet mode and then again uses + `find_package` with required. This second call triggers a + `add_library cannot create imported target "ZLIB::ZLIB" because another + target with the same name already exists.` - Tested on Intel Tiger Lake under CET enabled Linux. + This can simply be fixed by skipping the alias part on secondary + `find_package` runs. - src/liblzma/check/crc32_x86.S | 9 +++++++++ - src/liblzma/check/crc64_x86.S | 9 +++++++++ - 2 files changed, 18 insertions(+) + CMakeLists.txt | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) -commit bb3b8c6a23e25db79f862b1de325c56052e0354b -Author: Lasse Collin -Date: 2020-12-16 18:33:29 +0200 +commit 045d7aae286ecd2ce163be9e0d9041343a03f89a +Author: Jia Tan +Date: 2023-05-31 20:26:42 +0800 - Update THANKS. + Translations: Update the Esperanto translation. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/eo.po | 185 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 92 insertions(+), 93 deletions(-) -commit 21588ca34af98738954fc12ded1b89d7294ef646 -Author: Lasse Collin -Date: 2020-12-16 18:30:14 +0200 +commit b0cc7c2dcefe4cbc4e1e697598c14fb687ed0b78 +Author: Jia Tan +Date: 2023-05-31 20:25:00 +0800 - Build: Don't build bundles on Apple OSes. - - Thanks to Daniel Packard. + Translations: Update the Croatian translation. - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) + po/hr.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit d05b0c42dd8b38d8c6b8193c8af50e9bd3d16f28 -Author: Lasse Collin -Date: 2020-12-05 22:44:03 +0200 +commit af045ef6f848f02cd14c9ad195a5f87bb0c02dce +Author: Jia Tan +Date: 2023-05-31 20:15:53 +0800 - Update THANKS. + Translations: Update the Chinese (simplified) translation. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/zh_CN.po | 317 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 157 insertions(+), 160 deletions(-) -commit 1890351f3423627ba5c4c495402f32d7e9ed90b7 -Author: Adam Borowski -Date: 2020-09-25 03:35:18 +0200 +commit e6b92d5817fe91ad27a0f7f57bd0f2144311e383 +Author: Jia Tan +Date: 2023-05-17 23:12:13 +0800 - Scripts: Add zstd support to xzgrep. - - Thanks to Adam Borowski. + Translations: Update German translation of man pages. - src/scripts/xzgrep.1 | 9 ++++++--- - src/scripts/xzgrep.in | 1 + - 2 files changed, 7 insertions(+), 3 deletions(-) + po4a/de.po | 52 ++++++++++++---------------------------------------- + 1 file changed, 12 insertions(+), 40 deletions(-) -commit 2f108abb3d82e4e2313b438dae9c0c7c7a6366f2 -Author: Lasse Collin -Date: 2020-11-17 20:51:48 +0200 +commit 592961ccdbba39c7d60fe37e36764232feb57c60 +Author: Jia Tan +Date: 2023-05-17 23:09:18 +0800 - CMake: Fix compatibility with CMake 3.13. - - The syntax "if(DEFINED CACHE{FOO})" requires CMake 3.14. - In some other places the code treats the cache variables - like normal variables already (${FOO} or if(FOO) is used, - not ${CACHE{FOO}). - - Thanks to ygrek for reporting the bug on IRC. + Translations: Update the German translation. - CMakeLists.txt | 2 +- - cmake/tuklib_cpucores.cmake | 4 ++-- - cmake/tuklib_physmem.cmake | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) + po/de.po | 189 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 94 insertions(+), 95 deletions(-) -commit 5af726a79273fafa5de5745b117e567f21c90e49 -Author: Lasse Collin -Date: 2020-11-01 22:56:43 +0200 +commit 13572cb2c391f5b7503e333c6e05b20bd5bbb524 +Author: Jia Tan +Date: 2023-05-17 20:30:01 +0800 - Update THANKS. + Translations: Update the Croatian translation. - THANKS | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + po/hr.po | 187 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 93 insertions(+), 94 deletions(-) -commit 4575d9d365c756ec189899f9f743e0b3515ce72d -Author: Lasse Collin -Date: 2020-11-01 22:34:25 +0200 +commit 4e6e425ea8f097c6fb43e69cc9540294dca3680d +Author: Jia Tan +Date: 2023-05-17 20:26:54 +0800 - xz: Avoid unneeded \f escapes on the man page. - - I don't want to use \c in macro arguments but groff_man(7) - suggests that \f has better portability. \f would be needed - for the .TP strings for portability reasons anyway. - - Thanks to Bjarni Ingi Gislason. + Translations: Update Korean translation of man pages. + + po4a/ko.po | 3015 ++++++++++++------------------------------------------------ + 1 file changed, 568 insertions(+), 2447 deletions(-) + +commit d5ef1f6faf7c270f60093629257150085ecf19ca +Author: Jia Tan +Date: 2023-05-17 20:13:01 +0800 + + Translations: Update the Korean translation. + + po/ko.po | 319 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 158 insertions(+), 161 deletions(-) + +commit e22d0b0f2e301e7906d0106689d967ed84362028 +Author: Jia Tan +Date: 2023-05-16 23:49:09 +0800 + + Translations: Update the Spanish translation. + + po/es.po | 319 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 158 insertions(+), 161 deletions(-) + +commit f50da74d52d01f6cfd826a921249e289cf671678 +Author: Jia Tan +Date: 2023-05-16 23:47:23 +0800 + + Translations: Update the Romanian translation. + + po/ro.po | 195 ++++++++++++++++++++++++++++++++------------------------------- + 1 file changed, 98 insertions(+), 97 deletions(-) + +commit 4b9ad60a7305e9841b7cb4ea611bdf5fa7271696 +Author: Jia Tan +Date: 2023-05-16 23:45:43 +0800 - src/xz/xz.1 | 31 ++++++++++++++++++++++--------- - 1 file changed, 22 insertions(+), 9 deletions(-) + Translations: Update Romanian translation of man pages. -commit 620b32f5339f86710cb4435e01ecdac972ccac73 -Author: Lasse Collin -Date: 2020-11-01 19:09:53 +0200 + po4a/ro.po | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) - xz: Use non-breaking spaces when intentionally using more than one space. - - This silences some style checker warnings. Seems that spaces - in the beginning of a line don't need this treatment. - - Thanks to Bjarni Ingi Gislason. +commit cb6fd57f889c5d9fab36ae8c9e10083a5fe32dea +Author: Jia Tan +Date: 2023-05-16 23:43:51 +0800 - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Translations: Update Ukrainian translation of man pages. -commit cb1f34988c8a4130485091b2f8b641303d8f701b -Author: Lasse Collin -Date: 2020-11-01 18:49:37 +0200 + po4a/uk.po | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) - xz: Protect the ellipsis (...) on the man page with \&. - - This does it only when ... appears outside macro calls. - - Thanks to Bjarni Ingi Gislason. +commit c3e8fcbc2db4861f92ad15606c995bd255803c52 +Author: Jia Tan +Date: 2023-05-16 23:37:54 +0800 - src/xz/xz.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Translations: Update the Ukrainian translation. -commit 5d224da3da87400f2fab313abbd7c710e7169ef9 -Author: Lasse Collin -Date: 2020-11-01 18:41:21 +0200 + po/uk.po | 321 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 159 insertions(+), 162 deletions(-) - xz: Avoid the abbreviation "e.g." on the man page. - - A few are simply omitted, most are converted to "for example" - and surrounded with commas. Sounds like that this is better - style, for example, man-pages(7) recommends avoiding such - abbreviations except in parenthesis. - - Thanks to Bjarni Ingi Gislason. +commit 27b81b84fcedbc55aa6e6b21004c44070b15b038 +Author: Jia Tan +Date: 2023-05-16 23:07:35 +0800 - src/xz/xz.1 | 66 ++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 33 insertions(+), 33 deletions(-) + Translations: Update the Polish translation. -commit 90457dbe3e5717660f5b81f8c604860fc5137c0c -Author: Lasse Collin -Date: 2020-07-12 23:10:03 +0300 + po/pl.po | 316 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 155 insertions(+), 161 deletions(-) - xz man page: Change \- (minus) to \(en (en-dash) for a numeric range. - - Docs of ancient troff/nroff mention \(em (em-dash) but not \(en - and \- was used for both minus and en-dash. I don't know how - portable \(en is nowadays but it can be changed back if someone - complains. At least GNU groff and OpenBSD's mandoc support it. - - Thanks to Bjarni Ingi Gislason for the patch. +commit 8024ad636a65ed6ea95c94d57255be4c6724d6ed +Author: Jia Tan +Date: 2023-05-16 22:52:14 +0800 - src/xz/xz.1 | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + Translations: Update the Swedish translation. -commit 352ba2d69af2136bc814aa1df1a132559d445616 -Author: Lasse Collin -Date: 2020-07-12 20:46:24 +0300 + po/sv.po | 319 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 158 insertions(+), 161 deletions(-) - Windows: Fix building of resource files when config.h isn't used. - - Now CMake + Visual Studio works for building liblzma.dll. - - Thanks to Markus Rickert. +commit 6699a29673f227c4664826db485ed9f7596320d2 +Author: Jia Tan +Date: 2023-05-16 21:21:38 +0800 - src/common/common_w32res.rc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + Translations: Update the Esperanto translation. -commit a9e2a87f1d61dcf684d809bf08c8ebea93f8a480 -Author: Lasse Collin -Date: 2020-04-06 19:31:50 +0300 + po/eo.po | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +commit f36ca7982f6bd5e9827219ed4f3c5a1fbf5d7bdf +Author: Jia Tan +Date: 2023-05-13 21:21:54 +0800 - src/scripts/xzgrep.1: Filenames to xzgrep are optional. + liblzma: Slightly rewords lzma_str_list_filters() documentation. - xzgrep --help was correct already. + Reword "options required" to "supported options". The previous may have + suggested that the options listed were all required anytime a filter is + used for encoding or decoding. The reword makes this more clear that + adjusting the options is optional. - src/scripts/xzgrep.1 | 2 +- + src/liblzma/api/lzma/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit a7ba275d9b855d186abb29eb7a4f4cb6d9ca6fe0 -Author: Bjarni Ingi Gislason -Date: 2020-03-26 22:17:31 +0000 +commit 3374a5359e52f1671d8f831d65827d5020fe2595 +Author: Jia Tan +Date: 2023-05-11 23:49:23 +0800 - src/script/xzgrep.1: Remove superfluous '.RB' - - Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z - - [ "test-groff" is a developmental version of "groff" ] - - Input file is ./src/scripts/xzgrep.1 - - :20 (macro RB): only 1 argument, but more are expected - :23 (macro RB): only 1 argument, but more are expected - :26 (macro RB): only 1 argument, but more are expected - :29 (macro RB): only 1 argument, but more are expected - :32 (macro RB): only 1 argument, but more are expected - - "abc..." does not mean the same as "abc ...". - - The output from nroff and troff is unchanged except for the space - between "file" and "...". + liblzma: Adds lzma_nothrow to MicroLZMA API functions. - Signed-off-by: Bjarni Ingi Gislason + None of the liblzma functions may throw an exception, so this + attribute should be applied to all liblzma API functions. - src/scripts/xzgrep.1 | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + src/liblzma/api/lzma/container.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 133d498db0f4b14f066d192d64dbcade45deae6b -Author: Bjarni Ingi Gislason -Date: 2020-03-30 21:56:36 +0000 +commit 8f236574986e7c414c0ea059f441982d1387e6a4 +Author: Jia Tan +Date: 2023-05-09 20:20:06 +0800 - xzgrep.1: Delete superfluous '.PP' + liblzma: Exports lzma_mt_block_size() as an API function. - Summary: + The lzma_mt_block_size() was previously just an internal function for + the multithreaded .xz encoder. It is used to provide a recommended Block + size for a given filter chain. - mandoc -T lint xzgrep.1 : - mandoc: xzgrep.1:79:2: WARNING: skipping paragraph macro: PP empty - - There is no change in the output of "nroff" and "troff". - - Signed-off-by: Bjarni Ingi Gislason + This function is helpful to determine the maximum Block size for the + multithreaded .xz encoder when one wants to change the filters between + blocks. Then, this determined Block size can be provided to + lzma_stream_encoder_mt() in the lzma_mt options parameter when + intializing the coder. This requires one to know all the filter chains + they are using before starting to encode (or at least the filter chain + that will need the largest Block size), but that isn't a bad limitation. - src/scripts/xzgrep.1 | 1 - - 1 file changed, 1 deletion(-) + src/liblzma/api/lzma/container.h | 28 ++++++++++++++++++++++++++++ + src/liblzma/common/filter_encoder.c | 16 ++++++++++------ + src/liblzma/common/filter_encoder.h | 6 +----- + src/liblzma/common/stream_encoder_mt.c | 20 +++++++++----------- + src/liblzma/liblzma_generic.map | 5 +++++ + src/liblzma/liblzma_linux.map | 5 +++++ + src/liblzma/lzma/lzma2_encoder.c | 3 +++ + 7 files changed, 61 insertions(+), 22 deletions(-) -commit 057839ca982f886387b66746bffe749cb14fd8cd -Author: Bjarni Ingi Gislason -Date: 2020-03-26 21:16:18 +0000 +commit d0f33d672a4da7985ebb5ba8d829f885de49c171 +Author: Jia Tan +Date: 2023-05-08 22:58:09 +0800 - src/xz/xz.1: Correct misused two-fonts macros + liblzma: Creates IS_ENC_DICT_SIZE_VALID() macro. - Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z - - [ "test-groff" is a developmental version of "groff" ] - - Input file is ./src/xz/xz.1 - - :408 (macro BR): only 1 argument, but more are expected - :1009 (macro BR): only 1 argument, but more are expected - :1743 (macro BR): only 1 argument, but more are expected - :1920 (macro BR): only 1 argument, but more are expected - :2213 (macro BR): only 1 argument, but more are expected - - Output from nroff and troff is unchanged, except for a font change of a - full stop (.). - - Signed-off-by: Bjarni Ingi Gislason + This creates an internal liblzma macro to test if the dictionary size + is valid for encoding. - src/xz/xz.1 | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + src/liblzma/lz/lz_encoder.c | 4 +--- + src/liblzma/lz/lz_encoder.h | 8 ++++++++ + 2 files changed, 9 insertions(+), 3 deletions(-) -commit b8e12f5ab4c9fd3cb09a4330b2861f6b979ababd -Author: Lasse Collin -Date: 2020-03-23 18:07:50 +0200 +commit c247d06e1f6cada9a76f4f6225cbd97ea760f52f +Author: Jia Tan +Date: 2023-05-02 20:39:56 +0800 - Typo fixes from fossies.org. - - https://fossies.org/linux/misc/xz-5.2.5.tar.xz/codespell.html + Add NEWS for 5.4.3. - Makefile.am | 2 +- - doc/examples/01_compress_easy.c | 2 +- - src/liblzma/api/lzma/base.h | 2 +- - src/liblzma/check/crc32_x86.S | 2 +- - src/liblzma/common/index.c | 2 +- - src/xz/xz.1 | 4 ++-- - 6 files changed, 7 insertions(+), 7 deletions(-) + NEWS | 10 ++++++++++ + 1 file changed, 10 insertions(+) -commit 869b9d1b4edd6df07f819d360d306251f8147353 -Author: Lasse Collin -Date: 2020-03-17 16:24:28 +0200 +commit 77050b78364ffb6b0f129e742b7c31602d725c08 +Author: Jia Tan +Date: 2023-05-02 20:39:37 +0800 - Update NEWS for 5.2.5. + Add NEWS for 5.2.12. - NEWS | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 105 insertions(+) + NEWS | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) -commit a048e3a92d238c65f050a765174d9c75417231d4 -Author: Lasse Collin -Date: 2020-03-16 20:01:37 +0200 +commit 713e15e43eb6279a7ab4bbad3d1325ebfdcf09a0 +Author: Jia Tan +Date: 2023-05-04 20:38:52 +0800 - README: Update outdated sections. + Translations: Update the Croatian translation. - README | 21 +++++++++++---------- - 1 file changed, 11 insertions(+), 10 deletions(-) + po/hr.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 29aed815ad4f98f3e4d355faa76a244ecd8ce716 -Author: Lasse Collin -Date: 2020-03-16 19:39:45 +0200 +commit 9ad64bdf309844b6ca6c3e8a4dfb6dbaedda0ca9 +Author: Jia Tan +Date: 2023-05-04 20:30:25 +0800 - README: Mention that man pages can be translated. + tuklib_integer.h: Reverts previous commit. + + Previous commit 6be460dde07113fe3f08f814b61ddc3264125a96 would cause an + error if the integer size was 32 bit. - README | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 7fa7653940cc9dcfcbce2fbc5166ea343ad4e3c1 -Author: Lasse Collin -Date: 2020-03-16 16:43:29 +0200 +commit 6be460dde07113fe3f08f814b61ddc3264125a96 +Author: Jia Tan +Date: 2023-05-04 19:25:20 +0800 - Update INSTALL.generic from Automake 1.16.1. + tuklib_integer.h: Changes two other UINT_MAX == UINT32_MAX to >=. - INSTALL.generic | 321 ++++++++++++++++++++++++++++---------------------------- - 1 file changed, 162 insertions(+), 159 deletions(-) + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 9bd317ef03ab9b3e6a927c27c2e9c4ac041182f0 +commit 44c0c5eae990a22ef04e9b88c1a15838a0d00878 Author: Lasse Collin -Date: 2020-03-15 15:27:22 +0200 +Date: 2023-05-03 22:46:42 +0300 - Update INSTALL for Windows and DOS and add preliminary info for z/OS. + tuklib_integer.h: Fix a recent copypaste error in Clang detection. + + Wrong line was changed in 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7. + Also, this has >= instead of == since ints larger than 32 bits would + work too even if not relevant in practice. - INSTALL | 51 +++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 41 insertions(+), 10 deletions(-) + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit a3148c0446dc7fa96363752df414d22539c9007b -Author: Lasse Collin -Date: 2020-03-15 15:26:20 +0200 +commit 2cf5ae5b5b279b0b2e69ca4724e7bd705865fe68 +Author: Jia Tan +Date: 2023-04-25 20:06:15 +0800 - Build: Update m4/ax_pthread.m4 from Autoconf Archive (again). + CI: Adds a build and test for small configuration. - m4/ax_pthread.m4 | 219 +++++++++++++++++++++++++++++-------------------------- - 1 file changed, 117 insertions(+), 102 deletions(-) + .github/workflows/ci.yml | 5 +++++ + 1 file changed, 5 insertions(+) -commit 7812002dd3ed319e42a14662a8531802cca8ca67 -Author: Lasse Collin -Date: 2020-03-11 21:15:35 +0200 +commit 16b81a057a87c2f18e6ed6447f003af0cbdcfe43 +Author: Jia Tan +Date: 2023-04-25 20:05:26 +0800 - xz: Never use thousand separators in DJGPP builds. - - DJGPP 2.05 added support for thousands separators but it's - broken at least under WinXP with Finnish locale that uses - a non-breaking space as the thousands separator. Workaround - by disabling thousands separators for DJGPP builds. + CI: ci_build.sh allows configuring small build. - src/xz/util.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + build-aux/ci_build.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -commit 7c8f688bf7fccd65d396e0130cbf4ea5dff5c56f -Author: Lasse Collin -Date: 2020-03-11 19:38:08 +0200 +commit 78ccd93951f9e988d447bcdd70b24f6df5448d1d +Author: Jia Tan +Date: 2023-04-20 20:15:00 +0800 - DOS: Update dos/Makefile for DJGPP 2.05. - - It doesn't need -fgnu89-inline like 2.04beta did. + Update THANKS. - dos/Makefile | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 319ca928d73de87940c54e30bffe69f9fa65efdf -Author: Lasse Collin -Date: 2020-03-11 19:36:07 +0200 +commit f41df2ac2fed347d3f107f3533e76e000d29c6cb +Author: Jia Tan +Date: 2023-04-19 22:22:16 +0800 - DOS: Update instructions in dos/INSTALL.txt. + Windows: Include when needed. + + Legacy Windows did not need to #include to use the MSVC + intrinsics. Newer versions likely just issue a warning, but the MSVC + documentation says to include the header file for the intrinsics we use. + + GCC and Clang can "pretend" to be MSVC on Windows, so extra checks are + needed in tuklib_integer.h to only include when it will is + actually needed. - dos/INSTALL.txt | 59 ++++++++++++++++++++++++++++----------------------------- - 1 file changed, 29 insertions(+), 30 deletions(-) + src/common/tuklib_integer.h | 6 ++++++ + src/liblzma/common/memcmplen.h | 10 ++++++++++ + 2 files changed, 16 insertions(+) -commit cb6b227ce39932824812ccd8a0647bd968de27d2 -Author: Lasse Collin -Date: 2020-03-11 17:58:51 +0200 +commit 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7 +Author: Jia Tan +Date: 2023-04-19 21:59:03 +0800 - DOS: Update config.h. + tuklib_integer: Use __builtin_clz() with Clang. + + Clang has support for __builtin_clz(), but previously Clang would + fallback to either the MSVC intrinsic or the regular C code. This was + discovered due to a bug where a new version of Clang required the + header file in order to use the MSVC intrinsics. - The added defines assume GCC >= 4.8. + Thanks to Anton Kochkov for notifying us about the bug. - dos/config.h | 8 ++++++++ - 1 file changed, 8 insertions(+) + src/common/tuklib_integer.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 4572d53e16e87eee375bc5624de2fd59bb0ae9cd +commit 3938718ce3773c90755785c0df8777f133b7ae29 Author: Lasse Collin -Date: 2020-03-02 13:54:33 +0200 +Date: 2023-04-14 18:42:33 +0300 - liblzma: Fix a comment and RC_SYMBOLS_MAX. + liblzma: Update project maintainers in lzma.h. - The comment didn't match the value of RC_SYMBOLS_MAX and the value - itself was slightly larger than actually needed. The only harm - about this was that memory usage was a few bytes larger. + AUTHORS was updated earlier, lzma.h was simply forgotten. - src/liblzma/rangecoder/range_encoder.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/liblzma/api/lzma.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 265daa873c0d871f5f23f9b56e133a6f20045a0a -Author: Lasse Collin -Date: 2020-02-27 20:58:52 +0200 +commit 2a89670ab295e377f8b44f5bda6d198deb8ea285 +Author: Jia Tan +Date: 2023-04-13 20:45:19 +0800 - Build: Make CMake build fail if tuklib_cpucores or tuklib_physmem fails. + liblzma: Cleans up old commented out code. - CMakeLists.txt | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + src/liblzma/common/alone_encoder.c | 11 ----------- + 1 file changed, 11 deletions(-) -commit 7c8b904527cdbe61248c80edcc2e20d840c4fef9 -Author: Lasse Collin -Date: 2020-02-27 20:24:27 +0200 +commit 0fbb2b87a7b5a1dd9d0f4a5e84ac7919557dbe81 +Author: Jia Tan +Date: 2023-04-07 20:46:41 +0800 - Build: Add support for --no-po4a option to autogen.sh. - - Normally, if po4a isn't available, autogen.sh will return - with non-zero exit status. The option --no-po4a can be useful - when one knows that po4a isn't available but wants autogen.sh - to still return with zero exit status. + Docs: Add missing word to SECURITY.md. - autogen.sh | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) + .github/SECURITY.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 292a5c0f9c9b3a66f5a5c652dc46381836d4537f -Author: Lasse Collin -Date: 2020-02-25 21:35:14 +0200 +commit fb9c50f38a17bf37581de4034b36c8df8ec90a87 +Author: Jia Tan +Date: 2023-04-07 20:43:22 +0800 Update THANKS. THANKS | 1 + 1 file changed, 1 insertion(+) -commit 474320e9908786ba2021035f9013191e16cde08a -Author: Lasse Collin -Date: 2020-02-25 20:42:31 +0200 +commit 537c6cd8a9db0dd6b13683e64ddac2943190d715 +Author: Jia Tan +Date: 2023-04-07 20:42:12 +0800 - Build: Fix bugs in the CMake files. - - Seems that the phrase "add more quotes" from sh/bash scripting - applies to CMake as well. E.g. passing an unquoted list ${FOO} - to a function that expects one argument results in only the - first element of the list being passed as an argument and - the rest get ignored. Adding quotes helps ("${FOO}"). - - list(INSERT ...) is weird. Inserting an empty string to an empty - variable results in empty list, but inserting it to a non-empty - variable does insert an empty element to the list. - - Since INSERT requires at least one element, - "${CMAKE_THREAD_LIBS_INIT}" needs to be quoted in CMakeLists.txt. - It might result in an empty element in the list. It seems to not - matter as empty elements consistently get ignored in that variable. - In fact, calling cmake_check_push_state() and cmake_check_pop_state() - will strip the empty elements from CMAKE_REQUIRED_LIBRARIES! - - In addition to quoting fixes, this fixes checks for the cache - variables in tuklib_cpucores.cmake and tuklib_physmem.cmake. - - Thanks to Martin Matuška for testing and reporting the problems. - These fixes aren't tested yet but hopefully they soon will be. + Docs: Minor edits to SECURITY.md. - CMakeLists.txt | 52 ++++++++++++++++++++++----------------------- - cmake/tuklib_common.cmake | 8 ++++--- - cmake/tuklib_cpucores.cmake | 30 ++++++++++++++------------ - cmake/tuklib_integer.cmake | 34 +++++++++++++++-------------- - cmake/tuklib_mbstr.cmake | 6 +++--- - cmake/tuklib_physmem.cmake | 29 +++++++++++++------------ - cmake/tuklib_progname.cmake | 4 ++-- - 7 files changed, 85 insertions(+), 78 deletions(-) + .github/SECURITY.md | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) -commit 7e3493d40eac0c3fa3d5124097745a70e15c41f6 -Author: Lasse Collin -Date: 2020-02-24 23:38:16 +0200 +commit 6549df8dd53f358345957e232648fdb699930074 +Author: Gabriela Gutierrez +Date: 2023-04-07 12:08:30 +0000 - Build: Add very limited experimental CMake support. - - This does *NOT* replace the Autotools-based build system in - the foreseeable future. See the comment in the beginning - of CMakeLists.txt. + Docs: Create SECURITY.md - So far this has been tested only on GNU/Linux but I commit - it anyway to make it easier for others to test. Since I - haven't played much with CMake before, it's likely that - there are things that have been done in a silly or wrong - way and need to be fixed. + Signed-off-by: Gabriela Gutierrez - CMakeLists.txt | 643 ++++++++++++++++++++++++++++++++++++++++++++ - cmake/tuklib_common.cmake | 47 ++++ - cmake/tuklib_cpucores.cmake | 173 ++++++++++++ - cmake/tuklib_integer.cmake | 100 +++++++ - cmake/tuklib_mbstr.cmake | 20 ++ - cmake/tuklib_physmem.cmake | 149 ++++++++++ - cmake/tuklib_progname.cmake | 19 ++ - 7 files changed, 1151 insertions(+) + .github/SECURITY.md | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) -commit 21bd4701fca3e9002ce78bc135debca369ed8545 -Author: Lasse Collin -Date: 2020-02-24 23:37:07 +0200 +commit d0faa85df5a5d253a4625d45313cf5e9277e6cd2 +Author: Jia Tan +Date: 2023-03-28 22:48:24 +0800 - Update m4/.gitignore. + CI: Tests for disabling threading on CMake builds. - m4/.gitignore | 1 + - 1 file changed, 1 insertion(+) + .github/workflows/ci.yml | 3 --- + build-aux/ci_build.sh | 4 ++-- + 2 files changed, 2 insertions(+), 5 deletions(-) -commit e094d1d0f196a91ec703e8d0055948feef349ae8 -Author: Lasse Collin -Date: 2020-02-24 23:29:35 +0200 +commit 8be5cc3b1359d88b4b30a39067466c0ae0bfbc4d +Author: Jia Tan +Date: 2023-03-28 22:45:42 +0800 - tuklib: Omit an unneeded from a tests. + CI: Removes CMakeCache.txt between builds. - tuklib_cpucores.c and tuklib_physmem.c don't include - even via other files in this package, so clearly that header isn't - needed in the tests either (no one has reported build problems due - to a missing header in a .c file). + If the cache file is not removed, CMake will not reset configurations + back to their default values. In order to make the tests independent, it + is simplest to purge the cache. Unfortunatly, this will slow down the + tests a little and repeat some checks. - m4/tuklib_cpucores.m4 | 1 - - m4/tuklib_physmem.m4 | 1 - - 2 files changed, 2 deletions(-) + build-aux/ci_build.sh | 2 ++ + 1 file changed, 2 insertions(+) -commit b3ed19a55fe99a45bd77614e149d39d18498075c -Author: Lasse Collin -Date: 2020-02-24 23:01:00 +0200 +commit 2cb6028fc31de082b7f927632363bb1426b61aaa +Author: Jia Tan +Date: 2023-03-28 22:32:40 +0800 - liblzma: Remove unneeded from fastpos_tablegen.c. + CMake: Update liblzma-config.cmake generation. - This file only generates fastpos_table.c. - It isn't built as a part of liblzma. + Now that the threading is configurable, the liblzma CMake package only + needs the threading library when using POSIX threads. - src/liblzma/lzma/fastpos_tablegen.c | 1 - - 1 file changed, 1 deletion(-) + CMakeLists.txt | 33 ++++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) -commit 7b8982b29179b3c586e0456dc9ecbd4f58dcea59 -Author: Lasse Collin -Date: 2020-02-22 14:15:07 +0200 +commit 4d7fac0b07cc722825ba8d7838c558827e635611 +Author: Jia Tan +Date: 2023-03-28 22:25:33 +0800 - Use defined(__GNUC__) before __GNUC__ in preprocessor lines. + CMake: Allows setting thread method. - This should silence the equivalent of -Wundef in compilers that - don't define __GNUC__. + The thread method is now configurable for the CMake build. It matches + the Autotools build by allowing ON (pick the best threading method), + OFF (no threading), posix, win95, and vista. If both Windows and + posix threading are both available, then ON will choose Windows + threading. Windows threading will also not use: + + target_link_libraries(liblzma Threads::Threads) + + since on systems like MinGW-w64 it would link the posix threads + without purpose. - src/common/sysdefs.h | 3 ++- - src/liblzma/api/lzma.h | 5 +++-- - 2 files changed, 5 insertions(+), 3 deletions(-) + CMakeLists.txt | 144 +++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 104 insertions(+), 40 deletions(-) -commit 43dfe04e6209c691cf4fbe3072d4ee91271748f1 -Author: Lasse Collin -Date: 2020-02-21 17:40:02 +0200 +commit 20cd905d898c1494dee42b78530769bb9c9f8076 +Author: Jia Tan +Date: 2023-03-24 23:05:48 +0800 - liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA. + CI: Runs CMake feature tests. - This gives a tiny encoder speed improvement. This could have been done - in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but - it was forgotten. + Now, CMake will run similar feature disable tests that the Autotools + version did before. In order to do this without repeating lines in + ci.yml, it now makes sense to use the GitHub Workflow matrix to create + a loop. - src/liblzma/lzma/lzma_encoder_optimum_normal.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) + .github/workflows/ci.yml | 169 +++++++++++++++-------------------------------- + 1 file changed, 55 insertions(+), 114 deletions(-) -commit 59e6eb4840b9f52fa3a61544974017279b448216 -Author: Lasse Collin -Date: 2020-02-21 17:01:15 +0200 +commit 4fabdb269f1fc5624b3b94a170c4efb329d1d229 +Author: Jia Tan +Date: 2023-03-24 20:35:11 +0800 - Build: Add visibility.m4 from gnulib. + CI: ci_build.sh allows CMake features to be configured. - Appears that this file used to get included as a side effect of - gettext. After the change to gettext version requirements this file - no longer got copied to the package and so the build was broken. + Also included various clean ups for style and helper functions for + repeated work. - m4/.gitignore | 1 - - m4/visibility.m4 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 77 insertions(+), 1 deletion(-) + build-aux/ci_build.sh | 233 +++++++++++++++++++++++++++++++------------------- + 1 file changed, 143 insertions(+), 90 deletions(-) -commit 7fe3ef2eaa53d439cec043727ea1998f4ff0e22a -Author: Lasse Collin -Date: 2020-02-21 16:10:44 +0200 +commit cf3d1f130e50cf63da4bb1031771605f6f443b6a +Author: Jia Tan +Date: 2023-03-24 20:06:33 +0800 - xz: Silence a warning when sig_atomic_t is long int. + CI: Change ci_build.sh to use bash instead of sh. - It can be true at least on z/OS. + This script is only meant to be run as part of the CI build/test process + on machines that are known to have bash (Ubuntu and MacOS). If this + assumption changes in the future, then the bash specific commands will + need to be replaced with a more portable option. For now, it is + convenient to use bash commands. - src/xz/signals.c | 2 +- + build-aux/ci_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit b0a2a77d10940c42b449d47a005bfc2e50ab5db8 -Author: Lasse Collin -Date: 2020-02-21 15:59:26 +0200 +commit ddfe164368e779c40d061aa4ccc376129e92f8e1 +Author: Jia Tan +Date: 2023-03-24 20:05:59 +0800 - xz: Avoid unneeded access of a volatile variable. + CMake: Only build xzdec if decoders are enabled. - src/xz/signals.c | 2 +- + CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 524c2f12c762032b819757aeda8af7c47c4cabce +commit 116e81f002c503d3c3cd12726db8f9116e58ef25 +Author: Jia Tan +Date: 2023-03-22 15:42:04 +0800 + + Build: Removes redundant check for LZMA1 filter support. + + src/liblzma/lzma/Makefile.inc | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +commit 0ba234f692772595329d225462d391fe2c199d0a Author: Lasse Collin -Date: 2020-02-21 01:24:18 +0200 +Date: 2023-03-23 15:14:29 +0200 - tuklib_integer.m4: Optimize the check order. + CMake: Bump maximum policy version to 3.26. - The __builtin byteswapping is the preferred one so check for it first. + It adds only one new policy related to FOLDERS which we don't use. + This makes it clear that the code is compatible with the policies + up to 3.26. - m4/tuklib_integer.m4 | 56 +++++++++++++++++++++++++++------------------------- - 1 file changed, 29 insertions(+), 27 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 57360bb4fd79b358b36d2877db26ac828d1fdfcb -Author: Lasse Collin -Date: 2020-02-20 18:54:04 +0200 +commit b0891684b4436aed31510fddcbb218d513bd5489 +Author: Jia Tan +Date: 2023-03-21 23:36:00 +0800 + + CMake: Conditionally build xz list.* files if decoders are enabled. + + CMakeLists.txt | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 2c1a830efb61d9d65906a09c9ee3ce27c2c49227 +Author: Jia Tan +Date: 2023-02-25 11:46:50 +0800 - tuklib_exit: Add missing header. + CMake: Allow configuring features as cache variables. - strerror() needs which happened to be included via - tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H - was defined. This wasn't tested without config.h before so it - had worked fine. + This allows users to change the features they build either in + CMakeCache.txt or by using a CMake GUI. The sources built for + liblzma are affected by this too, so only the necessary files + will be compiled. - src/common/tuklib_exit.c | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 528 ++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 391 insertions(+), 137 deletions(-) -commit fddd31175e74a538997a939d930462fde17d2dd4 +commit 8be136f667aaeb8f9e16fbd57a83cb282f0c27ff Author: Lasse Collin -Date: 2020-02-18 19:12:35 +0200 +Date: 2023-03-21 14:07:51 +0200 - Revert the previous commit and add a comment. - - The previous commit broke crc32_tablegen.c. + Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69. - If the whole package is built without config.h (with defines - set on the compiler command line) this should still work fine - as long as these headers conform to C99 well enough. + It's obsolete in Autoconf >= 2.70 and just an alias for AC_PROG_CC + but Autoconf 2.69 requires AC_PROG_CC_C99 to get a C99 compiler. - src/common/tuklib_config.h | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) -commit 4e4e9fbb7e66d45319525ac224bff48fbdd0cf6e +commit 53cc475f2652d9e390ca002018dfd0af0626ef80 Author: Lasse Collin -Date: 2020-02-17 23:37:20 +0200 +Date: 2023-03-21 14:04:37 +0200 - Do not check for HAVE_CONFIG_H in tuklib_config.h. + Build: configure.ac: Use AS_IF and AS_CASE where required. - In XZ Utils sysdefs.h takes care of it and the required headers. + This makes no functional difference in the generated configure + (at least with the Autotools versions I have installed) but this + change might prevent future bugs like the one that was just + fixed in the commit 5a5bd7f871818029d5ccbe189f087f591258c294. - src/common/tuklib_config.h | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) + configure.ac | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) -commit 2d4cef954feba82073951358466a1d614141cf33 +commit 3b8890a40233b6c783bb101ec14405e786871775 Author: Lasse Collin -Date: 2020-02-16 11:18:28 +0200 +Date: 2023-03-21 13:12:03 +0200 - sysdefs.h: Omit the conditionals around string.h and limits.h. - - string.h is used unconditionally elsewhere in the project and - configure has always stopped if limits.h is missing, so these - headers must have been always available even on the weirdest - systems. + Update THANKS. - src/common/sysdefs.h | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit feb9c1969bc3eb33d4ecb72cfa897f92dae84939 +commit 5a5bd7f871818029d5ccbe189f087f591258c294 Author: Lasse Collin -Date: 2020-02-15 15:07:11 +0200 +Date: 2023-03-21 13:11:49 +0200 - Build: Bump Autoconf and Libtool version requirements. + Build: Fix --disable-threads breaking the building of shared libs. + + This is broken in the releases 5.2.6 to 5.4.2. A workaround + for these releases is to pass EGREP='grep -E' as an argument + to configure in addition to --disable-threads. + + The problem appeared when m4/ax_pthread.m4 was updated in + the commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad which + introduced the use of AC_EGREP_CPP. AC_EGREP_CPP calls + AC_REQUIRE([AC_PROG_EGREP]) to set the shell variable EGREP + but this was only executed if POSIX threads were enabled. + Libtool code also has AC_REQUIRE([AC_PROG_EGREP]) but Autoconf + omits it as AC_PROG_EGREP has already been required earlier. + Thus, if not using POSIX threads, the shell variable EGREP + would be undefined in the Libtool code in configure. - There is no specific reason for this other than blocking - the most ancient versions. These are still old: + ax_pthread.m4 is fine. The bug was in configure.ac which called + AX_PTHREAD conditionally in an incorrect way. Using AS_CASE + ensures that all AC_REQUIREs get always run. - Autoconf 2.69 (2012) - Automake 1.12 (2012) - gettext 0.19.6 (2015) - Libtool 2.4 (2010) + Thanks to Frank Busse for reporting the bug. + Fixes: https://github.com/tukaani-project/xz/issues/45 - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + configure.ac | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit 3d576cf92158d62790017ad7f2dd6dc1dd6b42bb +commit dfe1710784c0a3c3a90c17b80c9e1fe19b5fce06 Author: Lasse Collin -Date: 2020-02-15 03:08:32 +0200 +Date: 2023-03-19 22:45:59 +0200 - Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6. - - This bumps the version requirement from 0.19 (from 2014) to - 0.19.6 (2015). + liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h. - Using only the old AM_GNU_GETTEXT_VERSION results in old - gettext infrastructure being placed in the package. By using - both macros we get the latest gettext files while the other - programs in the Autotools family can still see the old macro. + Thanks to Christian Hesse for reporting the issue. + Fixes: https://github.com/tukaani-project/xz/issues/44 - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/liblzma/common/memcmplen.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit fa792b8befaf7cb3960b655e0a9410da866d756f -Author: Lasse Collin -Date: 2020-02-14 20:42:06 +0200 +commit f0c580c5fc38bf49a184b48d76c1d8c057d499ce +Author: Jia Tan +Date: 2023-03-18 22:10:57 +0800 - Translations: Add German translation of the man pages. - - Thanks to Mario Blättermann. + Add NEWS for 5.4.2. - po4a/de.po | 5532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po4a/po4a.conf | 2 +- - 2 files changed, 5533 insertions(+), 1 deletion(-) + NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 48 insertions(+) -commit 6f7211b6bb47a895b47f533282dba9ee9a1b0c8b -Author: Lasse Collin -Date: 2020-02-07 15:32:21 +0200 +commit af4925e6043113ec9b5f9c0cf13abf2a18ccb1f6 +Author: Jia Tan +Date: 2023-03-18 22:10:12 +0800 - Build: Add support for translated man pages using po4a. - - The dependency on po4a is optional. It's never required to install - the translated man pages when xz is built from a release tarball. - If po4a is missing when building from xz.git, the translated man - pages won't be generated but otherwise the build will work normally. - - The translations are only updated automatically by autogen.sh and - by "make mydist". This makes it easy to keep po4a as an optional - dependency and ensures that I won't forget to put updated - translations to a release tarball. - - The translated man pages aren't installed if --disable-nls is used. - - The installation of translated man pages abuses Automake internals - by calling "install-man" with redefined dist_man_MANS and man_MANS. - This makes the hairy script code slightly less hairy. If it breaks - some day, this code needs to be fixed; don't blame Automake developers. - - Also, this adds more quotes to the existing shell script code in - the Makefile.am "-hook"s. + Add NEWS for 5.2.11. - Makefile.am | 4 ++++ - autogen.sh | 8 ++++--- - po4a/.gitignore | 2 ++ - po4a/po4a.conf | 14 +++++++++++ - po4a/update-po | 45 ++++++++++++++++++++++++++++++++++ - src/scripts/Makefile.am | 64 +++++++++++++++++++++++++++++++++++++------------ - src/xz/Makefile.am | 50 +++++++++++++++++++++++++++----------- - src/xzdec/Makefile.am | 55 ++++++++++++++++++++++++++++++++---------- - 8 files changed, 197 insertions(+), 45 deletions(-) + NEWS | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) -commit 426f9e5819ff7710a5ff573a96c02940be65d52f +commit 5a7b930efa7f9849d8da8397e8e5d8638f92be40 Author: Lasse Collin -Date: 2020-02-06 17:31:38 +0200 +Date: 2023-03-18 16:00:54 +0200 - Update THANKS. + Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3. - THANKS | 1 + - 1 file changed, 1 insertion(+) + COPYING.GPLv3 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit e3a4481d020e4de89efa037f335cf50f3ca55592 +commit b473a92891f7e991398a3b5eff305f6f2b6d7293 Author: Lasse Collin -Date: 2020-02-05 22:35:06 +0200 +Date: 2023-03-18 15:51:57 +0200 - Update tests/.gitignore. + Change a few HTTP URLs to HTTPS. + + The xz man page timestamp was intentionally left unchanged. - .gitignore | 4 ++++ - 1 file changed, 4 insertions(+) + INSTALL | 2 +- + README | 8 ++++---- + configure.ac | 2 +- + dos/INSTALL.txt | 4 ++-- + src/liblzma/api/lzma.h | 8 ++++---- + src/liblzma/check/sha256.c | 2 +- + src/xz/xz.1 | 2 +- + windows/INSTALL-MinGW.txt | 10 +++++----- + 8 files changed, 19 insertions(+), 19 deletions(-) -commit 07208de92f2d5bca764f6d0ebe9d9866051dc4ef -Author: Lasse Collin -Date: 2020-02-05 22:28:51 +0200 +commit 8b2f6001b4f412c259a7883427f2f2c8cea98ea8 +Author: Jia Tan +Date: 2023-03-18 00:40:28 +0800 - Update m4/.gitignore. + CMake: Fix typo in a comment. - m4/.gitignore | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit c91fbf223db46c3b3cb9df769863a1a60cd9c908 +commit 76e2315e14c399c15cc90e7930fd4d3d086b0227 Author: Lasse Collin -Date: 2020-02-05 20:47:38 +0200 +Date: 2023-03-17 18:36:22 +0200 - Update THANKS. + Windows: build.bash: Copy liblzma API docs to the output package. - THANKS | 1 + - 1 file changed, 1 insertion(+) + windows/build.bash | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 15a133b6d1a3eab4faf6eb52a71fdc56bd65846f +commit 133cf55edc5ce92952d2709abd992e48ef1f45ee Author: Lasse Collin -Date: 2020-02-05 20:40:14 +0200 +Date: 2023-03-17 08:53:38 +0200 - xz: Make it a fatal error if enabling the sandbox fails. + Windows: Add microlzma_*.c to the VS project files. - Perhaps it's too drastic but on the other hand it will let me - learn about possible problems if people report the errors. - This won't be backported to the v5.2 branch. + These should have been included in 5.3.2alpha already. - src/xz/file_io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + windows/vs2013/liblzma.vcxproj | 2 ++ + windows/vs2013/liblzma_dll.vcxproj | 2 ++ + windows/vs2017/liblzma.vcxproj | 2 ++ + windows/vs2017/liblzma_dll.vcxproj | 2 ++ + windows/vs2019/liblzma.vcxproj | 2 ++ + windows/vs2019/liblzma_dll.vcxproj | 2 ++ + 6 files changed, 12 insertions(+) -commit af0fb386ef55db66654ae39e2deec6e04190c4ff +commit 75c9ca450fab6982fda9286b168081c9d54126cd Author: Lasse Collin -Date: 2020-02-05 20:33:50 +0200 +Date: 2023-03-17 08:43:51 +0200 - xz: Comment out annoying sandboxing messages. + CMake: Add microlzma_*.c to the build. + + These should have been included in 5.3.2alpha already. - src/xz/file_io.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) -commit 986d8c9b52b824474088e5bb3b6940651660f0e2 +commit 0cc3313bd4e569c51e686e5aab8c40c35241d34b Author: Lasse Collin -Date: 2020-02-05 19:33:37 +0200 +Date: 2023-03-17 08:41:36 +0200 - Build: Workaround a POSIX shell detection problem on Solaris. - - I don't know if the problem is in gnulib's gl_POSIX_SHELL macro - or if xzgrep does something that isn't in POSIX. The workaround - adds a special case for Solaris: if /usr/xpg4/bin/sh exists and - gl_cv_posix_shell wasn't overriden on the configure command line, - use that shell for xzgrep and other scripts. That shell is known - to work and exists on most Solaris systems. + Build: Update comments about unaligned access to mention 64-bit. - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) + cmake/tuklib_integer.cmake | 7 +++---- + m4/tuklib_integer.m4 | 4 ++-- + 2 files changed, 5 insertions(+), 6 deletions(-) -commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad +commit 5e57e3301319f20c35f8111dea73fa58403b96b1 Author: Lasse Collin -Date: 2020-02-03 22:03:50 +0200 +Date: 2023-03-17 00:02:30 +0200 - Build: Update m4/ax_pthread.m4 from Autoconf Archive. + Tests: Update .gitignore. - m4/ax_pthread.m4 | 398 ++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 279 insertions(+), 119 deletions(-) + .gitignore | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 353970510895f6a80adfe60cf71b70a95adfa8bc +commit 0007394d54e21bf30abb9a5e09cbc1e8d44a73ac Author: Lasse Collin -Date: 2020-02-01 19:56:18 +0200 +Date: 2023-03-14 20:04:03 +0200 - xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz. - - See the code comment for reasoning. It's far from perfect but - hopefully good enough for certain cases while hopefully doing - nothing bad in other situations. - - At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference - on how xz scales down the number of threads. - - The limit has to be a few MiB below 4096 MiB because otherwise - things like "xz --lzma2=dict=500MiB" won't scale down the dict - size enough and xz cannot allocate enough memory. With - "ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had - to be no more than 4085 MiB. Some safety margin is good though. - - This is hack but it should be useful when running 32-bit xz on - a 64-bit kernel that gives full 4 GiB address space to xz. - Hopefully this is enough to solve this: - - https://bugzilla.redhat.com/show_bug.cgi?id=1196786 - - FreeBSD has a patch that limits the result in tuklib_physmem() - to SIZE_MAX on 32-bit systems. While I think it's not the way - to do it, the results on --memlimit-compress have been good. This - commit should achieve practically identical results for compression - while leaving decompression and tuklib_physmem() and thus - lzma_physmem() unaffected. + po4a/update-po: Display the script name consistently in error messages. - src/xz/hardware.c | 32 +++++++++++++++++++++++++++++++- - src/xz/xz.1 | 21 ++++++++++++++++++++- - 2 files changed, 51 insertions(+), 2 deletions(-) + po4a/update-po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit ba76d67585f88677af9f48b48e7bdc3bb7687def -Author: Lasse Collin -Date: 2020-01-26 20:53:25 +0200 +commit 509157c80c500426ec853bd992d684ebafc8500c +Author: Jia Tan +Date: 2023-03-17 01:30:36 +0800 - xz: Set the --flush-timeout deadline when the first input byte arrives. - - xz --flush-timeout=2000, old version: - - 1. xz is started. The next flush will happen after two seconds. - 2. No input for one second. - 3. A burst of a few kilobytes of input. - 4. No input for one second. - 5. Two seconds have passed and flushing starts. - - The first second counted towards the flush-timeout even though - there was no pending data. This can cause flushing to occur more - often than needed. - - xz --flush-timeout=2000, after this commit: + Doc: Rename Doxygen HTML doc directory name liblzma => api. - 1. xz is started. - 2. No input for one second. - 3. A burst of a few kilobytes of input. The next flush will - happen after two seconds counted from the time when the - first bytes of the burst were read. - 4. No input for one second. - 5. No input for another second. - 6. Two seconds have passed and flushing starts. + When the docs are installed, calling the directory "liblzma" is + confusing since multiple other files in the doc directory are for + liblzma. This should also make it more natural for distros when they + package the documentation. - src/xz/coder.c | 6 +----- - src/xz/file_io.c | 6 +++++- - src/xz/mytime.c | 1 - - 3 files changed, 6 insertions(+), 7 deletions(-) + .gitignore | 2 +- + Makefile.am | 18 +++++++++--------- + PACKAGERS | 4 ++-- + doxygen/Doxyfile | 2 +- + doxygen/update-doxygen | 18 +++++++++--------- + 5 files changed, 22 insertions(+), 22 deletions(-) -commit fd47fd62bbb1bfd13ab63869137971d8b390025f -Author: Lasse Collin -Date: 2020-01-26 20:19:19 +0200 +commit fd90e2f4c29180b44e33c7ef726f94e4eae54ed3 +Author: Jia Tan +Date: 2023-03-16 22:07:15 +0800 - xz: Move flush_needed from mytime.h to file_pair struct in file_io.h. + liblzma: Remove note from lzma_options_bcj about the ARM64 exception. + + This was left in by mistake since an early version of the ARM64 filter + used a different struct for its options. - src/xz/coder.c | 3 ++- - src/xz/file_io.c | 3 ++- - src/xz/file_io.h | 3 +++ - src/xz/mytime.c | 3 --- - src/xz/mytime.h | 4 ---- - 5 files changed, 7 insertions(+), 9 deletions(-) + src/liblzma/api/lzma/bcj.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 815035681063d5774d3640fc20b8ede783dd574e -Author: Lasse Collin -Date: 2020-01-26 14:49:22 +0200 +commit 4f50763b981f9056c5f1763dfb26cfa4a26a181d +Author: Jia Tan +Date: 2023-03-16 21:44:02 +0800 - xz: coder.c: Make writing output a separate function. + CI: Add doxygen as a dependency. - The same code sequence repeats so it's nicer as a separate function. - Note that in one case there was no test for opt_mode != MODE_TEST, - but that was only because that condition would always be true, so - this commit doesn't change the behavior there. + Autogen now requires --no-doxygen or having doxygen installed to run + without errors. - src/xz/coder.c | 30 +++++++++++++++++------------- - 1 file changed, 17 insertions(+), 13 deletions(-) + .github/workflows/ci.yml | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) -commit 5a49e081a098455bcdbd95cefb90e9b18780fe58 +commit f68f4b27f62f53fdac570885a1f4f23367ce6599 Author: Lasse Collin -Date: 2020-01-26 14:13:42 +0200 +Date: 2023-03-15 19:19:13 +0200 - xz: Fix semi-busy-waiting in xz --flush-timeout. - - When input blocked, xz --flush-timeout=1 would wake up every - millisecond and initiate flushing which would have nothing to - flush and thus would just waste CPU time. The fix disables the - timeout when no input has been seen since the previous flush. + COPYING: Add a note about the included Doxygen-generated HTML. - src/xz/coder.c | 4 ++++ - src/xz/file_io.c | 15 +++++++++++---- - src/xz/file_io.h | 4 ++++ - 3 files changed, 19 insertions(+), 4 deletions(-) + COPYING | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit dcca70fe9fa3c4bec56cf9c79e966166c9a9cf6a -Author: Lasse Collin -Date: 2020-01-26 13:47:31 +0200 +commit 8979308528c1f45cb9ee52d511f05232b4ad90a1 +Author: Jia Tan +Date: 2023-03-16 21:41:09 +0800 - xz: Refactor io_read() a bit. + Doc: Update PACKAGERS with details about liblzma API docs install. - src/xz/file_io.c | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) + PACKAGERS | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) -commit 4ae9ab70cd3214395756435d13d8d000368ca2cb -Author: Lasse Collin -Date: 2020-01-26 13:37:08 +0200 +commit 55ba6e93004842ae0a0792214a23504267ad8f43 +Author: Jia Tan +Date: 2023-03-16 21:38:32 +0800 - xz: Update a comment in file_io.h. + liblzma: Add set lzma.h as the main page for Doxygen documentation. + + The \mainpage command is used in the first block of comments in lzma.h. + This changes the previously nearly empty index.html to use the first + comment block in lzma.h for its contents. + + lzma.h is no longer documented separately, but this is for the better + since lzma.h only defined a few macros that users do not need to use. + The individual API header files all have a disclaimer that they should + not be #included directly, so there should be no confusion on the fact + that lzma.h should be the only header used by applications. + + Additionally, the note "See ../lzma.h for information about liblzma as + a whole." was removed since lzma.h is now the main page of the + generated HTML and does not have its own page anymore. So it would be + confusing in the HTML version and was only a "nice to have" when + browsing the source files. - src/xz/file_io.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/liblzma/api/lzma.h | 1 + + src/liblzma/api/lzma/base.h | 2 -- + 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/container.h | 2 -- + src/liblzma/api/lzma/delta.h | 2 -- + src/liblzma/api/lzma/filter.h | 2 -- + src/liblzma/api/lzma/hardware.h | 2 -- + src/liblzma/api/lzma/index.h | 2 -- + src/liblzma/api/lzma/index_hash.h | 4 +--- + src/liblzma/api/lzma/lzma12.h | 2 -- + src/liblzma/api/lzma/stream_flags.h | 2 -- + src/liblzma/api/lzma/version.h | 2 -- + src/liblzma/api/lzma/vli.h | 2 -- + 15 files changed, 2 insertions(+), 29 deletions(-) -commit 3333ba4a6795a55cf0375329ba08152bd7fcbd46 -Author: Lasse Collin -Date: 2020-01-26 13:27:51 +0200 +commit 16f21255597f6a57e5692780f962cdc090f62b8c +Author: Jia Tan +Date: 2023-03-16 21:37:32 +0800 - xz: Move the setting of flush_needed in file_io.c to a nicer location. + Build: Generate doxygen documentation in autogen.sh. + + Another command line option (--no-doxygen) was added to disable + creating the doxygen documenation in cases where it not wanted or + if the doxygen tool is not installed. - src/xz/file_io.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + autogen.sh | 35 +++++++++++++++++++++++++++++------ + 1 file changed, 29 insertions(+), 6 deletions(-) -commit cf2df0f05ac98c1158c6e48145900b773223605d -Author: Lasse Collin -Date: 2020-01-19 21:54:33 +0200 +commit 1321852a3be7196bd7fcfd146221a5669e46407c +Author: Jia Tan +Date: 2023-03-16 21:35:55 +0800 - Use $(LIB_FUZZING_ENGINE) in tests/ossfuzz/Makefile. + Build: Create doxygen/update-doxygen script. + + This is a helper script to generate the Doxygen documentation. It can be + run in 'liblzma' or 'internal' mode by setting the first argument. It + will default to 'liblzma' mode and only generate documentation for the + liblzma API header files. - https://github.com/google/oss-fuzz/pull/3219#issuecomment-573751048 + The helper script will be run during the custom mydist hook when we + create releases. This hook already alters the source directory, so its + fine to do it here too. This way, we can include the Doxygen generated + files in the distrubtion and when installing. - Thanks to Bhargava Shastry for sending the patch. - - tests/ossfuzz/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7136f1735c60ac6967c4b8e277fcde53d485234f -Author: Lasse Collin -Date: 2019-12-31 00:41:28 +0200 - - Rename unaligned_read32ne to read32ne, and similarly for the others. + In 'liblzma' mode, the JavaScript is stripped from the .html files and + the .js files are removed. This avoids license hassle from jQuery and + other libraries that Doxygen 1.9.6 puts into jquery.js in minified form. - src/common/tuklib_integer.h | 64 +++++++++++++++---------------- - 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/memcmplen.h | 9 ++--- - src/liblzma/common/stream_flags_decoder.c | 6 +-- - src/liblzma/common/stream_flags_encoder.c | 8 ++-- - 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 | 3 +- - 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 +-- - 15 files changed, 54 insertions(+), 62 deletions(-) + Makefile.am | 1 + + doxygen/update-doxygen | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 112 insertions(+) -commit 5e78fcbf2eb21936022c9c5c3625d4da76f4b241 -Author: Lasse Collin -Date: 2019-12-31 00:29:48 +0200 +commit b1216a7772952d2fe7fe9c6acfcbd98d30abbc7b +Author: Jia Tan +Date: 2023-03-16 21:34:36 +0800 - Rename read32ne to aligned_read32ne, and similarly for the others. + Build: Install Doxygen docs and include in distribution if generated. + + Added a install-data-local target to install the Doxygen documentation + only when it has been generated. In order to correctly remove the docs, + a corresponding uninstall-local target was added. - Using the aligned methods requires more care to ensure that - the address really is aligned, so it's nicer if the aligned - methods are prefixed. The next commit will remove the unaligned_ - prefix from the unaligned methods which in liblzma are used in - more places than the aligned ones. + If the doxygen docs exist in the source tree, they will also be included + in the distribution now too. - src/common/tuklib_integer.h | 56 +++++++++++++++++++++--------------------- - src/liblzma/check/crc32_fast.c | 4 +-- - src/liblzma/check/crc64_fast.c | 4 +-- - 3 files changed, 32 insertions(+), 32 deletions(-) + Makefile.am | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) -commit 77bc5bc6dd67056cfd5888520ac930cfc57b4516 +commit c97d12f300b2a94c9f54a44c8931c8bc08cf0a73 Author: Lasse Collin -Date: 2019-12-31 00:18:24 +0200 +Date: 2023-03-16 21:23:48 +0800 - Revise tuklib_integer.h and .m4. + Doxygen: Refactor Doxyfile.in to doxygen/Doxyfile. - Add a configure option --enable-unsafe-type-punning to get the - old non-conforming memory access methods. It can be useful with - old compilers or in some other less typical situations but - shouldn't normally be used. + Instead of having Doxyfile.in configured by Autoconf, the Doxyfile + can have the tags that need to be configured piped into the doxygen + command through stdin with the overrides after Doxyfile's contents. - Omit the packed struct trick for unaligned access. While it's - best in some cases, this is simpler. If the memcpy trick doesn't - work, one can request unsafe type punning from configure. + Going forward, the documentation should be generated in two different + modes: liblzma or internal. - Because CRC32/CRC64 code needs fast aligned reads, if no very - safe way to do it is found, type punning is used as a fallback. - This sucks but since it currently works in practice, it seems to - be the least bad option. It's never needed with GCC >= 4.7 or - Clang >= 3.6 since these support __builtin_assume_aligned and - thus fast aligned access can be done with the memcpy trick. + liblzma is useful for most users. It is the documentation for just + the liblzma API header files. This is the default. - Other things: - - Support GCC/Clang __builtin_bswapXX - - Cleaner bswap fallback macros - - Minor cleanups + internal is for people who want to understand how xz and liblzma work. + It might be useful for people who want to contribute to the project. - m4/tuklib_integer.m4 | 46 ++++- - src/common/tuklib_integer.h | 488 ++++++++++++++++++++++++-------------------- - 2 files changed, 316 insertions(+), 218 deletions(-) + .gitignore | 3 +- + Makefile.am | 1 - + configure.ac | 40 --- + Doxyfile.in => doxygen/Doxyfile | 721 +++++++++++++++++++++++++--------------- + 4 files changed, 456 insertions(+), 309 deletions(-) -commit 8b72950a6b2e2a36c2d8fdc8857564b57191b088 -Author: Lasse Collin -Date: 2019-12-29 22:51:58 +0200 +commit 1b7661faa4bbf4a54c6b75900b5059835c382a0f +Author: Jia Tan +Date: 2023-02-28 23:22:36 +0800 - Tests: Hopefully fix test_check.c to work on EBCDIC systems. - - Thanks to Daniel Richard G. + Tests: Remove unused macros and functions. - tests/test_check.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + tests/tests.h | 75 ----------------------------------------------------------- + 1 file changed, 75 deletions(-) -commit 43ce4ea7c762238d3df9717b34126d3e0d7cd51c -Author: Lasse Collin -Date: 2019-09-24 23:02:40 +0300 +commit af55191102f01e76de658c881299f0909ca0feda +Author: Jia Tan +Date: 2022-12-29 21:52:15 +0800 - Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris. - - This adds a configure option --enable-path-for-scripts=PREFIX - which defaults to empty except on Solaris it is /usr/xpg4/bin - to make POSIX grep and others available. The Solaris case had - been documented in INSTALL with a manual fix but it's better - to do this automatically since it is needed on most Solaris - systems anyway. - - Thanks to Daniel Richard G. + liblzma: Defines masks for return values from lzma_index_checks(). - INSTALL | 43 +++++++++++++++++++++++++++++++++++-------- - configure.ac | 26 ++++++++++++++++++++++++++ - src/scripts/xzdiff.in | 1 + - src/scripts/xzgrep.in | 1 + - src/scripts/xzless.in | 1 + - src/scripts/xzmore.in | 1 + - 6 files changed, 65 insertions(+), 8 deletions(-) + src/liblzma/api/lzma/index.h | 23 +++++++++++++++++++++++ + tests/test_index.c | 22 +++++++++++----------- + 2 files changed, 34 insertions(+), 11 deletions(-) -commit 6a89e656ebedd53a10cd1a063a32a9e4ade0da1f -Author: Lasse Collin -Date: 2019-07-12 18:57:43 +0300 +commit 8f38cdd9ab71e2a9d5a9787550222b7578243b73 +Author: Jia Tan +Date: 2023-01-12 22:29:07 +0800 - Fix comment typos in tuklib_mbstr* files. + Tests: Refactors existing lzma_index tests. + + Converts the existing lzma_index tests into tuktests and covers every + API function from index.h except for lzma_file_info_decoder, which can + be tested in the future. - src/common/tuklib_mbstr.h | 2 +- - src/common/tuklib_mbstr_fw.c | 2 +- - src/common/tuklib_mbstr_width.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + tests/test_index.c | 2036 ++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 1492 insertions(+), 544 deletions(-) -commit ac0b4212656a48ef0c187c0c941d40ac9489ae36 +commit 717aa3651ce582807f379d8654c2516e1594df77 Author: Lasse Collin -Date: 2019-07-12 18:30:46 +0300 +Date: 2023-03-11 18:42:08 +0200 - Add missing include to tuklib_mbstr_width.c. + xz: Simplify the error-label in Capsicum sandbox code. - It didn't matter in XZ Utils because sysdefs.h - includes string.h anyway. + Also remove unneeded "sandbox_allowed = false;" as this code + will never be run more than once (making it work with multiple + input files isn't trivial). - src/common/tuklib_mbstr_width.c | 1 + - 1 file changed, 1 insertion(+) + src/xz/file_io.c | 27 ++++++++++++--------------- + 1 file changed, 12 insertions(+), 15 deletions(-) -commit 72a443281fb0b91aebf8cdff2ab1f7c07b081240 +commit a0eecc235d3ba8ad3453da98b46c7bc3e644de75 Author: Lasse Collin -Date: 2019-07-12 18:10:57 +0300 +Date: 2023-03-07 19:59:23 +0200 - Update tuklib base headers to include stdbool.h. + xz: Make Capsicum sandbox more strict with stdin and stdout. - src/common/tuklib_common.h | 2 +- - src/common/tuklib_config.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) + src/xz/file_io.c | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit de1f47b2b40e960b7bc3acba754f66dd19705921 -Author: Lasse Collin -Date: 2019-06-28 00:54:31 +0300 +commit 916448d624aaf55cef0fc3e53754affb8c4f309d +Author: Jia Tan +Date: 2023-03-08 23:08:46 +0800 - xz: Automatically align the strings in --info-memory. + Revert: "Add warning if Capsicum sandbox system calls are unsupported." - This makes it easier to translate the strings. - - Also, the string for amount of RAM was shortened. + The warning causes the exit status to be 2, so this will cause problems + for many scripted use cases for xz. The sandbox usage is already very + limited already, so silently disabling this allows it to be more usable. - src/xz/hardware.c | 45 ++++++++++++++++++++++++++++++++++----------- - 1 file changed, 34 insertions(+), 11 deletions(-) + src/xz/file_io.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) -commit 8ce679125dbd0e2058d8f886e738d7f19a45cab5 -Author: Lasse Collin -Date: 2019-06-25 23:15:21 +0300 +commit 01587dda2a8f13fef7e12fd624e6d05da5f9624f +Author: Jia Tan +Date: 2023-03-07 20:02:22 +0800 - liblzma: Fix a buggy comment. + xz: Fix -Wunused-label in io_sandbox_enter(). + + Thanks to Xin Li for recommending the fix. - src/liblzma/lz/lz_encoder_mf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/file_io.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit fc77929e92e869f6869bf88931066103fd75f376 -Author: Lasse Collin -Date: 2019-06-25 00:16:06 +0300 +commit 5fb936786601a1cd013a5d436adde65982b1e13c +Author: Jia Tan +Date: 2023-03-06 21:37:45 +0800 - configure.ac: Fix a typo in a comment. + xz: Add warning if Capsicum sandbox system calls are unsupported. + + The warning is only used when errno == ENOSYS. Otherwise, xz still + issues a fatal error. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/file_io.c | 2 ++ + 1 file changed, 2 insertions(+) -commit e873902641794210ad7db59743f98e3e1cd6139f -Author: Lasse Collin -Date: 2019-06-25 00:08:13 +0300 +commit 61ee82cb1232a402c82282bbae42821f2b952b0d +Author: Jia Tan +Date: 2023-03-06 21:27:53 +0800 - Tests: Silence warnings from clang -Wassign-enum. + xz: Skip Capsicum sandbox system calls when they are unsupported. - Also changed 999 to 99 so it fits even if lzma_check happened - to be 8 bits wide. + If a system has the Capsicum header files but does not actually + implement the system calls, then this would render xz unusable. Instead, + we can check if errno == ENOSYS and not issue a fatal error. - tests/test_block_header.c | 3 ++- - tests/test_stream_flags.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) + src/xz/file_io.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) -commit d499e467d99efeaae688564eedc4548837c1416a -Author: Lasse Collin -Date: 2019-06-24 23:52:17 +0300 +commit f070722b57ba975a0dff36492d766f03026b1d21 +Author: Jia Tan +Date: 2023-03-06 21:08:26 +0800 - liblzma: Add a comment. + xz: Reorder cap_enter() to beginning of capsicum sandbox code. + + cap_enter() puts the process into the sandbox. If later calls to + cap_rights_limit() fail, then the process can still have some extra + protections. - src/liblzma/common/stream_encoder_mt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/file_io.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit a12b13c5f0d54c684fa8446f93fdac08ab2a716b -Author: Lasse Collin -Date: 2019-06-24 23:45:21 +0300 +commit f1ab1f6b339d16a53ac53efeb97779ecd2bae70f +Author: Jia Tan +Date: 2023-02-24 23:46:23 +0800 - liblzma: Silence clang -Wmissing-variable-declarations. + liblzma: Clarify lzma_lzma_preset() documentation in lzma12.h. + + lzma_lzma_preset() does not guarentee that the lzma_options_lzma are + usable in an encoder even if it returns false (success). If liblzma + is built with default configurations, then the options will always be + usable. However if the match finders hc3, hc4, or bt4 are disabled, then + the options may not be usable depending on the preset level requested. + + The documentation was updated to reflect this complexity, since this + behavior was unclear before. - src/liblzma/check/crc32_table.c | 3 +++ - src/liblzma/check/crc64_table.c | 3 +++ - 2 files changed, 6 insertions(+) + src/liblzma/api/lzma/lzma12.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit 1b4675cebf7471f7cc9b7072c950e3de97147063 +commit 4b7fb3bf41a0ca4c97fad3799949a2aa61b13b99 Author: Lasse Collin -Date: 2019-06-24 23:25:41 +0300 +Date: 2023-02-27 18:38:35 +0200 - Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT. - - LZMA_TIMED_OUT is *internally* used as a value for lzma_ret - enumeration. Previously it was #defined to 32 and cast to lzma_ret. - That way it wasn't visible in the public API, but this was hackish. + CMake: Require that the C compiler supports C99 or a newer standard. - Now the public API has eight LZMA_RET_INTERNALx members and - LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way - the code is cleaner overall although the public API has a few - extra mysterious enum members. + Thanks to autoantwort for reporting the issue and suggesting + a different patch: + https://github.com/tukaani-project/xz/pull/42 - src/liblzma/api/lzma/base.h | 15 ++++++++++++++- - src/liblzma/common/common.c | 4 +--- - src/liblzma/common/common.h | 5 ++--- - src/xz/message.c | 8 ++++++++ - 4 files changed, 25 insertions(+), 7 deletions(-) + CMakeLists.txt | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit 159c43875eb25deea626ed651274464bae3e32ef -Author: Lasse Collin -Date: 2019-06-24 22:57:43 +0300 +commit 9aa7fdeb04c486d2700967090956af88fdccab7e +Author: Jia Tan +Date: 2023-02-24 18:10:37 +0800 - xz: Silence a warning from clang -Wsign-conversion in main.c. + Tests: Small tweak to test-vli.c. + + The static global variables can be disabled if encoders and decoders + are not built. If they are not disabled and -Werror is used, it will + cause an usused warning as an error. - src/xz/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_vli.c | 2 ++ + 1 file changed, 2 insertions(+) -commit 466cfcd3e52f6750ce28a635997f3dd84fb18515 -Author: Lasse Collin -Date: 2019-06-24 22:52:20 +0300 +commit 3cf72c4bcba5370f07477c9b9b62ae33069ef9a9 +Author: Jia Tan +Date: 2023-02-06 21:46:43 +0800 - xz: Make "headings" static in list.c. + liblzma: Replace '\n' -> newline in filter.h documentation. - Caught by clang -Wmissing-variable-declarations. + The '\n' renders as a newline when the comments are converted to html + by Doxygen. - src/xz/list.c | 2 +- + src/liblzma/api/lzma/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 608517b9b76c41fac6613dbda1193d6f41338e19 -Author: Lasse Collin -Date: 2019-06-24 22:47:39 +0300 +commit 002006be62d77c706565fa6ec828bea64be302da +Author: Jia Tan +Date: 2023-02-06 21:45:37 +0800 - liblzma: Remove incorrect uses of lzma_attribute((__unused__)). + liblzma: Shorten return description for two functions in filter.h. - Caught by clang -Wused-but-marked-unused. + Shorten the description for lzma_raw_encoder_memusage() and + lzma_raw_decoder_memusage(). - src/liblzma/common/alone_decoder.c | 3 +-- - src/liblzma/common/alone_encoder.c | 3 +-- - src/liblzma/lz/lz_decoder.c | 3 +-- - 3 files changed, 3 insertions(+), 6 deletions(-) + src/liblzma/api/lzma/filter.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) -commit c2d2ab6a9d41a2b55d047c5b710aacf80d219255 -Author: Lasse Collin -Date: 2019-06-24 20:53:55 +0300 +commit 463d9359b8595f01d44ada1739d75aeb87f36524 +Author: Jia Tan +Date: 2023-02-06 21:44:45 +0800 - Tests: Silence a warning from -Wsign-conversion. + liblzma: Reword a few lines in filter.h - tests/create_compress_files.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + src/liblzma/api/lzma/filter.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit 2402f7873dcae719d0ebddd23bb579074519ac52 -Author: Lasse Collin -Date: 2019-06-24 20:45:49 +0300 +commit 01441df92c0fd6a6c02fe5ac27982a54ce887cc0 +Author: Jia Tan +Date: 2023-02-06 21:35:06 +0800 - xz: Fix an integer overflow with 32-bit off_t. + liblzma: Improve documentation in filter.h. + + All functions now explicitly specify parameter and return values. + The notes and code annotations were moved before the parameter and + return value descriptions for consistency. - Or any off_t which isn't very big (like signed 64 bit integer - that most system have). A small off_t could overflow if the - file being decompressed had long enough run of zero bytes, - which would result in corrupt output. + Also, the description above lzma_filter_encoder_is_supported() about + not being able to list available filters was removed since + lzma_str_list_filters() will do this. - src/xz/file_io.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) + src/liblzma/api/lzma/filter.h | 226 ++++++++++++++++++++++++++---------------- + 1 file changed, 143 insertions(+), 83 deletions(-) -commit 4fd3a8dd0b60f029e1c66a0ee634f9e9fda3caa9 +commit 805b45cd60bfd5da3d3d89077de3789df179b324 Author: Lasse Collin -Date: 2019-06-24 01:24:17 +0300 +Date: 2023-02-23 20:46:16 +0200 - xz: Cleanup io_seek_src() a bit. - - lseek() returns -1 on error and checking for -1 is nicer. + Update THANKS. - src/xz/file_io.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit dfda7cf6afa486e10df035327d68753896dfb48a +commit 30e95bb44c36ae26b2ab12a94343b215fec285e7 Author: Lasse Collin -Date: 2019-06-24 00:57:23 +0300 +Date: 2023-02-21 22:57:10 +0200 - Tests: Remove a duplicate branch from tests/tests.h. + liblzma: Avoid null pointer + 0 (undefined behavior in C). - The duplication was introduced about eleven years ago and - should have been cleaned up back then already. + In the C99 and C17 standards, section 6.5.6 paragraph 8 means that + adding 0 to a null pointer is undefined behavior. As of writing, + "clang -fsanitize=undefined" (Clang 15) diagnoses this. However, + I'm not aware of any compiler that would take advantage of this + when optimizing (Clang 15 included). It's good to avoid this anyway + since compilers might some day infer that pointer arithmetic implies + that the pointer is not NULL. That is, the following foo() would then + unconditionally return 0, even for foo(NULL, 0): - This was caught by -Wduplicated-branches. - - tests/tests.h | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit 1d4a904d8fb634bd5a04f7fbdd17d3739f3d8866 -Author: Lasse Collin -Date: 2019-06-24 00:40:45 +0300 - - xz: Change io_seek_src and io_pread arguments from off_t to uint64_t. + void bar(char *a, char *b); - This helps fixing warnings from -Wsign-conversion and makes the - code look better too. - - src/xz/file_io.c | 16 ++++++++++++---- - src/xz/file_io.h | 4 ++-- - src/xz/list.c | 9 ++++----- - 3 files changed, 18 insertions(+), 11 deletions(-) - -commit 50120deb0159fcb53ee1a6caffb2bb81a1ecd990 -Author: Lasse Collin -Date: 2019-06-24 00:12:38 +0300 - - xz: list.c: Fix some warnings from -Wsign-conversion. + int foo(char *a, size_t n) + { + bar(a, a + n); + return a == NULL; + } + + In contrast to C, C++ explicitly allows null pointer + 0. So if + the above is compiled as C++ then there is no undefined behavior + in the foo(NULL, 0) call. + + To me it seems that changing the C standard would be the sane + thing to do (just add one sentence) as it would ensure that a huge + amount of old code won't break in the future. Based on web searches + it seems that a large number of codebases (where null pointer + 0 + occurs) are being fixed instead to be future-proof in case compilers + will some day optimize based on it (like making the above foo(NULL, 0) + return 0) which in the worst case will cause security bugs. + + Some projects don't plan to change it. For example, gnulib and thus + many GNU tools currently require that null pointer + 0 is defined: + + https://lists.gnu.org/archive/html/bug-gnulib/2021-11/msg00000.html + + https://www.gnu.org/software/gnulib/manual/html_node/Other-portability-assumptions.html + + In XZ Utils null pointer + 0 issue should be fixed after this + commit. This adds a few if-statements and thus branches to avoid + null pointer + 0. These check for size > 0 instead of ptr != NULL + because this way bugs where size > 0 && ptr == NULL will likely + get caught quickly. None of them are in hot spots so it shouldn't + matter for performance. + + A little less readable version would be replacing + + ptr + offset + + with + + offset != 0 ? ptr + offset : ptr + + or creating a macro for it: + + #define my_ptr_add(ptr, offset) \ + ((offset) != 0 ? ((ptr) + (offset)) : (ptr)) + + Checking for offset != 0 instead of ptr != NULL allows GCC >= 8.1, + Clang >= 7, and Clang-based ICX to optimize it to the very same code + as ptr + offset. That is, it won't create a branch. So for hot code + this could be a good solution to avoid null pointer + 0. Unfortunately + other compilers like ICC 2021 or MSVC 19.33 (VS2022) will create a + branch from my_ptr_add(). + + Thanks to Marcin Kowalczyk for reporting the problem: + https://github.com/tukaani-project/xz/issues/36 - src/xz/list.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + src/liblzma/common/block_decoder.c | 5 ++++- + src/liblzma/common/block_encoder.c | 7 +++++-- + src/liblzma/common/common.c | 20 ++++++++++++++------ + src/liblzma/common/index_decoder.c | 13 ++++++++++--- + src/liblzma/common/index_encoder.c | 11 +++++++++-- + src/liblzma/common/index_hash.c | 13 ++++++++++--- + src/liblzma/common/lzip_decoder.c | 6 +++++- + src/liblzma/delta/delta_decoder.c | 7 ++++++- + src/liblzma/delta/delta_encoder.c | 12 ++++++++++-- + src/liblzma/simple/simple_coder.c | 6 ++++-- + 10 files changed, 77 insertions(+), 23 deletions(-) -commit d0a78751eb54fb1572002746c533936a118e4e42 -Author: Lasse Collin -Date: 2019-06-23 23:22:45 +0300 +commit fa9065fac54194fe0407fc7f0cc9633fdce13c21 +Author: Jia Tan +Date: 2023-02-07 00:00:44 +0800 - tuklib_mbstr_width: Fix a warning from -Wsign-conversion. + liblzma: Adjust container.h for consistency with filter.h. - src/common/tuklib_mbstr_width.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/container.h | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) -commit 7883d73530b4b2a701ddd7d50c35676cbc158039 -Author: Lasse Collin -Date: 2019-06-23 23:19:34 +0300 +commit 00a721b63d82dfb658dca8d8cb599d8a245c663f +Author: Jia Tan +Date: 2023-02-07 00:00:09 +0800 - xz: Fix some of the warnings from -Wsign-conversion. + liblzma: Fix small typos and reword a few things in filter.h. - src/xz/args.c | 4 ++-- - src/xz/coder.c | 4 ++-- - src/xz/file_io.c | 5 +++-- - src/xz/message.c | 4 ++-- - src/xz/mytime.c | 4 ++-- - src/xz/options.c | 2 +- - src/xz/util.c | 4 ++-- - 7 files changed, 14 insertions(+), 13 deletions(-) + src/liblzma/api/lzma/container.h | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) -commit c2b994fe3d35e9e575c28869a2f7f534f2495d05 -Author: Lasse Collin -Date: 2019-06-23 22:27:45 +0300 +commit 5b1c171d4ffe89ef18fa31509bb0185d6fd11d39 +Author: Jia Tan +Date: 2023-02-06 23:42:08 +0800 - tuklib_cpucores: Silence warnings from -Wsign-conversion. + liblzma: Convert list of flags in lzma_mt to bulleted list. - src/common/tuklib_cpucores.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + src/liblzma/api/lzma/container.h | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) -commit 07c4fa9e1a195e0543f271380c8de22a3ab145ff -Author: Lasse Collin -Date: 2019-06-23 21:40:47 +0300 +commit dbd47622eb99fefb3538a22baec3def002aa56f5 +Author: Jia Tan +Date: 2023-01-26 23:17:41 +0800 - xzdec: Fix warnings from -Wsign-conversion. + liblzma: Fix typo in documentation in container.h + + lzma_microlzma_decoder -> lzma_microlzma_encoder - src/xzdec/xzdec.c | 2 +- + src/liblzma/api/lzma/container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit dfac2c9a1d7d4a2b8a5d7c9c6d567dee48318bcf -Author: Lasse Collin -Date: 2019-06-23 21:38:56 +0300 +commit 14cd30806d69e55906073745bcce3ee50e0ec942 +Author: Jia Tan +Date: 2023-01-26 23:16:34 +0800 - liblzma: Fix warnings from -Wsign-conversion. + liblzma: Improve documentation for container.h - Also, more parentheses were added to the literal_subcoder - macro in lzma_comon.h (better style but no functional change - in the current usage). - - src/liblzma/common/block_header_decoder.c | 2 +- - src/liblzma/delta/delta_decoder.c | 2 +- - src/liblzma/lzma/fastpos.h | 2 +- - src/liblzma/lzma/lzma2_decoder.c | 8 ++++---- - src/liblzma/lzma/lzma_common.h | 3 ++- - src/liblzma/lzma/lzma_decoder.c | 16 ++++++++-------- - src/liblzma/simple/arm.c | 6 +++--- - src/liblzma/simple/armthumb.c | 8 ++++---- - src/liblzma/simple/ia64.c | 2 +- - src/liblzma/simple/powerpc.c | 9 +++++---- - src/liblzma/simple/x86.c | 2 +- - 11 files changed, 31 insertions(+), 29 deletions(-) - -commit 41838dcc26375f6aa393a63e4d81e2f4d223de07 -Author: Lasse Collin -Date: 2019-06-23 19:33:55 +0300 - - tuklib_integer: Silence warnings from -Wsign-conversion. + Standardizing each function to always specify parameters and return + values. Also moved the parameters and return values to the end of each + function description. - src/common/tuklib_integer.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/liblzma/api/lzma/container.h | 146 +++++++++++++++++++++++++-------------- + 1 file changed, 93 insertions(+), 53 deletions(-) -commit 3ce05d235f736d392347a05086b8033416874b87 -Author: Lasse Collin -Date: 2019-06-20 19:40:30 +0300 +commit c9c8bfae3502842dcead85eeb2b951b437c2cd88 +Author: Jia Tan +Date: 2023-02-22 20:59:41 +0800 - tuklib_integer: Fix usage of conv macros. - - Use a temporary variable instead of e.g. - conv32le(unaligned_read32ne(buf)) because the macro can - evaluate its argument multiple times. + CMake: Add LZIP decoder test to list of tests. - src/common/tuklib_integer.h | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) -commit b525b0c0ef40cd89b69294c9b8d57f4a8db58e1f +commit b9f171dd00a3cc32b6d41ea8e082cf545640ec2a Author: Lasse Collin -Date: 2019-06-03 20:44:19 +0300 +Date: 2023-02-17 20:56:49 +0200 Update THANKS. THANKS | 1 + 1 file changed, 1 insertion(+) -commit 039a168e8cf201d5104a25ec41f0cf25eda6cc53 +commit 2ee86d20e49985b903b78ebcfa3fa672e73e93aa Author: Lasse Collin -Date: 2019-06-03 20:41:54 +0300 +Date: 2023-02-17 20:48:28 +0200 - liblzma: Fix comments. + Build: Use only the generic symbol versioning on MicroBlaze. + + On MicroBlaze, GCC 12 is broken in sense that + __has_attribute(__symver__) returns true but it still doesn't + support the __symver__ attribute even though the platform is ELF + and symbol versioning is supported if using the traditional + __asm__(".symver ...") method. Avoiding the traditional method is + good because it breaks LTO (-flto) builds with GCC. + + See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 + + For now the only extra symbols in liblzma_linux.map are the + compatibility symbols with the patch that spread from RHEL/CentOS 7. + These require the use of __symver__ attribute or __asm__(".symver ...") + in the C code. Compatibility with the patch from CentOS 7 doesn't + seem valuable on MicroBlaze so use liblzma_generic.map on MicroBlaze + instead. It doesn't require anything special in the C code and thus + no LTO issues either. + + An alternative would be to detect support for __symver__ + attribute in configure.ac and CMakeLists.txt and fall back + to __asm__(".symver ...") but then LTO would be silently broken + on MicroBlaze. It sounds likely that MicroBlaze is a special + case so let's treat it as a such because that is simpler. If + a similar issue exists on some other platform too then hopefully + someone will report it and this can be reconsidered. + + (This doesn't do the same fix in CMakeLists.txt. Perhaps it should + but perhaps CMake build of liblzma doesn't matter much on MicroBlaze. + The problem breaks the build so it's easy to notice and can be fixed + later.) - Thanks to Bruce Stark. + Thanks to Vincent Fazio for reporting the problem and proposing + a patch (in the end that solution wasn't used): + https://github.com/tukaani-project/xz/pull/32 - src/liblzma/common/alone_encoder.c | 4 ++-- - src/liblzma/common/block_util.c | 2 +- - src/liblzma/common/common.c | 2 +- - src/liblzma/common/filter_common.h | 2 +- - src/liblzma/common/filter_decoder.h | 2 +- - src/liblzma/common/filter_flags_encoder.c | 2 +- - 6 files changed, 7 insertions(+), 7 deletions(-) + configure.ac | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) -commit c460f6defebc5a81bbca90adc2476154ca244f69 +commit d831072cceca458d94d2d5da201862f6d43a417b Author: Lasse Collin -Date: 2019-06-02 00:50:59 +0300 +Date: 2023-02-16 21:09:00 +0200 - liblzma: Fix one more unaligned read to use unaligned_read16ne(). + liblzma: Very minor API doc tweaks. + + Use "member" to refer to struct members as that's the term used + by the C standard. + + Use lzma_options_delta.dist and such in docs so that in Doxygen's + HTML output they will link to the doc of the struct member. + + Clean up a few trailing white spaces too. - src/liblzma/lz/lz_encoder_hash.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/block.h | 6 +++--- + src/liblzma/api/lzma/delta.h | 6 +++--- + src/liblzma/api/lzma/index.h | 10 +++++----- + src/liblzma/api/lzma/stream_flags.h | 6 +++--- + 4 files changed, 14 insertions(+), 14 deletions(-) -commit c81d77c537f0b8c8672868e1dc6cf7290ce4a25b -Author: Lasse Collin -Date: 2019-06-01 21:41:55 +0300 +commit f029daea39c215fd7d5cb6b6798818b055cf5b22 +Author: Jia Tan +Date: 2023-02-17 00:54:33 +0800 - Update THANKS. + liblzma: Adjust spacing in doc headers in bcj.h. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/api/lzma/bcj.h | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) -commit 386394fc9fcde2615391f804eaa466749f96f4ef -Author: Lasse Collin -Date: 2019-06-01 21:36:13 +0300 +commit a5de68bac2bb7e1b9119e6cea7d761a22ea73e9c +Author: Jia Tan +Date: 2023-02-17 00:44:44 +0800 - liblzma: memcmplen: Use ctz32() from tuklib_integer.h. - - The same compiler-specific #ifdefs are already in tuklib_integer.h + liblzma: Adjust documentation in bcj.h for consistent style. - src/liblzma/common/memcmplen.h | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) + src/liblzma/api/lzma/bcj.h | 43 ++++++++++++++++++++++--------------------- + 1 file changed, 22 insertions(+), 21 deletions(-) -commit 264ab971ce2994baac41b1579c9c35aba7743fc8 -Author: Lasse Collin -Date: 2019-06-01 21:30:03 +0300 +commit efa498c13b883810497e0ea8a169efd6f48f5026 +Author: Jia Tan +Date: 2023-02-17 00:36:05 +0800 - tuklib_integer: Cleanup MSVC-specific code. + liblzma: Rename field => member in documentation. + + Also adjusted preset value => preset level. - src/common/tuklib_integer.h | 20 +++++++++----------- - 1 file changed, 9 insertions(+), 11 deletions(-) + src/liblzma/api/lzma/base.h | 18 +++++++-------- + src/liblzma/api/lzma/block.h | 44 ++++++++++++++++++------------------- + src/liblzma/api/lzma/container.h | 26 +++++++++++----------- + src/liblzma/api/lzma/delta.h | 12 +++++----- + src/liblzma/api/lzma/index.h | 30 ++++++++++++------------- + src/liblzma/api/lzma/lzma12.h | 28 +++++++++++------------ + src/liblzma/api/lzma/stream_flags.h | 32 +++++++++++++-------------- + 7 files changed, 95 insertions(+), 95 deletions(-) -commit 33773c6f2a8711d4aa6656795db52c59a28580ec +commit 718b22a6c5e3ee5de123323ea798872381f9320e Author: Lasse Collin -Date: 2019-06-01 19:01:21 +0300 +Date: 2023-02-16 17:59:50 +0200 - liblzma: Use unaligned_readXXne functions instead of type punning. + liblzma: Silence a warning from MSVC. - Now gcc -fsanitize=undefined should be clean. + It gives C4146 here since unary minus with unsigned integer + is still unsigned (which is the intention here). Doing it + with substraction makes it clearer and avoids the warning. - Thanks to Jeffrey Walton. + Thanks to Nathan Moinvaziri for reporting this. - src/liblzma/common/memcmplen.h | 12 ++++++------ - src/liblzma/lzma/lzma_encoder_private.h | 2 +- - 2 files changed, 7 insertions(+), 7 deletions(-) + src/liblzma/check/crc64_fast.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e5f13a66567b1987e0aae42c6fdcd277bb5810ba -Author: Lasse Collin -Date: 2019-06-01 18:46:54 +0300 +commit 87c53553fa7d50f777b4edfa99f2083628f590fe +Author: Jia Tan +Date: 2023-02-16 21:04:54 +0800 - tuklib_integer: Autodetect support for unaligned access on ARM. + liblzma: Improve documentation for stream_flags.h + + Standardizing each function to always specify parameters and return + values. Also moved the parameters and return values to the end of each + function description. - The result is used as the default for --enable-unaligned-access. - The test should work with GCC and Clang. + A few small things were reworded and long sentences broken up. - m4/tuklib_integer.m4 | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/liblzma/api/lzma/stream_flags.h | 76 ++++++++++++++++++++++--------------- + 1 file changed, 46 insertions(+), 30 deletions(-) -commit 3bc112c2d38d5f348bce7bc2422286b1692c7490 -Author: Lasse Collin -Date: 2019-06-01 18:41:16 +0300 +commit 13d99e75a543e9e5f8633cc241eae55b91a3b242 +Author: Jia Tan +Date: 2023-02-14 21:50:16 +0800 - tuklib_integer: Improve unaligned memory access. - - Now memcpy() or GNU C packed structs for unaligned access instead - of type punning. See the comment in this commit for details. - - Avoiding type punning with unaligned access is needed to - silence gcc -fsanitize=undefined. + liblzma: Improve documentation in lzma12.h. - New functions: unaliged_readXXne and unaligned_writeXXne where - XX is 16, 32, or 64. + All functions now explicitly specify parameter and return values. - src/common/tuklib_integer.h | 180 +++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 168 insertions(+), 12 deletions(-) + src/liblzma/api/lzma/lzma12.h | 32 +++++++++++++++++++++++--------- + 1 file changed, 23 insertions(+), 9 deletions(-) -commit 2a22de439ec63da1927b640eda309296a1e8dce5 -Author: Lasse Collin -Date: 2019-05-13 20:05:17 +0300 +commit 43ec344c868f930e96879eb9e49212cce92a9884 +Author: Jia Tan +Date: 2023-01-27 22:44:06 +0800 - liblzma: Avoid memcpy(NULL, foo, 0) because it is undefined behavior. - - I should have always known this but I didn't. Here is an example - as a reminder to myself: - - int mycopy(void *dest, void *src, size_t n) - { - memcpy(dest, src, n); - return dest == NULL; - } - - In the example, a compiler may assume that dest != NULL because - passing NULL to memcpy() would be undefined behavior. Testing - with GCC 8.2.1, mycopy(NULL, NULL, 0) returns 1 with -O0 and -O1. - With -O2 the return value is 0 because the compiler infers that - dest cannot be NULL because it was already used with memcpy() - and thus the test for NULL gets optimized out. + liblzma: Improve documentation in check.h. - In liblzma, if a null-pointer was passed to memcpy(), there were - no checks for NULL *after* the memcpy() call, so I cautiously - suspect that it shouldn't have caused bad behavior in practice, - but it's hard to be sure, and the problematic cases had to be - fixed anyway. + All functions now explicitly specify parameter and return values. + Also moved the note about SHA-256 functions not being exported to the + top of the file. + + src/liblzma/api/lzma/check.h | 41 ++++++++++++++++++++++++++++------------- + 1 file changed, 28 insertions(+), 13 deletions(-) + +commit 9c71db4e884fd49aea3d1e711036bff45ca66487 +Author: Jia Tan +Date: 2023-02-08 21:33:52 +0800 + + liblzma: Improve documentation in index.h - Thanks to Jeffrey Walton. + All functions now explicitly specify parameter and return values. - src/liblzma/common/common.c | 6 +++++- - src/liblzma/lz/lz_decoder.c | 12 +++++++++--- - src/liblzma/simple/simple_coder.c | 10 +++++++++- - 3 files changed, 23 insertions(+), 5 deletions(-) + src/liblzma/api/lzma/index.h | 177 ++++++++++++++++++++++++++++++------------- + 1 file changed, 126 insertions(+), 51 deletions(-) -commit d3fc850cfedc058247d9e334ce59bbc8f2286d8a -Author: Lasse Collin -Date: 2019-05-11 20:56:08 +0300 +commit 421f2f2e160720f6009e3b6a125cafe2feaa9419 +Author: Jia Tan +Date: 2023-02-08 20:35:32 +0800 - Update THANKS. + liblzma: Reword a comment in index.h. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/api/lzma/index.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 4adb8288ab61d5f14e212007b8742df0710baf73 -Author: Lasse Collin -Date: 2019-05-11 20:54:12 +0300 +commit b67539484981351d501b68de5e925425e50c59b1 +Author: Jia Tan +Date: 2023-02-08 20:30:23 +0800 - xz: Update xz man page date. + liblzma: Omit lzma_index_iter's internal field from Doxygen docs. + + Add \private above this field and its sub-fields since it is not meant + to be modified by users. - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/index.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit 2fb0ddaa557ce86e38fe06439930fa8665f092fd -Author: Antoine Cœur -Date: 2019-05-08 13:30:57 +0800 +commit 0c9e4fc2ad6d88d54f299240fcc5a2ce7d695d96 +Author: Jia Tan +Date: 2023-01-21 21:32:03 +0800 - spelling + liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR. + + LZMA_MEMLIMIT_ERROR was missing the "<" character needed to put + documentation after a member. - Doxyfile.in | 2 +- - NEWS | 2 +- - doc/examples/11_file_info.c | 2 +- - src/liblzma/api/lzma/block.h | 2 +- - src/liblzma/api/lzma/hardware.h | 2 +- - src/liblzma/api/lzma/lzma12.h | 2 +- - src/liblzma/api/lzma/vli.h | 2 +- - src/liblzma/common/file_info.c | 4 ++-- - src/liblzma/common/hardware_physmem.c | 2 +- - src/liblzma/common/index.c | 4 ++-- - src/liblzma/common/stream_encoder_mt.c | 2 +- - src/liblzma/common/vli_decoder.c | 2 +- - src/liblzma/lz/lz_decoder.c | 2 +- - src/scripts/xzgrep.in | 2 +- - src/xz/args.c | 2 +- - src/xz/coder.c | 4 ++-- - src/xz/list.c | 4 ++-- - src/xz/main.c | 2 +- - src/xz/mytime.h | 2 +- - src/xz/private.h | 2 +- - src/xz/xz.1 | 2 +- - windows/build.bash | 2 +- - 22 files changed, 26 insertions(+), 26 deletions(-) + src/liblzma/api/lzma/base.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 4ed339606156bd313ed99237485cb8ed0362d64f -Author: Lasse Collin -Date: 2019-05-01 18:43:10 +0300 +commit 816fec125aa74bcef46512c73acc6d9e5a700d15 +Author: Jia Tan +Date: 2023-01-21 00:29:38 +0800 - xz: In xz -lvv look at the widths of the check names too. + liblzma: Improve documentation for base.h. - Now the widths of the check names is used to adjust the width - of the Check column. This way there no longer is a need to restrict - the widths of the check names to be at most ten terminal-columns. + Standardizing each function to always specify params and return values. + Also fixed a small grammar mistake. + + src/liblzma/api/lzma/base.h | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) - src/xz/list.c | 32 ++++++++++++++++++++++++++------ - 1 file changed, 26 insertions(+), 6 deletions(-) +commit 862dacef1a4e7e1b28d465956fa4244ed01df154 +Author: Jia Tan +Date: 2023-02-14 00:12:34 +0800 -commit 2f4281a1001dcf7fdf1418c0c0d246c16561fb65 -Author: Lasse Collin -Date: 2019-05-01 18:33:25 +0300 + liblzma: Add one more missing [out] annotation in vli.h - xz: Fix xz -lvv column alignment to look at the translated strings. + src/liblzma/api/lzma/vli.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - src/xz/list.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) +commit 867b08ae4254bf55dd1f7fd502cc618231b92f75 +Author: Jia Tan +Date: 2023-02-14 00:08:33 +0800 -commit 01d01b7c7c0b8eaf7f780a5584ec52c22d10fa4a -Author: Lasse Collin -Date: 2019-05-01 16:52:36 +0300 + liblzma: Minor improvements to vli.h. + + Added [out] annotations to parameters that are pointers and can have + their value changed. Also added a clarification to lzma_vli_is_valid. - Update THANKS. + src/liblzma/api/lzma/vli.h | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) - THANKS | 1 + - 1 file changed, 1 insertion(+) +commit 90d0e628ff11e5030bcc4fc000bca056adda6603 +Author: Jia Tan +Date: 2023-02-10 21:38:02 +0800 -commit 64030c6b17f7743df03a9948a0ccfcdf40c6b97c -Author: Lasse Collin -Date: 2019-05-01 16:43:16 +0300 + liblzma: Add comments for macros in delta.h. + + Document LZMA_DELTA_DIST_MIN and LZMA_DELTA_DIST_MAX for completeness + and to avoid Doxygen warnings. + + src/liblzma/api/lzma/delta.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 9255fffdb13e59874bf7f95c370c410ad3a7e114 +Author: Jia Tan +Date: 2023-02-10 21:35:23 +0800 - Windows: Update VS version in windows/vs2019/config.h. + liblzma: Improve documentation in index_hash.h. + + All functions now explicitly specify parameter and return values. + Also reworded the description of lzma_index_hash_init() for readability. - windows/vs2019/config.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/index_hash.h | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) -commit 2dc9117f5fbfab31444a3ca1e55795ccfa8a9f51 -Author: Julien Marrec -Date: 2019-04-25 17:44:06 +0200 +commit 1dbe12b90cff79bb51923733ac0840747b4b4131 +Author: Lasse Collin +Date: 2023-02-07 19:07:45 +0200 - Windows: Upgrade solution itself + xz: Improve the comment about start_time in mytime.c. + + start_time is relative to an arbitary point in time, it's not + time of day, so using it for anything else than time differences + wouldn't make sense. - windows/vs2019/xz_win.sln | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/xz/mytime.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) -commit ac31413916fa9b11bab17f0f0aa63e2869360f6f -Author: Julien Marrec -Date: 2019-04-25 17:40:24 +0200 +commit 7673ef5aa80c1af7fb693360dd82f527b46c2c56 +Author: Jia Tan +Date: 2023-02-04 21:06:35 +0800 - Windows: Upgrade solution with VS2019 + Build: Adjust CMake version search regex. + + Now, the LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, and LZMA_VERSION_PATCH + macros do not need to be on consecutive lines in version.h. They can be + separated by more whitespace, comments, or even other content, as long + as they appear in the proper order (major, minor, patch). - windows/vs2019/liblzma.vcxproj | 15 ++++++++------- - windows/vs2019/liblzma_dll.vcxproj | 15 ++++++++------- - 2 files changed, 16 insertions(+), 14 deletions(-) + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) -commit be25a0c37ba92a20c390b4d17fe502457fe96b71 -Author: Julien Marrec -Date: 2019-04-25 17:39:32 +0200 +commit b8bce89be7fb5bffe5fef4a2782ca9b2b107eaac +Author: Jia Tan +Date: 2023-02-04 12:01:23 +0800 - Windows: Duplicate windows/vs2017 before upgrading + xz: Add a comment clarifying the use of start_time in mytime.c. - windows/vs2019/config.h | 148 ++++++++++++++ - windows/vs2019/liblzma.vcxproj | 356 ++++++++++++++++++++++++++++++++++ - windows/vs2019/liblzma_dll.vcxproj | 385 +++++++++++++++++++++++++++++++++++++ - windows/vs2019/xz_win.sln | 48 +++++ - 4 files changed, 937 insertions(+) + src/xz/mytime.c | 5 +++++ + 1 file changed, 5 insertions(+) -commit d0e58b3a51e8e616f3dc26ec7b7e4aa0fa6991ad -Author: Lasse Collin -Date: 2019-03-04 22:49:04 +0200 +commit 912af91b10a18fb9bb3167247ecaaefca8248ee9 +Author: Jia Tan +Date: 2023-01-26 09:50:21 +0800 - README: Update translation instructions. + liblzma: Improve documentation for version.h. - XZ Utils is now part of the Translation Project - . + Specified parameter and return values for API functions and documented + a few more of the macros. - README | 32 +++++++++++++------------------- - 1 file changed, 13 insertions(+), 19 deletions(-) + src/liblzma/api/lzma/version.h | 29 ++++++++++++++++++++++------- + 1 file changed, 22 insertions(+), 7 deletions(-) -commit a750c35a7d45a16c11c1d40fecee8443c32a9996 -Author: Lasse Collin -Date: 2019-03-04 21:20:39 +0200 +commit 850adec171203cd22b57d016084d713f72ae5307 +Author: Jia Tan +Date: 2023-02-03 22:52:55 +0800 - xz: Automatically align column headings in xz -lvv. + Docs: Omit SIGTSTP not handled from TODO. - src/xz/list.c | 263 ++++++++++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 212 insertions(+), 51 deletions(-) + TODO | 4 ---- + 1 file changed, 4 deletions(-) -commit 6cb42e8aa1dc37bf403a9f5acbd07e86036b7e77 -Author: Lasse Collin -Date: 2019-03-04 01:07:59 +0200 +commit 2c78a83c6faec70154d9eb78022a618ed62cdcb3 +Author: Jia Tan +Date: 2023-02-03 00:33:32 +0800 - xz: Automatically align strings ending in a colon in --list output. + liblzma: Fix bug in lzma_str_from_filters() not checking filters[] length. - This should avoid alignment errors in translations with these - strings. + The bug is only a problem in applications that do not properly terminate + the filters[] array with LZMA_VLI_UNKNOWN or have more than + LZMA_FILTERS_MAX filters. This bug does not affect xz. - src/xz/list.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 102 insertions(+), 12 deletions(-) + src/liblzma/common/string_conversion.c | 7 +++++++ + 1 file changed, 7 insertions(+) -commit 1e3f29b62f2c03e50fc9ebea7b83c1497dd35484 -Author: Lasse Collin -Date: 2019-01-13 17:29:23 +0200 +commit e01f01b9af1c074463b92694a16ecc16a31907c0 +Author: Jia Tan +Date: 2023-02-03 00:32:47 +0800 - Windows/VS2017: Omit WindowsTargetPlatformVersion from project files. - - I understood that if a WTPV is specified, it's often wrong - because different VS installations have different SDK version - installed. Omitting the WTPV tag makes VS2017 default to - Windows SDK 8.1 which often is also missing, so in any case - people may need to specify the WTPV before building. But some - day in the future a missing WTPV tag will start to default to - the latest installed SDK which sounds reasonable: - - https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html + Tests: Create test_filter_str.c. - Thanks to "dom". + Tests lzma_str_to_filters(), lzma_str_from_filters(), and + lzma_str_list_filters() API functions. - windows/INSTALL-MSVC.txt | 4 ++++ - windows/vs2017/liblzma.vcxproj | 1 - - windows/vs2017/liblzma_dll.vcxproj | 1 - - 3 files changed, 4 insertions(+), 2 deletions(-) + CMakeLists.txt | 1 + + tests/Makefile.am | 2 + + tests/test_filter_str.c | 593 ++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 596 insertions(+) -commit 4d86076332aece6314063d3712a5f364172bbb0f -Author: Lasse Collin -Date: 2018-12-20 20:42:29 +0200 +commit 8dfc029e7a4ce45809c30313dc0e502f0d22be26 +Author: Jia Tan +Date: 2023-01-22 08:49:00 +0800 - Update THANKS. + liblzma: Fix typos in comments in string_conversion.c. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/string_conversion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit b55d79461d1f6aeaac03c7dae84481e5eb8bea4c -Author: Lasse Collin -Date: 2018-12-14 20:34:30 +0200 +commit 54ad83c1ae2180dcc0cb2445b181dc1e9732a5d6 +Author: Jia Tan +Date: 2023-02-03 00:20:20 +0800 - xz: Fix a crash in progress indicator when in passthru mode. - - "xz -dcfv not_an_xz_file" crashed (all four options are - required to trigger it). It caused xz to call - lzma_get_progress(&strm, ...) when no coder was initialized - in strm. In this situation strm.internal is NULL which leads - to a crash in lzma_get_progress(). - - The bug was introduced when xz started using lzma_get_progress() - to get progress info for multi-threaded compression, so the - bug is present in versions 5.1.3alpha and higher. + liblzma: Clarify block encoder and decoder documentation. - Thanks to Filip Palian for - the bug report. + Added a few sentences to the description for lzma_block_encoder() and + lzma_block_decoder() to highlight that the Block Header must be coded + before calling these functions. - src/xz/coder.c | 11 +++++++---- - src/xz/message.c | 18 ++++++++++++++++-- - src/xz/message.h | 3 ++- - 3 files changed, 25 insertions(+), 7 deletions(-) + src/liblzma/api/lzma/block.h | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) -commit 4ae5526de013efd1021686fa80bdd10cf1cb9c56 -Author: Lasse Collin -Date: 2018-11-22 17:20:31 +0200 +commit f680e771b3eb2a46310fe85b3e000ac3a1a0640f +Author: Jia Tan +Date: 2023-02-03 00:12:24 +0800 - xz: Update man page timestamp. + Update lzma_block documentation for lzma_block_uncomp_encode(). - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/block.h | 3 +++ + 1 file changed, 3 insertions(+) -commit 6a36d0d5f49e0080ff64dd9ef250abd489bea2ad -Author: Pavel Raiskup -Date: 2018-11-22 15:14:34 +0100 +commit 504cf4af895fd45aad0c56eb3b49d90acd54465b +Author: Jia Tan +Date: 2023-02-03 00:11:37 +0800 - 'have have' typos + liblzma: Minor edits to lzma_block header_size documentation. - src/xz/signals.c | 2 +- - src/xz/xz.1 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/liblzma/api/lzma/block.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 9eca51ef805ed8002a851df1b4995d71826c8b6e -Author: Lasse Collin -Date: 2018-11-02 20:40:48 +0200 +commit 115b720fb521f99aa832d06b2c12b7f8c6c50680 +Author: Jia Tan +Date: 2023-02-03 00:11:07 +0800 - Update THANKS. + liblzma: Enumerate functions that read version in lzma_block. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/api/lzma/block.h | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) -commit 106d1a663d4ba42b63231caa289f531548df81c1 -Author: Lasse Collin -Date: 2018-11-02 20:18:45 +0200 +commit 85ea0979adcf808a3830aefbe7a4ec884e542ea1 +Author: Jia Tan +Date: 2023-02-03 00:10:34 +0800 - Tests: Add a fuzz test program and a config file for OSS-Fuzz. - - Thanks to Bhargava Shastry and Github user pdknsk. + liblzma: Clarify comment in block.h. - tests/Makefile.am | 1 + - tests/ossfuzz/Makefile | 7 ++++ - tests/ossfuzz/config/fuzz.dict | 2 + - tests/ossfuzz/config/fuzz.options | 2 + - tests/ossfuzz/fuzz.c | 82 +++++++++++++++++++++++++++++++++++++++ - 5 files changed, 94 insertions(+) + src/liblzma/api/lzma/block.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit a18ae42a79a19b1394b41eb3e238139fd28012ec -Author: Lasse Collin -Date: 2018-10-26 22:49:10 +0300 +commit 1f7ab90d9ce224230a04de6b921ad6e2029023a8 +Author: Jia Tan +Date: 2023-02-03 00:07:23 +0800 - liblzma: Don't verify header CRC32s if building for fuzz testing. - - FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is #defined when liblzma - is being built for fuzz testing. + liblzma: Improve documentation for block.h. - Most fuzzed inputs would normally get rejected because of incorrect - CRC32 and the actual header decoding code wouldn't get fuzzed. - Disabling CRC32 checks avoids this problem. The fuzzer program - must still use LZMA_IGNORE_CHECK flag to disable verification of - integrity checks of uncompressed data. + Standardizing each function to always specify params and return values. + Output pointer parameters are also marked with doxygen style [out] to + make it clear. Any note sections were also moved above the parameter and + return sections for consistency. - src/liblzma/common/block_header_decoder.c | 5 ++++- - src/liblzma/common/index_decoder.c | 5 ++++- - src/liblzma/common/index_hash.c | 5 ++++- - src/liblzma/common/stream_flags_decoder.c | 10 ++++++++-- - 4 files changed, 20 insertions(+), 5 deletions(-) + src/liblzma/api/lzma/block.h | 96 ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 75 insertions(+), 21 deletions(-) -commit f76f7516d6a1c832f61810c82e92d151cc80966c -Author: Lasse Collin -Date: 2018-07-27 18:10:44 +0300 +commit c563a4bc554a96bd0b6aab3c139715b7ec8f6ca3 +Author: Jia Tan +Date: 2023-02-01 23:38:30 +0800 - xzless: Rename unused variables to silence static analysers. - - In this particular case I don't see this affecting readability - of the code. + liblzma: Clarify a comment about LZMA_STR_NO_VALIDATION. - Thanks to Pavel Raiskup. + The flag description for LZMA_STR_NO_VALIDATION was previously confusing + about the treatment for filters than cannot be used with .xz format + (lzma1) without using LZMA_STR_ALL_FILTERS. Now, it is clear that + LZMA_STR_NO_VALIDATION is not a super set of LZMA_STR_ALL_FILTERS. - src/scripts/xzless.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/api/lzma/filter.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 3cbcaeb07eb7543735befd6f507fdb5fa4363cff -Author: Lasse Collin -Date: 2018-07-27 16:02:58 +0300 +commit 315c64c7e18acc59a745b68148188a73e998252b +Author: Jia Tan +Date: 2023-02-01 21:43:33 +0800 - liblzma: Remove an always-true condition from lzma_index_cat(). + CI: Update .gitignore for artifacts directory in build-aux. - This should help static analysis tools to see that newg - isn't leaked. - - Thanks to Pavel Raiskup. + The workflow action for our CI pipeline can only reference artifacts in + the source directory, so we should ignore these files if the ci_build.sh + is run locally. - src/liblzma/common/index.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .gitignore | 1 + + 1 file changed, 1 insertion(+) -commit 76762ae6098ec55c326f4b4b4a42e8c1918ee81f -Author: Lasse Collin -Date: 2018-05-19 21:23:25 +0300 +commit 2c1341f4fa06e7f487d61142aa354c433e17ec7f +Author: Jia Tan +Date: 2023-02-01 21:36:46 +0800 - liblzma: Improve lzma_properties_decode() API documentation. + CI: Add quotes around variables in a few places. - src/liblzma/api/lzma/filter.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + build-aux/ci_build.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 2267f5b0d20a5d24e93fcd9f72ea7eeb0d89708c -Author: Lasse Collin -Date: 2018-04-29 18:58:19 +0300 +commit 3a401b0e0c7a2658af7801dd0690256ef24149e0 +Author: Jia Tan +Date: 2023-02-01 21:36:22 +0800 - Bump the version number to 5.3.1alpha. + CI: Upload test logs as artifacts if a test fails. - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++-------------- + build-aux/ci_build.sh | 31 ++++++++++++++++++++----- + 2 files changed, 68 insertions(+), 23 deletions(-) -commit cee3021d30704858e4bdd22240e7d28e570d7451 +commit 610dde15a88f12cc540424eb3eb3ed61f3876f74 Author: Lasse Collin -Date: 2018-04-29 18:48:00 +0300 +Date: 2023-01-27 20:02:49 +0200 - extra/scanlzma: Fix compiler warnings. + xz: Use clock_gettime() even if CLOCK_MONOTONIC isn't available. + + mythread.h and thus liblzma already does it. - extra/scanlzma/scanlzma.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/xz/mytime.c | 11 ++++++++--- + src/xz/private.h | 3 +-- + 2 files changed, 9 insertions(+), 5 deletions(-) -commit c5c7ceb08a011b97d261798033e2c39613a69eb7 +commit 2e02877288f6576cd4595e9ac7684f867cd47d68 Author: Lasse Collin -Date: 2018-04-29 18:44:47 +0300 +Date: 2023-01-27 19:41:19 +0200 - DOS: Add file_info.c to the list of files to build. + po4a/po4a.conf: Sort the language identifiers in alphabetical order. - dos/Makefile | 1 + - 1 file changed, 1 insertion(+) + po4a/po4a.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 114cab97af766b21e0fc8620479202fb1e7a5e41 +commit ff592c616eda274215b485cf1b8d34f060c9f3be Author: Lasse Collin -Date: 2018-04-29 18:33:10 +0300 +Date: 2023-01-26 18:29:17 +0200 - Update NEWS for 5.3.1alpha. + xz: Add SIGTSTP handler for progress indicator time keeping. + + This way, if xz is stopped the elapsed time and estimated time + remaining won't get confused by the amount of time spent in + the stopped state. + + This raises SIGSTOP. It's not clear to me if this is the correct way. + POSIX and glibc docs say that SIGTSTP shouldn't stop the process if + it is orphaned but this commit doesn't attempt to handle that. + + Search for SIGTSTP in section 2.4.3: + + https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html - NEWS | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/xz/mytime.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- + src/xz/mytime.h | 6 ++++++ + src/xz/private.h | 12 ++++++++++++ + src/xz/signals.c | 17 ++++++++++++++++- + 4 files changed, 89 insertions(+), 2 deletions(-) -commit b8139e11c512bbf32bf58ab0689f9bb6c52819da -Author: Lasse Collin -Date: 2018-04-29 18:15:37 +0300 +commit 3b1c8ac8d1d553cbb1fb22b545d2b1424c752b76 +Author: Jia Tan +Date: 2023-01-27 20:14:51 +0800 - Add NEWS for 5.2.4. + Translations: Add Brazilian Portuguese translation of man pages. + + Thanks to Rafael Fontenelle. - NEWS | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) + po4a/po4a.conf | 2 +- + po4a/pt_BR.po | 3677 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 3678 insertions(+), 1 deletion(-) -commit 47b59d47cfd904a420fbd45629d168ca1973721d +commit a15a7552f9f67c4e402f5d2967324e0ccfd6fccc Author: Lasse Collin -Date: 2018-02-06 19:36:30 +0200 +Date: 2023-01-26 17:51:06 +0200 - Update THANKS. + Build: Avoid different quoting style in --enable-doxygen doc. - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit bc197991690ede24ab143665b5b0f0f9cb35cc46 -Author: Ben Boeckel -Date: 2018-01-29 13:58:18 -0500 +commit af5a4bd5afc089d9697756dded38feafaa987ae4 +Author: Lasse Collin +Date: 2023-01-26 17:39:46 +0200 - nothrow: use noexcept for C++11 and newer + tuklib_physmem: Check for __has_warning before GCC version. - In C++11, the `throw()` specifier is deprecated and `noexcept` is - preffered instead. + Clang can be configured to fake a too high GCC version so + this way it's more robust. - src/liblzma/api/lzma.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/common/tuklib_physmem.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit fb6d4f83cb6e144734f2a4216bb117bd56dc3cb5 -Author: Lasse Collin -Date: 2018-02-06 18:02:48 +0200 +commit f35d98e20609e0be6a04ae2604bfb7cb9d5bd5e4 +Author: Jia Tan +Date: 2023-01-24 20:48:50 +0800 - liblzma: Remove incorrect #ifdef from range_common.h. - - In most cases it was harmless but it could affect some - custom build systems. + liblzma: Fix documentation in filter.h for lzma_str_to_filters() - Thanks to Pippijn van Steenhoven. + The previous documentation for lzma_str_to_filters() was technically + correct, but misleading. lzma_str_to_filters() returns NULL on success, + which is in practice always defined to 0. This is the same value as + LZMA_OK, but lzma_str_to_filters() does not return lzma_ret so we should + be more clear. - src/liblzma/rangecoder/range_common.h | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + src/liblzma/api/lzma/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit bc577d35c2d0ed17f554d2d8107b2a2a9abbac76 +commit 2f78ecc5939b3d97ddfc2a6bd31b50108a28d0a2 Author: Lasse Collin -Date: 2018-01-10 22:10:39 +0200 +Date: 2023-01-23 23:44:58 +0200 - Update THANKS. + Revert "tuklib_common: Define __has_warning if it is not defined." + + This reverts commit 82e3c968bfa10e3ff13333bd9cbbadb5988d6766. + + Macros in the reserved namespace (_foo or __foo) shouldn't be #defined + without a very good reason. Here the alternative would have been + to #define tuklib_has_warning(str) to an approriate value. + + Also the tuklib_* files should stay namespace clean if possible. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/common/tuklib_common.h | 7 ------- + 1 file changed, 7 deletions(-) -commit 713bbc1a80f26d34c96ed3dbb9887362204de3a1 +commit 8366cf8738e8b7bb74c967d07bf0fd2a1878e575 Author: Lasse Collin -Date: 2018-01-10 21:54:27 +0200 +Date: 2023-01-23 23:38:34 +0200 - tuklib_integer: New Intel C compiler needs immintrin.h. + tuklib_physmem: Clean up the way -Wcast-function-type is silenced on Windows. + + __has_warning and other __has_foo macros are meant to become + compiler-agnostic so it's not good to check for __clang__ with it. - Thanks to Melanie Blower (Intel) for the patch. + This also relied on tuklib_common.h for #defining __has_warning + which was confusing as #defining reserved macros is generally + not a good idea. - src/common/tuklib_integer.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/common/tuklib_physmem.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) -commit a0ee1afbd99da138b559cb27fa2022e7f1ab44f3 +commit 683a3c7e2fcd922200c31078e5c9dd1348e90941 Author: Lasse Collin -Date: 2017-09-24 20:04:24 +0300 +Date: 2023-01-24 00:05:38 +0200 - Update THANKS. + xz: Flip the return value of suffix_is_set to match the documentation. + + Also edit style to match the existing coding style in the project. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/args.c | 6 +++--- + src/xz/suffix.c | 2 +- + src/xz/suffix.h | 1 + + 3 files changed, 5 insertions(+), 4 deletions(-) -commit a1e2c568de29c0b57d873eab40a2879b749da429 -Author: Lasse Collin -Date: 2017-09-16 20:36:20 +0300 +commit cc5aa9ab138beeecaee5a1e81197591893ee9ca0 +Author: Jia Tan +Date: 2023-01-07 21:55:06 +0800 - Windows: Fix paths in VS project files. - - Some paths use slashes instead of backslashes as directory - separators... now it should work (I tested VS2013 version). + xz: Refactor duplicated check for custom suffix when using --format=raw - windows/vs2013/liblzma.vcxproj | 12 ++++++------ - windows/vs2013/liblzma_dll.vcxproj | 24 ++++++++++++------------ - windows/vs2017/liblzma.vcxproj | 12 ++++++------ - windows/vs2017/liblzma_dll.vcxproj | 24 ++++++++++++------------ - 4 files changed, 36 insertions(+), 36 deletions(-) + src/xz/args.c | 8 ++++++++ + src/xz/suffix.c | 26 ++++++++------------------ + src/xz/suffix.h | 7 +++++++ + 3 files changed, 23 insertions(+), 18 deletions(-) -commit cea5cf8d26c9d1dc30a808614d79c0b25640e15e -Author: Lasse Collin -Date: 2017-09-16 12:56:20 +0300 +commit 9663141274e01592a281a7f2df5d7a31a1dac8bf +Author: Jia Tan +Date: 2023-01-20 21:53:14 +0800 - Windows: Update VS2017 project files to include file info decoder. + liblzma: Set documentation on all reserved fields to private. + + This prevents the reserved fields from being part of the generated + Doxygen documentation. - windows/vs2017/liblzma.vcxproj | 2 ++ - windows/vs2017/liblzma_dll.vcxproj | 2 ++ - 2 files changed, 4 insertions(+) + src/liblzma/api/lzma/base.h | 17 +++++++++++++++ + src/liblzma/api/lzma/block.h | 43 +++++++++++++++++++++++++++++++++++++ + src/liblzma/api/lzma/container.h | 24 +++++++++++++++++++++ + src/liblzma/api/lzma/delta.h | 12 +++++++++++ + src/liblzma/api/lzma/index.h | 27 +++++++++++++++++++++++ + src/liblzma/api/lzma/lzma12.h | 22 +++++++++++++++++++ + src/liblzma/api/lzma/stream_flags.h | 28 ++++++++++++++++++++++++ + 7 files changed, 173 insertions(+) -commit 95d563db3ee497b223e522b699c4d4c29943eef0 -Author: Lasse Collin -Date: 2017-09-16 12:54:23 +0300 +commit 6327a045f34d48fc5afc58ba0d32a82c94403049 +Author: Jia Tan +Date: 2022-12-20 21:39:59 +0800 - Windows: Add project files for VS2017. + Doxygen: Update Doxyfile.in from 1.4.7 to 1.8.17. - These files match the v5.2 branch (no file info decoder). + A few Doxygen tags were obsolete from 1.4.7. Version 1.8.17 released + in 2019, so this should be compatible with resonable modern distros. + The purpose of Doxygen these days is for docs on the website, so it + doesn't necessarily have to work for everyone. Just when the maintainers + want to update the docs. - windows/vs2017/config.h | 148 ++++++++++++++ - windows/vs2017/liblzma.vcxproj | 355 ++++++++++++++++++++++++++++++++++ - windows/vs2017/liblzma_dll.vcxproj | 384 +++++++++++++++++++++++++++++++++++++ - windows/vs2017/xz_win.sln | 48 +++++ - 4 files changed, 935 insertions(+) + Doxyfile.in | 2523 ++++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 1893 insertions(+), 630 deletions(-) -commit ab72416d62ea8f50ad31d5b8545fcb6a2bf96b73 -Author: Lasse Collin -Date: 2017-09-16 12:45:50 +0300 +commit bbf71b69ebf9d0d62a0af150a5c37d193b8159ad +Author: Jia Tan +Date: 2023-01-03 20:37:30 +0800 - Windows: Update VS2013 project files to include file info decoder. + Doxygen: Make Doxygen only produce liblzma API documentation by default. + + Doxygen is now configurable in autotools only with + --enable-doxygen=[api|all]. The default is "api", which will only + generate HTML output for liblzma API functions. The LaTex documentation + output was also disabled. - windows/vs2013/liblzma.vcxproj | 2 ++ - windows/vs2013/liblzma_dll.vcxproj | 2 ++ - 2 files changed, 4 insertions(+) + Doxyfile.in | 18 +++++++++--------- + configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 48 insertions(+), 9 deletions(-) -commit 82388980187b0e3794d187762054200bbdcc9a53 -Author: Lasse Collin -Date: 2017-09-16 12:39:43 +0300 +commit 6fcf4671b6047113c583a0919fc850987a4ec5f4 +Author: Jia Tan +Date: 2022-12-21 23:59:43 +0800 - Windows: Move VS2013 files into windows/vs2013 directory. + liblzma: Highlight liblzma API headers should not be included directly. + + This improves the generated Doxygen HTML files to better highlight + how to properly use the liblzma API header files. - windows/{ => vs2013}/config.h | 0 - windows/{ => vs2013}/liblzma.vcxproj | 278 +++++++++++++++--------------- - windows/{ => vs2013}/liblzma_dll.vcxproj | 280 +++++++++++++++---------------- - windows/{ => vs2013}/xz_win.sln | 0 - 4 files changed, 279 insertions(+), 279 deletions(-) + src/liblzma/api/lzma/base.h | 5 +++-- + src/liblzma/api/lzma/bcj.h | 5 +++-- + src/liblzma/api/lzma/block.h | 5 +++-- + src/liblzma/api/lzma/check.h | 5 +++-- + src/liblzma/api/lzma/container.h | 5 +++-- + src/liblzma/api/lzma/delta.h | 5 +++-- + src/liblzma/api/lzma/filter.h | 5 +++-- + src/liblzma/api/lzma/hardware.h | 5 +++-- + src/liblzma/api/lzma/index.h | 5 +++-- + src/liblzma/api/lzma/index_hash.h | 5 +++-- + src/liblzma/api/lzma/lzma12.h | 5 +++-- + src/liblzma/api/lzma/stream_flags.h | 5 +++-- + src/liblzma/api/lzma/version.h | 5 +++-- + src/liblzma/api/lzma/vli.h | 5 +++-- + 14 files changed, 42 insertions(+), 28 deletions(-) -commit 94e3f986aa4e14b4ff01ac24857f499630d6d180 -Author: Lasse Collin -Date: 2017-08-14 20:08:33 +0300 +commit b43ff180fb2e372adce876bfa155fc9bcf0c3db4 +Author: Jia Tan +Date: 2023-01-19 20:35:09 +0800 - Fix or hide warnings from GCC 7's -Wimplicit-fallthrough. + tuklib_physmem: Silence warning from -Wcast-function-type on MinGW-w64. + + tuklib_physmem depends on GetProcAddress() for both MSVC and MinGW-w64 + to retrieve a function address. The proper way to do this is to cast the + return value to the type of function pointer retrieved. Unfortunately, + this causes a cast-function-type warning, so the best solution is to + simply ignore the warning. - src/liblzma/lzma/lzma_decoder.c | 6 ++++++ - src/xz/list.c | 2 ++ - 2 files changed, 8 insertions(+) + src/common/tuklib_physmem.c | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit 0b0e1e6803456aac641a59332200f8e95e2b7ea8 -Author: Alexey Tourbin -Date: 2017-05-16 23:56:35 +0300 +commit 82e3c968bfa10e3ff13333bd9cbbadb5988d6766 +Author: Jia Tan +Date: 2023-01-19 20:32:40 +0800 - Docs: Fix a typo in a comment in doc/examples/02_decompress.c. + tuklib_common: Define __has_warning if it is not defined. + + clang supports the __has_warning macro to determine if the version of + clang compiling the code supports a given warning. If we do not define + it for other compilers, it may cause a preprocessor error. - doc/examples/02_decompress.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/common/tuklib_common.h | 7 +++++++ + 1 file changed, 7 insertions(+) -commit a015cd1f90116e655be4eaf4aad42c4c911c2807 -Author: Lasse Collin -Date: 2017-05-23 18:34:43 +0300 +commit b2ba1a489df451cdcd93b2334e319dd06778de19 +Author: Jia Tan +Date: 2023-01-18 22:11:05 +0800 - xz: Fix "xz --list --robot missing_or_bad_file.xz". - - It ended up printing an uninitialized char-array when trying to - print the check names (column 7) on the "totals" line. + CI: Reorder 32-bit build first for Linux autotool builds. - This also changes the column 12 (minimum xz version) to - 50000002 (xz 5.0.0) instead of 0 when there are no valid - input files. - - Thanks to kidmin for the bug report. + The 32-bit build needs to be first so the configure cache only needs to + be reset one time. The 32-bit build sets the CFLAGS env variable, so any + build using that flag after will fail unless the cache is reset. - src/xz/list.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + .github/workflows/ci.yml | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) -commit c2e29f06a7d1e3ba242ac2fafc69f5d6e92f62cd -Author: Lasse Collin -Date: 2017-04-24 20:20:11 +0300 +commit dd1c1135741057c91e8d018be9ec4d43968b0e64 +Author: Jia Tan +Date: 2023-01-18 21:51:43 +0800 - Docs: Add doc/examples/11_file_info.c. + CI: Enable --config-cache in autotool builds. + + If CFLAGS are set in a build, the cache must be cleared with + "make distclean", or by deleting the cache file. - doc/examples/11_file_info.c | 206 ++++++++++++++++++++++++++++++++++++++++++++ - doc/examples/Makefile | 3 +- - 2 files changed, 208 insertions(+), 1 deletion(-) + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 1520f6ec808896375ac7bf778c449e0f7dea5f46 -Author: Lasse Collin -Date: 2017-04-24 19:48:47 +0300 +commit d3e11477053764c003eec2daa5198c747d70ff69 +Author: Jia Tan +Date: 2023-01-16 21:35:45 +0800 - Build: Omit pre-5.0.0 entries from the generated ChangeLog. - - It makes ChangeLog significantly smaller. + xz: Add missing comment for coder_set_compression_settings() - Makefile.am | 3 ++- + src/xz/coder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -commit 8269782283806c90a8509c2ac2a308344f70e171 -Author: Lasse Collin -Date: 2017-04-24 19:48:23 +0300 +commit 123255b6ed15f4428b2aa92e4962015a5362f6bf +Author: Jia Tan +Date: 2023-01-16 20:55:10 +0800 - xz: Use lzma_file_info_decoder() for --list. + xz: Do not set compression settings with raw format in list mode. + + Calling coder_set_compression_settings() in list mode with verbose mode + on caused the filter chain and memory requirements to print. This was + unnecessary since the command results in an error and not consistent + with other formats like lzma and alone. - src/xz/list.c | 254 ++++++++++------------------------------------------------ - 1 file changed, 44 insertions(+), 210 deletions(-) + src/xz/args.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit e353d0b1cc0d3997ae5048faa8e6786414953e06 -Author: Lasse Collin -Date: 2017-04-24 19:35:50 +0300 +commit 571919c47b9ff5171ede84378620ed0a9aeb98c0 +Author: Jia Tan +Date: 2023-01-13 20:37:06 +0800 - liblzma: Add lzma_file_info_decoder(). + Translations: Update the Brazilian Portuguese translation. - src/liblzma/api/lzma/index.h | 66 ++++ - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/file_info.c | 855 ++++++++++++++++++++++++++++++++++++++++ - src/liblzma/liblzma.map | 7 +- - 4 files changed, 928 insertions(+), 1 deletion(-) + po/pt_BR.po | 603 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 344 insertions(+), 259 deletions(-) -commit 144ef9e19e9496c995b21505dd1e111c442968d1 -Author: Lasse Collin -Date: 2017-04-24 19:30:22 +0300 +commit 81cb02e2c22bbc036cdfaa2d2c4176f6bd60d3cf +Author: Jia Tan +Date: 2023-01-12 23:43:06 +0800 - Update the Git repository URL to HTTPS in ChangeLog. + CI: Disable shared and nls from various jobs in autotool runners. + + Disabling shared library generation and linking should help speed up the + runners. The shared library is still being tested in the 32 bit build + and the full feature. + + Disabling nls is to check for any unexpected warnings or errors. - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/workflows/ci.yml | 56 ++++++++++++++++++++++++------------------------ + 1 file changed, 28 insertions(+), 28 deletions(-) -commit 8c9842c265993d7dd4039f732d3546267fb5ecc4 -Author: Lasse Collin -Date: 2017-04-21 15:05:16 +0300 +commit 58a052198a7bcaf6e958f87fad72e69e19a2579b +Author: Jia Tan +Date: 2023-01-12 23:39:19 +0800 - liblzma: Rename LZMA_SEEK to LZMA_SEEK_NEEDED and seek_in to seek_pos. + CI: Reorder the 32-bit job in the Ubuntu runner. + + Run the 32 bit job sooner since this is a more interesting test than + some of the later jobs. - src/liblzma/api/lzma/base.h | 18 +++++++++--------- - src/liblzma/common/common.c | 2 +- - src/xz/message.c | 2 +- - 3 files changed, 11 insertions(+), 11 deletions(-) + .github/workflows/ci.yml | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit 662b27c417cab248cb365dd7682121bdec4d5ae7 -Author: Lasse Collin -Date: 2017-04-19 22:17:35 +0300 +commit 4110a998b83459fe2bc9bc1bec30ad68afa8f797 +Author: Jia Tan +Date: 2023-01-12 23:09:03 +0800 - Update the home page URLs to HTTPS. + CI: Allow disabling Native Language Support. - COPYING | 2 +- - README | 2 +- - configure.ac | 2 +- - doc/faq.txt | 4 ++-- - dos/config.h | 2 +- - src/common/common_w32res.rc | 2 +- - src/xz/xz.1 | 6 +++--- - src/xzdec/xzdec.1 | 4 ++-- - windows/README-Windows.txt | 2 +- - windows/config.h | 2 +- - 10 files changed, 14 insertions(+), 14 deletions(-) + build-aux/ci_build.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit c28f0b3d00af87b92dda229831548d8eb0067d1d -Author: Lasse Collin -Date: 2017-04-05 18:47:22 +0300 +commit 0dec634e705b5bf89a37c5d62d71e8511d480058 +Author: Jia Tan +Date: 2023-01-12 23:02:20 +0800 - xz: Add io_seek_src(). + CI: Only run autogen.sh if it has not already run. - src/xz/file_io.c | 20 +++++++++++++++++--- - src/xz/file_io.h | 13 +++++++++++++ - 2 files changed, 30 insertions(+), 3 deletions(-) + build-aux/ci_build.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) -commit bba477257d7319c8764890f3669175b866d24944 -Author: Lasse Collin -Date: 2017-03-30 22:01:54 +0300 +commit 32287dc8def94df4546e903495d14c132bd54cc4 +Author: Jia Tan +Date: 2023-01-12 22:58:36 +0800 - xz: Use POSIX_FADV_RANDOM for in "xz --list" mode. - - xz --list is random access so POSIX_FADV_SEQUENTIAL was clearly - wrong. + CI: Allow disabling shared library in autotools builds. - src/xz/file_io.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + build-aux/ci_build.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit 310d19816d1652b0c8bb1b82574d46345d924752 -Author: Lasse Collin -Date: 2017-03-30 20:03:05 +0300 +commit 77d1ebcc99ddd82a300d1838f608150221931dcd +Author: Jia Tan +Date: 2023-01-12 22:44:18 +0800 - liblzma: Make lzma_index_decoder_init() visible to other liblzma funcs. - - This is to allow other functions to use it without going - via the public API (lzma_index_decoder()). + CI: Improve Usage readability and add -h option. - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/index_decoder.c | 10 +++++----- - src/liblzma/common/index_decoder.h | 24 ++++++++++++++++++++++++ - 3 files changed, 30 insertions(+), 5 deletions(-) + build-aux/ci_build.sh | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) -commit a27920002dbc469f778a134fc665b7c3ea73701b +commit a8bb8358d10b059274f3cf993d9b8f490bafb268 Author: Lasse Collin -Date: 2017-03-30 20:00:09 +0300 +Date: 2023-01-12 13:04:05 +0200 - liblzma: Add generic support for input seeking (LZMA_SEEK). + Build: Omit -Wmissing-noreturn from the default warnings. - Also mention LZMA_SEEK in xz/message.c to silence a warning. + It's not that important. It can be annoying in builds that + disable many features since in those cases the tests programs + will correctly trigger this warning with Clang. - src/liblzma/api/lzma/base.h | 31 ++++++++++++++++++++++++++++++- - src/liblzma/common/common.c | 12 +++++++++++- - src/xz/message.c | 1 + - 3 files changed, 42 insertions(+), 2 deletions(-) + configure.ac | 1 - + 1 file changed, 1 deletion(-) -commit a0b1dda409bc3e6e2957a2651663fc411d2caf2d +commit 52dc033d0bde0d19e3912303c6c74bae559d6498 Author: Lasse Collin -Date: 2017-03-30 19:47:45 +0300 +Date: 2023-01-12 06:05:58 +0200 - liblzma: Fix lzma_memlimit_set(strm, 0). - - The 0 got treated specially in a buggy way and as a result - the function did nothing. The API doc said that 0 was supposed - to return LZMA_PROG_ERROR but it didn't. - - Now 0 is treated as if 1 had been specified. This is done because - 0 is already used to indicate an error from lzma_memlimit_get() - and lzma_memusage(). + xz: Use ssize_t for the to-be-ignored return value from write(fd, ptr, 1). - In addition, lzma_memlimit_set() no longer checks that the new - limit is at least LZMA_MEMUSAGE_BASE. It's counter-productive - for the Index decoder and was actually needed only by the - auto decoder. Auto decoder has now been modified to check for - LZMA_MEMUSAGE_BASE. + It makes no difference here as the return value fits into an int + too and it then gets ignored but this looks better. - src/liblzma/api/lzma/base.h | 7 ++++++- - src/liblzma/common/auto_decoder.c | 3 +++ - src/liblzma/common/common.c | 6 ++++-- - 3 files changed, 13 insertions(+), 3 deletions(-) + src/xz/file_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 84462afaada61379f5878e46f8f00e25a1cdcf29 +commit b1a6d180a363d57b2b1c89526ff3f0782bf863d3 Author: Lasse Collin -Date: 2017-03-30 19:16:55 +0300 +Date: 2023-01-12 06:01:12 +0200 - liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder. + xz: Silence warnings from -Wsign-conversion in a 32-bit build. - src/liblzma/api/lzma/container.h | 21 +++++++++++++++++---- - src/liblzma/common/alone_decoder.c | 5 +---- - src/liblzma/common/auto_decoder.c | 5 +---- - src/liblzma/common/stream_decoder.c | 5 +---- - 4 files changed, 20 insertions(+), 16 deletions(-) + src/common/tuklib_mbstr_fw.c | 2 +- + src/xz/list.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit cbc74017939690d13441b8926bb743fb03211b83 +commit 31c21c734b7c7d7428a3da7402a2cb7bc2587339 Author: Lasse Collin -Date: 2017-03-30 18:58:18 +0300 +Date: 2023-01-12 05:38:48 +0200 - liblzma: Fix handling of memlimit == 0 in lzma_index_decoder(). - - It returned LZMA_PROG_ERROR, which was done to avoid zero as - the limit (because it's a special value elsewhere), but using - LZMA_PROG_ERROR is simply inconvenient and can cause bugs. - - The fix/workaround is to treat 0 as if it were 1 byte. It's - effectively the same thing. The only weird consequence is - that then lzma_memlimit_get() will return 1 even when 0 was - specified as the limit. + liblzma: Silence another warning from -Wsign-conversion in a 32-bit build. - This fixes a very rare corner case in xz --list where a specific - memory usage limit and a multi-stream file could print the - error message "Internal error (bug)" instead of saying that - the memory usage limit is too low. - - src/liblzma/api/lzma/index.h | 18 +++++++++++------- - src/liblzma/common/index_decoder.c | 4 ++-- - 2 files changed, 13 insertions(+), 9 deletions(-) - -commit 78ae13bced912b1b92ae927992c99cbcc463cae7 -Author: Lasse Collin -Date: 2016-12-30 13:25:10 +0200 - - Update NEWS for 5.2.3. + It doesn't warn on a 64-bit system because truncating + a ptrdiff_t (signed long) to uint32_t is diagnosed under + -Wconversion by GCC and -Wshorten-64-to-32 by Clang. - NEWS | 39 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) + src/liblzma/lz/lz_encoder_mf.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit 0297863fdb453aed1a25eb025f3ba7bacbbb1357 +commit 37fbdfb7263522c11c7ad2685413d6295532581d Author: Lasse Collin -Date: 2016-12-26 20:55:52 +0200 - - Document --enable-sandbox configure option in INSTALL. - - INSTALL | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -commit d4a0462abe5478193521c14625e1c81fead87f9f -Author: Lasse Collin -Date: 2016-11-21 20:24:50 +0200 - - liblzma: Avoid multiple definitions of lzma_coder structures. - - Only one definition was visible in a translation unit. - It avoided a few casts and temp variables but seems that - this hack doesn't work with link-time optimizations in compilers - as it's not C99/C11 compliant. - - Fixes: - http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html - - src/liblzma/common/alone_decoder.c | 44 +++++---- - src/liblzma/common/alone_encoder.c | 34 ++++--- - src/liblzma/common/auto_decoder.c | 35 ++++--- - src/liblzma/common/block_decoder.c | 41 ++++---- - src/liblzma/common/block_encoder.c | 40 ++++---- - src/liblzma/common/common.h | 18 ++-- - src/liblzma/common/index_decoder.c | 33 ++++--- - src/liblzma/common/index_encoder.c | 16 ++-- - src/liblzma/common/stream_decoder.c | 50 +++++----- - src/liblzma/common/stream_encoder.c | 56 ++++++----- - src/liblzma/common/stream_encoder_mt.c | 124 ++++++++++++++----------- - src/liblzma/delta/delta_common.c | 25 ++--- - src/liblzma/delta/delta_decoder.c | 6 +- - src/liblzma/delta/delta_encoder.c | 12 ++- - src/liblzma/delta/delta_private.h | 4 +- - src/liblzma/lz/lz_decoder.c | 60 ++++++------ - src/liblzma/lz/lz_decoder.h | 13 ++- - src/liblzma/lz/lz_encoder.c | 57 +++++++----- - src/liblzma/lz/lz_encoder.h | 9 +- - src/liblzma/lzma/lzma2_decoder.c | 32 ++++--- - src/liblzma/lzma/lzma2_encoder.c | 51 +++++----- - src/liblzma/lzma/lzma_decoder.c | 27 +++--- - src/liblzma/lzma/lzma_encoder.c | 29 +++--- - src/liblzma/lzma/lzma_encoder.h | 9 +- - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 3 +- - src/liblzma/lzma/lzma_encoder_optimum_normal.c | 23 ++--- - src/liblzma/lzma/lzma_encoder_private.h | 6 +- - src/liblzma/simple/arm.c | 2 +- - src/liblzma/simple/armthumb.c | 2 +- - src/liblzma/simple/ia64.c | 2 +- - src/liblzma/simple/powerpc.c | 2 +- - src/liblzma/simple/simple_coder.c | 61 ++++++------ - src/liblzma/simple/simple_private.h | 12 +-- - src/liblzma/simple/sparc.c | 2 +- - src/liblzma/simple/x86.c | 15 +-- - 35 files changed, 532 insertions(+), 423 deletions(-) - -commit a01794c52add98263b49119842c3e7141d1b9ced -Author: Lasse Collin -Date: 2016-10-24 18:53:25 +0300 +Date: 2023-01-12 04:46:45 +0200 - Update THANKS. + liblzma: Silence a warning from -Wsign-conversion in a 32-bit build. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/common/mythread.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit df8f446e3ad47e5148b8c8d8b6e519d3ce29cb9d +commit 5ce6ddc221d0bfb57d810d845bb65fb0aac0b008 Author: Lasse Collin -Date: 2016-10-24 18:51:36 +0300 +Date: 2023-01-12 04:17:24 +0200 - tuklib_cpucores: Add support for sched_getaffinity(). - - It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better - than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity() - gives the number of cores available to the process instead of - the total number of cores online. + Build: Make configure add more warning flags for GCC and Clang. - As a side effect, this commit fixes a bug on GNU/kFreeBSD where - configure would detect the FreeBSD-specific cpuset_getaffinity() - but it wouldn't actually work because on GNU/kFreeBSD it requires - using -lfreebsd-glue when linking. Now the glibc-specific function - will be used instead. + -Wstrict-aliasing was removed from the list since it is enabled + by -Wall already. - Thanks to Sebastian Andrzej Siewior for the original patch - and testing. + A normal build is clean with these on GNU/Linux x86-64 with + GCC 12.2.0 and Clang 14.0.6. - m4/tuklib_cpucores.m4 | 30 +++++++++++++++++++++++++++++- - src/common/tuklib_cpucores.c | 9 +++++++++ - 2 files changed, 38 insertions(+), 1 deletion(-) + configure.ac | 36 +++++++++++++++++++++++++++++++----- + 1 file changed, 31 insertions(+), 5 deletions(-) -commit 446e4318fa79788e09299d5953b5dd428953d14b +commit bfc3a0a8ac16de90049c1b1ba1445a7626d0230c Author: Lasse Collin -Date: 2016-06-30 20:27:36 +0300 +Date: 2023-01-12 04:14:18 +0200 - xz: Fix copying of timestamps on Windows. + Tests: Fix warnings from clang --Wassign-enum. - xz used to call utime() on Windows, but its result gets lost - on close(). Using _futime() seems to work. + Explicitly casting the integer to lzma_check silences the warning. + Since such an invalid value is needed in multiple tests, a constant + INVALID_LZMA_CHECK_ID was added to tests.h. - Thanks to Martok for reporting the bug: - http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html + The use of 0x1000 for lzma_block.check wasn't optimal as if + the underlying type is a char then 0x1000 will be truncated to 0. + However, in these test cases the value is ignored, thus even with + such truncation the test would have passed. - configure.ac | 2 +- - src/xz/file_io.c | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) + tests/test_block_header.c | 6 +++--- + tests/test_check.c | 2 +- + tests/test_stream_flags.c | 8 ++++---- + tests/tests.h | 9 +++++++++ + 4 files changed, 17 insertions(+), 8 deletions(-) -commit 1b0ac0c53c761263e91e34195cb21dfdcfeac0bd +commit 49245bb31e215ad455a1ab85e4ed6783152dc522 Author: Lasse Collin -Date: 2016-06-16 22:46:02 +0300 +Date: 2023-01-12 03:51:07 +0200 - xz: Silence warnings from -Wlogical-op. + Tests: Silence warnings from -Wsign-conversion. - Thanks to Evan Nemerson. + Note that assigning an unsigned int to lzma_check doesn't warn + on GNU/Linux x86-64 since the enum type is unsigned on that + platform. The enum can be signed on some other platform though + so it's best to use enumeration type lzma_check in these situations. - src/xz/file_io.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + tests/test_check.c | 6 +++--- + tests/test_stream_flags.c | 10 +++++----- + 2 files changed, 8 insertions(+), 8 deletions(-) -commit c83b7a03342c3325ff10400b22ee21edfcd1e026 +commit 3f13bf6b9e8624cbe6d6e3e82d6c98a3ed1ad571 Author: Lasse Collin -Date: 2016-04-10 20:55:49 +0300 +Date: 2023-01-12 03:19:59 +0200 - Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am. + liblzma: Silence warnings from clang -Wconditional-uninitialized. - Thanks to Christian Kujau. + This is similar to 2ce4f36f179a81d0c6e182a409f363df759d1ad0. + The actual initialization of the variables is done inside + mythread_sync() macro. Clang doesn't seem to see that + the initialization code inside the macro is always executed. - src/xz/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/common/stream_decoder_mt.c | 8 +++++--- + src/liblzma/common/stream_encoder_mt.c | 2 +- + 2 files changed, 6 insertions(+), 4 deletions(-) -commit ade31a2bfb95c94d05fbfc0ecbba5d6377f2506e +commit 6c886cc5b3c90c6a75e6be8b1278ec2261e452a6 Author: Lasse Collin -Date: 2016-04-10 20:54:17 +0300 +Date: 2023-01-12 03:11:40 +0200 - Build: Bump GNU Gettext version requirement to 0.19. - - It silences a few warnings and most people probably have - 0.19 even on stable distributions. - - Thanks to Christian Kujau. + Fix warnings from clang -Wdocumentation. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/check/check.h | 4 ---- + src/liblzma/lz/lz_encoder_mf.c | 4 ++-- + src/xz/options.c | 4 ++-- + 3 files changed, 4 insertions(+), 8 deletions(-) -commit ac398c3bafa6e4c80e20571373a96947db863b3d +commit a0e7fb1c1ea658b67f30517f5d1975efd0226dba Author: Lasse Collin -Date: 2016-03-13 20:21:49 +0200 +Date: 2023-01-12 03:04:28 +0200 - liblzma: Disable external SHA-256 by default. - - This is the sane thing to do. The conflict with OpenSSL - on some OSes and especially that the OS-provided versions - can be significantly slower makes it clear that it was - a mistake to have the external SHA-256 support enabled by - default. - - Those who want it can now pass --enable-external-sha256 to - configure. INSTALL was updated with notes about OSes where - this can be a bad idea. - - The SHA-256 detection code in configure.ac had some bugs that - could lead to a build failure in some situations. These were - fixed, although it doesn't matter that much now that the - external SHA-256 is disabled by default. - - MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init - in libc instead of libutil. Support for the libutil version - was removed. + Tests: test_lzip_decoder: Remove trailing white-space. - INSTALL | 36 ++++++++++++++++++++++ - configure.ac | 76 +++++++++++++++++++++++------------------------ - src/liblzma/check/check.h | 16 ++++------ - 3 files changed, 79 insertions(+), 49 deletions(-) + tests/test_lzip_decoder.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 6fd5ecb589a9fdd7a576ea48c4850d496bab9ce5 +commit c0f8d6782f29e219fd496dd23f6a033270509d5c Author: Lasse Collin -Date: 2016-03-10 20:27:05 +0200 +Date: 2023-01-12 03:03:55 +0200 - Update THANKS. + Tests: test_lzip_decoder: Silence warnings from -Wsign-conversion. - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_lzip_decoder.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) -commit 473ef0dc69a30e64d5fa0d34aca02f7309faa3e9 -Author: Lasse Collin -Date: 2016-03-10 20:26:49 +0200 +commit 62efd48a825e8f439e84c85e165d8774ddc68fd2 +Author: Jia Tan +Date: 2023-01-11 23:58:16 +0800 - Build: Avoid SHA256_Init on FreeBSD and MINIX 3. - - On FreeBSD 10 and older, SHA256_Init from libmd conflicts - with libcrypto from OpenSSL. The OpenSSL version has - different sizeof(SHA256_CTX) and it can cause weird - problems if wrong SHA256_Init gets used. - - Looking at the source, MINIX 3 seems to have a similar issue but - I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too. - - NetBSD has SHA256_Init in libc and they had a similar problem, - but they already fixed it in 2009. - - Thanks to Jim Wilcoxson for the bug report that helped - in finding the problem. + Add NEWS for 5.4.1. - configure.ac | 27 +++++++++++++++++++++------ - 1 file changed, 21 insertions(+), 6 deletions(-) + NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 70 insertions(+) -commit faf302137e54d605b44ecf0373cb51a6403a2de1 -Author: Lasse Collin -Date: 2015-11-08 20:16:10 +0200 +commit d1561c47ec8cd3844a785d3741dc932f9b9c5790 +Author: Jia Tan +Date: 2023-01-11 22:46:48 +0800 - tuklib_physmem: Hopefully silence a warning on Windows. + xz: Fix warning -Wformat-nonliteral on clang in message.c. + + clang and gcc differ in how they handle -Wformat-nonliteral. gcc will + allow a non-literal format string as long as the function takes its + format arguments as a va_list. - src/common/tuklib_physmem.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/xz/message.c | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit e52e9151cf8613022d1de4712ff39dbcb666e991 -Author: Lasse Collin -Date: 2015-11-04 23:17:43 +0200 +commit 8c0f115cc489331c48df77beca92fe378039d919 +Author: Jia Tan +Date: 2023-01-11 20:58:31 +0800 - Update THANKS. + Tests: Fix test_filter_flags copy/paste error. - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_filter_flags.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 14115f84a38161d55eaa2d070f08739bde37e966 -Author: Lasse Collin -Date: 2015-11-04 23:14:00 +0200 +commit 25035813d1d596fde692addc33e7f715f1fe55eb +Author: Jia Tan +Date: 2023-01-11 20:42:29 +0800 - liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma. - - When optimizing, GCC can reorder code so that an uninitialized - value gets used in a comparison, which makes Valgrind unhappy. - It doesn't happen when compiled with -O0, which I tend to use - when running Valgrind. + Tests: Fix type-limits warning in test_filter_flags. - Thanks to Rich Prohaska. I remember this being mentioned long - ago by someone else but nothing was done back then. + This only occurs in test_filter_flags when the BCJ filters are not + configured and built. In this case, ARRAY_SIZE() returns 0 and causes a + type-limits warning with the loop variable since an unsigned number will + always be >= 0. - src/liblzma/lz/lz_encoder.c | 4 ++++ - 1 file changed, 4 insertions(+) + tests/test_filter_flags.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) -commit f4c95ba94beb71a608eb6eadbf82b44f53a0260e +commit 0b8fa310cf56fec55663f62340e49e8e1441594f Author: Lasse Collin -Date: 2015-11-03 20:55:45 +0200 +Date: 2023-01-10 22:14:03 +0200 - liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c. + liblzma: CLMUL CRC64: Work around a bug in MSVC, second attempt. - It would be too annoying to update other build systems - just because of this. - - src/liblzma/lzma/Makefile.inc | 2 +- - src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit c7bc20a6f3e71920871d48db31a79ab58b5a0a4b -Author: Lasse Collin -Date: 2015-11-03 20:47:07 +0200 - - Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built. + This affects only 32-bit x86 builds. x86-64 is OK as is. - They all need decoder support and if that isn't available, - there's no point trying to build them. - - configure.ac | 3 +++ - 1 file changed, 3 insertions(+) - -commit 5cbca1205deeb6fb7afe7a864fa68a57466d928a -Author: Lasse Collin -Date: 2015-11-03 20:35:19 +0200 - - Build: Simplify $enable_{encoders,decoders} usage a bit. + I still cannot easily test this myself. The reporter has tested + this and it passes the tests included in the CMake build and + performance is good: raw CRC64 is 2-3 times faster than the + C version of the slice-by-four method. (Note that liblzma doesn't + include a MSVC-compatible version of the 32-bit x86 assembly code + for the slice-by-four method.) + + Thanks to Iouri Kharon for figuring out a fix, testing, and + benchmarking. - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + src/liblzma/check/crc64_fast.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) -commit af13781886c8e7a0aabebb5141ea282dc364f5c6 -Author: Lasse Collin -Date: 2015-11-03 20:31:31 +0200 +commit 765354b50c2886fc0d294d6be3b207f7ae2ada70 +Author: Jia Tan +Date: 2023-01-11 01:18:50 +0800 - Windows/MSVC: Update config.h. + Tests: Fix unused function warning in test_block_header. + + One of the global arrays of filters was only used in a test that + required both encoders and decoders to be configured in the build. - windows/config.h | 6 ++++++ - 1 file changed, 6 insertions(+) + tests/test_block_header.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit 9fa5949330f162c5a2f6653f83025327837e8f39 -Author: Lasse Collin -Date: 2015-11-03 20:29:58 +0200 +commit 7c23c05befdcc73231c0d6632a7d943dbeaea1aa +Author: Jia Tan +Date: 2023-01-11 01:08:03 +0800 - DOS: Update config.h. + Tests: Fix unused function warning in test_index_hash. + + test_index_hash does not use fill_index_hash() unless both encoders + and decoders are configured in the build. - dos/config.h | 6 ++++++ - 1 file changed, 6 insertions(+) + tests/test_index_hash.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) -commit cb3111e3ed84152912b5138d690c8d9f00c6ef02 -Author: Lasse Collin -Date: 2015-11-03 20:29:33 +0200 +commit 57464bb4ebd6c00dc8b19803f05ea55ddd0826f6 +Author: Jia Tan +Date: 2023-01-11 00:54:45 +0800 - xz: Make xz buildable even when encoders or decoders are disabled. - - The patch is quite long but it's mostly about adding new #ifdefs - to omit code when encoders or decoders have been disabled. + CI/CD: Add 32-bit build and test steps to Ubuntu autotools runner. - This adds two new #defines to config.h: HAVE_ENCODERS and - HAVE_DECODERS. + If all goes well, Mac autotools and Linux and Mac CMake will be added + later for 32-bit builds. - configure.ac | 4 ++++ - src/xz/Makefile.am | 8 ++++++-- - src/xz/args.c | 16 ++++++++++++++++ - src/xz/coder.c | 33 +++++++++++++++++++++++++-------- - src/xz/main.c | 9 +++++++-- - src/xz/private.h | 5 ++++- - 6 files changed, 62 insertions(+), 13 deletions(-) + .github/workflows/ci.yml | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -commit 4cc584985c0b7a13901da1b7a64ef9f7cc36e8ab -Author: Lasse Collin -Date: 2015-11-03 18:06:40 +0200 +commit 923eb689a4b863b6cca8df6360d4962aae994edf +Author: Jia Tan +Date: 2023-01-11 00:51:01 +0800 - Build: Build LZMA1/2 presets also when only decoder is wanted. - - People shouldn't rely on the presets when decoding raw streams, - but xz uses the presets as the starting point for raw decoder - options anyway. + CI/CD: Enables warnings as errors in autotool build. - lzma_encocder_presets.c was renamed to lzma_presets.c to - make it clear it's not used solely by the encoder code. + This will help us catch warnings and potential bugs in builds that are + not often tested by us. - src/liblzma/lzma/Makefile.inc | 6 +++++- - src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++- - 2 files changed, 7 insertions(+), 2 deletions(-) + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 23ed1d41489f632155bbc9660f323d57e09da180 -Author: Lasse Collin -Date: 2015-11-03 17:54:48 +0200 +commit feae5528a30c006b6e2f96a95116e20b983703fc +Author: Jia Tan +Date: 2023-01-11 00:48:35 +0800 - Build: Fix configure to handle LZMA1 dependency with LZMA2. + CI/CD: Add -f argument to set CFLAGS in ci_build.sh. - Now it gives an error if LZMA1 encoder/decoder is missing - when LZMA2 encoder/decoder was requested. Even better would - be LZMA2 implicitly enabling LZMA1 but it would need more code. + For now, the suggested option is for -m32 only, but this can be updated + later if other flags are deemed useful. - configure.ac | 5 ----- - 1 file changed, 5 deletions(-) + build-aux/ci_build.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit b0bc3e03852af13419ea2960881824258d451117 +commit cfabb62a4874c146e7d6f30445637602545bc054 Author: Lasse Collin -Date: 2015-11-03 17:41:54 +0200 +Date: 2023-01-10 12:47:16 +0200 - Build: Don't omit lzma_cputhreads() unless using --disable-threads. + Revert "liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022)." + + This reverts commit 36edc65ab4cf10a131f239acbd423b4510ba52d5. + + It was reported that it wasn't a good enough fix and MSVC + still produced (different kind of) bad code when building + for 32-bit x86 if optimizations are enabled. - Previously it was omitted if encoders were disabled - with --disable-encoders. It didn't make sense and - it also broke the build. + Thanks to Iouri Kharon. - src/liblzma/common/Makefile.inc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/liblzma/check/crc64_fast.c | 6 ------ + 1 file changed, 6 deletions(-) -commit c6bf438ab39e0fb4a47d3c81725c227919502726 +commit 0b64215170dd3562f207ef26f794755bcd600526 Author: Lasse Collin -Date: 2015-11-02 18:16:51 +0200 +Date: 2023-01-10 11:56:11 +0200 - liblzma: Fix a build failure related to external SHA-256 support. + sysdefs.h: Don't include strings.h anymore. - If an appropriate header and structure were found by configure, - but a library with a usable SHA-256 functions wasn't, the build - failed. + On some platforms src/xz/suffix.c may need for + strcasecmp() but suffix.c includes the header when it needs it. + + Unless there is an old system that otherwise supports enough C99 + to build XZ Utils but doesn't have C89/C90-compatible , + there should be no need to include in sysdefs.h. - src/liblzma/check/check.h | 32 +++++++++++++++++++++++--------- - 1 file changed, 23 insertions(+), 9 deletions(-) + src/common/sysdefs.h | 6 ------ + 1 file changed, 6 deletions(-) -commit e18adc56f2262aa9394d46681e9e4b9981ed5e97 +commit ec2fc39fe4f4e6e242b3a669585049763968cdeb Author: Lasse Collin -Date: 2015-11-02 15:19:10 +0200 +Date: 2023-01-10 11:23:41 +0200 - xz: Always close the file before trying to delete it. + xz: Include in suffix.c if needed for strcasecmp(). + + SUSv2 and POSIX.1‐2017 declare only a few functions in . + Of these, strcasecmp() is used on some platforms in suffix.c. + Nothing else in the project needs (at least if + building on a modern system). - unlink() can return EBUSY in errno for open files on some - operating systems and file systems. + sysdefs.h currently includes if HAVE_STRINGS_H is + defined and suffix.c relied on this. + + Note that dos/config.h doesn't #define HAVE_STRINGS_H even though + DJGPP does have strings.h. It isn't needed with DJGPP as strcasecmp() + is also in in DJGPP. - src/xz/file_io.c | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) + src/xz/suffix.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 282e768a1484e88c8b7ec35655ee4959954ec87a +commit 7049c4a76c805ad27d6cf4ee119a2ef2a7add59f Author: Lasse Collin -Date: 2015-10-12 21:08:42 +0300 +Date: 2023-01-10 10:05:13 +0200 - Update THANKS. + sysdefs.h: Fix a comment. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/common/sysdefs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 372e402713a1d4337ffce5f56d5c5c9ed99a66d0 +commit 194a5fab69277d9e804a6113b5f676b8666b3a61 Author: Lasse Collin -Date: 2015-10-12 21:07:41 +0300 +Date: 2023-01-10 10:04:06 +0200 - Tests: Add tests for the two bugs fixed in index.c. + sysdefs.h: Don't include memory.h anymore even if it were available. + + It quite probably was never needed, that is, any system where memory.h + was required likely couldn't compile XZ Utils for other reasons anyway. + + XZ Utils 5.2.6 and later source packages were generated using + Autoconf 2.71 which no longer defines HAVE_MEMORY_H. So the code + being removed is no longer used anyway. - tests/test_index.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) + src/common/sysdefs.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) -commit 21515d79d778b8730a434f151b07202d52a04611 +commit 5e34774c31d1b7509b5cb77a3be9973adec59ea0 Author: Lasse Collin -Date: 2015-10-12 20:45:15 +0300 +Date: 2023-01-10 08:29:32 +0200 - liblzma: Fix lzma_index_dup() for empty Streams. + CMake: Fix appending to CMAKE_RC_FLAGS. + + It's a string, not a list. It only worked when the variable was empty. - Stream Flags and Stream Padding weren't copied from - empty Streams. + Thanks to Iouri Kharon. - src/liblzma/common/index.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 09f395b6b360c0b13e8559eece1d179b908ebd3a +commit 6e652ceb18c615c578c869db300fa0756788b4e0 Author: Lasse Collin -Date: 2015-10-12 20:31:44 +0300 +Date: 2023-01-10 00:33:14 +0200 - liblzma: Add a note to index.c for those using static analyzers. + Windows: Update INSTALL-MSVC.txt to recommend CMake over project files. - src/liblzma/common/index.c | 3 +++ - 1 file changed, 3 insertions(+) + windows/INSTALL-MSVC.txt | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) -commit 3bf857edfef51374f6f3fffae3d817f57d3264a0 +commit 6b117d3b1fe91eb26d533ab16a2e552f84148d47 Author: Lasse Collin -Date: 2015-10-12 20:29:09 +0300 +Date: 2023-01-09 23:41:25 +0200 - liblzma: Fix a memory leak in error path of lzma_index_dup(). + CMake: Fix windres issues again. - lzma_index_dup() calls index_dup_stream() which, in case of - an error, calls index_stream_end() to free memory allocated - by index_stream_init(). However, it illogically didn't - actually free the memory. To make it logical, the tree - handling code was modified a bit in addition to changing - index_stream_end(). - - Thanks to Evan Nemerson for the bug report. + At least on some systems, GNU windres needs --use-temp-file + in addition to the \x20 hack to avoid spaces in the command line + argument. Hovever, that \x20 syntax is broken with llvm-windres + version 15.0.0 (results in "XZx20Utils") but luckily it works + with a regular space. Thus it is best to limit the workarounds + to GNU toolchain on Windows. - src/liblzma/common/index.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) + CMakeLists.txt | 35 +++++++++++++++++++++++------------ + 1 file changed, 23 insertions(+), 12 deletions(-) -commit 7f05803979b4b79642d5be4218a79da7a0b12c47 +commit 0c210ca7f489e971e94e1ddc72b0b0806e3c7935 Author: Lasse Collin -Date: 2015-09-29 13:57:28 +0300 - - Update NEWS for 5.2.2. - - NEWS | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit 397fcc0946315b55c3c6d80e37e82a2a78bc15c1 -Author: Hauke Henningsen -Date: 2015-08-17 04:59:54 +0200 +Date: 2023-01-06 22:53:38 +0200 - Update German translation, mostly wrt orthography + Tests: test_filter_flags: Clean up minor issues. + + Here are the list of the most significant issues addressed: + - Avoid using internal common.h header. It's not good to copy the + constants like this but common.h cannot be included for use outside + of liblzma. This is the quickest thing to do that could be fixed later. - Provide an update of the German translation. - * A lot of compound words were previously written with spaces, while - German orthography is relatively clear in that the components - should not be separated. - * When referring to the actual process of (de)compression rather than the - concept, replace “(De-)Kompression” with “(De-)Komprimierung”. - Previously, both forms were used in this context and are now used in a - manner consistent with “Komprimierung” being more likely to refer to - a process. - * Consistently translate “standard input”/“output” - * Use “Zeichen” instead of false friend “Charakter” for “character” - * Insert commas around relative clauses (as required in German) - * Some other minor corrections - * Capitalize “ß” as “ẞ” - * Consistently start option descriptions in --help with capital letters + - Omit the INIT_FILTER macro. Initialization should be done with just + regular designated initializers. - Acked-By: Andre Noll + - Use start_offset = 257 for BCJ tests. It demonstrates that Filter + Flags encoder and decoder don't validate the options thoroughly. + 257 is valid only for the x86 filter. This is a bit silly but + not a significant problem in practice because the encoder and + decoder initialization functions will catch bad alignment still. + Perhaps this should be fixed but it's not urgent and doesn't need + to be in 5.4.x. - * Update after msgmerge + - Various tweaks to comments such as filter id -> Filter ID - po/de.po | 383 ++++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 196 insertions(+), 187 deletions(-) + tests/test_filter_flags.c | 153 +++++++++++++++++++++++----------------------- + 1 file changed, 78 insertions(+), 75 deletions(-) -commit cbc9e39bae715accb44168930a71888480aad569 -Author: Lasse Collin -Date: 2015-08-11 13:23:04 +0300 +commit 5c9fdd3bf53a9655f5eb2807d662b3af0d5e1865 +Author: Jia Tan +Date: 2022-12-29 23:33:33 +0800 - Build: Minor Cygwin cleanup. + Tests: Refactors existing filter flags tests. - Some tests used "cygwin*" and some used "cygwin". I changed - them all to use "cygwin". Shouldn't affect anything in practice. - - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit bcacd8ce7a031566858e5e03c1009064c3f1c89e -Author: Lasse Collin -Date: 2015-08-11 13:21:52 +0300 - - Build: Support building of MSYS2 binaries. + Converts the existing filter flags tests into tuktests. - configure.ac | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) + tests/test_filter_flags.c | 655 ++++++++++++++++++++++++++++++++-------------- + 1 file changed, 457 insertions(+), 198 deletions(-) -commit 0275a5398c01d57b724dec7fea52dec3bd6edc6c +commit 36edc65ab4cf10a131f239acbd423b4510ba52d5 Author: Lasse Collin -Date: 2015-08-09 21:06:26 +0300 +Date: 2023-01-09 12:22:05 +0200 - Windows: Define DLL_EXPORT when building liblzma.dll with MSVC. + liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022). - src/liblzma/common/common.h uses it to set __declspec(dllexport) - for the API symbols. + I haven't tested with MSVC myself and there doesn't seem to be + information about the problem online, so I'm relying on the bug report. - Thanks to Adam Walling. + Thanks to Iouri Kharon for the bug report and the patch. - windows/liblzma_dll.vcxproj | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + src/liblzma/check/crc64_fast.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit a74525cf9b945fb0b370e64cf406104beb31729b +commit 790a12a95a78ff82d8c6d4efe3b789851ca9470d Author: Lasse Collin -Date: 2015-08-09 21:02:20 +0300 +Date: 2023-01-09 11:27:24 +0200 - Windows: Omit unneeded header files from MSVC project files. + CMake: Fix a copypaste error in xzdec Windows resource file handling. + + It was my mistake. Thanks to Iouri Kharon for the bug report. - windows/liblzma.vcxproj | 5 ----- - windows/liblzma_dll.vcxproj | 5 ----- - 2 files changed, 10 deletions(-) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit fbbb295a91caf39faf8838c8c39526e4cb4dc121 +commit 0e1545fea39c0514c7b7032a0a3592a9a33d2848 Author: Lasse Collin -Date: 2015-07-12 20:48:19 +0300 +Date: 2023-01-08 00:32:29 +0200 - liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer. + Tests: tuktest.h: Support tuktest_malloc(0). + + It's not needed in XZ Utils at least for now. It's good to support + it still because if such use is needed later, it wouldn't be + caught on GNU/Linux since malloc(0) from glibc returns non-NULL. - src/liblzma/api/lzma.h | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) + tests/tuktest.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 713dbe5c230fe00865a54f5c32358ea30f9a1156 +commit 69d5d78c6904668eb09a131da86276beec3281f8 Author: Lasse Collin -Date: 2015-06-19 20:38:55 +0300 +Date: 2023-01-08 00:24:23 +0200 Update THANKS. - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 3a5d755d055d51f99c523b4c2952727e1e69cfa1 +commit dd38655f80c113c9db73b9ed370dc900e1c4dc41 Author: Lasse Collin -Date: 2015-06-19 20:21:30 +0300 +Date: 2023-01-07 21:57:11 +0200 - Windows: Update the docs. + CMake: Update cmake_minimum_required from 3.13...3.16 to 3.13...3.25. + + The changes listed on cmake-policies(7) for versions 3.17 to 3.25 + shouldn't affect this project. - INSTALL | 29 ++++++++----- - windows/INSTALL-MSVC.txt | 47 ++++++++++++++++++++++ - windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} | 2 +- - 3 files changed, 67 insertions(+), 11 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b0798c6aa6184efcefd0bdcca20f96121a13feda +commit a890a637bee9193d5b690aefa9a59eba5b8532ae Author: Lasse Collin -Date: 2015-06-19 17:25:31 +0300 +Date: 2023-01-07 19:50:35 +0200 - Windows: Add MSVC project files for building liblzma. - - Thanks to Adam Walling for creating these files. + Update THANKS. - windows/liblzma.vcxproj | 359 ++++++++++++++++++++++++++++++++++++++++ - windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++ - windows/xz_win.sln | 48 ++++++ - 3 files changed, 795 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 9b02a4ffdac1b9f066658ec4c95c0834f4cd2fb7 -Author: Andre Noll -Date: 2015-05-28 15:50:00 +0200 +commit 6e38e595dd56ac1800478cef1f6f754d0eba0d2e +Author: Lasse Collin +Date: 2023-01-07 19:50:03 +0200 - Fix typo in German translation. + CMake/Windows: Add resource files to xz.exe and xzdec.exe. - As pointed out by Robert Pollak, there's a typo in the German - translation of the compression preset option (-0 ... -9) help text. - "The compressor" translates to "der Komprimierer", and the genitive - form is "des Komprimierers". The old word makes no sense at all. + The command line tools cannot be built with MSVC for now but + they can be built with MinGW-w64. + + Thanks to Iouri Kharon for the bug report and the original patch. - po/de.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) -commit c7f4041f6b8f4729f88d3bc888b2a4080ae51f72 +commit 443dfebced041adc88f10d824188eeef5b5821a9 Author: Lasse Collin -Date: 2015-05-13 20:57:55 +0300 +Date: 2023-01-07 19:48:52 +0200 - Tests: Fix a memory leak in test_bcj_exact_size. + CMake/Windows: Add a workaround for windres from GNU binutils. - Thanks to Cristian Rodríguez. + Thanks to Iouri Kharon for the bug report and the original patch. - tests/test_bcj_exact_size.c | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) -commit 17b29d4f0ae0f780fbd69e15a398dc478d8492f8 +commit ceb805011747d04a915f3f39e4bed9eed151c634 Author: Lasse Collin -Date: 2015-05-12 18:08:24 +0300 +Date: 2023-01-07 19:31:15 +0200 - Fix NEWS about threading in 5.2.0. + Build: Require that _mm_set_epi64x() is usable to enable CLMUL support. - Thanks to Andy Hochhaus. + VS2013 doesn't have _mm_set_epi64x() so this way CLMUL gets + disabled with VS2013. + + Thanks to Iouri Kharon for the bug report. - NEWS | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 3 ++- + configure.ac | 8 ++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) -commit 49c26920d6e2d85e5c6123e34958aed2e77485ad -Author: Lasse Collin -Date: 2015-05-11 21:26:16 +0300 +commit 8d372bd94066b1a5b0570b2550f83c2868486adf +Author: Jia Tan +Date: 2023-01-07 21:05:15 +0800 - xz: Document that threaded decompression hasn't been implemented yet. + CI/CD: Split CMake Linux and MacOS build phase to build and test. + + The phase split was only done for Autotools before, so should also + apply to CMake. - src/xz/xz.1 | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit 5b2458cb244ed237efe4de1ebcf06e1b3a1f4256 -Author: Lasse Collin -Date: 2015-04-20 20:20:29 +0300 +commit 747c7f2b34bd498f6702c6875500a26b06201772 +Author: Jia Tan +Date: 2023-01-07 11:16:55 +0800 - Update THANKS. + CI/CD: Reduce job runners to 4 instead of using matrix strategy. + + The old version used too many runners that resulted in unnecessary + dependency downloads. Now, the runners are reused for the different + configurations for each OS and build system. - THANKS | 1 + - 1 file changed, 1 insertion(+) + .github/workflows/ci.yml | 95 ++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 83 insertions(+), 12 deletions(-) -commit 6bd0349c58451b13442e8f463e35de83548bf985 -Author: Lasse Collin -Date: 2015-04-20 19:59:18 +0300 +commit 4de35fd6b58d46fc887c78faf163f6a37b790c45 +Author: Jia Tan +Date: 2023-01-07 10:07:20 +0800 - Revert "xz: Use pipe2() if available." - - This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd. - It is a problem when libc has pipe2() but the kernel is too - old to have pipe2() and thus pipe2() fails. In xz it's pointless - to have a fallback for non-functioning pipe2(); it's better to - avoid pipe2() completely. + CI/CD: Add new -p (PHASE) argument to ci_build.sh - Thanks to Michael Fox for the bug report. + The new PHASE argument can be build, test, or all. all is the default. + This way, the CI/CD script can differentiate between the build and test + phases to make it easier to track down errors when they happen. - configure.ac | 4 ++-- - src/xz/file_io.c | 9 +-------- - 2 files changed, 3 insertions(+), 10 deletions(-) - -commit fc0df0f8db87dff45543708a711e17d29c37f632 -Author: Lasse Collin -Date: 2015-04-01 14:45:25 +0300 + build-aux/ci_build.sh | 140 +++++++++++++++++++++++++++----------------------- + 1 file changed, 76 insertions(+), 64 deletions(-) - xz: Fix the Capsicum rights on user_abort_pipe. +commit 6fd39664de47801e670a16617863196bfbde4755 +Merge: 78e0561d fc0c7884 +Author: Jia Tan +Date: 2023-01-07 00:10:50 +0800 - src/xz/file_io.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + Merge pull request #7 from tukaani-project/tuktest_index_hash + + Tuktest index hash -commit 57393615b31b3788dd77280452d845bcc12d33af +commit fc0c788469159f634f09ff23c8cef6925c91da57 Author: Lasse Collin -Date: 2015-03-31 22:20:11 +0300 +Date: 2023-01-06 17:58:48 +0200 - Update THANKS. + Tests: test_index_hash: Add an assert_uint_eq(). - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_index_hash.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 1238381143a9a7ce84839c2582ccd56ff750a440 +commit d550304f5343b3a082da265107cd820e0d81dc71 Author: Lasse Collin -Date: 2015-03-31 22:19:34 +0300 +Date: 2023-01-06 17:55:06 +0200 - xz: Add support for sandboxing with Capsicum. - - The sandboxing is used conditionally as described in main.c. - This isn't optimal but it was much easier to implement than - a full sandboxing solution and it still covers the most common - use cases where xz is writing to standard output. This should - have practically no effect on performance even with small files - as fork() isn't needed. - - C and locale libraries can open files as needed. This has been - fine in the past, but it's a problem with things like Capsicum. - io_sandbox_enter() tries to ensure that various locale-related - files have been loaded before cap_enter() is called, but it's - possible that there are other similar problems which haven't - been seen yet. - - Currently Capsicum is available on FreeBSD 10 and later - and there is a port to Linux too. - - Thanks to Loganaden Velvindron for help. + Tests: test_index_hash: Fix a memory leak. - configure.ac | 41 +++++++++++++++++++++++++++ - src/xz/Makefile.am | 2 +- - src/xz/file_io.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/xz/file_io.h | 6 ++++ - src/xz/main.c | 18 ++++++++++++ - src/xz/private.h | 4 +++ - 6 files changed, 151 insertions(+), 1 deletion(-) + tests/test_index_hash.c | 2 ++ + 1 file changed, 2 insertions(+) -commit 29a087fb5a0c879f0b1bc4c6b989f7b87bacdf9e +commit 02608f74ea1f2d2d56585711ff241c34b4ad0937 Author: Lasse Collin -Date: 2015-03-31 21:12:30 +0300 +Date: 2023-01-06 17:53:03 +0200 - Fix bugs and otherwise improve ax_check_capsicum.m4. - - AU_ALIAS was removed because the new version is incompatible - with the old version. - - It no longer checks for separately. - It's enough to test for it as part of AC_CHECK_DECL. - The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and - HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded. - HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough. - - It no longer does a useless search for the Capsicum library - if the header wasn't found. - - Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying - the argument omitted the default action but the given action - wasn't used instead. - - AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum - support is found. Previously it was part of the default - ACTION-IF-FOUND which a custom action would override. Now - the default action only prepends ${CAPSICUM_LIB} to LIBS. - - The documentation was updated. - - Since there as no serial number, "#serial 2" was added. + Tests: test_index_hash: Don't treat pointers as booleans. - m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------ - 1 file changed, 51 insertions(+), 52 deletions(-) + tests/test_index_hash.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 6e845c6a3eddf2fde9db5a29950421dff60a43ac +commit 056766c8601a3808bea1761f6cc833197a35a3e0 Author: Lasse Collin -Date: 2015-03-31 19:20:24 +0300 +Date: 2023-01-06 17:51:41 +0200 - Add m4/ax_check_capsicum.m4 for detecting Capsicum support. - - The file was loaded from this web page: - https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4 - - Thanks to Loganaden Velvindron for pointing it out for me. + Tests: test_index_hash: Fix a typo in a comment. - m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 86 insertions(+) + tests/test_index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 3717885f9ef2c06f1bcbad9f4c2ed2d5695f844e +commit 873e684028ba9738f071c5236db7d452ed797b4c Author: Lasse Collin -Date: 2015-03-30 22:44:02 +0300 +Date: 2023-01-06 17:44:29 +0200 - Bump version to 5.3.0alpha and soname to 5.3.99. + Tests: test_index_hash: Avoid the variable name "index". - The idea of 99 is that it looks a bit weird in this context. - For new features there's no API/ABI stability in devel versions. - - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit eccd8155e107c5ada03d13e7730675cdf1a44ddc -Author: Lasse Collin -Date: 2015-03-29 22:14:47 +0300 + It can trigger warnings from -Wshadow on some systems. - Update THANKS. - - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_index_hash.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit 25263fd9e7a8a913395cb93d7c104cd48c2b4a00 +commit d1f24c35874eeba8432d75aa77b06c50375ed937 Author: Lasse Collin -Date: 2015-03-29 22:13:48 +0300 +Date: 2023-01-06 17:35:50 +0200 - Fix the detection of installed RAM on QNX. - - The earlier version compiled but didn't actually work - since sysconf(_SC_PHYS_PAGES) always fails (or so I was told). - - Thanks to Ole André Vadla Ravnås for the patch and testing. + Tests: test_index_hash: Use the word "Record" instead of "entry". - m4/tuklib_physmem.m4 | 6 +++--- - src/common/tuklib_physmem.c | 14 +++++++++++++- - 2 files changed, 16 insertions(+), 4 deletions(-) + tests/test_index_hash.c | 102 ++++++++++++++++++++++++------------------------ + 1 file changed, 51 insertions(+), 51 deletions(-) -commit 4c544d2410903d38402221cb783ed85585b6a007 +commit b93f7c5cbb02b42024ac866fc0af541de3d816e2 Author: Lasse Collin -Date: 2015-03-27 22:39:07 +0200 +Date: 2023-01-06 17:35:05 +0200 - Fix CPU core count detection on QNX. - - It tried to use sysctl() on QNX but - - it broke the build because sysctl() needs -lsocket on QNX; - - sysctl() doesn't work for detecting the core count on QNX - even if it compiled. + Tests: test_index_hash: Tweak comments and style. - sysconf() works. An alternative would have been to use - QNX-specific SYSPAGE_ENTRY(num_cpu) from . - - Thanks to Ole André Vadla Ravnås. + The words defined in the .xz file format specification + begin with capital letter to emphasize that they have + a specific meaning. - m4/tuklib_cpucores.m4 | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) + tests/test_index_hash.c | 62 ++++++++++++++++++++++++++----------------------- + 1 file changed, 33 insertions(+), 29 deletions(-) -commit e0ea6737b03e83ccaff4514d00e31bb926f8f0f3 +commit c48b24fc06d98569adb72f13c2e8e5ff30bb8036 Author: Lasse Collin -Date: 2015-03-07 22:05:57 +0200 +Date: 2023-01-06 17:17:37 +0200 - xz: size_t/uint32_t cleanup in options.c. + Tests: test_index_hash: Use INDEX_INDICATOR constant instead of 0. - src/xz/options.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + tests/test_index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8bcca29a65335fd679c13814b70b35b68fa5daed -Author: Lasse Collin -Date: 2015-03-07 22:04:23 +0200 +commit 78e0561dfebaa9d5e34558de537efcda890e0629 +Author: Jia Tan +Date: 2023-01-06 20:43:31 +0800 - xz: Fix a comment and silence a warning in message.c. + Style: Change #if !defined() to #ifndef in mythread.h. - src/xz/message.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f243f5f44c6b19a7c289a0ec73a03ee08364cb5b -Author: Lasse Collin -Date: 2015-03-07 22:01:00 +0200 +commit e834e1e934ed0af673598d8c0c34afb2af56bee0 +Author: Jia Tan +Date: 2023-01-06 20:35:55 +0800 - liblzma: Silence more uint32_t vs. size_t warnings. + Build: Add missing stream_decoder_mt.c to .vcxproj files. + + The line in the .vcxproj files for building with was missing in 5.4.0. + Thank to Hajin Jang for reporting the issue. - src/liblzma/lz/lz_encoder.c | 2 +- - src/liblzma/lzma/lzma_encoder.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + windows/vs2013/liblzma.vcxproj | 1 + + windows/vs2013/liblzma_dll.vcxproj | 1 + + windows/vs2017/liblzma.vcxproj | 1 + + windows/vs2017/liblzma_dll.vcxproj | 1 + + windows/vs2019/liblzma.vcxproj | 1 + + windows/vs2019/liblzma_dll.vcxproj | 1 + + 6 files changed, 6 insertions(+) -commit 7f0a4c50f4a374c40acf4b86848f301ad1e82d34 -Author: Lasse Collin -Date: 2015-03-07 19:54:00 +0200 +commit 84f9687cbae972c2c342e10bf69f8ec8f70ae111 +Author: Jia Tan +Date: 2023-01-05 20:57:25 +0800 - xz: Make arg_count an unsigned int to silence a warning. + liblzma: Remove common.h include from common/index.h. - Actually the value of arg_count cannot exceed INT_MAX - but it's nicer as an unsigned int. + common/index.h is needed by liblzma internally and tests. common.h will + include and define many things that are not needed by the tests. Also, + this prevents include order problems because common.h will redefine + LZMA_API resulting in a warning. - src/xz/args.h | 2 +- - src/xz/main.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/liblzma/common/index.c | 1 + + src/liblzma/common/index.h | 9 +++++++-- + src/liblzma/common/index_decoder.h | 1 + + src/liblzma/common/stream_buffer_encoder.c | 1 + + 4 files changed, 10 insertions(+), 2 deletions(-) -commit f6ec46801588b1be29c07c9db98558b521304002 +commit 7657ce1c3c4abff7560336a7b687d98e0e2bd14f Author: Lasse Collin -Date: 2015-03-07 19:33:17 +0200 +Date: 2023-01-04 22:40:54 +0200 - liblzma: Fix a warning in index.c. + Update THANKS. - src/liblzma/common/index.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit a24518971cc621315af142dd3bb7614fab04ad27 +commit aafd67fba045ab99683971263a5a26fb2a6e8ce2 Author: Lasse Collin -Date: 2015-02-26 20:46:14 +0200 +Date: 2023-01-04 18:40:28 +0200 - Build: Fix a CR+LF problem when running autoreconf -fi on OS/2. + Tests: Adjust style in test_compress.sh. - build-aux/version.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_compress.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) -commit dec11497a71518423b5ff0e759100cf8aadf6c7b -Author: Lasse Collin -Date: 2015-02-26 16:53:44 +0200 +commit 52380678f42364daa4510f92f6d3b18ec98c3638 +Author: Jia Tan +Date: 2023-01-04 23:58:58 +0800 - Bump version and soname for 5.2.1. + Tests: Replace non portable shell parameter expansion + + The shell parameter expansion using # and ## is not supported in + Solaris 10 Bourne shell (/bin/sh). Even though this is POSIX, it is not fully + portable, so we should avoid it. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + tests/create_compress_files.c | 2 +- + tests/test_compress.sh | 20 +++++++++++++------- + tests/test_compress_prepared_bcj_sparc | 2 +- + tests/test_compress_prepared_bcj_x86 | 2 +- + 4 files changed, 16 insertions(+), 10 deletions(-) -commit 29e39c79975ab89ee5dd671e97064534a9f3a649 -Author: Lasse Collin -Date: 2015-02-26 13:01:09 +0200 +commit d0eb345bb7d148a62883ee299adec2b74a0f6f3b +Author: Jia Tan +Date: 2023-01-03 21:02:38 +0800 - Update NEWS for 5.2.1. + Translations: Add Korean translation of man pages. + + Thanks to Seong-ho Cho - NEWS | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + po4a/ko.po | 5552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po4a/po4a.conf | 2 +- + 2 files changed, 5553 insertions(+), 1 deletion(-) -commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd -Author: Lasse Collin -Date: 2015-02-22 19:38:48 +0200 +commit c4145978d95ebf1690c778d354e15f7c2823d7a8 +Author: Jia Tan +Date: 2023-01-03 20:47:27 +0800 - xz: Use pipe2() if available. + Translations: Update the Esperanto translation. - configure.ac | 4 ++-- - src/xz/file_io.c | 9 ++++++++- - 2 files changed, 10 insertions(+), 3 deletions(-) + po/eo.po | 620 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 332 insertions(+), 288 deletions(-) -commit 117d962685c72682c63edc9bb765367189800202 +commit 4103a2e78ac60b00c888485cd967a5fe5d1b917c Author: Lasse Collin -Date: 2015-02-21 23:40:26 +0200 +Date: 2023-01-02 17:20:47 +0200 - liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode. + Bump version and soname for 5.5.0alpha. - The bug was added in the commit - f48fce093b07aeda95c18850f5e086d9f2383380 and thus - affected 5.1.4beta and 5.2.0. Luckily the bug cannot - cause data corruption or other nasty things. - - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719 -Author: Lasse Collin -Date: 2015-02-21 23:00:19 +0200 - - xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick. + 5.5.0alpha won't be released, it's just to mark that + the branch is not for stable 5.4.x. - Now it reads the old flags instead of blindly setting O_NONBLOCK. - The old code may have worked correctly, but this is better. + Once again there is no API/ABI stability for new features + in devel versions. The major soname won't be bumped even + if API/ABI of new features breaks between devel releases. - src/xz/file_io.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit 2205bb5853098aea36a56df6f5747037175f66b4 +commit 73c9e6d6b970ccc3d5ad61dcaa21cba050e5df0a Author: Lasse Collin -Date: 2015-02-10 15:29:34 +0200 +Date: 2023-01-02 17:05:07 +0200 - Update THANKS. + Build: Fix config.h comments. - THANKS | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 2 +- + m4/tuklib_progname.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -commit d935b0cdf3db440269b9d952b2b281b18f8c7b08 -Author: Lasse Collin -Date: 2015-02-10 15:28:30 +0200 +commit bb740e3b117f1a3c65152d01e5755523a908ecb1 +Author: Jia Tan +Date: 2023-01-02 22:33:48 +0800 - tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available. - - In FreeBSD, cpuset_getaffinity() is the preferred way to get - the number of available cores. + Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1. - Thanks to Rui Paulo for the patch. I edited it slightly, but - hopefully I didn't break anything. + HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to + HAVE_PROGRAM_INVOCATION_NAME. Previously, + HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when + building with autotools. CMake would only set this when it was 1, and the + dos/config.h did not define it. The new macro definition is consistent + across build systems. - m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++- - src/common/tuklib_cpucores.c | 18 ++++++++++++++++++ - 2 files changed, 40 insertions(+), 1 deletion(-) + cmake/tuklib_progname.cmake | 5 ++--- + m4/tuklib_progname.m4 | 5 ++++- + src/common/tuklib_progname.c | 2 +- + src/common/tuklib_progname.h | 2 +- + 4 files changed, 8 insertions(+), 6 deletions(-) -commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560 -Author: Lasse Collin -Date: 2015-02-09 22:08:37 +0200 +commit 064cd385a716abc78d93a3612411a82d69ceb221 +Author: Jia Tan +Date: 2022-12-29 00:30:52 +0800 - xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp. - - Thanks to Rui Paulo for the fix. + Adds test_index_hash to .gitignore. - src/scripts/xzdiff.in | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + .gitignore | 1 + + 1 file changed, 1 insertion(+) -commit b9a5b6b7a29029680af733082b6a46e0fc01623a -Author: Lasse Collin -Date: 2015-02-03 21:45:53 +0200 +commit 3959162baec074511d83ba0fec1284c3ed724799 +Author: Jia Tan +Date: 2022-12-29 00:25:18 +0800 - Add a few casts to tuklib_integer.h to silence possible warnings. - - I heard that Visual Studio 2013 gave warnings without the casts. + Tests: Creates test_index_hash.c - Thanks to Gabi Davar. + Tests all API functions exported from index_hash.h. Does not have a + dedicated test for lzma_index_hash_end. - src/common/tuklib_integer.h | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) + CMakeLists.txt | 2 + + tests/Makefile.am | 3 + + tests/test_index_hash.c | 379 ++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 384 insertions(+) -commit c45757135f40e4a0de730ba5fff0100219493982 -Author: Lasse Collin -Date: 2015-01-26 21:24:39 +0200 +commit f16e12d5e755d371247202fcccbcccd1ec16b2cf +Author: Jia Tan +Date: 2022-08-17 20:20:16 +0800 - liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. + liblzma: Add NULL check to lzma_index_hash_append. + + This is for consistency with lzma_index_append. - src/liblzma/common/memcmplen.h | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) + src/liblzma/common/index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 3c500174ed5485f550972a2a6109c361e875f069 -Author: Lasse Collin -Date: 2015-01-26 20:40:16 +0200 +commit 203b008eb220208981902e0db541c02d1c1c9f5e +Author: Jia Tan +Date: 2022-08-17 17:59:51 +0800 - Update THANKS. + liblzma: Replaced hardcoded 0x0 index indicator byte with macro - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/index.h | 3 +++ + src/liblzma/common/index_decoder.c | 2 +- + src/liblzma/common/index_encoder.c | 2 +- + src/liblzma/common/index_hash.c | 2 +- + src/liblzma/common/stream_decoder.c | 3 ++- + src/liblzma/common/stream_decoder_mt.c | 2 +- + 6 files changed, 9 insertions(+), 5 deletions(-) -commit fec88d41e672d9e197c9442aecf02bd0dfa6d516 +commit dfecda875211f737d0db92dc1d3c58a3a2afb0c0 Author: Lasse Collin -Date: 2015-01-26 20:39:28 +0200 +Date: 2022-12-30 20:10:08 +0200 - liblzma: Silence harmless Valgrind errors. - - Thanks to Torsten Rupp for reporting this. I had - forgotten to run Valgrind before the 5.2.0 release. + Tests: test_check: Test corner cases of CLMUL CRC64. - src/liblzma/lz/lz_encoder.c | 6 ++++++ - 1 file changed, 6 insertions(+) + tests/test_check.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) -commit a9b45badfec0928d20a27c7176c005fa637f7d1e +commit ce96bb20435212fe797d6d84738fb9fd4ea13cc7 Author: Lasse Collin -Date: 2015-01-09 21:50:19 +0200 +Date: 2022-12-30 19:36:49 +0200 - xz: Fix comments. + Tests: Clarify a comment in test_lzip_decoder.c. - src/xz/file_io.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) + tests/test_lzip_decoder.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit 541aee6dd4aa97a809aba281475a21b641bb89e2 -Author: Lasse Collin -Date: 2015-01-09 21:35:06 +0200 +commit 2fcba17fc4d7eda8fc60567169cf2a0e6fcfb2f8 +Author: Jia Tan +Date: 2022-12-29 01:55:19 +0800 - Update THANKS. + xz: Includes and conditionally in mytime.c. + + Previously, mytime.c depended on mythread.h for to be included. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/mytime.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 4170edc914655310d2363baccf5e615e09b04911 -Author: Lasse Collin -Date: 2015-01-09 21:34:06 +0200 +commit f82294c8318a7a0990583d51ac5c7de682ad36ef +Author: Jia Tan +Date: 2022-12-29 01:15:27 +0800 - xz: Don't fail if stdout doesn't support O_NONBLOCK. - - This is similar to the case with stdin. + liblzma: Includes sys/time.h conditionally in mythread - Thanks to Brad Smith for the bug report and testing - on OpenBSD. + Previously, was always included, even if mythread only used + clock_gettime. is still needed even if clock_gettime is not used + though because struct timespec is needed for mythread_condtime. - src/xz/file_io.c | 36 +++++++++++++++--------------------- - 1 file changed, 15 insertions(+), 21 deletions(-) + src/common/mythread.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) -commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d -Author: Lasse Collin -Date: 2015-01-07 19:18:20 +0200 +commit 74dae7d30091e906d6a92a57952dea4354473f9b +Author: Jia Tan +Date: 2022-12-29 01:10:53 +0800 - xz: Fix a memory leak in DOS-specific code. + Build: No longer require HAVE_DECL_CLOCK_MONOTONIC to always be set. + + Previously, if threading was enabled HAVE_DECL_CLOCK_MONOTONIC would always + be set to 0 or 1. However, this macro was needed in xz so if xz was not + built with threading and HAVE_DECL_CLOCK_MONOTONIC was not defined but + HAVE_CLOCK_GETTIME was, it caused a warning during build. Now, + HAVE_DECL_CLOCK_MONOTONIC has been renamed to HAVE_CLOCK_MONOTONIC and + will only be set if it is 1. - src/xz/file_io.c | 2 ++ - 1 file changed, 2 insertions(+) + CMakeLists.txt | 8 +++----- + configure.ac | 5 ++++- + src/common/mythread.h | 4 ++-- + src/xz/mytime.c | 5 ++--- + 4 files changed, 11 insertions(+), 11 deletions(-) -commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea -Author: Lasse Collin -Date: 2015-01-07 19:08:06 +0200 +commit 7339e39dc060df6eda74a2c5b69961befc3d5d24 +Author: Jia Tan +Date: 2022-12-28 01:14:07 +0800 - xz: Don't fail if stdin doesn't support O_NONBLOCK. - - It's a problem at least on OpenBSD which doesn't support - O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's - a problem on other OSes too since this behavior is allowed - in POSIX-1.2008. + Translations: Add Ukrainian translations of man pages. - The code relying on this behavior was committed in June 2013 - and included in 5.1.3alpha released on 2013-10-26. Clearly - the development releases only get limited testing. + Thanks to Yuri Chornoivan - src/xz/file_io.c | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) + po4a/po4a.conf | 2 +- + po4a/uk.po | 3676 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 3677 insertions(+), 1 deletion(-) -commit d2d484647d9d9d679f03c75abb0404f67069271c -Author: Lasse Collin -Date: 2015-01-06 20:30:15 +0200 +commit 9f05c27a58ce8cd7803079aa295e41c24665ce6e +Author: Jia Tan +Date: 2022-12-23 00:34:48 +0800 - Tests: Don't hide unexpected error messages in test_files.sh. + CI/CD: Create initial version of CI/CD workflow. - Hiding them makes no sense since normally there's no error - when testing the "good" files. With "bad" files errors are - expected and then it makes sense to keep the messages hidden. + The CI/CD workflow will only execute on Ubuntu and MacOS latest version. + The workflow will attempt to build with autotools and CMake and execute + the tests. The workflow will run for all pull requests and pushes done + to the master branch. - tests/test_files.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + .github/workflows/ci.yml | 72 ++++++++++++++++++++++++ + build-aux/ci_build.sh | 141 +++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 213 insertions(+) -commit aae6a6aeda51cf94a47e39ad624728f9bee75e30 -Author: Lasse Collin -Date: 2014-12-30 11:17:16 +0200 +commit 1275ebfba74230dbd028049141423c79c8b83b8f +Author: Jia Tan +Date: 2022-12-22 23:14:53 +0800 - Update Solaris notes in INSTALL. - - Mention the possible "make check" failure on Solaris in the - Solaris-specific section of INSTALL. It was already in - section 4.5 but it is better mention it in the OS-specific - section too. + liblzma: Update documentation for lzma_filter_encoder. - INSTALL | 4 ++++ - 1 file changed, 4 insertions(+) + src/liblzma/common/filter_encoder.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -commit 7815112153178800a3521b9f31960e7cdc26cfba -Author: Lasse Collin -Date: 2014-12-26 12:00:05 +0200 +commit 7c9ff5f1667a16733163b75dfd4b509662c387f4 +Author: Jia Tan +Date: 2022-12-21 21:12:03 +0800 - Build: POSIX shell isn't required if scripts are disabled. + Tests: Adds lzip decoder tests - INSTALL | 3 ++- - configure.ac | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) + .gitignore | 1 + + tests/Makefile.am | 2 + + tests/test_lzip_decoder.c | 471 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 474 insertions(+) -commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a -Author: Lasse Collin -Date: 2014-12-21 20:48:37 +0200 +commit 799ead162de63b8400733603d3abcd2e1977bdca +Author: Jia Cheong Tan +Date: 2022-12-20 22:05:21 +0800 - DOS: Update Makefile. + Doxygen: Update .gitignore for generating docs for in source build. + + In source builds are not recommended, but we should still ignore + the generated artifacts. - dos/Makefile | 1 + - 1 file changed, 1 insertion(+) + .gitignore | 2 ++ + 1 file changed, 2 insertions(+) -commit b85ee0905ec4ab7656d22e63519fdd3bedb21f2e -Author: Lasse Collin -Date: 2014-12-21 19:50:38 +0200 +commit 5f7ce42a16b1e86ca8408b5c670c25e2a12acc4e +Author: Jia Tan +Date: 2022-12-20 20:46:44 +0800 - Windows: Fix bin_i486 to bin_i686 in build.bash. + liblzma: Fix lzma_microlzma_encoder() return value. + + Using return_if_error on lzma_lzma_lclppb_encode was improper because + return_if_error is expecting an lzma_ret value, but + lzma_lzma_lclppb_encode returns a boolean. This could result in + lzma_microlzma_encoder, which would be misleading for applications. - windows/build.bash | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/common/microlzma_encoder.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit cbafa710918195dbba3db02c3fab4f0538235206 -Author: Lasse Collin -Date: 2014-12-21 18:58:44 +0200 +commit 8ace358d65059152d9a1f43f4770170d29d35754 +Author: Jia Tan +Date: 2022-12-16 20:58:55 +0800 - Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c. + CMake: Update .gitignore for CMake artifacts from in source build. + + In source builds are not recommended, but we can make it easier + by ignoring the generated artifacts from CMake. - doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++---- - 1 file changed, 26 insertions(+), 4 deletions(-) + .gitignore | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) -commit 8dbb57238d372c7263cfeb3e7f7fd9a73173156a +commit 8fd225a2c149f30aeac377e68eb5abf6b28300ad Author: Lasse Collin -Date: 2014-12-21 18:56:44 +0200 +Date: 2022-12-16 18:30:02 +0200 - Docs: Update docs/examples/00_README.txt. + liblzma: Update authors list in arm64.c. - doc/examples/00_README.txt | 4 ++++ - 1 file changed, 4 insertions(+) + src/liblzma/simple/arm64.c | 1 + + 1 file changed, 1 insertion(+) -commit 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6 +commit b69da6d4bb6bb11fc0cf066920791990d2b22a06 Author: Lasse Collin -Date: 2014-12-21 18:11:17 +0200 +Date: 2022-12-13 20:37:17 +0200 - Bump version and soname for 5.2.0. - - I know that soname != app version, but I skip AGE=1 - in -version-info to make the soname match the liblzma - version anyway. It doesn't hurt anything as long as - it doesn't conflict with library versioning rules. + Bump version to 5.4.0 and soname to 5.4.0. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 6 +++--- - src/liblzma/liblzma.map | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 6 +++--- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index 7ef2cb4..ba187bb 100644 --- a/INSTALL +++ b/INSTALL @@ -90,21 +90,15 @@ XZ Utils Installation 1.2.3. MINIX 3 - The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK), - which doesn't support C99. Install GCC to compile XZ Utils. + Version 3.3.0 and later are supported. - MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has - to be patched before XZ Utils can be compiled correctly. See - . + Multithreading isn't supported because MINIX 3 doesn't have + pthreads. The option --disable-threads must be passed to configure + as this isn't autodetected. - MINIX 3.2.0 and later use a different libc and aren't affected by - the above bug. - - XZ Utils doesn't have code to detect the amount of physical RAM and - number of CPU cores on MINIX 3. - - See section 5.4 in this file about symbol visibility warnings (you - may want to pass gl_cv_cc_visibility=no to configure). + Note that disabling threads causes "make check" to show a few tests + as skipped ("SKIP"). It's only due to a few threading-dependent + subtests are skipped. See the matching tests/test_*.log files. 1.2.4. OpenVMS @@ -143,43 +137,37 @@ XZ Utils Installation 1.2.7. Windows - If it is enough to build liblzma (no command line tools): + The "windows" directory contains instructions for a few types + of builds: - - There is CMake support. It should be good enough to build - static liblzma or liblzma.dll with Visual Studio. The CMake - support may work with MinGW or MinGW-w64. Read the comment - in the beginning of CMakeLists.txt before running CMake! + - INSTALL-MinGW-w64_with_CMake.txt + Simple instructions how to build XZ Utils natively on + Windows using only CMake and a prebuilt toolchain + (GCC + MinGW-w64 or Clang/LLVM + MinGW-w64). - - There are Visual Studio project files under the "windows" - directory. See windows/INSTALL-MSVC.txt. In the future the - project files will be removed when CMake support is good - enough. Thus, please test the CMake version and help fix - possible issues. + - INSTALL-MinGW-w64_with_Autotools.txt + Native build under MSYS2 or cross-compilation from + GNU/Linux using a bash script that creates a .zip + and .7z archives of the binaries and documentation. + The related file README-Windows.txt is for the + resulting binary package. - To build also the command line tools: + - INSTALL-MSVC.txt + Building with MSVC / Visual Studio and CMake. - - MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used - for building the official binary packages for Windows. - There is windows/build.bash to ease packaging XZ Utils with - MinGW(-w64) + MSYS into a redistributable .zip or .7z file. - See windows/INSTALL-MinGW.txt for more information. + - liblzma-crt-mixing.txt + Documentation what to take into account as a programmer + if liblzma.dll and the application don't use the same + CRT (MSVCRT or UCRT). - - MinGW + MSYS (32-bit x86): I haven't recently tested this. + Other choices: - - Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0 - under Cygwin older than 1.7.35 can lead to DATA LOSS! If - you must use an old Cygwin version, stick to XZ Utils 5.0.x - which is safe under older Cygwin versions. You can check - the Cygwin version with the command "cygcheck -V". + - Cygwin: https://cygwin.com/ + Building on Cygwin can be done like on many POSIX operating + systems. XZ Utils >= 5.2.0 isn't compatible with Cygwin older + than 1.7.35 (data loss!). 1.7.35 was released on 2015-03-04. - It may be possible to build liblzma with other toolchains too, but - that will probably require writing a separate makefile. Building - the command line tools with non-GNU toolchains will be harder than - building only liblzma. - - Even if liblzma is built with MinGW(-w64), the resulting DLL can - be used by other compilers and linkers, including MSVC. See - windows/README-Windows.txt for details. + - MSYS2: https://www.msys2.org/ 1.2.8. DOS @@ -358,21 +346,27 @@ XZ Utils Installation will still be installed. The $docdir can be changed with --docdir=DIR. + --enable-doxygen + Enable generation of the HTML version of the liblzma API + documentation using Doxygen. The resulting files are + installed to $docdir/api. This option assumes that + the 'doxygen' tool is available. + --disable-assembler - liblzma includes some assembler optimizations. Currently - there is only assembler code for CRC32 and CRC64 for - 32-bit x86. - - All the assembler code in liblzma is position-independent - code, which is suitable for use in shared libraries and - position-independent executables. So far only i386 - instructions are used, but the code is optimized for i686 - class CPUs. If you are compiling liblzma exclusively for + This disables CRC32 and CRC64 assembly code on + 32-bit x86. This option currently does nothing + on other architectures (not even on x86-64). + + The 32-bit x86 assembly is position-independent code + which is suitable for use in shared libraries and + position-independent executables. It uses only i386 + instructions but the code is optimized for i686 class + CPUs. If you are compiling liblzma exclusively for pre-i686 systems, you may want to disable the assembler code. --disable-clmul-crc - Disable the use carryless multiplication for CRC + Disable the use of carryless multiplication for CRC calculation even if compiler support for it is detected. The code uses runtime detection of SSSE3, SSE4.1, and CLMUL instructions on x86. On 32-bit x86 this currently @@ -383,6 +377,16 @@ XZ Utils Installation required extensions (-msse4.1 -mpclmul) then runtime detection isn't used and the generic code is omitted. + --disable-arm64-crc32 + Disable the use of the ARM64 CRC32 instruction extension + even if compiler support for it is detected. The code will + detect support for the instruction at runtime. + + If using compiler options that unconditionally allow the + required extensions (-march=armv8-a+crc or -march=armv8.1-a + and later) then runtime detection isn't used and the + generic code is omitted. + --enable-unaligned-access Allow liblzma to use unaligned memory access for 16-bit, 32-bit, and 64-bit loads and stores. This should be @@ -392,8 +396,43 @@ XZ Utils Installation slow. This option shouldn't be used on systems that rely on such emulation. - Unaligned access is enabled by default on x86, x86-64, - big endian PowerPC, some ARM, and some ARM64 systems. + Unaligned access is enabled by default on these: + - 32-bit x86 + - 64-bit x86-64 + - 32-bit big endian PowerPC + - 64-bit big endian PowerPC + - 64-bit little endian PowerPC + - some RISC-V [1] + - some 32-bit ARM [2] + - some 64-bit ARM64 [2] (NOTE: Autodetection bug + if using GCC -mstrict-align, see below.) + + [1] Unaligned access is enabled by default if + configure sees that the C compiler + #defines __riscv_misaligned_fast. + + [2] Unaligned access is enabled by default if + configure sees that the C compiler + #defines __ARM_FEATURE_UNALIGNED: + + - ARMv7 + GCC or Clang: It works. The options + -munaligned-access and -mno-unaligned-access + affect this macro correctly. + + - ARM64 + Clang: It works. The options + -munaligned-access, -mno-unaligned-access, + and -mstrict-align affect this macro correctly. + Clang >= 17 supports -mno-strict-align too. + + - ARM64 + GCC: It partially works. The macro + is always #defined by GCC versions at least + up to 13.2, even when using -mstrict-align. + If building for strict-align ARM64, the + configure option --disable-unaligned-access + should be used if using a GCC version that has + this issue because otherwise the performance + may be degraded. It likely won't crash due to + how unaligned access is done in the C code. --enable-unsafe-type-punning This enables use of code like @@ -460,14 +499,14 @@ XZ Utils Installation too. This is the default for 32-bit x86 Windows builds. Unless the compiler supports __attribute__((__constructor__)), - the `win95' threading is incompatible with + the 'win95' threading is incompatible with --enable-small. vista Use Windows Vista compatible threads. The resulting binaries won't run on Windows XP or older. This is the default for Windows excluding 32-bit x86 builds (that is, on - x86-64 the default is `vista'). + x86-64 the default is 'vista'). no Disable threading support. This is the same as using --disable-threads. @@ -480,13 +519,16 @@ XZ Utils Installation one thread, something bad may happen. --enable-sandbox=METHOD - There is limited sandboxing support in the xz tool. If - built with sandbox support, it's used automatically when - (de)compressing exactly one file to standard output and - the options --files or --files0 weren't used. This is a - common use case, for example, (de)compressing .tar.xz - files via GNU tar. The sandbox is also used for - single-file `xz --test' or `xz --list'. + There is limited sandboxing support in the xz and xzdec + tools. If built with sandbox support, xz uses it + automatically when (de)compressing exactly one file to + standard output when the options --files or --files0 aren't + used. This is a common use case, for example, + (de)compressing .tar.xz files via GNU tar. The sandbox is + also used for single-file 'xz --test' or 'xz --list'. + xzdec always uses the sandbox, except when more than one + file are decompressed. In this case it will enable the + sandbox for the last file that is decompressed. Supported METHODs: @@ -498,7 +540,7 @@ XZ Utils Installation no Disable sandboxing support. capsicum - Use Capsicum (FreeBSD >= 10) for + Use Capsicum (FreeBSD >= 10.2) for sandboxing. If no Capsicum support is found, configure will give an error. @@ -506,10 +548,50 @@ XZ Utils Installation sandboxing. If pledge(2) isn't found, configure will give an error. - --enable-symbol-versions - Use symbol versioning for liblzma. This is enabled by - default on GNU/Linux, other GNU-based systems, and - FreeBSD. + landlock + Use Landlock (Linux >= 5.13) for + sandboxing. If no Landlock support + is found, configure will give an error. + + --enable-symbol-versions[=VARIANT] + Use symbol versioning for liblzma shared library. + This is enabled by default on GNU/Linux (glibc only), + other GNU-based systems, and FreeBSD. + + Symbol versioning is never used for static liblzma. This + option is ignored when not building a shared library. + + Supported VARIANTs: + + no Disable symbol versioning. This is the + same as using --disable-symbol-versions. + + auto Autodetect between "no", "linux", + and "generic". + + yes Autodetect between "linux" and + "generic". This forces symbol + versioning to be used when + building a shared library. + + generic Generic version is the default for + FreeBSD and GNU/Linux on MicroBlaze. + + This is also used on GNU/Linux when + building with NVIDIA HPC Compiler + because the compiler doesn't support + the features required for the "linux" + variant below. + + linux Special version for GNU/Linux (glibc + only). This adds a few extra symbol + versions for compatibility with binaries + that have been linked against a liblzma + version that has been patched with + "xz-5.2.2-compat-libs.patch" from + RHEL/CentOS 7. That patch was used + by some build tools outside of + RHEL/CentOS 7 too. --enable-debug This enables the assert() macro and possibly some other diff --git a/Makefile.am b/Makefile.am index f562f90..f6e7363 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,5 @@ -## +## SPDX-License-Identifier: 0BSD ## Author: Lasse Collin -## -## This file has been put into the public domain. -## You can do whatever you want with this file. -## # Use -n to prevent gzip from adding a timestamp to the .gz headers. GZIP_ENV = -9n @@ -21,11 +17,11 @@ if COND_DOC dist_doc_DATA = \ AUTHORS \ COPYING \ + COPYING.0BSD \ COPYING.GPLv2 \ NEWS \ README \ THANKS \ - TODO \ doc/faq.txt \ doc/history.txt \ doc/xz-file-format.txt \ @@ -38,47 +34,33 @@ dist_examples_DATA = \ doc/examples/02_decompress.c \ doc/examples/03_compress_custom.c \ doc/examples/04_compress_easy_mt.c \ + doc/examples/11_file_info.c \ doc/examples/Makefile - -examplesolddir = $(docdir)/examples_old -dist_examplesold_DATA = \ - doc/examples_old/xz_pipe_comp.c \ - doc/examples_old/xz_pipe_decomp.c - -# Install the Doxygen generated documentation if they were built. -install-data-local: - if test -d "$(srcdir)/doc/api" ; then \ - $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \ - $(INSTALL_DATA) "$(srcdir)"/doc/api/* \ - "$(DESTDIR)$(docdir)/api"; \ - fi - -# Remove the Doxygen generated documentation when uninstalling. -uninstall-local: - rm -rf "$(DESTDIR)$(docdir)/api" endif EXTRA_DIST = \ - po4a \ - extra \ + cmake \ dos \ doxygen \ + extra \ + po4a \ windows \ - macosx \ - cmake \ CMakeLists.txt \ - autogen.sh \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ INSTALL.generic \ PACKAGERS \ + TODO \ + autogen.sh \ build-aux/manconv.sh \ - build-aux/version.sh + build-aux/version.sh \ + po/xz.pot-header ACLOCAL_AMFLAGS = -I m4 -# List of man pages to convert to PDF and plain text in the dist-hook target. +# List of man pages to convert to plain text in the dist-hook target +# or to PDF in the pdf-local target. manfiles = \ src/xz/xz.1 \ src/xzdec/xzdec.1 \ @@ -89,42 +71,31 @@ manfiles = \ src/scripts/xzmore.1 # Create ChangeLog from output of "git log --date=iso --stat". -# Convert the man pages to PDF and plain text (ASCII only) formats. +# Convert the man pages to plain text (ASCII only) format. dist-hook: if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ ( cd "$(srcdir)" && git log --date=iso --stat \ - 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \ + b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \ > "$(distdir)/ChangeLog"; \ fi - if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \ + if type groff > /dev/null 2>&1; then \ dest="$(distdir)/doc/man" && \ - $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \ + $(MKDIR_P) "$$dest/txt" && \ for FILE in $(manfiles); do \ BASE=`basename $$FILE .1` && \ - sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \ - < "$(srcdir)/$$FILE" \ - > "$$dest/pdf-a4/$$BASE-a4.pdf" && \ - sh "$(srcdir)/build-aux/manconv.sh" pdf letter \ - < "$(srcdir)/$$FILE" \ - > "$$dest/pdf-letter/$$BASE-letter.pdf" && \ - sh "$(srcdir)/build-aux/manconv.sh" ascii \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" ascii \ < "$(srcdir)/$$FILE" \ > "$$dest/txt/$$BASE.txt"; \ done; \ fi - if test -d "$(srcdir)/doc/api" ; then \ - $(MKDIR_P) "$(distdir)/doc/api" && \ - $(INSTALL_DATA) "$(srcdir)"/doc/api/* \ - "$(distdir)/doc/api"; \ - fi # This works with GNU tar and gives cleaner package than normal 'make dist'. -# This also ensures that the man page translations are up to date (dist-hook +# This also ensures that the translations are up to date (dist-hook # would be too late for that). mydist: - sh "$(srcdir)/src/liblzma/validate_map.sh" - cd "$(srcdir)/po4a" && sh update-po - cd "$(srcdir)/doxygen" && sh update-doxygen + $(SHELL) "$(srcdir)/src/liblzma/validate_map.sh" + cd po && $(MAKE) xz.pot-update + cd "$(srcdir)/po4a" && $(SHELL) update-po VERSION=$(VERSION); \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \ @@ -132,3 +103,17 @@ mydist: fi; \ TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \ $(MAKE) VERSION="$$VERSION" dist-gzip + +# NOTE: This only creates the PDFs. The install rules are missing. +pdf-local: + dest="doc/man" && \ + $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" && \ + for FILE in $(manfiles); do \ + BASE=`basename $$FILE .1` && \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf a4 \ + < "$(srcdir)/$$FILE" \ + > "$$dest/pdf-a4/$$BASE-a4.pdf" && \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf letter \ + < "$(srcdir)/$$FILE" \ + > "$$dest/pdf-letter/$$BASE-letter.pdf"; \ + done diff --git a/Makefile.in b/Makefile.in index 2889d08..4b80f1d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -91,8 +91,8 @@ host_triplet = @host@ @COND_GNULIB_TRUE@am__append_1 = lib subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/getopt.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -112,8 +112,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__dist_doc_DATA_DIST) \ - $(am__dist_examples_DATA_DIST) \ - $(am__dist_examplesold_DATA_DIST) $(am__DIST_COMMON) + $(am__dist_examples_DATA_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -147,9 +146,9 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__dist_doc_DATA_DIST = AUTHORS COPYING COPYING.GPLv2 NEWS README \ - THANKS TODO doc/faq.txt doc/history.txt doc/xz-file-format.txt \ - doc/lzma-file-format.txt +am__dist_doc_DATA_DIST = AUTHORS COPYING COPYING.0BSD COPYING.GPLv2 \ + NEWS README THANKS doc/faq.txt doc/history.txt \ + doc/xz-file-format.txt doc/lzma-file-format.txt am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -177,15 +176,13 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)" \ - "$(DESTDIR)$(examplesolddir)" +am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)" am__dist_examples_DATA_DIST = doc/examples/00_README.txt \ doc/examples/01_compress_easy.c doc/examples/02_decompress.c \ doc/examples/03_compress_custom.c \ - doc/examples/04_compress_easy_mt.c doc/examples/Makefile -am__dist_examplesold_DATA_DIST = doc/examples_old/xz_pipe_comp.c \ - doc/examples_old/xz_pipe_decomp.c -DATA = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_examplesold_DATA) + doc/examples/04_compress_easy_mt.c doc/examples/11_file_info.c \ + doc/examples/Makefile +DATA = $(dist_doc_DATA) $(dist_examples_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -277,7 +274,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CAPSICUM_LIB = @CAPSICUM_LIB@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ @@ -406,6 +402,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ @@ -432,11 +430,11 @@ SUBDIRS = $(am__append_1) src po tests @COND_DOC_TRUE@dist_doc_DATA = \ @COND_DOC_TRUE@ AUTHORS \ @COND_DOC_TRUE@ COPYING \ +@COND_DOC_TRUE@ COPYING.0BSD \ @COND_DOC_TRUE@ COPYING.GPLv2 \ @COND_DOC_TRUE@ NEWS \ @COND_DOC_TRUE@ README \ @COND_DOC_TRUE@ THANKS \ -@COND_DOC_TRUE@ TODO \ @COND_DOC_TRUE@ doc/faq.txt \ @COND_DOC_TRUE@ doc/history.txt \ @COND_DOC_TRUE@ doc/xz-file-format.txt \ @@ -449,34 +447,32 @@ SUBDIRS = $(am__append_1) src po tests @COND_DOC_TRUE@ doc/examples/02_decompress.c \ @COND_DOC_TRUE@ doc/examples/03_compress_custom.c \ @COND_DOC_TRUE@ doc/examples/04_compress_easy_mt.c \ +@COND_DOC_TRUE@ doc/examples/11_file_info.c \ @COND_DOC_TRUE@ doc/examples/Makefile -@COND_DOC_TRUE@examplesolddir = $(docdir)/examples_old -@COND_DOC_TRUE@dist_examplesold_DATA = \ -@COND_DOC_TRUE@ doc/examples_old/xz_pipe_comp.c \ -@COND_DOC_TRUE@ doc/examples_old/xz_pipe_decomp.c - EXTRA_DIST = \ - po4a \ - extra \ + cmake \ dos \ doxygen \ + extra \ + po4a \ windows \ - macosx \ - cmake \ CMakeLists.txt \ - autogen.sh \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ INSTALL.generic \ PACKAGERS \ + TODO \ + autogen.sh \ build-aux/manconv.sh \ - build-aux/version.sh + build-aux/version.sh \ + po/xz.pot-header ACLOCAL_AMFLAGS = -I m4 -# List of man pages to convert to PDF and plain text in the dist-hook target. +# List of man pages to convert to plain text in the dist-hook target +# or to PDF in the pdf-local target. manfiles = \ src/xz/xz.1 \ src/xzdec/xzdec.1 \ @@ -589,27 +585,6 @@ uninstall-dist_examplesDATA: @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) -install-dist_examplesoldDATA: $(dist_examplesold_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_examplesold_DATA)'; test -n "$(examplesolddir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(examplesolddir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(examplesolddir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesolddir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesolddir)" || exit $$?; \ - done - -uninstall-dist_examplesoldDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_examplesold_DATA)'; test -n "$(examplesolddir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(examplesolddir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -926,7 +901,7 @@ check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(examplesolddir)"; do \ + for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -959,8 +934,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@COND_DOC_FALSE@install-data-local: -@COND_DOC_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -983,8 +956,7 @@ info: info-recursive info-am: -install-data-am: install-data-local install-dist_docDATA \ - install-dist_examplesDATA install-dist_examplesoldDATA +install-data-am: install-dist_docDATA install-dist_examplesDATA install-dvi: install-dvi-recursive @@ -1024,14 +996,13 @@ mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive -pdf-am: +pdf-am: pdf-local ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_docDATA uninstall-dist_examplesDATA \ - uninstall-dist_examplesoldDATA uninstall-local +uninstall-am: uninstall-dist_docDATA uninstall-dist_examplesDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -1043,71 +1014,46 @@ uninstall-am: uninstall-dist_docDATA uninstall-dist_examplesDATA \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local \ - install-dist_docDATA install-dist_examplesDATA \ - install-dist_examplesoldDATA install-dvi install-dvi-am \ + install-data install-data-am install-dist_docDATA \ + install-dist_examplesDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-dist_docDATA \ - uninstall-dist_examplesDATA uninstall-dist_examplesoldDATA \ - uninstall-local + mostlyclean-generic mostlyclean-libtool pdf pdf-am pdf-local \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dist_docDATA uninstall-dist_examplesDATA .PRECIOUS: Makefile -# Install the Doxygen generated documentation if they were built. -@COND_DOC_TRUE@install-data-local: -@COND_DOC_TRUE@ if test -d "$(srcdir)/doc/api" ; then \ -@COND_DOC_TRUE@ $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \ -@COND_DOC_TRUE@ $(INSTALL_DATA) "$(srcdir)"/doc/api/* \ -@COND_DOC_TRUE@ "$(DESTDIR)$(docdir)/api"; \ -@COND_DOC_TRUE@ fi - -# Remove the Doxygen generated documentation when uninstalling. -@COND_DOC_TRUE@uninstall-local: -@COND_DOC_TRUE@ rm -rf "$(DESTDIR)$(docdir)/api" - # Create ChangeLog from output of "git log --date=iso --stat". -# Convert the man pages to PDF and plain text (ASCII only) formats. +# Convert the man pages to plain text (ASCII only) format. dist-hook: if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ ( cd "$(srcdir)" && git log --date=iso --stat \ - 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \ + b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \ > "$(distdir)/ChangeLog"; \ fi - if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \ + if type groff > /dev/null 2>&1; then \ dest="$(distdir)/doc/man" && \ - $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \ + $(MKDIR_P) "$$dest/txt" && \ for FILE in $(manfiles); do \ BASE=`basename $$FILE .1` && \ - sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \ - < "$(srcdir)/$$FILE" \ - > "$$dest/pdf-a4/$$BASE-a4.pdf" && \ - sh "$(srcdir)/build-aux/manconv.sh" pdf letter \ - < "$(srcdir)/$$FILE" \ - > "$$dest/pdf-letter/$$BASE-letter.pdf" && \ - sh "$(srcdir)/build-aux/manconv.sh" ascii \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" ascii \ < "$(srcdir)/$$FILE" \ > "$$dest/txt/$$BASE.txt"; \ done; \ fi - if test -d "$(srcdir)/doc/api" ; then \ - $(MKDIR_P) "$(distdir)/doc/api" && \ - $(INSTALL_DATA) "$(srcdir)"/doc/api/* \ - "$(distdir)/doc/api"; \ - fi # This works with GNU tar and gives cleaner package than normal 'make dist'. -# This also ensures that the man page translations are up to date (dist-hook +# This also ensures that the translations are up to date (dist-hook # would be too late for that). mydist: - sh "$(srcdir)/src/liblzma/validate_map.sh" - cd "$(srcdir)/po4a" && sh update-po - cd "$(srcdir)/doxygen" && sh update-doxygen + $(SHELL) "$(srcdir)/src/liblzma/validate_map.sh" + cd po && $(MAKE) xz.pot-update + cd "$(srcdir)/po4a" && $(SHELL) update-po VERSION=$(VERSION); \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \ @@ -1116,6 +1062,20 @@ mydist: TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \ $(MAKE) VERSION="$$VERSION" dist-gzip +# NOTE: This only creates the PDFs. The install rules are missing. +pdf-local: + dest="doc/man" && \ + $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" && \ + for FILE in $(manfiles); do \ + BASE=`basename $$FILE .1` && \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf a4 \ + < "$(srcdir)/$$FILE" \ + > "$$dest/pdf-a4/$$BASE-a4.pdf" && \ + $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf letter \ + < "$(srcdir)/$$FILE" \ + > "$$dest/pdf-letter/$$BASE-letter.pdf"; \ + done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/NEWS b/NEWS index d26b636..77eab74 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,566 @@ XZ Utils Release Notes ====================== +5.6.2 (2024-05-29) + + * Remove the backdoor (CVE-2024-3094). + + * Not changed: Memory sanitizer (MSAN) has a false positive + in the CRC CLMUL code which also makes OSS Fuzz unhappy. + Valgrind is smarter and doesn't complain. + + A revision to the CLMUL code is coming anyway and this issue + will be cleaned up as part of it. It won't be backported to + 5.6.x or 5.4.x because the old code isn't wrong. There is + no reason to risk introducing regressions in old branches + just to silence a false positive. + + * liblzma: + + - lzma_index_decoder() and lzma_index_buffer_decode(): Fix + a missing output pointer initialization (*i = NULL) if the + functions are called with invalid arguments. The API docs + say that such an initialization is always done. In practice + this matters very little because the problem can only occur + if the calling application has a bug and these functions + return LZMA_PROG_ERROR. + + - lzma_str_to_filters(): Fix a missing output pointer + initialization (*error_pos = 0). This is very similar + to the fix above. + + - Fix C standard conformance with function pointer types. + + - Remove GNU indirect function (IFUNC) support. This is *NOT* + done for security reasons even though the backdoor relied on + this code. The performance benefits of IFUNC are too tiny in + this project to make the extra complexity worth it. + + - FreeBSD on ARM64: Add error checking to CRC32 instruction + support detection. + + - Fix building with NVIDIA HPC SDK. + + * xz: + + - Fix a C standard conformance issue in --block-list parsing + (arithmetic on a null pointer). + + - Fix a warning from GNU groff when processing the man page: + "warning: cannot select font 'CW'" + + * xzdec: Add support for Linux Landlock ABI version 4. xz already + had the v3-to-v4 change but it had been forgotten from xzdec. + + * Autotools-based build system (configure): + + - Symbol versioning variant can now be overridden with + --enable-symbol-versions. Documentation in INSTALL was + updated to match. + + - Add new configure option --enable-doxygen to enable + generation and installation of the liblzma API documentation + using Doxygen. Documentation in INSTALL and PACKAGERS was + updated to match. + + CMake: + + - Fix detection of Linux Landlock support. The detection code + in CMakeLists.txt had been sabotaged. + + - Disable symbol versioning on non-glibc Linux to match what + the Autotools build does. For example, symbol versioning + isn't enabled with musl. + + - Symbol versioning variant can now be overridden by setting + SYMBOL_VERSIONING to "OFF", "generic", or "linux". + + - Add support for all tests in typical build configurations. + Now the only difference to the tests coverage to Autotools + is that CMake-based build will skip more tests if features + are disabled. Such builds are only for special cases like + embedded systems. + + - Separate the CMake code for the tests into tests/tests.cmake. + It is used conditionally, thus it is possible to + + rm -rf tests + + and the CMake-based build will still work normally except + that no tests are then available. + + - Add a option ENABLE_DOXYGEN to enable generation and + installation of the liblzma API documentation using Doxygen. + + * Documentation: + + - Omit the Doxygen-generated liblzma API documentation from the + package. Instead, the generation and installation of the API + docs can be enabled with a configure or CMake option if + Doxygen is available. + + - Remove the XZ logo which was used in the API documentation. + The logo has been retired and isn't used by the project + anymore. However, it's OK to use it in contexts that refer + to the backdoor incident. + + - Remove the PDF versions of the man pages from the source + package. These existed primarily for users of operating + systems which don't come with tools to render man page + source files. The plain text versions are still included + in doc/man/txt. PDF files can still be generated to doc/man, + if the required tools are available, using "make pdf" after + running "configure". + + - Update home page URLs back to their old locations on + tukaani.org. + + - Update maintainer info. + + * Tests: + + - In tests/files/README, explain how to recreate the ARM64 + test files. + + - Remove two tests that used tiny x86 and SPARC object files + as the input files. The matching .c file was included but + the object files aren't easy to reproduce. The test cases + weren't great anyway; they were from the early days (2009) + of the project when the test suite had very few tests. + + - Improve a few tests. + + +5.6.1 (2024-03-09) + + IMPORTANT: This fixed bugs in the backdoor (CVE-2024-3094) (someone + had forgot to run Valgrind). + + * liblzma: Fixed two bugs relating to GNU indirect function (IFUNC) + with GCC. The more serious bug caused a program linked with + liblzma to crash on start up if the flag -fprofile-generate was + used to build liblzma. The second bug caused liblzma to falsely + report an invalid write to Valgrind when loading liblzma. + + * xz: Changed the messages for thread reduction due to memory + constraints to only appear under the highest verbosity level. + + * Build: + + - Fixed a build issue when the header file + was present on the system but the Landlock system calls were + not defined in . + + - The CMake build now warns and disables NLS if both gettext + tools and pre-created .gmo files are missing. Previously, + this caused the CMake build to fail. + + * Minor improvements to man pages. + + * Minor improvements to tests. + + +5.6.0 (2024-02-24) + + IMPORTANT: This added a backdoor (CVE-2024-3094). It's enabled only + in the release tarballs. + + This bumps the minor version of liblzma because new features were + added. The API and ABI are still backward compatible with liblzma + 5.4.x and 5.2.x and 5.0.x. + + NOTE: As described in the NEWS for 5.5.2beta, the core components + are now under the BSD Zero Clause License (0BSD). + + Since 5.5.2beta: + + * liblzma: + + - Disabled the branchless C variant in the LZMA decoder based + on the benchmark results from the community. + + - Disabled x86-64 inline assembly on x32 to fix the build. + + * Sandboxing support in xz: + + - Landlock is now used even when xz needs to create files. + In this case the sandbox has to be more permissive than + when no files need to be created. A similar thing was + already in use with pledge(2) since 5.3.4alpha. + + - Landlock and pledge(2) are now stricter when reading from + more than one input file and only writing to standard output. + + - Added support for Landlock ABI version 4. + + * CMake: + + - Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release. + -O3 is not useful for speed and makes the code larger. + + - Now builds lzmainfo and lzmadec. + + - xzdiff, xzgrep, xzless, xzmore, and their symlinks are now + installed. The scripts are also tested during "make test". + + - Added translation support for xz, lzmainfo, and the + man pages. + + - Applied the symbol versioning workaround for MicroBlaze that + is used in the Autotools build. + + - The general XZ Utils and liblzma API documentation is now + installed. + + - The CMake component names were changed a little and several + were added. liblzma_Runtime and liblzma_Development are + unchanged. + + - Minimum required CMake version is now 3.14. However, + translation support is disabled with CMake versions + older than 3.20. + + - The CMake-based build is now close to feature parity with the + Autotools-based build. Most importantly a few tests aren't + run yet. Testing the CMake-based build on different operating + systems would be welcome now. See the comment at the top of + CMakeLists.txt. + + * Fixed a bug in the Autotools feature test for ARM64 CRC32 + instruction support for old versions of Clang. This did not + affect the CMake build. + + * Windows: + + - The build instructions in INSTALL and windows/INSTALL*.txt + were revised completely. + + - windows/build-with-cmake.bat along with the instructions + in windows/INSTALL-MinGW-w64_with_CMake.txt should make + it very easy to build liblzma.dll and xz.exe on Windows + using CMake and MinGW-w64 with either GCC or Clang/LLVM. + + - windows/build.bash was updated. It now works on MSYS2 and + on GNU/Linux (cross-compiling) to create a .zip and .7z + package for 32-bit and 64-bit x86 using GCC + MinGW-w64. + + * The TODO file is no longer installed as part of the + documentation. The file is out of date and does not reflect + the actual tasks that will be completed in the future. + + * Translations: + + - Translated lzmainfo man pages are now installed. These + had been forgotten in earlier versions. + + - Updated Croatian, Esperanto, German, Hungarian, Korean, + Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian + translations. + + - Updated German, Korean, Romanian, and Ukrainian man page + translations. + + * Added a few tests. + + Summary of new features added in the 5.5.x development releases: + + * liblzma: + + - LZMA decoder: Speed optimizations to the C code and + added GCC & Clang compatible inline assembly for x86-64. + + - Added lzma_mt_block_size() to recommend a Block size for + multithreaded encoding. + + - Added CLMUL-based CRC32 on x86-64 and E2K with runtime + processor detection. Similar to CRC64, on 32-bit x86 it + isn't available unless --disable-assembler is used. + + - Optimized the CRC32 calculation on ARM64 platforms using the + CRC32 instructions. Runtime detection for the instruction is + used on GNU/Linux, FreeBSD, Windows, and macOS. If the + compiler flags indicate unconditional CRC32 instruction + support (+crc) then the generic version is not built. + + - Added definitions of mask values like + LZMA_INDEX_CHECK_MASK_CRC32 to . + + * xz: + + - Multithreaded mode is now the default. This improves + compression speed and creates .xz files that can be + decompressed in multithreaded mode. The downsides are + increased memory usage and slightly worse compression ratio. + + - Added a new command line option --filters to set the filter + chain using the liblzma filter string syntax. + + - Added new command line options --filters1 ... --filters9 to + set additional filter chains using the liblzma filter string + syntax. The --block-list option now allows specifying filter + chains that were set using these new options. + + - Ported the command line tools to Windows MSVC. + Visual Studio 2015 or later is required. + + * Added lz4 support to xzdiff/xzcmp and xzgrep. + + +5.5.2beta (2024-02-14) + + * Licensing change: The core components are now under the + BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older + and 5.5.1alpha these components are in the public domain and + obviously remain so; the change affects the new releases only. + + 0BSD is an extremely permissive license which doesn't require + retaining or reproducing copyright or license notices when + distributing the code, thus in practice there is extremely + little difference to public domain. + + * liblzma + + - Significant speed optimizations to the LZMA decoder were + made. There are now three variants that can be chosen at + build time: + + * Basic C version: This is a few percent faster than + 5.4.x due to some new optimizations. + + * Branchless C: This is currently the default on platforms + for which there is no assembly code. This should be a few + percent faster than the basic C version. + + * x86-64 inline assembly. This works with GCC and Clang. + + The default choice can currently be overridden by setting + LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic + version and 3 means that branchless C version. + + - Optimized the CRC32 calculation on ARM64 platforms using the + CRC32 instructions. The instructions are optional in ARMv8.0 + and are required in ARMv8.1 and later. Runtime detection for + the instruction is used on GNU/Linux, FreeBSD, Windows, and + macOS. If the compiler flags indicate unconditional CRC32 + instruction support (+crc) then the generic version is not + built. + + * Added lz4 support to xzdiff/xzcmp and xzgrep. + + * Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten + to simplify licensing of the man page translations. + + * Translations: + + - Updated Chinese (simplified), German, Korean, Polish, + Romanian, Spanish, Swedish, and Ukrainian translations. + + - Updated German, Korean, Romanian, and Ukrainian man page + translations. + + * Small improvements to the tests. + + * Added doc/examples/11_file_info.c. It was added to the Git + repository in 2017 but forgotten to be added into distribution + tarballs. + + * Removed doc/examples_old. These were from 2012. + + * Removed the macos/build.sh script. It had not been updated + since 2013. + + +5.5.1alpha (2024-01-26) + + * Added a new filter for RISC-V binaries. The filter can be used + for 32-bit and 64-bit binaries with either little or big + endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B) + and the xz option is --riscv. liblzma filter string syntax + recognizes this filter as "riscv". + + * liblzma: + + - Added lzma_mt_block_size() to recommend a Block size for + multithreaded encoding + + - Added CLMUL-based CRC32 on x86-64 and E2K with runtime + processor detection. Similar to CRC64, on 32-bit x86 it + isn't available unless --disable-assembler is used. + + - Implemented GNU indirect function (IFUNC) as a runtime + function dispatching method for CRC32 and CRC64 fast + implementations on x86. Only GNU/Linux (glibc) and FreeBSD + builds will use IFUNC, unless --enable-ifunc is specified to + configure. + + - Added definitions of mask values like + LZMA_INDEX_CHECK_MASK_CRC32 to . + + - The XZ logo is now included in the Doxygen generated + documentation. It is licensed under Creative Commons + Attribution-ShareAlike 4.0. + + * xz: + + - Multithreaded mode is now the default. This improves + compression speed and creates .xz files that can be + decompressed multithreaded at the cost of increased memory + usage and slightly worse compression ratio. + + - Added new command line option --filters to set the filter + chain using liblzma filter string syntax. + + - Added new command line options --filters1 ... --filters9 to + set additional filter chains using liblzma filter string + syntax. The --block-list option now allows specifying filter + chains that were set using these new options. + + - Added support for Linux Landlock as a sandboxing method. + + - xzdec now supports pledge(2), Capsicum, and Linux Landlock as + sandboxing methods. + + - Progress indicator time stats remain accurate after pausing + xz with SIGTSTP. + + - Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or + later is required. + + * CMake Build: + + - Supports pledge(2), Capsicum, and Linux Landlock sandboxing + methods. + + - Replacement functions for getopt_long() are used on platforms + that do not have it. + + * Enabled unaligned access by default on PowerPC64LE and on RISC-V + targets that define __riscv_misaligned_fast. + + * Tests: + + - Added two new fuzz targets to OSS-Fuzz. + + - Implemented Continuous Integration (CI) testing using + GitHub Actions. + + * Changed quoting style from `...' to '...' in all messages, + scripts, and documentation. + + * Added basic Codespell support to help catch typo errors. + + +5.4.7 (2024-05-29) + + * Not changed: Memory sanitizer (MSAN) has a false positive + in the CRC CLMUL code which also makes OSS Fuzz unhappy. + Valgrind is smarter and doesn't complain. + + A revision to the CLMUL code is coming anyway and this issue + will be cleaned up as part of it. It won't be backported to + 5.6.x or 5.4.x because the old code isn't wrong. There is + no reason to risk introducing regressions in old branches + just to silence a false positive. + + * liblzma: + + - lzma_index_decoder() and lzma_index_buffer_decode(): Fix + a missing output pointer initialization (*i = NULL) if the + functions are called with invalid arguments. The API docs + say that such an initialization is always done. In practice + this matters very little because the problem can only occur + if the calling application has a bug and these functions + return LZMA_PROG_ERROR. + + - lzma_str_to_filters(): Fix a missing output pointer + initialization (*error_pos = 0). This is very similar + to the fix above. + + - Fix C standard conformance with function pointer types. + This newly showed up with Clang 17 with -fsanitize=undefined. + There are no bug reports about this. + + - Fix building with NVIDIA HPC SDK. + + * xz: + + - Fix a C standard conformance issue in --block-list parsing + (arithmetic on a null pointer). + + - Fix a warning from GNU groff when processing the man page: + "warning: cannot select font 'CW'" + + - Fix outdated threading related information on the man page. + + * xzless: + + - With "less" version 451 and later, use "||-" instead of "|-" + in the environment variable LESSOPEN. This way compressed + files that contain no uncompressed data are shown correctly + as empty. + + - With "less" version 632 and later, use --show-preproc-errors + to make "less" show a warning on decompression errors. + + * Autotools-based build system (configure): + + - Symbol versioning variant can now be overridden with + --enable-symbol-versions. Documentation in INSTALL was + updated to match. + + CMake: + + - Linux on MicroBlaze is handled specially now. This matches + the changes made to the Autotools-based build in XZ Utils + 5.4.2 and 5.2.11. + + - Disable symbol versioning on non-glibc Linux to match what + the Autotools build does. For example, symbol versioning + isn't enabled with musl. + + - Symbol versioning variant can now be overridden by setting + SYMBOL_VERSIONING to "OFF", "generic", or "linux". + + * Documentation: + + - Clarify the description of --disable-assembler in INSTALL. + The option only affects 32-bit x86 assembly usage. + + - Add doc/examples/11_file_info.c. It was added to the + Git repository in 2017 but forgotten to be added into + distribution tarballs. + + - Don't install the TODO file as part of the documentation. + The file is out of date. + + - Update home page URLs back to their old locations on + tukaani.org. + + - Update maintainer info. + + +5.4.6 (2024-01-26) + + * Fixed a bug involving internal function pointers in liblzma not + being initialized to NULL. The bug can only be triggered if + lzma_filters_update() is called on a LZMA1 encoder, so it does + not affect xz or any application known to us that uses liblzma. + + * xz: + + - Fixed a regression introduced in 5.4.2 that caused encoding + in the raw format to unnecessarily fail if --suffix was not + used. For instance, the following command no longer reports + that --suffix must be used: + + echo foo | xz --format=raw --lzma2 | wc -c + + - Fixed an issue on MinGW-w64 builds that prevented reading + from or writing to non-terminal character devices like NUL. + + * Added a new test. + + 5.4.5 (2023-11-01) * liblzma: @@ -804,6 +1364,162 @@ XZ Utils Release Notes (FreeBSD >= 10). +5.2.13 (2024-05-29) + + * liblzma: + + - lzma_index_append(): Fix an assertion failure that could be + triggered by a large unpadded_size argument. It was verified + that there was no other bug than the assertion failure. + + - lzma_index_decoder() and lzma_index_buffer_decode(): Fix + a missing output pointer initialization (*i = NULL) if the + functions are called with invalid arguments. The API docs + say that such an initialization is always done. In practice + this matters very little because the problem can only occur + if the calling application has a bug and these functions + return LZMA_PROG_ERROR. + + - Fix C standard conformance with function pointer types. + This newly showed up with Clang 17 with -fsanitize=undefined. + There are no bug reports about this. + + - Fix building with NVIDIA HPC SDK. + + - Fix building with Windows Vista threads and --enable-small. + (CMake build doesn't support ENABLE_SMALL in XZ Utils 5.2.x.) + + * xz: + + - Fix a C standard conformance issue in --block-list parsing + (arithmetic on a null pointer). + + - Fix a warning from GNU groff when processing the man page: + "warning: cannot select font 'CW'" + + - Windows: Handle special files such as "con" or "nul". Earlier + the following wrote "foo" to the console and deleted the input + file "con_xz": + + echo foo | xz > con_xz + xz --suffix=_xz --decompress con_xz + + - Windows: Fix an issue that prevented reading from or writing + to non-terminal character devices like NUL. + + * xzless: + + - With "less" version 451 and later, use "||-" instead of "|-" + in the environment variable LESSOPEN. This way compressed + files that contain no uncompressed data are shown correctly + as empty. + + - With "less" version 632 and later, use --show-preproc-errors + to make "less" show a warning on decompression errors. + + * Build systems: + + - Add a new line to liblzma.pc for MSYS2 (Windows): + + Cflags.private: -DLZMA_API_STATIC + + When compiling code that will link against static liblzma, + the LZMA_API_STATIC macro needs to be defined on Windows. + + - Autotools (configure): + + * Symbol versioning variant can now be overridden with + --enable-symbol-versions. Documentation in INSTALL was + updated to match. + + - CMake: + + * Fix a bug that prevented other projects from including + liblzma multiple times using find_package(). + + * Fix a bug where configuring CMake multiple times resulted + in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC not being + defined. + + * Fix the build with MinGW-w64-based Clang/LLVM 17. + llvm-windres now has more accurate GNU windres emulation + so the GNU windres workaround from 5.4.1 is needed with + llvm-windres version 17 too. + + * The import library on Windows is now properly named + "liblzma.dll.a" instead of "libliblzma.dll.a" + + * Add large file support by default for platforms that + need it to handle files larger than 2 GiB. This includes + MinGW-w64, even 64-bit builds. + + * Linux on MicroBlaze is handled specially now. This + matches the changes made to the Autotools-based build + in XZ Utils 5.4.2 and 5.2.11. + + * Disable symbol versioning on non-glibc Linux to match + what the Autotools build does. For example, symbol + versioning isn't enabled with musl. + + * Symbol versioning variant can now be overridden by + setting SYMBOL_VERSIONING to "OFF", "generic", or + "linux". + + * Documentation: + + - Clarify the description of --disable-assembler in INSTALL. + The option only affects 32-bit x86 assembly usage. + + - Don't install the TODO file as part of the documentation. + The file is out of date. + + - Update home page URLs back to their old locations on + tukaani.org. + + - Update maintainer info. + + +5.2.12 (2023-05-04) + + * Fixed a build system bug that prevented building liblzma as a + shared library when configured with --disable-threads. This bug + affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2. + + * Include for Windows intrinsic functions where they are + needed. This fixed a bug that prevented building liblzma using + clang-cl on Windows. + + * Minor update to the Croatian translation. The small change + applies to a string in both 5.2 and 5.4 branches. + + +5.2.11 (2023-03-18) + + * Removed all possible cases of null pointer + 0. It is undefined + behavior in C99 and C17. This was detected by a sanitizer and had + not caused any known issues. + + * Build systems: + + - Added a workaround for building with GCC on MicroBlaze Linux. + GCC 12 on MicroBlaze doesn't support the __symver__ attribute + even though __has_attribute(__symver__) returns true. The + build is now done without the extra RHEL/CentOS 7 symbols + that were added in XZ Utils 5.2.7. The workaround only + applies to the Autotools build (not CMake). + + - CMake: Ensure that the C compiler language is set to C99 or + a newer standard. + + - CMake changes from XZ Utils 5.4.1: + + * Added a workaround for a build failure with + windres from GNU binutils. + + * Included the Windows resource files in the xz + and xzdec build rules. + + 5.2.10 (2022-12-13) * xz: Don't modify argv[] when parsing the --memlimit* and diff --git a/PACKAGERS b/PACKAGERS index 3042c66..b12c485 100644 --- a/PACKAGERS +++ b/PACKAGERS @@ -44,8 +44,8 @@ Information to packagers of XZ Utils lzmadec binary for compatibility with LZMA Utils liblzma liblzma.so.* liblzma-devel liblzma.so, liblzma.a, API headers - liblzma-doc Doxygen-generated liblzma API docs (HTML), - example programs + liblzma-doc Example programs and, if enabled at build time, + Doxygen-generated liblzma API docs (HTML) 2. Package description @@ -124,14 +124,15 @@ Information to packagers of XZ Utils If the package manager supports a license field, you probably should put GPLv2+ there (GNU GPL v2 or later). The interesting parts of - XZ Utils are in the public domain, but some less important files - ending up into the binary package are under GPLv2+. So it is simplest - to just say GPLv2+ if you cannot specify "public domain and GPLv2+". + XZ Utils are under the BSD Zero Clause License (0BSD), but some less + important files ending up into the binary package are under GPLv2+. + So it is simplest to just say GPLv2+ if you cannot specify + "BSD0 and GPLv2+". If you split XZ Utils into multiple packages as described earlier in this file, liblzma and liblzma-dev packages will contain only - public domain code (from XZ Utils at least; compiler or linker may - add some third-party code, which may be copyrighted). + 0BSD-licensed code from XZ Utils (compiler or linker may add some + third-party code which may have other licenses). 4. configure options @@ -169,13 +170,14 @@ Information to packagers of XZ Utils can be replaced with a symlink if your distro ships with shared copies of the common license texts. - The Doxygen-generated documentation (HTML) for the liblzma API - headers is included in the source release and will be installed by - "make install" to $docdir/api. All JavaScript is removed to - simplify license compliance and to reduce the install size. If the - liblzma API documentation is not desired, either run configure with - --disable-doc or remove the doc/api directory before running - "make install". + The Doxygen-generated liblzma API documentation (HTML) is built and + installed if the configure option --enable-doxygen is used (it's + disabled by default). This requires that Doxygen is available. The + API documentation is installed by "make install" to $docdir/api. + + NOTE: The files generated by Doxygen include content from + Doxygen itself. Check the license info before distributing + the Doxygen-generated files. 6. Extra files diff --git a/README b/README index 9e76301..9d097de 100644 --- a/README +++ b/README @@ -67,24 +67,25 @@ XZ Utils 1.1. Overall documentation - README This file - - INSTALL.generic Generic install instructions for those not familiar - with packages using GNU Autotools - INSTALL Installation instructions specific to XZ Utils - PACKAGERS Information to packagers of XZ Utils - - COPYING XZ Utils copyright and license information - COPYING.GPLv2 GNU General Public License version 2 - COPYING.GPLv3 GNU General Public License version 3 - COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1 - - AUTHORS The main authors of XZ Utils - THANKS Incomplete list of people who have helped making - 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 + README This file + + INSTALL.generic Generic install instructions for those not + familiar with packages using GNU Autotools + INSTALL Installation instructions specific to XZ Utils + PACKAGERS Information to packagers of XZ Utils + + COPYING XZ Utils copyright and license information + COPYING.0BSD BSD Zero Clause License + COPYING.GPLv2 GNU General Public License version 2 + COPYING.GPLv3 GNU General Public License version 3 + COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1 + + AUTHORS The main authors of XZ Utils + THANKS Incomplete list of people who have helped making + 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. @@ -94,9 +95,9 @@ XZ Utils The command-line tools are documented as man pages. In source code releases (and possibly also in some binary packages), the man pages - are also provided in plain text (ASCII only) and PDF formats in the - directory "doc/man" to make the man pages more accessible to those - whose operating system doesn't provide an easy way to view man pages. + are also provided in plain text (ASCII only) format in the directory + "doc/man" to make the man pages more accessible to those whose + operating system doesn't provide an easy way to view man pages. 1.3. Documentation for liblzma @@ -297,11 +298,13 @@ XZ Utils 6. Contact information ---------------------- - If you have questions, bug reports, patches etc. related to XZ Utils, - the project maintainers Lasse Collin and Jia Tan can be reached via - . + XZ Utils in general: + - Home page: https://tukaani.org/xz/ + - Email to maintainer(s): xz@tukaani.org + - IRC: #tukaani on Libera Chat + - GitHub: https://github.com/tukaani-project/xz - You might find Lasse also from #tukaani on Libera Chat (IRC). - The nick is Larhzu. The channel tends to be pretty quiet, - so just ask your question and someone might wake up. + Lead maintainer: + - Email: Lasse Collin + - IRC: Larhzu on Libera Chat diff --git a/THANKS b/THANKS index 0206af9..7d2d4fe 100644 --- a/THANKS +++ b/THANKS @@ -5,6 +5,7 @@ Thanks Some people have helped more, some less, but nevertheless everyone's help has been important. :-) In alphabetical order: - Mark Adler + - Kian-Meng Ang - H. Peter Anvin - Jeff Bastian - Nelson H. F. Beebe @@ -45,15 +46,18 @@ has been important. :-) In alphabetical order: - Vincent Fazio - Michael Felt - Michael Fox + - Andres Freund - Mike Frysinger - Daniel Richard G. - Tomasz Gajc - Bjarni Ingi Gislason - John Paul Adrian Glaubitz - Bill Glessner + - Matthew Good - Michał Górny - Jason Gorski - Juan Manuel Guerrero + - Gabriela Gutierrez - Diederik de Haas - Joachim Henke - Christian Hesse @@ -62,6 +66,7 @@ has been important. :-) In alphabetical order: - Nicholas Jackson - Sam James - Hajin Jang + - Hans Jansen - Jouk Jansen - Jun I Jin - Kiyoshi Kanazawa @@ -72,6 +77,7 @@ has been important. :-) In alphabetical order: - Richard Koch - Anton Kochkov - Ville Koskinen + - Sergey Kosukhin - Marcin Kowalczyk - Jan Kratochvil - Christian Kujau @@ -79,6 +85,7 @@ has been important. :-) In alphabetical order: - Ilya Kurdyukov - Peter Lawler - James M Leddy + - Kelvin Lee - Vincent Lefevre - Hin-Tak Leung - Andraž 'ruskie' Levstik @@ -89,6 +96,7 @@ has been important. :-) In alphabetical order: - Lorenzo De Liso - H.J. Lu - Bela Lubkin + - Chenxi Mao - Gregory Margo - Julien Marrec - Ed Maste @@ -144,12 +152,12 @@ has been important. :-) In alphabetical order: - Martin Storsjö - Jonathan Stott - Dan Stromberg - - Jia Tan - Vincent Torri + - Alexey Tourbin - Paul Townsend - Mohammed Adnène Trojette - - Alexey Tourbin - Taiki Tsunekawa + - Maksym Vatsyk - Loganaden Velvindron - Patrick J. Volkerding - Martin Väth @@ -164,6 +172,7 @@ has been important. :-) In alphabetical order: - Charles Wilson - Lars Wirzenius - Pilorz Wojciech + - Chien Wong - Ryan Young - Andreas Zieringer diff --git a/TODO b/TODO index 7b9a3ad..ad37f3f 100644 --- a/TODO +++ b/TODO @@ -24,10 +24,6 @@ Known bugs tuklib_exit() doesn't block signals => EINTR is possible. - SIGTSTP is not handled. If xz is stopped, the estimated remaining - time and calculated (de)compression speed won't make sense in the - progress indicator (xz --verbose). - If liblzma has created threads and fork() gets called, liblzma code will break in the child process unless it calls exec() and doesn't touch liblzma. diff --git a/aclocal.m4 b/aclocal.m4 index 6d41ec8..86f1749 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -14,8 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, +[m4_warning([this file was generated for autoconf 2.72. 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'.])]) @@ -1168,8 +1168,8 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/ax_check_capsicum.m4]) m4_include([m4/ax_pthread.m4]) +m4_include([m4/build-to-host.m4]) m4_include([m4/getopt.m4]) m4_include([m4/gettext.m4]) m4_include([m4/host-cpu-c-abi.m4]) diff --git a/autogen.sh b/autogen.sh index d5cec1b..3ac75e8 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,12 +1,10 @@ #!/bin/sh +# SPDX-License-Identifier: 0BSD ############################################################################### # # Author: Lasse Collin # -# This file has been put into the public domain. -# You can do whatever you want with this file. -# ############################################################################### set -e -x @@ -19,14 +17,12 @@ ${AUTOCONF:-autoconf} ${AUTOHEADER:-autoheader} ${AUTOMAKE:-automake} -acf --foreign -# Generate the translated man pages and the doxygen documentation if the -# "po4a" and "doxygen" tools are available. +# Generate the translated man pages if the "po4a" tool is available. # This is *NOT* done by "autoreconf -fi" or when "make" is run. -# Pass --no-po4a or --no-doxygen to this script to skip these steps. -# It can be useful when you know that po4a or doxygen aren't available and +# Pass --no-po4a o this script to skip this step. +# It can be useful when you know that po4a isn't available and # don't want autogen.sh to exit with non-zero exit status. generate_po4a="y" -generate_doxygen="y" for arg in "$@" do @@ -34,10 +30,6 @@ do "--no-po4a") generate_po4a="n" ;; - - "--no-doxygen") - generate_doxygen="n" - ;; esac done @@ -47,10 +39,4 @@ if test "$generate_po4a" != "n"; then cd .. fi -if test "$generate_doxygen" != "n"; then - cd doxygen - sh update-doxygen - cd .. -fi - exit 0 diff --git a/build-aux/config.guess b/build-aux/config.guess index 7f76b62..f6d217a 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-09' +timestamp='2024-01-01' # 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 @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2024 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." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -162,6 +165,8 @@ Linux|GNU|GNU/*) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm #else #include /* First heuristic to detect musl libc. */ @@ -169,6 +174,7 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" @@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -904,7 +910,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; @@ -966,11 +972,37 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1036,7 +1068,16 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) @@ -1151,16 +1192,27 @@ EOF ;; x86_64:Linux:*:*) set_cc_for_build + CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI=${LIBC}x32 - fi + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac fi - GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC @@ -1180,7 +1232,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1321,7 +1373,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; @@ -1367,8 +1419,11 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; - x86_64:Haiku:*:*) - GUESS=x86_64-unknown-haiku + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE @@ -1540,6 +1595,9 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac # Do we have a guess based on uname results? diff --git a/build-aux/config.rpath b/build-aux/config.rpath index 1e1ab67..3893ddd 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2022 Free Software Foundation, Inc. +# Copyright 1996-2024 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # diff --git a/build-aux/config.sub b/build-aux/config.sub index 9b62e37..2c6a07a 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-12-25' +timestamp='2024-01-01' # 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 @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2024 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." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1075,7 +1076,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1180,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ @@ -1199,50 +1200,29 @@ case $cpu-$vendor in | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ - | loongarch32 | loongarch64 | loongarchx32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ + | nanomips* \ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ @@ -1274,6 +1254,7 @@ case $cpu-$vendor in | ubicom32 \ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ + | vc4 \ | visium \ | w65 \ | wasm32 | wasm64 \ @@ -1285,7 +1266,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1306,11 +1287,12 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux @@ -1341,6 +1323,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1506,10 +1492,16 @@ case $os in os=eabi ;; *) - os=elf + os= + obj=elf ;; esac ;; + aout* | coff* | elf* | pe*) + # These are machine code file formats, not OSes + obj=$os + os= + ;; *) # No normalization, but not necessarily accepted, that comes below. ;; @@ -1528,12 +1520,15 @@ else # system, and we'll never get to this point. kernel= +obj= case $cpu-$vendor in score-*) - os=elf + os= + obj=elf ;; spu-*) - os=elf + os= + obj=elf ;; *-acorn) os=riscix1.2 @@ -1543,28 +1538,35 @@ case $cpu-$vendor in os=gnu ;; arm*-semi) - os=aout + os= + obj=aout ;; c4x-* | tic4x-*) - os=coff + os= + obj=coff ;; c8051-*) - os=elf + os= + obj=elf ;; clipper-intergraph) os=clix ;; hexagon-*) - os=elf + os= + obj=elf ;; tic54x-*) - os=coff + os= + obj=coff ;; tic55x-*) - os=coff + os= + obj=coff ;; tic6x-*) - os=coff + os= + obj=coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1586,19 +1588,24 @@ case $cpu-$vendor in os=sunos3 ;; m68*-cisco) - os=aout + os= + obj=aout ;; mep-*) - os=elf + os= + obj=elf ;; mips*-cisco) - os=elf + os= + obj=elf ;; - mips*-*) - os=elf + mips*-*|nanomips*-*) + os= + obj=elf ;; or32-*) - os=coff + os= + obj=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 @@ -1607,7 +1614,8 @@ case $cpu-$vendor in os=sunos4.1.1 ;; pru-*) - os=elf + os= + obj=elf ;; *-be) os=beos @@ -1688,10 +1696,12 @@ case $cpu-$vendor in os=uxpv ;; *-rom68k) - os=coff + os= + obj=coff ;; *-*bug) - os=coff + os= + obj=coff ;; *-apple) os=macos @@ -1709,10 +1719,11 @@ esac fi -# Now, validate our (potentially fixed-up) OS. +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). + case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | relibc* | uclibc*) + llvm* | musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) @@ -1720,6 +1731,9 @@ case $os in # VxWorks passes extra cpu info in the 4th filed. simlinux | simwindows | spe) ;; + # See `case $cpu-$os` validation below + ghcjs) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1728,7 +1742,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1737,11 +1751,11 @@ case $os in | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | bosx* | nextstep* | cxux* | oabi* \ + | ptx* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* | serenity* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | cygwin* | msys* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ @@ -1754,49 +1768,116 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* | cos* | mbr* | ironclad* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; + # This refers to builds using the UEFI calling convention + # (which depends on the architecture) and PE file format. + # Note that this is both a different calling convention and + # different file format than that of GNU-EFI + # (x86_64-w64-mingw32). + uefi) + ;; none) ;; + kernel* | msvc* ) + # Restricted further below + ;; + '') + if test x"$obj" = x + then + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 + fi + ;; + *) + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- ) + ;; + uclinux-uclibc*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) ;; - uclinux-uclibc* ) + windows*-msvc*-) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 ;; - nto-qnx*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - os2-emx) + kfreebsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) ;; - *-eabi* | *-gnueabi*) + *-eabi*- | *-gnueabi*-) ;; - -*) + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1879,7 +1960,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 5506693..51e57e3 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -2,11 +2,11 @@ ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.7.4-1ec8f-dirty +# libtool (GNU libtool) 2.5.0.1-38c1-dirty # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2024 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. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.7.4-1ec8f-dirty -package_revision=2.4.7.4 +VERSION=2.5.0.1-38c1-dirty +package_revision=2.5.0.1 ## ------ ## @@ -72,11 +72,11 @@ scriptversion=2019-02-19.15; # UTC # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# Copyright (C) 2004-2019, 2021, 2023 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of +# , and GPL version 2 or later +# . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. @@ -143,7 +143,7 @@ nl=' ' IFS="$sp $nl" -# There are apparently some retarded systems that use ';' as a PATH separator! +# There are apparently some systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { @@ -1536,11 +1536,11 @@ func_lt_ver () # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# Copyright (C) 2010-2019, 2021, 2023 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of +# , and GPL version 2 or later +# . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. @@ -2215,7 +2215,7 @@ func_version () # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.7.4-1ec8f-dirty' +scriptversion='(GNU libtool) 2.5.0.1-38c1-dirty' # func_echo ARG... @@ -2306,13 +2306,13 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.7.4-1ec8f-dirty + version: $progname (GNU libtool) 2.5.0.1-38c1-dirty automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . -GNU libtool home page: . -General help using GNU software: ." +GNU libtool home page: . +General help using GNU software: ." exit 0 } @@ -2668,10 +2668,10 @@ libtool_validate_options () # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host in + case $host_os in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; @@ -3003,7 +3003,7 @@ EOF # func_convert_core_file_wine_to_w32 ARG # Helper function used by file name conversion functions when $build is *nix, -# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a # correctly configured wine environment available, with the winepath program # in $build's $PATH. # @@ -3035,9 +3035,10 @@ func_convert_core_file_wine_to_w32 () # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. +# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. Assumes ARG has no leading or trailing path separator +# characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. @@ -3692,7 +3693,7 @@ func_mode_compile () # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) + cygwin* | mingw* | windows* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -4569,7 +4570,7 @@ func_mode_install () 'exit $?' tstripme=$stripme case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= @@ -4682,7 +4683,7 @@ func_mode_install () # Do a test to see if this is really a libtool program. case $host in - *cygwin* | *mingw*) + *cygwin* | *mingw* | *windows*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result @@ -4910,7 +4911,7 @@ extern \"C\" { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in - *cygwin* | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *windows* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; @@ -4922,7 +4923,7 @@ extern \"C\" { eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin* | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *windows* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -4936,7 +4937,7 @@ extern \"C\" { func_basename "$dlprefile" name=$func_basename_result case $host in - *cygwin* | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *windows* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" @@ -5111,7 +5112,7 @@ static const void *lt_preloaded_setup() { # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in - *cygwin* | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *windows* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` @@ -5454,7 +5455,7 @@ func_extract_archives () # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw +# incorporate the script contents within a cygwin/mingw/windows # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. @@ -5462,7 +5463,7 @@ func_extract_archives () # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific +# the $objdir directory. This is a cygwin/mingw/windows-specific # behavior. func_emit_wrapper () { @@ -5587,7 +5588,7 @@ func_exec_program_core () " case $host in # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) + *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 @@ -5655,7 +5656,7 @@ func_exec_program () file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done - # Usually 'no', except on cygwin/mingw when embedded into + # Usually 'no', except on cygwin/mingw/windows when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then @@ -5787,7 +5788,7 @@ EOF #endif #include #include -#ifdef _MSC_VER +#if defined _WIN32 && !defined __GNUC__ # include # include # include @@ -5812,7 +5813,7 @@ EOF /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ -int _putenv (const char *); +_CRTIMP int __cdecl _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ @@ -6010,7 +6011,7 @@ main (int argc, char *argv[]) { EOF case $host in - *mingw* | *cygwin* ) + *mingw* | *windows* | *cygwin* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" ;; @@ -6029,7 +6030,7 @@ EOF { /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX namespace, but it is not one of the ones we know about and - have already dealt with, above (inluding dump-script), then + have already dealt with, above (including dump-script), then report an error. Otherwise, targets might begin to believe they are allowed to use options in the LTWRAPPER_OPTION_PREFIX namespace. The first time any user complains about this, we'll @@ -6113,7 +6114,7 @@ EOF EOF case $host_os in - mingw*) + mingw* | windows*) cat <<"EOF" { char* p; @@ -6155,7 +6156,7 @@ EOF EOF case $host_os in - mingw*) + mingw* | windows*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); @@ -6574,7 +6575,7 @@ lt_update_lib_path (const char *name, const char *value) EOF case $host_os in - mingw*) + mingw* | windows*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). @@ -6749,7 +6750,7 @@ func_mode_link () $debug_cmd case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra @@ -7255,7 +7256,7 @@ func_mode_link () ;; esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; @@ -7275,7 +7276,7 @@ func_mode_link () -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -7283,7 +7284,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7303,7 +7304,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7347,7 +7348,7 @@ func_mode_link () continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -7370,7 +7371,7 @@ func_mode_link () -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" @@ -7555,14 +7556,27 @@ func_mode_link () # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fdiagnostics-color* simply affects output + # -frecord-gcc-switches used to verify flags were respected # -fsanitize=* Clang/GCC memory and address sanitizer + # -fno-sanitize* Clang/GCC memory and address sanitizer + # -shared-libsan Link with shared sanitizer runtimes (Clang) + # -static-libsan Link with static sanitizer runtimes (Clang) + # -no-canonical-prefixes Do not expand any symbolic links # -fuse-ld=* Linker select flags for GCC + # -rtlib=* select c runtime lib with clang + # --unwindlib=* select unwinder library with clang + # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking # -Wa,* Pass flags directly to the assembler # -Werror, -Werror=* Report (specified) warnings as errors -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \ + -stdlib=*|-rtlib=*|--unwindlib=*| \ + -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \ + -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \ + -fdiagnostics-color*|-frecord-gcc-switches| \ + -fuse-ld=*|-Wa,*|-Werror|-Werror=*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" @@ -7892,7 +7906,7 @@ func_mode_link () found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -8069,18 +8083,15 @@ func_mode_link () ;; esac if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" + func_warning "Linking the shared library $output against the static library $deplib is not portable!" deplibs="$deplib $deplibs" else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." + func_warning "Trying to link with static lib archive $deplib." + func_warning "I have the capability to make that library automatically link in when" + func_warning "you link to this library. But I can only do this if you have a" + func_warning "shared version of the library, which you do not appear to have" + func_warning "because the file extensions .$libext of this argument makes me believe" + func_warning "that it is just a static archive that I should not use here." fi ;; esac @@ -8275,7 +8286,7 @@ func_mode_link () fi case $host in # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *windows* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present @@ -8418,8 +8429,8 @@ func_mode_link () fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) + case $host_os in + cygwin* | mingw* | windows* | cegcc* | os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no @@ -8445,11 +8456,11 @@ func_mode_link () if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" + func_warning "Linking the executable $output against the loadable module" else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" + func_warning "Linking the shared library $output against the loadable module" fi - $ECHO "*** $linklib is not portable!" + func_warning "$linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then @@ -8488,8 +8499,8 @@ func_mode_link () soname=$dlname elif test -n "$soname_spec"; then # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) + case $host_os in + cygwin* | mingw* | windows* | cegcc* | os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major @@ -8544,11 +8555,10 @@ func_mode_link () if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" + func_warning "lib $linklib is a module, not a shared library" if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" + func_warning "And there doesn't seem to be a static archive available" + func_warning "The link will probably fail, sorry" else add=$dir/$old_library fi @@ -8688,21 +8698,19 @@ func_mode_link () # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." + func_warning "This system cannot link to static lib archive $lib." + func_warning "I have the capability to make that library automatically link in when" + func_warning "you link to this library. But I can only do this if you have a" + func_warning "shared version of the library, which you do not appear to have." if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + func_warning "But as you try to build a module library, libtool will still create " + func_warning "a static module, that should work as long as the dlopening application" + func_warning "is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." + func_warning "However, this would only work if libtool was able to extract symbol" + func_warning "lists from a program, using 'nm' or equivalent, but libtool could" + func_warning "not find such a program. So, this module is probably useless." + func_warning "'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module @@ -9029,9 +9037,7 @@ func_mode_link () if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" + func_warning "Linking the shared library $output against the non-libtool objects $objs is not portable!" func_append libobjs " $objs" fi fi @@ -9092,13 +9098,13 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|qnx|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; - freebsd-aout|qnx|sunos) + freebsd-aout|sco|sunos) current=$number_major revision=$number_minor age=0 @@ -9245,8 +9251,9 @@ func_mode_link () ;; qnx) - major=.$current - versuffix=.$current + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; sco) @@ -9399,7 +9406,7 @@ func_mode_link () if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) @@ -9450,108 +9457,6 @@ func_mode_link () # implementing what was already the behavior. newdeplibs=$deplibs ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c < header file. */ #undef HAVE_BYTESWAP_H -/* Define to 1 if Capsicum is available. */ -#undef HAVE_CAPSICUM +/* Define to 1 if you have the 'cap_rights_limit' function. */ +#undef HAVE_CAP_RIGHTS_LIMIT -/* Define to 1 if the system has the type `CC_SHA256_CTX'. */ +/* Define to 1 if the system has the type 'CC_SHA256_CTX'. */ #undef HAVE_CC_SHA256_CTX -/* Define to 1 if you have the `CC_SHA256_Init' function. */ +/* Define to 1 if you have the 'CC_SHA256_Init' function. */ #undef HAVE_CC_SHA256_INIT /* Define to 1 if you have the Mac OS X function @@ -48,10 +52,10 @@ /* Define to 1 if sha256 integrity check is enabled. */ #undef HAVE_CHECK_SHA256 -/* Define to 1 if you have the `clock_gettime' function. */ +/* Define to 1 if you have the 'clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME -/* Define to 1 if `CLOCK_MONOTONIC' is declared in . */ +/* Define to 1 if 'CLOCK_MONOTONIC' is declared in . */ #undef HAVE_CLOCK_MONOTONIC /* Define to 1 if you have the header file. */ @@ -91,6 +95,9 @@ /* Define to 1 if powerpc decoder is enabled. */ #undef HAVE_DECODER_POWERPC +/* Define to 1 if riscv decoder is enabled. */ +#undef HAVE_DECODER_RISCV + /* Define to 1 if sparc decoder is enabled. */ #undef HAVE_DECODER_SPARC @@ -100,6 +107,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the 'elf_aux_info' function. */ +#undef HAVE_ELF_AUX_INFO + /* Define to 1 if any of HAVE_ENCODER_foo have been defined. */ #undef HAVE_ENCODERS @@ -127,32 +137,35 @@ /* Define to 1 if powerpc encoder is enabled. */ #undef HAVE_ENCODER_POWERPC +/* Define to 1 if riscv encoder is enabled. */ +#undef HAVE_ENCODER_RISCV + /* Define to 1 if sparc encoder is enabled. */ #undef HAVE_ENCODER_SPARC /* Define to 1 if x86 encoder is enabled. */ #undef HAVE_ENCODER_X86 -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - /* Define to 1 if __attribute__((__constructor__)) is supported for functions. */ #undef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR -/* Define to 1 if you have the `futimens' function. */ +/* Define to 1 if you have the 'futimens' function. */ #undef HAVE_FUTIMENS -/* Define to 1 if you have the `futimes' function. */ +/* Define to 1 if you have the 'futimes' function. */ #undef HAVE_FUTIMES -/* Define to 1 if you have the `futimesat' function. */ +/* Define to 1 if you have the 'futimesat' function. */ #undef HAVE_FUTIMESAT +/* Define to 1 if you have the 'getauxval' function. */ +#undef HAVE_GETAUXVAL + /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H -/* Define to 1 if you have the `getopt_long' function. */ +/* Define to 1 if you have the 'getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define if the GNU gettext() function is already present or preinstalled. */ @@ -167,8 +180,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define to 1 if Linux Landlock is supported. See configure.ac for details. + */ +#undef HAVE_LINUX_LANDLOCK /* Define to 1 if .lz (lzip) decompression support is enabled. */ #undef HAVE_LZIP_DECODER @@ -197,34 +211,34 @@ /* Define to 1 if getopt.h declares extern int optreset. */ #undef HAVE_OPTRESET -/* Define to 1 if you have the `pledge' function. */ +/* Define to 1 if you have the 'pledge' function. */ #undef HAVE_PLEDGE -/* Define to 1 if you have the `posix_fadvise' function. */ +/* Define to 1 if you have the 'posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE -/* Define to 1 if `program_invocation_name' is declared in . */ +/* Define to 1 if 'program_invocation_name' is declared in . */ #undef HAVE_PROGRAM_INVOCATION_NAME -/* Define to 1 if you have the `pthread_condattr_setclock' function. */ +/* Define to 1 if you have the 'pthread_condattr_setclock' function. */ #undef HAVE_PTHREAD_CONDATTR_SETCLOCK /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT -/* Define to 1 if you have the `SHA256Init' function. */ +/* Define to 1 if you have the 'SHA256Init' function. */ #undef HAVE_SHA256INIT -/* Define to 1 if the system has the type `SHA256_CTX'. */ +/* Define to 1 if the system has the type 'SHA256_CTX'. */ #undef HAVE_SHA256_CTX /* Define to 1 if you have the header file. */ #undef HAVE_SHA256_H -/* Define to 1 if you have the `SHA256_Init' function. */ +/* Define to 1 if you have the 'SHA256_Init' function. */ #undef HAVE_SHA256_INIT -/* Define to 1 if the system has the type `SHA2_CTX'. */ +/* Define to 1 if the system has the type 'SHA2_CTX'. */ #undef HAVE_SHA2_CTX /* Define to 1 if you have the header file. */ @@ -251,19 +265,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +/* Define to 1 if 'st_atimensec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_ATIMENSEC -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ +/* 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 `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +/* 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 `st_atim.tv_nsec' is a member of `struct stat'. */ +/* 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 `st_uatime' is a member of `struct stat'. */ +/* Define to 1 if 'st_uatime' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_UATIME /* Define to 1 to if GNU/Linux-specific details are unconditionally wanted for @@ -273,11 +287,14 @@ must be used together with liblzma_linux.map. */ #undef HAVE_SYMBOL_VERSIONS_LINUX +/* Define to 1 if you have the 'sysctlbyname' function. */ +#undef HAVE_SYSCTLBYNAME + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CAPSICUM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H @@ -288,13 +305,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if the system has the type `uintptr_t'. */ +/* Define to 1 if the system has the type 'uintptr_t'. */ #undef HAVE_UINTPTR_T /* Define to 1 if you have the header file. */ @@ -304,10 +318,10 @@ configure.ac for details. */ #undef HAVE_USABLE_CLMUL -/* Define to 1 if you have the `utime' function. */ +/* Define to 1 if you have the 'utime' function. */ #undef HAVE_UTIME -/* Define to 1 if you have the `utimes' function. */ +/* Define to 1 if you have the 'utimes' function. */ #undef HAVE_UTIMES /* Define to 1 or 0, depending whether the compiler supports simple visibility @@ -317,13 +331,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H -/* Define to 1 if you have the `wcwidth' function. */ +/* Define to 1 if you have the 'wcwidth' function. */ #undef HAVE_WCWIDTH -/* Define to 1 if the system has the type `_Bool'. */ +/* Define to 1 if the system has the type '_Bool'. */ #undef HAVE__BOOL -/* Define to 1 if you have the `_futime' function. */ +/* Define to 1 if you have the '_futime' function. */ #undef HAVE__FUTIME /* Define to 1 if _mm_movemask_epi8 is available. */ @@ -379,10 +393,10 @@ your system. */ #undef PTHREAD_CREATE_JOINABLE -/* The size of `size_t', as computed by sizeof. */ +/* The size of 'size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS @@ -444,7 +458,7 @@ and might result in broken code. */ #undef TUKLIB_USE_UNSAFE_TYPE_PUNNING -/* Enable extensions on AIX 3, Interix. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif @@ -505,11 +519,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# undef __STDC_WANT_IEC_60559_EXT__ +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif @@ -550,9 +568,12 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES +/* Number of bits in time_t, on hosts where this is settable. */ +#undef _TIME_BITS + /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ @@ -572,6 +593,9 @@ used. */ #undef __GETOPT_PREFIX +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +#undef __MINGW_USE_VC2005_COMPAT + /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef int32_t diff --git a/configure b/configure index 5f8aa8c..897a25f 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for XZ Utils 5.4.5. +# Generated by GNU Autoconf 2.72 for XZ Utils 5.6.2. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -195,14 +196,15 @@ test \$(( 1 + 1 )) = 2 || exit 1 if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -235,12 +237,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -262,7 +265,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -282,7 +285,8 @@ $0: manually run the script under such a shell if you do $0: have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -321,14 +325,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -397,11 +393,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -415,21 +412,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -503,6 +493,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -551,7 +543,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -563,9 +554,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -590,10 +581,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} @@ -621,8 +614,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='XZ Utils' PACKAGE_TARNAME='xz' -PACKAGE_VERSION='5.4.5' -PACKAGE_STRING='XZ Utils 5.4.5' +PACKAGE_VERSION='5.6.2' +PACKAGE_STRING='XZ Utils 5.6.2' PACKAGE_BUGREPORT='xz@tukaani.org' PACKAGE_URL='https://tukaani.org/xz/' @@ -660,6 +653,7 @@ ac_includes_default="\ ac_header_c_list= gt_needs= +enable_year2038=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -669,11 +663,12 @@ COND_GNULIB_FALSE COND_GNULIB_TRUE HAVE_VISIBILITY CFLAG_VISIBILITY -CAPSICUM_LIB COND_INTERNAL_SHA256_FALSE COND_INTERNAL_SHA256_TRUE GETOPT_H LIBOBJS +localedir_c_make +localedir_c POSUB LTLIBINTL LIBINTL @@ -714,6 +709,8 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP LIBTOOL OBJDUMP DLLTOOL @@ -725,8 +722,6 @@ PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC ax_pthread_config -EGREP -GREP CPP SED am__fastdepCCAS_FALSE @@ -784,6 +779,8 @@ INSTALL_PROGRAM PREFERABLY_POSIX_SHELL POSIX_SHELL enable_path_for_scripts +COND_DOXYGEN_FALSE +COND_DOXYGEN_TRUE COND_DOC_FALSE COND_DOC_TRUE COND_SCRIPTS_FALSE @@ -824,6 +821,12 @@ COND_ENCODER_SIMPLE_FALSE COND_ENCODER_SIMPLE_TRUE COND_FILTER_SIMPLE_FALSE COND_FILTER_SIMPLE_TRUE +COND_DECODER_RISCV_FALSE +COND_DECODER_RISCV_TRUE +COND_ENCODER_RISCV_FALSE +COND_ENCODER_RISCV_TRUE +COND_FILTER_RISCV_FALSE +COND_FILTER_RISCV_TRUE COND_DECODER_SPARC_FALSE COND_DECODER_SPARC_TRUE COND_ENCODER_SPARC_FALSE @@ -952,6 +955,7 @@ enable_microlzma enable_lzip_decoder enable_assembler enable_clmul_crc +enable_arm64_crc32 enable_small enable_threads enable_assume_ram @@ -962,6 +966,7 @@ enable_lzmainfo enable_lzma_links enable_scripts enable_doc +enable_doxygen enable_sandbox enable_path_for_scripts enable_silent_rules @@ -983,6 +988,7 @@ enable_largefile enable_unaligned_access enable_unsafe_type_punning enable_werror +enable_year2038 ' ac_precious_vars='build_alias host_alias @@ -1104,7 +1110,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=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1130,7 +1136,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=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1343,7 +1349,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=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1359,7 +1365,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=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1389,8 +1395,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" ;; *=*) @@ -1398,7 +1404,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 ;; @@ -1448,7 +1454,7 @@ do 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' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1516,7 +1522,7 @@ 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" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +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" pwd)` @@ -1544,7 +1550,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures XZ Utils 5.4.5 to adapt to many kinds of systems. +'configure' configures XZ Utils 5.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1558,11 +1564,11 @@ 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' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1570,10 +1576,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1615,7 +1621,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of XZ Utils 5.4.5:";; + short | recursive ) echo "Configuration of XZ Utils 5.6.2:";; esac cat <<\_ACEOF @@ -1626,7 +1632,7 @@ Optional Features: --enable-debug Enable debugging code. --enable-encoders=LIST Comma-separated list of encoders to build. Default=all. Available encoders: lzma1 lzma2 delta - x86 powerpc ia64 arm armthumb arm64 sparc + x86 powerpc ia64 arm armthumb arm64 sparc riscv --enable-decoders=LIST Comma-separated list of decoders to build. Default=all. Available decoders are the same as available encoders. @@ -1649,10 +1655,12 @@ Optional Features: exist for the architecture. --disable-clmul-crc Do not use carryless multiplication for CRC calculation even if support for it is detected. + --disable-arm64-crc32 Do not use ARM64 CRC32 instructions even if support + for it is detected. --enable-small Make liblzma smaller and a little slower. This is disabled by default to optimize for speed. - --enable-threads=METHOD Supported METHODS are `yes', `no', `posix', `win95', - and `vista'. The default is `yes'. Using `no' + --enable-threads=METHOD Supported METHODS are 'yes', 'no', 'posix', 'win95', + and 'vista'. The default is 'yes'. Using 'no' together with --enable-small makes liblzma thread unsafe. --enable-assume-ram=SIZE @@ -1669,11 +1677,15 @@ Optional Features: --disable-scripts do not install the scripts xzdiff, xzgrep, xzless, xzmore, and their symlinks --disable-doc do not install documentation files to docdir (man - pages will still be installed) - --enable-sandbox=METHOD Sandboxing METHOD can be `auto', `no', `capsicum', - or `pledge'. The default is `auto' which enables - sandboxing if a supported sandboxing method is - found. + pages are still installed and, if --enable-doxygen + is used, liblzma API documentation is installed too) + --enable-doxygen generate HTML version of the liblzma API + documentation using Doxygen and install the result + to docdir + --enable-sandbox=METHOD Sandboxing METHOD can be 'auto', 'no', 'capsicum', + 'pledge', or 'landlock'. The default is 'auto' which + enables sandboxing if a supported sandboxing method + is found. --enable-path-for-scripts=PREFIX If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in the beginning of the scripts (xzgrep and others). @@ -1700,8 +1712,10 @@ Optional Features: --enable-unaligned-access Enable if the system supports *fast* unaligned memory access with 16-bit, 32-bit, and 64-bit - integers. By default, this is enabled only on x86, - x86_64, big endian PowerPC, and some ARM systems. + integers. By default, this is enabled on x86, + x86-64, 32/64-bit big endian PowerPC, 64-bit little + endian PowerPC, and some ARM, ARM64, and RISC-V + systems. --enable-unsafe-type-punning This introduces strict aliasing violations and may result in broken code. However, this might improve @@ -1710,6 +1724,7 @@ Optional Features: on ARMv6 and ARMv7). --enable-werror Enable -Werror to abort compilation on all compiler warnings. + --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1742,7 +1757,7 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. -Use these variables to override the choices made by `configure' or to help +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 . @@ -1810,10 +1825,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -XZ Utils configure 5.4.5 -generated by GNU Autoconf 2.71 +XZ Utils configure 5.6.2 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1852,11 +1867,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1875,8 +1891,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1884,10 +1900,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1927,11 +1945,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1970,11 +1989,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1992,15 +2012,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -2011,7 +2031,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2030,11 +2050,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2043,58 +2065,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR -# ------------------------------------------------------------------ -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. -ac_fn_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_check_decl - # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -2125,12 +2095,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2150,8 +2121,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2181,12 +2152,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2207,8 +2180,8 @@ printf %s "checking for uint$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) 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' \ @@ -2240,10 +2213,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2264,8 +2239,8 @@ printf %s "checking for int$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) 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' \ @@ -2306,12 +2281,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - case $ac_type in #( +else case e in #( + e) case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; +esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -2320,10 +2296,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2377,18 +2355,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2423,20 +2402,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2459,8 +2441,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2508,8 +2491,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2550,8 +2534,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2567,12 +2551,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2580,6 +2567,60 @@ printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else case e in #( + e) eval "$3=no" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + ;; +esac +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl ac_configure_args_raw= for ac_arg do @@ -2604,8 +2645,8 @@ cat >config.log <<_ACEOF 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 5.4.5, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by XZ Utils $as_me 5.6.2, which was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2851,10 +2892,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2890,9 +2931,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2906,6 +2945,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2933,16 +2987,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2992,7 +3049,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -3058,6 +3114,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -3079,7 +3137,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3195,6 +3253,7 @@ as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" gt_needs="$gt_needs " +as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H" # Auxiliary files required by this configure script. ac_aux_files="config.rpath ltmain.sh compile missing install-sh config.guess config.sub" @@ -3274,8 +3333,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3303,12 +3363,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3317,18 +3377,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3344,11 +3404,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3386,15 +3446,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias 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 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 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -3421,14 +3482,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then 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 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -3496,8 +3558,9 @@ printf %s "checking if debugging code should be compiled... " >&6; } if test ${enable_debug+y} then : enableval=$enable_debug; -else $as_nop - enable_debug=no +else case e in #( + e) enable_debug=no ;; +esac fi if test "x$enable_debug" = xyes; then @@ -3549,6 +3612,9 @@ enable_decoder_arm64=no enable_filter_sparc=no enable_encoder_sparc=no enable_decoder_sparc=no +enable_filter_riscv=no +enable_encoder_riscv=no +enable_decoder_riscv=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which encoders to build" >&5 printf %s "checking which encoders to build... " >&6; } @@ -3556,8 +3622,9 @@ printf %s "checking which encoders to build... " >&6; } if test ${enable_encoders+y} then : enableval=$enable_encoders; -else $as_nop - enable_encoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc +else case e in #( + e) enable_encoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv ;; +esac fi enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'` @@ -3638,6 +3705,13 @@ printf "%s\n" "#define HAVE_ENCODER_ARM64 1" >>confdefs.h printf "%s\n" "#define HAVE_ENCODER_SPARC 1" >>confdefs.h + ;; + riscv) + enable_filter_riscv=yes + enable_encoder_riscv=yes + +printf "%s\n" "#define HAVE_ENCODER_RISCV 1" >>confdefs.h + ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 @@ -3659,8 +3733,9 @@ printf %s "checking which decoders to build... " >&6; } if test ${enable_decoders+y} then : enableval=$enable_decoders; -else $as_nop - enable_decoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc +else case e in #( + e) enable_decoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv ;; +esac fi enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'` @@ -3741,6 +3816,13 @@ printf "%s\n" "#define HAVE_DECODER_ARM64 1" >>confdefs.h printf "%s\n" "#define HAVE_DECODER_SPARC 1" >>confdefs.h + ;; + riscv) + enable_filter_riscv=yes + enable_decoder_riscv=yes + +printf "%s\n" "#define HAVE_DECODER_RISCV 1" >>confdefs.h + ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 @@ -4018,6 +4100,30 @@ else COND_DECODER_SPARC_FALSE= fi + if test "x$enable_filter_riscv" = xyes; then + COND_FILTER_RISCV_TRUE= + COND_FILTER_RISCV_FALSE='#' +else + COND_FILTER_RISCV_TRUE='#' + COND_FILTER_RISCV_FALSE= +fi + + if test "x$enable_encoder_riscv" = xyes; then + COND_ENCODER_RISCV_TRUE= + COND_ENCODER_RISCV_FALSE='#' +else + COND_ENCODER_RISCV_TRUE='#' + COND_ENCODER_RISCV_FALSE= +fi + + if test "x$enable_decoder_riscv" = xyes; then + COND_DECODER_RISCV_TRUE= + COND_DECODER_RISCV_FALSE='#' +else + COND_DECODER_RISCV_TRUE='#' + COND_DECODER_RISCV_FALSE= +fi + # The so called "simple filters" share common code. enable_filter_simple=no @@ -4044,6 +4150,9 @@ test "x$enable_decoder_arm64" = xyes && enable_decoder_simple=yes test "x$enable_filter_sparc" = xyes && enable_filter_simple=yes test "x$enable_encoder_sparc" = xyes && enable_encoder_simple=yes test "x$enable_decoder_sparc" = xyes && enable_decoder_simple=yes +test "x$enable_filter_riscv" = xyes && enable_filter_simple=yes +test "x$enable_encoder_riscv" = xyes && enable_encoder_simple=yes +test "x$enable_decoder_riscv" = xyes && enable_decoder_simple=yes if test "x$enable_filter_simple" = xyes; then COND_FILTER_SIMPLE_TRUE= COND_FILTER_SIMPLE_FALSE='#' @@ -4124,8 +4233,9 @@ printf %s "checking which match finders to build... " >&6; } if test ${enable_match_finders+y} then : enableval=$enable_match_finders; -else $as_nop - enable_match_finders=hc3,hc4,bt2,bt3,bt4 +else case e in #( + e) enable_match_finders=hc3,hc4,bt2,bt3,bt4 ;; +esac fi enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'` @@ -4198,8 +4308,9 @@ printf %s "checking which integrity checks to build... " >&6; } if test ${enable_checks+y} then : enableval=$enable_checks; -else $as_nop - enable_checks=crc32,crc64,sha256 +else case e in #( + e) enable_checks=crc32,crc64,sha256 ;; +esac fi enable_checks=`echo "$enable_checks" | sed 's/,/ /g'` @@ -4273,8 +4384,9 @@ printf %s "checking if external SHA-256 should be used... " >&6; } if test ${enable_external_sha256+y} then : enableval=$enable_external_sha256; -else $as_nop - enable_external_sha256=no +else case e in #( + e) enable_external_sha256=no ;; +esac fi if test "x$enable_check_sha256" != "xyes"; then @@ -4299,8 +4411,9 @@ printf %s "checking if MicroLZMA support should be built... " >&6; } if test ${enable_microlzma+y} then : enableval=$enable_microlzma; -else $as_nop - enable_microlzma=yes +else case e in #( + e) enable_microlzma=yes ;; +esac fi case $enable_microlzma in @@ -4311,7 +4424,7 @@ printf "%s\n" "$enable_microlzma" >&6; } *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; } - as_fn_error $? "--enable-microlzma accepts only \`yes' or \`no'." "$LINENO" 5 + as_fn_error $? "--enable-microlzma accepts only 'yes' or 'no'." "$LINENO" 5 ;; esac if test "x$enable_microlzma" = xyes; then @@ -4334,8 +4447,9 @@ printf %s "checking if .lz (lzip) decompression support should be built... " >&6 if test ${enable_lzip_decoder+y} then : enableval=$enable_lzip_decoder; -else $as_nop - enable_lzip_decoder=yes +else case e in #( + e) enable_lzip_decoder=yes ;; +esac fi if test "x$enable_decoder_lzma1" != xyes; then @@ -4372,8 +4486,9 @@ printf %s "checking if assembler optimizations should be used... " >&6; } if test ${enable_assembler+y} then : enableval=$enable_assembler; -else $as_nop - enable_assembler=yes +else case e in #( + e) enable_assembler=yes ;; +esac fi if test "x$enable_assembler" = xyes; then @@ -4396,7 +4511,7 @@ printf "%s\n" "$enable_assembler" >&6; } *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; } - as_fn_error $? "--enable-assembler accepts only \`yes', \`no', or \`x86' (32-bit)." "$LINENO" 5 + as_fn_error $? "--enable-assembler accepts only 'yes', 'no', or 'x86' (32-bit)." "$LINENO" 5 ;; esac if test "x$enable_assembler" = xx86; then @@ -4417,8 +4532,24 @@ fi if test ${enable_clmul_crc+y} then : enableval=$enable_clmul_crc; -else $as_nop - enable_clmul_crc=yes +else case e in #( + e) enable_clmul_crc=yes ;; +esac +fi + + + +############################ +# ARM64 CRC32 Instructions # +############################ + +# Check whether --enable-arm64-crc32 was given. +if test ${enable_arm64_crc32+y} +then : + enableval=$enable_arm64_crc32; +else case e in #( + e) enable_arm64_crc32=yes ;; +esac fi @@ -4433,8 +4564,9 @@ printf %s "checking if small size is preferred over speed... " >&6; } if test ${enable_small+y} then : enableval=$enable_small; -else $as_nop - enable_small=no +else case e in #( + e) enable_small=no ;; +esac fi if test "x$enable_small" = xyes; then @@ -4444,7 +4576,7 @@ printf "%s\n" "#define HAVE_SMALL 1" >>confdefs.h elif test "x$enable_small" != xno; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_small" >&5 printf "%s\n" "$enable_small" >&6; } @@ -4468,8 +4600,9 @@ printf %s "checking if threading support is wanted... " >&6; } if test ${enable_threads+y} then : enableval=$enable_threads; -else $as_nop - enable_threads=yes +else case e in #( + e) enable_threads=yes ;; +esac fi @@ -4499,7 +4632,7 @@ printf "%s\n" "no" >&6; } *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; } - as_fn_error $? "--enable-threads only accepts \`yes', \`no', \`posix', \`win95', or \`vista'" "$LINENO" 5 + as_fn_error $? "--enable-threads only accepts 'yes', 'no', 'posix', 'win95', or 'vista'" "$LINENO" 5 ;; esac @@ -4520,8 +4653,9 @@ printf %s "checking how much RAM to assume if the real amount is unknown... " >& if test ${enable_assume_ram+y} then : enableval=$enable_assume_ram; -else $as_nop - enable_assume_ram=128 +else case e in #( + e) enable_assume_ram=128 ;; +esac fi assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789` @@ -4545,8 +4679,9 @@ printf "%s\n" "#define ASSUME_RAM $enable_assume_ram" >>confdefs.h if test ${enable_xz+y} then : enableval=$enable_xz; -else $as_nop - enable_xz=yes +else case e in #( + e) enable_xz=yes ;; +esac fi if test x$enable_xz != xno; then @@ -4562,8 +4697,9 @@ fi if test ${enable_xzdec+y} then : enableval=$enable_xzdec; -else $as_nop - enable_xzdec=yes +else case e in #( + e) enable_xzdec=yes ;; +esac fi test "x$enable_decoders" = xno && enable_xzdec=no @@ -4580,8 +4716,9 @@ fi if test ${enable_lzmadec+y} then : enableval=$enable_lzmadec; -else $as_nop - enable_lzmadec=yes +else case e in #( + e) enable_lzmadec=yes ;; +esac fi test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no @@ -4598,8 +4735,9 @@ fi if test ${enable_lzmainfo+y} then : enableval=$enable_lzmainfo; -else $as_nop - enable_lzmainfo=yes +else case e in #( + e) enable_lzmainfo=yes ;; +esac fi test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no @@ -4616,8 +4754,9 @@ fi if test ${enable_lzma_links+y} then : enableval=$enable_lzma_links; -else $as_nop - enable_lzma_links=yes +else case e in #( + e) enable_lzma_links=yes ;; +esac fi if test x$enable_lzma_links != xno; then @@ -4633,8 +4772,9 @@ fi if test ${enable_scripts+y} then : enableval=$enable_scripts; -else $as_nop - enable_scripts=yes +else case e in #( + e) enable_scripts=yes ;; +esac fi if test x$enable_scripts != xno; then @@ -4650,8 +4790,9 @@ fi if test ${enable_doc+y} then : enableval=$enable_doc; -else $as_nop - enable_doc=yes +else case e in #( + e) enable_doc=yes ;; +esac fi if test x$enable_doc != xno; then @@ -4663,6 +4804,24 @@ else fi +# Check whether --enable-doxygen was given. +if test ${enable_doxygen+y} +then : + enableval=$enable_doxygen; +else case e in #( + e) enable_doxygen=no ;; +esac +fi + + if test x$enable_doxygen != xno; then + COND_DOXYGEN_TRUE= + COND_DOXYGEN_FALSE='#' +else + COND_DOXYGEN_TRUE='#' + COND_DOXYGEN_FALSE= +fi + + ############## # Sandboxing # @@ -4674,23 +4833,29 @@ printf %s "checking if sandboxing should be used... " >&6; } if test ${enable_sandbox+y} then : enableval=$enable_sandbox; -else $as_nop - enable_sandbox=auto +else case e in #( + e) enable_sandbox=auto ;; +esac fi -case $enable_sandbox in - auto) +case $enable_xzdec-$enable_xz-$enable_sandbox in + no-no-*) + enable_sandbox=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, --disable-xz and --disable-xzdec was used" >&5 +printf "%s\n" "no, --disable-xz and --disable-xzdec was used" >&6; } + ;; + *-*-auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe (autodetect)" >&5 printf "%s\n" "maybe (autodetect)" >&6; } ;; - no | capsicum | pledge) + *-*-no | *-*-capsicum | *-*-pledge | *-*-landlock) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_sandbox" >&5 printf "%s\n" "$enable_sandbox" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; } - as_fn_error $? "--enable-sandbox only accepts \`auto', \`no', \`capsicum', or \`pledge'." "$LINENO" 5 + as_fn_error $? "--enable-sandbox only accepts 'auto', 'no', 'capsicum', 'pledge', or 'landlock'." "$LINENO" 5 ;; esac @@ -4705,13 +4870,14 @@ esac if test ${enable_path_for_scripts+y} then : enableval=$enable_path_for_scripts; -else $as_nop - +else case e in #( + e) case $host_os in solaris*) enable_path_for_scripts=/usr/xpg4/bin ;; *) enable_path_for_scripts= ;; esac - + ;; +esac fi if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then @@ -4743,8 +4909,8 @@ printf %s "checking for a shell that conforms to POSIX... " >&6; } if test ${gl_cv_posix_shell+y} then : printf %s "(cached) " >&6 -else $as_nop - gl_test_posix_shell_script=' +else case e in #( + e) gl_test_posix_shell_script=' func_return () { (exit $1) } @@ -4778,7 +4944,8 @@ else $as_nop "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \ && break;; esac - done + done ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_posix_shell" >&5 printf "%s\n" "$gl_cv_posix_shell" >&6; } @@ -4828,8 +4995,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -4883,7 +5050,8 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -4979,7 +5147,7 @@ test "$program_prefix" != NONE && test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. -# By default was `s,x,x', remove it if useless. +# By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` @@ -5022,8 +5190,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then +else case e in #( + e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5045,7 +5213,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then @@ -5067,8 +5236,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then +else case e in #( + e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5090,7 +5259,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then @@ -5126,8 +5296,8 @@ if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS @@ -5141,7 +5311,7 @@ do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; @@ -5150,18 +5320,17 @@ do done done IFS=$as_save_IFS - + ;; +esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else - # As a last resort, use the slow shell script. Don't cache a - # 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. - MKDIR_P="$ac_install_sh -d" + # As a last resort, use plain mkdir -p, + # in the hope it doesn't have the bugs of ancient mkdir. + MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 @@ -5176,8 +5345,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AWK"; then +else case e in #( + e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5199,7 +5368,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then @@ -5221,8 +5391,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF +else case e in #( + e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -5234,7 +5404,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make +rm -f conftest.make ;; +esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -5272,8 +5443,8 @@ printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) +else case e in #( + e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -5283,7 +5454,8 @@ am__doit: am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } @@ -5318,7 +5490,7 @@ fi # Define the identity of the package. PACKAGE='xz' - VERSION='5.4.5' + VERSION='5.6.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5519,8 +5691,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5542,7 +5714,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5564,8 +5737,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5587,7 +5760,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5622,8 +5796,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5645,7 +5819,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5667,8 +5842,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -5707,7 +5882,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5731,8 +5907,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5754,7 +5930,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5780,8 +5957,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5803,7 +5980,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5841,8 +6019,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5864,7 +6042,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5886,8 +6065,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5909,7 +6088,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5938,10 +6118,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$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; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -6013,8 +6193,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -6034,7 +6214,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -6045,8 +6225,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -6055,13 +6236,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -6085,10 +6267,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -6098,11 +6280,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$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; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -6118,6 +6301,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -6157,26 +6342,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6208,16 +6394,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$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; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -6228,8 +6416,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6246,12 +6434,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -6269,8 +6459,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -6288,8 +6478,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6304,8 +6494,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6322,12 +6512,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -6354,8 +6547,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6372,25 +6565,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -6400,8 +6596,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6418,25 +6614,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -6446,8 +6645,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6464,25 +6663,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -6503,8 +6705,8 @@ printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6534,7 +6736,8 @@ _ACEOF fi done rm -f core conftest* - unset am_i + unset am_i ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } @@ -6560,8 +6763,8 @@ printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +else case e in #( + e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up @@ -6665,7 +6868,8 @@ else $as_nop else am_cv_CC_dependencies_compiler_type=none fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } @@ -6702,8 +6906,8 @@ printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CCAS_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +else case e in #( + e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up @@ -6805,7 +7009,8 @@ else $as_nop else am_cv_CCAS_dependencies_compiler_type=none fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } @@ -6863,8 +7068,8 @@ printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 @@ -6880,10 +7085,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes -else $as_nop - ac_cv_safe_to_define___extensions__=no +else case e in #( + e) ac_cv_safe_to_define___extensions__=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } @@ -6893,8 +7100,8 @@ printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_should_define__xopen_source=no +else case e in #( + e) ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6913,8 +7120,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 @@ -6932,10 +7139,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } @@ -6960,6 +7169,8 @@ printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h @@ -6979,8 +7190,9 @@ then : printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h -else $as_nop - MINIX= +else case e in #( + e) MINIX= ;; +esac fi if test $ac_cv_safe_to_define___extensions__ = yes then : @@ -6999,8 +7211,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ +else case e in #( + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done @@ -7025,9 +7237,10 @@ do as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in +case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -7062,7 +7275,8 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } @@ -7084,8 +7298,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -7103,9 +7317,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -7119,15 +7334,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -7136,7 +7352,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -7159,9 +7376,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -7175,24 +7393,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -7202,14 +7422,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 +printf %s "checking for egrep -e... " >&6; } +if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then - ac_path_GREP_found=false +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin @@ -7223,13 +7443,14 @@ do for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -7238,14 +7459,14 @@ case `"$ac_path_GREP" --version 2>&1` in cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break @@ -7253,35 +7474,24 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 + $ac_path_EGREP_TRADITIONAL_found && break 3 done done 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 + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + : fi else - ac_cv_path_GREP=$GREP -fi - + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} + if test "$ac_cv_path_EGREP_TRADITIONAL" then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false + ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin @@ -7295,13 +7505,14 @@ do for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -7310,14 +7521,14 @@ case `"$ac_path_EGREP" --version 2>&1` in cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break @@ -7325,104 +7536,25 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then 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 -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 -printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } -if test ${ac_cv_c_undeclared_builtin_options+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS - ac_cv_c_undeclared_builtin_options='cannot detect' - for ac_arg in '' -fno-builtin; do - CFLAGS="$ac_save_CFLAGS $ac_arg" - # This test program should *not* compile successfully. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -(void) strchr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - # This test program should compile successfully. - # No library function is consistently available on - # freestanding implementations, so test against a dummy - # declaration. Include always-available headers on the - # off chance that they somehow elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); - -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if test x"$ac_arg" = x -then : - ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg -fi - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done - CFLAGS=$ac_save_CFLAGS - + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 -printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } - case $ac_cv_c_undeclared_builtin_options in #( - 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( - 'none needed') : - ac_c_undeclared_builtin_options='' ;; #( - *) : - ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; + ;; esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 +printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } + EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL case $enable_threads in #( posix) : @@ -7469,8 +7601,14 @@ printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pthread_join (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (void); int main (void) { @@ -7564,7 +7702,7 @@ case $host_os in _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 + $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} @@ -7594,8 +7732,8 @@ printf %s "checking whether $CC is Clang... " >&6; } if test ${ax_cv_PTHREAD_CLANG+y} then : printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_CLANG=no +else case e in #( + e) ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7607,14 +7745,15 @@ else $as_nop _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 + $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 then : ax_cv_PTHREAD_CLANG=yes fi rm -rf conftest* fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } @@ -7664,8 +7803,9 @@ esac if test "x$ax_pthread_check_macro" = "x--" then : ax_pthread_check_cond=0 -else $as_nop - ax_pthread_check_cond="!defined($ax_pthread_check_macro)" +else case e in #( + e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;; +esac fi @@ -7699,8 +7839,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ax_pthread_config+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ax_pthread_config"; then +else case e in #( + e) if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7723,7 +7863,8 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi +fi ;; +esac fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then @@ -7856,8 +7997,8 @@ printf %s "checking whether Clang needs flag to prevent \"argument unused\" warn if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} then : printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown +else case e in #( + e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one # (.c -> exe), because the warning occurs only in the second @@ -7903,7 +8044,8 @@ then : ax_pthread_try=no fi ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } @@ -7930,8 +8072,8 @@ printf %s "checking for joinable pthread attribute... " >&6; } if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} then : printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_JOINABLE_ATTR=unknown +else case e in #( + e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7951,7 +8093,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } @@ -7971,14 +8114,15 @@ printf %s "checking whether more special flags are required for pthreads... " >& if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} then : printf %s "(cached) " >&6 -else $as_nop - ax_cv_PTHREAD_SPECIAL_FLAGS=no +else case e in #( + e) ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; esac - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } @@ -7994,8 +8138,8 @@ printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8010,12 +8154,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_PRIO_INHERIT=yes -else $as_nop - ax_cv_PTHREAD_PRIO_INHERIT=no +else case e in #( + e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } @@ -8065,8 +8211,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$PTHREAD_CC"; then +else case e in #( + e) if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8088,7 +8234,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then @@ -8115,8 +8262,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$PTHREAD_CXX"; then +else case e in #( + e) if test -n "$PTHREAD_CXX"; then ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8138,7 +8285,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX if test -n "$PTHREAD_CXX"; then @@ -8197,95 +8345,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu printf "%s\n" "#define MYTHREAD_POSIX 1" >>confdefs.h - # These are nice to have but not mandatory. - # - # FIXME: xz uses clock_gettime if it is available and can do - # it even when threading is disabled. Moving this outside - # of pthread detection may be undesirable because then - # liblzma may get linked against librt even when librt isn't - # needed by liblzma. + # This is nice to have but not mandatory. OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} + ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" +if test "x$ac_cv_func_pthread_condattr_setclock" = xyes then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_gettime (); -int -main (void) -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : - break fi -done -if test ${ac_cv_search_clock_gettime+y} -then : -else $as_nop - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" -if test "x$ac_cv_func_pthread_condattr_setclock" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h - -fi - - ac_fn_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes -then : - -printf "%s\n" "#define HAVE_CLOCK_MONOTONIC 1" >>confdefs.h - -fi CFLAGS=$OLD_CFLAGS ;; #( win95) : @@ -8324,8 +8393,8 @@ esac -macro_version='2.4.7.4-1ec8f-dirty' -macro_revision='2.4.7.4' +macro_version='2.5.0.1-38c1-dirty' +macro_revision='2.5.0.1' @@ -8416,8 +8485,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ +else case e in #( + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done @@ -8442,9 +8511,10 @@ do as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in +case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -8479,7 +8549,8 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } @@ -8499,13 +8570,161 @@ Xsed="$SED -e 1s/^X//" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + 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 + fi +else + ac_cv_path_GREP=$GREP +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + 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 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 +else case e in #( + e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then @@ -8527,9 +8746,10 @@ do as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in +case `"$ac_path_FGREP" --version 2>&1` in #( *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -8565,7 +8785,8 @@ else ac_cv_path_FGREP=$FGREP fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } @@ -8596,8 +8817,9 @@ test -z "$GREP" && GREP=grep if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop - with_gnu_ld=no +else case e in #( + e) with_gnu_ld=no ;; +esac fi ac_prog=ld @@ -8606,7 +8828,7 @@ if test yes = "$GCC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in - *-*-mingw*) + *-*-mingw* | *-*-windows*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -8642,8 +8864,8 @@ fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$LD"; then +else case e in #( + e) if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs @@ -8666,7 +8888,8 @@ else $as_nop IFS=$lt_save_ifs else lt_cv_path_LD=$LD # Let the user override the test with a path. -fi +fi ;; +esac fi LD=$lt_cv_path_LD @@ -8683,8 +8906,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 -else $as_nop - # I'd rather use --version here, but apparently some GNU lds only accept -v. +else case e in #( + e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 @@ -8711,8 +8935,8 @@ printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$NM"; then +else case e in #( + e) if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else @@ -8733,7 +8957,7 @@ else # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; + mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in @@ -8759,7 +8983,8 @@ else IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } @@ -8780,8 +9005,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$DUMPBIN"; then +else case e in #( + e) if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8803,7 +9028,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then @@ -8829,8 +9055,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DUMPBIN"; then +else case e in #( + e) if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8852,7 +9078,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then @@ -8906,8 +9133,8 @@ printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_nm_interface="BSD nm" +else case e in #( + e) lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) @@ -8920,7 +9147,8 @@ else $as_nop if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi - rm -f conftest* + rm -f conftest* ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } @@ -8931,8 +9159,8 @@ printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 -else $as_nop - i=0 +else case e in #( + e) i=0 teststring=ABCD case $build_os in @@ -8951,7 +9179,7 @@ else $as_nop lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | cegcc*) + cygwin* | mingw* | windows* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -8973,7 +9201,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -9054,7 +9282,8 @@ else $as_nop fi ;; esac - + ;; +esac fi if test -n "$lt_cv_sys_max_cmd_len"; then @@ -9111,11 +9340,11 @@ printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 -else $as_nop - case $host in +else case e in #( + e) case $host in *-*-mingw* ) case $build in - *-*-mingw* ) # actually msys + *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) @@ -9128,7 +9357,7 @@ else $as_nop ;; *-*-cygwin* ) case $build in - *-*-mingw* ) # actually msys + *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) @@ -9143,7 +9372,8 @@ else $as_nop lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac - + ;; +esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd @@ -9159,19 +9389,20 @@ printf %s "checking how to convert $build file names to toolchain format... " >& if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 -else $as_nop - #assume ordinary cross tools, or native build. +else case e in #( + e) #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in - *-*-mingw* ) + *-*-mingw* | *-*-windows* ) case $build in - *-*-mingw* ) # actually msys + *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac - + ;; +esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd @@ -9187,8 +9418,9 @@ printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_reload_flag='-r' +else case e in #( + e) lt_cv_ld_reload_flag='-r' ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } @@ -9199,7 +9431,7 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi @@ -9221,16 +9453,15 @@ esac -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. -set dummy ${ac_tool_prefix}file; ac_word=$2 +# Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$FILECMD"; then +else case e in #( + e) if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9244,7 +9475,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_FILECMD="${ac_tool_prefix}file" + ac_cv_prog_FILECMD=":" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9252,7 +9483,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then @@ -9264,65 +9496,6 @@ printf "%s\n" "no" >&6; } fi -fi -if test -z "$ac_cv_prog_FILECMD"; then - ac_ct_FILECMD=$FILECMD - # Extract the first word of "file", so it can be a program name with args. -set dummy file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FILECMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_FILECMD"; then - ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FILECMD="file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD -if test -n "$ac_ct_FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 -printf "%s\n" "$ac_ct_FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_FILECMD" = x; then - FILECMD=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FILECMD=$ac_ct_FILECMD - fi -else - FILECMD="$ac_cv_prog_FILECMD" -fi - @@ -9337,8 +9510,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$OBJDUMP"; then +else case e in #( + e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9360,7 +9533,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then @@ -9382,8 +9556,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OBJDUMP"; then +else case e in #( + e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9405,7 +9579,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then @@ -9443,8 +9618,8 @@ printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_file_magic_cmd='$MAGIC_CMD' +else case e in #( + e) lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support @@ -9452,7 +9627,6 @@ lt_cv_deplibs_check_method='unknown' # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure @@ -9479,7 +9653,7 @@ cygwin*) lt_cv_file_magic_cmd='func_win32_libid' ;; -mingw* | pw32*) +mingw* | windows* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -9579,7 +9753,7 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) +openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else @@ -9637,7 +9811,8 @@ os2*) lt_cv_deplibs_check_method=pass_all ;; esac - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } @@ -9646,7 +9821,7 @@ file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in - mingw* | pw32*) + mingw* | windows* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else @@ -9689,8 +9864,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$DLLTOOL"; then +else case e in #( + e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9712,7 +9887,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then @@ -9734,8 +9910,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DLLTOOL"; then +else case e in #( + e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9757,7 +9933,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then @@ -9796,11 +9973,11 @@ printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_sharedlib_from_linklib_cmd='unknown' +else case e in #( + e) lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in @@ -9817,7 +9994,8 @@ cygwin* | mingw* | pw32* | cegcc*) lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } @@ -9840,8 +10018,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then +else case e in #( + e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9863,7 +10041,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -9889,8 +10068,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then +else case e in #( + e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9912,7 +10091,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -9949,7 +10129,7 @@ fi # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because thats what people were doing historically (setting +# higher priority because that's what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. @@ -9974,8 +10154,8 @@ printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_ar_at_file=no +else case e in #( + e) lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10012,7 +10192,8 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } @@ -10037,8 +10218,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$STRIP"; then +else case e in #( + e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10060,7 +10241,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then @@ -10082,8 +10264,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_STRIP"; then +else case e in #( + e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10105,7 +10287,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then @@ -10146,8 +10329,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then +else case e in #( + e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10169,7 +10352,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -10191,8 +10375,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then +else case e in #( + e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10214,7 +10398,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -10253,15 +10438,8 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -10325,8 +10503,8 @@ printf %s "checking command to parse $NM output from $compiler object... " >&6; if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -10341,7 +10519,7 @@ case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -10356,7 +10534,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' @@ -10420,7 +10598,7 @@ $lt_c_name_lib_hook\ # Handle CRLF in mingw tool chain opt_cr= case $build_os in -mingw*) +mingw* | windows*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac @@ -10581,7 +10759,8 @@ _LT_EOF lt_cv_sys_global_symbol_pipe= fi done - + ;; +esac fi if test -z "$lt_cv_sys_global_symbol_pipe"; then @@ -10645,8 +10824,9 @@ printf %s "checking for sysroot... " >&6; } if test ${with_sysroot+y} then : withval=$with_sysroot; -else $as_nop - with_sysroot=no +else case e in #( + e) with_sysroot=no ;; +esac fi @@ -10654,7 +10834,9 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` fi ;; #( /*) @@ -10681,8 +10863,8 @@ printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i +else case e in #( + e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then @@ -10718,7 +10900,8 @@ else ac_cv_path_lt_DD=$lt_DD fi -rm -f conftest.i conftest2.i conftest.out +rm -f conftest.i conftest2.i conftest.out ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } @@ -10729,8 +10912,8 @@ printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 -else $as_nop - printf 0123456789abcdef0123456789abcdef >conftest.i +else case e in #( + e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then @@ -10738,7 +10921,8 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; the && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -10869,7 +11053,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -10888,7 +11072,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" @@ -10917,7 +11101,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -10948,8 +11132,8 @@ printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_ext=c +else case e in #( + e) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -10969,8 +11153,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes -else $as_nop - lt_cv_cc_needs_belf=no +else case e in #( + e) lt_cv_cc_needs_belf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -10979,7 +11164,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } @@ -11037,8 +11223,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MANIFEST_TOOL"; then +else case e in #( + e) if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11060,7 +11246,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then @@ -11082,8 +11269,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_MANIFEST_TOOL"; then +else case e in #( + e) if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11105,7 +11292,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then @@ -11134,22 +11322,23 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} +if test ${lt_cv_path_manifest_tool+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_path_mainfest_tool=no +else case e in #( + e) lt_cv_path_manifest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes + lt_cv_path_manifest_tool=yes fi - rm -f conftest* + rm -f conftest* ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 +printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } +if test yes != "$lt_cv_path_manifest_tool"; then MANIFEST_TOOL=: fi @@ -11168,8 +11357,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$DSYMUTIL"; then +else case e in #( + e) if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11191,7 +11380,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then @@ -11213,8 +11403,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DSYMUTIL"; then +else case e in #( + e) if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11236,7 +11426,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then @@ -11270,8 +11461,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$NMEDIT"; then +else case e in #( + e) if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11293,7 +11484,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then @@ -11315,8 +11507,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_NMEDIT"; then +else case e in #( + e) if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11338,7 +11530,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then @@ -11372,8 +11565,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$LIPO"; then +else case e in #( + e) if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11395,7 +11588,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then @@ -11417,8 +11611,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_LIPO"; then +else case e in #( + e) if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11440,7 +11634,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then @@ -11474,8 +11669,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL"; then +else case e in #( + e) if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11497,7 +11692,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then @@ -11519,8 +11715,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL"; then +else case e in #( + e) if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11542,7 +11738,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then @@ -11576,8 +11773,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$OTOOL64"; then +else case e in #( + e) if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11599,7 +11796,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then @@ -11621,8 +11819,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OTOOL64"; then +else case e in #( + e) if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11644,7 +11842,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then @@ -11701,8 +11900,8 @@ printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_apple_cc_single_mod=no +else case e in #( + e) lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE @@ -11728,7 +11927,8 @@ else $as_nop fi rm -rf libconftest.dylib* rm -f conftest.* - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } @@ -11738,8 +11938,8 @@ printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_exported_symbols_list=no +else case e in #( + e) lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" @@ -11757,13 +11957,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes -else $as_nop - lt_cv_ld_exported_symbols_list=no +else case e in #( + e) lt_cv_ld_exported_symbols_list=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } @@ -11773,8 +11975,8 @@ printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_ld_force_load=no +else case e in #( + e) lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF @@ -11799,7 +12001,8 @@ _LT_EOF fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } @@ -11884,7 +12087,7 @@ fi enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 @@ -11893,8 +12096,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AS"; then +else case e in #( + e) if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11916,7 +12119,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AS=$ac_cv_prog_AS if test -n "$AS"; then @@ -11938,8 +12142,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AS"; then +else case e in #( + e) if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11961,7 +12165,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then @@ -11995,8 +12200,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$DLLTOOL"; then +else case e in #( + e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12018,7 +12223,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then @@ -12040,8 +12246,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_DLLTOOL"; then +else case e in #( + e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12063,7 +12269,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then @@ -12097,8 +12304,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$OBJDUMP"; then +else case e in #( + e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12120,7 +12327,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then @@ -12142,8 +12350,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_OBJDUMP"; then +else case e in #( + e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12165,7 +12373,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then @@ -12238,8 +12447,9 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop - enable_shared=yes +else case e in #( + e) enable_shared=yes ;; +esac fi @@ -12270,8 +12480,9 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop - enable_static=yes +else case e in #( + e) enable_static=yes ;; +esac fi @@ -12302,8 +12513,9 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop - pic_mode=default +else case e in #( + e) pic_mode=default ;; +esac fi @@ -12333,8 +12545,9 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop - enable_fast_install=yes +else case e in #( + e) enable_fast_install=yes ;; +esac fi @@ -12361,15 +12574,17 @@ then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} +else case e in #( + e) if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_with_aix_soname=aix +else case e in #( + e) lt_cv_with_aix_soname=aix ;; +esac fi - with_aix_soname=$lt_cv_with_aix_soname + with_aix_soname=$lt_cv_with_aix_soname ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 @@ -12460,8 +12675,8 @@ printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 -else $as_nop - rm -f .libs 2>/dev/null +else case e in #( + e) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs @@ -12469,7 +12684,8 @@ else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi -rmdir .libs 2>/dev/null +rmdir .libs 2>/dev/null ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } @@ -12530,8 +12746,8 @@ printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in +else case e in #( + e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -12574,6 +12790,7 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; +esac ;; esac fi @@ -12597,8 +12814,8 @@ printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 -else $as_nop - case $MAGIC_CMD in +else case e in #( + e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -12641,6 +12858,7 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; +esac ;; esac fi @@ -12740,8 +12958,8 @@ printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_rtti_exceptions=no +else case e in #( + e) lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment @@ -12769,7 +12987,8 @@ else $as_nop fi fi $RM conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } @@ -12825,7 +13044,7 @@ lt_prog_compiler_static= # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -12928,7 +13147,7 @@ lt_prog_compiler_static= esac ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) + mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -12969,6 +13188,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + *flang) + # Flang compiler. + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -13134,8 +13359,9 @@ printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +else case e in #( + e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } @@ -13150,8 +13376,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_pic_works=no +else case e in #( + e) lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment @@ -13179,7 +13405,8 @@ else $as_nop fi fi $RM conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } @@ -13215,8 +13442,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_static_works=no +else case e in #( + e) lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -13237,7 +13464,8 @@ else $as_nop fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } @@ -13259,8 +13487,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no +else case e in #( + e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -13300,7 +13528,8 @@ else $as_nop cd .. $RM -r conftest $RM conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -13315,8 +13544,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler_c_o=no +else case e in #( + e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -13356,7 +13585,8 @@ else $as_nop cd .. $RM -r conftest $RM conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -13435,7 +13665,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. @@ -13447,7 +13677,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; - openbsd* | bitrig*) + openbsd*) with_gnu_ld=no ;; esac @@ -13550,7 +13780,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -13606,7 +13836,7 @@ _LT_EOF cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; @@ -13951,8 +14181,8 @@ else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13984,7 +14214,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - + ;; +esac fi aix_libpath=$lt_cv_aix_libpath_ @@ -14006,8 +14237,8 @@ else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14039,7 +14270,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - + ;; +esac fi aix_libpath=$lt_cv_aix_libpath_ @@ -14095,7 +14327,7 @@ fi export_dynamic_flag_spec=-rdynamic ;; - cygwin* | mingw* | pw32* | cegcc*) + cygwin* | mingw* | windows* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -14112,14 +14344,14 @@ fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_cmds='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + $CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' @@ -14290,8 +14522,8 @@ printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_prog_compiler__b=no +else case e in #( + e) lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -14312,7 +14544,8 @@ else $as_nop fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } @@ -14360,8 +14593,8 @@ printf %s "checking whether the $host_os linker accepts -exported_symbol... " >& if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 -else $as_nop - save_LDFLAGS=$LDFLAGS +else case e in #( + e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14370,12 +14603,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes -else $as_nop - lt_cv_irix_exported_symbol=no +else case e in #( + e) lt_cv_irix_exported_symbol=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS=$save_LDFLAGS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } @@ -14425,7 +14660,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd* | bitrig*) + openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no @@ -14468,7 +14703,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; @@ -14701,8 +14936,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 -else $as_nop - $RM conftest* +else case e in #( + e) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -14738,7 +14973,8 @@ else $as_nop cat conftest.err 1>&5 fi $RM conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } @@ -14909,7 +15145,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -14967,7 +15203,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -15135,7 +15371,7 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32* | cegcc*) +cygwin* | mingw* | windows* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -15167,7 +15403,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; - mingw* | cegcc*) + mingw* | windows* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; @@ -15186,7 +15422,7 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='$libname.dll.lib' case $build_os in - mingw*) + mingw* | windows*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -15434,7 +15670,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext' + library_names_spec='$libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -15446,8 +15682,9 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' + # -rpath works at least for libraries that are not overridden by + # libraries installed in system locations. + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; # This must be glibc/ELF. @@ -15465,8 +15702,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 -else $as_nop - lt_cv_shlibpath_overrides_runpath=no +else case e in #( + e) lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ @@ -15493,7 +15730,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir - + ;; +esac fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath @@ -15503,7 +15741,7 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Ideally, we could use ldconfig to report *all* directores which are + # Ideally, we could use ldconfig to report *all* directories which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -15560,7 +15798,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -15901,7 +16139,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32* | cegcc*) + mingw* | windows* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -15918,16 +16156,22 @@ printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); int main (void) { @@ -15939,24 +16183,27 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - +else case e in #( + e) lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes - + ;; +esac fi ;; @@ -15974,22 +16221,28 @@ fi if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char shl_load (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (void); int main (void) { @@ -16001,39 +16254,47 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes -else $as_nop - ac_cv_lib_dld_shl_load=no +else case e in #( + e) ac_cv_lib_dld_shl_load=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +else case e in #( + e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); int main (void) { @@ -16045,34 +16306,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); int main (void) { @@ -16084,34 +16353,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes -else $as_nop - ac_cv_lib_svld_dlopen=no +else case e in #( + e) ac_cv_lib_svld_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dld_link (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (void); int main (void) { @@ -16123,12 +16400,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes -else $as_nop - ac_cv_lib_dld_dld_link=no +else case e in #( + e) ac_cv_lib_dld_dld_link=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } @@ -16137,19 +16416,24 @@ then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi ;; @@ -16177,8 +16461,8 @@ printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : +else case e in #( + e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -16272,7 +16556,8 @@ _LT_EOF fi rm -fr conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } @@ -16284,8 +16569,8 @@ printf %s "checking whether a statically linked program can dlopen itself... " > if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 -else $as_nop - if test yes = "$cross_compiling"; then : +else case e in #( + e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -16379,7 +16664,8 @@ _LT_EOF fi rm -fr conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } @@ -16553,8 +16839,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RC"; then +else case e in #( + e) if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16576,7 +16862,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RC=$ac_cv_prog_RC if test -n "$RC"; then @@ -16598,8 +16885,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RC"; then +else case e in #( + e) if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16621,7 +16908,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then @@ -16752,8 +17040,9 @@ printf %s "checking if library symbol versioning should be used... " >&6; } if test ${enable_symbol_versions+y} then : enableval=$enable_symbol_versions; -else $as_nop - enable_symbol_versions=auto +else case e in #( + e) enable_symbol_versions=auto ;; +esac fi if test "x$enable_symbol_versions" = xauto; then @@ -16786,57 +17075,96 @@ fi # --with-pic and --without-pic though. As long as neither --with-pic nor # --without-pic is used then we can use #ifdef PIC to detect if the file is # being built for a shared library. -if test "x$enable_symbol_versions" = xno ; then +if test "x$enable_symbol_versions" = xno +then : + enable_symbol_versions=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -elif test "x$enable_shared" = xno ; then + +elif test "x$enable_shared" = xno +then : + enable_symbol_versions=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (not building a shared library)" >&5 printf "%s\n" "no (not building a shared library)" >&6; } -else - case "$host_cpu-$host_os" in - microblaze*) - # GCC 12 on MicroBlaze doesn't support __symver__ - # attribute. It's simplest and safest to use the - # generic version on that platform since then only - # the linker script is needed. The RHEL/CentOS 7 - # compatibility symbols don't matter on MicroBlaze. - enable_symbol_versions=generic - ;; - *-linux*) - case "$pic_mode-$enable_static" in - default-*) - # Use symvers if PIC is defined. - have_symbol_versions_linux=2 - ;; - *-no) - # Not building static library. - # Use symvers unconditionally. - have_symbol_versions_linux=1 - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 + +else case e in #( + e) + # "yes" means that symbol version are to be used but we need to + # autodetect which variant to use. + if test "x$enable_symbol_versions" = xyes ; then + case "$host_cpu-$host_os" in + microblaze*) + # GCC 12 on MicroBlaze doesn't support + # __symver__ attribute. It's simplest and + # safest to use the generic version on that + # platform since then only the linker script + # is needed. The RHEL/CentOS 7 compatibility + # symbols don't matter on MicroBlaze. + enable_symbol_versions=generic + ;; + *-linux*) + # NVIDIA HPC Compiler doesn't support symbol + # versioning but the linker script can still + # be used. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __NVCOMPILER + use_generic_symbol_versioning + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP_TRADITIONAL "use_generic_symbol_versioning" >/dev/null 2>&1 +then : + enable_symbol_versions=generic +else case e in #( + e) enable_symbol_versions=linux ;; +esac +fi +rm -rf conftest* + + ;; + *) + enable_symbol_versions=generic + ;; + esac + fi + + if test "x$enable_symbol_versions" = xlinux ; then + case "$pic_mode-$enable_static" in + default-*) + # Use symvers if PIC is defined. + have_symbol_versions_linux=2 + ;; + *-no) + # Not building static library. + # Use symvers unconditionally. + have_symbol_versions_linux=1 + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 printf "%s\n" "" >&6; } - as_fn_error $? " + as_fn_error $? " On GNU/Linux, building both shared and static library at the same time is not supported if --with-pic or --without-pic is used. Use either --disable-shared or --disable-static to build one type of library at a time. If both types are needed, build one at a time, possibly picking only src/liblzma/.libs/liblzma.a from the static build." "$LINENO" 5 - ;; - esac - enable_symbol_versions=linux + ;; + esac printf "%s\n" "#define HAVE_SYMBOL_VERSIONS_LINUX $have_symbol_versions_linux" >>confdefs.h - ;; - *) - enable_symbol_versions=generic - ;; - esac + elif test "x$enable_symbol_versions" != xgeneric ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5 +printf "%s\n" "" >&6; } + as_fn_error $? "unknown symbol versioning variant '$enable_symbol_versions'" "$LINENO" 5 + fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($enable_symbol_versions)" >&5 printf "%s\n" "yes ($enable_symbol_versions)" >&6; } + ;; +esac fi if test "x$enable_symbol_versions" = xlinux; then @@ -16872,8 +17200,9 @@ printf %s "checking whether NLS is requested... " >&6; } if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval -else $as_nop - USE_NLS=yes +else case e in #( + e) USE_NLS=yes ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 @@ -16921,15 +17250,15 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 -else $as_nop - case "$MSGFMT" in +else case e in #( + e) case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -16942,9 +17271,10 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; +esac ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" @@ -16963,8 +17293,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 -else $as_nop - case $GMSGFMT in +else case e in #( + e) case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; @@ -16990,6 +17320,7 @@ IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; +esac ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT @@ -17044,15 +17375,15 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 -else $as_nop - case "$XGETTEXT" in +else case e in #( + e) case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -17065,9 +17396,10 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; +esac ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" @@ -17122,15 +17454,15 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 -else $as_nop - case "$MSGMERGE" in +else case e in #( + e) case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + gt_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then @@ -17142,9 +17474,10 @@ else $as_nop fi done done - IFS="$ac_save_IFS" + IFS="$gt_saved_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; +esac ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" @@ -17185,10 +17518,10 @@ fi else acl_final_exec_prefix="$exec_prefix" fi - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" + prefix="$acl_saved_prefix" @@ -17196,8 +17529,9 @@ fi if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else $as_nop - with_gnu_ld=no +else case e in #( + e) with_gnu_ld=no ;; +esac fi # Prepare PATH_SEPARATOR. @@ -17233,14 +17567,14 @@ else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in - *-*-mingw*) + *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -17270,9 +17604,9 @@ else $as_nop fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" @@ -17289,7 +17623,7 @@ else $as_nop esac fi done - IFS="$acl_save_ifs" + IFS="$acl_saved_IFS" fi case $host in *-*-aix*) @@ -17327,19 +17661,21 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - # The compiler produces 32-bit code. Add option '-m elf32_sparc' +else case e in #( + e) # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac - + ;; +esac fi LD="$acl_cv_path_LD" @@ -17357,8 +17693,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 -else $as_nop - # I'd rather use --version here, but apparently some GNU lds only accept -v. +else case e in #( + e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 @@ -17381,14 +17718,15 @@ printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } @@ -17405,8 +17743,9 @@ printf "%s\n" "$acl_cv_rpath" >&6; } if test ${enable_rpath+y} then : enableval=$enable_rpath; : -else $as_nop - enable_rpath=yes +else case e in #( + e) enable_rpath=yes ;; +esac fi @@ -17417,266 +17756,70 @@ printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$gl_cv_host_cpu_c_abi"; then - case "$gl_cv_host_cpu_c_abi" in - i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) - gl_cv_host_cpu_c_abi_32bit=yes ;; - x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) - gl_cv_host_cpu_c_abi_32bit=no ;; - *) - gl_cv_host_cpu_c_abi_32bit=unknown ;; - esac - else - case "$host_cpu" in - - # CPUs that only support a 32-bit ABI. - arc \ - | bfin \ - | cris* \ - | csky \ - | epiphany \ - | ft32 \ - | h8300 \ - | m68k \ - | microblaze | microblazeel \ - | nds32 | nds32le | nds32be \ - | nios2 | nios2eb | nios2el \ - | or1k* \ - | or32 \ - | sh | sh1234 | sh1234elb \ - | tic6x \ - | xtensa* ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - # CPUs that only support a 64-bit ABI. - alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ - | mmix ) - gl_cv_host_cpu_c_abi_32bit=no - ;; +else case e in #( + e) case "$host_cpu" in + + # CPUs that only support a 32-bit ABI. + arc \ + | bfin \ + | cris* \ + | csky \ + | epiphany \ + | ft32 \ + | h8300 \ + | m68k \ + | microblaze | microblazeel \ + | nds32 | nds32le | nds32be \ + | nios2 | nios2eb | nios2el \ + | or1k* \ + | or32 \ + | sh | sh1234 | sh1234elb \ + | tic6x \ + | xtensa* ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; - i[34567]86 ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; + # CPUs that only support a 64-bit ABI. + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) + gl_cv_host_cpu_c_abi_32bit=no + ;; - x86_64 ) - # On x86_64 systems, the C compiler may be generating code in one of - # these ABIs: - # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. - # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 - # with native Windows (mingw, MSVC). - # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + *) + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) + gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; + esac + else + gl_cv_host_cpu_c_abi_32bit=unknown + fi + if test $gl_cv_host_cpu_c_abi_32bit = unknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if (defined __x86_64__ || defined __amd64__ \ - || defined _M_X64 || defined _M_AMD64) \ - && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif +int test_pointer_size[sizeof (void *) - 5]; _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes +else case e in #( + e) gl_cv_host_cpu_c_abi_32bit=yes ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - arm* | aarch64 ) - # Assume arm with EABI. - # On arm64 systems, the C compiler may be generating code in one of - # these ABIs: - # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. - # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. - # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) - # On hppa, the C compiler may be generating 32-bit code or 64-bit - # code. In the latter case, it defines _LP64 and __LP64__. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __LP64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - ia64* ) - # On ia64 on HP-UX, the C compiler may be generating 64-bit code or - # 32-bit code. In the latter case, it defines _ILP32. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _ILP32 - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=yes -else $as_nop - gl_cv_host_cpu_c_abi_32bit=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - mips* ) - # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this - # at 32. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - powerpc* ) - # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. - # No need to distinguish them here; the caller may distinguish - # them based on the OS. - # On powerpc64 systems, the C compiler may still be generating - # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may - # be generating 64-bit code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __powerpc64__ || defined __LP64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - rs6000 ) - gl_cv_host_cpu_c_abi_32bit=yes - ;; - - riscv32 | riscv64 ) - # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. - # Size of 'long' and 'void *': - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __LP64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - s390* ) - # On s390x, the C compiler may be generating 64-bit (= s390x) code - # or 31-bit (= s390) code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __LP64__ || defined __s390x__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - sparc | sparc64 ) - # UltraSPARCs running Linux have `uname -m` = "sparc64", but the - # C compiler still generates 32-bit code. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined __sparcv9 || defined __arch64__ - int ok; - #else - error fail - #endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - gl_cv_host_cpu_c_abi_32bit=no -else $as_nop - gl_cv_host_cpu_c_abi_32bit=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - - *) - gl_cv_host_cpu_c_abi_32bit=unknown - ;; - esac - fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 -printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } + fi + ;; + esac + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" @@ -17689,8 +17832,8 @@ printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __ELF__ || (defined __linux__ && defined __EDG__) Extensible Linking Format @@ -17698,15 +17841,17 @@ else $as_nop _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Extensible Linking Format" >/dev/null 2>&1 + $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes -else $as_nop - gl_cv_elf=no +else case e in #( + e) gl_cv_elf=no ;; +esac fi rm -rf conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } @@ -17765,8 +17910,8 @@ printf %s "checking for the common suffixes of directories in the library search if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 -else $as_nop - acl_libdirstem=lib +else case e in #( + e) acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in @@ -17779,6 +17924,13 @@ else $as_nop esac fi ;; + netbsd*) + if test $HOST_CPU_C_ABI_32BIT != no; then + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparc ;; + esac + fi + ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` @@ -17795,7 +17947,7 @@ else $as_nop fi fi if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" + acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in @@ -17812,7 +17964,7 @@ else $as_nop esac fi done - IFS="$acl_save_IFS" + IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= @@ -17827,7 +17979,8 @@ else $as_nop test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf "%s\n" "$acl_cv_libdirstems" >&6; } @@ -17847,9 +18000,9 @@ printf "%s\n" "$acl_cv_libdirstems" >&6; } use_additional=yes - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -17857,8 +18010,8 @@ printf "%s\n" "$acl_cv_libdirstems" >&6; } eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" # Check whether --with-libiconv-prefix was given. @@ -17870,9 +18023,9 @@ then : else if test "X$withval" = "X"; then - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -17880,8 +18033,8 @@ then : eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" else additional_includedir="$withval/include" @@ -17993,13 +18146,13 @@ fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" case "$x" in -L*) @@ -18087,13 +18240,13 @@ fi haveit= for x in $LDFLAGS $LIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes @@ -18155,13 +18308,13 @@ fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes @@ -18177,12 +18330,12 @@ fi fi fi if test -n "$found_la"; then - save_libdir="$libdir" + saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac - libdir="$save_libdir" + libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) @@ -18204,13 +18357,13 @@ fi haveit= for x in $LDFLAGS $LIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -18225,13 +18378,13 @@ fi haveit= for x in $LDFLAGS $LTLIBICONV; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -18305,17 +18458,17 @@ fi for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi @@ -18332,6 +18485,15 @@ fi + gl_sed_double_backslashes='s/\\/\\\\/g' + gl_sed_escape_doublequotes='s/"/\\"/g' + gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g" + gl_sed_escape_for_make_2='s,\$,\\$$,g' + case `echo r | tr -d '\r'` in + '') gl_tr_cr='\015' ;; + *) gl_tr_cr='\r' ;; + esac + @@ -18359,8 +18521,8 @@ printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 -else $as_nop - gt_save_LIBS="$LIBS" +else case e in #( + e) gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18376,12 +18538,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes -else $as_nop - gt_cv_func_CFPreferencesCopyAppValue=no +else case e in #( + e) gt_cv_func_CFPreferencesCopyAppValue=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" + LIBS="$gt_saved_LIBS" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } @@ -18395,8 +18559,8 @@ printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 -else $as_nop - gt_save_LIBS="$LIBS" +else case e in #( + e) gt_saved_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18412,12 +18576,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes -else $as_nop - gt_cv_func_CFLocaleCopyPreferredLanguages=no +else case e in #( + e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" + LIBS="$gt_saved_LIBS" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } @@ -18429,7 +18595,7 @@ printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi @@ -18474,8 +18640,8 @@ printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -18502,11 +18668,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" -else $as_nop - eval "$gt_func_gnugettext_libc=no" +else case e in #( + e) eval "$gt_func_gnugettext_libc=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$gt_func_gnugettext_libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -18518,19 +18686,19 @@ printf "%s\n" "$ac_res" >&6; } - am_save_CPPFLAGS="$CPPFLAGS" + gl_saved_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes @@ -18548,8 +18716,8 @@ printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18575,7 +18743,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" + gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18600,9 +18768,10 @@ then : fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" + LIBS="$gl_saved_LIBS" fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } @@ -18612,9 +18781,9 @@ printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 -else $as_nop - - am_save_LIBS="$LIBS" +else case e in #( + e) + gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi @@ -18626,8 +18795,8 @@ then : aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -18756,13 +18925,15 @@ then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi test "$am_cv_func_iconv_works" = no || break done - LIBS="$am_save_LIBS" - + LIBS="$gl_saved_LIBS" + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } @@ -18784,7 +18955,7 @@ printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else - CPPFLAGS="$am_save_CPPFLAGS" + CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi @@ -18800,9 +18971,9 @@ printf "%s\n" "$LIBICONV" >&6; } use_additional=yes - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -18810,8 +18981,8 @@ printf "%s\n" "$LIBICONV" >&6; } eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" # Check whether --with-libintl-prefix was given. @@ -18823,9 +18994,9 @@ then : else if test "X$withval" = "X"; then - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" @@ -18833,8 +19004,8 @@ then : eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" else additional_includedir="$withval/include" @@ -18946,13 +19117,13 @@ fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" case "$x" in -L*) @@ -19040,13 +19211,13 @@ fi haveit= for x in $LDFLAGS $LIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes @@ -19108,13 +19279,13 @@ fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes @@ -19130,12 +19301,12 @@ fi fi fi if test -n "$found_la"; then - save_libdir="$libdir" + saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac - libdir="$save_libdir" + libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) @@ -19157,13 +19328,13 @@ fi haveit= for x in $LDFLAGS $LIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -19178,13 +19349,13 @@ fi haveit= for x in $LDFLAGS $LTLIBINTL; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes @@ -19258,17 +19429,17 @@ fi for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" + acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" + libdir="$acl_saved_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi @@ -19288,8 +19459,8 @@ printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 -else $as_nop - gt_save_CPPFLAGS="$CPPFLAGS" +else case e in #( + e) gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" @@ -19324,13 +19495,20 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" -else $as_nop - eval "$gt_func_gnugettext_libintl=no" +else case e in #( + e) eval "$gt_func_gnugettext_libintl=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" + gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" + + case "$host_os" in + aix*) gt_LIBINTL_EXTRA="-lpthread" ;; + esac + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \ + && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then + LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19361,8 +19539,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION _ACEOF if ac_fn_c_try_link "$LINENO" then : - LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" + LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA" + LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA" eval "$gt_func_gnugettext_libintl=yes" fi @@ -19370,7 +19548,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS" + LIBS="$gt_save_LIBS" ;; +esac fi eval ac_res=\$$gt_func_gnugettext_libintl { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -19380,7 +19559,8 @@ printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then + && test "$PACKAGE" != gettext-tools \ + && test "$PACKAGE" != libintl; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= @@ -19441,13 +19621,13 @@ printf "%s\n" "$LIBINTL" >&6; } haveit= for x in $CPPFLAGS; do - acl_save_prefix="$prefix" + acl_saved_prefix="$prefix" prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" + acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + exec_prefix="$acl_saved_exec_prefix" + prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes @@ -19474,12 +19654,50 @@ printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h - INTLLIBS="$LIBINTL" + INTLLIBS="$LIBINTL" + + + + + + + + gt_save_prefix="${prefix}" + gt_save_datarootdir="${datarootdir}" + gt_save_localedir="${localedir}" + if test "X$prefix" = "XNONE"; then + prefix="$ac_default_prefix" + fi + eval datarootdir="$datarootdir" + eval localedir="$localedir" + + + + + + gl_final_localedir="$localedir" + case "$build_os" in + cygwin*) + case "$host_os" in + mingw* | windows*) + gl_final_localedir=`cygpath -w "$gl_final_localedir"` ;; + esac + ;; + esac + localedir_c=`printf '%s\n' "$gl_final_localedir" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"` + localedir_c='"'"$localedir_c"'"' + localedir_c_make=`printf '%s\n' "$localedir_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"` + if test "$localedir_c_make" = '\"'"${gl_final_localedir}"'\"'; then + localedir_c_make='\"$(localedir)\"' + fi + localedir="${gt_save_localedir}" + datarootdir="${gt_save_datarootdir}" + prefix="${gt_save_prefix}" @@ -19490,24 +19708,6 @@ printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h echo echo "System headers and functions:" -# There is currently no workarounds in this package if some of -# these headers are missing. - for ac_header in fcntl.h limits.h sys/time.h -do : - as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else $as_nop - as_fn_error $? "Required header file(s) are missing." "$LINENO" 5 -fi - -done - # immintrin.h allows the use of the intrinsic functions if they are available. # cpuid.h may be used for detecting x86 processor features at runtime. ac_fn_c_check_header_compile "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default" @@ -19538,25 +19738,25 @@ printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -printf %s "checking for stdbool.h that conforms to C99... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99 or later" >&5 +printf %s "checking for stdbool.h that conforms to C99 or later... " >&6; } if test ${ac_cv_header_stdbool_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef __bool_true_false_are_defined - #error "__bool_true_false_are_defined is not defined" - #endif - char a[__bool_true_false_are_defined == 1 ? 1 : -1]; + /* "true" and "false" should be usable in #if expressions and + integer constant expressions, and "bool" should be a valid + type name. - /* Regardless of whether this is C++ or "_Bool" is a - valid type name, "true" and "false" should be usable - in #if expressions and integer constant expressions, - and "bool" should be a valid type name. */ + Although C99 requires bool, true, and false to be macros, + C23 and C++11 overrule that, so do not test for that. + Although C99 requires __bool_true_false_are_defined and + _Bool, C23 says they are obsolescent, so do not require + them. */ #if !true #error "'true' is not true" @@ -19590,43 +19790,12 @@ else $as_nop char n[sizeof m == h * sizeof m[0] ? 1 : -1]; char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ bool p = true; bool *pp = &p; - /* C 1999 specifies that bool, true, and false are to be - macros, but C++ 2011 and later overrule this. */ - #if __cplusplus < 201103 - #ifndef bool - #error "bool is not defined" - #endif - #ifndef false - #error "false is not defined" - #endif - #ifndef true - #error "true is not defined" - #endif - #endif - - /* If _Bool is available, repeat with it all the tests - above that used bool. */ - #ifdef HAVE__BOOL - struct sB { _Bool s: 1; _Bool t; } t; - - char q[(_Bool) 0.5 == true ? 1 : -1]; - char r[(_Bool) 0.0 == false ? 1 : -1]; - char u[sizeof (_Bool) > 0 ? 1 : -1]; - char v[sizeof t.t > 0 ? 1 : -1]; - - _Bool w[h]; - char x[sizeof m == h * sizeof m[0] ? 1 : -1]; - char y[-1 - (_Bool) 0 < 0 ? 1 : -1]; - _Bool z = true; - _Bool *pz = &p; - #endif - int main (void) { @@ -19635,20 +19804,10 @@ main (void) *pp |= p; *pp |= ! p; - #ifdef HAVE__BOOL - _Bool pt = &t; - *pz |= z; - *pz |= ! z; - #endif - /* Refer to every declared value, so they cannot be discarded as unused. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k - + !l + !m + !n + !o + !p + !pp + !ps - #ifdef HAVE__BOOL - + !q + !r + !u + !v + !w + !x + !y + !z + !pt - #endif - ); + return (!b + !c + !d + !e + !f + !g + !h + !i + !j + !k + + !l + !m + !n + !o + !p + !pp + !ps); ; return 0; @@ -19657,10 +19816,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stdbool_h=yes -else $as_nop - ac_cv_header_stdbool_h=no +else case e in #( + e) ac_cv_header_stdbool_h=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } @@ -19743,8 +19904,8 @@ then : printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h -else $as_nop - for ac_type in 'unsigned int' 'unsigned long int' \ +else case e in #( + e) for ac_type in 'unsigned int' 'unsigned long int' \ 'unsigned long long int'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19769,35 +19930,38 @@ printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test -z "$ac_type" && break - done + done ;; +esac fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 printf %s "checking size of size_t... " >&6; } if test ${ac_cv_sizeof_size_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } @@ -19858,31 +20022,34 @@ if test ${enable_largefile+y} then : enableval=$enable_largefile; fi - -if test "$enable_largefile" != no; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -printf %s "checking for special C compiler options needed for large files... " >&6; } -if test ${ac_cv_sys_largefile_CC+y} +if test "$enable_largefile,$enable_year2038" != no,no +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5 +printf %s "checking for $CC option to enable large file support... " >&6; } +if test ${ac_cv_sys_largefile_opts+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) ac_save_CC="$CC" + ac_opt_found=no + for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do + if test x"$ac_opt" != x"none needed" +then : + CC="$ac_save_CC $ac_opt" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, +#ifndef FTYPE +# define FTYPE off_t +#endif + /* Check that FTYPE can represent 2**63 - 1 correctly. + We can't simply define LARGE_FTYPE to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) +#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) + int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 + && LARGE_FTYPE % 2147483647 == 1) ? 1 : -1]; int main (void) @@ -19892,142 +20059,88 @@ main (void) return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - CC="$CC -n32" + if test x"$ac_opt" = x"none needed" +then : + # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. + CC="$CC -DFTYPE=ino_t" if ac_fn_c_try_compile "$LINENO" then : - ac_cv_sys_largefile_CC=' -n32'; break + +else case e in #( + e) CC="$CC -D_FILE_OFFSET_BITS=64" + if ac_fn_c_try_compile "$LINENO" +then : + ac_opt='-D_FILE_OFFSET_BITS=64' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test ${ac_cv_sys_file_offset_bits+y} -then : - printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=no; break + ac_cv_sys_largefile_opts=$ac_opt + ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ + test $ac_opt_found = no || break + done + CC="$ac_save_CC" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done + test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h -;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 +printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; } + +ac_have_largefile=yes +case $ac_cv_sys_largefile_opts in #( + "none needed") : + ;; #( + "supported through gnulib") : + ;; #( + "support not detected") : + ac_have_largefile=no ;; #( + "-D_FILE_OFFSET_BITS=64") : + +printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h + ;; #( + "-D_LARGE_FILES=1") : + +printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h + ;; #( + "-n32") : + CC="$CC -n32" ;; #( + *) : + as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } -if test ${ac_cv_sys_large_files+y} + +if test "$enable_year2038" != no +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5 +printf %s "checking for $CC option for timestamps after 2038... " >&6; } +if test ${ac_cv_sys_year2038_opts+y} then : printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" +else case e in #( + e) ac_save_CPPFLAGS="$CPPFLAGS" + ac_opt_found=no + for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do + if test x"$ac_opt" != x"none needed" then : - ac_cv_sys_large_files=no; break + CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + + #include + /* Check that time_t can represent 2**32 - 1 correctly. */ + #define LARGE_TIME_T \\ + ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) + int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 + && LARGE_TIME_T % 65537 == 0) + ? 1 : -1]; + int main (void) { @@ -20038,32 +20151,54 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_sys_large_files=1; break + ac_cv_sys_year2038_opts="$ac_opt" + ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done + test $ac_opt_found = no || break + done + CPPFLAGS="$ac_save_CPPFLAGS" + test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -printf "%s\n" "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h -;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 +printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; } + +ac_have_year2038=yes +case $ac_cv_sys_year2038_opts in #( + "none needed") : + ;; #( + "support not detected") : + ac_have_year2038=no ;; #( + "-D_TIME_BITS=64") : + +printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h + ;; #( + "-D__MINGW_USE_VC2005_COMPAT") : + +printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h + ;; #( + "-U_USE_32_BIT_TIME_T"*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It +will stop working after mid-January 2038. Remove +_USE_32BIT_TIME_T from the compiler flags. +See 'config.log' for more details" "$LINENO" 5; } ;; #( + *) : + as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; esac -rm -rf conftest* - fi + fi +fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_bigendian=unknown +else case e in #( + e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20109,8 +20244,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif @@ -20141,8 +20276,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -20186,8 +20322,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -20214,22 +20351,23 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - extern int foo; - -int -main (void) -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} + int + main (int argc, char **argv) + { + /* Intimidate the compiler so that it does not + optimize the arrays away. */ + char *p = argv[0]; + ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; + ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; + return use_ascii (argc) == use_ebcdic (*p); + } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -20238,9 +20376,10 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -20263,14 +20402,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else $as_nop - ac_cv_c_bigendian=yes +else case e in #( + e) ac_cv_c_bigendian=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -20323,16 +20465,16 @@ printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$OLD_CFLAGS" - # The Win95 threading lacks a thread-safe one-time initialization function. # The one-time initialization is needed for crc32_small.c and crc64_small.c # create the CRC tables. So if small mode is enabled, the threading mode is @@ -20347,13 +20489,99 @@ if test "x$enable_small$enable_threads$have_func_attribute_constructor" \ __attribute__((__constructor__))" "$LINENO" 5 fi + ############################################################################### # Checks for library functions. ############################################################################### # Gnulib replacements as needed +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test -z "$GETOPT_H"; then +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else case e in #( + e) # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See 'config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + + + gl_replace_getopt= + + if test -z "$gl_replace_getopt"; then for ac_header in getopt.h do : ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" @@ -20361,14 +20589,15 @@ if test "x$ac_cv_header_getopt_h" = xyes then : printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h -else $as_nop - GETOPT_H=getopt.h +else case e in #( + e) gl_replace_getopt=yes ;; +esac fi done fi - if test -z "$GETOPT_H"; then + if test -z "$gl_replace_getopt"; then for ac_func in getopt_long do : @@ -20377,14 +20606,15 @@ if test "x$ac_cv_func_getopt_long" = xyes then : printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h -else $as_nop - GETOPT_H=getopt.h +else case e in #( + e) gl_replace_getopt=yes ;; +esac fi done fi - if test -z "$GETOPT_H"; then + if test -z "$gl_replace_getopt"; then ac_fn_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_optreset" = xyes @@ -20398,8 +20628,11 @@ fi - if test -n "$GETOPT_H" -then : + + + + + if test -n "$gl_replace_getopt"; then case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; @@ -20414,26 +20647,121 @@ esac esac - GETOPT_H=getopt.h -printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h +printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + GETOPT_H=getopt.h + + + fi + + +# If clock_gettime() is available, liblzma with pthreads may use it, and +# xz may use it even when threading support is disabled. In XZ Utils 5.4.x +# and older, configure checked for clock_gettime() only when using pthreads. +# This way non-threaded builds of liblzma didn't get a useless dependency on +# librt which further had a dependency on libpthread. Avoiding these was +# useful when a small build was needed, for example, for initramfs use. +# +# The above reasoning is thoroughly obsolete: On GNU/Linux, librt hasn't +# been needed for clock_gettime() since glibc 2.17 (2012-12-25). +# Solaris 10 needs librt but Solaris 11 doesn't anymore. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +printf %s "checking for library containing clock_gettime... " >&6; } +if test ${ac_cv_search_clock_gettime+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (void); +int +main (void) +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" +then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext + if test ${ac_cv_search_clock_gettime+y} +then : + break +fi +done +if test ${ac_cv_search_clock_gettime+y} +then : + +else case e in #( + e) ac_cv_search_clock_gettime=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + +fi + +ac_fn_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes +then : +printf "%s\n" "#define HAVE_CLOCK_MONOTONIC 1" >>confdefs.h fi - # Find the best function to set timestamps. for ac_func in futimens futimes futimesat utimes _futime utime do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF break fi @@ -20493,20 +20821,20 @@ printf "%s\n" "#define HAVE___BUILTIN_BSWAPXX 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } # Look for other byteswapping methods. for ac_header in byteswap.h sys/endian.h sys/byteorder.h do : - as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF break fi @@ -20539,9 +20867,10 @@ printf "%s\n" "#define HAVE_BSWAP_16 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -20570,9 +20899,10 @@ printf "%s\n" "#define HAVE_BSWAP_32 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -20601,15 +20931,17 @@ printf "%s\n" "#define HAVE_BSWAP_64 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -20620,25 +20952,44 @@ printf %s "checking if unaligned memory access should be used... " >&6; } if test ${enable_unaligned_access+y} then : enableval=$enable_unaligned_access; -else $as_nop - enable_unaligned_access=auto +else case e in #( + e) enable_unaligned_access=auto ;; +esac fi if test "x$enable_unaligned_access" = xauto ; then - # TODO: There may be other architectures, on which unaligned access - # is OK. + # NOTE: There might be other architectures on which unaligned access + # is fast. case $host_cpu in - i?86|x86_64|powerpc|powerpc64) + i?86|x86_64|powerpc|powerpc64|powerpc64le) enable_unaligned_access=yes ;; - arm*|aarch64*) + arm*|aarch64*|riscv*) # On 32-bit and 64-bit ARM, GCC and Clang # #define __ARM_FEATURE_UNALIGNED if # unaligned access is supported. + # + # Exception: GCC at least up to 13.2.0 + # defines it even when using -mstrict-align + # so in that case this autodetection goes wrong. + # Most of the time -mstrict-align isn't used so it + # shouldn't be a common problem in practice. See: + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555 + # + # RISC-V C API Specification says that if + # __riscv_misaligned_fast is defined then + # unaligned access is known to be fast. + # + # MSVC is handled as a special case: We assume that + # 32/64-bit ARM supports fast unaligned access. + # If MSVC gets RISC-V support then this will assume + # fast unaligned access on RISC-V too. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifndef __ARM_FEATURE_UNALIGNED +#if !defined(__ARM_FEATURE_UNALIGNED) \ + && !defined(__riscv_misaligned_fast) \ + && !defined(_MSC_VER) compile error #endif int main(void) { return 0; } @@ -20647,8 +20998,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : enable_unaligned_access=yes -else $as_nop - enable_unaligned_access=no +else case e in #( + e) enable_unaligned_access=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; @@ -20674,8 +21026,9 @@ printf %s "checking if unsafe type punning should be used... " >&6; } if test ${enable_unsafe_type_punning+y} then : enableval=$enable_unsafe_type_punning; -else $as_nop - enable_unsafe_type_punning=no +else case e in #( + e) enable_unsafe_type_punning=no ;; +esac fi if test "x$enable_unsafe_type_punning" = xyes ; then @@ -20711,11 +21064,12 @@ printf "%s\n" "#define HAVE___BUILTIN_ASSUME_ALIGNED 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -20737,8 +21091,8 @@ printf %s "checking how to detect the amount of physical memory... " >&6; } if test ${tuklib_cv_physmem_method+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) # Maybe checking $host_os would be enough but this matches what # tuklib_physmem.c does. @@ -20760,8 +21114,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=special -else $as_nop - +else case e in #( + e) # Look for AIX-specific solution before sysconf(), because the test # for sysconf() will pass on AIX but won't actually work @@ -20782,8 +21136,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=aix -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20802,8 +21156,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=sysconf -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20826,8 +21180,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=sysctl -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20848,8 +21202,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=getsysinfo -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20871,8 +21225,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=pstat_getstatic -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20892,8 +21246,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_physmem_method=getinvent_r -else $as_nop - +else case e in #( + e) # This version of sysinfo() is Linux-specific. Some non-Linux systems have # different sysinfo() so we must check $host_os. @@ -20917,10 +21271,11 @@ then : tuklib_cv_physmem_method=sysinfo -else $as_nop - +else case e in #( + e) tuklib_cv_physmem_method=unknown - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; @@ -20928,21 +21283,29 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext tuklib_cv_physmem_method=unknown ;; esac - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_physmem_method" >&5 printf "%s\n" "$tuklib_cv_physmem_method" >&6; } @@ -21002,8 +21365,8 @@ printf %s "checking how to detect the number of available CPU cores... " >&6; } if test ${tuklib_cv_cpucores_method+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) # Maybe checking $host_os would be enough but this matches what # tuklib_cpucores.c does. @@ -21023,8 +21386,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_cpucores_method=special -else $as_nop - +else case e in #( + e) # glibc-based systems (GNU/Linux and GNU/kFreeBSD) have sched_getaffinity(). # The CPU_COUNT() macro was added in glibc 2.9 so we try to link the @@ -21047,8 +21410,8 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : tuklib_cv_cpucores_method=sched_getaffinity -else $as_nop - +else case e in #( + e) # FreeBSD has both cpuset and sysctl. Look for cpuset first because # it's a better approach. @@ -21076,8 +21439,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_cpucores_method=cpuset -else $as_nop - +else case e in #( + e) # On OS/2, both sysconf() and sysctl() pass the tests in this file, # but only sysctl() works. On QNX it's the opposite: only sysconf() works @@ -21115,8 +21478,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_cpucores_method=sysctl -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21140,8 +21503,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_cpucores_method=sysconf -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21162,24 +21525,31 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : tuklib_cv_cpucores_method=pstat_getdynamic -else $as_nop - +else case e in #( + e) tuklib_cv_cpucores_method=unknown - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_cpucores_method" >&5 printf "%s\n" "$tuklib_cv_cpucores_method" >&6; } @@ -21220,8 +21590,8 @@ printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6 if test ${ac_cv_func_mbrtowc+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -21239,11 +21609,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_mbrtowc=yes -else $as_nop - ac_cv_func_mbrtowc=no +else case e in #( + e) ac_cv_func_mbrtowc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 printf "%s\n" "$ac_cv_func_mbrtowc" >&6; } @@ -21288,12 +21660,12 @@ then : # succeed. for ac_header in CommonCrypto/CommonDigest.h sha256.h sha2.h do : - as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF sha256_header_found=yes ; break fi @@ -21367,15 +21739,21 @@ printf %s "checking for library containing SHA256Init... " >&6; } if test ${ac_cv_search_SHA256Init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char SHA256Init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SHA256Init (void); int main (void) { @@ -21406,11 +21784,13 @@ done if test ${ac_cv_search_SHA256Init+y} then : -else $as_nop - ac_cv_search_SHA256Init=no +else case e in #( + e) ac_cv_search_SHA256Init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SHA256Init" >&5 printf "%s\n" "$ac_cv_search_SHA256Init" >&6; } @@ -21426,15 +21806,21 @@ printf %s "checking for library containing SHA256_Init... " >&6; } if test ${ac_cv_search_SHA256_Init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char SHA256_Init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SHA256_Init (void); int main (void) { @@ -21465,11 +21851,13 @@ done if test ${ac_cv_search_SHA256_Init+y} then : -else $as_nop - ac_cv_search_SHA256_Init=no +else case e in #( + e) ac_cv_search_SHA256_Init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SHA256_Init" >&5 printf "%s\n" "$ac_cv_search_SHA256_Init" >&6; } @@ -21483,12 +21871,12 @@ fi for ac_func in CC_SHA256_Init SHA256Init SHA256_Init do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF sha256_func_found=yes ; break fi @@ -21547,8 +21935,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, --disable-clmul-crc was used" >&5 printf "%s\n" "no, --disable-clmul-crc was used" >&6; } -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21578,141 +21966,136 @@ then : printf "%s\n" "#define HAVE_USABLE_CLMUL 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + enable_clmul_crc=yes +else case e in #( + e) + enable_clmul_crc=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_clmul_crc" >&5 +printf "%s\n" "$enable_clmul_crc" >&6; } + ;; +esac fi -# Check for sandbox support. If one is found, set enable_sandbox=found. -case $enable_sandbox in #( - auto | capsicum) : - - -# On FreeBSD >= 11.x and Linux, Capsicum is uses . -# If this header is found, it is assumed to be the right one. -capsicum_header_found=no - for ac_header in sys/capsicum.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_capsicum_h" = xyes +# ARM64 C Language Extensions define CRC32 functions in arm_acle.h. +# These are supported by at least GCC and Clang which both need +# __attribute__((__target__("+crc"))), unless the needed compiler flags +# are used to support the CRC instruction. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ARM64 CRC32 instruction is usable" >&5 +printf %s "checking if ARM64 CRC32 instruction is usable... " >&6; } +if test "x$enable_arm64_crc32" = xno then : - printf "%s\n" "#define HAVE_SYS_CAPSICUM_H 1" >>confdefs.h - capsicum_header_found=yes -fi -done -if test "$capsicum_header_found" = no ; then - # On FreeBSD 10.x Capsicum uses . Such a header exists - # on Linux too but it describes POSIX.1e capabilities. Look for the - # declaration of cap_rights_limit to check if is - # a Capsicum header. - ac_fn_check_decl "$LINENO" "cap_rights_limit" "ac_cv_have_decl_cap_rights_limit" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_cap_rights_limit" = xyes -then : - capsicum_header_found=yes -fi -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, --disable-arm64-crc32 was used" >&5 +printf "%s\n" "no, --disable-arm64-crc32 was used" >&6; } -capsicum_lib_found=no -CAPSICUM_LIB= -if test "$capsicum_header_found" = yes ; then - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +else case e in #( + e) + # Set -Werror here because some versions of Clang (14 and older) + # do not report the unsupported __attribute__((__target__("+crc"))) + # or __crc32d() as an error, only as a warning. This does not need + # to be done with CMake because tests will attempt to link and the + # error will be reported then. + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" - # FreeBSD >= 10.x has Capsicum functions in libc. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char cap_rights_limit (); -int -main (void) -{ -return cap_rights_limit (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - capsicum_lib_found=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - # Linux has Capsicum functions in libcaprights. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_rights_limit in -lcaprights" >&5 -printf %s "checking for cap_rights_limit in -lcaprights... " >&6; } -if test ${ac_cv_lib_caprights_cap_rights_limit+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcaprights $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#include +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char cap_rights_limit (); -int -main (void) +#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__) +__attribute__((__target__("+crc"))) +#endif +uint32_t my_crc(uint32_t a, uint64_t b) { -return cap_rights_limit (); - ; - return 0; + return __crc32d(a, b); } + _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_lib_caprights_cap_rights_limit=yes -else $as_nop - ac_cv_lib_caprights_cap_rights_limit=no + + +printf "%s\n" "#define HAVE_ARM64_CRC32 1" >>confdefs.h + + enable_arm64_crc32=yes + +else case e in #( + e) + enable_arm64_crc32=no + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_arm64_crc32" >&5 +printf "%s\n" "$enable_arm64_crc32" >&6; } + + CFLAGS="$OLD_CFLAGS" + ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_caprights_cap_rights_limit" >&5 -printf "%s\n" "$ac_cv_lib_caprights_cap_rights_limit" >&6; } -if test "x$ac_cv_lib_caprights_cap_rights_limit" = xyes + +# Check for ARM64 CRC32 instruction runtime detection. +# getauxval() is supported on Linux, elf_aux_info() on FreeBSD, and +# sysctlbyname("hw.optional.armv8_crc32", ...) is supported on Darwin +# (macOS, iOS, etc.). Note that sysctlbyname() is supported on FreeBSD, +# NetBSD, and possibly others too but the string is specific to Apple OSes. +# The C code is responsible for checking defined(__APPLE__) before using +# sysctlbyname("hw.optional.armv8_crc32", ...). +if test "x$enable_arm64_crc32" = xyes +then : + + + for ac_func in getauxval elf_aux_info sysctlbyname +do : + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes" then : - CAPSICUM_LIB=-lcaprights - capsicum_lib_found=yes + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 +_ACEOF + break fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +done fi -if test "$capsicum_lib_found" = yes ; then +# Check for sandbox support. If one is found, set enable_sandbox=found. +# +# About -fsanitize: Of our three sandbox methods, only Landlock is +# incompatible with -fsanitize. FreeBSD 13.2 with Capsicum was tested with +# -fsanitize=address,undefined and had no issues. OpenBSD (as of version +# 7.4) has minimal support for process instrumentation. OpenBSD does not +# distribute the additional libraries needed (libasan, libubsan, etc.) with +# GCC or Clang needed for runtime sanitization support and instead only +# support -fsanitize-minimal-runtime for minimal undefined behavior +# sanitization. This minimal support is compatible with our use of the +# Pledge sandbox. So only Landlock will result in a build that cannot +# compress or decompress a single file to standard out. +case $enable_sandbox in #( + auto | capsicum) : -printf "%s\n" "#define HAVE_CAPSICUM 1" >>confdefs.h - enable_sandbox=found -else - : + for ac_func in cap_rights_limit +do : + ac_fn_c_check_func "$LINENO" "cap_rights_limit" "ac_cv_func_cap_rights_limit" +if test "x$ac_cv_func_cap_rights_limit" = xyes +then : + printf "%s\n" "#define HAVE_CAP_RIGHTS_LIMIT 1" >>confdefs.h + enable_sandbox=found fi +done + ;; #( *) : ;; @@ -21727,7 +22110,7 @@ do : if test "x$ac_cv_func_pledge" = xyes then : printf "%s\n" "#define HAVE_PLEDGE 1" >>confdefs.h - enable_sandbox=found ; break + enable_sandbox=found fi done @@ -21736,6 +22119,65 @@ done *) : ;; esac +case $enable_sandbox in #( + auto | landlock) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Linux Landlock is usable" >&5 +printf %s "checking if Linux Landlock is usable... " >&6; } + + # A compile check is done here because some systems have + # linux/landlock.h, but do not have the syscalls defined + # in order to actually use Linux Landlock. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + + void my_sandbox(void) + { + (void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); + (void)SYS_landlock_create_ruleset; + (void)SYS_landlock_restrict_self; + (void)LANDLOCK_CREATE_RULESET_VERSION; + return; + } + +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + enable_sandbox=found + + case $CFLAGS in #( + *-fsanitize=*) : + as_fn_error $? " + CFLAGS contains '-fsanitize=' which is incompatible with the Landlock + sandboxing. Use --disable-sandbox when using '-fsanitize'." "$LINENO" 5 ;; #( + *) : + ;; +esac + + +printf "%s\n" "#define HAVE_LINUX_LANDLOCK 1" >>confdefs.h + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + ;; #( + *) : + ;; +esac # If a specific sandboxing method was explicitly requested and it wasn't # found, give an error. @@ -21769,8 +22211,8 @@ printf %s "checking whether the -Werror option is usable... " >&6; } if test ${gl_cv_cc_vis_werror+y} then : printf %s "(cached) " >&6 -else $as_nop - gl_save_CFLAGS="$CFLAGS" +else case e in #( + e) gl_saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21786,12 +22228,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_cc_vis_werror=yes -else $as_nop - gl_cv_cc_vis_werror=no +else case e in #( + e) gl_cv_cc_vis_werror=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" - + CFLAGS="$gl_saved_CFLAGS" + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; } @@ -21800,8 +22244,8 @@ printf %s "checking for simple visibility declarations... " >&6; } if test ${gl_cv_cc_visibility+y} then : printf %s "(cached) " >&6 -else $as_nop - gl_save_CFLAGS="$CFLAGS" +else case e in #( + e) gl_saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" if test $gl_cv_cc_vis_werror = yes; then CFLAGS="$CFLAGS -Werror" @@ -21830,12 +22274,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_cc_visibility=yes -else $as_nop - gl_cv_cc_visibility=no +else case e in #( + e) gl_cv_cc_visibility=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" - + CFLAGS="$gl_saved_CFLAGS" + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 printf "%s\n" "$gl_cv_cc_visibility" >&6; } @@ -21875,7 +22321,6 @@ then : -Wall \ -Wextra \ -Wvla \ - -Wc99-c11-compat \ -Wformat=2 \ -Winit-self \ -Wmissing-include-dirs \ @@ -21932,11 +22377,12 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$OLD_CFLAGS" @@ -21946,8 +22392,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test ${enable_werror+y} then : enableval=$enable_werror; -else $as_nop - enable_werror=no +else case e in #( + e) enable_werror=no ;; +esac fi if test "x$enable_werror" = "xyes"; then @@ -22002,8 +22449,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -22033,14 +22480,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -22233,6 +22680,18 @@ if test -z "${COND_DECODER_SPARC_TRUE}" && test -z "${COND_DECODER_SPARC_FALSE}" 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_RISCV_TRUE}" && test -z "${COND_FILTER_RISCV_FALSE}"; then + as_fn_error $? "conditional \"COND_FILTER_RISCV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${COND_ENCODER_RISCV_TRUE}" && test -z "${COND_ENCODER_RISCV_FALSE}"; then + as_fn_error $? "conditional \"COND_ENCODER_RISCV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${COND_DECODER_RISCV_TRUE}" && test -z "${COND_DECODER_RISCV_FALSE}"; then + as_fn_error $? "conditional \"COND_DECODER_RISCV\" 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. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -22313,6 +22772,10 @@ if test -z "${COND_DOC_TRUE}" && test -z "${COND_DOC_FALSE}"; then as_fn_error $? "conditional \"COND_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${COND_DOXYGEN_TRUE}" && test -z "${COND_DOXYGEN_FALSE}"; then + as_fn_error $? "conditional \"COND_DOXYGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then @@ -22357,6 +22820,12 @@ if test -z "${COND_SYMVERS_GENERIC_TRUE}" && test -z "${COND_SYMVERS_GENERIC_FAL as_fn_error $? "conditional \"COND_SYMVERS_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +# Check whether --enable-year2038 was given. +if test ${enable_year2038+y} +then : + enableval=$enable_year2038; +fi + if test -z "${COND_INTERNAL_SHA256_TRUE}" && test -z "${COND_INTERNAL_SHA256_FALSE}"; then as_fn_error $? "conditional \"COND_INTERNAL_SHA256\" was never defined. @@ -22395,7 +22864,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -22404,12 +22872,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -22481,7 +22950,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -22510,7 +22979,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -22550,11 +23018,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -22568,11 +23037,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -22655,9 +23125,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -22738,10 +23208,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -22756,8 +23228,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by XZ Utils $as_me 5.4.5, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by XZ Utils $as_me 5.6.2, which was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22789,7 +23261,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -22825,11 +23297,11 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -XZ Utils config.status 5.4.5 -configured by $0, generated by GNU Autoconf 2.71, +XZ Utils config.status 5.6.2 +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -22891,8 +23363,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -22900,8 +23372,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -23342,7 +23814,7 @@ do "src/scripts/xzmore") CONFIG_FILES="$CONFIG_FILES src/scripts/xzmore" ;; "src/scripts/xzless") CONFIG_FILES="$CONFIG_FILES src/scripts/xzless" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -23362,7 +23834,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -23386,7 +23858,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -23544,13 +24016,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -23660,7 +24132,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 @@ -23682,19 +24154,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "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=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -23827,7 +24299,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -23858,9 +24330,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$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 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -24015,15 +24487,15 @@ printf "%s\n" X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} @@ -24052,13 +24524,13 @@ See \`config.log' for more details" "$LINENO" 5; } # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 -# Copyright (C) 2014 Free Software Foundation, Inc. +# Copyright (C) 2024 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. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -24442,7 +24914,7 @@ hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# "absolute",i.e. impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -24671,7 +25143,7 @@ hardcode_direct=$hardcode_direct_RC # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# "absolute",i.e. impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_RC diff --git a/configure.ac b/configure.ac index 1d1c811..2e3320f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,11 @@ # -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. +# SPDX-License-Identifier: 0BSD ############################################################################### # -# Author: Lasse Collin +# Process this file with autoconf to produce a configure script. # -# This file has been put into the public domain. -# You can do whatever you want with this file. +# Author: Lasse Collin # ############################################################################### @@ -79,8 +78,8 @@ fi # Filters # ########### -m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc])dnl -m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc]) +m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv])dnl +m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv]) m4_define([LZ_FILTERS], [lzma1,lzma2]) m4_foreach([NAME], [SUPPORTED_FILTERS], @@ -310,7 +309,7 @@ case $enable_microlzma in ;; *) AC_MSG_RESULT([]) - AC_MSG_ERROR([--enable-microlzma accepts only `yes' or `no'.]) + AC_MSG_ERROR([--enable-microlzma accepts only 'yes' or 'no'.]) ;; esac AM_CONDITIONAL(COND_MICROLZMA, test "x$enable_microlzma" = xyes) @@ -364,7 +363,7 @@ case $enable_assembler in ;; *) AC_MSG_RESULT([]) - AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', or `x86' (32-bit).]) + AC_MSG_ERROR([--enable-assembler accepts only 'yes', 'no', or 'x86' (32-bit).]) ;; esac AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86) @@ -380,6 +379,16 @@ AC_ARG_ENABLE([clmul-crc], AS_HELP_STRING([--disable-clmul-crc], [], [enable_clmul_crc=yes]) +############################ +# ARM64 CRC32 Instructions # +############################ + +AC_ARG_ENABLE([arm64-crc32], AS_HELP_STRING([--disable-arm64-crc32], + [Do not use ARM64 CRC32 instructions even if support for it + is detected.]), + [], [enable_arm64_crc32=yes]) + + ##################### # Size optimization # ##################### @@ -393,7 +402,7 @@ if test "x$enable_small" = xyes; then AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.]) elif test "x$enable_small" != xno; then AC_MSG_RESULT([]) - AC_MSG_ERROR([--enable-small accepts only `yes' or `no']) + AC_MSG_ERROR([--enable-small accepts only 'yes' or 'no']) fi AC_MSG_RESULT([$enable_small]) AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes) @@ -405,8 +414,8 @@ AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes) AC_MSG_CHECKING([if threading support is wanted]) AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD], - [Supported METHODS are `yes', `no', `posix', `win95', and - `vista'. The default is `yes'. Using `no' together with + [Supported METHODS are 'yes', 'no', 'posix', 'win95', and + 'vista'. The default is 'yes'. Using 'no' together with --enable-small makes liblzma thread unsafe.]), [], [enable_threads=yes]) @@ -433,7 +442,7 @@ case $enable_threads in ;; *) AC_MSG_RESULT([]) - AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista']) + AC_MSG_ERROR([--enable-threads only accepts 'yes', 'no', 'posix', 'win95', or 'vista']) ;; esac @@ -507,10 +516,18 @@ AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno]) AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], [do not install documentation files to docdir - (man pages will still be installed)])], + (man pages are still installed and, + if --enable-doxygen is used, + liblzma API documentation is installed too)])], [], [enable_doc=yes]) AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno]) +AC_ARG_ENABLE([doxygen], [AS_HELP_STRING([--enable-doxygen], + [generate HTML version of the liblzma API documentation + using Doxygen and install the result to docdir])], + [], [enable_doxygen=no]) +AM_CONDITIONAL([COND_DOXYGEN], [test x$enable_doxygen != xno]) + ############## # Sandboxing # @@ -519,20 +536,24 @@ AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno]) AC_MSG_CHECKING([if sandboxing should be used]) AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD], [Sandboxing METHOD can be - `auto', `no', `capsicum', or `pledge'. - The default is `auto' which enables sandboxing if + 'auto', 'no', 'capsicum', 'pledge', or 'landlock'. + The default is 'auto' which enables sandboxing if a supported sandboxing method is found.])], [], [enable_sandbox=auto]) -case $enable_sandbox in - auto) +case $enable_xzdec-$enable_xz-$enable_sandbox in + no-no-*) + enable_sandbox=no + AC_MSG_RESULT([no, --disable-xz and --disable-xzdec was used]) + ;; + *-*-auto) AC_MSG_RESULT([maybe (autodetect)]) ;; - no | capsicum | pledge) + *-*-no | *-*-capsicum | *-*-pledge | *-*-landlock) AC_MSG_RESULT([$enable_sandbox]) ;; *) AC_MSG_RESULT([]) - AC_MSG_ERROR([--enable-sandbox only accepts `auto', `no', `capsicum', or `pledge'.]) + AC_MSG_ERROR([--enable-sandbox only accepts 'auto', 'no', 'capsicum', 'pledge', or 'landlock'.]) ;; esac @@ -622,21 +643,10 @@ AS_CASE([$enable_threads], AC_DEFINE([MYTHREAD_POSIX], [1], [Define to 1 when using POSIX threads (pthreads).]) - # These are nice to have but not mandatory. - # - # FIXME: xz uses clock_gettime if it is available and can do - # it even when threading is disabled. Moving this outside - # of pthread detection may be undesirable because then - # liblzma may get linked against librt even when librt isn't - # needed by liblzma. + # This is nice to have but not mandatory. OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - AC_SEARCH_LIBS([clock_gettime], [rt]) - AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock]) - AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE( - [HAVE_CLOCK_MONOTONIC], [1], [Define to 1 if - `CLOCK_MONOTONIC' is declared in .])], [], - [[#include ]]) + AC_CHECK_FUNCS([pthread_condattr_setclock]) CFLAGS=$OLD_CFLAGS ], [win95], [ @@ -707,61 +717,80 @@ fi # --with-pic and --without-pic though. As long as neither --with-pic nor # --without-pic is used then we can use #ifdef PIC to detect if the file is # being built for a shared library. -if test "x$enable_symbol_versions" = xno ; then +AS_IF([test "x$enable_symbol_versions" = xno], [ enable_symbol_versions=no AC_MSG_RESULT([no]) -elif test "x$enable_shared" = xno ; then +], [test "x$enable_shared" = xno], [ enable_symbol_versions=no AC_MSG_RESULT([no (not building a shared library)]) -else - case "$host_cpu-$host_os" in - microblaze*) - # GCC 12 on MicroBlaze doesn't support __symver__ - # attribute. It's simplest and safest to use the - # generic version on that platform since then only - # the linker script is needed. The RHEL/CentOS 7 - # compatibility symbols don't matter on MicroBlaze. - enable_symbol_versions=generic - ;; - *-linux*) - case "$pic_mode-$enable_static" in - default-*) - # Use symvers if PIC is defined. - have_symbol_versions_linux=2 - ;; - *-no) - # Not building static library. - # Use symvers unconditionally. - have_symbol_versions_linux=1 - ;; - *) - AC_MSG_RESULT([]) - AC_MSG_ERROR([ +], [ + # "yes" means that symbol version are to be used but we need to + # autodetect which variant to use. + if test "x$enable_symbol_versions" = xyes ; then + case "$host_cpu-$host_os" in + microblaze*) + # GCC 12 on MicroBlaze doesn't support + # __symver__ attribute. It's simplest and + # safest to use the generic version on that + # platform since then only the linker script + # is needed. The RHEL/CentOS 7 compatibility + # symbols don't matter on MicroBlaze. + enable_symbol_versions=generic + ;; + *-linux*) + # NVIDIA HPC Compiler doesn't support symbol + # versioning but the linker script can still + # be used. + AC_EGREP_CPP([use_generic_symbol_versioning], + [#ifdef __NVCOMPILER + use_generic_symbol_versioning + #endif], + [enable_symbol_versions=generic], + [enable_symbol_versions=linux]) + ;; + *) + enable_symbol_versions=generic + ;; + esac + fi + + if test "x$enable_symbol_versions" = xlinux ; then + case "$pic_mode-$enable_static" in + default-*) + # Use symvers if PIC is defined. + have_symbol_versions_linux=2 + ;; + *-no) + # Not building static library. + # Use symvers unconditionally. + have_symbol_versions_linux=1 + ;; + *) + AC_MSG_RESULT([]) + AC_MSG_ERROR([ On GNU/Linux, building both shared and static library at the same time is not supported if --with-pic or --without-pic is used. Use either --disable-shared or --disable-static to build one type of library at a time. If both types are needed, build one at a time, possibly picking only src/liblzma/.libs/liblzma.a from the static build.]) - ;; - esac - enable_symbol_versions=linux - AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX], - [$have_symbol_versions_linux], - [Define to 1 to if GNU/Linux-specific details - are unconditionally wanted for symbol - versioning. Define to 2 to if these are wanted - only if also PIC is defined (allows building - both shared and static liblzma at the same - time with Libtool if neither --with-pic nor - --without-pic is used). This define must be - used together with liblzma_linux.map.]) - ;; - *) - enable_symbol_versions=generic - ;; - esac + ;; + esac + AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX], + [$have_symbol_versions_linux], + [Define to 1 to if GNU/Linux-specific details + are unconditionally wanted for symbol + versioning. Define to 2 to if these are wanted + only if also PIC is defined (allows building + both shared and static liblzma at the same + time with Libtool if neither --with-pic nor + --without-pic is used). This define must be + used together with liblzma_linux.map.]) + elif test "x$enable_symbol_versions" != xgeneric ; then + AC_MSG_RESULT([]) + AC_MSG_ERROR([unknown symbol versioning variant '$enable_symbol_versions']) + fi AC_MSG_RESULT([yes ($enable_symbol_versions)]) -fi +]) AM_CONDITIONAL([COND_SYMVERS_LINUX], [test "x$enable_symbol_versions" = xlinux]) @@ -790,12 +819,6 @@ AM_GNU_GETTEXT([external]) echo echo "System headers and functions:" -# There is currently no workarounds in this package if some of -# these headers are missing. -AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h], - [], - [AC_MSG_ERROR([Required header file(s) are missing.])]) - # immintrin.h allows the use of the intrinsic functions if they are available. # cpuid.h may be used for detecting x86 processor features at runtime. AC_CHECK_HEADERS([immintrin.h cpuid.h]) @@ -858,7 +881,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ]) CFLAGS="$OLD_CFLAGS" - # The Win95 threading lacks a thread-safe one-time initialization function. # The one-time initialization is needed for crc32_small.c and crc64_small.c # create the CRC tables. So if small mode is enabled, the threading mode is @@ -873,6 +895,7 @@ if test "x$enable_small$enable_threads$have_func_attribute_constructor" \ __attribute__((__constructor__))]) fi + ############################################################################### # Checks for library functions. ############################################################################### @@ -880,6 +903,22 @@ fi # Gnulib replacements as needed gl_GETOPT +# If clock_gettime() is available, liblzma with pthreads may use it, and +# xz may use it even when threading support is disabled. In XZ Utils 5.4.x +# and older, configure checked for clock_gettime() only when using pthreads. +# This way non-threaded builds of liblzma didn't get a useless dependency on +# librt which further had a dependency on libpthread. Avoiding these was +# useful when a small build was needed, for example, for initramfs use. +# +# The above reasoning is thoroughly obsolete: On GNU/Linux, librt hasn't +# been needed for clock_gettime() since glibc 2.17 (2012-12-25). +# Solaris 10 needs librt but Solaris 11 doesn't anymore. +AC_SEARCH_LIBS([clock_gettime], [rt]) +AC_CHECK_FUNCS([clock_gettime]) +AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE([HAVE_CLOCK_MONOTONIC], [1], + [Define to 1 if 'CLOCK_MONOTONIC' is declared in .])], [], + [[#include ]]) + # Find the best function to set timestamps. AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break]) @@ -999,21 +1038,121 @@ __m128i my_clmul(__m128i a) [Define to 1 if _mm_set_epi64x and _mm_clmulepi64_si128 are usable. See configure.ac for details.]) - AC_MSG_RESULT([yes]) + enable_clmul_crc=yes ], [ - AC_MSG_RESULT([no]) + enable_clmul_crc=no + ]) + AC_MSG_RESULT([$enable_clmul_crc]) +]) + +# ARM64 C Language Extensions define CRC32 functions in arm_acle.h. +# These are supported by at least GCC and Clang which both need +# __attribute__((__target__("+crc"))), unless the needed compiler flags +# are used to support the CRC instruction. +AC_MSG_CHECKING([if ARM64 CRC32 instruction is usable]) +AS_IF([test "x$enable_arm64_crc32" = xno], [ + AC_MSG_RESULT([no, --disable-arm64-crc32 was used]) +], [ + # Set -Werror here because some versions of Clang (14 and older) + # do not report the unsupported __attribute__((__target__("+crc"))) + # or __crc32d() as an error, only as a warning. This does not need + # to be done with CMake because tests will attempt to link and the + # error will be reported then. + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include +#include + +#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__) +__attribute__((__target__("+crc"))) +#endif +uint32_t my_crc(uint32_t a, uint64_t b) +{ + return __crc32d(a, b); +} + ]])], [ + AC_DEFINE([HAVE_ARM64_CRC32], [1], + [Define to 1 if ARM64 CRC32 instruction is supported. + See configure.ac for details.]) + enable_arm64_crc32=yes + ], [ + enable_arm64_crc32=no ]) + AC_MSG_RESULT([$enable_arm64_crc32]) + + CFLAGS="$OLD_CFLAGS" +]) + +# Check for ARM64 CRC32 instruction runtime detection. +# getauxval() is supported on Linux, elf_aux_info() on FreeBSD, and +# sysctlbyname("hw.optional.armv8_crc32", ...) is supported on Darwin +# (macOS, iOS, etc.). Note that sysctlbyname() is supported on FreeBSD, +# NetBSD, and possibly others too but the string is specific to Apple OSes. +# The C code is responsible for checking defined(__APPLE__) before using +# sysctlbyname("hw.optional.armv8_crc32", ...). +AS_IF([test "x$enable_arm64_crc32" = xyes], [ + AC_CHECK_FUNCS([getauxval elf_aux_info sysctlbyname], [break]) ]) + # Check for sandbox support. If one is found, set enable_sandbox=found. +# +# About -fsanitize: Of our three sandbox methods, only Landlock is +# incompatible with -fsanitize. FreeBSD 13.2 with Capsicum was tested with +# -fsanitize=address,undefined and had no issues. OpenBSD (as of version +# 7.4) has minimal support for process instrumentation. OpenBSD does not +# distribute the additional libraries needed (libasan, libubsan, etc.) with +# GCC or Clang needed for runtime sanitization support and instead only +# support -fsanitize-minimal-runtime for minimal undefined behavior +# sanitization. This minimal support is compatible with our use of the +# Pledge sandbox. So only Landlock will result in a build that cannot +# compress or decompress a single file to standard out. AS_CASE([$enable_sandbox], [auto | capsicum], [ - AX_CHECK_CAPSICUM([enable_sandbox=found], [:]) + AC_CHECK_FUNCS([cap_rights_limit], [enable_sandbox=found]) ] ) AS_CASE([$enable_sandbox], [auto | pledge], [ - AC_CHECK_FUNCS([pledge], [enable_sandbox=found ; break]) + AC_CHECK_FUNCS([pledge], [enable_sandbox=found]) + ] +) +AS_CASE([$enable_sandbox], + [auto | landlock], [ + AC_MSG_CHECKING([if Linux Landlock is usable]) + + # A compile check is done here because some systems have + # linux/landlock.h, but do not have the syscalls defined + # in order to actually use Linux Landlock. + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + #include + #include + + void my_sandbox(void) + { + (void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); + (void)SYS_landlock_create_ruleset; + (void)SYS_landlock_restrict_self; + (void)LANDLOCK_CREATE_RULESET_VERSION; + return; + } + ]])], [ + enable_sandbox=found + + AS_CASE([$CFLAGS], [*-fsanitize=*], [AC_MSG_ERROR([ + CFLAGS contains '-fsanitize=' which is incompatible with the Landlock + sandboxing. Use --disable-sandbox when using '-fsanitize'.])]) + + AC_DEFINE([HAVE_LINUX_LANDLOCK], [1], + [Define to 1 if Linux Landlock is supported. + See configure.ac for details.]) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) ] ) @@ -1063,7 +1202,6 @@ AS_IF([test "$GCC" = yes], [ -Wall \ -Wextra \ -Wvla \ - -Wc99-c11-compat \ -Wformat=2 \ -Winit-self \ -Wmissing-include-dirs \ diff --git a/debug/Makefile.am b/debug/Makefile.am index 9026fd9..db6f47f 100644 --- a/debug/Makefile.am +++ b/debug/Makefile.am @@ -1,9 +1,5 @@ -## +## SPDX-License-Identifier: 0BSD ## Author: Lasse Collin -## -## This file has been put into the public domain. -## You can do whatever you want with this file. -## EXTRA_DIST = \ translation.bash @@ -15,7 +11,8 @@ noinst_PROGRAMS = \ memusage \ crc32 \ known_sizes \ - hex2bin + hex2bin \ + testfilegen-arm64 AM_CPPFLAGS = \ -I$(top_srcdir)/src/common \ diff --git a/debug/Makefile.in b/debug/Makefile.in index 256be27..58147f4 100644 --- a/debug/Makefile.in +++ b/debug/Makefile.in @@ -90,12 +90,13 @@ build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = repeat$(EXEEXT) sync_flush$(EXEEXT) \ full_flush$(EXEEXT) memusage$(EXEEXT) crc32$(EXEEXT) \ - known_sizes$(EXEEXT) hex2bin$(EXEEXT) + known_sizes$(EXEEXT) hex2bin$(EXEEXT) \ + testfilegen-arm64$(EXEEXT) @COND_GNULIB_TRUE@am__append_1 = $(top_builddir)/lib/libgnu.a subdir = debug ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/getopt.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -159,6 +160,12 @@ sync_flush_OBJECTS = sync_flush.$(OBJEXT) sync_flush_LDADD = $(LDADD) sync_flush_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ $(am__append_1) $(am__DEPENDENCIES_1) +testfilegen_arm64_SOURCES = testfilegen-arm64.c +testfilegen_arm64_OBJECTS = testfilegen-arm64.$(OBJEXT) +testfilegen_arm64_LDADD = $(LDADD) +testfilegen_arm64_DEPENDENCIES = \ + $(top_builddir)/src/liblzma/liblzma.la $(am__append_1) \ + $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -177,7 +184,7 @@ am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/crc32.Po ./$(DEPDIR)/full_flush.Po \ ./$(DEPDIR)/hex2bin.Po ./$(DEPDIR)/known_sizes.Po \ ./$(DEPDIR)/memusage.Po ./$(DEPDIR)/repeat.Po \ - ./$(DEPDIR)/sync_flush.Po + ./$(DEPDIR)/sync_flush.Po ./$(DEPDIR)/testfilegen-arm64.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -198,9 +205,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \ - repeat.c sync_flush.c + repeat.c sync_flush.c testfilegen-arm64.c DIST_SOURCES = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \ - repeat.c sync_flush.c + repeat.c sync_flush.c testfilegen-arm64.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -236,7 +243,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CAPSICUM_LIB = @CAPSICUM_LIB@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ @@ -365,6 +371,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ @@ -463,6 +471,10 @@ sync_flush$(EXEEXT): $(sync_flush_OBJECTS) $(sync_flush_DEPENDENCIES) $(EXTRA_sy @rm -f sync_flush$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sync_flush_OBJECTS) $(sync_flush_LDADD) $(LIBS) +testfilegen-arm64$(EXEEXT): $(testfilegen_arm64_OBJECTS) $(testfilegen_arm64_DEPENDENCIES) $(EXTRA_testfilegen_arm64_DEPENDENCIES) + @rm -f testfilegen-arm64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(testfilegen_arm64_OBJECTS) $(testfilegen_arm64_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -476,6 +488,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memusage.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repeat.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_flush.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testfilegen-arm64.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -641,6 +654,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/memusage.Po -rm -f ./$(DEPDIR)/repeat.Po -rm -f ./$(DEPDIR)/sync_flush.Po + -rm -f ./$(DEPDIR)/testfilegen-arm64.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -693,6 +707,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/memusage.Po -rm -f ./$(DEPDIR)/repeat.Po -rm -f ./$(DEPDIR)/sync_flush.Po + -rm -f ./$(DEPDIR)/testfilegen-arm64.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/debug/crc32.c b/debug/crc32.c index e545a3c..eed4793 100644 --- a/debug/crc32.c +++ b/debug/crc32.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file crc32.c @@ -5,9 +7,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/full_flush.c b/debug/full_flush.c index 227f737..79c8f15 100644 --- a/debug/full_flush.c +++ b/debug/full_flush.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file full_flush.c @@ -5,9 +7,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/hex2bin.c b/debug/hex2bin.c index 7324624..4536843 100644 --- a/debug/hex2bin.c +++ b/debug/hex2bin.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file hex2bin.c @@ -5,9 +7,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/known_sizes.c b/debug/known_sizes.c index 6c3641f..3f5aada 100644 --- a/debug/known_sizes.c +++ b/debug/known_sizes.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file known_sizes.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/memusage.c b/debug/memusage.c index bd72b5a..b592895 100644 --- a/debug/memusage.c +++ b/debug/memusage.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file memusage.c @@ -5,9 +7,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/repeat.c b/debug/repeat.c index a00bde2..4830b13 100644 --- a/debug/repeat.c +++ b/debug/repeat.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file repeat.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/sync_flush.c b/debug/sync_flush.c index 2292333..5ce2e57 100644 --- a/debug/sync_flush.c +++ b/debug/sync_flush.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file sync_flush.c @@ -5,9 +7,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" diff --git a/debug/testfilegen-arm64.c b/debug/testfilegen-arm64.c new file mode 100644 index 0000000..88cadca --- /dev/null +++ b/debug/testfilegen-arm64.c @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file testfilegen-arm64.c +/// \brief Generates uncompressed test file for the ARM64 filter +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + + +static uint32_t pc4 = 0; + + +static void +put32le(uint32_t v) +{ + putchar((v >> 0) & 0xFF); + putchar((v >> 8) & 0xFF); + putchar((v >> 16) & 0xFF); + putchar((v >> 24) & 0xFF); + ++pc4; +} + + +static void +putbl(uint32_t imm) +{ + imm &= (1U << 26) - 1; + imm |= 0x25U << 26; + put32le(imm); +} + + +static void +putadrp32(uint32_t imm) +{ + imm &= 0x1FFFFFU; + + // fprintf(stderr, "ADRP 0x%08X\n", imm); + + uint32_t instr = 0x90000000; + instr |= (pc4 * 5 + 11) & 0x1F; + instr |= (imm & 3) << 29; + instr |= (imm >> 2) << 5; + + put32le(instr); +} + + +extern int +main(void) +{ + putbl(0); + putbl(0x03FFFFFF); + putbl(0x03FFFFFE); + putbl(0x03FFFFFD); + + putbl(3); + putbl(2); + putbl(1); + putbl(0); + + + putbl(0x02000001); + putbl(0x02000000); + putbl(0x01FFFFFF); + putbl(0x01FFFFFE); + + putbl(0x01111117); + putbl(0x01111116); + putbl(0x01111115); + putbl(0x01111114); + + + putbl(0x02222227); + putbl(0x02222226); + putbl(0x02222225); + putbl(0x02222224); + + putbl(0U - pc4); + putbl(0U - pc4); + putbl(0U - pc4); + putbl(0U - pc4); + + putadrp32(0x00); + putadrp32(0x05); + putadrp32(0x15); + putadrp32(0x25); + + for (unsigned rep = 0; rep < 2; ++rep) { + while ((pc4 << 2) & 4095) + put32le(0x55555555U); + + for (unsigned i = 10; i <= 21; ++i) { + const uint32_t neg = (0x1FFF00 >> (21 - i)) & ~255U; + const uint32_t plus = 1U << (i - 1); + putadrp32(0x000000 | plus); + putadrp32(0x000005 | plus); + putadrp32(0x0000FE | plus); + putadrp32(0x0000FF | plus); + + putadrp32(0x000000 | neg); + putadrp32(0x000005 | neg); + putadrp32(0x0000FE | neg); + putadrp32(0x0000FF | neg); + } + } + + return 0; +} diff --git a/debug/translation.bash b/debug/translation.bash index df4210d..77a4c78 100644 --- a/debug/translation.bash +++ b/debug/translation.bash @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: 0BSD ############################################################################### # @@ -20,9 +21,6 @@ # # Author: Lasse Collin # -# This file has been put into the public domain. -# You can do whatever you want with this file. -# ############################################################################### set -e @@ -80,7 +78,6 @@ for CMD in \ "xz --lzma2=foobarbaz=abcd" \ "xz --lzma2=mf=abcd" \ "xz --lzma2=preset=foobarbaz" \ - "xz --lzma2=mf=bt4,nice=2" \ "xz --lzma2=nice=50000" \ "xz --help" \ "xz --long-help" \ diff --git a/doc/api/annotated.html b/doc/api/annotated.html deleted file mode 100644 index 4016c49..0000000 --- a/doc/api/annotated.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Data Structures - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
-
Data Structures
-
-
-
Here are the data structures with brief descriptions:
- - - - - - - - - - - -
 Clzma_allocatorCustom functions for memory handling
 Clzma_blockOptions for the Block and Block Header encoders and decoders
 Clzma_filterFilter options
 Clzma_index_iterIterator to get information about Blocks and Streams
 Clzma_mtMultithreading options
 Clzma_options_bcjOptions for BCJ filters
 Clzma_options_deltaOptions for the Delta filter
 Clzma_options_lzmaOptions specific to the LZMA1 and LZMA2 filters
 Clzma_streamPassing data to and from liblzma
 Clzma_stream_flagsOptions for encoding/decoding Stream Header and Stream Footer
-
-
- - - - diff --git a/doc/api/base_8h.html b/doc/api/base_8h.html deleted file mode 100644 index 417ccef..0000000 --- a/doc/api/base_8h.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/base.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
base.h File Reference
-
-
- -

Data types and functions used in many places in liblzma API. -More...

- - - - - - - - -

-Data Structures

struct  lzma_allocator
 Custom functions for memory handling. More...
 
struct  lzma_stream
 Passing data to and from liblzma. More...
 
- - - - -

-Macros

#define LZMA_STREAM_INIT
 Initialization for lzma_stream.
 
- - - - - - - -

-Typedefs

typedef unsigned char lzma_bool
 Boolean.
 
typedef struct lzma_internal_s lzma_internal
 Internal data structure.
 
- - - - - - - - - - -

-Enumerations

enum  lzma_reserved_enum { LZMA_RESERVED_ENUM = 0 - }
 Type of reserved enumeration variable in structures. More...
 
enum  lzma_ret {
-  LZMA_OK = 0 -, LZMA_STREAM_END = 1 -, LZMA_NO_CHECK = 2 -, LZMA_UNSUPPORTED_CHECK = 3 -,
-  LZMA_GET_CHECK = 4 -, LZMA_MEM_ERROR = 5 -, LZMA_MEMLIMIT_ERROR = 6 -, LZMA_FORMAT_ERROR = 7 -,
-  LZMA_OPTIONS_ERROR = 8 -, LZMA_DATA_ERROR = 9 -, LZMA_BUF_ERROR = 10 -, LZMA_PROG_ERROR = 11 -,
-  LZMA_SEEK_NEEDED = 12 -, LZMA_RET_INTERNAL1 = 101 -, LZMA_RET_INTERNAL2 = 102 -, LZMA_RET_INTERNAL3 = 103 -,
-  LZMA_RET_INTERNAL4 = 104 -, LZMA_RET_INTERNAL5 = 105 -, LZMA_RET_INTERNAL6 = 106 -, LZMA_RET_INTERNAL7 = 107 -,
-  LZMA_RET_INTERNAL8 = 108 -
- }
 Return values used by several functions in liblzma. More...
 
enum  lzma_action {
-  LZMA_RUN = 0 -, LZMA_SYNC_FLUSH = 1 -, LZMA_FULL_FLUSH = 2 -, LZMA_FULL_BARRIER = 4 -,
-  LZMA_FINISH = 3 -
- }
 The `action' argument for lzma_code() More...
 
- - - - - - - - - - - - - - - - - - - -

-Functions

lzma_ret lzma_code (lzma_stream *strm, lzma_action action) lzma_nothrow lzma_attr_warn_unused_result
 Encode or decode data.
 
void lzma_end (lzma_stream *strm) lzma_nothrow
 Free memory allocated for the coder data structures.
 
void lzma_get_progress (lzma_stream *strm, uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow
 Get progress information.
 
uint64_t lzma_memusage (const lzma_stream *strm) lzma_nothrow lzma_attr_pure
 Get the memory usage of decoder filter chain.
 
uint64_t lzma_memlimit_get (const lzma_stream *strm) lzma_nothrow lzma_attr_pure
 Get the current memory usage limit.
 
lzma_ret lzma_memlimit_set (lzma_stream *strm, uint64_t memlimit) lzma_nothrow
 Set the memory usage limit.
 
-

Detailed Description

-

Data types and functions used in many places in liblzma API.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_STREAM_INIT

- -
-
- - - - -
#define LZMA_STREAM_INIT
-
-Value:
{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
-
NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
-
LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
-
-

Initialization for lzma_stream.

-

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:

-

lzma_stream strm = LZMA_STREAM_INIT;

-

If you need to initialize a dynamically allocated lzma_stream, you can use memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this violates the C standard since NULL may have different internal representation than zero, but it should be portable enough in practice. Anyway, for maximum portability, you can use something like this:

-

lzma_stream tmp = LZMA_STREAM_INIT; *strm = tmp;

- -
-
-

Typedef Documentation

- -

◆ lzma_bool

- -
-
- - - - -
typedef unsigned char lzma_bool
-
- -

Boolean.

-

This is here because C89 doesn't have stdbool.h. To set a value for variables having type lzma_bool, you can use

    -
  • C99's `true' and `false' from stdbool.h;
  • -
  • C++'s internal `true' and `false'; or
  • -
  • integers one (true) and zero (false).
  • -
- -
-
- -

◆ lzma_internal

- -
-
- - - - -
typedef struct lzma_internal_s lzma_internal
-
- -

Internal data structure.

-

The contents of this structure is not visible outside the library.

- -
-
-

Enumeration Type Documentation

- -

◆ lzma_reserved_enum

- -
-
- - - - -
enum lzma_reserved_enum
-
- -

Type of reserved enumeration variable in structures.

-

To avoid breaking library ABI when new features are added, several structures contain extra variables that may be used in future. Since sizeof(enum) can be different than sizeof(int), and sizeof(enum) may even vary depending on the range of enumeration constants, we specify a separate type to be used for reserved enumeration variables. All enumeration constants in liblzma API will be non-negative and less than 128, which should guarantee that the ABI won't break even when new constants are added to existing enumerations.

- -
-
- -

◆ lzma_ret

- -
-
- - - - -
enum lzma_ret
-
- -

Return values used by several functions in liblzma.

-

Check the descriptions of specific functions to find out which return values they can return. With some functions the return values may have more specific meanings than described here; those differences are described per-function basis.

- - - - - - - - - - - - - - -
Enumerator
LZMA_OK 

Operation completed successfully.

-
LZMA_STREAM_END 

End of stream was reached.

-

In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH was finished. In decoder, this indicates that all the data was successfully decoded.

-

In all cases, when LZMA_STREAM_END is returned, the last output bytes should be picked from strm->next_out.

-
LZMA_NO_CHECK 

Input stream has no integrity check.

-

This return value can be returned only if the LZMA_TELL_NO_CHECK flag was used when initializing the decoder. LZMA_NO_CHECK is just a warning, and the decoding can be continued normally.

-

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.

-
LZMA_UNSUPPORTED_CHECK 

Cannot calculate the integrity check.

-

The usage of this return value is different in encoders and decoders.

-

Encoders can return this value only from the initialization function. If initialization fails with this value, the encoding cannot be done, because there's no way to produce output with the correct integrity check.

-

Decoders can return this value only from lzma_code() and only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when initializing the decoder. The decoding can still be continued normally even if the check type is unsupported, but naturally the check will not be validated, and possible errors may go undetected.

-

With decoder, it is possible to call lzma_get_check() immediately after lzma_code() has returned LZMA_UNSUPPORTED_CHECK. This way it is possible to find out what the unsupported Check ID was.

-
LZMA_GET_CHECK 

Integrity check type is now available.

-

This value can be returned only by the lzma_code() function and only if the decoder was initialized with the LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the application that it may now call lzma_get_check() to find out the Check ID. This can be used, for example, to implement a decoder that accepts only files that have strong enough integrity check.

-
LZMA_MEM_ERROR 

Cannot allocate memory.

-

Memory allocation failed, or the size of the allocation would be greater than SIZE_MAX.

-

Due to internal implementation reasons, the coding cannot be continued even if more memory were made available after LZMA_MEM_ERROR.

-
LZMA_MEMLIMIT_ERROR 

Memory usage limit was reached.

-

Decoder would need more memory than allowed by the specified memory usage limit. To continue decoding, the memory usage limit has to be increased with lzma_memlimit_set().

-

liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder (lzma_stream_decoder()) which made it impossible to continue decoding after LZMA_MEMLIMIT_ERROR even if the limit was increased using lzma_memlimit_set(). Other decoders worked correctly.

-
LZMA_FORMAT_ERROR 

File format not recognized.

-

The decoder did not recognize the input as supported file format. This error can occur, for example, when trying to decode .lzma format file with lzma_stream_decoder, because lzma_stream_decoder accepts only the .xz format.

-
LZMA_OPTIONS_ERROR 

Invalid or unsupported options.

-

Invalid or unsupported options, for example

    -
  • unsupported filter(s) or filter options; or
  • -
  • reserved bits set in headers (decoder only).
  • -
-

Rebuilding liblzma with more features enabled, or upgrading to a newer version of liblzma may help.

-
LZMA_DATA_ERROR 

Data is corrupt.

-

The usage of this return value is different in encoders and decoders. In both encoder and decoder, the coding cannot continue after this error.

-

Encoders return this if size limits of the target file format would be exceeded. These limits are huge, thus getting this error from an encoder is mostly theoretical. For example, the maximum compressed and uncompressed size of a .xz Stream is roughly 8 EiB (2^63 bytes).

-

Decoders return this error if the input data is corrupt. This can mean, for example, invalid CRC32 in headers or invalid check of uncompressed data.

-
LZMA_BUF_ERROR 

No progress is possible.

-

This error code is returned when the coder cannot consume any new input and produce any new output. The most common reason for this error is that the input stream being decoded is truncated or corrupt.

-

This error is not fatal. Coding can be continued normally by providing more input and/or more output space, if possible.

-

Typically the first call to lzma_code() that can do no progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only the second consecutive call doing no progress will return LZMA_BUF_ERROR. This is intentional.

-

With zlib, Z_BUF_ERROR may be returned even if the application is doing nothing wrong, so apps will need to handle Z_BUF_ERROR specially. The above hack guarantees that liblzma never returns LZMA_BUF_ERROR to properly written applications unless the input file is truncated or corrupt. This should simplify the applications a little.

-
LZMA_PROG_ERROR 

Programming error.

-

This indicates that the arguments given to the function are invalid or the internal state of the decoder is corrupt.

    -
  • Function arguments are invalid or the structures pointed by the argument pointers are invalid e.g. if strm->next_out has been set to NULL and strm->avail_out > 0 when calling lzma_code().
  • -
  • lzma_* functions have been called in wrong order e.g. lzma_code() was called right after lzma_end().
  • -
  • If errors occur randomly, the reason might be flaky hardware.
  • -
-

If you think that your code is correct, this error code can be a sign of a bug in liblzma. See the documentation how to report bugs.

-
LZMA_SEEK_NEEDED 

Request to change the input file position.

-

Some coders can do random access in the input file. The initialization functions of these coders take the file size as an argument. No other coders can return LZMA_SEEK_NEEDED.

-

When this value is returned, the application must seek to the file position given in lzma_stream.seek_pos. This value is guaranteed to never exceed the file size that was specified at the coder initialization.

-

After seeking the application should read new input and pass it normally via lzma_stream.next_in and .avail_in.

-
- -
-
- -

◆ lzma_action

- -
-
- - - - -
enum lzma_action
-
- -

The `action' argument for lzma_code()

-

After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, or LZMA_FINISH, the same `action' must be used until lzma_code() returns LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must not be modified by the application until lzma_code() returns LZMA_STREAM_END. Changing the `action' or modifying the amount of input will make lzma_code() return LZMA_PROG_ERROR.

- - - - - - -
Enumerator
LZMA_RUN 

Continue coding.

-

Encoder: Encode as much input as possible. Some internal buffering will probably be done (depends on the filter chain in use), which causes latency: the input used won't usually be decodeable from the output of the same lzma_code() call.

-

Decoder: Decode as much input as possible and produce as much output as possible.

-
LZMA_SYNC_FLUSH 

Make all the input available at output.

-

Normally the encoder introduces some latency. LZMA_SYNC_FLUSH forces all the buffered data to be available at output without resetting the internal state of the encoder. This way it is possible to use compressed stream for example for communication over network.

-

Only some filters support LZMA_SYNC_FLUSH. Trying to use LZMA_SYNC_FLUSH with filters that don't support it will make lzma_code() return LZMA_OPTIONS_ERROR. For example, LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.

-

Using LZMA_SYNC_FLUSH very often can dramatically reduce the compression ratio. With some filters (for example, LZMA2), fine-tuning the compression options may help mitigate this problem significantly (for example, match finder with LZMA2).

-

Decoders don't support LZMA_SYNC_FLUSH.

-
LZMA_FULL_FLUSH 

Finish encoding of the current Block.

-

All the input data going to the current Block must have been given to the encoder (the last bytes can still be pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH until it returns LZMA_STREAM_END. Then continue normally with LZMA_RUN or finish the Stream with LZMA_FINISH.

-

This action is currently supported only by Stream encoder and easy encoder (which uses Stream encoder). If there is no unfinished Block, no empty Block is created.

-
LZMA_FULL_BARRIER 

Finish encoding of the current Block.

-

This is like LZMA_FULL_FLUSH except that this doesn't necessarily wait until all the input has been made available via the output buffer. That is, lzma_code() might return LZMA_STREAM_END as soon as all the input has been consumed (avail_in == 0).

-

LZMA_FULL_BARRIER is useful with a threaded encoder if one wants to split the .xz Stream into Blocks at specific offsets but doesn't care if the output isn't flushed immediately. Using LZMA_FULL_BARRIER allows keeping the threads busy while LZMA_FULL_FLUSH would make lzma_code() wait until all the threads have finished until more data could be passed to the encoder.

-

With a lzma_stream initialized with the single-threaded lzma_stream_encoder() or lzma_easy_encoder(), LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.

-
LZMA_FINISH 

Finish the coding operation.

-

All the input data must have been given to the encoder (the last bytes can still be pending in next_in). Call lzma_code() with LZMA_FINISH until it returns LZMA_STREAM_END. Once LZMA_FINISH has been used, the amount of input must no longer be changed by the application.

-

When decoding, using LZMA_FINISH is optional unless the LZMA_CONCATENATED flag was used when the decoder was initialized. When LZMA_CONCATENATED was not used, the only effect of LZMA_FINISH is that the amount of input must not be changed just like in the encoder.

-
- -
-
-

Function Documentation

- -

◆ lzma_code()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_code (lzma_streamstrm,
lzma_action action 
)
-
- -

Encode or decode data.

-

Once the lzma_stream has been successfully initialized (e.g. with lzma_stream_encoder()), the actual encoding or decoding is done using this function. The application has to update strm->next_in, strm->avail_in, strm->next_out, and strm->avail_out to pass input to and get output from liblzma.

-

See the description of the coder-specific initialization function to find out what `action' values are supported by the coder.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
actionAction for this function to take. Must be a valid lzma_action enum value.
-
-
-
Returns
Any valid lzma_ret. See the lzma_ret enum description for more information.
- -
-
- -

◆ lzma_end()

- -
-
- - - - - - - - -
void lzma_end (lzma_streamstrm)
-
- -

Free memory allocated for the coder data structures.

-

After lzma_end(strm), strm->internal is guaranteed to be NULL. No other members of the lzma_stream structure are touched.

-
Note
zlib indicates an error if application end()s unfinished stream structure. liblzma doesn't do this, and assumes that application knows what it is doing.
-
Parameters
- - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
-
-
- -
-
- -

◆ lzma_get_progress()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void lzma_get_progress (lzma_streamstrm,
uint64_t * progress_in,
uint64_t * progress_out 
)
-
- -

Get progress information.

-

In single-threaded mode, applications can get progress information from strm->total_in and strm->total_out. In multi-threaded mode this is less useful because a significant amount of both input and output data gets buffered internally by liblzma. This makes total_in and total_out give misleading information and also makes the progress indicator updates non-smooth.

-

This function gives realistic progress information also in multi-threaded mode by taking into account the progress made by each thread. In single-threaded mode *progress_in and *progress_out are set to strm->total_in and strm->total_out, respectively.

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
[out]progress_inPointer to the number of input bytes processed.
[out]progress_outPointer to the number of output bytes processed.
-
-
- -
-
- -

◆ lzma_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_memusage (const lzma_streamstrm)
-
- -

Get the memory usage of decoder filter chain.

-

This function is currently supported only when *strm has been initialized with a function that takes a memlimit argument. With other functions, you should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage() to estimate the memory requirements.

-

This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big the memory usage limit should have been to decode the input. Note that this may give misleading information if decoding .xz Streams that have multiple Blocks, because each Block can have different memory requirements.

-
Parameters
- - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
-
-
-
Returns
How much memory is currently allocated for the filter decoders. If no filter chain is currently allocated, some non-zero value is still returned, which is less than or equal to what any filter chain would indicate as its memory requirement.
-

If this function isn't supported by *strm or some other error occurs, zero is returned.

- -
-
- -

◆ lzma_memlimit_get()

- -
-
- - - - - - - - -
uint64_t lzma_memlimit_get (const lzma_streamstrm)
-
- -

Get the current memory usage limit.

-

This function is supported only when *strm has been initialized with a function that takes a memlimit argument.

-
Parameters
- - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
-
-
-
Returns
On success, the current memory usage limit is returned (always non-zero). On error, zero is returned.
- -
-
- -

◆ lzma_memlimit_set()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_memlimit_set (lzma_streamstrm,
uint64_t memlimit 
)
-
- -

Set the memory usage limit.

-

This function is supported only when *strm has been initialized with a function that takes a memlimit argument.

-

liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes this function to do nothing (leaving the limit unchanged) and still return LZMA_OK. Later versions treat 0 as if 1 had been specified (so lzma_memlimit_get() will return 1 even if you specify 0 here).

-

liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder (lzma_stream_decoder()) which made it impossible to continue decoding after LZMA_MEMLIMIT_ERROR even if the limit was increased using lzma_memlimit_set(). Other decoders worked correctly.

-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: New memory usage limit successfully set.
  • -
  • LZMA_MEMLIMIT_ERROR: The new limit is too small. The limit was not changed.
  • -
  • LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't support memory usage limit.
  • -
-
- -
-
-
- - - - diff --git a/doc/api/bc_s.png b/doc/api/bc_s.png deleted file mode 100644 index bb50b82..0000000 Binary files a/doc/api/bc_s.png and /dev/null differ diff --git a/doc/api/bc_sd.png b/doc/api/bc_sd.png deleted file mode 100644 index 8d8be4c..0000000 Binary files a/doc/api/bc_sd.png and /dev/null differ diff --git a/doc/api/bcj_8h.html b/doc/api/bcj_8h.html deleted file mode 100644 index 1dabca4..0000000 --- a/doc/api/bcj_8h.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/bcj.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
bcj.h File Reference
-
-
- -

Branch/Call/Jump conversion filters. -More...

- - - - - -

-Data Structures

struct  lzma_options_bcj
 Options for BCJ filters. More...
 
- - - - - - - - - - - - - - - - - - - - - - -

-Macros

-#define LZMA_FILTER_X86   LZMA_VLI_C(0x04)
 Filter for x86 binaries.
 
-#define LZMA_FILTER_POWERPC   LZMA_VLI_C(0x05)
 Filter for Big endian PowerPC binaries.
 
-#define LZMA_FILTER_IA64   LZMA_VLI_C(0x06)
 Filter for IA-64 (Itanium) binaries.
 
-#define LZMA_FILTER_ARM   LZMA_VLI_C(0x07)
 Filter for ARM binaries.
 
-#define LZMA_FILTER_ARMTHUMB   LZMA_VLI_C(0x08)
 Filter for ARM-Thumb binaries.
 
-#define LZMA_FILTER_SPARC   LZMA_VLI_C(0x09)
 Filter for SPARC binaries.
 
-#define LZMA_FILTER_ARM64   LZMA_VLI_C(0x0A)
 Filter for ARM64 binaries.
 
-

Detailed Description

-

Branch/Call/Jump conversion filters.

-
Note
Never include this file directly. Use <lzma.h> instead.
-
- - - - diff --git a/doc/api/block_8h.html b/doc/api/block_8h.html deleted file mode 100644 index e2e1702..0000000 --- a/doc/api/block_8h.html +++ /dev/null @@ -1,758 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/block.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
block.h File Reference
-
-
- -

.xz Block handling -More...

- - - - - -

-Data Structures

struct  lzma_block
 Options for the Block and Block Header encoders and decoders. More...
 
- - - - - - - - -

-Macros

-#define LZMA_BLOCK_HEADER_SIZE_MIN   8
 
-#define LZMA_BLOCK_HEADER_SIZE_MAX   1024
 
#define lzma_block_header_size_decode(b)   (((uint32_t)(b) + 1) * 4)
 Decode the Block Header Size field.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

lzma_ret lzma_block_header_size (lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
 Calculate Block Header Size.
 
lzma_ret lzma_block_header_encode (const lzma_block *block, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
 Encode Block Header.
 
lzma_ret lzma_block_header_decode (lzma_block *block, const lzma_allocator *allocator, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
 Decode Block Header.
 
lzma_ret lzma_block_compressed_size (lzma_block *block, lzma_vli unpadded_size) lzma_nothrow lzma_attr_warn_unused_result
 Validate and set Compressed Size according to Unpadded Size.
 
lzma_vli lzma_block_unpadded_size (const lzma_block *block) lzma_nothrow lzma_attr_pure
 Calculate Unpadded Size.
 
lzma_vli lzma_block_total_size (const lzma_block *block) lzma_nothrow lzma_attr_pure
 Calculate the total encoded size of a Block.
 
lzma_ret lzma_block_encoder (lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Block encoder.
 
lzma_ret lzma_block_decoder (lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Block decoder.
 
size_t lzma_block_buffer_bound (size_t uncompressed_size) lzma_nothrow
 Calculate maximum output size for single-call Block encoding.
 
lzma_ret lzma_block_buffer_encode (lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
 Single-call .xz Block encoder.
 
lzma_ret lzma_block_uncomp_encode (lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
 Single-call uncompressed .xz Block encoder.
 
lzma_ret lzma_block_buffer_decode (lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
 Single-call .xz Block decoder.
 
-

Detailed Description

-

.xz Block handling

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ lzma_block_header_size_decode

- -
-
- - - - - - - - -
#define lzma_block_header_size_decode( b)   (((uint32_t)(b) + 1) * 4)
-
- -

Decode the Block Header Size field.

-

To decode Block Header using lzma_block_header_decode(), the size of the Block Header has to be known and stored into lzma_block.header_size. The size can be calculated from the first byte of a Block using this macro. Note that if the first byte is 0x00, it indicates beginning of Index; use this macro only when the byte is not 0x00.

-

There is no encoding macro because lzma_block_header_size() and lzma_block_header_encode() should be used.

- -
-
-

Function Documentation

- -

◆ lzma_block_header_size()

- -
-
- - - - - - - - -
lzma_ret lzma_block_header_size (lzma_blockblock)
-
- -

Calculate Block Header Size.

-

Calculate the minimum size needed for the Block Header field using the settings specified in the lzma_block structure. Note that it is OK to increase the calculated header_size value as long as it is a multiple of four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size just means that lzma_block_header_encode() will add Header Padding.

-
Note
This doesn't check that all the options are valid i.e. this may return LZMA_OK even if lzma_block_header_encode() or lzma_block_encoder() would fail. If you want to validate the filter chain, consider using lzma_memlimit_encoder() which as a side-effect validates the filter chain.
-
Parameters
- - -
blockBlock options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Size calculated successfully and stored to block->header_size.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported version, filters or filter options.
  • -
  • LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
  • -
-
- -
-
- -

◆ lzma_block_header_encode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_header_encode (const lzma_blockblock,
uint8_t * out 
)
-
- -

Encode Block Header.

-

The caller must have calculated the size of the Block Header already with lzma_block_header_size(). If a value larger than the one calculated by lzma_block_header_size() is used, the Block Header will be padded to the specified size.

-
Parameters
- - - -
blockBlock options to be encoded.
[out]outBeginning of the output buffer. This must be at least block->header_size bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful. block->header_size bytes were written to output buffer.
  • -
  • LZMA_OPTIONS_ERROR: Invalid or unsupported options.
  • -
  • LZMA_PROG_ERROR: Invalid arguments, for example block->header_size is invalid or block->filters is NULL.
  • -
-
- -
-
- -

◆ lzma_block_header_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_header_decode (lzma_blockblock,
const lzma_allocatorallocator,
const uint8_t * in 
)
-
- -

Decode Block Header.

-

block->version should (usually) be set to the highest value supported by the application. If the application sets block->version to a value higher than supported by the current liblzma version, this function will downgrade block->version to the highest value supported by it. Thus one should check the value of block->version after calling this function if block->version was set to a non-zero value and the application doesn't otherwise know that the liblzma version being used is new enough to support the specified block->version.

-

The size of the Block Header must have already been decoded with lzma_block_header_size_decode() macro and stored to block->header_size.

-

The integrity check type from Stream Header must have been stored to block->check.

-

block->filters must have been allocated, but they don't need to be initialized (possible existing filter options are not freed).

-
Parameters
- - - - -
[out]blockDestination for Block options
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() (and also free() if an error occurs).
inBeginning of the input buffer. This must be at least block->header_size bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • 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. 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 block->header_size is invalid or block->filters is NULL.
  • -
-
- -
-
- -

◆ lzma_block_compressed_size()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_compressed_size (lzma_blockblock,
lzma_vli unpadded_size 
)
-
- -

Validate and set Compressed Size according to Unpadded Size.

-

Block Header stores Compressed Size, but Index has Unpadded Size. If the application has already parsed the Index and is now decoding Blocks, it can calculate Compressed Size from Unpadded Size. This function does exactly that with error checking:

-
    -
  • Compressed Size calculated from Unpadded Size must be positive integer, that is, Unpadded Size must be big enough that after Block Header and Check fields there's still at least one byte for Compressed Size.
  • -
  • If Compressed Size was present in Block Header, the new value calculated from Unpadded Size is compared against the value from Block Header.
  • -
-
Note
This function must be called _after_ decoding the Block Header field so that it can properly validate Compressed Size if it was present in Block Header.
-
Parameters
- - - -
blockBlock options: block->header_size must already be set with lzma_block_header_size().
unpadded_sizeUnpadded Size from the Index field in bytes
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: block->compressed_size was set successfully.
  • -
  • LZMA_DATA_ERROR: unpadded_size is too small compared to block->header_size and lzma_check_size(block->check).
  • -
  • LZMA_PROG_ERROR: Some values are invalid. For example, block->header_size must be a multiple of four and between 8 and 1024 inclusive.
  • -
-
- -
-
- -

◆ lzma_block_unpadded_size()

- -
-
- - - - - - - - -
lzma_vli lzma_block_unpadded_size (const lzma_blockblock)
-
- -

Calculate Unpadded Size.

-

The Index field stores Unpadded Size and Uncompressed Size. The latter can be taken directly from the lzma_block structure after coding a Block, but Unpadded Size needs to be calculated from Block Header Size, Compressed Size, and size of the Check field. This is where this function is needed.

-
Parameters
- - -
blockBlock options: block->header_size must already be set with lzma_block_header_size().
-
-
-
Returns
Unpadded Size on success, or zero on error.
- -
-
- -

◆ lzma_block_total_size()

- -
-
- - - - - - - - -
lzma_vli lzma_block_total_size (const lzma_blockblock)
-
- -

Calculate the total encoded size of a Block.

-

This is equivalent to lzma_block_unpadded_size() except that the returned value includes the size of the Block Padding field.

-
Parameters
- - -
blockBlock options: block->header_size must already be set with lzma_block_header_size().
-
-
-
Returns
On success, total encoded size of the Block. On error, zero is returned.
- -
-
- -

◆ lzma_block_encoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_encoder (lzma_streamstrm,
lzma_blockblock 
)
-
- -

Initialize .xz Block encoder.

-

Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the filter chain supports it), and LZMA_FINISH.

-

The Block encoder encodes the Block Data, Block Padding, and Check value. It does NOT encode the Block Header which can be encoded with lzma_block_header_encode().

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
blockBlock options: block->version, block->check, and block->filters must have been initialized.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: All good, continue with lzma_code().
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID that is not supported by this build of liblzma. Initializing the encoder failed.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_block_decoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_decoder (lzma_streamstrm,
lzma_blockblock 
)
-
- -

Initialize .xz Block decoder.

-

Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using LZMA_FINISH is not required. It is supported only for convenience.

-

The Block decoder decodes the Block Data, Block Padding, and Check value. It does NOT decode the Block Header which can be decoded with lzma_block_header_decode().

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
blockBlock options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: All good, continue with lzma_code().
  • -
  • LZMA_PROG_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
-
- -
-
- -

◆ lzma_block_buffer_bound()

- -
-
- - - - - - - - -
size_t lzma_block_buffer_bound (size_t uncompressed_size)
-
- -

Calculate maximum output size for single-call Block encoding.

-

This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks. See the documentation of lzma_stream_buffer_bound().

-
Parameters
- - -
uncompressed_sizeSize of the data to be encoded with the single-call Block encoder.
-
-
-
Returns
Maximum output size in bytes for single-call Block encoding.
- -
-
- -

◆ lzma_block_buffer_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_buffer_encode (lzma_blockblock,
const lzma_allocatorallocator,
const uint8_t * in,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Block encoder.

-

In contrast to the multi-call encoder initialized with lzma_block_encoder(), this function encodes also the Block Header. This is required to make it possible to write appropriate Block Header also in case the data isn't compressible, and different filter chain has to be used to encode the data in uncompressed form using uncompressed chunks of the LZMA2 filter.

-

When the data isn't compressible, header_size, compressed_size, and uncompressed_size are set just like when the data was compressible, but it is possible that header_size is too small to hold the filter chain specified in block->filters, because that isn't necessarily the filter chain that was actually used to encode the data. lzma_block_unpadded_size() still works normally, because it doesn't read the filters array.

-
Parameters
- - - - - - - - -
blockBlock options: block->version, block->check, and block->filters must have been initialized.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_sizeSize of the input buffer
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_block_uncomp_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_uncomp_encode (lzma_blockblock,
const uint8_t * in,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call uncompressed .xz Block encoder.

-

This is like lzma_block_buffer_encode() except this doesn't try to compress the data and instead encodes the data using LZMA2 uncompressed chunks. The required output buffer size can be determined with lzma_block_buffer_bound().

-

Since the data won't be compressed, this function ignores block->filters. This function doesn't take lzma_allocator because this function doesn't allocate any memory from the heap.

-
Parameters
- - - - - - - -
blockBlock options: block->version, block->check, and block->filters must have been initialized.
inBeginning of the input buffer
in_sizeSize of the input buffer
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_block_buffer_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_block_buffer_decode (lzma_blockblock,
const lzma_allocatorallocator,
const uint8_t * in,
size_t * in_pos,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Block decoder.

-

This is single-call equivalent of lzma_block_decoder(), and requires that the caller has already decoded Block Header and checked its memory usage.

-
Parameters
- - - - - - - - - -
blockBlock options
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Decoding was successful.
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_BUF_ERROR: Output buffer was too small.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
-
- - - - diff --git a/doc/api/check_8h.html b/doc/api/check_8h.html deleted file mode 100644 index 2323c6c..0000000 --- a/doc/api/check_8h.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/check.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
check.h File Reference
-
-
- -

Integrity checks. -More...

- - - - - - - - -

-Macros

#define LZMA_CHECK_ID_MAX   15
 Maximum valid Check ID.
 
-#define LZMA_CHECK_SIZE_MAX   64
 Maximum size of a Check field.
 
- - - - -

-Enumerations

enum  lzma_check { LZMA_CHECK_NONE = 0 -, LZMA_CHECK_CRC32 = 1 -, LZMA_CHECK_CRC64 = 4 -, LZMA_CHECK_SHA256 = 10 - }
 Type of the integrity check (Check ID) More...
 
- - - - - - - - - - - - - - - - -

-Functions

lzma_bool lzma_check_is_supported (lzma_check check) lzma_nothrow lzma_attr_const
 Test if the given Check ID is supported.
 
uint32_t lzma_check_size (lzma_check check) lzma_nothrow lzma_attr_const
 Get the size of the Check field with the given Check ID.
 
uint32_t lzma_crc32 (const uint8_t *buf, size_t size, uint32_t crc) lzma_nothrow lzma_attr_pure
 Calculate CRC32.
 
uint64_t lzma_crc64 (const uint8_t *buf, size_t size, uint64_t crc) lzma_nothrow lzma_attr_pure
 Calculate CRC64.
 
lzma_check lzma_get_check (const lzma_stream *strm) lzma_nothrow
 Get the type of the integrity check.
 
-

Detailed Description

-

Integrity checks.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_CHECK_ID_MAX

- -
-
- - - - -
#define LZMA_CHECK_ID_MAX   15
-
- -

Maximum valid Check ID.

-

The .xz file format specification specifies 16 Check IDs (0-15). Some of them are only reserved, that is, no actual Check algorithm has been assigned. When decoding, liblzma still accepts unknown Check IDs for future compatibility. If a valid but unsupported Check ID is detected, liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h.

- -
-
-

Enumeration Type Documentation

- -

◆ lzma_check

- -
-
- - - - -
enum lzma_check
-
- -

Type of the integrity check (Check ID)

-

The .xz format supports multiple types of checks that are calculated from the uncompressed data. They vary in both speed and ability to detect errors.

- - - - - -
Enumerator
LZMA_CHECK_NONE 

No Check is calculated.

-

Size of the Check field: 0 bytes

-
LZMA_CHECK_CRC32 

CRC32 using the polynomial from the IEEE 802.3 standard

-

Size of the Check field: 4 bytes

-
LZMA_CHECK_CRC64 

CRC64 using the polynomial from the ECMA-182 standard

-

Size of the Check field: 8 bytes

-
LZMA_CHECK_SHA256 

SHA-256

-

Size of the Check field: 32 bytes

-
- -
-
-

Function Documentation

- -

◆ lzma_check_is_supported()

- -
-
- - - - - - - - -
lzma_bool lzma_check_is_supported (lzma_check check) const
-
- -

Test if the given Check ID is supported.

-

LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if liblzma is built with limited features).

-
Note
It is safe to call this with a value that is not in the range [0, 15]; in that case the return value is always false.
-
Parameters
- - -
checkCheck ID
-
-
-
Returns
lzma_bool:
    -
  • true if Check ID is supported by this liblzma build.
  • -
  • false otherwise.
  • -
-
- -
-
- -

◆ lzma_check_size()

- -
-
- - - - - - - - -
uint32_t lzma_check_size (lzma_check check) const
-
- -

Get the size of the Check field with the given Check ID.

-

Although not all Check IDs have a check algorithm associated, the size of every Check is already frozen. This function returns the size (in bytes) of the Check field with the specified Check ID. The values are: { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }

-
Parameters
- - -
checkCheck ID
-
-
-
Returns
Size of the Check field in bytes. If the argument is not in the range [0, 15], UINT32_MAX is returned.
- -
-
- -

◆ lzma_crc32()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint32_t lzma_crc32 (const uint8_t * buf,
size_t size,
uint32_t crc 
)
-
- -

Calculate CRC32.

-

Calculate CRC32 using the polynomial from the IEEE 802.3 standard.

-
Parameters
- - - - -
bufPointer to the input buffer
sizeSize of the input buffer
crcPreviously returned CRC value. This is used to calculate the CRC of a big buffer in smaller chunks. Set to zero when starting a new calculation.
-
-
-
Returns
Updated CRC value, which can be passed to this function again to continue CRC calculation.
- -
-
- -

◆ lzma_crc64()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint64_t lzma_crc64 (const uint8_t * buf,
size_t size,
uint64_t crc 
)
-
- -

Calculate CRC64.

-

Calculate CRC64 using the polynomial from the ECMA-182 standard.

-

This function is used similarly to lzma_crc32().

-
Parameters
- - - - -
bufPointer to the input buffer
sizeSize of the input buffer
crcPreviously returned CRC value. This is used to calculate the CRC of a big buffer in smaller chunks. Set to zero when starting a new calculation.
-
-
-
Returns
Updated CRC value, which can be passed to this function again to continue CRC calculation.
- -
-
- -

◆ lzma_get_check()

- -
-
- - - - - - - - -
lzma_check lzma_get_check (const lzma_streamstrm)
-
- -

Get the type of the integrity check.

-

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.

-
Parameters
- - -
strmPointer to lzma_stream meeting the above conditions.
-
-
-
Returns
Check ID in the lzma_stream, or undefined if called improperly.
- -
-
-
- - - - diff --git a/doc/api/classes.html b/doc/api/classes.html deleted file mode 100644 index a010270..0000000 --- a/doc/api/classes.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Data Structure Index - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
-
Data Structure Index
-
- - - - - diff --git a/doc/api/closed.png b/doc/api/closed.png deleted file mode 100644 index 91f4888..0000000 Binary files a/doc/api/closed.png and /dev/null differ diff --git a/doc/api/container_8h.html b/doc/api/container_8h.html deleted file mode 100644 index 332b2b1..0000000 --- a/doc/api/container_8h.html +++ /dev/null @@ -1,1279 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/container.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
container.h File Reference
-
-
- -

File formats. -More...

- - - - - -

-Data Structures

struct  lzma_mt
 Multithreading options. More...
 
- - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define LZMA_PRESET_DEFAULT   UINT32_C(6)
 Default compression preset.
 
#define LZMA_PRESET_LEVEL_MASK   UINT32_C(0x1F)
 Mask for preset level.
 
#define LZMA_PRESET_EXTREME   (UINT32_C(1) << 31)
 Extreme compression preset.
 
#define LZMA_TELL_NO_CHECK   UINT32_C(0x01)
 
#define LZMA_TELL_UNSUPPORTED_CHECK   UINT32_C(0x02)
 
#define LZMA_TELL_ANY_CHECK   UINT32_C(0x04)
 
#define LZMA_IGNORE_CHECK   UINT32_C(0x10)
 
#define LZMA_CONCATENATED   UINT32_C(0x08)
 
#define LZMA_FAIL_FAST   UINT32_C(0x20)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

uint64_t lzma_easy_encoder_memusage (uint32_t preset) lzma_nothrow lzma_attr_pure
 Calculate approximate memory usage of easy encoder.
 
uint64_t lzma_easy_decoder_memusage (uint32_t preset) lzma_nothrow lzma_attr_pure
 Calculate approximate decoder memory usage of a preset.
 
lzma_ret lzma_easy_encoder (lzma_stream *strm, uint32_t preset, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Stream encoder using a preset number.
 
lzma_ret lzma_easy_buffer_encode (uint32_t preset, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
 Single-call .xz Stream encoding using a preset number.
 
lzma_ret lzma_stream_encoder (lzma_stream *strm, const lzma_filter *filters, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Stream encoder using a custom filter chain.
 
uint64_t lzma_stream_encoder_mt_memusage (const lzma_mt *options) lzma_nothrow lzma_attr_pure
 Calculate approximate memory usage of multithreaded .xz encoder.
 
lzma_ret lzma_stream_encoder_mt (lzma_stream *strm, const lzma_mt *options) lzma_nothrow lzma_attr_warn_unused_result
 Initialize multithreaded .xz Stream encoder.
 
lzma_ret lzma_alone_encoder (lzma_stream *strm, const lzma_options_lzma *options) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .lzma encoder (legacy file format)
 
size_t lzma_stream_buffer_bound (size_t uncompressed_size) lzma_nothrow
 Calculate output buffer size for single-call Stream encoder.
 
lzma_ret lzma_stream_buffer_encode (lzma_filter *filters, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
 Single-call .xz Stream encoder.
 
lzma_ret lzma_microlzma_encoder (lzma_stream *strm, const lzma_options_lzma *options) lzma_nothrow
 MicroLZMA encoder.
 
lzma_ret lzma_stream_decoder (lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Stream decoder.
 
lzma_ret lzma_stream_decoder_mt (lzma_stream *strm, const lzma_mt *options) lzma_nothrow lzma_attr_warn_unused_result
 Initialize multithreaded .xz Stream decoder.
 
lzma_ret lzma_auto_decoder (lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result
 Decode .xz, .lzma, and .lz (lzip) files with autodetection.
 
lzma_ret lzma_alone_decoder (lzma_stream *strm, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .lzma decoder (legacy file format)
 
lzma_ret lzma_lzip_decoder (lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .lz (lzip) decoder (a foreign file format)
 
lzma_ret lzma_stream_buffer_decode (uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
 Single-call .xz Stream decoder.
 
lzma_ret lzma_microlzma_decoder (lzma_stream *strm, uint64_t comp_size, uint64_t uncomp_size, lzma_bool uncomp_size_is_exact, uint32_t dict_size) lzma_nothrow
 MicroLZMA decoder.
 
-

Detailed Description

-

File formats.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_PRESET_DEFAULT

- -
-
- - - - -
#define LZMA_PRESET_DEFAULT   UINT32_C(6)
-
- -

Default compression preset.

-

It's not straightforward to recommend a default preset, because in some cases keeping the resource usage relatively low is more important that getting the maximum compression ratio.

- -
-
- -

◆ LZMA_PRESET_LEVEL_MASK

- -
-
- - - - -
#define LZMA_PRESET_LEVEL_MASK   UINT32_C(0x1F)
-
- -

Mask for preset level.

-

This is useful only if you need to extract the level from the preset variable. That should be rare.

- -
-
- -

◆ LZMA_PRESET_EXTREME

- -
-
- - - - -
#define LZMA_PRESET_EXTREME   (UINT32_C(1) << 31)
-
- -

Extreme compression preset.

-

This flag modifies the preset to make the encoding significantly slower while improving the compression ratio only marginally. This is useful when you don't mind spending time to get as small result as possible.

-

This flag doesn't affect the memory usage requirements of the decoder (at least not significantly). The memory usage of the encoder may be increased a little but only at the lowest preset levels (0-3).

- -
-
- -

◆ LZMA_TELL_NO_CHECK

- -
-
- - - - -
#define LZMA_TELL_NO_CHECK   UINT32_C(0x01)
-
-

This flag makes lzma_code() return LZMA_NO_CHECK if the input stream being decoded has no integrity check. Note that when used with lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK if LZMA_TELL_NO_CHECK is used.

- -
-
- -

◆ LZMA_TELL_UNSUPPORTED_CHECK

- -
-
- - - - -
#define LZMA_TELL_UNSUPPORTED_CHECK   UINT32_C(0x02)
-
-

This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input stream has an integrity check, but the type of the integrity check is not supported by this liblzma version or build. Such files can still be decoded, but the integrity check cannot be verified.

- -
-
- -

◆ LZMA_TELL_ANY_CHECK

- -
-
- - - - -
#define LZMA_TELL_ANY_CHECK   UINT32_C(0x04)
-
-

This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type of the integrity check is known. The type can then be got with lzma_get_check().

- -
-
- -

◆ LZMA_IGNORE_CHECK

- -
-
- - - - -
#define LZMA_IGNORE_CHECK   UINT32_C(0x10)
-
-

This flag makes lzma_code() not calculate and verify the integrity check of the compressed data in .xz files. This means that invalid integrity check values won't be detected and LZMA_DATA_ERROR won't be returned in such cases.

-

This flag only affects the checks of the compressed data itself; the CRC32 values in the .xz headers will still be verified normally.

-

Don't use this flag unless you know what you are doing. Possible reasons to use this flag:

-
    -
  • Trying to recover data from a corrupt .xz file.
  • -
  • Speeding up decompression, which matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this flag for this purpose unless the file integrity is verified externally in some other way.
  • -
-

Support for this flag was added in liblzma 5.1.4beta.

- -
-
- -

◆ LZMA_CONCATENATED

- -
-
- - - - -
#define LZMA_CONCATENATED   UINT32_C(0x08)
-
-

This flag enables decoding of concatenated files with file formats that allow concatenating compressed files as is. From the formats currently supported by liblzma, only the .xz and .lz formats allow concatenated files. Concatenated files are not allowed with the legacy .lzma format.

-

This flag also affects the usage of the `action' argument for lzma_code(). When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END unless LZMA_FINISH is used as `action'. Thus, the application has to set LZMA_FINISH in the same way as it does when encoding.

-

If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.

- -
-
- -

◆ LZMA_FAIL_FAST

- -
-
- - - - -
#define LZMA_FAIL_FAST   UINT32_C(0x20)
-
-

This flag makes the threaded decoder report errors (like LZMA_DATA_ERROR) as soon as they are detected. This saves time when the application has no interest in a partially decompressed truncated or corrupt file. Note that due to timing randomness, if the same truncated or corrupt input is decompressed multiple times with this flag, a different amount of output may be produced by different runs, and even the error code might vary.

-

When using LZMA_FAIL_FAST, it is recommended to use LZMA_FINISH to tell the decoder when no more input will be coming because it can help fast detection and reporting of truncated files. Note that in this situation truncated files might be diagnosed with LZMA_DATA_ERROR instead of LZMA_OK or LZMA_BUF_ERROR!

-

Without this flag the threaded decoder will provide as much output as possible at first and then report the pending error. This default behavior matches the single-threaded decoder and provides repeatable behavior with truncated or corrupt input. There are a few special cases where the behavior can still differ like memory allocation failures (LZMA_MEM_ERROR).

-

Single-threaded decoders currently ignore this flag.

-

Support for this flag was added in liblzma 5.3.3alpha. Note that in older versions this flag isn't supported (LZMA_OPTIONS_ERROR) even by functions that ignore this flag in newer liblzma versions.

- -
-
-

Function Documentation

- -

◆ lzma_easy_encoder_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_easy_encoder_memusage (uint32_t preset)
-
- -

Calculate approximate memory usage of easy encoder.

-

This function is a wrapper for lzma_raw_encoder_memusage().

-
Parameters
- - -
presetCompression preset (level and possible flags)
-
-
-
Returns
Number of bytes of memory required for the given preset when encoding or UINT64_MAX on error.
- -
-
- -

◆ lzma_easy_decoder_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_easy_decoder_memusage (uint32_t preset)
-
- -

Calculate approximate decoder memory usage of a preset.

-

This function is a wrapper for lzma_raw_decoder_memusage().

-
Parameters
- - -
presetCompression preset (level and possible flags)
-
-
-
Returns
Number of bytes of memory required to decompress a file that was compressed using the given preset or UINT64_MAX on error.
- -
-
- -

◆ lzma_easy_encoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_easy_encoder (lzma_streamstrm,
uint32_t preset,
lzma_check check 
)
-
- -

Initialize .xz Stream encoder using a preset number.

-

This function is intended for those who just want to use the basic features of liblzma (that is, most developers out there).

-

If initialization fails (return value is not LZMA_OK), all the memory allocated for *strm by liblzma is always freed. Thus, there is no need to call lzma_end() after failed initialization.

-

If initialization succeeds, use lzma_code() to do the actual encoding. Valid values for `action' (the second argument of lzma_code()) are LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future, there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
presetCompression preset to use. A preset consist of level number and zero or more flags. Usually flags aren't used, so preset is simply a number [0, 9] which match the options -0 ... -9 of the xz command line tool. Additional flags can be be set using bitwise-or with the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
checkIntegrity check type to use. See check.h for available checks. The xz command line tool defaults to LZMA_CHECK_CRC64, which is a good choice if you are unsure. LZMA_CHECK_CRC32 is good too as long as the uncompressed file is not many gigabytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization succeeded. Use lzma_code() to encode your data.
  • -
  • LZMA_MEM_ERROR: Memory allocation failed.
  • -
  • LZMA_OPTIONS_ERROR: The given compression preset is not supported by this build of liblzma.
  • -
  • LZMA_UNSUPPORTED_CHECK: The given check type is not supported by this liblzma build.
  • -
  • LZMA_PROG_ERROR: One or more of the parameters have values that will never be valid. For example, strm == NULL.
  • -
-
- -
-
- -

◆ lzma_easy_buffer_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_easy_buffer_encode (uint32_t preset,
lzma_check check,
const lzma_allocatorallocator,
const uint8_t * in,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Stream encoding using a preset number.

-

The maximum required output buffer size can be calculated with lzma_stream_buffer_bound().

-
Parameters
- - - - - - - - - -
presetCompression preset to use. See the description in lzma_easy_encoder().
checkType of the integrity check to calculate from uncompressed data.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_sizeSize of the input buffer
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_stream_encoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_encoder (lzma_streamstrm,
const lzma_filterfilters,
lzma_check check 
)
-
- -

Initialize .xz Stream encoder using a custom filter chain.

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN. See filters.h for more information.
checkType of the integrity check to calculate from uncompressed data.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization was successful.
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_stream_encoder_mt_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_stream_encoder_mt_memusage (const lzma_mtoptions)
-
- -

Calculate approximate memory usage of multithreaded .xz encoder.

-

Since doing the encoding in threaded mode doesn't affect the memory requirements of single-threaded decompressor, you can use lzma_easy_decoder_memusage(options->preset) or lzma_raw_decoder_memusage(options->filters) to calculate the decompressor memory requirements.

-
Parameters
- - -
optionsCompression options
-
-
-
Returns
Number of bytes of memory required for encoding with the given options. If an error occurs, for example due to unsupported preset or filter chain, UINT64_MAX is returned.
- -
-
- -

◆ lzma_stream_encoder_mt()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_encoder_mt (lzma_streamstrm,
const lzma_mtoptions 
)
-
- -

Initialize multithreaded .xz Stream encoder.

-

This provides the functionality of lzma_easy_encoder() and lzma_stream_encoder() as a single function for multithreaded use.

-

The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be added in the future.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
optionsPointer to multithreaded compression options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_alone_encoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_alone_encoder (lzma_streamstrm,
const lzma_options_lzmaoptions 
)
-
- -

Initialize .lzma encoder (legacy file format)

-

The .lzma format is sometimes called the LZMA_Alone format, which is the reason for the name of this function. The .lzma format supports only the LZMA1 filter. There is no support for integrity checks like CRC32.

-

Use this function if and only if you need to create files readable by legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format is strongly recommended.

-

The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH. No kind of flushing is supported, because the file format doesn't make it possible.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
optionsPointer to encoder options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_stream_buffer_bound()

- -
-
- - - - - - - - -
size_t lzma_stream_buffer_bound (size_t uncompressed_size)
-
- -

Calculate output buffer size for single-call Stream encoder.

-

When trying to compress incompressible data, the encoded size will be slightly bigger than the input data. This function calculates how much output buffer space is required to be sure that lzma_stream_buffer_encode() doesn't return LZMA_BUF_ERROR.

-

The calculated value is not exact, but it is guaranteed to be big enough. The actual maximum output space required may be slightly smaller (up to about 100 bytes). This should not be a problem in practice.

-

If the calculated maximum size doesn't fit into size_t or would make the Stream grow past LZMA_VLI_MAX (which should never happen in practice), zero is returned to indicate the error.

-
Note
The limit calculated by this function applies only to single-call encoding. Multi-call encoding may (and probably will) have larger maximum expansion when encoding incompressible data. Currently there is no function to calculate the maximum expansion of multi-call encoding.
-
Parameters
- - -
uncompressed_sizeSize in bytes of the uncompressed input data
-
-
-
Returns
Maximum number of bytes needed to store the compressed data.
- -
-
- -

◆ lzma_stream_buffer_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_buffer_encode (lzma_filterfilters,
lzma_check check,
const lzma_allocatorallocator,
const uint8_t * in,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Stream encoder.

-
Parameters
- - - - - - - - - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN. See filters.h for more information.
checkType of the integrity check to calculate from uncompressed data.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_sizeSize of the input buffer
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_UNSUPPORTED_CHECK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_microlzma_encoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_microlzma_encoder (lzma_streamstrm,
const lzma_options_lzmaoptions 
)
-
- -

MicroLZMA encoder.

-

The MicroLZMA format is a raw LZMA stream whose first byte (always 0x00) has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb). This encoding ensures that the first byte of MicroLZMA stream is never 0x00. There is no end of payload marker and thus the uncompressed size must be stored separately. For the best error detection the dictionary size should be stored separately as well but alternatively one may use the uncompressed size as the dictionary size when decoding.

-

With the MicroLZMA encoder, lzma_code() behaves slightly unusually. The action argument must be LZMA_FINISH and the return value will never be LZMA_OK. Thus the encoding is always done with a single lzma_code() after the initialization. The benefit of the combination of initialization function and lzma_code() is that memory allocations can be re-used for better performance.

-

lzma_code() will try to encode as much input as is possible to fit into the given output buffer. If not all input can be encoded, the stream will be finished without encoding all the input. The caller must check both input and output buffer usage after lzma_code() (total_in and total_out in lzma_stream can be convenient). Often lzma_code() can fill the output buffer completely if there is a lot of input, but sometimes a few bytes may remain unused because the next LZMA symbol would require more space.

-

lzma_stream.avail_out must be at least 6. Otherwise LZMA_PROG_ERROR will be returned.

-

The LZMA dictionary should be reasonably low to speed up the encoder re-initialization. A good value is bigger than the resulting uncompressed size of most of the output chunks. For example, if output size is 4 KiB, dictionary size of 32 KiB or 64 KiB is good. If the data compresses extremely well, even 128 KiB may be useful.

-

The MicroLZMA format and this encoder variant were made with the EROFS file system in mind. This format may be convenient in other embedded uses too where many small streams are needed. XZ Embedded includes a decoder for this format.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
optionsPointer to encoder options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_STREAM_END: All good. Check the amounts of input used and output produced. Store the amount of input used (uncompressed size) as it needs to be known to decompress the data.
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR: In addition to the generic reasons for this error code, this may also be returned if there isn't enough output space (6 bytes) to create a valid MicroLZMA stream.
  • -
-
- -
-
- -

◆ lzma_stream_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_decoder (lzma_streamstrm,
uint64_t memlimit,
uint32_t flags 
)
-
- -

Initialize .xz Stream decoder.

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
memlimitMemory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.
flagsBitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization was successful.
  • -
  • LZMA_MEM_ERROR: Cannot allocate memory.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported flags
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_stream_decoder_mt()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_decoder_mt (lzma_streamstrm,
const lzma_mtoptions 
)
-
- -

Initialize multithreaded .xz Stream decoder.

-

The decoder can decode multiple Blocks in parallel. This requires that each Block Header contains the Compressed Size and Uncompressed size fields which are added by the multi-threaded encoder, see lzma_stream_encoder_mt().

-

A Stream with one Block will only utilize one thread. A Stream with multiple Blocks but without size information in Block Headers will be processed in single-threaded mode in the same way as done by lzma_stream_decoder(). Concatenated Streams are processed one Stream at a time; no inter-Stream parallelization is done.

-

This function behaves like lzma_stream_decoder() when options->threads == 1 and options->memlimit_threading <= 1.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
optionsPointer to multithreaded compression options
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization was successful.
  • -
  • LZMA_MEM_ERROR: Cannot allocate memory.
  • -
  • LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported flags.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_auto_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_auto_decoder (lzma_streamstrm,
uint64_t memlimit,
uint32_t flags 
)
-
- -

Decode .xz, .lzma, and .lz (lzip) files with autodetection.

-

This decoder autodetects between the .xz, .lzma, and .lz file formats, and calls lzma_stream_decoder(), lzma_alone_decoder(), or lzma_lzip_decoder() once the type of the input file has been detected.

-

Support for .lz was added in 5.4.0.

-

If the flag LZMA_CONCATENATED is used and the input is a .lzma file: For historical reasons concatenated .lzma files aren't supported. If there is trailing data after one .lzma stream, lzma_code() will return LZMA_DATA_ERROR. (lzma_alone_decoder() doesn't have such a check as it doesn't support any decoder flags. It will return LZMA_STREAM_END after one .lzma stream.)

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
memlimitMemory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.
flagsBitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization was successful.
  • -
  • LZMA_MEM_ERROR: Cannot allocate memory.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported flags
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_alone_decoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_alone_decoder (lzma_streamstrm,
uint64_t memlimit 
)
-
- -

Initialize .lzma decoder (legacy file format)

-

Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. There is no need to use LZMA_FINISH, but it's allowed because it may simplify certain types of applications.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
memlimitMemory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_lzip_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_lzip_decoder (lzma_streamstrm,
uint64_t memlimit,
uint32_t flags 
)
-
- -

Initialize .lz (lzip) decoder (a foreign file format)

-

This decoder supports the .lz format version 0 and the unextended .lz format version 1:

-
    -
  • Files in the format version 0 were produced by lzip 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in lzip 1.18.
  • -
  • lzip 1.3 added decompression support for .lz format version 1 files. Compression support was added in lzip 1.4. In lzip 1.6 the .lz format version 1 was extended to support the Sync Flush marker. This extension is not supported by liblzma. lzma_code() will return LZMA_DATA_ERROR at the location of the Sync Flush marker. In practice files with the Sync Flush marker are very rare and thus liblzma can decompress almost all .lz files.
  • -
-

Just like with lzma_stream_decoder() for .xz files, LZMA_CONCATENATED should be used when decompressing normal standalone .lz files.

-

The .lz format allows putting non-.lz data at the end of a file after at least one valid .lz member. That is, one can append custom data at the end of a .lz file and the decoder is required to ignore it. In liblzma this is relevant only when LZMA_CONCATENATED is used. In that case lzma_code() will return LZMA_STREAM_END and leave lzma_stream.next_in pointing to the first byte of the non-.lz data. An exception to this is if the first 1-3 bytes of the non-.lz data are identical to the .lz magic bytes (0x4C, 0x5A, 0x49, 0x50; "LZIP" in US-ASCII). In such a case the 1-3 bytes will have been ignored by lzma_code(). If one wishes to locate the non-.lz data reliably, one must ensure that the first byte isn't 0x4C. Actually one should ensure that none of the first four bytes of trailing data are equal to the magic bytes because lzip >= 1.20 requires it by default.

-
Parameters
- - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
memlimitMemory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter.
flagsBitwise-or of flags, or zero for no flags. All decoder flags listed above are supported although only LZMA_CONCATENATED and (in very rare cases) LZMA_IGNORE_CHECK are actually useful. LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK is supported for consistency only as CRC32 is always used in the .lz format.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization was successful.
  • -
  • LZMA_MEM_ERROR: Cannot allocate memory.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported flags
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_stream_buffer_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_buffer_decode (uint64_t * memlimit,
uint32_t flags,
const lzma_allocatorallocator,
const uint8_t * in,
size_t * in_pos,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Stream decoder.

-
Parameters
- - - - - - - - - - -
memlimitPointer to how much memory the decoder is allowed to allocate. The value pointed by this pointer is modified if and only if LZMA_MEMLIMIT_ERROR is returned.
flagsBitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST. Note that LZMA_TELL_ANY_CHECK is not allowed and will return LZMA_PROG_ERROR.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if decoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Decoding was successful.
  • -
  • LZMA_FORMAT_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_NO_CHECK: This can be returned only if using the LZMA_TELL_NO_CHECK flag.
  • -
  • LZMA_UNSUPPORTED_CHECK: This can be returned only if using the LZMA_TELL_UNSUPPORTED_CHECK flag.
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. The minimum required memlimit value was stored to *memlimit.
  • -
  • LZMA_BUF_ERROR: Output buffer was too small.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_microlzma_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_microlzma_decoder (lzma_streamstrm,
uint64_t comp_size,
uint64_t uncomp_size,
lzma_bool uncomp_size_is_exact,
uint32_t dict_size 
)
-
- -

MicroLZMA decoder.

-

See lzma_microlzma_encoder() for more information.

-

The lzma_code() usage with this decoder is completely normal. The special behavior of lzma_code() applies to lzma_microlzma_encoder() only.

-
Parameters
- - - - - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
comp_sizeCompressed size of the MicroLZMA stream. The caller must somehow know this exactly.
uncomp_sizeUncompressed size of the MicroLZMA stream. If the exact uncompressed size isn't known, this can be set to a value that is at most as big as the exact uncompressed size would be, but then the next argument uncomp_size_is_exact must be false.
uncomp_size_is_exactIf true, uncomp_size must be exactly correct. This will improve error detection at the end of the stream. If the exact uncompressed size isn't known, this must be false. uncomp_size must still be at most as big as the exact uncompressed size is. Setting this to false when the exact size is known will work but error detection at the end of the stream will be weaker.
dict_sizeLZMA dictionary size that was used when compressing the data. It is OK to use a bigger value too but liblzma will then allocate more memory than would actually be required and error detection will be slightly worse. (Note that with the implementation in XZ Embedded it doesn't affect the memory usage if one specifies bigger dictionary than actually required.)
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
-
- - - - diff --git a/doc/api/delta_8h.html b/doc/api/delta_8h.html deleted file mode 100644 index dd64be2..0000000 --- a/doc/api/delta_8h.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/delta.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
delta.h File Reference
-
-
- -

Delta filter. -More...

- - - - - -

-Data Structures

struct  lzma_options_delta
 Options for the Delta filter. More...
 
- - - - - - - - - - -

-Macros

#define LZMA_FILTER_DELTA   LZMA_VLI_C(0x03)
 Filter ID.
 
-#define LZMA_DELTA_DIST_MIN   1
 Minimum value for lzma_options_delta.dist.
 
-#define LZMA_DELTA_DIST_MAX   256
 Maximum value for lzma_options_delta.dist.
 
- - - - -

-Enumerations

enum  lzma_delta_type { LZMA_DELTA_TYPE_BYTE - }
 Type of the delta calculation. More...
 
-

Detailed Description

-

Delta filter.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_FILTER_DELTA

- -
-
- - - - -
#define LZMA_FILTER_DELTA   LZMA_VLI_C(0x03)
-
- -

Filter ID.

-

Filter ID of the Delta filter. This is used as lzma_filter.id.

- -
-
-

Enumeration Type Documentation

- -

◆ lzma_delta_type

- -
-
- - - - -
enum lzma_delta_type
-
- -

Type of the delta calculation.

-

Currently only byte-wise delta is supported. Other possible types could be, for example, delta of 16/32/64-bit little/big endian integers, but these are not currently planned since byte-wise delta is almost as good.

- -
-
-
- - - - diff --git a/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html b/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html deleted file mode 100644 index ff360ae..0000000 --- a/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma Directory Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
-
lzma Directory Reference
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Files

 base.h
 Data types and functions used in many places in liblzma API.
 
 bcj.h
 Branch/Call/Jump conversion filters.
 
 block.h
 .xz Block handling
 
 check.h
 Integrity checks.
 
 container.h
 File formats.
 
 delta.h
 Delta filter.
 
 filter.h
 Common filter related types and functions.
 
 hardware.h
 Hardware information.
 
 index.h
 Handling of .xz Index and related information.
 
 index_hash.h
 Validate Index by using a hash function.
 
 lzma12.h
 LZMA1 and LZMA2 filters.
 
 stream_flags.h
 .xz Stream Header and Stream Footer encoder and decoder
 
 version.h
 Version number.
 
 vli.h
 Variable-length integer handling.
 
-
- - - - diff --git a/doc/api/doc.svg b/doc/api/doc.svg deleted file mode 100644 index 296728b..0000000 --- a/doc/api/doc.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/doc/api/docd.svg b/doc/api/docd.svg deleted file mode 100644 index 65cf4b5..0000000 --- a/doc/api/docd.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/doc/api/doxygen.css b/doc/api/doxygen.css deleted file mode 100644 index 6ce2813..0000000 --- a/doc/api/doxygen.css +++ /dev/null @@ -1,2017 +0,0 @@ -/* The standard CSS for doxygen 1.9.7*/ - -html { -/* page base colors */ ---page-background-color: white; ---page-foreground-color: black; ---page-link-color: #144779; ---page-visited-link-color: #195794; - -/* index */ ---index-odd-item-bg-color: #F3F8FD; ---index-even-item-bg-color: white; ---index-header-color: black; ---index-separator-color: #A0A0A0; - -/* header */ ---header-background-color: #F5F9FD; ---header-separator-color: #A0C7EE; ---header-gradient-image: url('nav_h.png'); ---group-header-separator-color: #4491DE; ---group-header-color: #113B65; ---inherit-header-color: gray; - ---footer-foreground-color: #0C2B4A; ---footer-logo-width: 104px; ---citation-label-color: #10375F; ---glow-color: cyan; - ---title-background-color: white; ---title-separator-color: #1E67AF; ---directory-separator-color: #62A3E4; ---separator-color: #1B5D9E; - ---blockquote-background-color: #F1F7FC; ---blockquote-border-color: #62A3E4; - ---scrollbar-thumb-color: #62A3E4; ---scrollbar-background-color: #F5F9FD; - ---icon-background-color: #257FD9; ---icon-foreground-color: white; ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #F5F9FD; ---memdecl-separator-color: #C8DFF5; ---memdecl-foreground-color: #555; ---memdecl-template-color: #195794; - -/* detailed member list */ ---memdef-border-color: #74ADE7; ---memdef-title-background-color: #D0E3F6; ---memdef-title-gradient-image: url('nav_f.png'); ---memdef-proto-background-color: #CAE0F5; ---memdef-proto-text-color: #0A233D; ---memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---memdef-doc-background-color: white; ---memdef-param-name-color: #602020; ---memdef-template-color: #195794; - -/* tables */ ---table-cell-border-color: #0D2F50; ---table-header-background-color: #123E6A; ---table-header-foreground-color: #FFFFFF; - -/* labels */ ---label-background-color: #257FD9; ---label-left-top-border-color: #1E67AF; ---label-right-bottom-border-color: #A0C7EE; ---label-foreground-color: white; - -/** navigation bar/tree/menu */ ---nav-background-color: #F5F9FD; ---nav-foreground-color: #113C67; ---nav-gradient-image: url('tab_b.png'); ---nav-gradient-hover-image: url('tab_h.png'); ---nav-gradient-active-image: url('tab_a.png'); ---nav-gradient-active-image-parent: url("../tab_a.png"); ---nav-separator-image: url('tab_s.png'); ---nav-breadcrumb-image: url('bc_s.png'); ---nav-breadcrumb-border-color: #9CC5EE; ---nav-splitbar-image: url('splitbar.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #0B2845; ---nav-text-hover-color: white; ---nav-text-active-color: white; ---nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #113C67; ---nav-menu-background-color: white; ---nav-menu-foreground-color: #555555; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.5); ---nav-arrow-color: #62A3E4; ---nav-arrow-selected-color: #62A3E4; - -/* table of contents */ ---toc-background-color: #EEF5FC; ---toc-border-color: #BFD9F4; ---toc-header-color: #195794; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: white; ---search-foreground-color: #909090; ---search-magnification-image: url('mag.svg'); ---search-magnification-select-image: url('mag_sel.svg'); ---search-active-color: black; ---search-filter-background-color: #F5F9FD; ---search-filter-foreground-color: black; ---search-filter-border-color: #5098E0; ---search-filter-highlight-text-color: white; ---search-filter-highlight-bg-color: #144779; ---search-results-foreground-color: #174F86; ---search-results-background-color: #E2EEFA; ---search-results-border-color: black; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #555; - -/** code fragments */ ---code-keyword-color: #008000; ---code-type-keyword-color: #604020; ---code-flow-keyword-color: #E08000; ---code-comment-color: #800000; ---code-preprocessor-color: #806020; ---code-string-literal-color: #002080; ---code-char-literal-color: #008080; ---code-xml-cdata-color: black; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #195794; ---code-external-link-color: #195794; ---fragment-foreground-color: black; ---fragment-background-color: #F9FBFE; ---fragment-border-color: #A0C7EE; ---fragment-lineno-border-color: #00FF00; ---fragment-lineno-background-color: #E8E8E8; ---fragment-lineno-foreground-color: black; ---fragment-lineno-link-fg-color: #195794; ---fragment-lineno-link-bg-color: #D8D8D8; ---fragment-lineno-link-hover-fg-color: #195794; ---fragment-lineno-link-hover-bg-color: #C8C8C8; ---tooltip-foreground-color: black; ---tooltip-background-color: white; ---tooltip-border-color: gray; ---tooltip-doc-color: grey; ---tooltip-declaration-color: #006318; ---tooltip-link-color: #195794; ---tooltip-shadow: 1px 1px 7px gray; - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -} - -@media (prefers-color-scheme: dark) { - html:not(.dark-mode) { - color-scheme: dark; - -/* page base colors */ ---page-background-color: black; ---page-foreground-color: #C9D1D9; ---page-link-color: #5098E0; ---page-visited-link-color: #6DA9E5; - -/* index */ ---index-odd-item-bg-color: #02070C; ---index-even-item-bg-color: black; ---index-header-color: #A0C7EE; ---index-separator-color: #10375F; - -/* header */ ---header-background-color: #010407; ---header-separator-color: #040F1A; ---header-gradient-image: url('nav_hd.png'); ---group-header-separator-color: #0B2845; ---group-header-color: #5098E0; ---inherit-header-color: #A0A0A0; - ---footer-foreground-color: #206DBA; ---footer-logo-width: 60px; ---citation-label-color: #5098E0; ---glow-color: cyan; - ---title-background-color: #010509; ---title-separator-color: #113A63; ---directory-separator-color: #0B2845; ---separator-color: #0B2845; - ---blockquote-background-color: #030C14; ---blockquote-border-color: #0B2845; - ---scrollbar-thumb-color: #0B2845; ---scrollbar-background-color: #010407; - ---icon-background-color: #10375F; ---icon-foreground-color: #A0C7EE; ---icon-doc-image: url('docd.svg'); ---icon-folder-open-image: url('folderopend.svg'); ---icon-folder-closed-image: url('folderclosedd.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #02070C; ---memdecl-separator-color: #0D2D4D; ---memdecl-foreground-color: #BBB; ---memdecl-template-color: #3488DC; - -/* detailed member list */ ---memdef-border-color: #092138; ---memdef-title-background-color: #071829; ---memdef-title-gradient-image: url('nav_fd.png'); ---memdef-proto-background-color: #061524; ---memdef-proto-text-color: #64A4E4; ---memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); ---memdef-doc-background-color: black; ---memdef-param-name-color: #D28757; ---memdef-template-color: #3488DC; - -/* tables */ ---table-cell-border-color: #0B2845; ---table-header-background-color: #0B2845; ---table-header-foreground-color: #A0C7EE; - -/* labels */ ---label-background-color: #113B65; ---label-left-top-border-color: #195794; ---label-right-bottom-border-color: #0B2845; ---label-foreground-color: #CCCCCC; - -/** navigation bar/tree/menu */ ---nav-background-color: #030C14; ---nav-foreground-color: #113C67; ---nav-gradient-image: url('tab_bd.png'); ---nav-gradient-hover-image: url('tab_hd.png'); ---nav-gradient-active-image: url('tab_ad.png'); ---nav-gradient-active-image-parent: url("../tab_ad.png"); ---nav-separator-image: url('tab_sd.png'); ---nav-breadcrumb-image: url('bc_sd.png'); ---nav-breadcrumb-border-color: #0C2B4A; ---nav-splitbar-image: url('splitbard.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #8ABAEA; ---nav-text-hover-color: #C5DDF5; ---nav-text-active-color: #C5DDF5; ---nav-text-normal-shadow: 0px 1px 1px black; ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #8ABAEA; ---nav-menu-background-color: #000204; ---nav-menu-foreground-color: #BBBBBB; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.2); ---nav-arrow-color: #10375F; ---nav-arrow-selected-color: #5098E0; - -/* table of contents */ ---toc-background-color: #04101B; ---toc-border-color: #081D32; ---toc-header-color: #6DA9E5; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: black; ---search-foreground-color: #C5C5C5; ---search-magnification-image: url('mag_d.svg'); ---search-magnification-select-image: url('mag_seld.svg'); ---search-active-color: #C5C5C5; ---search-filter-background-color: #030C14; ---search-filter-foreground-color: #5098E0; ---search-filter-border-color: #3488DC; ---search-filter-highlight-text-color: #93BFEC; ---search-filter-highlight-bg-color: #0B2845; ---search-results-background-color: #030C14; ---search-results-foreground-color: #5098E0; ---search-results-border-color: #3488DC; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #0E3255; - -/** code fragments */ ---code-keyword-color: #CC99CD; ---code-type-keyword-color: #AB99CD; ---code-flow-keyword-color: #E08000; ---code-comment-color: #717790; ---code-preprocessor-color: #65CABE; ---code-string-literal-color: #7EC699; ---code-char-literal-color: #00E0F0; ---code-xml-cdata-color: #C9D1D9; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #79C0FF; ---code-external-link-color: #79C0FF; ---fragment-foreground-color: #C9D1D9; ---fragment-background-color: black; ---fragment-border-color: #30363D; ---fragment-lineno-border-color: #30363D; ---fragment-lineno-background-color: black; ---fragment-lineno-foreground-color: #6E7681; ---fragment-lineno-link-fg-color: #6E7681; ---fragment-lineno-link-bg-color: #303030; ---fragment-lineno-link-hover-fg-color: #8E96A1; ---fragment-lineno-link-hover-bg-color: #505050; ---tooltip-foreground-color: #C9D1D9; ---tooltip-background-color: #202020; ---tooltip-border-color: #C9D1D9; ---tooltip-doc-color: #D9E1E9; ---tooltip-declaration-color: #20C348; ---tooltip-link-color: #79C0FF; ---tooltip-shadow: none; - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -}} -body { - background-color: var(--page-background-color); - color: var(--page-foreground-color); -} - -body, table, div, p, dl { - font-weight: 400; - font-size: 14px; - font-family: var(--font-family-normal); - line-height: 22px; -} - -/* @group Heading Levels */ - -.title { - font-weight: 400; - font-size: 14px; - font-family: var(--font-family-normal); - line-height: 28px; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h1.groupheader { - font-size: 150%; -} - -h2.groupheader { - border-bottom: 1px solid var(--group-header-separator-color); - color: var(--group-header-color); - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px var(--glow-color); -} - -dt { - font-weight: bold; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -th p.starttd, th p.intertd, th p.endtd { - font-size: 100%; - font-weight: 700; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -p.interli { -} - -p.interdd { -} - -p.intertd { -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.navtab { - padding-right: 15px; - text-align: right; - line-height: 110%; -} - -div.navtab table { - border-spacing: 0; -} - -td.navtab { - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL { - background-image: var(--nav-gradient-active-image); - background-repeat:repeat-x; - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL a, td.navtabHL a:visited { - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -a.navtab { - font-weight: bold; -} - -div.qindex{ - text-align: center; - width: 100%; - line-height: 140%; - font-size: 130%; - color: var(--index-separator-color); -} - -dt.alphachar{ - font-size: 180%; - font-weight: bold; -} - -.alphachar a{ - color: var(--index-header-color); -} - -.alphachar a:hover, .alphachar a:visited{ - text-decoration: none; -} - -.classindex dl { - padding: 25px; - column-count:1 -} - -.classindex dd { - display:inline-block; - margin-left: 50px; - width: 90%; - line-height: 1.15em; -} - -.classindex dl.even { - background-color: var(--index-even-item-bg-color); -} - -.classindex dl.odd { - background-color: var(--index-odd-item-bg-color); -} - -@media(min-width: 1120px) { - .classindex dl { - column-count:2 - } -} - -@media(min-width: 1320px) { - .classindex dl { - column-count:3 - } -} - - -/* @group Link Styling */ - -a { - color: var(--page-link-color); - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: var(--page-visited-link-color); -} - -a:hover { - text-decoration: underline; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: var(--code-link-color); -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: var(--code-external-link-color); -} - -a.code.hl_class { /* style for links to class names in code snippets */ } -a.code.hl_struct { /* style for links to struct names in code snippets */ } -a.code.hl_union { /* style for links to union names in code snippets */ } -a.code.hl_interface { /* style for links to interface names in code snippets */ } -a.code.hl_protocol { /* style for links to protocol names in code snippets */ } -a.code.hl_category { /* style for links to category names in code snippets */ } -a.code.hl_exception { /* style for links to exception names in code snippets */ } -a.code.hl_service { /* style for links to service names in code snippets */ } -a.code.hl_singleton { /* style for links to singleton names in code snippets */ } -a.code.hl_concept { /* style for links to concept names in code snippets */ } -a.code.hl_namespace { /* style for links to namespace names in code snippets */ } -a.code.hl_package { /* style for links to package names in code snippets */ } -a.code.hl_define { /* style for links to macro names in code snippets */ } -a.code.hl_function { /* style for links to function names in code snippets */ } -a.code.hl_variable { /* style for links to variable names in code snippets */ } -a.code.hl_typedef { /* style for links to typedef names in code snippets */ } -a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } -a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } -a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } -a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } -a.code.hl_friend { /* style for links to friend names in code snippets */ } -a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } -a.code.hl_property { /* style for links to property names in code snippets */ } -a.code.hl_event { /* style for links to event names in code snippets */ } -a.code.hl_sequence { /* style for links to sequence names in code snippets */ } -a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -ul { - overflow: visible; -} - -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; - list-style-type: none; -} - -#side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ -} - -#main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ -} - -.fragment { - text-align: left; - direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ - overflow-y: hidden; -} - -pre.fragment { - border: 1px solid var(--fragment-border-color); - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: var(--font-family-monospace); - font-size: 105%; -} - -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - color: var(--fragment-foreground-color); - background-color: var(--fragment-background-color); - border: 1px solid var(--fragment-border-color); -} - -div.line { - font-family: var(--font-family-monospace); - font-size: 13px; - min-height: 13px; - line-height: 1.2; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: var(--glow-color); - box-shadow: 0 0 10px var(--glow-color); -} - - -span.lineno { - padding-right: 4px; - margin-right: 9px; - text-align: right; - border-right: 2px solid var(--fragment-lineno-border-color); - color: var(--fragment-lineno-foreground-color); - background-color: var(--fragment-lineno-background-color); - white-space: pre; -} -span.lineno a, span.lineno a:visited { - color: var(--fragment-lineno-link-fg-color); - background-color: var(--fragment-lineno-link-bg-color); -} - -span.lineno a:hover { - color: var(--fragment-lineno-link-hover-fg-color); - background-color: var(--fragment-lineno-link-hover-bg-color); -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - color: var(--page-foreground-color); - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -p.formulaDsp { - text-align: center; -} - -img.dark-mode-visible { - display: none; -} -img.light-mode-visible { - display: none; -} - -img.formulaDsp { - -} - -img.formulaInl, img.inline { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; - width: var(--footer-logo-width); -} - -.compoundTemplParams { - color: var(--memdecl-template-color); - font-size: 80%; - line-height: 120%; -} - -/* @group Code Colorization */ - -span.keyword { - color: var(--code-keyword-color); -} - -span.keywordtype { - color: var(--code-type-keyword-color); -} - -span.keywordflow { - color: var(--code-flow-keyword-color); -} - -span.comment { - color: var(--code-comment-color); -} - -span.preprocessor { - color: var(--code-preprocessor-color); -} - -span.stringliteral { - color: var(--code-string-literal-color); -} - -span.charliteral { - color: var(--code-char-literal-color); -} - -span.xmlcdata { - color: var(--code-xml-cdata-color); -} - -span.vhdldigit { - color: var(--code-vhdl-digit-color); -} - -span.vhdlchar { - color: var(--code-vhdl-char-color); -} - -span.vhdlkeyword { - color: var(--code-vhdl-keyword-color); -} - -span.vhdllogic { - color: var(--code-vhdl-logic-color); -} - -blockquote { - background-color: var(--blockquote-background-color); - border-left: 2px solid var(--blockquote-border-color); - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid var(--table-cell-border-color); -} - -th.dirtab { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid var(--separator-color); -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: var(--glow-color); - box-shadow: 0 0 15px var(--glow-color); -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: var(--memdecl-background-color); - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: var(--memdecl-foreground-color); -} - -.memSeparator { - border-bottom: 1px solid var(--memdecl-separator-color); - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight, .memTemplItemRight { - width: 100%; -} - -.memTemplParams { - color: var(--memdecl-template-color); - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: var(--memdef-title-gradient-image); - background-repeat: repeat-x; - background-color: var(--memdef-title-background-color); - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: var(--memdef-template-color); - font-weight: normal; - margin-left: 9px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px var(--glow-color); -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 0px 6px 0px; - color: var(--memdef-proto-text-color); - font-weight: bold; - text-shadow: var(--memdef-proto-text-shadow); - background-color: var(--memdef-proto-background-color); - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; -} - -.overload { - font-family: var(--font-family-monospace); - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 10px 2px 10px; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: var(--memdef-doc-background-color); - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: var(--memdef-param-name-color); - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir, .tparams .paramdir { - font-family: var(--font-family-monospace); - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: var(--label-background-color); - border-top:1px solid var(--label-left-top-border-color); - border-left:1px solid var(--label-left-top-border-color); - border-right:1px solid var(--label-right-bottom-border-color); - border-bottom:1px solid var(--label-right-bottom-border-color); - text-shadow: none; - color: var(--label-foreground-color); - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid var(--directory-separator-color); - border-bottom: 1px solid var(--directory-separator-color); - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.odd { - padding-left: 6px; - background-color: var(--index-odd-item-bg-color); -} - -.directory tr.even { - padding-left: 6px; - background-color: var(--index-even-item-bg-color); -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: var(--page-link-color); -} - -.arrow { - color: var(--nav-arrow-color); - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: var(--font-family-icon); - line-height: normal; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: var(--icon-background-color); - color: var(--icon-foreground-color); - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-open-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-closed-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-doc-image); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: var(--footer-foreground-color); -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - margin-bottom: 10px; - border: 1px solid var(--memdef-border-color); - border-spacing: 0px; - border-radius: 4px; - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid var(--memdef-border-color); - border-bottom: 1px solid var(--memdef-border-color); - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid var(--memdef-border-color); -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image: var(--memdef-title-gradient-image); - background-repeat:repeat-x; - background-color: var(--memdef-title-background-color); - font-size: 90%; - color: var(--memdef-proto-text-color); - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid var(--memdef-border-color); -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: var(--nav-gradient-image); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image: var(--nav-gradient-image); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:var(--nav-text-normal-color); - border:solid 1px var(--nav-breadcrumb-border-color); - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:var(--nav-breadcrumb-image); - background-repeat:no-repeat; - background-position:right; - color: var(--nav-foreground-color); -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: var(--nav-text-normal-color); - font-family: var(--font-family-nav); - text-shadow: var(--nav-text-normal-shadow); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color: var(--footer-foreground-color); - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image: var(--header-gradient-image); - background-repeat:repeat-x; - background-color: var(--header-background-color); - margin: 0px; - border-bottom: 1px solid var(--header-separator-color); -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - -dl { - padding: 0 0 0 0; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ -dl.section { - margin-left: 0px; - padding-left: 0px; -} - -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; -} - -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; -} - -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; -} - -dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; -} - -dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectrow -{ - height: 56px; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; - padding-left: 0.5em; -} - -#projectname -{ - font-size: 200%; - font-family: var(--font-family-title); - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font-size: 90%; - font-family: var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font-size: 50%; - font-family: 50% var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid var(--title-separator-color); - background-color: var(--title-background-color); -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:var(--citation-label-color); - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; - text-align:right; - width:52px; -} - -dl.citelist dd { - margin:2px 0 2px 72px; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: var(--toc-background-color); - border: 1px solid var(--toc-border-color); - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -div.toc li { - background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; - font: 10px/1.2 var(--font-family-toc); - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 var(--font-family-toc); - color: var(--toc-header-color); - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 15px; -} - -div.toc li.level4 { - margin-left: 15px; -} - -span.emoji { - /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html - * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; - */ -} - -span.obfuscator { - display: none; -} - -.inherit_header { - font-weight: bold; - color: var(--inherit-header-color); - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - /*white-space: nowrap;*/ - color: var(--tooltip-foreground-color); - background-color: var(--tooltip-background-color); - border: 1px solid var(--tooltip-border-color); - border-radius: 4px 4px 4px 4px; - box-shadow: var(--tooltip-shadow); - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: var(--tooltip-doc-color); - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip a { - color: var(--tooltip-link-color); -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: var(--tooltip-declaration-color); -} - -#powerTip div { - margin: 0px; - padding: 0px; - font-size: 12px; - font-family: var(--font-family-tooltip); - line-height: 16px; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { - border-top-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - -tt, code, kbd, samp -{ - display: inline-block; -} -/* @end */ - -u { - text-decoration: underline; -} - -details>summary { - list-style-type: none; -} - -details > summary::-webkit-details-marker { - display: none; -} - -details>summary::before { - content: "\25ba"; - padding-right:4px; - font-size: 80%; -} - -details[open]>summary::before { - content: "\25bc"; - padding-right:4px; - font-size: 80%; -} - -body { - scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); -} - -::-webkit-scrollbar { - background-color: var(--scrollbar-background-color); - height: 12px; - width: 12px; -} -::-webkit-scrollbar-thumb { - border-radius: 6px; - box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); - border: solid 2px transparent; -} -::-webkit-scrollbar-corner { - background-color: var(--scrollbar-background-color); -} - diff --git a/doc/api/doxygen.svg b/doc/api/doxygen.svg deleted file mode 100644 index 363aa45..0000000 --- a/doc/api/doxygen.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/api/files.html b/doc/api/files.html deleted file mode 100644 index 459665c..0000000 --- a/doc/api/files.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - -liblzma (XZ Utils): File List - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
[detail level 12]
- - - - - - - - - - - - - - - - -
  lzma
 base.hData types and functions used in many places in liblzma API
 bcj.hBranch/Call/Jump conversion filters
 block.h.xz Block handling
 check.hIntegrity checks
 container.hFile formats
 delta.hDelta filter
 filter.hCommon filter related types and functions
 hardware.hHardware information
 index.hHandling of .xz Index and related information
 index_hash.hValidate Index by using a hash function
 lzma12.hLZMA1 and LZMA2 filters
 stream_flags.h.xz Stream Header and Stream Footer encoder and decoder
 version.hVersion number
 vli.hVariable-length integer handling
 lzma.hThe public API of liblzma data compression library
-
-
- - - - diff --git a/doc/api/filter_8h.html b/doc/api/filter_8h.html deleted file mode 100644 index 7f2ffaa..0000000 --- a/doc/api/filter_8h.html +++ /dev/null @@ -1,1342 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/filter.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
filter.h File Reference
-
-
- -

Common filter related types and functions. -More...

- - - - - -

-Data Structures

struct  lzma_filter
 Filter options. More...
 
- - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define LZMA_FILTERS_MAX   4
 Maximum number of filters in a chain.
 
#define LZMA_STR_ALL_FILTERS   UINT32_C(0x01)
 Allow or show all filters.
 
#define LZMA_STR_NO_VALIDATION   UINT32_C(0x02)
 Do not validate the filter chain in lzma_str_to_filters()
 
#define LZMA_STR_ENCODER   UINT32_C(0x10)
 Stringify encoder options.
 
#define LZMA_STR_DECODER   UINT32_C(0x20)
 Stringify decoder options.
 
#define LZMA_STR_GETOPT_LONG   UINT32_C(0x40)
 Produce xz-compatible getopt_long() syntax.
 
#define LZMA_STR_NO_SPACES   UINT32_C(0x80)
 Use two dashes "--" instead of a space to separate filters.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

lzma_bool lzma_filter_encoder_is_supported (lzma_vli id) lzma_nothrow lzma_attr_const
 Test if the given Filter ID is supported for encoding.
 
lzma_bool lzma_filter_decoder_is_supported (lzma_vli id) lzma_nothrow lzma_attr_const
 Test if the given Filter ID is supported for decoding.
 
lzma_ret lzma_filters_copy (const lzma_filter *src, lzma_filter *dest, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Copy the filters array.
 
void lzma_filters_free (lzma_filter *filters, const lzma_allocator *allocator) lzma_nothrow
 Free the options in the array of lzma_filter structures.
 
uint64_t lzma_raw_encoder_memusage (const lzma_filter *filters) lzma_nothrow lzma_attr_pure
 Calculate approximate memory requirements for raw encoder.
 
uint64_t lzma_raw_decoder_memusage (const lzma_filter *filters) lzma_nothrow lzma_attr_pure
 Calculate approximate memory requirements for raw decoder.
 
lzma_ret lzma_raw_encoder (lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result
 Initialize raw encoder.
 
lzma_ret lzma_raw_decoder (lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result
 Initialize raw decoder.
 
lzma_ret lzma_filters_update (lzma_stream *strm, const lzma_filter *filters) lzma_nothrow
 Update the filter chain in the encoder.
 
lzma_ret lzma_raw_buffer_encode (const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
 Single-call raw encoder.
 
lzma_ret lzma_raw_buffer_decode (const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
 Single-call raw decoder.
 
lzma_ret lzma_properties_size (uint32_t *size, const lzma_filter *filter) lzma_nothrow
 Get the size of the Filter Properties field.
 
lzma_ret lzma_properties_encode (const lzma_filter *filter, uint8_t *props) lzma_nothrow
 Encode the Filter Properties field.
 
lzma_ret lzma_properties_decode (lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *props, size_t props_size) lzma_nothrow
 Decode the Filter Properties field.
 
lzma_ret lzma_filter_flags_size (uint32_t *size, const lzma_filter *filter) lzma_nothrow lzma_attr_warn_unused_result
 Calculate encoded size of a Filter Flags field.
 
lzma_ret lzma_filter_flags_encode (const lzma_filter *filter, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
 Encode Filter Flags into given buffer.
 
lzma_ret lzma_filter_flags_decode (lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result
 Decode Filter Flags from given buffer.
 
const char * lzma_str_to_filters (const char *str, int *error_pos, lzma_filter *filters, uint32_t flags, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Convert a string to a filter chain.
 
lzma_ret lzma_str_from_filters (char **str, const lzma_filter *filters, uint32_t flags, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Convert a filter chain to a string.
 
lzma_ret lzma_str_list_filters (char **str, lzma_vli filter_id, uint32_t flags, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 List available filters and/or their options (for help message)
 
-

Detailed Description

-

Common filter related types and functions.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_FILTERS_MAX

- -
-
- - - - -
#define LZMA_FILTERS_MAX   4
-
- -

Maximum number of filters in a chain.

-

A filter chain can have 1-4 filters, of which three are allowed to change the size of the data. Usually only one or two filters are needed.

- -
-
- -

◆ LZMA_STR_ALL_FILTERS

- -
-
- - - - -
#define LZMA_STR_ALL_FILTERS   UINT32_C(0x01)
-
- -

Allow or show all filters.

-

By default only the filters supported in the .xz format are accept by lzma_str_to_filters() or shown by lzma_str_list_filters().

- -
-
- -

◆ LZMA_STR_NO_VALIDATION

- -
-
- - - - -
#define LZMA_STR_NO_VALIDATION   UINT32_C(0x02)
-
- -

Do not validate the filter chain in lzma_str_to_filters()

-

By default lzma_str_to_filters() can return an error if the filter chain as a whole isn't usable in the .xz format or in the raw encoder or decoder. With this flag, this validation is skipped. This flag doesn't affect the handling of the individual filter options. To allow non-.xz filters also LZMA_STR_ALL_FILTERS is needed.

- -
-
- -

◆ LZMA_STR_ENCODER

- -
-
- - - - -
#define LZMA_STR_ENCODER   UINT32_C(0x10)
-
- -

Stringify encoder options.

-

Show the filter-specific options that the encoder will use. This may be useful for verbose diagnostic messages.

-

Note that if options were decoded from .xz headers then the encoder options may be undefined. This flag shouldn't be used in such a situation.

- -
-
- -

◆ LZMA_STR_DECODER

- -
-
- - - - -
#define LZMA_STR_DECODER   UINT32_C(0x20)
-
- -

Stringify decoder options.

-

Show the filter-specific options that the decoder will use. This may be useful for showing what filter options were decoded from file headers.

- -
-
- -

◆ LZMA_STR_GETOPT_LONG

- -
-
- - - - -
#define LZMA_STR_GETOPT_LONG   UINT32_C(0x40)
-
- -

Produce xz-compatible getopt_long() syntax.

-

That is, "delta:dist=2 lzma2:dict=4MiB,pb=1,lp=1" becomes "--delta=dist=2 --lzma2=dict=4MiB,pb=1,lp=1".

-

This syntax is compatible with xz 5.0.0 as long as the filters and their options are supported too.

- -
-
- -

◆ LZMA_STR_NO_SPACES

- -
-
- - - - -
#define LZMA_STR_NO_SPACES   UINT32_C(0x80)
-
- -

Use two dashes "--" instead of a space to separate filters.

-

That is, "delta:dist=2 lzma2:pb=1,lp=1" becomes "delta:dist=2--lzma2:pb=1,lp=1". This looks slightly odd but this kind of strings should be usable on the command line without quoting. However, it is possible that future versions with new filter options might produce strings that require shell quoting anyway as the exact set of possible characters isn't frozen for now.

-

It is guaranteed that the single quote (') will never be used in filter chain strings (even if LZMA_STR_NO_SPACES isn't used).

- -
-
-

Function Documentation

- -

◆ lzma_filter_encoder_is_supported()

- -
-
- - - - - - - - -
lzma_bool lzma_filter_encoder_is_supported (lzma_vli id) const
-
- -

Test if the given Filter ID is supported for encoding.

-
Parameters
- - -
idFilter ID
-
-
-
Returns
lzma_bool:
    -
  • true if the Filter ID is supported for encoding by this liblzma build.
  • -
  • false otherwise.
  • -
-
- -
-
- -

◆ lzma_filter_decoder_is_supported()

- -
-
- - - - - - - - -
lzma_bool lzma_filter_decoder_is_supported (lzma_vli id) const
-
- -

Test if the given Filter ID is supported for decoding.

-
Parameters
- - -
idFilter ID
-
-
-
Returns
lzma_bool:
    -
  • true if the Filter ID is supported for decoding by this liblzma build.
  • -
  • false otherwise.
  • -
-
- -
-
- -

◆ lzma_filters_copy()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_filters_copy (const lzma_filtersrc,
lzma_filterdest,
const lzma_allocatorallocator 
)
-
- -

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. liblzma versions older than 5.2.7 may modify the dest array and leave its contents in an undefined state if an error occurs. liblzma 5.2.7 and newer only modify the dest array when returning LZMA_OK.

-
Parameters
- - - - -
srcArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
[out]destDestination filter array
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
Possible lzma_ret values:
    -
  • 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.
  • -
-
- -
-
- -

◆ lzma_filters_free()

- -
-
- - - - - - - - - - - - - - - - - - -
void lzma_filters_free (lzma_filterfilters,
const lzma_allocatorallocator 
)
-
- -

Free the options in the array of lzma_filter structures.

-

This frees the filter chain options. The filters array itself is not freed.

-

The filters array must have at most LZMA_FILTERS_MAX + 1 elements including the terminating element which must have .id = LZMA_VLI_UNKNOWN. For all elements before the terminating element:

    -
  • options will be freed using the given lzma_allocator or, if allocator is NULL, using free().
  • -
  • options will be set to NULL.
  • -
  • id will be set to LZMA_VLI_UNKNOWN.
  • -
-

If filters is NULL, this does nothing. Again, this never frees the filters array itself.

-
Parameters
- - - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
- -
-
- -

◆ lzma_raw_encoder_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_raw_encoder_memusage (const lzma_filterfilters)
-
- -

Calculate approximate memory requirements for raw encoder.

-

This function can be used to calculate the memory requirements for Block and Stream encoders too because Block and Stream encoders don't need significantly more memory than raw encoder.

-
Parameters
- - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
-
-
-
Returns
Number of bytes of memory required for the given filter chain when encoding or UINT64_MAX on error.
- -
-
- -

◆ lzma_raw_decoder_memusage()

- -
-
- - - - - - - - -
uint64_t lzma_raw_decoder_memusage (const lzma_filterfilters)
-
- -

Calculate approximate memory requirements for raw decoder.

-

This function can be used to calculate the memory requirements for Block and Stream decoders too because Block and Stream decoders don't need significantly more memory than raw decoder.

-
Parameters
- - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
-
-
-
Returns
Number of bytes of memory required for the given filter chain when decoding or UINT64_MAX on error.
- -
-
- -

◆ lzma_raw_encoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_raw_encoder (lzma_streamstrm,
const lzma_filterfilters 
)
-
- -

Initialize raw encoder.

-

This function may be useful when implementing custom file formats.

-

The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the filter chain supports it), or LZMA_FINISH.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_raw_decoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_raw_decoder (lzma_streamstrm,
const lzma_filterfilters 
)
-
- -

Initialize raw decoder.

-

The initialization of raw decoder goes similarly to raw encoder.

-

The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using LZMA_FINISH is not required, it is supported just for convenience.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_filters_update()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_filters_update (lzma_streamstrm,
const lzma_filterfilters 
)
-
- -

Update the filter chain in the encoder.

-

This function may be called after lzma_code() has returned LZMA_STREAM_END when LZMA_FULL_BARRIER, LZMA_FULL_FLUSH, or LZMA_SYNC_FLUSH was used:

-
    -
  • After LZMA_FULL_BARRIER or LZMA_FULL_FLUSH: Single-threaded .xz Stream encoder (lzma_stream_encoder()) and (since liblzma 5.4.0) multi-threaded Stream encoder (lzma_stream_encoder_mt()) allow setting a new filter chain to be used for the next Block(s).
  • -
  • After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()), Block encoder (lzma_block_encoder()), and single-threaded .xz Stream encoder (lzma_stream_encoder()) allow changing certain filter-specific options in the middle of encoding. The actual filters in the chain (Filter IDs) must not be changed! Currently only the lc, lp, and pb options of LZMA2 (not LZMA1) can be changed this way.
  • -
  • In the future some filters might allow changing some of their options without any barrier or flushing but currently such filters don't exist.
  • -
-

This function may also be called when no data has been compressed yet although this is rarely useful. In that case, this function will behave as if LZMA_FULL_FLUSH (Stream encoders) or LZMA_SYNC_FLUSH (Raw or Block encoder) had been used right before calling this function.

-
Parameters
- - - -
strmPointer to lzma_stream that is at least initialized with LZMA_STREAM_INIT.
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_MEMLIMIT_ERROR
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_raw_buffer_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_raw_buffer_encode (const lzma_filterfilters,
const lzma_allocatorallocator,
const uint8_t * in,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call raw encoder.

-
Note
There is no function to calculate how big output buffer would surely be big enough. (lzma_stream_buffer_bound() works only for lzma_stream_buffer_encode(); raw encoder won't necessarily meet that bound.)
-
Parameters
- - - - - - - - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_sizeSize of the input buffer
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_raw_buffer_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_raw_buffer_decode (const lzma_filterfilters,
const lzma_allocatorallocator,
const uint8_t * in,
size_t * in_pos,
size_t in_size,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call raw decoder.

-
Parameters
- - - - - - - - - -
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Decoding was successful.
  • -
  • LZMA_BUF_ERROR: Not enough output buffer space.
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_properties_size()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_properties_size (uint32_t * size,
const lzma_filterfilter 
)
-
- -

Get the size of the Filter Properties field.

-

This function may be useful when implementing custom file formats using the raw encoder and decoder.

-
Note
This function validates the Filter ID, but does not necessarily validate the options. Thus, it is possible that this returns LZMA_OK while the following call to lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
-
Parameters
- - - -
[out]sizePointer to uint32_t to hold the size of the properties
filterFilter ID and options (the size of the properties may vary depending on the options)
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_properties_encode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_properties_encode (const lzma_filterfilter,
uint8_t * props 
)
-
- -

Encode the Filter Properties field.

-
Note
Even this function won't validate more options than actually necessary. Thus, it is possible that encoding the properties succeeds but using the same options to initialize the encoder will fail.
-
-If lzma_properties_size() indicated that the size of the Filter Properties field is zero, calling lzma_properties_encode() is not required, but it won't do any harm either.
-
Parameters
- - - -
filterFilter ID and options
[out]propsBuffer to hold the encoded options. The size of the buffer must have been already determined with lzma_properties_size().
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_properties_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_properties_decode (lzma_filterfilter,
const lzma_allocatorallocator,
const uint8_t * props,
size_t props_size 
)
-
- -

Decode the Filter Properties field.

-
Parameters
- - - - - -
filterfilter->id must have been set to the correct Filter ID. filter->options doesn't need to be initialized (it's not freed by this function). The decoded options will be stored in filter->options; it's application's responsibility to free it when appropriate. filter->options is set to NULL if there are no properties or if an error occurs.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free(). and in case of an error, also free().
propsInput buffer containing the properties.
props_sizeSize of the properties. This must be the exact size; giving too much or too little input will return LZMA_OPTIONS_ERROR.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
-
- -
-
- -

◆ lzma_filter_flags_size()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_filter_flags_size (uint32_t * size,
const lzma_filterfilter 
)
-
- -

Calculate encoded size of a Filter Flags field.

-

Knowing the size of Filter Flags is useful to know when allocating memory to hold the encoded Filter Flags.

-
Note
If you need to calculate size of List of Filter Flags, you need to loop over every lzma_filter entry.
-
Parameters
- - - -
[out]sizePointer to integer to hold the calculated size
filterFilter ID and associated options whose encoded size is to be calculated
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: *size set successfully. Note that this doesn't guarantee that filter->options is valid, thus lzma_filter_flags_encode() may still fail.
  • -
  • LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
  • -
  • LZMA_PROG_ERROR: Invalid options
  • -
-
- -
-
- -

◆ lzma_filter_flags_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_filter_flags_encode (const lzma_filterfilter,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Encode Filter Flags into given buffer.

-

In contrast to some functions, this doesn't allocate the needed buffer. This is due to how this function is used internally by liblzma.

-
Parameters
- - - - - -
filterFilter ID and options to be encoded
[out]outBeginning of the output buffer
[out]out_posout[*out_pos] is the next write position. This is updated by the encoder.
out_sizeout[out_size] is the first byte to not write.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_OPTIONS_ERROR: Invalid or unsupported options.
  • -
  • LZMA_PROG_ERROR: Invalid options or not enough output buffer space (you should have checked it with lzma_filter_flags_size()).
  • -
-
- -
-
- -

◆ lzma_filter_flags_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_filter_flags_decode (lzma_filterfilter,
const lzma_allocatorallocator,
const uint8_t * in,
size_t * in_pos,
size_t in_size 
)
-
- -

Decode Filter Flags from given buffer.

-

The decoded result is stored into *filter. The old value of filter->options is not free()d. If anything other than LZMA_OK is returned, filter->options is set to NULL.

-
Parameters
- - - - - - -
[out]filterDestination filter. The decoded Filter ID will be stored in filter->id. If options are needed they will be allocated and the pointer will be stored in filter->options.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
[out]in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_DATA_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_str_to_filters()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const char * lzma_str_to_filters (const char * str,
int * error_pos,
lzma_filterfilters,
uint32_t flags,
const lzma_allocatorallocator 
)
-
- -

Convert a string to a filter chain.

-

This tries to make it easier to write applications that allow users to set custom compression options. This only handles the filter configuration (including presets) but not the number of threads, block size, check type, or memory limits.

-

The input string can be either a preset or a filter chain. Presets begin with a digit 0-9 and may be followed by zero or more flags which are lower-case letters. Currently only "e" is supported, matching LZMA_PRESET_EXTREME. For partial xz command line syntax compatibility, a preset string may start with a single dash "-".

-

A filter chain consists of one or more "filtername:opt1=value1,opt2=value2" strings separated by one or more spaces. Leading and trailing spaces are ignored. All names and values must be lower-case. Extra commas in the option list are ignored. The order of filters is significant: when encoding, the uncompressed input data goes to the leftmost filter first. Normally "lzma2" is the last filter in the chain.

-

If one wishes to avoid spaces, for example, to avoid shell quoting, it is possible to use two dashes "--" instead of spaces to separate the filters.

-

For xz command line compatibility, each filter may be prefixed with two dashes "--" and the colon ":" separating the filter name from the options may be replaced with an equals sign "=".

-

By default, only filters that can be used in the .xz format are accepted. To allow all filters (LZMA1) use the flag LZMA_STR_ALL_FILTERS.

-

By default, very basic validation is done for the filter chain as a whole, for example, that LZMA2 is only used as the last filter in the chain. The validation isn't perfect though and it's possible that this function succeeds but using the filter chain for encoding or decoding will still result in LZMA_OPTIONS_ERROR. To disable this validation, use the flag LZMA_STR_NO_VALIDATION.

-

The available filter names and their options are available via lzma_str_list_filters(). See the xz man page for the description of filter names and options.

-

For command line applications, below is an example how an error message can be displayed. Note the use of an empty string for the field width. If "^" was used there it would create an off-by-one error except at the very beginning of the line.

-
const char *str = ...; // From user
- -
int pos;
-
const char *msg = lzma_str_to_filters(str, &pos, filters, 0, NULL);
-
if (msg != NULL) {
-
printf("%s: Error in XZ compression options:\n", argv[0]);
-
printf("%s: %s\n", argv[0], str);
-
printf("%s: %*s^\n", argv[0], errpos, "");
-
printf("%s: %s\n", argv[0], msg);
-
}
-
Parameters
- - - - - - -
strUser-supplied string describing a preset or a filter chain. If a default value is needed and you don't know what would be good, use "6" since that is the default preset in xz too.
[out]error_posIf this isn't NULL, this value will be set on both success and on all errors. This tells the location of the error in the string. This is an int to make it straightforward to use this as printf() field width. The value is guaranteed to be in the range [0, INT_MAX] even if strlen(str) somehow was greater than INT_MAX.
[out]filtersAn array of lzma_filter structures. There must be LZMA_FILTERS_MAX + 1 (that is, five) elements in the array. The old contents are ignored so it doesn't need to be initialized. This array is modified only if this function returns NULL. Once the allocated filter options are no longer needed, lzma_filters_free() can be used to free the options (it doesn't free the filters array itself).
flagsBitwise-or of zero or more of the flags LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
On success, NULL is returned. On error, a statically-allocated error message is returned which together with the error_pos should give some idea what is wrong.
- -
-
- -

◆ lzma_str_from_filters()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_str_from_filters (char ** str,
const lzma_filterfilters,
uint32_t flags,
const lzma_allocatorallocator 
)
-
- -

Convert a filter chain to a string.

-

Use cases:

-
    -
  • Verbose output showing the full encoder options to the user (use LZMA_STR_ENCODER in flags)
  • -
  • Showing the filters and options that are required to decode a file (use LZMA_STR_DECODER in flags)
  • -
  • Showing the filter names without any options in informational messages where the technical details aren't important (no flags). In this case the .options in the filters array are ignored and may be NULL even if a filter has a mandatory options structure.
  • -
-

Note that even if the filter chain was specified using a preset, the resulting filter chain isn't reversed to a preset. So if you specify "6" to lzma_str_to_filters() then lzma_str_from_filters() will produce a string containing "lzma2".

-
Parameters
- - - - - -
[out]strOn success *str will be set to point to an allocated string describing the given filter chain. Old value is ignored. On error *str is always set to NULL.
filtersArray of filters terminated with .id == LZMA_VLI_UNKNOWN.
flagsBitwise-or of zero or more of the flags LZMA_STR_ENCODER, LZMA_STR_DECODER, LZMA_STR_GETOPT_LONG, and LZMA_STR_NO_SPACES.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR: Empty filter chain (filters[0].id == LZMA_VLI_UNKNOWN) or the filter chain includes a Filter ID that is not supported by this function.
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_str_list_filters()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_str_list_filters (char ** str,
lzma_vli filter_id,
uint32_t flags,
const lzma_allocatorallocator 
)
-
- -

List available filters and/or their options (for help message)

-

If a filter_id is given then only one line is created which contains the filter name. If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then the options read by the encoder or decoder are printed on the same line.

-

If filter_id is LZMA_VLI_UNKNOWN then all supported .xz-compatible filters are listed:

-
    -
  • If neither LZMA_STR_ENCODER nor LZMA_STR_DECODER is used then the supported filter names are listed on a single line separated by spaces.
  • -
  • If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then filters and the supported options are listed one filter per line. There won't be a newline after the last filter.
  • -
  • If LZMA_STR_ALL_FILTERS is used then the list will include also those filters that cannot be used in the .xz format (LZMA1).
  • -
-
Parameters
- - - - - -
strOn success *str will be set to point to an allocated string listing the filters and options. Old value is ignored. On error *str is always set to NULL.
filter_idFilter ID or LZMA_VLI_UNKNOWN.
flagsBitwise-or of zero or more of the flags LZMA_STR_ALL_FILTERS, LZMA_STR_ENCODER, LZMA_STR_DECODER, and LZMA_STR_GETOPT_LONG.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR: Unsupported filter_id or flags
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
-
- - - - diff --git a/doc/api/folderclosed.svg b/doc/api/folderclosed.svg deleted file mode 100644 index 47d22df..0000000 --- a/doc/api/folderclosed.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/doc/api/folderclosedd.svg b/doc/api/folderclosedd.svg deleted file mode 100644 index 8fe0031..0000000 --- a/doc/api/folderclosedd.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/doc/api/folderopen.svg b/doc/api/folderopen.svg deleted file mode 100644 index 9565570..0000000 --- a/doc/api/folderopen.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/doc/api/folderopend.svg b/doc/api/folderopend.svg deleted file mode 100644 index e72e225..0000000 --- a/doc/api/folderopend.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/doc/api/functions.html b/doc/api/functions.html deleted file mode 100644 index b50cf73..0000000 --- a/doc/api/functions.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Data Fields - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- h -

- - -

- i -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

-
- - - - diff --git a/doc/api/functions_vars.html b/doc/api/functions_vars.html deleted file mode 100644 index f6d689c..0000000 --- a/doc/api/functions_vars.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Data Fields - Variables - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented variables with links to the struct/union documentation for each field:
- -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- h -

- - -

- i -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

-
- - - - diff --git a/doc/api/globals.html b/doc/api/globals.html deleted file mode 100644 index f80423c..0000000 --- a/doc/api/globals.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
- -

- l -

-
- - - - diff --git a/doc/api/globals_defs.html b/doc/api/globals_defs.html deleted file mode 100644 index a7b945c..0000000 --- a/doc/api/globals_defs.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented macros with links to the documentation:
- -

- l -

-
- - - - diff --git a/doc/api/globals_enum.html b/doc/api/globals_enum.html deleted file mode 100644 index 1820871..0000000 --- a/doc/api/globals_enum.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
-
Here is a list of all documented enums with links to the documentation:
-
- - - - diff --git a/doc/api/globals_eval.html b/doc/api/globals_eval.html deleted file mode 100644 index 51424c7..0000000 --- a/doc/api/globals_eval.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented enum values with links to the documentation:
- -

- l -

-
- - - - diff --git a/doc/api/globals_func.html b/doc/api/globals_func.html deleted file mode 100644 index 091e519..0000000 --- a/doc/api/globals_func.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - - -
-
-
Here is a list of all documented functions with links to the documentation:
- -

- l -

-
- - - - diff --git a/doc/api/globals_type.html b/doc/api/globals_type.html deleted file mode 100644 index cd7aa3f..0000000 --- a/doc/api/globals_type.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - -liblzma (XZ Utils): Globals - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
-
Here is a list of all documented typedefs with links to the documentation:
-
- - - - diff --git a/doc/api/hardware_8h.html b/doc/api/hardware_8h.html deleted file mode 100644 index fd302e2..0000000 --- a/doc/api/hardware_8h.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/hardware.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
hardware.h File Reference
-
-
- -

Hardware information. -More...

- - - - - - - - -

-Functions

uint64_t lzma_physmem (void) lzma_nothrow
 Get the total amount of physical memory (RAM) in bytes.
 
uint32_t lzma_cputhreads (void) lzma_nothrow
 Get the number of processor cores or threads.
 
-

Detailed Description

-

Hardware information.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

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 underlying 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.
-

Function Documentation

- -

◆ lzma_physmem()

- -
-
- - - - - - - - -
uint64_t lzma_physmem (void )
-
- -

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.

-
Returns
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.
- -
-
- -

◆ lzma_cputhreads()

- -
-
- - - - - - - - -
uint32_t lzma_cputhreads (void )
-
- -

Get the number of processor cores or threads.

-

This function may be useful when determining how many threads to use. If the hardware supports more than one thread per CPU core, the number of hardware threads is returned if that information is available.

-
Returns
On success, the number of available CPU threads or cores is returned. If this information isn't available or an error occurs, zero is returned.
- -
-
-
- - - - diff --git a/doc/api/index.html b/doc/api/index.html deleted file mode 100644 index b3f8cce..0000000 --- a/doc/api/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -liblzma (XZ Utils): liblzma (XZ Utils) - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - -
-
-
liblzma (XZ Utils)
-
-
-

liblzma is a public domain general-purpose data compression library with a zlib-like API. The native file format is .xz, but also the old .lzma format and raw (no headers) streams are supported. Multiple compression algorithms (filters) are supported. Currently LZMA2 is the primary filter.

-

liblzma is part of XZ Utils https://tukaani.org/xz/. XZ Utils includes a gzip-like command line tool named xz and some other tools. XZ Utils is developed and maintained by Lasse Collin and Jia Tan.

-

Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK https://7-zip.org/sdk.html.

-

The SHA-256 implementation is based on the public domain code found from 7-Zip https://7-zip.org/, which has a modified version of the public domain SHA-256 code found from Crypto++ https://www.cryptopp.com/. The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.

-
-
- - - - diff --git a/doc/api/index_8h.html b/doc/api/index_8h.html deleted file mode 100644 index f0de050..0000000 --- a/doc/api/index_8h.html +++ /dev/null @@ -1,1268 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/index.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
index.h File Reference
-
-
- -

Handling of .xz Index and related information. -More...

- - - - - -

-Data Structures

struct  lzma_index_iter
 Iterator to get information about Blocks and Streams. More...
 
- - - - -

-Typedefs

typedef struct lzma_index_s lzma_index
 Opaque data type to hold the Index(es) and other information.
 
- - - - -

-Enumerations

enum  lzma_index_iter_mode { LZMA_INDEX_ITER_ANY = 0 -, LZMA_INDEX_ITER_STREAM = 1 -, LZMA_INDEX_ITER_BLOCK = 2 -, LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3 - }
 Operation mode for lzma_index_iter_next() More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

uint64_t lzma_index_memusage (lzma_vli streams, lzma_vli blocks) lzma_nothrow
 Calculate memory usage of lzma_index.
 
uint64_t lzma_index_memused (const lzma_index *i) lzma_nothrow
 Calculate the memory usage of an existing lzma_index.
 
lzma_indexlzma_index_init (const lzma_allocator *allocator) lzma_nothrow
 Allocate and initialize a new lzma_index structure.
 
void lzma_index_end (lzma_index *i, const lzma_allocator *allocator) lzma_nothrow
 Deallocate lzma_index.
 
lzma_ret lzma_index_append (lzma_index *i, const lzma_allocator *allocator, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result
 Add a new Block to lzma_index.
 
lzma_ret lzma_index_stream_flags (lzma_index *i, const lzma_stream_flags *stream_flags) lzma_nothrow lzma_attr_warn_unused_result
 Set the Stream Flags.
 
uint32_t lzma_index_checks (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the types of integrity Checks.
 
lzma_ret lzma_index_stream_padding (lzma_index *i, lzma_vli stream_padding) lzma_nothrow lzma_attr_warn_unused_result
 Set the amount of Stream Padding.
 
lzma_vli lzma_index_stream_count (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the number of Streams.
 
lzma_vli lzma_index_block_count (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the number of Blocks.
 
lzma_vli lzma_index_size (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the size of the Index field as bytes.
 
lzma_vli lzma_index_stream_size (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the total size of the Stream.
 
lzma_vli lzma_index_total_size (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the total size of the Blocks.
 
lzma_vli lzma_index_file_size (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the total size of the file.
 
lzma_vli lzma_index_uncompressed_size (const lzma_index *i) lzma_nothrow lzma_attr_pure
 Get the uncompressed size of the file.
 
void lzma_index_iter_init (lzma_index_iter *iter, const lzma_index *i) lzma_nothrow
 Initialize an iterator.
 
void lzma_index_iter_rewind (lzma_index_iter *iter) lzma_nothrow
 Rewind the iterator.
 
lzma_bool lzma_index_iter_next (lzma_index_iter *iter, lzma_index_iter_mode mode) lzma_nothrow lzma_attr_warn_unused_result
 Get the next Block or Stream.
 
lzma_bool lzma_index_iter_locate (lzma_index_iter *iter, lzma_vli target) lzma_nothrow
 Locate a Block.
 
lzma_ret lzma_index_cat (lzma_index *dest, lzma_index *src, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Concatenate lzma_indexes.
 
lzma_indexlzma_index_dup (const lzma_index *i, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Duplicate lzma_index.
 
lzma_ret lzma_index_encoder (lzma_stream *strm, const lzma_index *i) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Index encoder.
 
lzma_ret lzma_index_decoder (lzma_stream *strm, lzma_index **i, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result
 Initialize .xz Index decoder.
 
lzma_ret lzma_index_buffer_encode (const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
 Single-call .xz Index encoder.
 
lzma_ret lzma_index_buffer_decode (lzma_index **i, uint64_t *memlimit, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow
 Single-call .xz Index decoder.
 
lzma_ret lzma_file_info_decoder (lzma_stream *strm, lzma_index **dest_index, uint64_t memlimit, uint64_t file_size) lzma_nothrow
 Initialize a .xz file information decoder.
 
-

Detailed Description

-

Handling of .xz Index and related information.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Typedef Documentation

- -

◆ lzma_index

- -
-
- - - - -
typedef struct lzma_index_s lzma_index
-
- -

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.

- -
-
-

Enumeration Type Documentation

- -

◆ lzma_index_iter_mode

- -
-
- - - - -
enum lzma_index_iter_mode
-
- -

Operation mode for lzma_index_iter_next()

- - - - - -
Enumerator
LZMA_INDEX_ITER_ANY 

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 

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 

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 

Get the next non-empty Block.

-

This is like LZMA_INDEX_ITER_BLOCK except that it will skip Blocks whose Uncompressed Size is zero.

-
- -
-
-

Function Documentation

- -

◆ lzma_index_memusage()

- -
-
- - - - - - - - - - - - - - - - - - -
uint64_t lzma_index_memusage (lzma_vli streams,
lzma_vli blocks 
)
-
- -

Calculate memory usage of lzma_index.

-

On disk, the size of the Index field depends on both the number of Records stored and the size of the Records (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 to 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.

-
Parameters
- - - -
streamsNumber of Streams
blocksNumber of Blocks
-
-
-
Returns
Approximate memory in bytes needed in a lzma_index structure.
- -
-
- -

◆ lzma_index_memused()

- -
-
- - - - - - - - -
uint64_t lzma_index_memused (const lzma_indexi)
-
- -

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)).

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Approximate memory in bytes used by the lzma_index structure.
- -
-
- -

◆ lzma_index_init()

- -
-
- - - - - - - - -
lzma_index * lzma_index_init (const lzma_allocatorallocator)
-
- -

Allocate and initialize a new lzma_index structure.

-
Parameters
- - -
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
On success, a pointer to an empty initialized lzma_index is returned. If allocation fails, NULL is returned.
- -
-
- -

◆ lzma_index_end()

- -
-
- - - - - - - - - - - - - - - - - - -
void lzma_index_end (lzma_indexi,
const lzma_allocatorallocator 
)
-
- -

Deallocate lzma_index.

-

If i is NULL, this does nothing.

-
Parameters
- - - -
iPointer to lzma_index structure to deallocate
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
- -
-
- -

◆ lzma_index_append()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_append (lzma_indexi,
const lzma_allocatorallocator,
lzma_vli unpadded_size,
lzma_vli uncompressed_size 
)
-
- -

Add a new Block to lzma_index.

-
Parameters
- - - - - -
iPointer to a lzma_index structure
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
unpadded_sizeUnpadded Size of a Block. This can be calculated with lzma_block_unpadded_size() after encoding or decoding the Block.
uncompressed_sizeUncompressed 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.

-
Returns
Possible lzma_ret values:
    -
  • 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
  • -
-
- -
-
- -

◆ lzma_index_stream_flags()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_stream_flags (lzma_indexi,
const lzma_stream_flagsstream_flags 
)
-
- -

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.

-
Parameters
- - - -
iPointer to lzma_index structure
stream_flagsPointer to lzma_stream_flags structure. This is copied into the internal preallocated structure, so the caller doesn't need to keep the flags' data available after calling this function.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_index_checks()

- -
-
- - - - - - - - -
uint32_t lzma_index_checks (const lzma_indexi)
-
- -

Get the types of integrity Checks.

-

If lzma_index_stream_flags() 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.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Bitmask indicating which Check types are used in the lzma_index
- -
-
- -

◆ lzma_index_stream_padding()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_stream_padding (lzma_indexi,
lzma_vli stream_padding 
)
-
- -

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.

-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_DATA_ERROR: The file size would grow too big.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_index_stream_count()

- -
-
- - - - - - - - -
lzma_vli lzma_index_stream_count (const lzma_indexi)
-
- -

Get the number of Streams.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Number of Streams in the lzma_index
- -
-
- -

◆ lzma_index_block_count()

- -
-
- - - - - - - - -
lzma_vli lzma_index_block_count (const lzma_indexi)
-
- -

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.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Number of blocks in the lzma_index
- -
-
- -

◆ lzma_index_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_size (const lzma_indexi)
-
- -

Get the size of the Index field as bytes.

-

This is needed to verify the Backward Size field in the Stream Footer.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Size in bytes of the Index
- -
-
- -

◆ lzma_index_stream_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_stream_size (const lzma_indexi)
-
- -

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.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Size in bytes of the Stream (if all Blocks are combined into one Stream).
- -
-
- -

◆ lzma_index_total_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_total_size (const lzma_indexi)
-
- -

Get the total size of the Blocks.

-

This doesn't include the Stream Header, Stream Footer, Stream Padding, or Index fields.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Size in bytes of all Blocks in the Stream(s)
- -
-
- -

◆ lzma_index_file_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_file_size (const lzma_indexi)
-
- -

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.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Total size of the .xz file in bytes
- -
-
- -

◆ lzma_index_uncompressed_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_uncompressed_size (const lzma_indexi)
-
- -

Get the uncompressed size of the file.

-
Parameters
- - -
iPointer to lzma_index structure
-
-
-
Returns
Size in bytes of the uncompressed data in the file
- -
-
- -

◆ lzma_index_iter_init()

- -
-
- - - - - - - - - - - - - - - - - - -
void lzma_index_iter_init (lzma_index_iteriter,
const lzma_indexi 
)
-
- -

Initialize an iterator.

-

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.

-
Parameters
- - - -
iterPointer to a lzma_index_iter structure
ilzma_index to which the iterator will be associated
-
-
- -
-
- -

◆ lzma_index_iter_rewind()

- -
-
- - - - - - - - -
void lzma_index_iter_rewind (lzma_index_iteriter)
-
- -

Rewind the iterator.

-

Rewind the iterator so that next call to lzma_index_iter_next() will return the first Block or Stream.

-
Parameters
- - -
iterPointer to a lzma_index_iter structure
-
-
- -
-
- -

◆ lzma_index_iter_next()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_bool lzma_index_iter_next (lzma_index_iteriter,
lzma_index_iter_mode mode 
)
-
- -

Get the next Block or Stream.

-
Parameters
- - - -
iterIterator initialized with lzma_index_iter_init()
modeSpecify what kind of information the caller wants to get. See lzma_index_iter_mode for details.
-
-
-
Returns
lzma_bool:
    -
  • true if no Block or Stream matching the mode is found. *iter is not updated (failure).
  • -
  • false if the next Block or Stream matching the mode was found. *iter is updated (success).
  • -
-
- -
-
- -

◆ lzma_index_iter_locate()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_bool lzma_index_iter_locate (lzma_index_iteriter,
lzma_vli target 
)
-
- -

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.

-

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.
  • -
-

If the target is greater than the uncompressed size of the Stream, *iter is not modified.

-
Parameters
- - - -
iterIterator that was earlier initialized with lzma_index_iter_init().
targetUncompressed target offset which the caller would like to locate from the Stream
-
-
-
Returns
lzma_bool:
    -
  • true if the target is greater than or equal to the uncompressed size of the Stream (failure)
  • -
  • false if the target is smaller than the uncompressed size of the Stream (success)
  • -
-
- -
-
- -

◆ lzma_index_cat()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_cat (lzma_indexdest,
lzma_indexsrc,
const lzma_allocatorallocator 
)
-
- -

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.

-
Parameters
- - - - -
[out]destlzma_index after which src is appended
srclzma_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.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
Possible lzma_ret values:
    -
  • 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
  • -
-
- -
-
- -

◆ lzma_index_dup()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_index * lzma_index_dup (const lzma_indexi,
const lzma_allocatorallocator 
)
-
- -

Duplicate lzma_index.

-
Parameters
- - - -
iPointer to lzma_index structure to be duplicated
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
A copy of the lzma_index, or NULL if memory allocation failed.
- -
-
- -

◆ lzma_index_encoder()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_encoder (lzma_streamstrm,
const lzma_indexi 
)
-
- -

Initialize .xz Index encoder.

-
Parameters
- - - -
strmPointer to properly prepared lzma_stream
iPointer to lzma_index which should be encoded.
-
-
-

The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. It is enough to use only one of them (you can choose freely).

-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization succeeded, continue with lzma_code().
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_index_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_decoder (lzma_streamstrm,
lzma_index ** i,
uint64_t memlimit 
)
-
- -

Initialize .xz Index decoder.

-
Parameters
- - - - -
strmPointer to properly prepared lzma_stream
[out]iThe 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().
memlimitHow much memory the resulting lzma_index is allowed to require. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.
-
-
-

Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. There is no need to use LZMA_FINISH, but it's allowed because it may simplify certain types of applications.

-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Initialization succeeded, continue with lzma_code().
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
-
Note
liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here but that error code has never been possible from this initialization function.
- -
-
- -

◆ lzma_index_buffer_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_buffer_encode (const lzma_indexi,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Single-call .xz Index encoder.

-
Note
This function doesn't take allocator argument since all the internal data is allocated on stack.
-
Parameters
- - - - - -
ilzma_index to be encoded
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds.
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • 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
  • -
-
- -
-
- -

◆ lzma_index_buffer_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_buffer_decode (lzma_index ** i,
uint64_t * memlimit,
const lzma_allocatorallocator,
const uint8_t * in,
size_t * in_pos,
size_t in_size 
)
-
- -

Single-call .xz Index decoder.

-
Parameters
- - - - - - - -
[out]iIf 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.
[out]memlimitPointer 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.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
inBeginning of the input buffer
in_posThe next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds.
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
-
-
-
Returns
Possible lzma_ret values:
    -
  • 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
  • -
-
- -
-
- -

◆ lzma_file_info_decoder()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_file_info_decoder (lzma_streamstrm,
lzma_index ** dest_index,
uint64_t memlimit,
uint64_t file_size 
)
-
- -

Initialize a .xz file information decoder.

-

This decoder decodes the Stream Header, Stream Footer, Index, and Stream Padding field(s) from the input .xz file and stores the resulting combined index in *dest_index. This information can be used to get the uncompressed file size with lzma_index_uncompressed_size(*dest_index) or, for example, to implement random access reading by locating the Blocks in the Streams.

-

To get the required information from the .xz file, lzma_code() may ask the application to seek in the input file by returning LZMA_SEEK_NEEDED and having the target file position specified in lzma_stream.seek_pos. The number of seeks required depends on the input file and how big buffers the application provides. When possible, the decoder will seek backward and forward in the given buffer to avoid useless seek requests. Thus, if the application provides the whole file at once, no external seeking will be required (that is, lzma_code() won't return LZMA_SEEK_NEEDED).

-

The value in lzma_stream.total_in can be used to estimate how much data liblzma had to read to get the file information. However, due to seeking and the way total_in is updated, the value of total_in will be somewhat inaccurate (a little too big). Thus, total_in is a good estimate but don't expect to see the same exact value for the same file if you change the input buffer size or switch to a different liblzma version.

-

Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. You only need to use LZMA_RUN; LZMA_FINISH is only supported because it might be convenient for some applications. If you use LZMA_FINISH and if lzma_code() asks the application to seek, remember to reset `action' back to LZMA_RUN unless you hit the end of the file again.

-

Possible return values from lzma_code():

    -
  • LZMA_OK: All OK so far, more input needed
  • -
  • LZMA_SEEK_NEEDED: Provide more input starting from the absolute file position strm->seek_pos
  • -
  • LZMA_STREAM_END: Decoding was successful, *dest_index has been set
  • -
  • LZMA_FORMAT_ERROR: The input file is not in the .xz format (the expected magic bytes were not found from the beginning of the file)
  • -
  • LZMA_OPTIONS_ERROR: File looks valid but contains headers that aren't supported by this version of liblzma
  • -
  • LZMA_DATA_ERROR: File is corrupt
  • -
  • LZMA_BUF_ERROR
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_MEMLIMIT_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
Parameters
- - - - - -
strmPointer to a properly prepared lzma_stream
[out]dest_indexPointer to a pointer where the decoder will put the decoded lzma_index. The old value of *dest_index is ignored (not freed).
memlimitHow much memory the resulting lzma_index is allowed to require. Use UINT64_MAX to effectively disable the limiter.
file_sizeSize of the input .xz file
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_MEM_ERROR
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
-
- - - - diff --git a/doc/api/index__hash_8h.html b/doc/api/index__hash_8h.html deleted file mode 100644 index 1f568ed..0000000 --- a/doc/api/index__hash_8h.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/index_hash.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
index_hash.h File Reference
-
-
- -

Validate Index by using a hash function. -More...

- - - - - -

-Typedefs

-typedef struct lzma_index_hash_s lzma_index_hash
 Opaque data type to hold the Index hash.
 
- - - - - - - - - - - - - - - - -

-Functions

lzma_index_hashlzma_index_hash_init (lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
 Allocate and initialize a new lzma_index_hash structure.
 
void lzma_index_hash_end (lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow
 Deallocate lzma_index_hash structure.
 
lzma_ret lzma_index_hash_append (lzma_index_hash *index_hash, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result
 Add a new Record to an Index hash.
 
lzma_ret lzma_index_hash_decode (lzma_index_hash *index_hash, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result
 Decode and validate the Index field.
 
lzma_vli lzma_index_hash_size (const lzma_index_hash *index_hash) lzma_nothrow lzma_attr_pure
 Get the size of the Index field as bytes.
 
-

Detailed Description

-

Validate Index by using a hash function.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Hashing makes it possible to use constant amount of memory to validate Index of arbitrary size.

-

Function Documentation

- -

◆ lzma_index_hash_init()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_index_hash * lzma_index_hash_init (lzma_index_hashindex_hash,
const lzma_allocatorallocator 
)
-
- -

Allocate and initialize a new lzma_index_hash structure.

-

If index_hash is NULL, this function allocates and initializes a new lzma_index_hash structure and returns a pointer to it. If allocation fails, NULL is returned.

-

If index_hash is non-NULL, this function reinitializes the lzma_index_hash structure and returns the same pointer. In this case, return value cannot be NULL or a different pointer than the index_hash that was given as an argument.

-
Parameters
- - - -
index_hashPointer to a lzma_index_hash structure or NULL.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
-
Returns
Initialized lzma_index_hash structure on success or NULL on failure.
- -
-
- -

◆ lzma_index_hash_end()

- -
-
- - - - - - - - - - - - - - - - - - -
void lzma_index_hash_end (lzma_index_hashindex_hash,
const lzma_allocatorallocator 
)
-
- -

Deallocate lzma_index_hash structure.

-
Parameters
- - - -
index_hashPointer to a lzma_index_hash structure to free.
allocatorlzma_allocator for custom allocator functions. Set to NULL to use malloc() and free().
-
-
- -
-
- -

◆ lzma_index_hash_append()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_hash_append (lzma_index_hashindex_hash,
lzma_vli unpadded_size,
lzma_vli uncompressed_size 
)
-
- -

Add a new Record to an Index hash.

-
Parameters
- - - - -
index_hashPointer to a lzma_index_hash structure
unpadded_sizeUnpadded Size of a Block
uncompressed_sizeUncompressed Size of a Block
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK
  • -
  • LZMA_DATA_ERROR: Compressed or uncompressed size of the Stream or size of the Index field would grow too big.
  • -
  • LZMA_PROG_ERROR: Invalid arguments or this function is being used when lzma_index_hash_decode() has already been used.
  • -
-
- -
-
- -

◆ lzma_index_hash_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_index_hash_decode (lzma_index_hashindex_hash,
const uint8_t * in,
size_t * in_pos,
size_t in_size 
)
-
- -

Decode and validate the Index field.

-

After telling the sizes of all Blocks with lzma_index_hash_append(), the actual Index field is decoded with this function. Specifically, once decoding of the Index field has been started, no more Records can be added using lzma_index_hash_append().

-

This function doesn't use lzma_stream structure to pass the input data. Instead, the input buffer is specified using three arguments. This is because it matches better the internal APIs of liblzma.

-
Parameters
- - - - - -
index_hashPointer to a lzma_index_hash structure
inPointer to the beginning of the input buffer
[out]in_posin[*in_pos] is the next byte to process
in_sizein[in_size] is the first byte not to process
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: So far good, but more input is needed.
  • -
  • LZMA_STREAM_END: Index decoded successfully and it matches the Records given with lzma_index_hash_append().
  • -
  • LZMA_DATA_ERROR: Index is corrupt or doesn't match the information given with lzma_index_hash_append().
  • -
  • LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
  • -
  • LZMA_PROG_ERROR
  • -
-
- -
-
- -

◆ lzma_index_hash_size()

- -
-
- - - - - - - - -
lzma_vli lzma_index_hash_size (const lzma_index_hashindex_hash)
-
- -

Get the size of the Index field as bytes.

-

This is needed to verify the Backward Size field in the Stream Footer.

-
Parameters
- - -
index_hashPointer to a lzma_index_hash structure
-
-
-
Returns
Size of the Index field in bytes.
- -
-
-
- - - - diff --git a/doc/api/lzma12_8h.html b/doc/api/lzma12_8h.html deleted file mode 100644 index 1d8330c..0000000 --- a/doc/api/lzma12_8h.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/lzma12.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
lzma12.h File Reference
-
-
- -

LZMA1 and LZMA2 filters. -More...

- - - - - -

-Data Structures

struct  lzma_options_lzma
 Options specific to the LZMA1 and LZMA2 filters. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define LZMA_FILTER_LZMA1   LZMA_VLI_C(0x4000000000000001)
 LZMA1 Filter ID (for raw encoder/decoder only, not in .xz)
 
#define LZMA_FILTER_LZMA1EXT   LZMA_VLI_C(0x4000000000000002)
 LZMA1 Filter ID with extended options (for raw encoder/decoder)
 
#define LZMA_FILTER_LZMA2   LZMA_VLI_C(0x21)
 LZMA2 Filter ID.
 
-#define LZMA_DICT_SIZE_MIN   UINT32_C(4096)
 
-#define LZMA_DICT_SIZE_DEFAULT   (UINT32_C(1) << 23)
 
-#define LZMA_LCLP_MIN   0
 
-#define LZMA_LCLP_MAX   4
 
-#define LZMA_LC_DEFAULT   3
 
-#define LZMA_LP_DEFAULT   0
 
-#define LZMA_PB_MIN   0
 
-#define LZMA_PB_MAX   4
 
-#define LZMA_PB_DEFAULT   2
 
-#define LZMA_LZMA1EXT_ALLOW_EOPM   UINT32_C(0x01)
 
#define lzma_set_ext_size(opt_lzma2, u64size)
 Macro to set the 64-bit uncompressed size in ext_size_*.
 
- - - - - - - -

-Enumerations

enum  lzma_match_finder {
-  LZMA_MF_HC3 = 0x03 -, LZMA_MF_HC4 = 0x04 -, LZMA_MF_BT2 = 0x12 -, LZMA_MF_BT3 = 0x13 -,
-  LZMA_MF_BT4 = 0x14 -
- }
 Match finders. More...
 
enum  lzma_mode { LZMA_MODE_FAST = 1 -, LZMA_MODE_NORMAL = 2 - }
 Compression modes. More...
 
- - - - - - - - - - -

-Functions

lzma_bool lzma_mf_is_supported (lzma_match_finder match_finder) lzma_nothrow lzma_attr_const
 Test if given match finder is supported.
 
lzma_bool lzma_mode_is_supported (lzma_mode mode) lzma_nothrow lzma_attr_const
 Test if given compression mode is supported.
 
lzma_bool lzma_lzma_preset (lzma_options_lzma *options, uint32_t preset) lzma_nothrow
 Set a compression preset to lzma_options_lzma structure.
 
-

Detailed Description

-

LZMA1 and LZMA2 filters.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_FILTER_LZMA1

- -
-
- - - - -
#define LZMA_FILTER_LZMA1   LZMA_VLI_C(0x4000000000000001)
-
- -

LZMA1 Filter ID (for raw encoder/decoder only, not in .xz)

-

LZMA1 is the very same thing as what was called just LZMA in LZMA Utils, 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from accidentally using LZMA when they actually want LZMA2.

- -
-
- -

◆ LZMA_FILTER_LZMA1EXT

- -
-
- - - - -
#define LZMA_FILTER_LZMA1EXT   LZMA_VLI_C(0x4000000000000002)
-
- -

LZMA1 Filter ID with extended options (for raw encoder/decoder)

-

This is like LZMA_FILTER_LZMA1 but with this ID a few extra options are supported in the lzma_options_lzma structure:

-
    -
  • A flag to tell the encoder if the end of payload marker (EOPM) alias end of stream (EOS) marker must be written at the end of the stream. In contrast, LZMA_FILTER_LZMA1 always writes the end marker.
  • -
  • Decoder needs to be told the uncompressed size of the stream or that it is unknown (using the special value UINT64_MAX). If the size is known, a flag can be set to allow the presence of the end marker anyway. In contrast, LZMA_FILTER_LZMA1 always behaves as if the uncompressed size was unknown.
  • -
-

This allows handling file formats where LZMA1 streams are used but where the end marker isn't allowed or where it might not (always) be present. This extended LZMA1 functionality is provided as a Filter ID for raw encoder and decoder instead of adding new encoder and decoder initialization functions because this way it is possible to also use extra filters, for example, LZMA_FILTER_X86 in a filter chain with LZMA_FILTER_LZMA1EXT, which might be needed to handle some file formats.

- -
-
- -

◆ LZMA_FILTER_LZMA2

- -
-
- - - - -
#define LZMA_FILTER_LZMA2   LZMA_VLI_C(0x21)
-
- -

LZMA2 Filter ID.

-

Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion when trying to compress incompressible data), possibility to change lc/lp/pb in the middle of encoding, and some other internal improvements.

- -
-
- -

◆ lzma_set_ext_size

- -
-
- - - - - - - - - - - - - - - - - - -
#define lzma_set_ext_size( opt_lzma2,
 u64size 
)
-
-Value:
do { \
-
(opt_lzma2).ext_size_low = (uint32_t)(u64size); \
-
(opt_lzma2).ext_size_high = (uint32_t)((uint64_t)(u64size) >> 32); \
-
} while (0)
-
-

Macro to set the 64-bit uncompressed size in ext_size_*.

-

This might be convenient when decoding using LZMA_FILTER_LZMA1EXT. This isn't used with LZMA_FILTER_LZMA1 or LZMA_FILTER_LZMA2.

- -
-
-

Enumeration Type Documentation

- -

◆ lzma_match_finder

- -
-
- - - - -
enum lzma_match_finder
-
- -

Match finders.

-

Match finder has major effect on both speed and compression ratio. Usually hash chains are faster than binary trees.

-

If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better choice, because binary trees get much higher compression ratio penalty with LZMA_SYNC_FLUSH.

-

The memory usage formulas are only rough estimates, which are closest to reality when dict_size is a power of two. The formulas are more complex in reality, and can also change a little between liblzma versions. Use lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.

- - - - - - -
Enumerator
LZMA_MF_HC3 

Hash Chain with 2- and 3-byte hashing.

-

Minimum nice_len: 3

-

Memory usage:

    -
  • dict_size <= 16 MiB: dict_size * 7.5
  • -
  • dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
  • -
-
LZMA_MF_HC4 

Hash Chain with 2-, 3-, and 4-byte hashing.

-

Minimum nice_len: 4

-

Memory usage:

    -
  • dict_size <= 32 MiB: dict_size * 7.5
  • -
  • dict_size > 32 MiB: dict_size * 6.5
  • -
-
LZMA_MF_BT2 

Binary Tree with 2-byte hashing.

-

Minimum nice_len: 2

-

Memory usage: dict_size * 9.5

-
LZMA_MF_BT3 

Binary Tree with 2- and 3-byte hashing.

-

Minimum nice_len: 3

-

Memory usage:

    -
  • dict_size <= 16 MiB: dict_size * 11.5
  • -
  • dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
  • -
-
LZMA_MF_BT4 

Binary Tree with 2-, 3-, and 4-byte hashing.

-

Minimum nice_len: 4

-

Memory usage:

    -
  • dict_size <= 32 MiB: dict_size * 11.5
  • -
  • dict_size > 32 MiB: dict_size * 10.5
  • -
-
- -
-
- -

◆ lzma_mode

- -
-
- - - - -
enum lzma_mode
-
- -

Compression modes.

-

This selects the function used to analyze the data produced by the match finder.

- - - -
Enumerator
LZMA_MODE_FAST 

Fast compression.

-

Fast mode is usually at its best when combined with a hash chain match finder.

-
LZMA_MODE_NORMAL 

Normal compression.

-

This is usually notably slower than fast mode. Use this together with binary tree match finders to expose the full potential of the LZMA1 or LZMA2 encoder.

-
- -
-
-

Function Documentation

- -

◆ lzma_mf_is_supported()

- -
-
- - - - - - - - -
lzma_bool lzma_mf_is_supported (lzma_match_finder match_finder) const
-
- -

Test if given match finder is supported.

-

It is safe to call this with a value that isn't listed in lzma_match_finder enumeration; the return value will be false.

-

There is no way to list which match finders are available in this particular liblzma version and build. It would be useless, because a new match finder, which the application developer wasn't aware, could require giving additional options to the encoder that the older match finders don't need.

-
Parameters
- - -
match_finderMatch finder ID
-
-
-
Returns
lzma_bool:
    -
  • true if the match finder is supported by this liblzma build.
  • -
  • false otherwise.
  • -
-
- -
-
- -

◆ lzma_mode_is_supported()

- -
-
- - - - - - - - -
lzma_bool lzma_mode_is_supported (lzma_mode mode) const
-
- -

Test if given compression mode is supported.

-

It is safe to call this with a value that isn't listed in lzma_mode enumeration; the return value will be false.

-

There is no way to list which modes are available in this particular liblzma version and build. It would be useless, because a new compression mode, which the application developer wasn't aware, could require giving additional options to the encoder that the older modes don't need.

-
Parameters
- - -
modeMode ID.
-
-
-
Returns
lzma_bool:
    -
  • true if the compression mode is supported by this liblzma build.
  • -
  • false otherwise.
  • -
-
- -
-
- -

◆ lzma_lzma_preset()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_bool lzma_lzma_preset (lzma_options_lzmaoptions,
uint32_t preset 
)
-
- -

Set a compression preset to lzma_options_lzma structure.

-

0 is the fastest and 9 is the slowest. These match the switches -0 .. -9 of the xz command line tool. In addition, it is possible to bitwise-or flags to the preset. Currently only LZMA_PRESET_EXTREME is supported. The flags are defined in container.h, because the flags are used also with lzma_easy_encoder().

-

The preset levels are subject to changes between liblzma versions.

-

This function is available only if LZMA1 or LZMA2 encoder has been enabled when building liblzma.

-

If features (like certain match finders) have been disabled at build time, then the function may return success (false) even though the resulting LZMA1/LZMA2 options may not be usable for encoder initialization (LZMA_OPTIONS_ERROR).

-
Parameters
- - - -
[out]optionsPointer to LZMA1 or LZMA2 options to be filled
presetPreset level bitwse-ORed with preset flags
-
-
-
Returns
lzma_bool:
    -
  • true if the preset is not supported (failure).
  • -
  • false otherwise (success).
  • -
-
- -
-
-
- - - - diff --git a/doc/api/lzma_8h.html b/doc/api/lzma_8h.html deleted file mode 100644 index ec417c6..0000000 --- a/doc/api/lzma_8h.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma.h File Reference
-
-
- -

The public API of liblzma data compression library. -More...

-
#include <stddef.h>
-#include <inttypes.h>
-#include <limits.h>
-#include "lzma/version.h"
-#include "lzma/base.h"
-#include "lzma/vli.h"
-#include "lzma/check.h"
-#include "lzma/filter.h"
-#include "lzma/bcj.h"
-#include "lzma/delta.h"
-#include "lzma/lzma12.h"
-#include "lzma/container.h"
-#include "lzma/stream_flags.h"
-#include "lzma/block.h"
-#include "lzma/index.h"
-#include "lzma/index_hash.h"
-#include "lzma/hardware.h"
-
- - - - - - - - - - - - - - - - - - - -

-Macros

-#define UINT32_C(n)   n ## U
 
-#define UINT64_C(n)   n ## UL
 
-#define UINT32_MAX   (UINT32_C(4294967295))
 
-#define UINT64_MAX   (UINT64_C(18446744073709551615))
 
-#define lzma_nothrow
 
-#define lzma_attr_pure   lzma_attribute((__pure__))
 
-#define lzma_attr_const   lzma_attribute((__const__))
 
-#define lzma_attr_warn_unused_result    lzma_attribute((__warn_unused_result__))
 
-#define LZMA_H_INTERNAL   1
 
-

Detailed Description

-

The public API of liblzma data compression library.

-
- - - - diff --git a/doc/api/nav_f.png b/doc/api/nav_f.png deleted file mode 100644 index 113913e..0000000 Binary files a/doc/api/nav_f.png and /dev/null differ diff --git a/doc/api/nav_fd.png b/doc/api/nav_fd.png deleted file mode 100644 index 978df01..0000000 Binary files a/doc/api/nav_fd.png and /dev/null differ diff --git a/doc/api/nav_g.png b/doc/api/nav_g.png deleted file mode 100644 index 2093a23..0000000 Binary files a/doc/api/nav_g.png and /dev/null differ diff --git a/doc/api/nav_h.png b/doc/api/nav_h.png deleted file mode 100644 index 4e34efd..0000000 Binary files a/doc/api/nav_h.png and /dev/null differ diff --git a/doc/api/nav_hd.png b/doc/api/nav_hd.png deleted file mode 100644 index b717d93..0000000 Binary files a/doc/api/nav_hd.png and /dev/null differ diff --git a/doc/api/open.png b/doc/api/open.png deleted file mode 100644 index b4e49d8..0000000 Binary files a/doc/api/open.png and /dev/null differ diff --git a/doc/api/splitbar.png b/doc/api/splitbar.png deleted file mode 100644 index ee781cf..0000000 Binary files a/doc/api/splitbar.png and /dev/null differ diff --git a/doc/api/splitbard.png b/doc/api/splitbard.png deleted file mode 100644 index aa4d029..0000000 Binary files a/doc/api/splitbard.png and /dev/null differ diff --git a/doc/api/stream__flags_8h.html b/doc/api/stream__flags_8h.html deleted file mode 100644 index 5cc0df9..0000000 --- a/doc/api/stream__flags_8h.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/stream_flags.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
stream_flags.h File Reference
-
-
- -

.xz Stream Header and Stream Footer encoder and decoder -More...

- - - - - -

-Data Structures

struct  lzma_stream_flags
 Options for encoding/decoding Stream Header and Stream Footer. More...
 
- - - - - - - - - - -

-Macros

#define LZMA_STREAM_HEADER_SIZE   12
 Size of Stream Header and Stream Footer.
 
-#define LZMA_BACKWARD_SIZE_MIN   4
 Minimum value for lzma_stream_flags.backward_size.
 
-#define LZMA_BACKWARD_SIZE_MAX   (LZMA_VLI_C(1) << 34)
 Maximum value for lzma_stream_flags.backward_size.
 
- - - - - - - - - - - - - - - - -

-Functions

lzma_ret lzma_stream_header_encode (const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
 Encode Stream Header.
 
lzma_ret lzma_stream_footer_encode (const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
 Encode Stream Footer.
 
lzma_ret lzma_stream_header_decode (lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
 Decode Stream Header.
 
lzma_ret lzma_stream_footer_decode (lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
 Decode Stream Footer.
 
lzma_ret lzma_stream_flags_compare (const lzma_stream_flags *a, const lzma_stream_flags *b) lzma_nothrow lzma_attr_pure
 Compare two lzma_stream_flags structures.
 
-

Detailed Description

-

.xz Stream Header and Stream Footer encoder and decoder

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_STREAM_HEADER_SIZE

- -
-
- - - - -
#define LZMA_STREAM_HEADER_SIZE   12
-
- -

Size of Stream Header and Stream Footer.

-

Stream Header and Stream Footer have the same size and they are not going to change even if a newer version of the .xz file format is developed in future.

- -
-
-

Function Documentation

- -

◆ lzma_stream_header_encode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_header_encode (const lzma_stream_flagsoptions,
uint8_t * out 
)
-
- -

Encode Stream Header.

-
Parameters
- - - -
optionsStream Header options to be encoded. options->backward_size is ignored and doesn't need to be initialized.
[out]outBeginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_OPTIONS_ERROR: options->version is not supported by this liblzma version.
  • -
  • LZMA_PROG_ERROR: Invalid options.
  • -
-
- -
-
- -

◆ lzma_stream_footer_encode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_footer_encode (const lzma_stream_flagsoptions,
uint8_t * out 
)
-
- -

Encode Stream Footer.

-
Parameters
- - - -
optionsStream Footer options to be encoded.
[out]outBeginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Encoding was successful.
  • -
  • LZMA_OPTIONS_ERROR: options->version is not supported by this liblzma version.
  • -
  • LZMA_PROG_ERROR: Invalid options.
  • -
-
- -
-
- -

◆ lzma_stream_header_decode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_header_decode (lzma_stream_flagsoptions,
const uint8_t * in 
)
-
- -

Decode Stream Header.

-

options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to help comparing Stream Flags from Stream Header and Stream Footer with lzma_stream_flags_compare().

-
Note
When decoding .xz files that contain multiple Streams, it may make sense to print "file format not recognized" only if decoding of the Stream Header of the first Stream gives LZMA_FORMAT_ERROR. If non-first Stream Header gives LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is probably more appropriate. For example, the Stream decoder in liblzma uses LZMA_DATA_ERROR if LZMA_FORMAT_ERROR is returned by lzma_stream_header_decode() when decoding non-first Stream.
-
Parameters
- - - -
[out]optionsTarget for the decoded Stream Header options.
inBeginning of the input buffer of LZMA_STREAM_HEADER_SIZE bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Decoding was successful.
  • -
  • LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given buffer cannot be Stream Header.
  • -
  • LZMA_DATA_ERROR: CRC32 doesn't match, thus the header is corrupt.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported options are present in the header.
  • -
-
- -
-
- -

◆ lzma_stream_footer_decode()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_footer_decode (lzma_stream_flagsoptions,
const uint8_t * in 
)
-
- -

Decode Stream Footer.

-
Note
If Stream Header was already decoded successfully, but decoding Stream Footer returns LZMA_FORMAT_ERROR, the application should probably report some other error message than "file format not recognized". The file likely is corrupt (possibly truncated). The Stream decoder in liblzma uses LZMA_DATA_ERROR in this situation.
-
Parameters
- - - -
[out]optionsTarget for the decoded Stream Footer options.
inBeginning of the input buffer of LZMA_STREAM_HEADER_SIZE bytes.
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Decoding was successful.
  • -
  • LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given buffer cannot be Stream Footer.
  • -
  • LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer is corrupt.
  • -
  • LZMA_OPTIONS_ERROR: Unsupported options are present in Stream Footer.
  • -
-
- -
-
- -

◆ lzma_stream_flags_compare()

- -
-
- - - - - - - - - - - - - - - - - - -
lzma_ret lzma_stream_flags_compare (const lzma_stream_flagsa,
const lzma_stream_flagsb 
)
-
- -

Compare two lzma_stream_flags structures.

-

backward_size values are compared only if both are not LZMA_VLI_UNKNOWN.

-
Parameters
- - - -
aPointer to lzma_stream_flags structure
bPointer to lzma_stream_flags structure
-
-
-
Returns
Possible lzma_ret values:
    -
  • LZMA_OK: Both are equal. If either had backward_size set to LZMA_VLI_UNKNOWN, backward_size values were not compared or validated.
  • -
  • LZMA_DATA_ERROR: The structures differ.
  • -
  • LZMA_OPTIONS_ERROR: version in either structure is greater than the maximum supported version (currently zero).
  • -
  • LZMA_PROG_ERROR: Invalid value, e.g. invalid check or backward_size.
  • -
-
- -
-
-
- - - - diff --git a/doc/api/structlzma__allocator.html b/doc/api/structlzma__allocator.html deleted file mode 100644 index 593647b..0000000 --- a/doc/api/structlzma__allocator.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_allocator Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_allocator Struct Reference
-
-
- -

Custom functions for memory handling. - More...

- -

#include <base.h>

- - - - - - - - - - - -

-Data Fields

void *(* alloc )(void *opaque, size_t nmemb, size_t size)
 Pointer to a custom memory allocation function.
 
void(* free )(void *opaque, void *ptr)
 Pointer to a custom memory freeing function.
 
void * opaque
 Pointer passed to .alloc() and .free()
 
-

Detailed Description

-

Custom functions for memory handling.

-

A pointer to lzma_allocator may be passed via lzma_stream structure to liblzma, and some advanced functions take a pointer to lzma_allocator as a separate function argument. The library will use the functions specified in lzma_allocator for memory handling instead of the default malloc() and free(). C++ users should note that the custom memory handling functions must not throw exceptions.

-

Single-threaded mode only: liblzma doesn't make an internal copy of lzma_allocator. Thus, it is OK to change these function pointers in the middle of the coding process, but obviously it must be done carefully to make sure that the replacement `free' can deallocate memory allocated by the earlier `alloc' function(s).

-

Multithreaded mode: liblzma might internally store pointers to the lzma_allocator given via the lzma_stream structure. The application must not change the allocator pointer in lzma_stream or the contents of the pointed lzma_allocator structure until lzma_end() has been used to free the memory associated with that lzma_stream. The allocation functions might be called simultaneously from multiple threads, and thus they must be thread safe.

-

Field Documentation

- -

◆ alloc

- -
-
- - - - -
void *(* lzma_allocator::alloc) (void *opaque, size_t nmemb, size_t size)
-
- -

Pointer to a custom memory allocation function.

-

If you don't want a custom allocator, but still want custom free(), set this to NULL and liblzma will use the standard malloc().

-
Parameters
- - - - -
opaquelzma_allocator.opaque (see below)
nmembNumber of elements like in calloc(). liblzma will always set nmemb to 1, so it is safe to ignore nmemb in a custom allocator if you like. The nmemb argument exists only for compatibility with zlib and libbzip2.
sizeSize of an element in bytes. liblzma never sets this to zero.
-
-
-
Returns
Pointer to the beginning of a memory block of `size' bytes, or NULL if allocation fails for some reason. When allocation fails, functions of liblzma return LZMA_MEM_ERROR.
-

The allocator should not waste time zeroing the allocated buffers. This is not only about speed, but also memory usage, since the operating system kernel doesn't necessarily allocate the requested memory in physical memory until it is actually used. With small input files, liblzma may actually need only a fraction of the memory that it requested for allocation.

-
Note
LZMA_MEM_ERROR is also used when the size of the allocation would be greater than SIZE_MAX. Thus, don't assume that the custom allocator must have returned NULL if some function from liblzma returns LZMA_MEM_ERROR.
- -
-
- -

◆ free

- -
-
- - - - -
void(* lzma_allocator::free) (void *opaque, void *ptr)
-
- -

Pointer to a custom memory freeing function.

-

If you don't want a custom freeing function, but still want a custom allocator, set this to NULL and liblzma will use the standard free().

-
Parameters
- - - -
opaquelzma_allocator.opaque (see below)
ptrPointer returned by lzma_allocator.alloc(), or when it is set to NULL, a pointer returned by the standard malloc().
-
-
- -
-
- -

◆ opaque

- -
-
- - - - -
void* lzma_allocator::opaque
-
- -

Pointer passed to .alloc() and .free()

-

opaque is passed as the first argument to lzma_allocator.alloc() and lzma_allocator.free(). This intended to ease implementing custom memory allocation functions for use with liblzma.

-

If you don't need this, you should set this to NULL.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__block.html b/doc/api/structlzma__block.html deleted file mode 100644 index 69aa245..0000000 --- a/doc/api/structlzma__block.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_block Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_block Struct Reference
-
-
- -

Options for the Block and Block Header encoders and decoders. - More...

- -

#include <block.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

uint32_t version
 Block format version.
 
uint32_t header_size
 Size of the Block Header field in bytes.
 
lzma_check check
 Type of integrity Check.
 
lzma_vli compressed_size
 Size of the Compressed Data in bytes.
 
lzma_vli uncompressed_size
 Uncompressed Size in bytes.
 
lzma_filterfilters
 Array of filters.
 
uint8_t raw_check [LZMA_CHECK_SIZE_MAX]
 Raw value stored in the Check field.
 
lzma_bool ignore_check
 A flag to Block decoder to not verify the Check field.
 
-

Detailed Description

-

Options for the Block and Block Header encoders and decoders.

-

Different Block handling functions use different parts of this structure. Some read some members, other functions write, and some do both. Only the members listed for reading need to be initialized when the specified functions are called. The members marked for writing will be assigned new values at some point either by calling the given function or by later calls to lzma_code().

-

Field Documentation

- -

◆ version

- -
-
- - - - -
uint32_t lzma_block::version
-
- -

Block format version.

-

To prevent API and ABI breakages when new features are needed, a version number is used to indicate which members in this structure are in use:

    -
  • liblzma >= 5.0.0: version = 0 is supported.
  • -
  • liblzma >= 5.1.4beta: Support for version = 1 was added, which adds the ignore_check member.
  • -
-

If version is greater than one, most Block related functions will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works with any version value).

-

Read by:

-

Written by:

- -
-
- -

◆ header_size

- -
-
- - - - -
uint32_t lzma_block::header_size
-
-
- -

◆ check

- -
-
- - - - -
lzma_check lzma_block::check
-
- -

Type of integrity Check.

-

The Check ID is not stored into the Block Header, thus its value must be provided also when decoding.

-

Read by:

- -
-
- -

◆ compressed_size

- -
-
- - - - -
lzma_vli lzma_block::compressed_size
-
- -

Size of the Compressed Data in bytes.

-

Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder will store this value to the Block Header. Block encoder doesn't care about this value, but will set it once the encoding has been finished.

-

Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will verify that the size of the Compressed Data field matches compressed_size.

-

Usually you don't know this value when encoding in streamed mode, and thus cannot write this field into the Block Header.

-

In non-streamed mode you can reserve space for this field before encoding the actual Block. After encoding the data, finish the Block by encoding the Block Header. Steps in detail:

-
    -
  • Set compressed_size to some big enough value. If you don't know better, use LZMA_VLI_MAX, but remember that bigger values take more space in Block Header.
  • -
  • Call lzma_block_header_size() to see how much space you need to reserve for the Block Header.
  • -
  • Encode the Block using lzma_block_encoder() and lzma_code(). It sets compressed_size to the correct value.
  • -
  • Use lzma_block_header_encode() to encode the Block Header. Because space was reserved in the first step, you don't need to call lzma_block_header_size() anymore, because due to reserving, header_size has to be big enough. If it is "too big", lzma_block_header_encode() will add enough Header Padding to make Block Header to match the size specified by header_size.
  • -
-

Read by:

-

Written by:

- -
-
- -

◆ uncompressed_size

- -
-
- - - - -
lzma_vli lzma_block::uncompressed_size
-
- -

Uncompressed Size in bytes.

-

This is handled very similarly to compressed_size above.

-

uncompressed_size is needed by fewer functions than compressed_size. This is because uncompressed_size isn't needed to validate that Block stays within proper limits.

-

Read by:

-

Written by:

- -
-
- -

◆ filters

- -
-
- - - - -
lzma_filter* lzma_block::filters
-
- -

Array of filters.

-

There can be 1-4 filters. The end of the array is marked with .id = LZMA_VLI_UNKNOWN.

-

Read by:

-

Written by:

    -
  • lzma_block_header_decode(): Note that this does NOT free() the old filter options structures. All unused filters[] will have .id == LZMA_VLI_UNKNOWN and .options == NULL. If decoding fails, all filters[] are guaranteed to be LZMA_VLI_UNKNOWN and NULL.
  • -
-
Note
Because of the array is terminated with .id = LZMA_VLI_UNKNOWN, the actual array must have LZMA_FILTERS_MAX + 1 members or the Block Header decoder will overflow the buffer.
- -
-
- -

◆ raw_check

- -
-
- - - - -
uint8_t lzma_block::raw_check[LZMA_CHECK_SIZE_MAX]
-
- -

Raw value stored in the Check field.

-

After successful coding, the first lzma_check_size(check) bytes of this array contain the raw value stored in the Check field.

-

Note that CRC32 and CRC64 are stored in little endian byte order. Take it into account if you display the Check values to the user.

-

Written by:

- -
-
- -

◆ ignore_check

- -
-
- - - - -
lzma_bool lzma_block::ignore_check
-
- -

A flag to Block decoder to not verify the Check field.

-

This member is supported by liblzma >= 5.1.4beta if .version >= 1.

-

If this is set to true, the integrity check won't be calculated and verified. Unless you know what you are doing, you should leave this to false. (A reason to set this to true is when the file integrity is verified externally anyway and you want to speed up the decompression, which matters mostly when using SHA-256 as the integrity check.)

-

If .version >= 1, read by:

-

Written by (.version is ignored):

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__filter.html b/doc/api/structlzma__filter.html deleted file mode 100644 index b78081c..0000000 --- a/doc/api/structlzma__filter.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_filter Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_filter Struct Reference
-
-
- -

Filter options. - More...

- -

#include <filter.h>

- - - - - - - - -

-Data Fields

lzma_vli id
 Filter ID.
 
void * options
 Pointer to filter-specific options structure.
 
-

Detailed Description

-

Filter options.

-

This structure is used to pass a Filter ID and a pointer to the filter's options to liblzma. A few functions work with a single lzma_filter structure, while most functions expect a filter chain.

-

A filter chain is indicated with an array of lzma_filter structures. The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to be able to hold any arbitrary filter chain. This is important when using lzma_block_header_decode() from block.h, because a filter array that is too small would make liblzma write past the end of the array.

-

Field Documentation

- -

◆ id

- -
-
- - - - -
lzma_vli lzma_filter::id
-
- -

Filter ID.

-

Use constants whose name begin with `LZMA_FILTER_' to specify different filters. In an array of lzma_filter structures, use LZMA_VLI_UNKNOWN to indicate end of filters.

-
Note
This is not an enum, because on some systems enums cannot be 64-bit.
- -
-
- -

◆ options

- -
-
- - - - -
void* lzma_filter::options
-
- -

Pointer to filter-specific options structure.

-

If the filter doesn't need options, set this to NULL. If id is set to LZMA_VLI_UNKNOWN, options is ignored, and thus doesn't need be initialized.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__index__iter.html b/doc/api/structlzma__index__iter.html deleted file mode 100644 index d75595a..0000000 --- a/doc/api/structlzma__index__iter.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_index_iter Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_index_iter Struct Reference
-
-
- -

Iterator to get information about Blocks and Streams. - More...

- -

#include <index.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

-struct { 
 
   const lzma_stream_flags *   flags 
 Pointer to Stream Flags. More...
 
   lzma_vli   number 
 Stream number in the lzma_index. More...
 
   lzma_vli   block_count 
 Number of Blocks in the Stream. More...
 
   lzma_vli   compressed_offset 
 Compressed start offset of this Stream. More...
 
   lzma_vli   uncompressed_offset 
 Uncompressed start offset of this Stream. More...
 
   lzma_vli   compressed_size 
 Compressed size of this Stream. More...
 
-   lzma_vli   uncompressed_size 
 Uncompressed size of this Stream.
 
   lzma_vli   padding 
 Size of Stream Padding after this Stream. More...
 
stream 
 
-struct { 
 
   lzma_vli   number_in_file 
 Block number in the file. More...
 
   lzma_vli   compressed_file_offset 
 Compressed start offset of this Block. More...
 
   lzma_vli   uncompressed_file_offset 
 Uncompressed start offset of this Block. More...
 
   lzma_vli   number_in_stream 
 Block number in this Stream. More...
 
   lzma_vli   compressed_stream_offset 
 Compressed start offset of this Block. More...
 
   lzma_vli   uncompressed_stream_offset 
 Uncompressed start offset of this Block. More...
 
   lzma_vli   uncompressed_size 
 Uncompressed size of this Block. More...
 
   lzma_vli   unpadded_size 
 Unpadded size of this Block. More...
 
   lzma_vli   total_size 
 Total compressed size. More...
 
block 
 
-

Detailed Description

-

Iterator to get information about Blocks and Streams.

-

Field Documentation

- -

◆ flags

- -
-
- - - - -
const lzma_stream_flags* lzma_index_iter::flags
-
- -

Pointer to Stream Flags.

-

This is NULL if Stream Flags have not been set for this Stream with lzma_index_stream_flags().

- -
-
- -

◆ number

- -
-
- - - - -
lzma_vli lzma_index_iter::number
-
- -

Stream number in the lzma_index.

-

The first Stream is 1.

- -
-
- -

◆ block_count

- -
-
- - - - -
lzma_vli lzma_index_iter::block_count
-
- -

Number of Blocks in the Stream.

-

If this is zero, the block structure below has undefined values.

- -
-
- -

◆ compressed_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::compressed_offset
-
- -

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).

- -
-
- -

◆ uncompressed_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::uncompressed_offset
-
- -

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).

- -
-
- -

◆ compressed_size

- -
-
- - - - -
lzma_vli lzma_index_iter::compressed_size
-
- -

Compressed size of this Stream.

-

This includes all headers except the possible Stream Padding after this Stream.

- -
-
- -

◆ uncompressed_size

- -
-
- - - - -
lzma_vli lzma_index_iter::uncompressed_size
-
- -

Uncompressed size of this Stream.

-

Uncompressed size of this Block.

-

You should pass this to the Block decoder if you will decode this Block. It will allow the Block decoder to validate the uncompressed size.

- -
-
- -

◆ padding

- -
-
- - - - -
lzma_vli lzma_index_iter::padding
-
- -

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.

- -
-
- -

◆ number_in_file

- -
-
- - - - -
lzma_vli lzma_index_iter::number_in_file
-
- -

Block number in the file.

-

The first Block is 1.

- -
-
- -

◆ compressed_file_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::compressed_file_offset
-
- -

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.

- -
-
- -

◆ uncompressed_file_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::uncompressed_file_offset
-
- -

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).

-

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.

- -
-
- -

◆ number_in_stream

- -
-
- - - - -
lzma_vli lzma_index_iter::number_in_stream
-
- -

Block number in this Stream.

-

The first Block is 1.

- -
-
- -

◆ compressed_stream_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::compressed_stream_offset
-
- -

Compressed start offset of this Block.

-

This offset is relative to the beginning of the Stream containing this Block.

- -
-
- -

◆ uncompressed_stream_offset

- -
-
- - - - -
lzma_vli lzma_index_iter::uncompressed_stream_offset
-
- -

Uncompressed start offset of this Block.

-

This offset is relative to the beginning of the Stream containing this Block.

- -
-
- -

◆ unpadded_size

- -
-
- - - - -
lzma_vli lzma_index_iter::unpadded_size
-
- -

Unpadded size of this Block.

-

You should pass this to the Block decoder if you will decode this Block. It will allow the Block decoder to validate the unpadded size.

- -
-
- -

◆ total_size

- -
-
- - - - -
lzma_vli lzma_index_iter::total_size
-
- -

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.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__mt.html b/doc/api/structlzma__mt.html deleted file mode 100644 index 17a16cc..0000000 --- a/doc/api/structlzma__mt.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_mt Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_mt Struct Reference
-
-
- -

Multithreading options. - More...

- -

#include <container.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

uint32_t flags
 Flags.
 
-uint32_t threads
 Number of worker threads to use.
 
uint64_t block_size
 Encoder only: Maximum uncompressed size of a Block.
 
uint32_t timeout
 Timeout to allow lzma_code() to return early.
 
uint32_t preset
 Encoder only: Compression preset.
 
const lzma_filterfilters
 Encoder only: Filter chain (alternative to a preset)
 
lzma_check check
 Encoder only: Integrity check type.
 
uint64_t memlimit_threading
 Memory usage limit to reduce the number of threads.
 
uint64_t memlimit_stop
 Memory usage limit that should never be exceeded.
 
-

Detailed Description

-

Multithreading options.

-

Field Documentation

- -

◆ flags

- -
-
- - - - -
uint32_t lzma_mt::flags
-
- -

Flags.

-

Set this to zero if no flags are wanted.

-

Encoder: No flags are currently supported.

-

Decoder: Bitwise-or of zero or more of the decoder flags:

    -
  • LZMA_TELL_NO_CHECK
  • -
  • LZMA_TELL_UNSUPPORTED_CHECK
  • -
  • LZMA_TELL_ANY_CHECK
  • -
  • LZMA_IGNORE_CHECK
  • -
  • LZMA_CONCATENATED
  • -
  • LZMA_FAIL_FAST
  • -
- -
-
- -

◆ block_size

- -
-
- - - - -
uint64_t lzma_mt::block_size
-
- -

Encoder only: Maximum uncompressed size of a Block.

-

The encoder will start a new .xz Block every block_size bytes. Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code() the caller may tell liblzma to start a new Block earlier.

-

With LZMA2, a recommended block size is 2-4 times the LZMA2 dictionary size. With very small dictionaries, it is recommended to use at least 1 MiB block size for good compression ratio, even if this is more than four times the dictionary size. Note that these are only recommendations for typical use cases; feel free to use other values. Just keep in mind that using a block size less than the LZMA2 dictionary size is waste of RAM.

-

Set this to 0 to let liblzma choose the block size depending on the compression options. For LZMA2 it will be 3*dict_size or 1 MiB, whichever is more.

-

For each thread, about 3 * block_size bytes of memory will be allocated. This may change in later liblzma versions. If so, the memory usage will probably be reduced, not increased.

- -
-
- -

◆ timeout

- -
-
- - - - -
uint32_t lzma_mt::timeout
-
- -

Timeout to allow lzma_code() to return early.

-

Multithreading can make liblzma consume input and produce output in a very bursty way: it may first read a lot of input to fill internal buffers, then no input or output occurs for a while.

-

In single-threaded mode, lzma_code() won't return until it has either consumed all the input or filled the output buffer. If this is done in multithreaded mode, it may cause a call lzma_code() to take even tens of seconds, which isn't acceptable in all applications.

-

To avoid very long blocking times in lzma_code(), a timeout (in milliseconds) may be set here. If lzma_code() would block longer than this number of milliseconds, it will return with LZMA_OK. Reasonable values are 100 ms or more. The xz command line tool uses 300 ms.

-

If long blocking times are acceptable, set timeout to a special value of 0. This will disable the timeout mechanism and will make lzma_code() block until all the input is consumed or the output buffer has been filled.

-
Note
Even with a timeout, lzma_code() might sometimes take a long time to return. No timing guarantees are made.
- -
-
- -

◆ preset

- -
-
- - - - -
uint32_t lzma_mt::preset
-
- -

Encoder only: Compression preset.

-

The preset is set just like with lzma_easy_encoder(). The preset is ignored if filters below is non-NULL.

- -
-
- -

◆ filters

- -
-
- - - - -
const lzma_filter* lzma_mt::filters
-
- -

Encoder only: Filter chain (alternative to a preset)

-

If this is NULL, the preset above is used. Otherwise the preset is ignored and the filter chain specified here is used.

- -
-
- -

◆ check

- -
-
- - - - -
lzma_check lzma_mt::check
-
- -

Encoder only: Integrity check type.

-

See check.h for available checks. The xz command line tool defaults to LZMA_CHECK_CRC64, which is a good choice if you are unsure.

- -
-
- -

◆ memlimit_threading

- -
-
- - - - -
uint64_t lzma_mt::memlimit_threading
-
- -

Memory usage limit to reduce the number of threads.

-

Encoder: Ignored.

-

Decoder:

-

If the number of threads has been set so high that more than memlimit_threading bytes of memory would be needed, the number of threads will be reduced so that the memory usage will not exceed memlimit_threading bytes. However, if memlimit_threading cannot be met even in single-threaded mode, then decoding will continue in single-threaded mode and memlimit_threading may be exceeded even by a large amount. That is, memlimit_threading will never make lzma_code() return LZMA_MEMLIMIT_ERROR. To truly cap the memory usage, see memlimit_stop below.

-

Setting memlimit_threading to UINT64_MAX or a similar huge value means that liblzma is allowed to keep the whole compressed file and the whole uncompressed file in memory in addition to the memory needed by the decompressor data structures used by each thread! In other words, a reasonable value limit must be set here or it will cause problems sooner or later. If you have no idea what a reasonable value could be, try lzma_physmem() / 4 as a starting point. Setting this limit will never prevent decompression of a file; this will only reduce the number of threads.

-

If memlimit_threading is greater than memlimit_stop, then the value of memlimit_stop will be used for both.

- -
-
- -

◆ memlimit_stop

- -
-
- - - - -
uint64_t lzma_mt::memlimit_stop
-
- -

Memory usage limit that should never be exceeded.

-

Encoder: Ignored.

-

Decoder: If decompressing will need more than this amount of memory even in the single-threaded mode, then lzma_code() will return LZMA_MEMLIMIT_ERROR.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__options__bcj.html b/doc/api/structlzma__options__bcj.html deleted file mode 100644 index b962092..0000000 --- a/doc/api/structlzma__options__bcj.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_options_bcj Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_options_bcj Struct Reference
-
-
- -

Options for BCJ filters. - More...

- -

#include <bcj.h>

- - - - - -

-Data Fields

uint32_t start_offset
 Start offset for conversions.
 
-

Detailed Description

-

Options for BCJ filters.

-

The BCJ filters never change the size of the data. Specifying options for them is optional: if pointer to options is NULL, default value is used. You probably never need to specify options to BCJ filters, so just set the options pointer to NULL and be happy.

-

If options with non-default values have been specified when encoding, the same options must also be specified when decoding.

-
Note
At the moment, none of the BCJ filters support LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified, LZMA_OPTIONS_ERROR will be returned. If there is need, partial support for LZMA_SYNC_FLUSH can be added in future. Partial means that flushing would be possible only at offsets that are multiple of 2, 4, or 16 depending on the filter, except x86 which cannot be made to support LZMA_SYNC_FLUSH predictably.
-

Field Documentation

- -

◆ start_offset

- -
-
- - - - -
uint32_t lzma_options_bcj::start_offset
-
- -

Start offset for conversions.

-

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 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.

-

When the pointer to options is NULL, the default value (zero) is used.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__options__delta.html b/doc/api/structlzma__options__delta.html deleted file mode 100644 index 294586d..0000000 --- a/doc/api/structlzma__options__delta.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_options_delta Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_options_delta Struct Reference
-
-
- -

Options for the Delta filter. - More...

- -

#include <delta.h>

- - - - - - - -

-Data Fields

lzma_delta_type type
 
uint32_t dist
 Delta distance.
 
-

Detailed Description

-

Options for the Delta filter.

-

These options are needed by both encoder and decoder.

-

Field Documentation

- -

◆ type

- -
-
- - - - -
lzma_delta_type lzma_options_delta::type
-
-

For now, this must always be LZMA_DELTA_TYPE_BYTE.

- -
-
- -

◆ dist

- -
-
- - - - -
uint32_t lzma_options_delta::dist
-
- -

Delta distance.

-

With the only currently supported type, LZMA_DELTA_TYPE_BYTE, the distance is as bytes.

-

Examples:

    -
  • 16-bit stereo audio: distance = 4 bytes
  • -
  • 24-bit RGB image data: distance = 3 bytes
  • -
- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__options__lzma.html b/doc/api/structlzma__options__lzma.html deleted file mode 100644 index f8e3adf..0000000 --- a/doc/api/structlzma__options__lzma.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_options_lzma Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_options_lzma Struct Reference
-
-
- -

Options specific to the LZMA1 and LZMA2 filters. - More...

- -

#include <lzma12.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

uint32_t dict_size
 Dictionary size in bytes.
 
const uint8_t * preset_dict
 Pointer to an initial dictionary.
 
uint32_t preset_dict_size
 Size of the preset dictionary.
 
uint32_t lc
 Number of literal context bits.
 
uint32_t lp
 Number of literal position bits.
 
uint32_t pb
 Number of position bits.
 
lzma_mode mode
 
uint32_t nice_len
 Nice length of a match.
 
lzma_match_finder mf
 
uint32_t depth
 Maximum search depth in the match finder.
 
uint32_t ext_flags
 For LZMA_FILTER_LZMA1EXT: Extended flags.
 
uint32_t ext_size_low
 For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits)
 
uint32_t ext_size_high
 For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits)
 
-

Detailed Description

-

Options specific to the LZMA1 and LZMA2 filters.

-

Since LZMA1 and LZMA2 share most of the code, it's simplest to share the options structure too. For encoding, all but the reserved variables need to be initialized unless specifically mentioned otherwise. lzma_lzma_preset() can be used to get a good starting point.

-

For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.

-

Field Documentation

- -

◆ dict_size

- -
-
- - - - -
uint32_t lzma_options_lzma::dict_size
-
- -

Dictionary size in bytes.

-

Dictionary 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. Thus, the bigger the dictionary, the better the compression ratio usually is.

-

Maximum size of the dictionary depends on multiple things:

    -
  • Memory usage limit
  • -
  • Available address space (not a problem on 64-bit systems)
  • -
  • Selected match finder (encoder only)
  • -
-

Currently the maximum dictionary size for encoding is 1.5 GiB (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit systems for certain match finder implementation reasons. In the future, there may be match finders that support bigger dictionaries.

-

Decoder already supports dictionaries up to 4 GiB - 1 B (i.e. UINT32_MAX), so increasing the maximum dictionary size of the encoder won't cause problems for old decoders.

-

Because extremely small dictionaries sizes would have unneeded overhead in the decoder, the minimum dictionary size is 4096 bytes.

-
Note
When decoding, too big dictionary does no other harm than wasting memory.
- -
-
- -

◆ preset_dict

- -
-
- - - - -
const uint8_t* lzma_options_lzma::preset_dict
-
- -

Pointer to an initial dictionary.

-

It is possible to initialize the LZ77 history window using a preset dictionary. It is useful when compressing many similar, relatively small chunks of data independently from each other. The preset dictionary should contain typical strings that occur in the files being compressed. The most probable strings should be near the end of the preset dictionary.

-

This feature should be used only in special situations. For now, it works correctly only with raw encoding and decoding. Currently none of the container formats supported by liblzma allow preset dictionary when decoding, thus if you create a .xz or .lzma file with preset dictionary, it cannot be decoded with the regular decoder functions. In the future, the .xz format will likely get support for preset dictionary though.

- -
-
- -

◆ preset_dict_size

- -
-
- - - - -
uint32_t lzma_options_lzma::preset_dict_size
-
- -

Size of the preset dictionary.

-

Specifies the size of the preset dictionary. If the size is bigger than dict_size, only the last dict_size bytes are processed.

-

This variable is read only when preset_dict is not NULL. If preset_dict is not NULL but preset_dict_size is zero, no preset dictionary is used (identical to only setting preset_dict to NULL).

- -
-
- -

◆ lc

- -
-
- - - - -
uint32_t lzma_options_lzma::lc
-
- -

Number of literal context bits.

-

How many of the highest bits of the previous uncompressed eight-bit byte (also known as `literal') are taken into account when predicting the bits of the next literal.

-

E.g. in typical English text, an upper-case letter is often followed by a lower-case letter, and a lower-case letter is usually followed by another lower-case letter. In the US-ASCII character set, the highest three bits are 010 for upper-case letters and 011 for lower-case letters. When lc is at least 3, the literal coding can take advantage of this property in the uncompressed data.

-

There is a limit that applies to literal context bits and literal position bits together: lc + lp <= 4. Without this limit the decoding could become very slow, which could have security related results in some cases like email servers doing virus scanning. This limit also simplifies the internal implementation in liblzma.

-

There may be LZMA1 streams that have lc + lp > 4 (maximum possible lc would be 8). It is not possible to decode such streams with liblzma.

- -
-
- -

◆ lp

- -
-
- - - - -
uint32_t lzma_options_lzma::lp
-
- -

Number of literal position bits.

-

lp affects what kind of alignment in the uncompressed data is assumed when encoding literals. A literal is a single 8-bit byte. See pb below for more information about alignment.

- -
-
- -

◆ pb

- -
-
- - - - -
uint32_t lzma_options_lzma::pb
-
- -

Number of position bits.

-

pb affects what kind of alignment in the uncompressed data is assumed in general. The default means four-byte alignment (2^ pb =2^2=4), which is often a good choice when there's no better guess.

-

When the alignment is known, setting pb accordingly may reduce the file size a little. E.g. with text files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can improve compression slightly. For UTF-16 text, pb=1 is a good choice. If the alignment is an odd number like 3 bytes, pb=0 might be the best choice.

-

Even though the assumed alignment can be adjusted with pb and lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment. It might be worth taking into account when designing file formats that are likely to be often compressed with LZMA1 or LZMA2.

- -
-
- -

◆ mode

- -
-
- - - - -
lzma_mode lzma_options_lzma::mode
-
-

Compression mode

- -
-
- -

◆ nice_len

- -
-
- - - - -
uint32_t lzma_options_lzma::nice_len
-
- -

Nice length of a match.

-

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 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.)

-

Bigger values usually increase the compression ratio and compression time. For most files, 32 to 128 is a good value, which gives very good compression ratio at good speed.

-

The exact minimum value depends on the match finder. The maximum is 273, which is the maximum length of a match that LZMA1 and LZMA2 can encode.

- -
-
- -

◆ mf

- -
-
- - - - -
lzma_match_finder lzma_options_lzma::mf
-
-

Match finder ID

- -
-
- -

◆ depth

- -
-
- - - - -
uint32_t lzma_options_lzma::depth
-
- -

Maximum search depth in the match finder.

-

For every input byte, match finder searches through the hash chain or binary tree in a loop, each iteration going one step deeper in the chain or tree. The searching stops if

    -
  • a match of at least nice_len bytes long is found;
  • -
  • all match candidates from the hash chain or binary tree have been checked; or
  • -
  • maximum search depth is reached.
  • -
-

Maximum search depth is needed to prevent the match finder from wasting too much time in case there are lots of short match candidates. On the other hand, stopping the search before all candidates have been checked can reduce compression ratio.

-

Setting depth to zero tells liblzma to use an automatic default value, that depends on the selected match finder and nice_len. The default is in the range [4, 200] or so (it may vary between liblzma versions).

-

Using a bigger depth value than the default can increase compression ratio in some cases. There is no strict maximum value, but high values (thousands or millions) should be used with care: the encoder could remain fast enough with typical input, but malicious input could cause the match finder to slow down dramatically, possibly creating a denial of service attack.

- -
-
- -

◆ ext_flags

- -
-
- - - - -
uint32_t lzma_options_lzma::ext_flags
-
- -

For LZMA_FILTER_LZMA1EXT: Extended flags.

-

This is used only with LZMA_FILTER_LZMA1EXT.

-

Currently only one flag is supported, LZMA_LZMA1EXT_ALLOW_EOPM:

-
    -
  • Encoder: If the flag is set, then end marker is written just like it is with LZMA_FILTER_LZMA1. Without this flag the end marker isn't written and the application has to store the uncompressed size somewhere outside the compressed stream. To decompress streams without the end marker, the application has to set the correct uncompressed size in ext_size_low and ext_size_high.
  • -
  • Decoder: If the uncompressed size in ext_size_low and ext_size_high is set to the special value UINT64_MAX (indicating unknown uncompressed size) then this flag is ignored and the end marker must always be present, that is, the behavior is identical to LZMA_FILTER_LZMA1.

    -

    Otherwise, if this flag isn't set, then the input stream must not have the end marker; if the end marker is detected then it will result in LZMA_DATA_ERROR. This is useful when it is known that the stream must not have the end marker and strict validation is wanted.

    -

    If this flag is set, then it is autodetected if the end marker is present after the specified number of uncompressed bytes has been decompressed (ext_size_low and ext_size_high). The end marker isn't allowed in any other position. This behavior is useful when uncompressed size is known but the end marker may or may not be present. This is the case, for example, in .7z files (valid .7z files that have the end marker in LZMA1 streams are rare but they do exist).

    -
  • -
- -
-
- -

◆ ext_size_low

- -
-
- - - - -
uint32_t lzma_options_lzma::ext_size_low
-
- -

For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits)

-

The 64-bit uncompressed size is needed for decompression with LZMA_FILTER_LZMA1EXT. The size is ignored by the encoder.

-

The special value UINT64_MAX indicates that the uncompressed size is unknown and that the end of payload marker (also known as end of stream marker) must be present to indicate the end of the LZMA1 stream. Any other value indicates the expected uncompressed size of the LZMA1 stream. (If LZMA1 was used together with filters that change the size of the data then the uncompressed size of the LZMA1 stream could be different than the final uncompressed size of the filtered stream.)

-

ext_size_low holds the least significant 32 bits of the uncompressed size. The most significant 32 bits must be set in ext_size_high. The macro lzma_ext_size_set(opt_lzma, u64size) can be used to set these members.

-

The 64-bit uncompressed size is split into two uint32_t variables because there were no reserved uint64_t members and using the same options structure for LZMA_FILTER_LZMA1, LZMA_FILTER_LZMA1EXT, and LZMA_FILTER_LZMA2 was otherwise more convenient than having a new options structure for LZMA_FILTER_LZMA1EXT. (Replacing two uint32_t members with one uint64_t changes the ABI on some systems as the alignment of this struct can increase from 4 bytes to 8.)

- -
-
- -

◆ ext_size_high

- -
-
- - - - -
uint32_t lzma_options_lzma::ext_size_high
-
- -

For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits)

-

This holds the most significant 32 bits of the uncompressed size.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__stream.html b/doc/api/structlzma__stream.html deleted file mode 100644 index 5a0c784..0000000 --- a/doc/api/structlzma__stream.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_stream Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_stream Struct Reference
-
-
- -

Passing data to and from liblzma. - More...

- -

#include <base.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

const uint8_t * next_in
 
size_t avail_in
 
uint64_t total_in
 
uint8_t * next_out
 
size_t avail_out
 
uint64_t total_out
 
const lzma_allocatorallocator
 Custom memory allocation functions.
 
lzma_internalinternal
 
uint64_t seek_pos
 New seek input position for LZMA_SEEK_NEEDED.
 
-

Detailed Description

-

Passing data to and from liblzma.

-

The lzma_stream structure is used for

    -
  • passing pointers to input and output buffers to liblzma;
  • -
  • defining custom memory handler functions; and
  • -
  • holding a pointer to coder-specific internal data structures.
  • -
-

Typical usage:

-
    -
  • After allocating lzma_stream (on stack or with malloc()), it must be initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
  • -
  • Initialize a coder to the lzma_stream, for example by using lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
      -
    • In contrast to zlib, strm->next_in and strm->next_out are ignored by all initialization functions, thus it is safe to not initialize them yet.
    • -
    • The initialization functions always set strm->total_in and strm->total_out to zero.
    • -
    • If the initialization function fails, no memory is left allocated that would require freeing with lzma_end() even if some memory was associated with the lzma_stream structure when the initialization function was called.
    • -
    -
  • -
  • Use lzma_code() to do the actual work.
  • -
  • Once the coding has been finished, the existing lzma_stream can be reused. It is OK to reuse lzma_stream with different initialization function without calling lzma_end() first. Old allocations are automatically freed.
  • -
  • Finally, use lzma_end() to free the allocated memory. lzma_end() never frees the lzma_stream structure itself.
  • -
-

Application may modify the values of total_in and total_out as it wants. They are updated by liblzma to match the amount of data read and written but aren't used for anything else except as a possible return values from lzma_get_progress().

-

Field Documentation

- -

◆ next_in

- -
-
- - - - -
const uint8_t* lzma_stream::next_in
-
-

Pointer to the next input byte.

- -
-
- -

◆ avail_in

- -
-
- - - - -
size_t lzma_stream::avail_in
-
-

Number of available input bytes in next_in.

- -
-
- -

◆ total_in

- -
-
- - - - -
uint64_t lzma_stream::total_in
-
-

Total number of bytes read by liblzma.

- -
-
- -

◆ next_out

- -
-
- - - - -
uint8_t* lzma_stream::next_out
-
-

Pointer to the next output position.

- -
-
- -

◆ avail_out

- -
-
- - - - -
size_t lzma_stream::avail_out
-
-

Amount of free space in next_out.

- -
-
- -

◆ total_out

- -
-
- - - - -
uint64_t lzma_stream::total_out
-
-

Total number of bytes written by liblzma.

- -
-
- -

◆ allocator

- -
-
- - - - -
const lzma_allocator* lzma_stream::allocator
-
- -

Custom memory allocation functions.

-

In most cases this is NULL which makes liblzma use the standard malloc() and free().

-
Note
In 5.0.x this is not a const pointer.
- -
-
- -

◆ internal

- -
-
- - - - -
lzma_internal* lzma_stream::internal
-
-

Internal state is not visible to applications.

- -
-
- -

◆ seek_pos

- -
-
- - - - -
uint64_t lzma_stream::seek_pos
-
- -

New seek input position for LZMA_SEEK_NEEDED.

-

When lzma_code() returns LZMA_SEEK_NEEDED, the new input position needed by liblzma will be available seek_pos. The value is guaranteed to not exceed the file size that was specified when this lzma_stream was initialized.

-

In all other situations the value of this variable is undefined.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/structlzma__stream__flags.html b/doc/api/structlzma__stream__flags.html deleted file mode 100644 index 9098ff3..0000000 --- a/doc/api/structlzma__stream__flags.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma_stream_flags Struct Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - -
-
- -
lzma_stream_flags Struct Reference
-
-
- -

Options for encoding/decoding Stream Header and Stream Footer. - More...

- -

#include <stream_flags.h>

- - - - - - - - - - - -

-Data Fields

uint32_t version
 Stream Flags format version.
 
lzma_vli backward_size
 Backward Size.
 
lzma_check check
 Check ID.
 
-

Detailed Description

-

Options for encoding/decoding Stream Header and Stream Footer.

-

Field Documentation

- -

◆ version

- -
-
- - - - -
uint32_t lzma_stream_flags::version
-
- -

Stream Flags format version.

-

To prevent API and ABI breakages if new features are needed in Stream Header or Stream Footer, a version number is used to indicate which members in this structure are in use. For now, version must always be zero. With non-zero version, the lzma_stream_header_encode() and lzma_stream_footer_encode() will return LZMA_OPTIONS_ERROR.

-

lzma_stream_header_decode() and lzma_stream_footer_decode() will always set this to the lowest value that supports all the features indicated by the Stream Flags 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 Stream incorrectly.

- -
-
- -

◆ backward_size

- -
-
- - - - -
lzma_vli lzma_stream_flags::backward_size
-
- -

Backward Size.

-

Backward Size must be a multiple of four bytes. In this Stream format version, Backward Size is the size of the Index field.

-

Backward Size isn't actually part of the Stream Flags field, but it is convenient to include in this structure anyway. Backward Size is present only in the Stream Footer. There is no need to initialize backward_size when encoding Stream Header.

-

lzma_stream_header_decode() always sets backward_size to LZMA_VLI_UNKNOWN so that it is convenient to use lzma_stream_flags_compare() when both Stream Header and Stream Footer have been decoded.

- -
-
- -

◆ check

- -
-
- - - - -
lzma_check lzma_stream_flags::check
-
- -

Check ID.

-

This indicates the type of the integrity check calculated from uncompressed data.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/doc/api/sync_off.png b/doc/api/sync_off.png deleted file mode 100644 index 9b04abe..0000000 Binary files a/doc/api/sync_off.png and /dev/null differ diff --git a/doc/api/sync_on.png b/doc/api/sync_on.png deleted file mode 100644 index 34a5b8b..0000000 Binary files a/doc/api/sync_on.png and /dev/null differ diff --git a/doc/api/tab_a.png b/doc/api/tab_a.png deleted file mode 100644 index 3181cdf..0000000 Binary files a/doc/api/tab_a.png and /dev/null differ diff --git a/doc/api/tab_ad.png b/doc/api/tab_ad.png deleted file mode 100644 index 3615386..0000000 Binary files a/doc/api/tab_ad.png and /dev/null differ diff --git a/doc/api/tab_b.png b/doc/api/tab_b.png deleted file mode 100644 index 3feec4f..0000000 Binary files a/doc/api/tab_b.png and /dev/null differ diff --git a/doc/api/tab_bd.png b/doc/api/tab_bd.png deleted file mode 100644 index 9fd6635..0000000 Binary files a/doc/api/tab_bd.png and /dev/null differ diff --git a/doc/api/tab_h.png b/doc/api/tab_h.png deleted file mode 100644 index abb3d3d..0000000 Binary files a/doc/api/tab_h.png and /dev/null differ diff --git a/doc/api/tab_hd.png b/doc/api/tab_hd.png deleted file mode 100644 index c59e413..0000000 Binary files a/doc/api/tab_hd.png and /dev/null differ diff --git a/doc/api/tab_s.png b/doc/api/tab_s.png deleted file mode 100644 index a3f26f5..0000000 Binary files a/doc/api/tab_s.png and /dev/null differ diff --git a/doc/api/tab_sd.png b/doc/api/tab_sd.png deleted file mode 100644 index 5d4917a..0000000 Binary files a/doc/api/tab_sd.png and /dev/null differ diff --git a/doc/api/tabs.css b/doc/api/tabs.css deleted file mode 100644 index b56f46e..0000000 --- a/doc/api/tabs.css +++ /dev/null @@ -1,62 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: var(--nav-gradient-image); - width: 100%; - z-index: 101; - font-size: var(--nav-font-size-level1); - font-family: var(--font-family-nav); - display: table; -} - -.tabs2 { - font-size: var(--nav-font-size-level2); -} -.tabs3 { - font-size: var(--nav-font-size-level3); -} - -.tablist { - margin: 0; - padding: 0; - display: block; -} - -.tablist li { - float: left; - display: table-cell; - background-image: var(--nav-gradient-image); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:var(--nav-separator-image); - background-repeat:no-repeat; - background-position:right; - color: var(--nav-text-normal-color); - text-shadow: var(--nav-text-normal-shadow); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: var(--nav-gradient-hover-image); - background-repeat:repeat-x; - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); - text-decoration: none; -} - -.tablist li.current a { - background-image: var(--nav-gradient-active-image); - background-repeat:repeat-x; - color: var(--nav-text-active-color); - text-shadow: var(--nav-text-active-shadow); -} - diff --git a/doc/api/version_8h.html b/doc/api/version_8h.html deleted file mode 100644 index fd27466..0000000 --- a/doc/api/version_8h.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/version.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
version.h File Reference
-
-
- -

Version number. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

-#define LZMA_VERSION_MAJOR   5
 Major version number of the liblzma release.
 
-#define LZMA_VERSION_MINOR   4
 Minor version number of the liblzma release.
 
-#define LZMA_VERSION_PATCH   5
 Patch version number of the liblzma release.
 
#define LZMA_VERSION_STABILITY   LZMA_VERSION_STABILITY_STABLE
 Version stability marker.
 
-#define LZMA_VERSION_COMMIT   ""
 Commit version number of the liblzma release.
 
-#define LZMA_VERSION_STABILITY_ALPHA   0
 
-#define LZMA_VERSION_STABILITY_BETA   1
 
-#define LZMA_VERSION_STABILITY_STABLE   2
 
#define LZMA_VERSION
 Compile-time version number.
 
-#define LZMA_VERSION_STABILITY_STRING   "alpha"
 
-#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)    #major "." #minor "." #patch stability commit
 
-#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit)    LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
 
#define LZMA_VERSION_STRING
 Compile-time version as a string.
 
- - - - - - - -

-Functions

uint32_t lzma_version_number (void) lzma_nothrow lzma_attr_const
 Run-time version number as an integer.
 
const char * lzma_version_string (void) lzma_nothrow lzma_attr_const
 Run-time version as a string.
 
-

Detailed Description

-

Version number.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

Macro Definition Documentation

- -

◆ LZMA_VERSION_STABILITY

- -
-
- - - - -
#define LZMA_VERSION_STABILITY   LZMA_VERSION_STABILITY_STABLE
-
- -

Version stability marker.

-

This will always be one of three values:

    -
  • LZMA_VERSION_STABILITY_ALPHA
  • -
  • LZMA_VERSION_STABILITY_BETA
  • -
  • LZMA_VERSION_STABILITY_STABLE
  • -
- -
-
- -

◆ LZMA_VERSION

- -
-
- - - - -
#define LZMA_VERSION
-
-Value:
(LZMA_VERSION_MAJOR * UINT32_C(10000000) \
-
+ LZMA_VERSION_MINOR * UINT32_C(10000) \
-
+ LZMA_VERSION_PATCH * UINT32_C(10) \
- -
-

Compile-time version number.

-

The version number is of format xyyyzzzs where

    -
  • x = major
  • -
  • yyy = minor
  • -
  • zzz = revision
  • -
  • s indicates stability: 0 = alpha, 1 = beta, 2 = stable
  • -
-

The same xyyyzzz triplet is never reused with different stability levels. For example, if 5.1.0alpha has been released, there will never be 5.1.0beta or 5.1.0 stable.

-
Note
The version number of liblzma has nothing to with the version number of Igor Pavlov's LZMA SDK.
- -
-
- -

◆ LZMA_VERSION_STRING

- -
-
- - - - -
#define LZMA_VERSION_STRING
-
-Value:
LZMA_VERSION_STRING_C( \
- -
LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
- -
-

Compile-time version as a string.

-

This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable versions don't have any "stable" suffix). In future, a snapshot built from source code repository may include an additional suffix, for example "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form in LZMA_VERSION macro.

- -
-
-

Function Documentation

- -

◆ lzma_version_number()

- -
-
- - - - - - - - -
uint32_t lzma_version_number (void ) const
-
- -

Run-time version number as an integer.

-

This allows an application to compare if it was built against the same, older, or newer version of liblzma that is currently running.

-
Returns
The value of LZMA_VERSION macro at the compile time of liblzma
- -
-
- -

◆ lzma_version_string()

- -
-
- - - - - - - - -
const char * lzma_version_string (void ) const
-
- -

Run-time version as a string.

-

This function may be useful to display which version of liblzma an application is currently using.

-
Returns
Run-time version of liblzma
- -
-
-
- - - - diff --git a/doc/api/vli_8h.html b/doc/api/vli_8h.html deleted file mode 100644 index 4e3da1f..0000000 --- a/doc/api/vli_8h.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - -liblzma (XZ Utils): lzma/vli.h File Reference - - - - - - -
-
- - - - - - -
-
liblzma (XZ Utils) 5.4.5 -
-
-
- - - - - -
-
- -
vli.h File Reference
-
-
- -

Variable-length integer handling. -More...

- - - - - - - - - - - - - - - - - -

-Macros

-#define LZMA_VLI_MAX   (UINT64_MAX / 2)
 Maximum supported value of a variable-length integer.
 
-#define LZMA_VLI_UNKNOWN   UINT64_MAX
 VLI value to denote that the value is unknown.
 
-#define LZMA_VLI_BYTES_MAX   9
 Maximum supported encoded length of variable length integers.
 
-#define LZMA_VLI_C(n)   UINT64_C(n)
 VLI constant suffix.
 
#define lzma_vli_is_valid(vli)    ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
 Validate a variable-length integer.
 
- - - - -

-Typedefs

typedef uint64_t lzma_vli
 Variable-length integer type.
 
- - - - - - - - - - -

-Functions

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
 Encode a variable-length integer.
 
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
 Decode a variable-length integer.
 
uint32_t lzma_vli_size (lzma_vli vli) lzma_nothrow lzma_attr_pure
 Get the number of bytes required to encode a VLI.
 
-

Detailed Description

-

Variable-length integer handling.

-
Note
Never include this file directly. Use <lzma.h> instead.
-

In the .xz format, most integers are encoded in a variable-length representation, which is sometimes called little endian base-128 encoding. This saves space when smaller values are more likely than bigger values.

-

The encoding scheme encodes seven bits to every byte, using minimum 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 less than or equal to UINT64_MAX / 2. You should use LZMA_VLI_MAX for clarity.

-

Macro Definition Documentation

- -

◆ lzma_vli_is_valid

- -
-
- - - - - - - - -
#define lzma_vli_is_valid( vli)    ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
-
- -

Validate a variable-length integer.

-

This is useful to test that application has given acceptable values for example in the uncompressed_size and compressed_size variables.

-
Returns
True if the integer is representable as VLI or if it indicates unknown value. False if the integer cannot be represented as VLI.
- -
-
-

Typedef Documentation

- -

◆ lzma_vli

- -
-
- - - - -
typedef uint64_t lzma_vli
-
- -

Variable-length integer type.

-

Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the underlying integer type.

-

lzma_vli will be uint64_t for the foreseeable future. If a bigger size is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli. This simplifies integer overflow detection.

- -
-
-

Function Documentation

- -

◆ lzma_vli_encode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_vli_encode (lzma_vli vli,
size_t * vli_pos,
uint8_t * out,
size_t * out_pos,
size_t out_size 
)
-
- -

Encode a variable-length integer.

-

This function has two modes: single-call and multi-call. Single-call mode encodes the whole integer at once; it is an error if the output buffer is too small. Multi-call mode saves the position in *vli_pos, and thus it is possible to continue encoding if the buffer becomes full before the whole integer has been encoded.

-
Parameters
- - - - - - -
vliInteger to be encoded
[out]vli_posHow many VLI-encoded bytes have already been written out. When starting to encode a new integer in multi-call mode, *vli_pos must be set to zero. To use single-call encoding, set vli_pos to NULL.
[out]outBeginning of the output buffer
[out]out_posThe next byte will be written to out[*out_pos].
out_sizeSize of the out buffer; the first byte into which no data is written to is out[out_size].
-
-
-
Returns
Slightly different return values are used in multi-call and single-call modes.
-

Single-call (vli_pos == NULL):

    -
  • LZMA_OK: Integer successfully encoded.
  • -
  • LZMA_PROG_ERROR: Arguments are not sane. This can be due to too little output space; single-call mode doesn't use LZMA_BUF_ERROR, since the application should have checked the encoded size with lzma_vli_size().
  • -
-

Multi-call (vli_pos != NULL):

    -
  • LZMA_OK: So far all OK, but the integer is not completely written out yet.
  • -
  • LZMA_STREAM_END: Integer successfully encoded.
  • -
  • LZMA_BUF_ERROR: No output space was provided.
  • -
  • LZMA_PROG_ERROR: Arguments are not sane.
  • -
- -
-
- -

◆ lzma_vli_decode()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lzma_ret lzma_vli_decode (lzma_vlivli,
size_t * vli_pos,
const uint8_t * in,
size_t * in_pos,
size_t in_size 
)
-
- -

Decode a variable-length integer.

-

Like lzma_vli_encode(), this function has single-call and multi-call modes.

-
Parameters
- - - - - - -
[out]vliPointer to decoded integer. The decoder will initialize it to zero when *vli_pos == 0, so application isn't required to initialize *vli.
[out]vli_posHow many bytes have already been decoded. When starting to decode a new integer in multi-call mode, *vli_pos must be initialized to zero. To use single-call decoding, set vli_pos to NULL.
inBeginning of the input buffer
[out]in_posThe next byte will be read from in[*in_pos].
in_sizeSize of the input buffer; the first byte that won't be read is in[in_size].
-
-
-
Returns
Slightly different return values are used in multi-call and single-call modes.
-

Single-call (vli_pos == NULL):

    -
  • LZMA_OK: Integer successfully decoded.
  • -
  • LZMA_DATA_ERROR: Integer is corrupt. This includes hitting the end of the input buffer before the whole integer was decoded; providing no input at all will use LZMA_DATA_ERROR.
  • -
  • LZMA_PROG_ERROR: Arguments are not sane.
  • -
-

Multi-call (vli_pos != NULL):

    -
  • LZMA_OK: So far all OK, but the integer is not completely decoded yet.
  • -
  • LZMA_STREAM_END: Integer successfully decoded.
  • -
  • LZMA_DATA_ERROR: Integer is corrupt.
  • -
  • LZMA_BUF_ERROR: No input was provided.
  • -
  • LZMA_PROG_ERROR: Arguments are not sane.
  • -
- -
-
- -

◆ lzma_vli_size()

- -
-
- - - - - - - - -
uint32_t lzma_vli_size (lzma_vli vli)
-
- -

Get the number of bytes required to encode a VLI.

-
Parameters
- - -
vliInteger whose encoded size is to be determined
-
-
-
Returns
Number of bytes on success (1-9). If vli isn't valid, zero is returned.
- -
-
-
- - - - diff --git a/doc/examples/01_compress_easy.c b/doc/examples/01_compress_easy.c index ec32a37..31bcf92 100644 --- a/doc/examples/01_compress_easy.c +++ b/doc/examples/01_compress_easy.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file 01_compress_easy.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include @@ -27,7 +26,7 @@ show_usage_and_exit(const char *argv0) { fprintf(stderr, "Usage: %s PRESET < INFILE > OUTFILE\n" "PRESET is a number 0-9 and can optionally be " - "followed by `e' to indicate extreme preset\n", + "followed by 'e' to indicate extreme preset\n", argv0); exit(EXIT_FAILURE); } diff --git a/doc/examples/02_decompress.c b/doc/examples/02_decompress.c index 98339be..a87a5d3 100644 --- a/doc/examples/02_decompress.c +++ b/doc/examples/02_decompress.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file 02_decompress.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include diff --git a/doc/examples/03_compress_custom.c b/doc/examples/03_compress_custom.c index 40c85e3..57797b8 100644 --- a/doc/examples/03_compress_custom.c +++ b/doc/examples/03_compress_custom.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file 03_compress_custom.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include diff --git a/doc/examples/04_compress_easy_mt.c b/doc/examples/04_compress_easy_mt.c index efe5697..c721a66 100644 --- a/doc/examples/04_compress_easy_mt.c +++ b/doc/examples/04_compress_easy_mt.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: 0BSD + /////////////////////////////////////////////////////////////////////////////// // /// \file 04_compress_easy_mt.c @@ -9,9 +11,6 @@ // // Author: Lasse Collin // -// This file has been put into the public domain. -// You can do whatever you want with this file. -// /////////////////////////////////////////////////////////////////////////////// #include diff --git a/doc/examples/11_file_info.c b/doc/examples/11_file_info.c new file mode 100644 index 0000000..caadd98 --- /dev/null +++ b/doc/examples/11_file_info.c @@ -0,0 +1,205 @@ +// SPDX-License-Identifier: 0BSD + +/////////////////////////////////////////////////////////////////////////////// +// +/// \file 11_file_info.c +/// \brief Get uncompressed size of .xz file(s) +/// +/// Usage: ./11_file_info INFILE1.xz [INFILEn.xz]... +/// +/// Example: ./11_file_info foo.xz +// +// Author: Lasse Collin +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include + + +static bool +print_file_size(lzma_stream *strm, FILE *infile, const char *filename) +{ + // Get the file size. In standard C it can be done by seeking to + // the end of the file and then getting the file position. + // In POSIX one can use fstat() and then st_size from struct stat. + // Also note that fseek() and ftell() use long and thus don't support + // large files on 32-bit systems (POSIX versions fseeko() and + // ftello() can support large files). + if (fseek(infile, 0, SEEK_END)) { + fprintf(stderr, "Error seeking the file '%s': %s\n", + filename, strerror(errno)); + return false; + } + + const long file_size = ftell(infile); + + // The decoder wants to start from the beginning of the .xz file. + rewind(infile); + + // Initialize the decoder. + lzma_index *i; + lzma_ret ret = lzma_file_info_decoder(strm, &i, UINT64_MAX, + (uint64_t)file_size); + switch (ret) { + case LZMA_OK: + // Initialization succeeded. + break; + + case LZMA_MEM_ERROR: + fprintf(stderr, "Out of memory when initializing " + "the .xz file info decoder\n"); + return false; + + case LZMA_PROG_ERROR: + default: + fprintf(stderr, "Unknown error, possibly a bug\n"); + return false; + } + + // This example program reuses the same lzma_stream structure + // for multiple files, so we need to reset this when starting + // a new file. + strm->avail_in = 0; + + // Buffer for input data. + uint8_t inbuf[BUFSIZ]; + + // Pass data to the decoder and seek when needed. + while (true) { + if (strm->avail_in == 0) { + strm->next_in = inbuf; + strm->avail_in = fread(inbuf, 1, sizeof(inbuf), + infile); + + if (ferror(infile)) { + fprintf(stderr, + "Error reading from '%s': %s\n", + filename, strerror(errno)); + return false; + } + + // We don't need to care about hitting the end of + // the file so no need to check for feof(). + } + + ret = lzma_code(strm, LZMA_RUN); + + switch (ret) { + case LZMA_OK: + break; + + case LZMA_SEEK_NEEDED: + // The cast is safe because liblzma won't ask us to + // seek past the known size of the input file which + // did fit into a long. + // + // NOTE: Remember to change these to off_t if you + // switch fseeko() or lseek(). + if (fseek(infile, (long)(strm->seek_pos), SEEK_SET)) { + fprintf(stderr, "Error seeking the " + "file '%s': %s\n", + filename, strerror(errno)); + return false; + } + + // The old data in the inbuf is useless now. Set + // avail_in to zero so that we will read new input + // from the new file position on the next iteration + // of this loop. + strm->avail_in = 0; + break; + + case LZMA_STREAM_END: + // File information was successfully decoded. + // See for functions that can be + // used on it. In this example we just print + // the uncompressed size (in bytes) of + // the .xz file followed by its file name. + printf("%10" PRIu64 " %s\n", + lzma_index_uncompressed_size(i), + filename); + + // Free the memory of the lzma_index structure. + lzma_index_end(i, NULL); + + return true; + + case LZMA_FORMAT_ERROR: + // .xz magic bytes weren't found. + fprintf(stderr, "The file '%s' is not " + "in the .xz format\n", filename); + return false; + + case LZMA_OPTIONS_ERROR: + fprintf(stderr, "The file '%s' has .xz headers that " + "are not supported by this liblzma " + "version\n", filename); + return false; + + case LZMA_DATA_ERROR: + fprintf(stderr, "The file '%s' is corrupt\n", + filename); + return false; + + case LZMA_MEM_ERROR: + fprintf(stderr, "Memory allocation failed when " + "decoding the file '%s'\n", filename); + return false; + + // LZMA_MEMLIMIT_ERROR shouldn't happen because we used + // UINT64_MAX as the limit. + // + // LZMA_BUF_ERROR shouldn't happen because we always provide + // new input when the input buffer is empty. The decoder + // knows the input file size and thus won't try to read past + // the end of the file. + case LZMA_MEMLIMIT_ERROR: + case LZMA_BUF_ERROR: + case LZMA_PROG_ERROR: + default: + fprintf(stderr, "Unknown error, possibly a bug\n"); + return false; + } + } + + // This line is never reached. +} + + +extern int +main(int argc, char **argv) +{ + bool success = true; + lzma_stream strm = LZMA_STREAM_INIT; + + for (int i = 1; i < argc; ++i) { + FILE *infile = fopen(argv[i], "rb"); + + if (infile == NULL) { + fprintf(stderr, "Cannot open the file '%s': %s\n", + argv[i], strerror(errno)); + success = false; + } + + success &= print_file_size(&strm, infile, argv[i]); + + (void)fclose(infile); + } + + lzma_end(&strm); + + // Close stdout to catch possible write errors that can occur + // when pending data is flushed from the stdio buffers. + if (fclose(stdout)) { + fprintf(stderr, "Write error: %s\n", strerror(errno)); + success = false; + } + + return success ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/doc/examples/Makefile b/doc/examples/Makefile index e8839d8..f5b9878 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -1,9 +1,5 @@ -# +# SPDX-License-Identifier: 0BSD # Author: Lasse Collin -# -# This file has been put into the public domain. -# You can do whatever you want with this file. -# CC = c99 CFLAGS = -g diff --git a/doc/examples_old/xz_pipe_comp.c b/doc/examples_old/xz_pipe_comp.c deleted file mode 100644 index 9f9224b..0000000 --- a/doc/examples_old/xz_pipe_comp.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * xz_pipe_comp.c - * A simple example of pipe-only xz compressor implementation. - * version: 2010-07-12 - by Daniel Mealha Cabrita - * Not copyrighted -- provided to the public domain. - * - * Compiling: - * Link with liblzma. GCC example: - * $ gcc -llzma xz_pipe_comp.c -o xz_pipe_comp - * - * Usage example: - * $ cat some_file | ./xz_pipe_comp > some_file.xz - */ - -#include -#include -#include -#include -#include - - -/* COMPRESSION SETTINGS */ - -/* analogous to xz CLI options: -0 to -9 */ -#define COMPRESSION_LEVEL 6 - -/* boolean setting, analogous to xz CLI option: -e */ -#define COMPRESSION_EXTREME true - -/* see: /usr/include/lzma/check.h LZMA_CHECK_* */ -#define INTEGRITY_CHECK LZMA_CHECK_CRC64 - - -/* read/write buffer sizes */ -#define IN_BUF_MAX 4096 -#define OUT_BUF_MAX 4096 - -/* error codes */ -#define RET_OK 0 -#define RET_ERROR_INIT 1 -#define RET_ERROR_INPUT 2 -#define RET_ERROR_OUTPUT 3 -#define RET_ERROR_COMPRESSION 4 - - -/* note: in_file and out_file must be open already */ -int xz_compress (FILE *in_file, FILE *out_file) -{ - uint32_t preset = COMPRESSION_LEVEL | (COMPRESSION_EXTREME ? LZMA_PRESET_EXTREME : 0); - lzma_check check = INTEGRITY_CHECK; - lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */ - uint8_t in_buf [IN_BUF_MAX]; - uint8_t out_buf [OUT_BUF_MAX]; - size_t in_len; /* length of useful data in in_buf */ - size_t out_len; /* length of useful data in out_buf */ - bool in_finished = false; - bool out_finished = false; - lzma_action action; - lzma_ret ret_xz; - int ret; - - ret = RET_OK; - - /* initialize xz encoder */ - ret_xz = lzma_easy_encoder (&strm, preset, check); - if (ret_xz != LZMA_OK) { - fprintf (stderr, "lzma_easy_encoder error: %d\n", (int) ret_xz); - return RET_ERROR_INIT; - } - - while ((! in_finished) && (! out_finished)) { - /* read incoming data */ - in_len = fread (in_buf, 1, IN_BUF_MAX, in_file); - - if (feof (in_file)) { - in_finished = true; - } - if (ferror (in_file)) { - in_finished = true; - ret = RET_ERROR_INPUT; - } - - strm.next_in = in_buf; - strm.avail_in = in_len; - - /* if no more data from in_buf, flushes the - internal xz buffers and closes the xz data - with LZMA_FINISH */ - action = in_finished ? LZMA_FINISH : LZMA_RUN; - - /* loop until there's no pending compressed output */ - do { - /* out_buf is clean at this point */ - strm.next_out = out_buf; - strm.avail_out = OUT_BUF_MAX; - - /* compress data */ - ret_xz = lzma_code (&strm, action); - - if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) { - fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz); - out_finished = true; - ret = RET_ERROR_COMPRESSION; - } else { - /* write compressed data */ - out_len = OUT_BUF_MAX - strm.avail_out; - fwrite (out_buf, 1, out_len, out_file); - if (ferror (out_file)) { - out_finished = true; - ret = RET_ERROR_OUTPUT; - } - } - } while (strm.avail_out == 0); - } - - lzma_end (&strm); - return ret; -} - -int main () -{ - int ret; - - ret = xz_compress (stdin, stdout); - return ret; -} - diff --git a/doc/examples_old/xz_pipe_decomp.c b/doc/examples_old/xz_pipe_decomp.c deleted file mode 100644 index fb5ad89..0000000 --- a/doc/examples_old/xz_pipe_decomp.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * xz_pipe_decomp.c - * A simple example of pipe-only xz decompressor implementation. - * version: 2012-06-14 - by Daniel Mealha Cabrita - * Not copyrighted -- provided to the public domain. - * - * Compiling: - * Link with liblzma. GCC example: - * $ gcc -llzma xz_pipe_decomp.c -o xz_pipe_decomp - * - * Usage example: - * $ cat some_file.xz | ./xz_pipe_decomp > some_file - */ - -#include -#include -#include -#include -#include - - -/* read/write buffer sizes */ -#define IN_BUF_MAX 4096 -#define OUT_BUF_MAX 4096 - -/* error codes */ -#define RET_OK 0 -#define RET_ERROR_INIT 1 -#define RET_ERROR_INPUT 2 -#define RET_ERROR_OUTPUT 3 -#define RET_ERROR_DECOMPRESSION 4 - - -/* note: in_file and out_file must be open already */ -int xz_decompress (FILE *in_file, FILE *out_file) -{ - lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */ - const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK | LZMA_CONCATENATED; - const uint64_t memory_limit = UINT64_MAX; /* no memory limit */ - uint8_t in_buf [IN_BUF_MAX]; - uint8_t out_buf [OUT_BUF_MAX]; - size_t in_len; /* length of useful data in in_buf */ - size_t out_len; /* length of useful data in out_buf */ - bool in_finished = false; - bool out_finished = false; - lzma_action action; - lzma_ret ret_xz; - int ret; - - ret = RET_OK; - - /* initialize xz decoder */ - ret_xz = lzma_stream_decoder (&strm, memory_limit, flags); - if (ret_xz != LZMA_OK) { - fprintf (stderr, "lzma_stream_decoder error: %d\n", (int) ret_xz); - return RET_ERROR_INIT; - } - - while ((! in_finished) && (! out_finished)) { - /* read incoming data */ - in_len = fread (in_buf, 1, IN_BUF_MAX, in_file); - - if (feof (in_file)) { - in_finished = true; - } - if (ferror (in_file)) { - in_finished = true; - ret = RET_ERROR_INPUT; - } - - strm.next_in = in_buf; - strm.avail_in = in_len; - - /* if no more data from in_buf, flushes the - internal xz buffers and closes the decompressed data - with LZMA_FINISH */ - action = in_finished ? LZMA_FINISH : LZMA_RUN; - - /* loop until there's no pending decompressed output */ - do { - /* out_buf is clean at this point */ - strm.next_out = out_buf; - strm.avail_out = OUT_BUF_MAX; - - /* decompress data */ - ret_xz = lzma_code (&strm, action); - - if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) { - fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz); - out_finished = true; - ret = RET_ERROR_DECOMPRESSION; - } else { - /* write decompressed data */ - out_len = OUT_BUF_MAX - strm.avail_out; - fwrite (out_buf, 1, out_len, out_file); - if (ferror (out_file)) { - out_finished = true; - ret = RET_ERROR_OUTPUT; - } - } - } while (strm.avail_out == 0); - } - - /* Bug fix (2012-06-14): If no errors were detected, check - that the last lzma_code() call returned LZMA_STREAM_END. - If not, the file is probably truncated. */ - if ((ret == RET_OK) && (ret_xz != LZMA_STREAM_END)) { - fprintf (stderr, "Input truncated or corrupt\n"); - ret = RET_ERROR_DECOMPRESSION; - } - - lzma_end (&strm); - return ret; -} - -int main () -{ - int ret; - - ret = xz_decompress (stdin, stdout); - return ret; -} - diff --git a/doc/lzma-file-format.txt b/doc/lzma-file-format.txt index 4865def..8cce5dc 100644 --- a/doc/lzma-file-format.txt +++ b/doc/lzma-file-format.txt @@ -40,10 +40,10 @@ The .lzma File Format 0.2. Changes - Last modified: 2022-07-13 21:00+0300 + Last modified: 2024-04-08 17:35+0300 - Compared to the previous version (2011-04-12 11:55+0300) - the section 1.1.3 was modified to allow End of Payload Marker + From version 2011-04-12 11:55+0300 to 2022-07-13 21:00+0300: + The section 1.1.3 was modified to allow End of Payload Marker with a known Uncompressed Size. @@ -157,17 +157,17 @@ The .lzma File Format 2. References LZMA SDK - The original LZMA implementation - http://7-zip.org/sdk.html + https://7-zip.org/sdk.html 7-Zip - http://7-zip.org/ + https://7-zip.org/ LZMA Utils - LZMA adapted to POSIX-like systems - http://tukaani.org/lzma/ + https://tukaani.org/lzma/ XZ Utils - The next generation of LZMA Utils - http://tukaani.org/xz/ + https://tukaani.org/xz/ The .xz file format - The successor of the .lzma format - http://tukaani.org/xz/xz-file-format.txt + https://tukaani.org/xz/xz-file-format.txt diff --git a/doc/man/pdf-a4/lzmainfo-a4.pdf b/doc/man/pdf-a4/lzmainfo-a4.pdf deleted file mode 100644 index 0ee526f..0000000 Binary files a/doc/man/pdf-a4/lzmainfo-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xz-a4.pdf b/doc/man/pdf-a4/xz-a4.pdf deleted file mode 100644 index 5f1a30c..0000000 Binary files a/doc/man/pdf-a4/xz-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xzdec-a4.pdf b/doc/man/pdf-a4/xzdec-a4.pdf deleted file mode 100644 index 35f2059..0000000 Binary files a/doc/man/pdf-a4/xzdec-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xzdiff-a4.pdf b/doc/man/pdf-a4/xzdiff-a4.pdf deleted file mode 100644 index 1189d84..0000000 Binary files a/doc/man/pdf-a4/xzdiff-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xzgrep-a4.pdf b/doc/man/pdf-a4/xzgrep-a4.pdf deleted file mode 100644 index 2cb3528..0000000 Binary files a/doc/man/pdf-a4/xzgrep-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xzless-a4.pdf b/doc/man/pdf-a4/xzless-a4.pdf deleted file mode 100644 index 4a8e8e6..0000000 Binary files a/doc/man/pdf-a4/xzless-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-a4/xzmore-a4.pdf b/doc/man/pdf-a4/xzmore-a4.pdf deleted file mode 100644 index 687074b..0000000 Binary files a/doc/man/pdf-a4/xzmore-a4.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/lzmainfo-letter.pdf b/doc/man/pdf-letter/lzmainfo-letter.pdf deleted file mode 100644 index d953045..0000000 Binary files a/doc/man/pdf-letter/lzmainfo-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xz-letter.pdf b/doc/man/pdf-letter/xz-letter.pdf deleted file mode 100644 index 440f294..0000000 Binary files a/doc/man/pdf-letter/xz-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xzdec-letter.pdf b/doc/man/pdf-letter/xzdec-letter.pdf deleted file mode 100644 index 83c6bb2..0000000 Binary files a/doc/man/pdf-letter/xzdec-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xzdiff-letter.pdf b/doc/man/pdf-letter/xzdiff-letter.pdf deleted file mode 100644 index 9c7ab61..0000000 Binary files a/doc/man/pdf-letter/xzdiff-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xzgrep-letter.pdf b/doc/man/pdf-letter/xzgrep-letter.pdf deleted file mode 100644 index 8303764..0000000 Binary files a/doc/man/pdf-letter/xzgrep-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xzless-letter.pdf b/doc/man/pdf-letter/xzless-letter.pdf deleted file mode 100644 index 9a8e231..0000000 Binary files a/doc/man/pdf-letter/xzless-letter.pdf and /dev/null differ diff --git a/doc/man/pdf-letter/xzmore-letter.pdf b/doc/man/pdf-letter/xzmore-letter.pdf deleted file mode 100644 index ef60bbc..0000000 Binary files a/doc/man/pdf-letter/xzmore-letter.pdf and /dev/null differ diff --git a/doc/man/txt/lzmainfo.txt b/doc/man/txt/lzmainfo.txt index fa4e51c..74208c6 100644 --- a/doc/man/txt/lzmainfo.txt +++ b/doc/man/txt/lzmainfo.txt @@ -1,7 +1,5 @@ LZMAINFO(1) XZ Utils LZMAINFO(1) - - NAME lzmainfo - show information stored in the .lzma file header @@ -14,9 +12,9 @@ DESCRIPTION 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 re- + 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 re- quired to decompress the file is a few dozen kilobytes plus the dictio- nary size. @@ -35,6 +33,4 @@ BUGS SEE ALSO xz(1) - - Tukaani 2013-06-30 LZMAINFO(1) diff --git a/doc/man/txt/xz.txt b/doc/man/txt/xz.txt index 4fec85b..b543312 100644 --- a/doc/man/txt/xz.txt +++ b/doc/man/txt/xz.txt @@ -1,7 +1,5 @@ XZ(1) XZ Utils XZ(1) - - NAME xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma files @@ -30,36 +28,36 @@ DESCRIPTION xz compresses or decompresses each file according to the selected oper- ation mode. If no files are given or file is -, xz reads from standard input and writes the processed data to standard output. xz will refuse - (display an error and skip the file) to write compressed data to stan- - dard output if it is a terminal. Similarly, xz will refuse to read + (display an error and skip the file) to write compressed data to stan- + dard output if it is a terminal. Similarly, xz will refuse to read compressed data from standard input if it is a terminal. - Unless --stdout is specified, files other than - are written to a new + Unless --stdout is specified, files other than - are written to a new file whose name is derived from the source file name: - o When compressing, the suffix of the target file format (.xz or - .lzma) is appended to the source filename to get the target file- + o When compressing, the suffix of the target file format (.xz or + .lzma) is appended to the source filename to get the target file- name. - o When decompressing, the .xz, .lzma, or .lz suffix is removed from - the filename to get the target filename. xz also recognizes the + o When decompressing, the .xz, .lzma, or .lz suffix is removed from + the filename to get the target filename. xz also recognizes the suffixes .txz and .tlz, and replaces them with the .tar suffix. - If the target file already exists, an error is displayed and the file + If the target file already exists, an error is displayed and the file is skipped. - Unless writing to standard output, xz will display a warning and skip + Unless writing to standard output, xz will display a warning and skip the file if any of the following applies: - o File is not a regular file. Symbolic links are not followed, and + o File is not a regular file. Symbolic links are not followed, and thus they are not considered to be regular files. o File has more than one hard link. o File has setuid, setgid, or sticky bit set. - o The operation mode is set to compress and the file already has a - suffix of the target file format (.xz or .txz when compressing to + o The operation mode is set to compress and the file already has a + suffix of the target file format (.xz or .txz when compressing to the .xz format, and .lzma or .tlz when compressing to the .lzma for- mat). @@ -71,7 +69,7 @@ DESCRIPTION owner, group, permissions, access time, and modification time from the source file to the target file. If copying the group fails, the per- missions are modified so that the target file doesn't become accessible - to users who didn't have permission to access the source file. xz + to users who didn't have permission to access the source file. xz doesn't support copying other metadata like access control lists or ex- tended attributes yet. @@ -85,8 +83,8 @@ DESCRIPTION cally updating progress indicator. Memory usage - The memory usage of xz varies from a few hundred kilobytes to several - gigabytes depending on the compression settings. The settings used + The memory usage of xz varies from a few hundred kilobytes to several + gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decom- pressor. Typically the decompressor needs 5 % to 20 % of the amount of memory that the compressor needed when creating the file. For example, @@ -101,7 +99,7 @@ DESCRIPTION processes, relying on it wasn't deemed to be flexible enough (for exam- ple, using ulimit(1) to limit virtual memory tends to cripple mmap(2)). - The memory usage limiter can be enabled with the command line option + The memory usage limiter can be enabled with the command line option --memlimit=limit. Often it is more convenient to enable the limiter by default by setting the environment variable XZ_DEFAULTS, for example, XZ_DEFAULTS=--memlimit=150MiB. It is possible to set the limits sepa- @@ -125,7 +123,7 @@ DESCRIPTION It is possible to concatenate .xz files as is. xz will decompress such files as if they were a single .xz file. - It is possible to insert padding between the concatenated parts or af- + It is possible to insert padding between the concatenated parts or af- ter the last part. The padding must consist of null bytes and the size of the padding must be a multiple of four bytes. This can be useful, for example, if the .xz file is stored on a medium that measures file @@ -153,34 +151,34 @@ OPTIONS supported by the option. Operation mode - If multiple operation mode options are given, the last one takes ef- + If multiple operation mode options are given, the last one takes ef- fect. -z, --compress - Compress. This is the default operation mode when no operation - mode option is specified and no other operation mode is implied + 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). -d, --decompress, --uncompress Decompress. -t, --test - Test the integrity of compressed files. This option is equiva- - lent to --decompress --stdout except that the decompressed data - is discarded instead of being written to standard output. No + Test the integrity of compressed files. This option is equiva- + lent to --decompress --stdout except that the decompressed data + is discarded instead of being written to standard output. No files are created or removed. -l, --list - Print information about compressed files. No uncompressed out- - put is produced, and no files are created or removed. In list - mode, the program cannot read the compressed data from standard + Print information about compressed files. No uncompressed out- + put is produced, and no files are created or removed. In list + mode, the program cannot read the compressed data from standard input or from other unseekable sources. - The default listing shows basic information about files, one - file per line. To get more detailed information, use also the - --verbose option. For even more information, use --verbose - twice, but note that this may be slow, because getting all the - extra information requires many seeks. The width of verbose + The default listing shows basic information about files, one + file per line. To get more detailed information, use also the + --verbose option. For even more information, use --verbose + twice, but note that this may be slow, because getting all the + extra information requires many seeks. The width of verbose output exceeds 80 characters, so piping the output to, for exam- ple, less -S may be convenient if the terminal isn't wide enough. @@ -206,19 +204,19 @@ OPTIONS o If the target file already exists, delete it before compress- ing or decompressing. - o Compress or decompress even if the input is a symbolic link - to a regular file, has more than one hard link, or has the - setuid, setgid, or sticky bit set. The setuid, setgid, and + o Compress or decompress even if the input is a symbolic link + to a regular file, has more than one hard link, or has the + setuid, setgid, or sticky bit set. The setuid, setgid, and sticky bits are not copied to the target file. - o When used with --decompress --stdout and xz cannot recognize - the type of the source file, copy the source file as is to - standard output. This allows xzcat --force to be used like + o When used with --decompress --stdout and xz cannot recognize + the type of the source file, copy the source file as is to + standard output. This allows xzcat --force to be used like cat(1) for files that have not been compressed with xz. Note that in future, xz might support new compressed file formats, - which may make xz decompress more types 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 for- + which may make xz decompress more types 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 for- mat. -c, --stdout, --to-stdout @@ -227,18 +225,18 @@ OPTIONS --single-stream Decompress only the first .xz stream, and silently ignore possi- - ble remaining input data following the stream. Normally such + ble remaining input data following the stream. Normally such trailing garbage makes xz display an error. - xz never decompresses more than one stream from .lzma files or - raw streams, but this option still makes xz ignore the possible + xz never decompresses more than one stream from .lzma files or + raw streams, but this option still makes xz ignore the possible trailing data after the .lzma file or raw stream. - This option has no effect if the operation mode is not --decom- + This option has no effect if the operation mode is not --decom- press or --test. --no-sparse - Disable creation of sparse files. By default, if decompressing + Disable creation of sparse files. By default, if decompressing into a regular file, xz tries to make the file sparse if the de- compressed data contains long sequences of binary zeros. It also works when writing to standard output as long as standard @@ -249,12 +247,12 @@ OPTIONS -S .suf, --suffix=.suf When compressing, use .suf as the suffix for the target file in- - stead of .xz or .lzma. If not writing to standard output and - the source file already has the suffix .suf, a warning is dis- + stead 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 files with the suffix .suf in ad- - dition to files with the .xz, .txz, .lzma, .tlz, or .lz suffix. + When decompressing, recognize files with the suffix .suf in ad- + dition to files with the .xz, .txz, .lzma, .tlz, or .lz suffix. If the source file has the suffix .suf, the suffix is removed to get the target filename. @@ -271,16 +269,16 @@ OPTIONS fore the filenames read from file. --files0[=file] - This is identical to --files[=file] except that each filename + This is identical to --files[=file] except that each filename must be terminated with the null character. Basic file format and compression options -F format, --format=format Specify the file format to compress or decompress: - auto This is the default. When compressing, auto is equiva- - lent to xz. When decompressing, the format of the input - file is automatically detected. Note that raw streams + auto This is the default. When compressing, auto is equiva- + lent to xz. When decompressing, the format of the input + file is automatically detected. Note that raw streams (created with --format=raw) cannot be auto-detected. xz Compress to the .xz file format, or accept only .xz files @@ -297,14 +295,14 @@ OPTIONS The .lz format version 0 and the unextended version 1 are supported. Version 0 files were produced by lzip 1.3 and - older. Such files aren't common but may be found from - file archives as a few source packages were released in - this format. People might have old personal files in - this format too. Decompression support for the format + older. Such files aren't common but may be found from + file archives as a few source packages were released in + this format. People might have old personal files in + this format too. Decompression support for the format version 0 was removed in lzip 1.18. - lzip 1.4 and later create files in the format version 1. - The sync flush marker extension to the format version 1 + lzip 1.4 and later create files in the format version 1. + The sync flush marker extension to the format version 1 was added in lzip 1.6. This extension is rarely used and isn't supported by xz (diagnosed as corrupt input). @@ -324,22 +322,22 @@ OPTIONS Supported check types: - none Don't calculate an integrity check at all. This is usu- - ally a bad idea. This can be useful when integrity of + none Don't calculate an integrity check at all. This is usu- + ally a bad idea. This can be useful when integrity of the data is verified by other means anyway. - crc32 Calculate CRC32 using the polynomial from IEEE-802.3 + crc32 Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet). crc64 Calculate CRC64 using the polynomial from ECMA-182. This is the default, since it is slightly better than CRC32 at - detecting damaged files and the speed difference is neg- + detecting damaged files and the speed difference is neg- ligible. - sha256 Calculate SHA-256. This is somewhat slower than CRC32 + sha256 Calculate SHA-256. This is somewhat slower than CRC32 and CRC64. - Integrity of the .xz headers is always verified with CRC32. It + Integrity of the .xz headers is always verified with CRC32. It is not possible to change or disable it. --ignore-check @@ -352,7 +350,7 @@ OPTIONS o Trying to recover data from a corrupt .xz file. - o Speeding up decompression. This matters mostly with SHA-256 + o Speeding up decompression. This matters mostly with SHA-256 or with files that have compressed extremely well. It's rec- ommended to not use this option for this purpose unless the file integrity is verified externally in some other way. @@ -383,13 +381,13 @@ OPTIONS memory usage reasonable even for old systems. -6 is the default, which is usually a good choice for distributing files that need to be decompressible even on systems with - only 16 MiB RAM. (-5e or -6e may be worth considering + only 16 MiB RAM. (-5e or -6e may be worth considering too. See --extreme.) -7 ... -9 - These are like -6 but with higher compressor and decom- - pressor memory requirements. These are useful only when - compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, + These are like -6 but with higher compressor and decom- + pressor memory requirements. These are useful only when + compressing files bigger than 8 MiB, 16 MiB, and 32 MiB, respectively. On the same hardware, the decompression speed is approximately a @@ -415,40 +413,44 @@ OPTIONS Column descriptions: o DictSize is the LZMA2 dictionary size. It is waste of memory - to use a dictionary bigger than the size of the uncompressed - file. This is why it is good to avoid using the presets -7 - ... -9 when there's no real need for them. At -6 and lower, + to use a dictionary bigger than the size of the uncompressed + file. This is why it is good to avoid using the presets -7 + ... -9 when there's no real need for them. At -6 and lower, the amount of memory wasted is usually low enough to not mat- ter. o CompCPU is a simplified representation of the LZMA2 settings that affect compression speed. The dictionary size affects speed too, so while CompCPU is the same for levels -6 ... -9, - higher levels still tend to be a little slower. To get even + higher levels still tend to be a little slower. To get even slower and thus possibly better compression, see --extreme. - o CompMem contains the compressor memory requirements in the - single-threaded mode. It may vary slightly between xz ver- - sions. Memory requirements of some of the future multi- - threaded modes may be dramatically higher than that of the - single-threaded mode. + o CompMem contains the compressor memory requirements in the + single-threaded mode. It may vary slightly between xz ver- + sions. - o DecMem contains the decompressor memory requirements. That - is, the compression settings determine the memory require- + o DecMem contains the decompressor memory requirements. That + is, the compression settings determine the memory require- ments of the decompressor. The exact decompressor memory us- age is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB. + Memory requirements of the multi-threaded mode are significantly + higher than that of the single-threaded mode. With the default + value of --block-size, each thread needs 3*3*DictSize plus Comp- + Mem or DecMem. For example, four threads with preset -6 needs + 660-670 MiB of memory. + -e, --extreme Use a slower variant of the selected compression preset level (-0 ... -9) to hopefully get a little bit better compression ra- - tio, but with bad luck this can also make it worse. Decompres- - sor memory usage is not affected, but compressor memory usage + tio, but with bad luck this can also make it worse. Decompres- + sor memory usage is not affected, but compressor memory usage increases a little at preset levels -0 ... -3. - Since there are two presets with dictionary sizes 4 MiB and - 8 MiB, the presets -3e and -5e use slightly faster settings + Since there are two presets with dictionary sizes 4 MiB and + 8 MiB, the presets -3e and -5e use slightly faster settings (lower CompCPU) than -4e and -6e, respectively. That way no two presets are identical. @@ -487,50 +489,76 @@ OPTIONS whichever is more. Typically a good value is 2-4 times the size of the LZMA2 dictionary or at least 1 MiB. Using size less than the LZMA2 dictionary size is waste of RAM because then the LZMA2 - dictionary buffer will never get fully used. The sizes of the - blocks are stored in the block headers, which a future version - of xz will use for multi-threaded decompression. + dictionary buffer will never get fully used. In multi-threaded + mode, the sizes of the blocks are stored in the block headers. + This size information is required for multi-threaded decompres- + sion. In single-threaded mode no block splitting is done by default. Setting this option doesn't affect memory usage. No size infor- mation is stored in block headers, thus files created in single- threaded mode won't be identical to files created in multi- - threaded mode. The lack of size information also means that a - future version of xz won't be able decompress the files in - multi-threaded mode. + threaded mode. The lack of size information also means that xz + won't be able decompress the files in multi-threaded mode. + + --block-list=items + When compressing to the .xz format, start a new block with an + optional custom filter chain after the given intervals of uncom- + pressed data. + + The items are a comma-separated list. Each item consists of an + optional filter chain number between 0 and 9 followed by a colon + (:) and a required size of uncompressed data. Omitting an item + (two or more consecutive commas) is a shorthand to use the size + and filters of the previous item. + + If the input file is bigger than the sum of the sizes in items, + the last item is repeated until the end of the file. A special + value of 0 may be used as the last size to indicate that the + rest of the file should be encoded as a single block. - --block-list=sizes - When compressing to the .xz format, start a new block after the - given intervals of uncompressed data. + An alternative filter chain for each block can be specified in + combination with the --filters1=filters ... --filters9=filters + options. These options define filter chains with an identifier + between 1-9. Filter chain 0 can be used to refer to the default + filter chain, which is the same as not specifying a filter + chain. The filter chain identifier can be used before the un- + compressed size, followed by a colon (:). For example, if one + specifies --block-list=1:2MiB,3:2MiB,2:4MiB,,2MiB,0:4MiB then + blocks will be created using: - The uncompressed sizes of the blocks are specified as a comma- - separated list. Omitting a size (two or more consecutive com- - mas) is a shorthand to use the size of the previous block. + o The filter chain specified by --filters1 and 2 MiB input - If the input file is bigger than the sum of sizes, the last - value in sizes is repeated until the end of the file. A special - value of 0 may be used as the last value to indicate that the - rest of the file should be encoded as a single block. + o The filter chain specified by --filters3 and 2 MiB input + + o The filter chain specified by --filters2 and 4 MiB input + + o The filter chain specified by --filters2 and 4 MiB input - If one specifies sizes that exceed the encoder's block size (ei- - ther the default value in threaded mode or the value specified - with --block-size=size), the encoder will create additional - blocks while keeping the boundaries specified in sizes. For ex- + o The default filter chain and 2 MiB input + + o The default filter chain and 4 MiB input for every block un- + til end of input. + + If one specifies a size that exceeds the encoder's block size + (either the default value in threaded mode or the value speci- + fied with --block-size=size), the encoder will create additional + blocks while keeping the boundaries specified in items. For ex- ample, if one specifies --block-size=10MiB --block-list=5MiB,10MiB,8MiB,12MiB,24MiB and the input file is 80 MiB, one will get 11 blocks: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10, and 1 MiB. In multi-threaded mode the sizes of the blocks are stored in the - block headers. This isn't done in single-threaded mode, so the - encoded output won't be identical to that of the multi-threaded + block headers. This isn't done in single-threaded mode, so the + encoded output won't be identical to that of the multi-threaded mode. --flush-timeout=timeout - When compressing, if more than timeout milliseconds (a positive - integer) has passed since the previous flush and reading more - input would block, all the pending input data is flushed from - the encoder and made available in the output stream. This can + When compressing, if more than timeout milliseconds (a positive + integer) has passed since the previous flush and reading more + input would block, all the pending input data is flushed from + the encoder and made available in the output stream. This can be useful if xz is used to compress data that is streamed over a network. Small timeout values make the data available at the receiving end with a small delay, but large timeout values give @@ -556,24 +584,24 @@ OPTIONS ceeded and display a notice that automatic adjustment was done. The adjustments are done in this order: reducing the number of threads, switching to single-threaded mode if even one thread in - multi-threaded mode exceeds the limit, and finally reducing the + multi-threaded mode exceeds the limit, and finally reducing the LZMA2 dictionary size. - When compressing with --format=raw or if --no-adjust has been - specified, only the number of threads may be reduced since it + When compressing with --format=raw or if --no-adjust has been + specified, only the number of threads may be reduced since it can be done without affecting the compressed output. - If the limit cannot be met even with the adjustments described - above, an error is displayed and xz will exit with exit status + If the limit cannot be met even with the adjustments described + above, an error is displayed and xz will exit with exit status 1. The limit can be specified in multiple ways: - o The limit can be an absolute value in bytes. Using an inte- - ger suffix like MiB can be useful. Example: --memlimit-com- + o The limit can be an absolute value in bytes. Using an inte- + ger suffix like MiB can be useful. Example: --memlimit-com- press=80MiB - o The limit can be specified as a percentage of total physical + o The limit can be specified as a percentage of total physical memory (RAM). This can be useful especially when setting the XZ_DEFAULTS environment variable in a shell initialization script that is shared between different computers. That way @@ -588,17 +616,17 @@ OPTIONS over 4020 MiB, the limit is set to 4020 MiB. On MIPS32 2000 MiB is used instead. (The values 0 and max aren't affected by this. A similar feature doesn't exist for decompression.) This can be - helpful when a 32-bit executable has access to 4 GiB address - space (2 GiB on MIPS32) while hopefully doing no harm in other + helpful when a 32-bit executable has access to 4 GiB address + space (2 GiB on MIPS32) while hopefully doing no harm in other situations. See also the section Memory usage. --memlimit-decompress=limit - Set a memory usage limit for decompression. This also affects - the --list mode. If the operation is not possible without ex- - ceeding the limit, xz will display an error and decompressing - the file will fail. See --memlimit-compress=limit for possible + Set a memory usage limit for decompression. This also affects + the --list mode. If the operation is not possible without ex- + ceeding the limit, xz will display an error and decompressing + the file will fail. See --memlimit-compress=limit for possible ways to specify the limit. --memlimit-mt-decompress=limit @@ -608,20 +636,20 @@ OPTIONS multi-threading, the limit is ignored and xz will continue in single-threaded mode. Note that if also --memlimit-decompress is used, it will always apply to both single-threaded and multi- - threaded modes, and so the effective limit for multi-threading - will never be higher than the limit set with --memlimit-decom- + threaded modes, and so the effective limit for multi-threading + will never be higher than the limit set with --memlimit-decom- press. - In contrast to the other memory usage limit options, --mem- - limit-mt-decompress=limit has a system-specific default limit. + In contrast to the other memory usage limit options, --mem- + limit-mt-decompress=limit has a system-specific default limit. xz --info-memory can be used to see the current value. - This option and its default value exist because without any - limit the threaded decompressor could end up allocating an in- - sane amount of memory with some input files. If the default + This option and its default value exist because without any + limit the threaded decompressor could end up allocating an in- + sane amount of memory with some input files. If the default limit is too low on your system, feel free to increase the limit but never set it to a value larger than the amount of usable RAM - as with appropriate input files xz will attempt to use that + as with appropriate input files xz will attempt to use that amount of memory even with a low number of threads. Running out of memory or swapping will not improve decompression perfor- mance. @@ -648,18 +676,18 @@ OPTIONS -T threads, --threads=threads Specify the number of worker threads to use. Setting threads to - a special value 0 makes xz use up to as many threads as the pro- - cessor(s) on the system support. The actual number of threads - can be fewer than threads if the input file is not big enough - for threading with the given settings or if using more threads - would exceed the memory usage limit. + a special value 0 makes xz use up to as many threads as the + processor(s) on the system support. The actual number of + threads can be fewer than threads if the input file is not big + enough for threading with the given settings or if using more + threads would exceed the memory usage limit. The single-threaded and multi-threaded compressors produce dif- ferent output. Single-threaded compressor will give the small- est file size but only the output from the multi-threaded com- pressor can be decompressed using multiple threads. Setting threads to 1 will use the single-threaded mode. Setting threads - to any other value, including 0, will use the multi-threaded + to any other value, including 0, will use the multi-threaded compressor even if the system supports only one hardware thread. (xz 5.2.x used single-threaded mode in this situation.) @@ -670,9 +698,9 @@ OPTIONS added in xz 5.4.0. If an automatic number of threads has been requested and no mem- - ory usage limit has been specified, then a system-specific de- - fault soft limit will be used to possibly limit the number of - threads. It is a soft limit in sense that it is ignored if the + ory usage limit has been specified, then a system-specific de- + fault soft limit will be used to possibly limit the number of + threads. It is a soft limit in sense that it is ignored if the number of threads becomes one, thus a soft limit will never stop xz from compressing or decompressing. This default soft limit will not make xz switch from multi-threaded mode to single- @@ -681,7 +709,7 @@ OPTIONS Currently the only threading method is to split the input into blocks and compress them independently from each other. The de- - fault block size depends on the compression level and can be + fault block size depends on the compression level and can be overridden with the --block-size=size option. Threaded decompression only works on files that contain multiple @@ -690,6 +718,9 @@ OPTIONS files compressed in single-threaded mode don't even if --block-size=size has been used. + The default value for threads is 0. In xz 5.4.x and older the + default is 1. + Custom compressor filter chains A custom filter chain allows specifying the compression settings in de- tail instead of relying on the settings associated to the presets. @@ -701,9 +732,9 @@ OPTIONS A filter chain is comparable to piping on the command line. When com- pressing, 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 fil- + 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 fil- ters. Many filters have limitations on where they can be in the filter chain: @@ -712,20 +743,49 @@ OPTIONS pending on the filter, this limitation is either inherent to the filter design or exists to prevent security issues. - 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 - specified when compressing. - - 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. + A custom filter chain can be specified in two different ways. The op- + tions --filters=filters and --filters1=filters ... --filters9=filters + allow specifying an entire filter chain in one option using the liblzma + filter string syntax. Alternatively, a filter chain can be specified + by using one or more individual filter options in the order they are + wanted in the filter chain. That is, the order of the individual fil- + ter options is significant! When decoding raw streams (--format=raw), + the filter chain must be specified in the same order as it was speci- + fied when compressing. Any individual filter or preset options speci- + fied before the full chain option (--filters=filters) will be forgot- + ten. Individual filters specified after the full chain option will re- + set the filter chain. + + Both the full and individual filter options take filter-specific op- + tions as a comma-separated list. Extra commas in options are ignored. + Every option has a default value, so specify those you want to change. To see the whole filter chain and options, use xz -vv (that is, use --verbose twice). This works also for viewing the filter chain options used by presets. + --filters=filters + Specify the full filter chain or a preset in a single option. + Each filter can be separated by spaces or two dashes (--). fil- + ters may need to be quoted on the shell command line so it is + parsed as a single option. To denote options, use : or =. A + preset can be prefixed with a - and followed with zero or more + flags. The only supported flag is e to apply the same options + as --extreme. + + --filters1=filters ... --filters9=filters + Specify up to nine additional filter chains that can be used + with --block-list. + + For example, when compressing an archive with executable files + followed by text files, the executable part could use a filter + chain with a BCJ filter and the text part only the LZMA2 filter. + + --filters-help + Display a help message describing how to specify presets and + custom filter chains in the --filters and --filters1=filters ... + --filters9=filters options, and exit successfully. + --lzma1[=options] --lzma2[=options] Add LZMA1 or LZMA2 filter to the filter chain. These filters @@ -751,9 +811,9 @@ OPTIONS dict=size Dictionary (history buffer) size indicates how many bytes - of the recently processed uncompressed data is kept in - memory. The algorithm tries to find repeating byte se- - quences (matches) in the uncompressed data, and replace + of the recently processed uncompressed data is kept in + memory. The algorithm tries to find repeating byte se- + quences (matches) in the uncompressed data, and replace them with references to the data currently in the dictio- nary. The bigger the dictionary, the higher is the chance to find a match. Thus, increasing dictionary size @@ -763,16 +823,16 @@ OPTIONS 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 (1536 MiB). The decompressor already sup- - ports dictionaries up to one byte less than 4 GiB, which + ports dictionaries up to one byte less than 4 GiB, which is the maximum for the LZMA1 and LZMA2 stream formats. - Dictionary size and match finder (mf) together determine + Dictionary size and match finder (mf) together determine the memory usage of the LZMA1 or LZMA2 encoder. The same (or bigger) 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. The .xz headers store the dictionary - size either as 2^n or 2^n + 2^(n-1), so these sizes are + that was used when compressing, thus the memory usage of + the decoder is determined by the dictionary size used + when compressing. The .xz headers store the dictionary + size either as 2^n or 2^n + 2^(n-1), so these sizes are somewhat preferred for compression. Other sizes will get rounded up when stored in the .xz headers. @@ -791,7 +851,7 @@ OPTIONS ter, and a lower-case letter is usually followed by an- other lower-case letter. In the US-ASCII character set, the highest three bits are 010 for upper-case letters and - 011 for lower-case letters. When lc is at least 3, the + 011 for lower-case letters. When lc is at least 3, the literal coding can take advantage of this property in the uncompressed data. @@ -807,11 +867,11 @@ OPTIONS data is assumed when encoding literals. See pb below for more information about alignment. - pb=pb Specify the number of position bits. The minimum is 0 + pb=pb Specify the number of position bits. The minimum is 0 and the maximum is 4; the default is 2. - Pb affects what kind of alignment in the uncompressed - data is assumed in general. The default means four-byte + Pb affects what kind of alignment in the uncompressed + data is assumed in general. The default means four-byte alignment (2^pb=2^2=4), which is often a good choice when there's no better guess. @@ -820,7 +880,7 @@ OPTIONS files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can improve compression slightly. For UTF-16 text, pb=1 is a good choice. If the alignment - is an odd number like 3 bytes, pb=0 might be the best + is an odd number like 3 bytes, pb=0 might be the best choice. Even though the assumed alignment can be adjusted with pb @@ -869,7 +929,7 @@ OPTIONS mode=mode Compression mode specifies the method to analyze the data - produced by the match finder. Supported modes are fast + produced by the match finder. Supported modes are fast and normal. The default is fast for presets 0-3 and nor- mal for presets 4-9. @@ -878,17 +938,17 @@ OPTIONS the presets do. nice=nice - Specify what is considered to be a nice length for a + 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 the expense of speed. The de- + ter compression ratio at the expense of speed. The de- fault depends on the preset. depth=depth - Specify the maximum search depth in the match finder. - The default is the special value of 0, which makes the + Specify the maximum search depth in the match finder. + The default is the special value of 0, which makes the compressor determine a reasonable depth from mf and nice. Reasonable depth for Hash Chains is 4-100 and 16-1000 for @@ -908,6 +968,7 @@ OPTIONS --powerpc[=options] --ia64[=options] --sparc[=options] + --riscv[=options] Add a branch/call/jump (BCJ) filter to the filter chain. These filters can be used only as a non-last filter in the filter chain. @@ -916,9 +977,9 @@ OPTIONS their absolute counterparts. This doesn't change the size of the data but it increases redundancy, which can help LZMA2 to produce 0-15 % smaller .xz file. The BCJ filters are always re- - versible, so using a BCJ filter for wrong type of data doesn't - cause any data loss, although it may make the compression ratio - slightly worse. The BCJ filters are very fast and use an in- + versible, so using a BCJ filter for wrong type of data doesn't + cause any data loss, although it may make the compression ratio + slightly worse. The BCJ filters are very fast and use an in- significant amount of memory. These BCJ filters have known problems related to the compression @@ -931,16 +992,16 @@ OPTIONS sion, which will make the compression worse with these files. o If a BCJ filter is applied on an archive, it is possible that - it makes the compression ratio worse than not using a BCJ - filter. For example, if there are similar or even identical - executables then filtering will likely make the files less - similar and thus compression is worse. The contents of non- - executable files in the same archive can matter too. In - practice one has to try with and without a BCJ filter to see + it makes the compression ratio worse than not using a BCJ + filter. For example, if there are similar or even identical + executables then filtering will likely make the files less + similar and thus compression is worse. The contents of non- + executable files in the same archive can matter too. In + practice one has to try with and without a BCJ filter to see which is better in each situation. - Different instruction sets have different alignment: the exe- - cutable file must be aligned to a multiple of this value in the + Different instruction sets have different alignment: the exe- + cutable file must be aligned to a multiple of this value in the input data to make the filter work. Filter Alignment Notes @@ -951,14 +1012,29 @@ OPTIONS PowerPC 4 Big endian only IA-64 16 Itanium SPARC 4 + RISC-V 2 - Since the BCJ-filtered data is usually compressed with LZMA2, - the compression ratio may be improved slightly if the LZMA2 op- + Since the BCJ-filtered data is usually compressed with LZMA2, + the compression ratio may be improved slightly if the LZMA2 op- tions are set to match the alignment of the selected BCJ filter. - For example, with the IA-64 filter, it's good to set pb=4 or - even pb=4,lp=4,lc=0 with LZMA2 (2^4=16). The x86 filter is an - exception; it's usually good to stick to LZMA2's default four- - byte alignment when compressing x86 executables. + Examples: + + o IA-64 filter has 16-byte alignment so pb=4,lp=4,lc=0 is good + with LZMA2 (2^4=16). + + o RISC-V code has 2-byte or 4-byte alignment depending on + whether the file contains 16-bit compressed instructions (the + C extension). When 16-bit instructions are used, + pb=2,lp=1,lc=3 or pb=1,lp=1,lc=3 is good. When 16-bit in- + structions aren't present, pb=2,lp=2,lc=2 is the best. read- + elf -h can be used to check if "RVC" appears on the "Flags" + line. + + o ARM64 is always 4-byte aligned so pb=2,lp=2,lc=2 is the best. + + o The x86 filter is an exception. It's usually good to stick + to LZMA2's defaults (pb=2,lp=0,lc=3) when compressing x86 ex- + ecutables. All BCJ filters support the same options: @@ -966,7 +1042,7 @@ OPTIONS Specify the start offset that is used when converting be- tween 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 de- + ble above). The default is zero. In practice, the de- fault is good; specifying a custom offset is almost never useful. @@ -978,13 +1054,13 @@ OPTIONS It can be useful when compressing, for example, uncompressed bitmap images or uncompressed PCM audio. However, special pur- pose algorithms may give significantly better results than Delta - + LZMA2. This is true especially with audio, which compresses + + LZMA2. This is true especially with audio, which compresses faster and better, for example, with flac(1). Supported options: dist=distance - Specify the distance of the delta calculation in bytes. + Specify the distance of the delta calculation in bytes. distance must be 1-256. The default is 1. For example, with dist=2 and eight-byte input A1 B1 A2 B3 @@ -994,23 +1070,23 @@ 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- + 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 + 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. The progress indicator shows the following information: - o Completion percentage is shown if the size of the input file + o Completion percentage is shown if the size of the input file is known. That is, the percentage cannot be shown in pipes. - o Amount of compressed data produced (compressing) or consumed + o Amount of compressed data produced (compressing) or consumed (decompressing). - o Amount of uncompressed data consumed (compressing) or pro- + o Amount of uncompressed data consumed (compressing) or pro- duced (decompressing). o Compression ratio, which is calculated by dividing the amount @@ -1032,12 +1108,12 @@ OPTIONS When standard error is not a terminal, --verbose will make xz print the filename, compressed size, uncompressed size, compres- - sion ratio, and possibly also the speed and elapsed time on a + sion ratio, and possibly also the speed and elapsed time on a single line to standard error after compressing or decompressing the file. The speed and elapsed time are included only when the - operation took at least a few seconds. If the operation didn't - finish, for example, due to user interruption, also the comple- - tion percentage is printed if the size of the input file is + operation took at least a few seconds. If the operation didn't + finish, for example, due to user interruption, also the comple- + tion percentage is printed if the size of the input file is known. -Q, --no-warn @@ -1075,63 +1151,9 @@ OPTIONS ROBOT MODE The robot mode is activated with the --robot option. It makes the out- put of xz easier to parse by other programs. Currently --robot is sup- - ported only together with --version, --info-memory, and --list. It - will be supported for compression and decompression in the future. - - Version - xz --robot --version prints the version number of xz and liblzma in the - following format: - - XZ_VERSION=XYYYZZZS - LIBLZMA_VERSION=XYYYZZZS - - X Major version. - - YYY Minor version. Even numbers are stable. Odd numbers are alpha - or beta versions. - - ZZZ Patch level for stable releases or just a counter for develop- - ment releases. - - S Stability. 0 is alpha, 1 is beta, and 2 is stable. S should be - always 2 when YYY is even. - - XYYYZZZS are the same on both lines if xz and liblzma are from the same - XZ Utils release. - - Examples: 4.999.9beta is 49990091 and 5.0.0 is 50000002. - - Memory limit information - xz --robot --info-memory prints a single line with multiple tab-sepa- - rated columns: - - 1. Total amount of physical memory (RAM) in bytes. - - 2. Memory usage limit for compression in bytes (--memlimit-compress). - A special value of 0 indicates the default setting which for sin- - gle-threaded mode is the same as no limit. - - 3. Memory usage limit for decompression in bytes (--memlimit-decom- - press). A special value of 0 indicates the default setting which - for single-threaded mode is the same as no limit. - - 4. Since xz 5.3.4alpha: Memory usage for multi-threaded decompression - in bytes (--memlimit-mt-decompress). This is never zero because a - system-specific default value shown in the column 5 is used if no - limit has been specified explicitly. This is also never greater - than the value in the column 3 even if a larger value has been - specified with --memlimit-mt-decompress. - - 5. Since xz 5.3.4alpha: A system-specific default memory usage limit - that is used to limit the number of threads when compressing with - an automatic number of threads (--threads=0) and no memory usage - limit has been specified (--memlimit-compress). This is also used - as the default value for --memlimit-mt-decompress. - - 6. Since xz 5.3.4alpha: Number of available processor threads. - - In the future, the output of xz --robot --info-memory may have more - columns, but never more than a single line. + ported only together with --list, --filters-help, --info-memory, and + --version. It will be supported for compression and decompression in + the future. List mode xz --robot --list uses tab-separated output. The first column of every @@ -1155,10 +1177,10 @@ ROBOT MODE summary This line type is used only when --verbose was specified twice. This line is printed after all block lines. Like the file line, - the summary line contains overall information about the .xz + the summary line contains overall information about the .xz file. - totals This line is always the very last line of the list output. It + totals This line is always the very last line of the list output. It shows the total counts and sizes. The columns of the file lines: @@ -1166,10 +1188,10 @@ ROBOT MODE 3. Total number of blocks in the stream(s) 4. Compressed size of the file 5. Uncompressed size of the file - 6. Compression ratio, for example, 0.123. If ratio is over - 9.999, three dashes (---) are displayed instead of the ra- + 6. Compression ratio, for example, 0.123. If ratio is over + 9.999, three dashes (---) are displayed instead of the ra- tio. - 7. Comma-separated list of integrity check names. The follow- + 7. Comma-separated list of integrity check names. The follow- ing strings are used for the known check types: None, CRC32, CRC64, and SHA-256. For unknown check types, Unknown-N is used, where N is the Check ID as a decimal number (one or @@ -1240,24 +1262,94 @@ ROBOT MODE 9. Number of files. This is here to keep the order of the ear- lier columns the same as on file lines. - If --verbose was specified twice, additional columns are included on + If --verbose was specified twice, additional columns are included on the totals line: - 10. Maximum amount of memory (in bytes) required to decompress + 10. Maximum amount of memory (in bytes) required to decompress the files with this xz version - 11. yes or no indicating if all block headers have both com- + 11. yes or no indicating if all block headers have both com- pressed size and uncompressed size stored in them Since xz 5.1.2alpha: 12. Minimum xz version required to decompress the file - Future versions may add new line types and new columns can be added to + Future versions may add new line types and new columns can be added to the existing line types, but the existing columns won't be changed. + Filters help + xz --robot --filters-help prints the supported filters in the following + format: + + filter:option=,option=... + + filter Name of the filter + + option Name of a filter specific option + + value Numeric value ranges appear as . String value choices + are shown within < > and separated by a | character. + + Each filter is printed on its own line. + + Memory limit information + xz --robot --info-memory prints a single line with multiple tab-sepa- + rated columns: + + 1. Total amount of physical memory (RAM) in bytes. + + 2. Memory usage limit for compression in bytes (--memlimit-compress). + A special value of 0 indicates the default setting which for sin- + gle-threaded mode is the same as no limit. + + 3. Memory usage limit for decompression in bytes (--memlimit-decom- + press). A special value of 0 indicates the default setting which + for single-threaded mode is the same as no limit. + + 4. Since xz 5.3.4alpha: Memory usage for multi-threaded decompression + in bytes (--memlimit-mt-decompress). This is never zero because a + system-specific default value shown in the column 5 is used if no + limit has been specified explicitly. This is also never greater + than the value in the column 3 even if a larger value has been + specified with --memlimit-mt-decompress. + + 5. Since xz 5.3.4alpha: A system-specific default memory usage limit + that is used to limit the number of threads when compressing with + an automatic number of threads (--threads=0) and no memory usage + limit has been specified (--memlimit-compress). This is also used + as the default value for --memlimit-mt-decompress. + + 6. Since xz 5.3.4alpha: Number of available processor threads. + + In the future, the output of xz --robot --info-memory may have more + columns, but never more than a single line. + + Version + xz --robot --version prints the version number of xz and liblzma in the + following format: + + XZ_VERSION=XYYYZZZS + LIBLZMA_VERSION=XYYYZZZS + + X Major version. + + YYY Minor version. Even numbers are stable. Odd numbers are alpha + or beta versions. + + ZZZ Patch level for stable releases or just a counter for develop- + ment releases. + + S Stability. 0 is alpha, 1 is beta, and 2 is stable. S should be + always 2 when YYY is even. + + XYYYZZZS are the same on both lines if xz and liblzma are from the same + XZ Utils release. + + Examples: 4.999.9beta is 49990091 and 5.0.0 is 50000002. + EXIT STATUS 0 All is good. 1 An error occurred. - 2 Something worth a warning occurred, but no actual errors oc- + 2 Something worth a warning occurred, but no actual errors oc- curred. Notices (not warnings or errors) printed on standard error don't affect @@ -1266,16 +1358,16 @@ EXIT STATUS ENVIRONMENT xz parses space-separated lists of options from the environment vari- ables XZ_DEFAULTS and XZ_OPT, in this order, before parsing the options - from the command line. Note that only options are parsed from the en- - vironment variables; all non-options are silently ignored. Parsing is - done with getopt_long(3) which is used also for the command line argu- + from the command line. Note that only options are parsed from the en- + vironment variables; all non-options are silently ignored. Parsing is + done with getopt_long(3) which is used also for the command line argu- ments. XZ_DEFAULTS User-specific or system-wide default options. Typically this is set in a shell initialization script to enable xz's memory usage - limiter by default. Excluding shell initialization scripts and - similar special cases, scripts must never set or unset XZ_DE- + limiter by default. Excluding shell initialization scripts and + similar special cases, scripts must never set or unset XZ_DE- FAULTS. XZ_OPT This is for passing options to xz when it is not possible to set @@ -1293,16 +1385,16 @@ ENVIRONMENT export XZ_OPT LZMA UTILS COMPATIBILITY - The command line syntax of xz is practically a superset of lzma, un- - lzma, and lzcat as found from LZMA Utils 4.32.x. In most cases, it is - possible to replace LZMA Utils with XZ Utils without breaking existing - scripts. There are some incompatibilities though, which may sometimes + The command line syntax of xz is practically a superset of lzma, un- + lzma, and lzcat as found from LZMA Utils 4.32.x. In most cases, it is + possible to replace LZMA Utils with XZ Utils without breaking existing + scripts. There are some incompatibilities though, which may sometimes cause problems. Compression preset levels - The numbering of the compression level presets is not identical in xz - and LZMA Utils. The most important difference is how dictionary sizes - are mapped to different presets. Dictionary size is roughly equal to + The numbering of the compression level presets is not identical in xz + and LZMA Utils. The most important difference is how dictionary sizes + are mapped to different presets. Dictionary size is roughly equal to the decompressor memory usage. Level xz LZMA Utils @@ -1341,15 +1433,15 @@ LZMA UTILS COMPATIBILITY LZMA Utils does that when compressing regular files. The alternative is to mark that uncompressed size is unknown and use end-of-payload marker to indicate where the decompressor should stop. LZMA Utils uses - this method when uncompressed size isn't known, which is the case, for + this method when uncompressed size isn't known, which is the case, for example, in pipes. - xz supports decompressing .lzma files with or without end-of-payload - marker, but all .lzma files created by xz will use end-of-payload - marker and have uncompressed size marked as unknown in the .lzma - header. This may be a problem in some uncommon situations. For exam- - ple, a .lzma decompressor in an embedded device might work only with - files that have known uncompressed size. If you hit this problem, you + xz supports decompressing .lzma files with or without end-of-payload + marker, but all .lzma files created by xz will use end-of-payload + marker and have uncompressed size marked as unknown in the .lzma + header. This may be a problem in some uncommon situations. For exam- + ple, a .lzma decompressor in an embedded device might work only with + files that have known uncompressed size. If you hit this problem, you need to use LZMA Utils or LZMA SDK to create .lzma files with known un- compressed size. @@ -1360,13 +1452,13 @@ LZMA UTILS COMPATIBILITY with xz and with LZMA SDK. The implementation of the LZMA1 filter in liblzma requires that the sum - of lc and lp must not exceed 4. Thus, .lzma files, which exceed this + of lc and lp must not exceed 4. Thus, .lzma files, which exceed this limitation, cannot be decompressed with xz. LZMA Utils creates only .lzma files which have a dictionary size of 2^n (a power of 2) but accepts files with any dictionary size. liblzma ac- - cepts only .lzma files which have a dictionary size of 2^n or 2^n + - 2^(n-1). This is to decrease false positives when detecting .lzma + cepts only .lzma files which have a dictionary size of 2^n or 2^n + + 2^(n-1). This is to decrease false positives when detecting .lzma files. These limitations shouldn't be a problem in practice, since practically @@ -1385,11 +1477,11 @@ LZMA UTILS COMPATIBILITY NOTES Compressed output may vary - The exact compressed output produced from the same uncompressed input + 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 bet- - ter compression) without affecting the file format. The output can - vary even between different builds of the same XZ Utils version, if + ter 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. The above means that once --rsyncable has been implemented, the result- @@ -1401,30 +1493,30 @@ NOTES Embedded .xz decompressors Embedded .xz decompressor implementations like XZ Embedded don't neces- sarily support files created with integrity check types other than none - and crc32. Since the default is --check=crc64, you must use + 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. EXAMPLES Basics - Compress the file foo into foo.xz using the default compression level + Compress the file foo into foo.xz using the default compression level (-6), and remove foo if compression is successful: xz foo - Decompress bar.xz into bar and don't remove bar.xz even if decompres- + Decompress bar.xz into bar and don't remove bar.xz even if decompres- sion is successful: xz -dk bar.xz - Create baz.tar.xz with the preset -4e (-4 --extreme), which is slower - than the default -6, but needs less memory for compression and decom- + Create baz.tar.xz with the preset -4e (-4 --extreme), which is slower + than the default -6, but needs less memory for compression and decom- pression (48 MiB and 5 MiB, respectively): tar cf - baz | xz -4e > baz.tar.xz @@ -1443,7 +1535,7 @@ EXAMPLES The -P option to xargs(1) sets the number of parallel xz processes. The best value for the -n option depends on how many files there are to - be compressed. If there are only a couple of files, the value should + be compressed. If there are only a couple of files, the value should probably be 1; with tens of thousands of files, 100 or even more may be appropriate to reduce the number of xz processes that xargs(1) will eventually create. @@ -1452,14 +1544,14 @@ EXAMPLES cause xargs(1) is used to control the amount of parallelization. Robot mode - Calculate how many bytes have been saved in total after compressing + Calculate how many bytes have been saved in total after compressing multiple files: xz --robot --list *.xz | awk '/^totals/{print $5-$4}' - A script may want to know that it is using new enough xz. The follow- - ing sh(1) script checks that the version number of the xz tool is at - least 5.0.0. This method is compatible with old beta versions, which + A script may want to know that it is using new enough xz. The follow- + ing sh(1) script checks that the version number of the xz tool is at + least 5.0.0. This method is compatible with old beta versions, which didn't support the --robot option: if ! eval "$(xz --robot --version 2> /dev/null)" || @@ -1524,23 +1616,23 @@ EXAMPLES Using -vv (--verbose --verbose) like in the above example can be useful to see the memory requirements of the compressor and decompressor. Re- member that using a dictionary bigger than the size of the uncompressed - file is waste of memory, so the above command isn't useful for small + file is waste of memory, so the above command isn't useful for small files. - Sometimes the compression time doesn't matter, but the decompressor - memory usage has to be kept low, for example, to make it possible to - decompress the file on an embedded system. The following command uses - -6e (-6 --extreme) as a base and sets the dictionary to only 64 KiB. - The resulting file can be decompressed with XZ Embedded (that's why + Sometimes the compression time doesn't matter, but the decompressor + memory usage has to be kept low, for example, to make it possible to + decompress the file on an embedded system. The following command uses + -6e (-6 --extreme) as a base and sets the dictionary to only 64 KiB. + The resulting file can be decompressed with XZ Embedded (that's why there is --check=crc32) using about 100 KiB of memory. xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo - If you want to squeeze out as many bytes as possible, adjusting the - number of literal context bits (lc) and number of position bits (pb) + If you want to squeeze out as many bytes as possible, adjusting the + number of literal context bits (lc) and number of position bits (pb) can sometimes help. Adjusting the number of literal position bits (lp) might help too, but usually lc and pb are more important. For example, - a source code archive contains mostly US-ASCII text, so something like + a source code archive contains mostly US-ASCII text, so something like the following might give slightly (like 0.1 %) smaller file than xz -6e (try also without lc=4): @@ -1552,7 +1644,7 @@ EXAMPLES xz --x86 --lzma2 libfoo.so - Note that the order of the filter options is significant. If --x86 is + Note that the order of the filter options is significant. If --x86 is specified after --lzma2, xz will give an error, because there cannot be any filter after LZMA2, and also because the x86 BCJ filter cannot be used as the last filter in the chain. @@ -1561,26 +1653,24 @@ EXAMPLES images. It should usually beat PNG, which has a few more advanced fil- ters than simple delta but uses Deflate for the actual compression. - The image has to be saved in uncompressed format, for example, as un- - compressed TIFF. The distance parameter of the Delta filter is set to - match the number of bytes per pixel in the image. For example, 24-bit - RGB bitmap needs dist=3, and it is also good to pass pb=0 to LZMA2 to + The image has to be saved in uncompressed format, for example, as un- + compressed TIFF. The distance parameter of the Delta filter is set to + match the number of bytes per pixel in the image. For example, 24-bit + RGB bitmap needs dist=3, and it is also good to pass pb=0 to LZMA2 to accommodate the three-byte alignment: xz --delta=dist=3 --lzma2=pb=0 foo.tiff - If multiple images have been put into a single archive (for example, - .tar), the Delta filter will work on that too as long as all images + If multiple images have been put into a single archive (for example, + .tar), the Delta filter will work on that too as long as all images have the same number of bytes per pixel. SEE ALSO - xzdec(1), xzdiff(1), xzgrep(1), xzless(1), xzmore(1), gzip(1), + xzdec(1), xzdiff(1), xzgrep(1), xzless(1), xzmore(1), gzip(1), bzip2(1), 7z(1) XZ Utils: XZ Embedded: LZMA SDK: - - -Tukaani 2023-07-17 XZ(1) +Tukaani 2024-04-08 XZ(1) diff --git a/doc/man/txt/xzdec.txt b/doc/man/txt/xzdec.txt index a914e20..b6218dd 100644 --- a/doc/man/txt/xzdec.txt +++ b/doc/man/txt/xzdec.txt @@ -1,7 +1,5 @@ XZDEC(1) XZ Utils XZDEC(1) - - NAME xzdec, lzmadec - Small .xz and .lzma decompressors @@ -17,11 +15,11 @@ DESCRIPTION to decompress .xz files. lzmadec is identical to xzdec except that lz- madec supports .lzma files instead of .xz files. - To reduce the size of the executable, xzdec doesn't support multi- - threading or localization, and doesn't read options from XZ_DEFAULTS + To reduce the size of the executable, xzdec doesn't support multi- + threading or localization, and doesn't read options from XZ_DEFAULTS and XZ_OPT environment variables. xzdec doesn't support displaying in- termediate progress information: sending SIGINFO to xzdec does nothing, - but sending SIGUSR1 terminates the process instead of displaying + but sending SIGUSR1 terminates the process instead of displaying progress information. OPTIONS @@ -75,6 +73,4 @@ SEE ALSO XZ Embedded: - - -Tukaani 2017-04-19 XZDEC(1) +Tukaani 2024-04-08 XZDEC(1) diff --git a/doc/man/txt/xzdiff.txt b/doc/man/txt/xzdiff.txt index 681b00c..cb61372 100644 --- a/doc/man/txt/xzdiff.txt +++ b/doc/man/txt/xzdiff.txt @@ -1,37 +1,38 @@ XZDIFF(1) XZ Utils XZDIFF(1) - - NAME xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files SYNOPSIS - xzcmp [cmp_options] file1 [file2] - xzdiff [diff_options] file1 [file2] - lzcmp [cmp_options] file1 [file2] - lzdiff [diff_options] file1 [file2] + xzcmp [option...] file1 [file2] + xzdiff ... + lzcmp ... + lzdiff ... DESCRIPTION - xzcmp and xzdiff invoke cmp(1) or diff(1) on files compressed with - xz(1), lzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1). All options - specified are passed directly to cmp(1) or diff(1). If only one file - is specified, then the files compared are file1 (which must have a suf- - fix of a supported compression format) and file1 from which the com- - pression format suffix has been stripped. If two files are specified, - then they are uncompressed if necessary and fed to cmp(1) or diff(1). - The exit status from cmp(1) or diff(1) is preserved unless a decompres- - sion error occurs; then exit status is 2. - - The names lzcmp and lzdiff are provided for backward compatibility with - LZMA Utils. + xzcmp and xzdiff compare uncompressed contents of two files. Uncom- + pressed data and options are passed to cmp(1) or diff(1) unless --help + or --version is specified. -SEE ALSO - cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zdiff(1) + If both file1 and file2 are specified, they can be uncompressed files + or files in formats that xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), or + lz4(1) can decompress. The required decompression commands are deter- + mined from the filename suffixes of file1 and file2. A file with an + unknown suffix is assumed to be either uncompressed or in a format that + xz(1) can decompress. -BUGS - Messages from the cmp(1) or diff(1) programs refer to temporary file- - names instead of those specified. + If only one filename is provided, file1 must have a suffix of a sup- + ported compression format and the name for file2 is assumed to be file1 + with the compression format suffix removed. + The commands lzcmp and lzdiff are provided for backward compatibility + with LZMA Utils. +EXIT STATUS + If a decompression error occurs, the exit status is 2. Otherwise the + exit status of cmp(1) or diff(1) is used. + +SEE ALSO + cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), lz4(1) -Tukaani 2021-06-04 XZDIFF(1) +Tukaani 2024-02-13 XZDIFF(1) diff --git a/doc/man/txt/xzgrep.txt b/doc/man/txt/xzgrep.txt index 596520c..85b8b90 100644 --- a/doc/man/txt/xzgrep.txt +++ b/doc/man/txt/xzgrep.txt @@ -1,12 +1,10 @@ XZGREP(1) XZ Utils XZGREP(1) - - NAME - xzgrep - search compressed files for a regular expression + xzgrep - search possibly-compressed files for patterns SYNOPSIS - xzgrep [grep_options] [-e] pattern [file...] + xzgrep [option...] [pattern_list] [file...] xzegrep ... xzfgrep ... lzgrep ... @@ -14,36 +12,58 @@ SYNOPSIS lzfgrep ... DESCRIPTION - xzgrep invokes grep(1) on files which may be either uncompressed or - compressed with xz(1), lzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1). - All options specified are passed directly to grep(1). + xzgrep invokes grep(1) on uncompressed contents of files. The formats + of the files are determined from the filename suffixes. Any file with + a suffix supported by xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), or + lz4(1) will be decompressed; all other files are assumed to be uncom- + pressed. + + If no files are specified or file is - then standard input is read. + When reading from standard input, only files supported by xz(1) are de- + compressed. Other files are assumed to be in uncompressed form al- + ready. + + Most options of grep(1) are supported. However, the following options + are not supported: + + -r, --recursive + + -R, --dereference-recursive + + -d, --directories=action + + -Z, --null - If no file is specified, then standard input is decompressed if neces- - sary and fed to grep(1). When reading from standard input, gzip(1), - bzip2(1), lzop(1), and zstd(1) compressed files are not supported. + -z, --null-data - If xzgrep is invoked as xzegrep or xzfgrep then grep -E or grep -F is - used instead of grep(1). The same applies to names lzgrep, lzegrep, - and lzfgrep, which are provided for backward compatibility with LZMA - Utils. + --include=glob + + --exclude=glob + + --exclude-from=file + + --exclude-dir=glob + + xzegrep is an alias for xzgrep -E. xzfgrep is an alias for xzgrep -F. + + The commands lzgrep, lzegrep, and lzfgrep are provided for backward + compatibility with LZMA Utils. EXIT STATUS - 0 At least one match was found from at least one of the input + 0 At least one match was found from at least one of the input files. No errors occurred. - 1 No matches were found from any of the input files. No errors + 1 No matches were found from any of the input files. No errors occurred. - >1 One or more errors occurred. It is unknown if matches were + >1 One or more errors occurred. It is unknown if matches were found. ENVIRONMENT - GREP If the GREP environment variable is set, xzgrep uses it instead - of grep(1), grep -E, or grep -F. + GREP If GREP is set to a non-empty value, it is used instead of grep, + grep -E, or grep -F. SEE ALSO - grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zgrep(1) - - + grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), lz4(1), zgrep(1) -Tukaani 2022-07-19 XZGREP(1) +Tukaani 2024-02-13 XZGREP(1) diff --git a/doc/man/txt/xzless.txt b/doc/man/txt/xzless.txt index 5c14c80..655a607 100644 --- a/doc/man/txt/xzless.txt +++ b/doc/man/txt/xzless.txt @@ -1,7 +1,5 @@ XZLESS(1) XZ Utils XZLESS(1) - - NAME xzless, lzless - view xz or lzma compressed (text) files @@ -11,8 +9,9 @@ SYNOPSIS 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. + nal. Files supported by xz(1) are decompressed; other files are as- + sumed to be in uncompressed form already. If no files are given, xz- + less 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- @@ -28,12 +27,10 @@ ENVIRONMENT it is already set in the environment. LESSOPEN - Set to a command line to invoke the xz(1) decompressor for pre- + 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 2010-09-27 XZLESS(1) +Tukaani 2024-02-12 XZLESS(1) diff --git a/doc/man/txt/xzmore.txt b/doc/man/txt/xzmore.txt index 5a9d86c..baa496e 100644 --- a/doc/man/txt/xzmore.txt +++ b/doc/man/txt/xzmore.txt @@ -1,7 +1,5 @@ XZMORE(1) XZ Utils XZMORE(1) - - NAME xzmore, lzmore - view xz or lzma compressed (text) files @@ -10,25 +8,24 @@ SYNOPSIS lzmore [file...] DESCRIPTION - xzmore is a filter which allows examination of xz(1) or lzma(1) com- - pressed text files one screenful at a time on a soft-copy terminal. - - To use a pager other than the default more, set environment variable - PAGER to the name of the desired program. The name lzmore is provided - for backward compatibility with LZMA Utils. + xzmore displays text from compressed files to a terminal using more(1). + Files supported by xz(1) are decompressed; other files are assumed to + be in uncompressed form already. If no files are given, xzmore reads + from standard input. See the more(1) manual for the keyboard commands. - e or q When the prompt --More--(Next file: file) is printed, this com- - mand causes xzmore to exit. + Note that scrolling backwards might not be possible depending on the + implementation of more(1). This is because xzmore uses a pipe to pass + the decompressed data to more(1). xzless(1) uses less(1) which pro- + vides more advanced features. - s When the prompt --More--(Next file: file) is printed, this com- - mand causes xzmore to skip the next file and continue. + The command lzmore is provided for backward compatibility with LZMA + Utils. - For list of keyboard commands supported while actually viewing the con- - tent of a file, refer to manual of the pager you use, usually more(1). +ENVIRONMENT + PAGER If PAGER is set, its value is used as the pager instead of + more(1). SEE ALSO more(1), xz(1), xzless(1), zmore(1) - - -Tukaani 2013-06-30 XZMORE(1) +Tukaani 2024-02-12 XZMORE(1) diff --git a/doc/xz-file-format.txt b/doc/xz-file-format.txt index 09c83e0..12d2530 100644 --- a/doc/xz-file-format.txt +++ b/doc/xz-file-format.txt @@ -2,7 +2,7 @@ The .xz File Format =================== -Version 1.1.0 (2022-12-11) +Version 1.2.1 (2024-04-08) 0. Preface @@ -81,18 +81,26 @@ Version 1.1.0 (2022-12-11) 0.2. Getting the Latest Version The latest official version of this document can be downloaded - from . + from . Specific versions of this document have a filename xz-file-format-X.Y.Z.txt where X.Y.Z is the version number. For example, the version 1.0.0 of this document is available - at . + at . 0.3. Version History Version Date Description + 1.2.1 2024-04-08 The URLs of this specification and + XZ Utils were changed back to the + original ones in Sections 0.2 and 7. + + 1.2.0 2024-01-19 Added RISC-V filter and updated URLs in + Sections 0.2 and 7. The URL of this + specification was changed. + 1.1.0 2022-12-11 Added ARM64 filter and clarified 32-bit ARM endianness in Section 5.3.2, language improvements in Section 5.4 @@ -923,6 +931,7 @@ Version 1.1.0 (2022-12-11) 0x08 2 bytes ARM Thumb filter [1] 0x09 4 bytes SPARC filter 0x0A 4 bytes ARM64 filter [2] + 0x0B 2 bytes RISC-V filter [1] These are for little endian instruction encoding. This must not be confused with data endianness. @@ -1136,30 +1145,30 @@ Version 1.1.0 (2022-12-11) 7. References LZMA SDK - The original LZMA implementation - http://7-zip.org/sdk.html + https://7-zip.org/sdk.html LZMA Utils - LZMA adapted to POSIX-like systems - http://tukaani.org/lzma/ + https://tukaani.org/lzma/ XZ Utils - The next generation of LZMA Utils - http://tukaani.org/xz/ + https://tukaani.org/xz/ [RFC-1952] GZIP file format specification version 4.3 - http://www.ietf.org/rfc/rfc1952.txt + https://www.ietf.org/rfc/rfc1952.txt - Notation of byte boxes in section "2.1. Overall conventions" [RFC-2119] Key words for use in RFCs to Indicate Requirement Levels - http://www.ietf.org/rfc/rfc2119.txt + https://www.ietf.org/rfc/rfc2119.txt [GNU-tar] - GNU tar 1.21 manual - http://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html + GNU tar 1.35 manual + https://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html - Node 9.4.2 "Blocking Factor", paragraph that begins "gzip will complain about trailing garbage" - Note that this URL points to the latest version of the manual, and may some day not contain the note which is in - 1.21. For the exact version of the manual, download GNU - tar 1.21: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.21.tar.gz + 1.35. For the exact version of the manual, download GNU + tar 1.35: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.35.tar.gz diff --git a/dos/Makefile b/dos/Makefile index 793adc1..f8ba437 100644 --- a/dos/Makefile +++ b/dos/Makefile @@ -1,12 +1,11 @@ +# SPDX-License-Identifier: 0BSD + ############################################################################### # # Makefile to build XZ Utils using DJGPP # # Author: Lasse Collin # -# This file has been put into the public domain. -# You can do whatever you want with this file. -# ############################################################################### # For debugging, set comment "#define NDEBUG 1" from config.h to enable diff --git a/dos/config.h b/dos/config.h index 67b72f8..415cd5a 100644 --- a/dos/config.h +++ b/dos/config.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: 0BSD */ + /* How many MiB of RAM to assume if the real amount cannot be determined. */ #define ASSUME_RAM 32 @@ -79,9 +81,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - /* Define to 1 if .lz (lzip) decompression support is enabled. */ #define HAVE_LZIP_DECODER 1 @@ -106,23 +105,14 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the `utimes' function. */ +/* Define to 1 if you have the 'utimes' function. */ #define HAVE_UTIMES 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 to 1 if the system has the type '_Bool'. */ #define HAVE__BOOL 1 /* Define to 1 if the GNU C extension __builtin_assume_aligned is supported. @@ -145,7 +135,7 @@ /* Define to the home page for this package. */ #define PACKAGE_URL "https://tukaani.org/xz/" -/* The size of `size_t', as computed by sizeof. */ +/* The size of 'size_t', as computed by sizeof. */ #define SIZEOF_SIZE_T 4 /* Define to 1 if the system supports fast unaligned access to 16-bit and diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index 14350cf..25428e9 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -1,2687 +1,39 @@ -# Doxyfile 1.9.6 +# SPDX-License-Identifier: 0BSD -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# Run "doxygen" in this directory to generate the liblzma API documentation +# into ../doc/api. # -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. +# Use the "update-doxygen" script for more choices: +# - Include the liblzma version number in the generated documentation. +# - Instead of API docs, docs of XZ Utils internals may be built. +# - Change the output directory for out-of-tree builds. # -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). -# -# Note: -# -# Use doxygen to compare the used configuration file with the template -# configuration file: -# doxygen -x [configFile] -# Use doxygen to compare the used configuration file with the template -# configuration file without replacing the environment variables or CMake type -# replacement variables: -# doxygen -x_noenv [configFile] - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "liblzma (XZ Utils)" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ../doc - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 -# sub-directories (in 2 levels) under the output directory of each output format -# and will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to -# control the number of sub-directories. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# Controls the number of sub-directories that will be created when -# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every -# level increment doubles the number of directories, resulting in 4096 -# directories at level 8 which is the default and also the maximum value. The -# sub-directories are organized in 2 levels, the first level always has a fixed -# number of 16 directories. -# Minimum value: 0, maximum value: 8, default value: 8. -# This tag requires that the tag CREATE_SUBDIRS is set to YES. - -CREATE_SUBDIRS_LEVEL = 8 - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, -# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English -# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, -# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with -# English messages), Korean, Korean-en (Korean with English messages), Latvian, -# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, -# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, -# Swedish, Turkish, Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = ../src/liblzma/api - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:^^" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". Note that you cannot put \n's in the value part of an alias -# to insert newlines (in the resulting output). You can put ^^ in the value part -# of an alias to insert a newline as if a physical newline was in the original -# file. When you need a literal { or } or , in the value part of an alias you -# have to escape them by means of a backslash (\), this can lead to conflicts -# with the commands \{ and \} for these it is advised to use the version @{ and -# @} or use a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, -# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = NO - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which effectively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = NO - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# will also hide undocumented C++ concepts if enabled. This option has no effect -# if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to YES to properly -# deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# Possible values are: SYSTEM, NO and YES. -# The default value is: SYSTEM. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class -# will show which file needs to be included to use the class. -# The default value is: YES. - -SHOW_HEADERFILE = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. See also section "Changing the -# layout of pages" for information. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as documenting some parameters in -# a documented function twice, or documenting parameters that don't exist or -# using markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete -# function parameter documentation. If set to NO, doxygen will accept that some -# parameters have no documentation without warning. -# The default value is: YES. - -WARN_IF_INCOMPLETE_DOC = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong parameter -# documentation, but not about the absence of documentation. If EXTRACT_ALL is -# set to YES then this flag will automatically be disabled. See also -# WARN_IF_INCOMPLETE_DOC -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about -# undocumented enumeration values. If set to NO, doxygen will accept -# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: NO. - -WARN_IF_UNDOC_ENUM_VAL = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# See also: WARN_LINE_FORMAT -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# In the $text part of the WARN_FORMAT command it is possible that a reference -# to a more specific place is given. To make it easier to jump to this place -# (outside of doxygen) the user can define a custom "cut" / "paste" string. -# Example: -# WARN_LINE_FORMAT = "'vi $file +$line'" -# See also: WARN_FORMAT -# The default value is: at line $line of file $file. - -WARN_LINE_FORMAT = "at line $line of file $file" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). In case the file specified cannot be opened for writing the -# warning and error messages are written to standard error. When as file - is -# specified the warning and error messages are written to standard output -# (stdout). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = ../src/liblzma/api - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# See also: INPUT_FILE_ENCODING -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify -# character encoding on a per file pattern basis. Doxygen will compare the file -# name with each pattern and apply the encoding instead of the default -# INPUT_ENCODING) if there is a match. The character encodings are a list of the -# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding -# "INPUT_ENCODING" for further information on supported encodings. - -INPUT_FILE_ENCODING = - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, -# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C -# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.c \ - *.h - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = YES - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# ANamespace::AClass, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that doxygen will use the data processed and written to standard output -# for further processing, therefore nothing else, like debug statements or used -# commands (so in case of a Windows batch file always use @echo OFF), should be -# written to standard output. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -# The Fortran standard specifies that for fixed formatted Fortran code all -# characters from position 72 are to be considered as comment. A common -# extension is to allow longer lines before the automatic comment starts. The -# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can -# be processed before the automatic comment starts. -# Minimum value: 7, maximum value: 10000, default value: 72. - -FORTRAN_COMMENT_AFTER = 72 - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = NO - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = NO - -# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) -# that should be ignored while generating the index headers. The IGNORE_PREFIX -# tag works for classes, function and member names. The entity will be placed in -# the alphabetical list under the first letter of the entity name that remains -# after removing the prefix. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = api - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). -# Note: Since the styling of scrollbars can currently not be overruled in -# Webkit/Chromium, the styling will be left out of the default doxygen.css if -# one or more extra stylesheets have been specified. So if scrollbar -# customization is desired it has to be added explicitly. For an example see the -# documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output -# should be rendered with a dark or light theme. -# Possible values are: LIGHT always generate light mode output, DARK always -# generate dark mode output, AUTO_LIGHT automatically set the mode according to -# the user preference, use light mode if no preference is set (the default), -# AUTO_DARK automatically set the mode according to the user preference, use -# dark mode if no preference is set and TOGGLE allow to user to switch between -# light and dark mode via a button. -# The default value is: AUTO_LIGHT. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE = AUTO_LIGHT - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a color-wheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 210 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use gray-scales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 180 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 110 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag determines the URL of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDURL = - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# on Windows. In the beginning of 2021 Microsoft took the original page, with -# a.o. the download links, offline the HTML help workshop was already many years -# in maintenance mode). You can download the HTML help workshop from the web -# archives at Installation executable (see: -# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo -# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine tune the look of the index (see "Fine-tuning the output"). As an -# example, the default style sheet generated by doxygen has an example that -# shows how to put an image at the root of the tree instead of the PROJECT_NAME. -# Since the tree basically has the same information as the tab index, you could -# consider setting DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the -# FULL_SIDEBAR option determines if the side bar is limited to only the treeview -# area (value NO) or if it should extend to the full height of the window (value -# YES). Setting this to YES gives a layout similar to -# https://docs.readthedocs.io with more room for contents, but less room for the -# project logo, title, and description. If either GENERATE_TREEVIEW or -# DISABLE_INDEX is set to NO, this option has no effect. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FULL_SIDEBAR = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email -# addresses. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -OBFUSCATE_EMAILS = YES - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. -# Note that the different versions of MathJax have different requirements with -# regards to the different settings, so it is possible that also other MathJax -# settings have to be changed when switching between the different MathJax -# versions. -# Possible values are: MathJax_2 and MathJax_3. -# The default value is: MathJax_2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_VERSION = MathJax_2 - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. For more details about the output format see MathJax -# version 2 (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 -# (see: -# http://docs.mathjax.org/en/latest/web/components/output.html). -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility. This is the name for Mathjax version 2, for MathJax version 3 -# this will be translated into chtml), NativeMML (i.e. MathML. Only supported -# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This -# is the name for Mathjax version 3, for MathJax version 2 this will be -# translated into HTML-CSS) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. The default value is: -# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 -# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# for MathJax version 2 (see -# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# For example for MathJax version 3 (see -# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): -# MATHJAX_EXTENSIONS = ams -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /