diff --git a/AUTHORS b/AUTHORS index bda87975a5..f805a204ec 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,26 +2,57 @@ Authors of XZ Utils =================== - XZ Utils is developed and maintained by Lasse Collin - . + 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 + 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 GNU Autotools-based build system contains files from many authors, - which I'm not trying to list here. + The initial version of the threaded .xz decompressor was written + by Sebastian Andrzej Siewior. - Several people have contributed fixes or reported bugs. Most of them - are mentioned in the file THANKS. + The initial version of the .lz (lzip) decoder was written + by Michał Górny. + + Architecture-specific CRC optimizations were contributed by + Ilya Kurdyukov, Chenxi Mao, and Xi Ruoyao. + + Other authors: + - Jonathan Nieder + - Joachim Henke + + 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. + + 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 new file mode 100644 index 0000000000..32506cdd56 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,2485 @@ +# SPDX-License-Identifier: 0BSD + +############################################################################# +# +# CMake support for building XZ Utils +# +# Requirements: +# +# - CMake 3.20 or later +# +# - To get translated messages, install GNU gettext tools (the command +# msgfmt is needed). Alternatively disable translations by setting +# XZ_NLS=OFF. +# +# - If building from xz.git instead of a release tarball: To generate +# translated man pages, run po4a/update-po which requires the po4a +# tool. The build works without this step too. +# +# About CMAKE_BUILD_TYPE: +# +# - CMake's standard choices are fine to use for production builds, +# including "Release" and "RelWithDebInfo". +# +# 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. +# +# - 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. +# +# 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. +# +# This file provides the following installation components (if you only +# need liblzma, install only its components!): +# - liblzma_Runtime (shared library only) +# - liblzma_Development +# - 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 +# with case-insensitive file systems. For example, to require liblzma 5.2.5 +# or a newer compatible version: +# +# find_package(liblzma 5.2.5 REQUIRED CONFIG) +# target_link_libraries(my_application liblzma::liblzma) +# +############################################################################# +# +# Author: Lasse Collin +# +############################################################################# + +cmake_minimum_required(VERSION 3.20...3.31 FATAL_ERROR) + +include(CMakePushCheckState) +include(CheckIncludeFile) +include(CheckSymbolExists) +include(CheckStructHasMember) +include(CheckCSourceCompiles) +include(CheckCCompilerFlag) +include(cmake/tuklib_large_file_support.cmake) +include(cmake/tuklib_integer.cmake) +include(cmake/tuklib_cpucores.cmake) +include(cmake/tuklib_physmem.cmake) +include(cmake/tuklib_progname.cmake) +include(cmake/tuklib_mbstr.cmake) + +set(PACKAGE_NAME "XZ Utils") +set(PACKAGE_BUGREPORT "xz@tukaani.org") +set(PACKAGE_URL "https://tukaani.org/xz/") + +# Get the package version from version.h into PACKAGE_VERSION_SHORT and +# PACKAGE_VERSION. The former variable won't include the possible "alpha" +# or "beta" suffix. +file(READ src/liblzma/api/lzma/version.h PACKAGE_VERSION) +string(REGEX REPLACE +"^.*\n\ +#define LZMA_VERSION_MAJOR ([0-9]+)\n\ +.*\ +#define LZMA_VERSION_MINOR ([0-9]+)\n\ +.*\ +#define LZMA_VERSION_PATCH ([0-9]+)\n\ +.*$" + "\\1.\\2.\\3" PACKAGE_VERSION_SHORT "${PACKAGE_VERSION}") + +if(PACKAGE_VERSION MATCHES "\n#define [A-Z_ ]*_ALPHA\n") + set(PACKAGE_VERSION "${PACKAGE_VERSION_SHORT}alpha") +elseif(PACKAGE_VERSION MATCHES "\n#define [A-Z_ ]*_BETA\n") + set(PACKAGE_VERSION "${PACKAGE_VERSION_SHORT}beta") +else() + set(PACKAGE_VERSION "${PACKAGE_VERSION_SHORT}") +endif() + +# 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_SHORT}" 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() + +# Reject unsupported MSVC versions. +if(MSVC AND MSVC_VERSION LESS 1900) + message(FATAL_ERROR "Visual Studio older than 2015 is not supported") +endif() + +# We need a compiler that supports enough C99 or newer (variable-length arrays +# aren't needed, those are optional in C11/C17). C11 is preferred since C11 +# features may be optionally used if they are available. +# +# Setting CMAKE_C_STANDARD here makes it the default for all targets. +# It doesn't affect the INTERFACE so liblzma::liblzma won't end up with +# INTERFACE_COMPILE_FEATURES "c_std_99" or such (the API headers are C89 +# and C++ compatible). +# +# Avoid set(CMAKE_C_STANDARD_REQUIRED ON) because it's fine to decay +# to C99 if C11 isn't supported. +set(CMAKE_C_STANDARD 11) + +# On Apple OSes, don't build executables as bundles: +set(CMAKE_MACOSX_BUNDLE OFF) + +# The targets defined here don't support compiling as a unity build. Encoder +# and decoder source files define different types with the same name, and some +# internal header files don't have header guards leading to redeclaration +# errors. +set(CMAKE_UNITY_BUILD 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 +# to work in both cmd.exe and /bin/sh. +# +# However, even \x20 isn't enough in all situations, resulting in +# "syntax error" from windres. Using --use-temp-file prevents windres +# from using popen() and this seems to fix the problem. +# +# llvm-windres from Clang/LLVM 16.0.6 and older: The \x20 results +# in "XZx20Utils" in the compiled binary. The option --use-temp-file +# makes no difference. +# +# llvm-windres 17.0.0 and later: It emulates GNU windres more accurately, so +# the workarounds used with GNU windres must be used with llvm-windres too. +# +# CMake 3.27 doesn't have CMAKE_RC_COMPILER_ID so we rely on +# CMAKE_C_COMPILER_ID. +if((MINGW OR CYGWIN) AND ( + NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" OR + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "17")) + # Use workarounds with GNU windres and llvm-windres >= 17.0.0. The \x20 + # in PACKAGE_NAME_DEFINITION works with gcc and clang too so we don't need + # to worry how to pass different flags to windres and the C compiler. + # Keep the original PACKAGE_NAME intact for generation of liblzma.pc. + string(APPEND CMAKE_RC_FLAGS " --use-temp-file") + string(REPLACE " " "\\040" 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() + +# When used with MSVC, CMake can merge .manifest files with +# linker-generated manifests and embed the result in an executable. +# However, when paired with MinGW-w64, CMake (3.30) ignores .manifest +# files. Embedding a manifest with a resource file works with both +# toochains. It's also the way to do it with Autotools. +# +# With MSVC, we need to disable the default manifest; attempting to add +# two manifest entries would break the build. The flag /MANIFEST:NO +# goes to the linker and it also affects behavior of CMake itself: it +# looks what flags are being passed to the linker and when CMake sees +# the /MANIFEST:NO option, other manifest-related linker flags are +# no longer added (see the file Source/cmcmd.cxx in CMake). +# +# See: https://gitlab.kitware.com/cmake/cmake/-/issues/23066 +if(MSVC) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") +endif() + +# Dependencies for all Windows resource files: +set(W32RES_DEPENDENCIES + "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc" + "${CMAKE_CURRENT_SOURCE_DIR}/src/common/w32_application.manifest" +) + +# Definitions common to all targets: +add_compile_definitions( + # Package info: + PACKAGE_NAME="${PACKAGE_NAME_DEFINITION}" + PACKAGE_BUGREPORT="${PACKAGE_BUGREPORT}" + PACKAGE_URL="${PACKAGE_URL}" + + # Standard headers and types are available: + HAVE_STDBOOL_H + HAVE__BOOL + HAVE_STDINT_H + HAVE_INTTYPES_H + + # Always enable CRC32 since liblzma should never build without it. + HAVE_CHECK_CRC32 + + # Disable assert() checks when no build type has been specified. Non-empty + # build types like "Release" and "Debug" handle this by default. + $<$:NDEBUG> +) + +# Support 32-bit x86 assembly files. +if(NOT MSVC) + # It's simplest to ask the compiler for the architecture because we + # know that on supported platforms __i386__ is defined. + # + # Checking CMAKE_SYSTEM_PROCESSOR wouldn't be so simple or as reliable + # because it could indicate x86-64 even if building for 32-bit x86 + # because one doesn't necessarily use a CMake toolchain file when + # building 32-bit executables on a 64-bit system. Also, the strings + # that identify 32-bit or 64-bit x86 aren't standardized in CMake. + if(MINGW OR CYGWIN OR CMAKE_SYSTEM_NAME MATCHES + "^FreeBSD$|^GNU$|^Linux$|^MirBSD$|^NetBSD$|^OpenBSD$") + check_symbol_exists("__i386__" "" ASM_I386_DEFAULT) + else() + set(ASM_I386_DEFAULT OFF) + endif() + + option(XZ_ASM_I386 "Enable 32-bit x86 assembly code" + "${ASM_I386_DEFAULT}") + + if(XZ_ASM_I386) + enable_language(ASM) + endif() +endif() + + +###################### +# System definitions # +###################### + +# _GNU_SOURCE and such definitions. This specific macro is special since +# it also adds the definitions to CMAKE_REQUIRED_DEFINITIONS. +tuklib_use_system_extensions() + +# Check for large file support. It's required on some 32-bit platforms and +# even on 64-bit MinGW-w64 to get 64-bit off_t. This can be forced off on +# the CMake command line if needed: -DLARGE_FILE_SUPPORT=OFF +tuklib_large_file_support(ALL) + +# This is needed by liblzma and xz. +tuklib_integer(ALL) + +# This is used for liblzma.pc generation to add -lrt and -lmd if needed. +# +# The variable name LIBS comes from Autoconf where AC_SEARCH_LIBS adds the +# libraries it finds into the shell variable LIBS. These libraries need to +# be put into liblzma.pc too, thus liblzma.pc.in has @LIBS@ because that +# matches the Autoconf's variable. When CMake support was added, using +# the same variable with configure_file() was the simplest method. +set(LIBS) + +# Check for clock_gettime(). Do this before checking for threading so +# that we know there if CLOCK_MONOTONIC is available. +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(PREPEND CMAKE_REQUIRED_LIBRARIES 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 ${LIBS}") # For liblzma.pc + else() + list(POP_FRONT CMAKE_REQUIRED_LIBRARIES) + endif() +endif() + +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) +endif() + + +# 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.) +set(XZ_NLS_DEFAULT OFF) +find_package(Intl) +find_package(Gettext) +if(Intl_FOUND AND GETTEXT_FOUND) + set(XZ_NLS_DEFAULT ON) +endif() + +option(XZ_NLS "Native Language Support (translated messages and man pages)" + "${XZ_NLS_DEFAULT}") + +if(XZ_NLS) + if(NOT Intl_FOUND) + message(FATAL_ERROR "Native language support (NLS) was enabled but " + "find_package(Intl) failed. " + "Install libintl or set XZ_NLS=OFF.") + endif() + + if(NOT GETTEXT_FOUND) + message(FATAL_ERROR "Native language support (NLS) was enabled but " + "find_package(Gettext) failed. " + "Install gettext tools or set XZ_NLS=OFF.") + endif() + + if(WIN32) + # The command line tools use UTF-8 on native Windows. + # Non-ASCII characters display correctly only when + # using UCRT and gettext-runtime >= 0.23.1. + check_c_source_compiles( + "#define WIN32_LEAN_AND_MEAN + #include + #include + + #ifndef _UCRT + #error \"Not UCRT\" + #endif + + #if LIBINTL_VERSION < 0x001701 + #error \"gettext-runtime < 0.23.1\" + #endif + + int main(void) { return 0; } + " + USING_UCRT_AND_RECENT_GETTEXT) + if(NOT USING_UCRT_AND_RECENT_GETTEXT) + message(FATAL_ERROR "Native language support (NLS) was enabled " + "but it requires UCRT and " + "gettext-runtime >= 0.23.1. To build with " + "MSVCRT or old gettext-runtime, " + "set XZ_NLS=OFF.") + endif() + endif() + + # Warn if translated man pages are missing. + if(UNIX AND NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po4a/man") + message(WARNING "Native language support (NLS) was 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() + + +# Add warning options for GCC or Clang. Keep this in sync with configure.ac. +# +# NOTE: add_compile_options() doesn't affect the feature checks; +# only the new targets being created use these flags. Thus +# the -Werror usage in checks won't be break because of these. +if(CMAKE_C_COMPILER_ID MATCHES GNU|Clang) + foreach(OPT -Wall + -Wextra + -Wvla + -Wformat=2 + -Winit-self + -Wmissing-include-dirs + -Wshift-overflow=2 + -Wstrict-overflow=3 + -Walloc-zero + -Wduplicated-cond + -Wfloat-equal + -Wundef + -Wshadow + -Wpointer-arith + -Wbad-function-cast + -Wwrite-strings + -Wdate-time + -Wsign-conversion + -Wfloat-conversion + -Wlogical-op + -Waggregate-return + -Wstrict-prototypes + -Wold-style-definition + -Wmissing-prototypes + -Wmissing-declarations + -Wredundant-decls + -Wimplicit-fallthrough + -Wimplicit-fallthrough=5 + + -Wc99-compat + -Wc11-extensions + -Wc2x-compat + -Wc2x-extensions + -Wpre-c2x-compat + -Warray-bounds-pointer-arithmetic + -Wassign-enum + -Wconditional-uninitialized + -Wdocumentation + -Wduplicate-enum + -Wempty-translation-unit + -Wflexible-array-extensions + -Wmissing-variable-declarations + -Wnewline-eof + -Wshift-sign-overflow + -Wstring-conversion + ) + # A variable name cannot have = in it so replace = with _. + string(REPLACE = _ CACHE_VAR "HAVE_COMPILER_OPTION_${OPT}") + + check_c_compiler_flag("${OPT}" "${CACHE_VAR}") + + if("${${CACHE_VAR}}") + add_compile_options("${OPT}") + endif() + endforeach() +endif() + + +############################################################################# +# liblzma +############################################################################# + +option(BUILD_SHARED_LIBS "Build liblzma as a shared library instead of static") + +# Symbol versioning is supported with ELF shared libraries on certain OSes. +# First assume that symbol versioning isn't supported. +set(SYMBOL_VERSIONING "no") + +if(NOT WIN32) + # The XZ_SYMBOL_VERSIONING option is ignored for static libraries but + # we keep the option visible still in case the project is reconfigured + # to build a shared library. + # + # auto Autodetect between no, generic, and linux + # yes Force on by autodetecting between linux and generic + # no Disable symbol versioning + # generic FreeBSD, most Linux/glibc systems, and GNU/Hurd + # linux Linux/glibc with 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. + set(SUPPORTED_SYMBOL_VERSIONING_VARIANTS auto yes no generic linux) + set(XZ_SYMBOL_VERSIONING "auto" CACHE STRING "Enable ELF shared library \ +symbol versioning (${SUPPORTED_SYMBOL_VERSIONING_VARIANTS})") + + # Show a dropdown menu in CMake GUI: + set_property(CACHE XZ_SYMBOL_VERSIONING + PROPERTY STRINGS "${SUPPORTED_SYMBOL_VERSIONING_VARIANTS}") + + if(NOT XZ_SYMBOL_VERSIONING IN_LIST SUPPORTED_SYMBOL_VERSIONING_VARIANTS) + message(FATAL_ERROR "'${XZ_SYMBOL_VERSIONING}' is not a supported " + "symbol versioning variant") + endif() + + if(NOT XZ_SYMBOL_VERSIONING MATCHES "^auto$|^yes$") + # Autodetection was disabled. Use the user-specified value as is. + set(SYMBOL_VERSIONING "${XZ_SYMBOL_VERSIONING}") + else() + # Autodetect the symbol versioning variant. + # + # 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. + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + check_c_source_compiles( + "#include + #if defined(__GLIBC__) && !defined(__UCLIBC__) + int main(void) { return 0; } + #else + compile error + #endif + " + IS_LINUX_WITH_GLIBC) + else() + set(IS_LINUX_WITH_GLIBC OFF) + endif() + + if(IS_LINUX_WITH_GLIBC 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 "generic") + + elseif(IS_LINUX_WITH_GLIBC) + # 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. + set(SYMBOL_VERSIONING "linux") + + elseif(CMAKE_SYSTEM_NAME MATCHES "^FreeBSD$|^GNU$" OR + XZ_SYMBOL_VERSIONING STREQUAL "yes") + set(SYMBOL_VERSIONING "generic") + endif() + endif() +endif() + +set(LIBLZMA_API_HEADERS + src/liblzma/api/lzma.h + src/liblzma/api/lzma/base.h + src/liblzma/api/lzma/bcj.h + src/liblzma/api/lzma/block.h + src/liblzma/api/lzma/check.h + src/liblzma/api/lzma/container.h + src/liblzma/api/lzma/delta.h + src/liblzma/api/lzma/filter.h + src/liblzma/api/lzma/hardware.h + src/liblzma/api/lzma/index.h + src/liblzma/api/lzma/index_hash.h + src/liblzma/api/lzma/lzma12.h + 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_common.h + src/liblzma/check/crc_x86_clmul.h + src/liblzma/check/crc32_arm64.h + src/liblzma/check/crc32_loongarch.h + src/liblzma/common/block_util.c + src/liblzma/common/common.c + src/liblzma/common/common.h + src/liblzma/common/easy_preset.c + src/liblzma/common/easy_preset.h + src/liblzma/common/filter_common.c + src/liblzma/common/filter_common.h + src/liblzma/common/hardware_physmem.c + src/liblzma/common/index.c + src/liblzma/common/index.h + src/liblzma/common/memcmplen.h + src/liblzma/common/stream_flags_common.c + src/liblzma/common/stream_flags_common.h + src/liblzma/common/string_conversion.c + src/liblzma/common/vli_size.c +) + +target_include_directories(liblzma PRIVATE + src/liblzma/api + src/liblzma/common + src/liblzma/check + src/liblzma/lz + src/liblzma/rangecoder + src/liblzma/lzma + src/liblzma/delta + src/liblzma/simple + src/common +) + + +############# +# Threading # +############# + +# Supported threading methods: +# yes - Autodetect the best threading method. The autodetection will +# prefer Windows threading (win95 or vista) over posix if both are +# available. vista threads will be used over win95 unless it is a +# 32-bit build. Configuration fails if no threading support is found; +# threading won't be silently disabled. +# no - Disable threading. +# posix - Use posix threading (pthreads), or throw an error if not available. +# win95 - Use Windows win95 threading, or throw an error if not available. +# vista - Use Windows vista threading, or throw an error if not available. +set(SUPPORTED_THREADING_METHODS yes no posix win95 vista) + +set(XZ_THREADS yes CACHE STRING "Threading method: \ +'yes' to autodetect, 'no' to disable, 'posix' (pthreads), \ +'win95' (WinXP compatible), 'vista' (needs Windows Vista or later)") + +# Create dropdown in CMake GUI since only 1 threading method is possible +# to select in a build. +set_property(CACHE XZ_THREADS + PROPERTY STRINGS "${SUPPORTED_THREADING_METHODS}") + +# This is a flag variable set when win95 threads are used. We must ensure +# that the combination of XZ_SMALL and win95 threads is only used with a +# compiler that supports the __constructor__ attribute. +set(USE_WIN95_THREADS OFF) + +# This is a flag variable set when posix threading (pthreads) is used. +# It's needed when creating liblzma-config.cmake where dependency on +# Threads::Threads is only needed with pthreads. +set(USE_POSIX_THREADS OFF) + +if(NOT XZ_THREADS IN_LIST SUPPORTED_THREADING_METHODS) + message(FATAL_ERROR "'${XZ_THREADS}' is not a supported threading method") +endif() + +if(XZ_THREADS) + # Also set THREADS_PREFER_PTHREAD_FLAG since the flag has no effect + # for Windows threading. + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads REQUIRED) + + # If both Windows and posix threading are available, prefer Windows. + # Note that on Cygwin, CMAKE_USE_WIN32_THREADS_INIT is false. + if(CMAKE_USE_WIN32_THREADS_INIT AND NOT XZ_THREADS STREQUAL "posix") + if(XZ_THREADS STREQUAL "win95" + OR (XZ_THREADS STREQUAL "yes" AND CMAKE_SIZEOF_VOID_P EQUAL 4)) + # Use Windows 95 (and thus XP) compatible threads. + # This avoids use of features that were added in + # Windows Vista. This is used for 32-bit x86 builds for + # compatibility reasons since it makes no measurable difference + # in performance compared to Vista threads. + set(USE_WIN95_THREADS ON) + add_compile_definitions(MYTHREAD_WIN95) + else() + add_compile_definitions(MYTHREAD_VISTA) + endif() + elseif(CMAKE_USE_PTHREADS_INIT) + if(XZ_THREADS MATCHES "^posix$|^yes$") + # The threading library only needs to be explicitly linked + # for posix threads, so this is needed for creating + # liblzma-config.cmake later. + set(USE_POSIX_THREADS ON) + + target_link_libraries(liblzma PRIVATE Threads::Threads) + add_compile_definitions(MYTHREAD_POSIX) + + # Make the thread libs available in later checks. In practice + # only pthread_condattr_setclock check should need this. + list(PREPEND CMAKE_REQUIRED_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") + + # Check if pthread_condattr_setclock() exists to + # use CLOCK_MONOTONIC. + if(HAVE_CLOCK_MONOTONIC) + check_symbol_exists(pthread_condattr_setclock pthread.h + HAVE_PTHREAD_CONDATTR_SETCLOCK) + tuklib_add_definition_if(ALL HAVE_PTHREAD_CONDATTR_SETCLOCK) + endif() + else() + message(SEND_ERROR + "Windows threading method was requested but a compatible " + "library could not be found") + endif() + else() + message(SEND_ERROR "No supported threading library found") + endif() + + target_sources(liblzma PRIVATE + src/common/tuklib_cpucores.c + src/common/tuklib_cpucores.h + src/liblzma/common/hardware_cputhreads.c + src/liblzma/common/outqueue.c + src/liblzma/common/outqueue.h + ) +endif() + + +###################### +# Size optimizations # +###################### + +option(XZ_SMALL "Reduce code size at expense of speed. \ +This may be useful together with CMAKE_BUILD_TYPE=MinSizeRel.") + +if(XZ_SMALL) + add_compile_definitions(HAVE_SMALL) +endif() + + +########## +# Checks # +########## + +set(SUPPORTED_CHECKS crc32 crc64 sha256) + +set(XZ_CHECKS "${SUPPORTED_CHECKS}" CACHE STRING + "Check types to support (crc32 is always built)") + +foreach(CHECK IN LISTS XZ_CHECKS) + if(NOT CHECK IN_LIST SUPPORTED_CHECKS) + message(FATAL_ERROR "'${CHECK}' is not a supported check type") + endif() +endforeach() + +if(XZ_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_be.h + src/liblzma/check/crc32_table_le.h + ) + + if(XZ_ASM_I386) + target_sources(liblzma PRIVATE src/liblzma/check/crc32_x86.S) + target_compile_definitions(liblzma PRIVATE HAVE_CRC_X86_ASM) + endif() +endif() + +if("crc64" IN_LIST XZ_CHECKS) + add_compile_definitions("HAVE_CHECK_CRC64") + + if(XZ_SMALL) + 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_be.h + src/liblzma/check/crc64_table_le.h + ) + + if(XZ_ASM_I386) + target_sources(liblzma PRIVATE src/liblzma/check/crc64_x86.S) + # Adding #define HAVE_CRC_X86_ASM was already handled in + # the CRC32 case a few lines above. CRC32 is always built. + endif() + endif() +endif() + +# External SHA-256 +# +# At least the following implementations are supported: +# +# OS Headers Library Type Function +# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init +# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init +# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init +# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init +# MINIX 3 sys/types.h + sha2.h SHA256_CTX SHA256_Init +# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init +# +# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead +# of size_t. +# +# This is disabled by default because it used to conflict with OpenSSL +# on some platforms and in some cases the builtin code in liblzma was faster. +# See INSTALL and the commit message ac398c3bafa6e4c80e20571373a96947db863b3d. +option(XZ_EXTERNAL_SHA256 "Use SHA-256 code from the operating system \ +if possible. See INSTALL for possible subtle problems." OFF) + +if("sha256" IN_LIST XZ_CHECKS) + add_compile_definitions("HAVE_CHECK_SHA256") + + # Assume that external code won't be used. We need this to know + # if the internal sha256.c should be built. + set(USE_INTERNAL_SHA256 ON) + + if(XZ_EXTERNAL_SHA256) + # Find the header. + set(SHA256_HEADER OFF) + + foreach(X CommonCrypto/CommonDigest.h sha256.h sha2.h) + string(TOUPPER "HAVE_${X}" HAVE_X) + string(REGEX REPLACE "[/.]" "_" HAVE_X "${HAVE_X}") + check_include_file("${X}" "${HAVE_X}") + if(${HAVE_X}) + target_compile_definitions(liblzma PRIVATE "${HAVE_X}") + set(SHA256_HEADER "${X}") + break() + endif() + endforeach() + + if(SHA256_HEADER) + # Find the type to hold the SHA-256 state. + set(SHA256_TYPE OFF) + + foreach(X CC_SHA256_CTX SHA256_CTX SHA2_CTX) + string(TOUPPER "HAVE_${X}" HAVE_X) + + # configure.ac uses conditionally but it's + # required on all cases except Darwin where it exists too. + # So just use it unconditionally here. + set(SOURCE + "#include + #include <${SHA256_HEADER}> + int main(void) + { + ${X} ctx; + return 0; + }") + check_c_source_compiles("${SOURCE}" "${HAVE_X}") + if(${HAVE_X}) + target_compile_definitions(liblzma PRIVATE "${HAVE_X}") + set(SHA256_TYPE "${X}") + break() + endif() + endforeach() + + if(SHA256_TYPE) + # Find the initialization function. It might required libmd. + foreach(X CC_SHA256_Init SHA256Init SHA256_Init) + string(TOUPPER "HAVE_${X}" HAVE_X) + + # On FreeBSD, defines the SHA-256 functions as + # macros to rename them for namespace reasons. Avoid + # check_symbol_exists as that would accept macros without + # checking if the program links. + set(SOURCE + "#include + #include <${SHA256_HEADER}> + int main(void) + { + ${SHA256_TYPE} ctx; + ${X}(&ctx); + return 0; + }") + + check_c_source_compiles("${SOURCE}" "${HAVE_X}") + if(${HAVE_X}) + target_compile_definitions(liblzma PRIVATE "${HAVE_X}") + set(USE_INTERNAL_SHA256 OFF) + break() + else() + # Try with libmd. Other checks don't need it so we + # don't need to leave it into CMAKE_REQUIRED_LIBRARIES. + list(PREPEND CMAKE_REQUIRED_LIBRARIES md) + check_c_source_compiles("${SOURCE}" "${HAVE_X}_LIBMD") + list(POP_FRONT CMAKE_REQUIRED_LIBRARIES) + if(${HAVE_X}_LIBMD) + # NOTE: Just "${HAVE_X}", not "${HAVE_X}_LIBMD": + target_compile_definitions(liblzma PRIVATE + "${HAVE_X}") + target_link_libraries(liblzma PRIVATE md) + set(LIBS "-lmd ${LIBS}") # For liblzma.pc + set(USE_INTERNAL_SHA256 OFF) + break() + endif() + endif() + endforeach() + endif() + endif() + endif() + + if(USE_INTERNAL_SHA256) + target_sources(liblzma PRIVATE src/liblzma/check/sha256.c) + endif() +endif() + + +################# +# Match finders # +################# + +set(SUPPORTED_MATCH_FINDERS hc3 hc4 bt2 bt3 bt4) + +set(XZ_MATCH_FINDERS "${SUPPORTED_MATCH_FINDERS}" CACHE STRING + "Match finders to support (at least one is required for LZMA1 or LZMA2)") + +foreach(MF IN LISTS XZ_MATCH_FINDERS) + if(MF IN_LIST SUPPORTED_MATCH_FINDERS) + string(TOUPPER "${MF}" MF_UPPER) + add_compile_definitions("HAVE_MF_${MF_UPPER}") + else() + message(FATAL_ERROR "'${MF}' is not a supported match finder") + endif() +endforeach() + + +############ +# Encoders # +############ + +set(SIMPLE_FILTERS + x86 + arm + armthumb + arm64 + powerpc + ia64 + sparc + riscv +) + +# The SUPPORTED_FILTERS are shared between Encoders and Decoders +# since only lzip does not appear in both lists. lzip is a special +# case anyway, so it is handled separately in the Decoders section. +set(SUPPORTED_FILTERS + lzma1 + lzma2 + delta + "${SIMPLE_FILTERS}" +) + +set(XZ_ENCODERS "${SUPPORTED_FILTERS}" CACHE STRING "Encoders to support") + +# If LZMA2 is enabled, then LZMA1 must also be enabled. +if(NOT "lzma1" IN_LIST XZ_ENCODERS AND "lzma2" IN_LIST XZ_ENCODERS) + message(FATAL_ERROR "LZMA2 encoder requires that LZMA1 is also enabled") +endif() + +# If LZMA1 is enabled, then at least one match finder must be enabled. +if(XZ_MATCH_FINDERS STREQUAL "" AND "lzma1" IN_LIST XZ_ENCODERS) + message(FATAL_ERROR "At least 1 match finder is required for an " + "LZ-based encoder") +endif() + +set(HAVE_DELTA_CODER OFF) +set(SIMPLE_ENCODERS OFF) +set(HAVE_ENCODERS OFF) + +foreach(ENCODER IN LISTS XZ_ENCODERS) + if(ENCODER IN_LIST SUPPORTED_FILTERS) + set(HAVE_ENCODERS ON) + + if(NOT SIMPLE_ENCODERS AND ENCODER IN_LIST SIMPLE_FILTERS) + set(SIMPLE_ENCODERS ON) + endif() + + string(TOUPPER "${ENCODER}" ENCODER_UPPER) + add_compile_definitions("HAVE_ENCODER_${ENCODER_UPPER}") + else() + message(FATAL_ERROR "'${ENCODER}' is not a supported encoder") + endif() +endforeach() + +if(HAVE_ENCODERS) + add_compile_definitions(HAVE_ENCODERS) + + target_sources(liblzma PRIVATE + src/liblzma/common/alone_encoder.c + src/liblzma/common/block_buffer_encoder.c + src/liblzma/common/block_buffer_encoder.h + src/liblzma/common/block_encoder.c + src/liblzma/common/block_encoder.h + src/liblzma/common/block_header_encoder.c + src/liblzma/common/easy_buffer_encoder.c + src/liblzma/common/easy_encoder.c + src/liblzma/common/easy_encoder_memusage.c + src/liblzma/common/filter_buffer_encoder.c + src/liblzma/common/filter_encoder.c + src/liblzma/common/filter_encoder.h + src/liblzma/common/filter_flags_encoder.c + src/liblzma/common/index_encoder.c + src/liblzma/common/index_encoder.h + src/liblzma/common/stream_buffer_encoder.c + src/liblzma/common/stream_encoder.c + src/liblzma/common/stream_flags_encoder.c + src/liblzma/common/vli_encoder.c + ) + + if(XZ_THREADS) + target_sources(liblzma PRIVATE + src/liblzma/common/stream_encoder_mt.c + ) + endif() + + if(SIMPLE_ENCODERS) + target_sources(liblzma PRIVATE + src/liblzma/simple/simple_encoder.c + src/liblzma/simple/simple_encoder.h + ) + endif() + + if("lzma1" IN_LIST XZ_ENCODERS) + target_sources(liblzma PRIVATE + src/liblzma/lzma/lzma_encoder.c + src/liblzma/lzma/lzma_encoder.h + src/liblzma/lzma/lzma_encoder_optimum_fast.c + src/liblzma/lzma/lzma_encoder_optimum_normal.c + src/liblzma/lzma/lzma_encoder_private.h + src/liblzma/lzma/fastpos.h + src/liblzma/lz/lz_encoder.c + src/liblzma/lz/lz_encoder.h + src/liblzma/lz/lz_encoder_hash.h + src/liblzma/lz/lz_encoder_hash_table.h + src/liblzma/lz/lz_encoder_mf.c + src/liblzma/rangecoder/price.h + src/liblzma/rangecoder/price_table.c + src/liblzma/rangecoder/range_encoder.h + ) + + if(NOT XZ_SMALL) + target_sources(liblzma PRIVATE src/liblzma/lzma/fastpos_table.c) + endif() + endif() + + if("lzma2" IN_LIST XZ_ENCODERS) + target_sources(liblzma PRIVATE + src/liblzma/lzma/lzma2_encoder.c + src/liblzma/lzma/lzma2_encoder.h + ) + endif() + + if("delta" IN_LIST XZ_ENCODERS) + set(HAVE_DELTA_CODER ON) + target_sources(liblzma PRIVATE + src/liblzma/delta/delta_encoder.c + src/liblzma/delta/delta_encoder.h + ) + endif() +endif() + + +############ +# Decoders # +############ + +set(XZ_DECODERS "${SUPPORTED_FILTERS}" CACHE STRING "Decoders to support") + +set(SIMPLE_DECODERS OFF) +set(HAVE_DECODERS OFF) + +foreach(DECODER IN LISTS XZ_DECODERS) + if(DECODER IN_LIST SUPPORTED_FILTERS) + set(HAVE_DECODERS ON) + + if(NOT SIMPLE_DECODERS AND DECODER IN_LIST SIMPLE_FILTERS) + set(SIMPLE_DECODERS ON) + endif() + + string(TOUPPER "${DECODER}" DECODER_UPPER) + add_compile_definitions("HAVE_DECODER_${DECODER_UPPER}") + else() + message(FATAL_ERROR "'${DECODER}' is not a supported decoder") + endif() +endforeach() + +if(HAVE_DECODERS) + add_compile_definitions(HAVE_DECODERS) + + target_sources(liblzma PRIVATE + src/liblzma/common/alone_decoder.c + src/liblzma/common/alone_decoder.h + src/liblzma/common/auto_decoder.c + src/liblzma/common/block_buffer_decoder.c + src/liblzma/common/block_decoder.c + src/liblzma/common/block_decoder.h + src/liblzma/common/block_header_decoder.c + src/liblzma/common/easy_decoder_memusage.c + src/liblzma/common/file_info.c + src/liblzma/common/filter_buffer_decoder.c + src/liblzma/common/filter_decoder.c + src/liblzma/common/filter_decoder.h + src/liblzma/common/filter_flags_decoder.c + src/liblzma/common/index_decoder.c + src/liblzma/common/index_decoder.h + src/liblzma/common/index_hash.c + src/liblzma/common/stream_buffer_decoder.c + src/liblzma/common/stream_decoder.c + src/liblzma/common/stream_flags_decoder.c + src/liblzma/common/stream_decoder.h + src/liblzma/common/vli_decoder.c + ) + + if(XZ_THREADS) + target_sources(liblzma PRIVATE + src/liblzma/common/stream_decoder_mt.c + ) + endif() + + if(SIMPLE_DECODERS) + target_sources(liblzma PRIVATE + src/liblzma/simple/simple_decoder.c + src/liblzma/simple/simple_decoder.h + ) + endif() + + if("lzma1" IN_LIST XZ_DECODERS) + target_sources(liblzma PRIVATE + src/liblzma/lzma/lzma_decoder.c + src/liblzma/lzma/lzma_decoder.h + src/liblzma/rangecoder/range_decoder.h + src/liblzma/lz/lz_decoder.c + src/liblzma/lz/lz_decoder.h + ) + endif() + + if("lzma2" IN_LIST XZ_DECODERS) + target_sources(liblzma PRIVATE + src/liblzma/lzma/lzma2_decoder.c + src/liblzma/lzma/lzma2_decoder.h + ) + endif() + + if("delta" IN_LIST XZ_DECODERS) + set(HAVE_DELTA_CODER ON) + target_sources(liblzma PRIVATE + src/liblzma/delta/delta_decoder.c + src/liblzma/delta/delta_decoder.h + ) + endif() +endif() + +# Some sources must appear if the filter is configured as either +# an encoder or decoder. +if("lzma1" IN_LIST XZ_ENCODERS OR "lzma1" IN_LIST XZ_DECODERS) + target_sources(liblzma PRIVATE + src/liblzma/rangecoder/range_common.h + src/liblzma/lzma/lzma_encoder_presets.c + src/liblzma/lzma/lzma_common.h + ) +endif() + +if(HAVE_DELTA_CODER) + target_sources(liblzma PRIVATE + src/liblzma/delta/delta_common.c + src/liblzma/delta/delta_common.h + src/liblzma/delta/delta_private.h + ) +endif() + +if(SIMPLE_ENCODERS OR SIMPLE_DECODERS) + target_sources(liblzma PRIVATE + src/liblzma/simple/simple_coder.c + src/liblzma/simple/simple_coder.h + src/liblzma/simple/simple_private.h + ) +endif() + +foreach(SIMPLE_CODER IN LISTS SIMPLE_FILTERS) + if(SIMPLE_CODER IN_LIST XZ_ENCODERS OR SIMPLE_CODER IN_LIST XZ_DECODERS) + target_sources(liblzma PRIVATE "src/liblzma/simple/${SIMPLE_CODER}.c") + endif() +endforeach() + + +############# +# MicroLZMA # +############# + +option(XZ_MICROLZMA_ENCODER + "MicroLZMA encoder (needed by specific applications only)" ON) + +option(XZ_MICROLZMA_DECODER + "MicroLZMA decoder (needed by specific applications only)" ON) + +if(XZ_MICROLZMA_ENCODER) + if(NOT "lzma1" IN_LIST XZ_ENCODERS) + message(FATAL_ERROR "The LZMA1 encoder is required to support the " + "MicroLZMA encoder") + endif() + + target_sources(liblzma PRIVATE src/liblzma/common/microlzma_encoder.c) +endif() + +if(XZ_MICROLZMA_DECODER) + if(NOT "lzma1" IN_LIST XZ_DECODERS) + message(FATAL_ERROR "The LZMA1 decoder is required to support the " + "MicroLZMA decoder") + endif() + + target_sources(liblzma PRIVATE src/liblzma/common/microlzma_decoder.c) +endif() + + +############################# +# lzip (.lz) format support # +############################# + +option(XZ_LZIP_DECODER "Support lzip decoder" ON) + +if(XZ_LZIP_DECODER) + # If lzip decoder support is requested, make sure LZMA1 decoder is enabled. + if(NOT "lzma1" IN_LIST XZ_DECODERS) + message(FATAL_ERROR "The LZMA1 decoder is required to support the " + "lzip decoder") + endif() + + add_compile_definitions(HAVE_LZIP_DECODER) + + target_sources(liblzma PRIVATE + src/liblzma/common/lzip_decoder.c + src/liblzma/common/lzip_decoder.h + ) +endif() + +### + +# Put the tuklib functions under the lzma_ namespace. +target_compile_definitions(liblzma PRIVATE TUKLIB_SYMBOL_PREFIX=lzma_) +tuklib_cpucores(liblzma) +tuklib_physmem(liblzma) + +# While liblzma can be built without tuklib_cpucores or tuklib_physmem +# modules, the liblzma API functions lzma_cputhreads() and lzma_physmem() +# will then be useless (which isn't too bad but still unfortunate). Since +# I expect the CMake-based builds to be only used on systems that are +# supported by these tuklib modules, problems with these tuklib modules +# are considered a hard error for now. This hopefully helps to catch bugs +# in the CMake versions of the tuklib checks. +if(NOT TUKLIB_CPUCORES_FOUND OR NOT TUKLIB_PHYSMEM_FOUND) + # Use SEND_ERROR instead of FATAL_ERROR. If someone reports a bug, + # seeing the results of the remaining checks can be useful too. + message(SEND_ERROR + "tuklib_cpucores() or tuklib_physmem() failed. " + "Unless you really are building for a system where these " + "modules are not supported (unlikely), this is a bug in the " + "included cmake/tuklib_*.cmake files that should be fixed. " + "To build anyway, edit this CMakeLists.txt to ignore this error.") +endif() + +# Check for __attribute__((__constructor__)) support. +# This needs -Werror because some compilers just warn +# about this being unsupported. +cmake_push_check_state() +set(CMAKE_REQUIRED_FLAGS "-Werror") +check_c_source_compiles(" + __attribute__((__constructor__)) + static void my_constructor_func(void) { return; } + int main(void) { return 0; } + " + HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR) +cmake_pop_check_state() +tuklib_add_definition_if(liblzma HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR) + +# 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 +# win95, and the compiler does not support attribute constructor, then we +# would end up with a multithreaded build that is thread-unsafe. As a +# result this configuration is not allowed. +if(USE_WIN95_THREADS AND XZ_SMALL AND NOT HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR) + message(SEND_ERROR "Threading method win95 and XZ_SMALL " + "cannot be used at the same time because the compiler " + "doesn't support __attribute__((__constructor__))") +endif() + + +# cpuid.h +check_include_file(cpuid.h HAVE_CPUID_H) +tuklib_add_definition_if(liblzma HAVE_CPUID_H) + +# immintrin.h: +check_include_file(immintrin.h HAVE_IMMINTRIN_H) +if(HAVE_IMMINTRIN_H) + target_compile_definitions(liblzma PRIVATE HAVE_IMMINTRIN_H) + + # SSE2 intrinsics: + check_c_source_compiles(" + #include + int main(void) + { + __m128i x = { 0 }; + _mm_movemask_epi8(x); + return 0; + } + " + HAVE__MM_MOVEMASK_EPI8) + tuklib_add_definition_if(liblzma HAVE__MM_MOVEMASK_EPI8) + + # CLMUL intrinsic: + option(XZ_CLMUL_CRC "Use carryless multiplication for CRC \ +calculation (with runtime detection) if supported by the compiler" ON) + + if(XZ_CLMUL_CRC) + check_c_source_compiles(" + #include + #if defined(__e2k__) && __iset__ < 6 + # error + #endif + #if (defined(__GNUC__) || defined(__clang__)) \ + && !defined(__EDG__) + __attribute__((__target__(\"ssse3,sse4.1,pclmul\"))) + #endif + int main(void) + { + __m128i a = _mm_set_epi64x(1, 2); + a = _mm_clmulepi64_si128(a, a, 0); + return 0; + } + " + HAVE_USABLE_CLMUL) + tuklib_add_definition_if(liblzma HAVE_USABLE_CLMUL) + endif() +endif() + +# 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(XZ_ARM64_CRC32 "Use ARM64 CRC32 instructions (with runtime detection) \ +if supported by the compiler" ON) + +if(XZ_ARM64_CRC32) + check_c_source_compiles(" + #include + + #ifndef _MSC_VER + #include + #endif + + #if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__) + __attribute__((__target__(\"+crc\"))) + #endif + int main(void) + { + return __crc32d(1, 2) != 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 and OpenBSD >= 7.6. + 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() + +option(XZ_LOONGARCH_CRC32 + "Use LoongArch CRC32 instructions if supported by the compiler" ON) + +if(XZ_LOONGARCH_CRC32) + # LoongArch CRC32 intrinsics are in larchintrin.h. + # These are supported by at least GCC and Clang. + # + # Only 64-bit LoongArch is currently supported. + # It doesn't need runtime detection. + check_c_source_compiles(" + #if !(defined(__loongarch__) && __loongarch_grlen >= 64) + # error + #endif + + #include + int main(void) + { + return __crc_w_w_w(1, 2); + } + " + HAVE_LOONGARCH_CRC32) + tuklib_add_definition_if(liblzma HAVE_LOONGARCH_CRC32) +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() + target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=0) +endif() + +if(WIN32 OR CYGWIN) + if(BUILD_SHARED_LIBS) + # Add the Windows resource file for liblzma.dll. + target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc) + + set_source_files_properties(src/liblzma/liblzma_w32res.rc PROPERTIES + OBJECT_DEPENDS "${W32RES_DEPENDENCIES}" + ) + + # Export the public API symbols with __declspec(dllexport). + target_compile_definitions(liblzma PRIVATE DLL_EXPORT) + + if(NOT MSVC AND NOT CYGWIN) + # Create a DEF file. The Autotools-based build creates a DEF file + # under Cygwin & MSYS2 too but it almost certainly is a useless + # file in that context, so the CMake build omits it. + # + # The linker puts the ordinal numbers in the DEF file + # too so the output from the linker isn't our final file. + target_link_options(liblzma PRIVATE + "-Wl,--output-def,liblzma.def.in") + + # Remove the ordinal numbers from the DEF file so that + # no one will create an import library that links by ordinal + # instead of by name. We don't maintain a DEF file so the + # ordinal numbers aren't stable. + add_custom_command(TARGET liblzma POST_BUILD + COMMAND "${CMAKE_COMMAND}" + -DINPUT_FILE=liblzma.def.in + -DOUTPUT_FILE=liblzma.def + -P + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/remove-ordinals.cmake" + BYPRODUCTS "liblzma.def" + VERBATIM) + endif() + else() + # Disable __declspec(dllimport) when linking against static liblzma. + target_compile_definitions(liblzma INTERFACE LZMA_API_STATIC) + endif() +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 + # can cause problems. It's clearer if all symver related things are + # omitted when not building a shared library. + # + # NOTE: Set it explicitly to 1 to make it clear that versioning is + # done unconditionally in the C files. + target_compile_definitions(liblzma PRIVATE HAVE_SYMBOL_VERSIONS_LINUX=1) + target_link_options(liblzma PRIVATE + "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map" + ) + set_target_properties(liblzma PROPERTIES + LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map" + ) +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" + ) + set_target_properties(liblzma PROPERTIES + LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_generic.map" + ) +endif() + +# Calculate Libtool-compatible Mach-O versions for Apple OSes. +# Switching from CMake's or Meson's default Mach-O versioning style to +# GNU Libtool style is always a backward compatible change because the +# Libtool style always results in higher Mach-O version values. +# +# The other way would be a breaking change, and switching from Autotools +# to CMake used to result in "Incompatible library version" error from the +# dynamic linker ("dyld") when trying to run existing executables. This +# happened because the Mach-O current_version in the CMake-built library +# was less than the compatibility_version stored in the executable. +# +# Example: If on GNU/Linux one had libfoo.so.5.6.7, on macOS one would +# have libfoo.5.dylib containing the following Mach-O versions: +# +# compatibility_version current_version +# Libtool 12.0.0 12.7.0 +# CMake 5.0.0 5.6.7 +# Meson 5.0.0 5.0.0 +# +# Apple's docs say that the major version is encoded in the library filename, +# and the Mach-O version fields are for tracking backward compatible changes +# (minor versions). The default Mach-O versioning styles in CMake and +# Meson don't store the minor version in the compatibility_version though +# but Libtool does (using its own idiosyncratic encoding). In practice the +# lack of minor ABI version tracking doesn't matter much; it's the +# compatibility between the build systems that counts. +# +# It's unclear how much this matters in 2024. It might be that the +# dynamic linker in macOS >= 12 doesn't enforce the version checks. +# But this is a simple and safe change so it's fine to do it anyway. +# +# Apple docs: +# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html +# +# This change was made in XZ Utils 5.7.1alpha. +# +# * * * * * +# +# At least for now the xz package versioning matches the rules used for +# shared library versioning (excluding development releases) so it is +# fine to use the package version when setting the liblzma ABI version. +math(EXPR LIBLZMA_MACHO_COMPATIBILITY_VERSION + "${xz_VERSION_MAJOR} + ${xz_VERSION_MINOR} + 1") +set(LIBLZMA_MACHO_CURRENT_VERSION + "${LIBLZMA_MACHO_COMPATIBILITY_VERSION}.${xz_VERSION_PATCH}") + +set_target_properties(liblzma PROPERTIES + SOVERSION "${xz_VERSION_MAJOR}" + VERSION "${xz_VERSION}" + MACHO_COMPATIBILITY_VERSION "${LIBLZMA_MACHO_COMPATIBILITY_VERSION}" + MACHO_CURRENT_VERSION "${LIBLZMA_MACHO_CURRENT_VERSION}" + + # The name liblzma a mess because in many places "lib" is just a prefix + # and not part of the actual name. (Don't name a new library this way!) + # Cygwin uses "cyg", MSYS2 uses "msys-", and some platforms use no prefix. + # However, we want to avoid lzma.dll on Windows as that would conflict + # with LZMA SDK. liblzma has been liblzma.dll on Windows since the + # beginning so try to stick with it. + # + # Up to XZ Utils 5.6.2 we set PREFIX and IMPORT_PREFIX properties to "" + # while keeping the default "liblzma" OUTPUT_NAME that was derived from + # the target name. But this broke naming on Cygwin and MSYS2. + # + # Setting OUTPUT_NAME without the "lib" prefix means that CMake will add + # the platform-specific prefix as needed. So on most systems CMake will + # add "lib" but on Cygwin and MSYS2 the naming will be correct too. + # + # On Windows, CMake uses the "lib" prefix with MinGW-w64 but not with + # other toolchains. Those need to be handled specially to get the DLL + # file named liblzma.dll instead of lzma.dll. + OUTPUT_NAME "lzma" +) + +if(WIN32 AND NOT MINGW) + # Up to XZ Utils 5.6.2 and building with MSVC, we produced liblzma.dll + # and liblzma.lib. The downside of liblzma.lib is that it's not + # compatible with pkgconf usage. liblzma.pc contains "-llzma" which + # "pkgconf --msvc-syntax --libs liblzma" converts to "lzma.lib". + # So as a compromise, we can keep the liblzma.dll name but the import + # library and static liblzma need to be named lzma.lib so that pkgconf + # can be used with MSVC. (MinGW-w64 finds both names with "-llzma".) + set_target_properties(liblzma PROPERTIES RUNTIME_OUTPUT_NAME "liblzma") +endif() + +# Create liblzma-config-version.cmake. +# +# NOTE: SameMajorVersion is correct for stable releases but it is wrong +# for development releases where each release may have incompatible changes. +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config-version.cmake" + VERSION "${xz_VERSION}" + COMPATIBILITY SameMajorVersion) + +# Create liblzma-config.cmake. We use this spelling instead of +# liblzmaConfig.cmake to make find_package work in case insensitive +# manner even with case sensitive file systems. This gives more consistent +# behavior between operating systems. This optionally includes a dependency +# on a threading library, so the contents are created in two separate parts. +# The "second half" is always needed, so create it first. +set(LZMA_CONFIG_CONTENTS +"include(\"\${CMAKE_CURRENT_LIST_DIR}/liblzma-targets.cmake\") + +if(NOT TARGET LibLZMA::LibLZMA) + # Be compatible with the spelling used by the FindLibLZMA module. This + # doesn't use ALIAS because it would make CMake resolve LibLZMA::LibLZMA + # to liblzma::liblzma instead of keeping the original spelling. Keeping + # the original spelling is important for good FindLibLZMA compatibility. + add_library(LibLZMA::LibLZMA INTERFACE IMPORTED) + set_target_properties(LibLZMA::LibLZMA PROPERTIES + INTERFACE_LINK_LIBRARIES liblzma::liblzma) +endif() +") + +if(USE_POSIX_THREADS) + set(LZMA_CONFIG_CONTENTS +"include(CMakeFindDependencyMacro) +set(THREADS_PREFER_PTHREAD_FLAG TRUE) +find_dependency(Threads) + +${LZMA_CONFIG_CONTENTS} +") +endif() + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" + "${LZMA_CONFIG_CONTENTS}") + + +# Create liblzma.pc. If CMAKE_INSTALL_ paths are relative to +# CMAKE_INSTALL_PREFIX, the .pc file will be relocatable (that is, +# all paths will be relative to ${prefix}). Otherwise absolute +# paths will be used. +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(exec_prefix "\${prefix}") +cmake_path(APPEND libdir "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}") +cmake_path(APPEND includedir "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") + +# Threads::Threads is linked in only when using POSIX threads. +# Use an empty value if using Windows threads or if threading is disabled. +set(PTHREAD_CFLAGS) +if(USE_POSIX_THREADS) + set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}") +endif() + +configure_file(src/liblzma/liblzma.pc.in liblzma.pc @ONLY) + + +# Install the library binary. The INCLUDES specifies the include path that +# is exported for other projects to use but it doesn't install any files. +install(TARGETS liblzma EXPORT liblzmaTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT liblzma_Runtime + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + COMPONENT liblzma_Runtime + NAMELINK_COMPONENT liblzma_Development + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + COMPONENT liblzma_Development + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + +# Install the liblzma API headers. These use a subdirectory so +# this has to be done as a separate step. +install(DIRECTORY src/liblzma/api/ + COMPONENT liblzma_Development + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + FILES_MATCHING PATTERN "*.h") + +# Install the CMake files that other packages can use to find liblzma. +set(XZ_INSTALL_CMAKEDIR + "${CMAKE_INSTALL_LIBDIR}/cmake/liblzma" + CACHE STRING "Path to liblzma's .cmake files") + +install(EXPORT liblzmaTargets + NAMESPACE liblzma:: + FILE liblzma-targets.cmake + DESTINATION "${XZ_INSTALL_CMAKEDIR}" + COMPONENT liblzma_Development) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config-version.cmake" + DESTINATION "${XZ_INSTALL_CMAKEDIR}" + COMPONENT liblzma_Development) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT liblzma_Development) + + +############################################################################# +# Helper functions for installing files +############################################################################# + +# 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 XZ_NLS. +function(my_install_man COMPONENT SRC_FILE LINK_NAMES) + my_install_man_lang("${COMPONENT}" "${SRC_FILE}" "" "${LINK_NAMES}") + + if(XZ_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_") + + # 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.) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lib/getopt.in.h" + "${CMAKE_CURRENT_BINARY_DIR}/lib/getopt.h" + COPYONLY) + + 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() + + +############################################################################# +# Sandboxing for the command line tools +############################################################################# + +# auto Use sandboxing if a supported method is available in the OS. +# no 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 auto no capsicum pledge landlock) + +set(XZ_SANDBOX auto CACHE STRING + "Sandboxing method to use in 'xz', 'xzdec', and 'lzmadec'") + +set_property(CACHE XZ_SANDBOX PROPERTY STRINGS "${SUPPORTED_SANDBOX_METHODS}") + +if(NOT XZ_SANDBOX IN_LIST SUPPORTED_SANDBOX_METHODS) + message(FATAL_ERROR "'${XZ_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(XZ_SANDBOX STREQUAL "no") + 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 XZ_SANDBOX MATCHES "^auto$|^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 XZ_SANDBOX MATCHES "^auto$|^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 XZ_SANDBOX MATCHES "^auto$|^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 + + int main(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 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 -DXZ_SANDBOX=no " + "as an argument to 'cmake' when using '-fsanitize'.") + endif() + endif() +endif() + +if(NOT SANDBOX_FOUND AND NOT XZ_SANDBOX MATCHES "^auto$|^no$") + message(SEND_ERROR "XZ_SANDBOX=${XZ_SANDBOX} was used but " + "support for the sandboxing method wasn't found.") +endif() + + +############################################################################# +# xzdec and lzmadec +############################################################################# + +option(XZ_TOOL_XZDEC "Build and install the xzdec command line tool" ON) +option(XZ_TOOL_LZMADEC "Build and install the lzmadec command line tool" ON) + +if(HAVE_DECODERS) + set(XZDEC_TOOLS) + + if(XZ_TOOL_XZDEC) + list(APPEND XZDEC_TOOLS xzdec) + endif() + + if(XZ_TOOL_LZMADEC) + list(APPEND XZDEC_TOOLS lzmadec) + endif() + + foreach(XZDEC ${XZDEC_TOOLS}) + add_executable("${XZDEC}" + src/common/my_landlock.h + src/common/sysdefs.h + src/common/tuklib_common.h + src/common/tuklib_config.h + src/common/tuklib_mbstr_nonprint.c + src/common/tuklib_mbstr_nonprint.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 OR CYGWIN) + # Add the Windows resource file for xzdec.exe or lzmadec.exe. + target_sources("${XZDEC}" PRIVATE "src/xzdec/${XZDEC}_w32res.rc") + set_source_files_properties( + "src/xzdec/${XZDEC}_w32res.rc" PROPERTIES + OBJECT_DEPENDS "${W32RES_DEPENDENCIES}" + ) + endif() + + if(SANDBOX_COMPILE_DEFINITION) + target_compile_definitions("${XZDEC}" PRIVATE + "${SANDBOX_COMPILE_DEFINITION}") + endif() + + tuklib_progname("${XZDEC}") + tuklib_mbstr("${XZDEC}") + + install(TARGETS "${XZDEC}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT "${XZDEC}_Runtime") + endforeach() + + if(XZ_TOOL_LZMADEC) + # This is the only build-time difference with lzmadec. + target_compile_definitions(lzmadec PRIVATE "LZMADEC") + endif() + + if(UNIX AND XZ_TOOL_XZDEC) + # 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. + # + # Also, if xzdec is disabled but lzmadec isn't, then the man page + # isn't installed at all. It could be done but it's not a typical + # situation so let's keep this simpler. + if(XZ_TOOL_LZMADEC) + my_install_man(xzdec_Documentation src/xzdec/xzdec.1 lzmadec) + else() + my_install_man(xzdec_Documentation src/xzdec/xzdec.1 "") + endif() + endif() +endif() + + +############################################################################# +# lzmainfo +############################################################################# + +option(XZ_TOOL_LZMAINFO "Build and install the lzmainfo command line tool" ON) + +if(XZ_TOOL_LZMAINFO AND HAVE_DECODERS) + add_executable(lzmainfo + src/common/sysdefs.h + src/common/tuklib_common.h + src/common/tuklib_config.h + src/common/tuklib_mbstr.h + src/common/tuklib_mbstr_nonprint.c + src/common/tuklib_mbstr_nonprint.h + src/common/tuklib_mbstr_width.c + src/common/tuklib_mbstr_wrap.c + src/common/tuklib_mbstr_wrap.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/lzmainfo/lzmainfo.c + ) + + target_include_directories(lzmainfo PRIVATE + src/common + src/liblzma/api + ) + + target_link_libraries(lzmainfo PRIVATE liblzma libgnu) + + if(WIN32 OR CYGWIN) + # Add the Windows resource file for lzmainfo.exe. + target_sources(lzmainfo PRIVATE src/lzmainfo/lzmainfo_w32res.rc) + set_source_files_properties(src/lzmainfo/lzmainfo_w32res.rc PROPERTIES + OBJECT_DEPENDS "${W32RES_DEPENDENCIES}" + ) + endif() + + tuklib_progname(lzmainfo) + tuklib_mbstr(lzmainfo) + + # NOTE: The translations are in the "xz" domain and the .mo files are + # installed as part of the "xz" target. + if(XZ_NLS) + target_link_libraries(lzmainfo PRIVATE Intl::Intl) + + target_compile_definitions(lzmainfo PRIVATE + ENABLE_NLS + PACKAGE="${TRANSLATION_DOMAIN}" + LOCALEDIR="${LOCALEDIR_DEFINITION}" + ) + endif() + + install(TARGETS lzmainfo + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT lzmainfo_Runtime) + + if(UNIX) + my_install_man(lzmainfo_Documentation src/lzmainfo/lzmainfo.1 "") + endif() +endif() + + +############################################################################# +# xz +############################################################################# + +option(XZ_TOOL_XZ "Build and install the xz command line tool" ON) + +if(XZ_TOOL_XZ) + add_executable(xz + src/common/my_landlock.h + src/common/mythread.h + src/common/sysdefs.h + src/common/tuklib_common.h + src/common/tuklib_config.h + src/common/tuklib_mbstr_nonprint.c + src/common/tuklib_mbstr_nonprint.h + src/common/tuklib_exit.c + src/common/tuklib_exit.h + src/common/tuklib_gettext.h + src/common/tuklib_integer.h + src/common/tuklib_mbstr.h + src/common/tuklib_mbstr_fw.c + src/common/tuklib_mbstr_width.c + src/common/tuklib_mbstr_wrap.c + src/common/tuklib_mbstr_wrap.h + src/common/tuklib_open_stdxxx.c + src/common/tuklib_open_stdxxx.h + src/common/tuklib_progname.c + src/common/tuklib_progname.h + src/xz/args.c + src/xz/args.h + src/xz/coder.c + src/xz/coder.h + src/xz/file_io.c + src/xz/file_io.h + src/xz/hardware.c + src/xz/hardware.h + src/xz/main.c + src/xz/main.h + src/xz/message.c + src/xz/message.h + src/xz/mytime.c + src/xz/mytime.h + 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 + src/xz/suffix.h + src/xz/util.c + src/xz/util.h + ) + + target_include_directories(xz PRIVATE + src/common + src/liblzma/api + ) + + if(HAVE_DECODERS) + target_sources(xz PRIVATE + src/xz/list.c + src/xz/list.h + ) + endif() + + target_link_libraries(xz PRIVATE liblzma libgnu) + + if(USE_POSIX_THREADS) + # src/xz/signals.c uses mythread_sigmask() which with POSIX + # threads calls pthread_sigmask(). Thus, we need the threading + # library as a dependency for xz. The liblzma target links against + # Threads::Threads PRIVATEly, thus that won't provide the pthreads + # symbols for xz. + # + # NOTE: The build may work without this if the symbol is in libc + # but it is mandatory to have this here to keep it working with + # all pthread implementations. + target_link_libraries(xz PRIVATE Threads::Threads) + endif() + + set(XZ_ASSUME_RAM "128" CACHE STRING "Assume that the system has \ +this many MiB of RAM if xz cannot determine the amount at runtime") + target_compile_definitions(xz PRIVATE "ASSUME_RAM=${XZ_ASSUME_RAM}") + + if(WIN32 OR CYGWIN) + # Add the Windows resource file for xz.exe. + target_sources(xz PRIVATE src/xz/xz_w32res.rc) + set_source_files_properties(src/xz/xz_w32res.rc PROPERTIES + OBJECT_DEPENDS "${W32RES_DEPENDENCIES}" + ) + endif() + + if(SANDBOX_COMPILE_DEFINITION) + target_compile_definitions(xz PRIVATE "${SANDBOX_COMPILE_DEFINITION}") + endif() + + tuklib_progname(xz) + tuklib_mbstr(xz) + + check_symbol_exists(optreset getopt.h HAVE_OPTRESET) + tuklib_add_definition_if(xz HAVE_OPTRESET) + + check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE) + tuklib_add_definition_if(xz HAVE_POSIX_FADVISE) + + # How to get file time: + check_struct_has_member("struct stat" st_atim.tv_nsec + "sys/types.h;sys/stat.h" + HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC) + if(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC) + tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC) + else() + check_struct_has_member("struct stat" st_atimespec.tv_nsec + "sys/types.h;sys/stat.h" + HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC) + if(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC) + tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC) + else() + check_struct_has_member("struct stat" st_atimensec + "sys/types.h;sys/stat.h" + HAVE_STRUCT_STAT_ST_ATIMENSEC) + tuklib_add_definition_if(xz HAVE_STRUCT_STAT_ST_ATIMENSEC) + endif() + endif() + + # How to set file time: + check_symbol_exists(futimens "sys/types.h;sys/stat.h" HAVE_FUTIMENS) + if(HAVE_FUTIMENS) + tuklib_add_definitions(xz HAVE_FUTIMENS) + else() + check_symbol_exists(futimes "sys/time.h" HAVE_FUTIMES) + if(HAVE_FUTIMES) + tuklib_add_definitions(xz HAVE_FUTIMES) + else() + check_symbol_exists(futimesat "sys/time.h" HAVE_FUTIMESAT) + if(HAVE_FUTIMESAT) + tuklib_add_definitions(xz HAVE_FUTIMESAT) + else() + check_symbol_exists(utimes "sys/time.h" HAVE_UTIMES) + if(HAVE_UTIMES) + tuklib_add_definitions(xz HAVE_UTIMES) + else() + check_symbol_exists(_futime "sys/utime.h" HAVE__FUTIME) + if(HAVE__FUTIME) + tuklib_add_definitions(xz HAVE__FUTIME) + else() + check_symbol_exists(utime "utime.h" HAVE_UTIME) + tuklib_add_definition_if(xz HAVE_UTIME) + endif() + endif() + endif() + endif() + endif() + + if(XZ_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) + + # 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() + + foreach(LANG IN LISTS LINGUAS) + install( + FILES "${CMAKE_CURRENT_BINARY_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_Runtime) + + if(UNIX) + option(XZ_TOOL_SYMLINKS "Create unxz and xzcat symlinks" ON) + option(XZ_TOOL_SYMLINKS_LZMA + "Create 'lzma' and other symlinks for LZMA Utils compatibility" + ON) + set(XZ_LINKS) + + if(XZ_TOOL_SYMLINKS) + list(APPEND XZ_LINKS "unxz" "xzcat") + endif() + + if(XZ_TOOL_SYMLINKS_LZMA) + list(APPEND XZ_LINKS "lzma" "unlzma" "lzcat") + endif() + + # On Cygwin, don't add the .exe suffix to the symlinks. + # + # 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() + + +############################################################################# +# Scripts +############################################################################# + +set(ENABLE_SCRIPTS OFF) + +if(UNIX) + # NOTE: These depend on the xz tool and decoder support. + option(XZ_TOOL_SCRIPTS "Install the scripts \ +xzdiff, xzgrep, xzmore, xzless, and their symlinks" ON) + + if(XZ_TOOL_SCRIPTS AND XZ_TOOL_XZ AND HAVE_DECODERS) + set(ENABLE_SCRIPTS ON) + endif() + + # 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() + + set(XZ_POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING + "Shell to use for scripts (xzgrep and others)") + + # Guess the extra path to add from XZ_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 "${XZ_POSIX_SHELL}" DIRECTORY) + + if(NOT POSIX_SHELL_DIR MATCHES "^/bin$|^/usr/bin$") + set(enable_path_for_scripts "PATH=${POSIX_SHELL_DIR}:\$PATH") + endif() + + set(XZDIFF_LINKS xzcmp) + set(XZGREP_LINKS xzegrep xzfgrep) + set(XZMORE_LINKS) + set(XZLESS_LINKS) + + if(XZ_TOOL_SYMLINKS_LZMA) + list(APPEND XZDIFF_LINKS lzdiff lzcmp) + list(APPEND XZGREP_LINKS lzgrep lzegrep lzfgrep) + list(APPEND XZMORE_LINKS lzmore) + list(APPEND XZLESS_LINKS lzless) + endif() + + set(xz "xz") + set(POSIX_SHELL "${XZ_POSIX_SHELL}") + + foreach(S xzdiff xzgrep xzmore xzless) + configure_file("src/scripts/${S}.in" "${S}" + @ONLY + NEWLINE_STYLE LF + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + + if(ENABLE_SCRIPTS) + install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${S}" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT scripts_Runtime) + endif() + endforeach() + + unset(xz) + unset(POSIX_SHELL) + unset(enable_path_for_scripts) + + if(ENABLE_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() +endif() + + +############################################################################# +# Documentation +############################################################################# + +if(UNIX) + option(XZ_DOXYGEN "Use Doxygen to generate liblzma API docs" OFF) + + if (XZ_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} + ) + + add_custom_target( + liblzma-doc-api ALL + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/api/index.html" + ) + + install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc/api" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT liblzma_Documentation) + endif() +endif() + +option(XZ_DOC "Install basic documentation, examples, and license files" ON) +if(XZ_DOC) + 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) +endif() + + +############################################################################# +# 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 20e60d5b24..ef3371389d 100644 --- a/COPYING +++ b/COPYING @@ -3,63 +3,68 @@ 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. - - Translated messages are in the public domain. + - Translated messages and man pages are under 0BSD except that + some old translations are in the public domain. - - 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. + - Test files and test code in the 'tests' directory, and + debugging utilities in the 'debug' directory are under + the BSD Zero Clause License (0BSD). - - Test files and test code in the tests directory, and debugging - utilities in the debug directory 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 extra directory may contain public domain files, and files - that are under various free software licenses. + - The 'extra' directory contains files that are under various + free software licenses. These aren't built or installed as + part of XZ Utils. - 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. + The following command may be helpful in finding per-file license + information. It works on xz.git and on a clean file tree extracted + from a release tarball. - As usual, this software is provided "as is", without any warranty. + sh build-aux/license-check.sh -v - If you copy significant amounts of public domain code from XZ Utils + For the files under the BSD Zero Clause License (0BSD), if + a copyright notice is needed, the following is sufficient: + + Copyright (C) The XZ Utils authors and contributors + + 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. + 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 0000000000..4322122aec --- /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/COPYING.GPLv3 b/COPYING.GPLv3 index 94a9ed024d..f288702d2f 100644 --- a/COPYING.GPLv3 +++ b/COPYING.GPLv3 @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/ChangeLog b/ChangeLog index 37c0d95c42..577dce5e12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6947 +1,17389 @@ -commit 2327a461e1afce862c22269b80d3517801103c1b +commit a522a226545730551f7e7c2685fab27cf567746c Author: Lasse Collin -Date: 2020-03-17 16:27:42 +0200 +Date: 2025-04-03 14:34:43 +0300 - Bump version and soname for 5.2.5. + Bump version and soname for 5.8.1 src/liblzma/Makefile.am | 2 +- src/liblzma/api/lzma/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -commit 3be82d2f7dc882258caf0f0a69214e5916b2bdda +commit 1c462c2ad86ff85766928638431029cd0b0dc995 Author: Lasse Collin -Date: 2020-03-17 16:26:04 +0200 +Date: 2025-04-03 14:34:43 +0300 - Update NEWS for 5.2.5. + Add NEWS for 5.8.1 - NEWS | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 105 insertions(+) + NEWS | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) -commit ab3e57539c7337f0653b13b75dbc5d03ade9700e +commit 513cabcf7f5ce1c3ed0619e791393fc53d1dbbd0 Author: Lasse Collin -Date: 2020-03-16 21:57:21 +0200 +Date: 2025-04-03 14:34:43 +0300 - Translations: Rebuild cs.po to avoid incorrect fuzzy strings. + Tests: Call lzma_code() in smaller chunks in fuzz_common.h + + This makes it easy to crash fuzz_decode_stream_mt when tested + against the code from 5.8.0. - "make dist" updates the .po files and the fuzzy strings would - result in multiple very wrong translations. + Obviously this might make it harder to reach some other code path now. + The previous code has been in use since 2018 when fuzzing was added + in 106d1a663d4b ("Tests: Add a fuzz test program and a config file + for OSS-Fuzz."). - po/cs.po | 592 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 322 insertions(+), 270 deletions(-) + tests/ossfuzz/fuzz_common.h | 31 ++++++++++++++++++++++++------- + 1 file changed, 24 insertions(+), 7 deletions(-) -commit 3a6f38309dc5d44d8a63ebb337b6b2028561c93e +commit 48440e24a25911ae59e8518b67a1e0f6f1c293bf Author: Lasse Collin -Date: 2020-03-16 20:01:37 +0200 +Date: 2025-04-03 14:34:43 +0300 - README: Update outdated sections. + Tests: Add a fuzzing target for the multithreaded .xz decoder + + It doesn't seem possible to trigger the CVE-2025-31115 bug with this + fuzzing target at the moment. It's because the code in fuzz_common.h + passes the whole input buffer to lzma_code() at once. - README | 21 +++++++++++---------- - 1 file changed, 11 insertions(+), 10 deletions(-) + tests/ossfuzz/fuzz_decode_stream_mt.c | 47 +++++++++++++++++++++++++++++++++++ + 1 file changed, 47 insertions(+) -commit 9cc0901798217e258e91c13cf6fda7ad42ba108c +commit 0c80045ab82c406858d9d5bcea9f48ebc3d0a81d Author: Lasse Collin -Date: 2020-03-16 19:46:27 +0200 +Date: 2025-04-03 14:34:42 +0300 - README: Mention that translatable strings will change after 5.2.x. + liblzma: mt dec: Fix lack of parallelization in single-shot decoding + + Single-shot decoding means calling lzma_code() by giving it the whole + input at once and enough output buffer space to store the uncompressed + data, and combining this with LZMA_FINISH and no timeout + (lzma_mt.timeout = 0). This way the file is decoded with a single + lzma_code() call if possible. + + The bug prevented the decoder from starting more than one worker thread + in single-shot mode. The issue was noticed when reviewing the code; + there are no bug reports. Thus maybe few have tried this mode. + + Fixes: 64b6d496dc81 ("liblzma: Threaded decoder: Always wait for output if LZMA_FINISH is used.") - README | 74 +++--------------------------------------------------------------- - 1 file changed, 3 insertions(+), 71 deletions(-) + src/liblzma/common/stream_decoder_mt.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) -commit cc163574249f6a4a66f3dc09d6fe5a71bee24fab +commit 8188048854e8d11071b8a50d093c74f4c030acc9 Author: Lasse Collin -Date: 2020-03-16 19:39:45 +0200 +Date: 2025-04-03 14:34:42 +0300 - README: Mention that man pages can be translated. + liblzma: mt dec: Don't modify thr->in_size in the worker thread + + Don't set thr->in_size = 0 when returning the thread to the stack of + available threads. Not only is it useless, but the main thread may + read the value in SEQ_BLOCK_THR_RUN. With valid inputs, it made + no difference if the main thread saw the original value or 0. With + invalid inputs (when worker thread stops early), thr->in_size was + no longer modified after the previous commit with the security fix + ("Don't free the input buffer too early"). + + So while the bug appears harmless now, it's important to fix it because + the variable was being modified without proper locking. It's trivial + to fix because there is no need to change the value. Only main thread + needs to set the value in (in SEQ_BLOCK_THR_INIT) when starting a new + Block before the worker thread is activated. + + Fixes: 4cce3e27f529 ("liblzma: Add threaded .xz decompressor.") + Reviewed-by: Sebastian Andrzej Siewior + Thanks-to: Sam James - README | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + src/liblzma/common/stream_decoder_mt.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit ca261994edc3f2d03d5589c037171c63471ee9dc +commit d5a2ffe41bb77b918a8c96084885d4dbe4bf6480 Author: Lasse Collin -Date: 2020-03-16 17:30:39 +0200 +Date: 2025-04-03 14:34:42 +0300 - Translations: Add partial Danish translation. + liblzma: mt dec: Don't free the input buffer too early (CVE-2025-31115) + + The input buffer must be valid as long as the main thread is writing + to the worker-specific input buffer. Fix it by making the worker + thread not free the buffer on errors and not return the worker thread to + the pool. The input buffer will be freed when threads_end() is called. + + With invalid input, the bug could at least result in a crash. The + effects include heap use after free and writing to an address based + on the null pointer plus an offset. + + The bug has been there since the first committed version of the threaded + decoder and thus affects versions from 5.3.3alpha to 5.8.0. - I made a few minor white space changes without getting them - approved by the Danish translation team. + As the commit message in 4cce3e27f529 says, I had made significant + changes on top of Sebastian's patch. This bug was indeed introduced + by my changes; it wasn't in Sebastian's version. + + Thanks to Harri K. Koskinen for discovering and reporting this issue. + + Fixes: 4cce3e27f529 ("liblzma: Add threaded .xz decompressor.") + Reported-by: Harri K. Koskinen + Reviewed-by: Sebastian Andrzej Siewior + Thanks-to: Sam James - po/LINGUAS | 1 + - po/da.po | 896 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 897 insertions(+) + src/liblzma/common/stream_decoder_mt.c | 31 ++++++++++++++++++++++--------- + 1 file changed, 22 insertions(+), 9 deletions(-) -commit 51cd5d051fc730d61411dee292e863582784e189 +commit c0c835964dfaeb2513a3c0bdb642105152fe9f34 Author: Lasse Collin -Date: 2020-03-16 16:43:29 +0200 +Date: 2025-04-03 14:34:42 +0300 - Update INSTALL.generic from Automake 1.16.1. + liblzma: mt dec: Simplify by removing the THR_STOP state + + The main thread can directly set THR_IDLE in threads_stop() which is + called when errors are detected. threads_stop() won't return the stopped + threads to the pool or free the memory pointed by thr->in anymore, but + it doesn't matter because the existing workers won't be reused after + an error. The resources will be cleaned up when threads_end() is + called (reinitializing the decoder always calls threads_end()). + + Reviewed-by: Sebastian Andrzej Siewior + Thanks-to: Sam James - INSTALL.generic | 321 ++++++++++++++++++++++++++++---------------------------- - 1 file changed, 162 insertions(+), 159 deletions(-) + src/liblzma/common/stream_decoder_mt.c | 75 +++++++++++++--------------------- + 1 file changed, 29 insertions(+), 46 deletions(-) -commit 69d694e5f1beae2bbfa3b6c348ec0ec5f14b5cd0 +commit 831b55b971cf579ee16a854f177c36b20d3c6999 Author: Lasse Collin -Date: 2020-03-15 15:27:22 +0200 +Date: 2025-04-03 14:34:42 +0300 - Update INSTALL for Windows and DOS and add preliminary info for z/OS. + liblzma: mt dec: Fix a comment + + Reviewed-by: Sebastian Andrzej Siewior + Thanks-to: Sam James - INSTALL | 51 +++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 41 insertions(+), 10 deletions(-) + src/liblzma/common/stream_decoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 2c3b1bb80a3ca7e09728fe4d7a1d8648a5cb9bca +commit b9d168eee4fb6393b4fe207c0aeb5faee316ca1a Author: Lasse Collin -Date: 2020-03-15 15:26:20 +0200 +Date: 2025-04-03 14:34:30 +0300 - Build: Update m4/ax_pthread.m4 from Autoconf Archive (again). + liblzma: Add assertions to lzma_bufcpy() - m4/ax_pthread.m4 | 219 +++++++++++++++++++++++++++++-------------------------- - 1 file changed, 117 insertions(+), 102 deletions(-) + src/liblzma/common/common.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 74a5af180a6a6c4b8c90cefb37ee900d3fea7dc6 +commit c8e0a4897b4d0f906966f5d4d4f662221d64f3ae Author: Lasse Collin -Date: 2020-03-11 21:15:35 +0200 +Date: 2025-04-02 16:40:22 +0300 - 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. + DOS: Update Makefile to fix the build - src/xz/util.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + dos/Makefile | 2 ++ + 1 file changed, 2 insertions(+) -commit ceba0d25e826bcdbf64bb4cb03385a2a66f8cbcb +commit 307c02ed698a69763ef1c9c0df4ff24727442118 Author: Lasse Collin -Date: 2020-03-11 19:38:08 +0200 +Date: 2025-03-29 12:41:32 +0200 - DOS: Update dos/Makefile for DJGPP 2.05. + sysdefs.h: Avoid even with C11 compilers + + Oracle Developer Studio 12.6 on Solaris 10 claims C11 support in + __STDC_VERSION__ and supports _Alignas. However, is missing. + We only need alignas, so define it to _Alignas with C11/C17 compilers. + If something included later, it shouldn't cause problems. + + Thanks to Ihsan Dogan for reporting the issue and testing the fix. - It doesn't need -fgnu89-inline like 2.04beta did. + Fixes: c0e7eaae8d6eef1e313c9d0da20ccf126ec61f38 - dos/Makefile | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) + src/common/sysdefs.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 29e5bd71612253281fb22bbaa0a566990a74dcc3 +commit 7ce38b318339d6c01378a77585e08169ca3a604e Author: Lasse Collin -Date: 2020-03-11 19:36:07 +0200 +Date: 2025-03-29 12:32:05 +0200 - DOS: Update instructions in dos/INSTALL.txt. + Update THANKS - dos/INSTALL.txt | 59 ++++++++++++++++++++++++++++----------------------------- - 1 file changed, 29 insertions(+), 30 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 00a037ee9c8ee5a03cf9744e05570ae93d56b875 +commit 688e51bde4c987589717b2be1a1fde9576c604fc Author: Lasse Collin -Date: 2020-03-11 17:58:51 +0200 +Date: 2025-03-29 12:21:51 +0200 - DOS: Update config.h. - - The added defines assume GCC >= 4.8. + Translations: Update the Croatian translation - dos/config.h | 8 ++++++++ - 1 file changed, 8 insertions(+) + po/hr.po | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) -commit 4ec2feaefa310b4249eb41893caf526e5c51ee39 +commit 173fb5c68b08a8c1369550267be258132b7760c6 Author: Lasse Collin -Date: 2020-03-11 22:37:54 +0200 +Date: 2025-03-25 18:23:57 +0200 - Translations: Add hu, zh_CN, and zh_TW. - - 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.) + doc/SHA256SUMS: Add 5.8.0 - po/LINGUAS | 3 + - po/hu.po | 985 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po/zh_CN.po | 963 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po/zh_TW.po | 956 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 2907 insertions(+) + doc/SHA256SUMS | 6 ++++++ + 1 file changed, 6 insertions(+) -commit b6ed09729ae408be4533a0ddbc7df3d6f566846a +commit db9258e828bc2cd96e3954f1ddcc9d3530589025 Author: Lasse Collin -Date: 2020-03-11 14:33:30 +0200 +Date: 2025-03-25 15:18:32 +0200 - Translations: Update vi.po to match the file from the TP. + Bump version and soname for 5.8.0 - The translated strings haven't been updated but word wrapping - is different. + Also remove the LZMA_UNSTABLE macro. - po/vi.po | 407 ++++++++++++++++++++++++++++----------------------------------- - 1 file changed, 179 insertions(+), 228 deletions(-) + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/bcj.h | 2 -- + src/liblzma/api/lzma/version.h | 6 +++--- + src/liblzma/common/common.h | 2 -- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 6 files changed, 6 insertions(+), 10 deletions(-) -commit 7c85e8953ced204c858101872a15183e4639e9fb +commit bfb752a38f89ed03fc93d54f11c09f43fda64bc2 Author: Lasse Collin -Date: 2020-03-11 14:18:03 +0200 +Date: 2025-03-25 15:18:32 +0200 - Translations: Add fi and pt_BR, and update de, fr, it, and pl. - - 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. + Add NEWS for 5.8.0 - 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(-) + NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 62 insertions(+) -commit 7da3ebc67fb5414034685ec16c7a29dad03dfa9b +commit 6ccbb904da851eb0c174c8dbd43e84da31739720 Author: Lasse Collin -Date: 2020-02-25 21:35:14 +0200 +Date: 2025-03-25 15:18:31 +0200 - Update THANKS. + Translations: Run "make -C po update-po" + + POT-Creation-Date is set to match the timestamp in 5.7.2beta which + in the Translation Project is known as 5.8.0-pre1. The strings + haven't changed since 5.7.1alpha but a few comments have. + + This is a very noisy commit, but this helps keeping the PO files + similar between the Git repository and stable release tarballs. - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/ca.po | 964 ++++++++++++++++++++++++++++++++++++++++++++--------------- + po/cs.po | 935 ++++++++++++++++++++++++++++++++++++++++++---------------- + po/da.po | 663 ++++++++++++++++++++++++++++++----------- + po/de.po | 7 +- + po/eo.po | 966 +++++++++++++++++++++++++++++++++++++++++++++--------------- + po/es.po | 7 +- + po/fi.po | 2 +- + po/fr.po | 916 +++++++++++++++++++++++++++++++++++++++++--------------- + po/hu.po | 966 +++++++++++++++++++++++++++++++++++++++++++++--------------- + po/ka.po | 7 +- + po/ko.po | 7 +- + po/nl.po | 7 +- + po/pl.po | 7 +- + po/pt_BR.po | 962 ++++++++++++++++++++++++++++++++++++++++++++--------------- + po/sr.po | 2 +- + po/sv.po | 7 +- + po/tr.po | 7 +- + po/uk.po | 7 +- + po/vi.po | 948 +++++++++++++++++++++++++++++++++++++++++++--------------- + po/zh_CN.po | 940 ++++++++++++++++++++++++++++++++++++++++++++-------------- + po/zh_TW.po | 2 +- + 21 files changed, 6209 insertions(+), 2120 deletions(-) -commit 1acc48794364606c9091cae6fa56db75a1325114 +commit 891a5f057a6bb2dd2e3ce5e3bdd7a1f1ee03b800 Author: Lasse Collin -Date: 2020-03-11 13:05:29 +0200 +Date: 2025-03-25 15:18:31 +0200 - Build: Add very limited experimental CMake support. + Translations: Run po4a/update-po + + Also remove the trivial obsolete messages like man page dates. - This version matches CMake files in the master branch (commit - 265daa873c0d871f5f23f9b56e133a6f20045a0a) except that this omits - two source files that aren't in v5.2 and in the beginning of - CMakeLists.txt the first paragraph in the comment is slightly - different to point out possible issues in building shared liblzma. + This is a noisy commit, but this helps keeping the PO files similar + between the Git repository and stable release tarballs. - CMakeLists.txt | 659 ++++++++++++++++++++++++++++++++++++++++++++ - cmake/tuklib_common.cmake | 49 ++++ - cmake/tuklib_cpucores.cmake | 175 ++++++++++++ - cmake/tuklib_integer.cmake | 102 +++++++ - cmake/tuklib_mbstr.cmake | 20 ++ - cmake/tuklib_physmem.cmake | 150 ++++++++++ - cmake/tuklib_progname.cmake | 19 ++ - 7 files changed, 1174 insertions(+) + po4a/fr.po | 82 +++++++++++++++++++++++++++++++++++++------------------ + po4a/pt_BR.po | 88 +++++++++++++++++++++++++++++++++++++++++------------------ + po4a/sr.po | 79 ++++++++++++++++++++++++++++++++++------------------- + 3 files changed, 167 insertions(+), 82 deletions(-) -commit 9acc6abea1552803c74c1486fbb10af119550772 +commit 4f52e7387012cb3510b01c937dd9b3a0c6a3ac6c Author: Lasse Collin -Date: 2020-02-27 20:24:27 +0200 +Date: 2025-03-25 15:18:31 +0200 - Build: Add support for --no-po4a option to autogen.sh. + Translations: Partially fix overtranslation in Serbian man pages - 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. + Names of environment variables and some other strings must be present + in the original form. The translator couldn't be reached so I'm + changing some of the strings myself. In the "Robot mode" section, + occurrences in the middle of sentences weren't changed to reduce + the chance of grammar breakage, but I kept the translated strings in + parenthesis in the headings. It's not ideal, but now people shouldn't + need to look at the English man page to find the English strings. - autogen.sh | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) + po4a/sr.po | 66 ++++++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 45 insertions(+), 21 deletions(-) -commit c8853b31545db7bd0551be85949624b1261efd47 +commit ff5d944749b99eb5ab35e2ebaf01d05a59e7169b Author: Lasse Collin -Date: 2020-02-24 23:37:07 +0200 +Date: 2025-03-25 15:18:31 +0200 - Update m4/.gitignore. + liblzma: Count the extra bytes in LZMA/LZMA2 decoder memory usage - m4/.gitignore | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/lz/lz_decoder.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 901eb4a8c992354c3ea482f5bad60a1f8ad6fcc8 +commit 943b012d09f717f7b44284c4e4976ea41264c731 Author: Lasse Collin -Date: 2020-02-24 23:01:00 +0200 +Date: 2025-03-25 15:18:31 +0200 - liblzma: Remove unneeded from fastpos_tablegen.c. + liblzma: Use SSE2 intrinsics instead of memcpy() in dict_repeat() + + SSE2 is supported on every x86-64 processor. The SSE2 code is used on + 32-bit x86 if compiler options permit unconditional use of SSE2. - This file only generates fastpos_table.c. - It isn't built as a part of liblzma. + dict_repeat() copies short random-sized unaligned buffers. At least + on glibc, FreeBSD, and Windows (MSYS2, UCRT, MSVCRT), memcpy() is + clearly faster than byte-by-byte copying in this use case. Compared + to the memcpy() version, the new SSE2 version reduces decompression + time by 0-5 % depending on the machine and libc. It should never be + slower than the memcpy() version. + + However, on musl 1.2.5 on x86-64, the memcpy() version is the slowest. + Compared to the memcpy() version: + + - The byte-by-version takes 6-7 % less time to decompress. + - The SSE2 version takes 16-18 % less time to decompress. + + The numbers are from decompressing a Linux kernel source tarball in + single-threaded mode on older AMD and Intel systems. The tarball + compresses well, and thus dict_repeat() performance matters more + than with some other files. - src/liblzma/lzma/fastpos_tablegen.c | 1 - - 1 file changed, 1 deletion(-) + src/liblzma/lz/lz_decoder.c | 14 ++++++-- + src/liblzma/lz/lz_decoder.h | 87 ++++++++++++++++++++++++++++++++++++++++----- + 2 files changed, 90 insertions(+), 11 deletions(-) -commit ac35c9585fb734b7a19785d490c152e0b8cd4663 +commit bc14e4c94e788d42eeab984298391fc0ca46f969 Author: Lasse Collin -Date: 2020-02-22 14:15:07 +0200 +Date: 2025-03-25 15:18:31 +0200 - Use defined(__GNUC__) before __GNUC__ in preprocessor lines. + liblzma: Add "restrict" to a few functions in lz_decoder.h - This should silence the equivalent of -Wundef in compilers that - don't define __GNUC__. + This doesn't make any difference in practice because compilers can + already see that writing through the dict->buf pointer cannot modify + the contents of *dict itself: The LZMA decoder makes a local copy of + the lzma_dict structure, and even if it didn't, the pointer to + lzma_dict in the LZMA decoder is already "restrict". + + It's nice to add "restrict" anyway. uint8_t is typically unsigned char + which can alias anything. Without the above conditions or "restrict", + compilers could need to assume that writing through dict->buf might + modify *dict. This would matter in dict_repeat() because the loops + refer to dict->buf and dict->pos instead of making local copies of + those members for the duration of the loops. If compilers had to + assume that writing through dict->buf can affect *dict, then compilers + would need to emit code that reloads dict->buf and dict->pos after + every write through dict->buf. - src/common/sysdefs.h | 3 ++- - src/liblzma/api/lzma.h | 5 +++-- - 2 files changed, 5 insertions(+), 3 deletions(-) + src/liblzma/lz/lz_decoder.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit fb9cada7cfade1156d6277717280e05b5cd342d6 +commit e82ee090c567e560f51a056775a17f534d159d65 Author: Lasse Collin -Date: 2020-02-21 17:40:02 +0200 +Date: 2025-03-25 15:18:30 +0200 - liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA. + liblzma: Define LZ_DICT_INIT_POS for initial dictionary position - This gives a tiny encoder speed improvement. This could have been done - in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but - it was forgotten. + It's more readable. - src/liblzma/lzma/lzma_encoder_optimum_normal.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) + src/liblzma/lz/lz_decoder.c | 4 ++-- + src/liblzma/lz/lz_decoder.h | 9 ++++++--- + 2 files changed, 8 insertions(+), 5 deletions(-) -commit 6117955af0b9cef5acde7859e86f773692b5f43c +commit 8e7cd0091e5239334437decbe1989662d45a2f47 Author: Lasse Collin -Date: 2020-02-21 17:01:15 +0200 +Date: 2025-03-25 15:18:30 +0200 - Build: Add visibility.m4 from gnulib. - - 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. + Windows: Update README-Windows.txt about UCRT - m4/.gitignore | 1 - - m4/visibility.m4 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 77 insertions(+), 1 deletion(-) + windows/README-Windows.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit c2cc64d78c098834231f9cfd7d852c9cd8950d74 +commit 2c24292d341e505e5579fccac3bce5bc71d839ef Author: Lasse Collin -Date: 2020-02-21 16:10:44 +0200 +Date: 2025-03-25 15:18:15 +0200 - xz: Silence a warning when sig_atomic_t is long int. - - It can be true at least on z/OS. + Update THANKS - src/xz/signals.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit b6314aa275b35c714e0a191d0b2e9b6106129ea9 +commit 48053c90898fa191a216aefca01626520a7413f4 Author: Lasse Collin -Date: 2020-02-21 15:59:26 +0200 +Date: 2025-03-17 15:33:25 +0200 - xz: Avoid unneeded access of a volatile variable. + Translations: Update the Italian translation - src/xz/signals.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/it.po | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) -commit f772a1572f723e5dc7d2d32e1d4287ac7a0da55e +commit 8d6f06a65f50358fad13567f5dd8af41ef1d2b58 Author: Lasse Collin -Date: 2020-02-21 01:24:18 +0200 +Date: 2025-03-17 15:28:56 +0200 - tuklib_integer.m4: Optimize the check order. + Translations: Update the Portuguese translation - The __builtin byteswapping is the preferred one so check for it first. + The language tag in the Translation Project is pt, not pt_PT, + thus I changed the "Language:" line to pt. - m4/tuklib_integer.m4 | 56 +++++++++++++++++++++++++++------------------------- - 1 file changed, 29 insertions(+), 27 deletions(-) + po/pt.po | 1045 +++++++++++++++++++++++++++++++------------------------------- + 1 file changed, 526 insertions(+), 519 deletions(-) -commit 641042e63f665f3231c2fd1241fd3dddda3fb313 +commit c3439b039f46fe547ad603e16dc3bd63c1ca9b0c Author: Lasse Collin -Date: 2020-02-20 18:54:04 +0200 +Date: 2025-03-14 13:02:21 +0200 - tuklib_exit: Add missing header. - - 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. + Translations: Update the Italian translation - src/common/tuklib_exit.c | 1 + - 1 file changed, 1 insertion(+) + po/it.po | 1020 +++++++++++++++++++++++++++++++------------------------------- + 1 file changed, 516 insertions(+), 504 deletions(-) -commit dbd55a69e530fec9ae866aaf6c3ccc0b4daf1f1f +commit 79b4ab8d79528dd633a84df2d29e63f5d13ccbdf Author: Lasse Collin -Date: 2020-02-16 11:18:28 +0200 +Date: 2025-03-12 20:48:39 +0200 - sysdefs.h: Omit the conditionals around string.h and limits.h. + Translations: Update the Italian man page translations - 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. + Only trivial additions but this keeps the file in sync with the TP. - src/common/sysdefs.h | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + po4a/it.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 9294909861e6d22b32418467e0e988f953a82264 +commit 515b6fc8557825e1335012b3b1c8cf71e2c38775 Author: Lasse Collin -Date: 2020-02-15 15:07:11 +0200 +Date: 2025-03-12 19:38:54 +0200 - Build: Bump Autoconf and Libtool version requirements. - - There is no specific reason for this other than blocking - the most ancient versions. These are still old: - - Autoconf 2.69 (2012) - Automake 1.12 (2012) - gettext 0.19.6 (2015) - Libtool 2.4 (2010) + Translations: Update the Italian man page translations - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + po4a/it.po | 129 ++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 77 insertions(+), 52 deletions(-) -commit bd09081bbdf552f730030d2fd0e5e39ccb3936af +commit 333b7c0b776295f0941269b4e6cdb1a0ba5f6218 Author: Lasse Collin -Date: 2020-02-15 03:08:32 +0200 +Date: 2025-03-10 21:00:31 +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). - - 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. + Translations: Update the Korean man page translations - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + po4a/ko.po | 139 +++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 80 insertions(+), 59 deletions(-) -commit 1e5e08d86534aec7ca957982c7f6e90203c19e9f +commit ae52ebd27dc0be5e1ba62fb0c45255d8563fcd88 Author: Lasse Collin -Date: 2020-02-14 20:42:06 +0200 +Date: 2025-03-10 20:56:57 +0200 - Translations: Add German translation of the man pages. - - Thanks to Mario Blättermann. + Translations: Update the German man page translations - po4a/de.po | 5532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - po4a/po4a.conf | 2 +- - 2 files changed, 5533 insertions(+), 1 deletion(-) + po4a/de.po | 102 ++++++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 63 insertions(+), 39 deletions(-) -commit 4b1447809ffbc0d77c0ad456bd6b3afcf0b8623e +commit 1028e52c93d2292b44ff7bae8e721025d2f2c94d Author: Lasse Collin -Date: 2020-02-07 15:32:21 +0200 +Date: 2025-03-10 13:13:30 +0200 - Build: Add support for translated man pages using po4a. + CMake: Fix tuklib_use_system_extensions - 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. + Revert back to a macro so that list(APPEND CMAKE_REQUIRED_DEFINITIONS) + will affect the calling scope. I had forgotten that while CMake + functions inherit the variables from the parent scope, the changes + to them are local unless using set(... PARENT_SCOPE). - 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. + This also means that the commit message in 5bb77d0920dc is wrong. The + commit itself is still fine, making it clearer that -DHAVE_SYS_PARAM_H + is only needed for specific check_c_source_compiles() calls. - The translated man pages aren't installed if --disable-nls is used. + Fixes: c1ea7bd0b60eed6ebcdf9a713ca69034f6f07179 + + cmake/tuklib_common.cmake | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit 80e48836024ec2d7cbd557575be6da3d1f055cba +Author: Lasse Collin +Date: 2025-03-10 11:38:55 +0200 + + INSTALL: Document -bmaxdata on AIX - 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. + This is based on a pull request and AIX docs. I haven't tested the + instructions myself. - Also, this adds more quotes to the existing shell script code in - the Makefile.am "-hook"s. + Closes: https://github.com/tukaani-project/xz/pull/137 - 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(-) + INSTALL | 5 +++++ + 1 file changed, 5 insertions(+) -commit 882fcfdcd86525cc5c6f6d0bf0230d0089206d13 +commit ab319186b6d0454285ff4941a777ac95e580f60f Author: Lasse Collin -Date: 2020-02-06 00:04:42 +0200 +Date: 2025-03-10 11:37:19 +0200 - Update THANKS (sync with the master branch). + Update THANKS - THANKS | 3 +++ - 1 file changed, 3 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 134bb7765815d5f265eb0bc9e6ebacd9ae4a52bc -Author: Lasse Collin -Date: 2020-02-05 22:35:06 +0200 +commit 4434671a04436038f88ab0feaa251cc8d7abb683 +Author: Collin Funk +Date: 2025-03-09 19:14:31 -0700 - Update tests/.gitignore. + tuklib_physmem: Silence -Wsign-conversion on AIX + + Closes: https://github.com/tukaani-project/xz/pull/168 - .gitignore | 4 ++++ - 1 file changed, 4 insertions(+) + src/common/tuklib_physmem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 6912472fafb656be8f4c5b4ac9ea28fea3065de4 +commit 18bcaa4fafc935d89ffde94301fa6427907306bf Author: Lasse Collin -Date: 2020-02-05 22:28:51 +0200 +Date: 2025-03-09 22:10:38 +0200 - Update m4/.gitignore. + Translations: Update the Romanian man page translations - m4/.gitignore | 1 + - 1 file changed, 1 insertion(+) + po4a/ro.po | 110 ++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 66 insertions(+), 44 deletions(-) -commit 68c60735bbb6e51d4205ba8a9fde307bcfb22f8c +commit 1e17b7f42fe2f9df279f44ad7043d3753cd00363 Author: Lasse Collin -Date: 2020-02-05 20:47:38 +0200 +Date: 2025-03-09 21:28:15 +0200 - Update THANKS. + Translations: Update the Croatian translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/hr.po | 19 +++++++++++-------- + 1 file changed, 11 insertions(+), 8 deletions(-) -commit e1beaa74bc7cb5a409d59b55870e01ae7784ce3a +commit ff85e6130d5940896915cdbb99aa9ece9d41240b Author: Lasse Collin -Date: 2020-02-05 20:33:50 +0200 +Date: 2025-03-09 21:23:34 +0200 - xz: Comment out annoying sandboxing messages. + Translations: Update the Romanian translation - src/xz/file_io.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) + po/ro.po | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) -commit 8238192652290df78bd728b20e3f6542d1a2819e +commit a5bfb33f30f77e656723d365db8b06e089d3de61 Author: Lasse Collin -Date: 2020-02-05 19:33:37 +0200 +Date: 2025-03-09 21:11:34 +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. + Translations: Update the Ukrainian man page translations - configure.ac | 10 ++++++++++ - 1 file changed, 10 insertions(+) + po4a/uk.po | 107 ++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 64 insertions(+), 43 deletions(-) -commit 93a1f61e892e145607dd938e3b30098af19a1672 +commit 5bb77d0920dcf949d8eb04eb19204b7b199e42df Author: Lasse Collin -Date: 2020-02-03 22:03:50 +0200 +Date: 2025-03-09 14:43:07 +0200 - Build: Update m4/ax_pthread.m4 from Autoconf Archive. + CMake: Use cmake_push_check_state in tuklib_cpucores and tuklib_physmem + + Now the changes to CMAKE_REQUIRED_DEFINITIONS are temporary and don't + leak to the calling code. - m4/ax_pthread.m4 | 398 ++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 279 insertions(+), 119 deletions(-) + cmake/tuklib_cpucores.cmake | 3 +++ + cmake/tuklib_physmem.cmake | 4 +++- + 2 files changed, 6 insertions(+), 1 deletion(-) -commit d0daa21792ff861e5423bbd82aaa6c8ba9fa0462 +commit c1ea7bd0b60eed6ebcdf9a713ca69034f6f07179 Author: Lasse Collin -Date: 2020-02-01 19:56:18 +0200 +Date: 2025-03-09 14:06:35 +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. + CMake: Revise tuklib_use_system_extensions - At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference - on how xz scales down the number of threads. + Define NetBSD and Darwin/macOS feature test macros. Autoconf defines + these too (and a few others). - 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. + Define the macros on Windows except with MSVC. The _GNU_SOURCE macro + makes a difference with mingw-w64. - 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. + Use a function instead of a macro. Don't take the TARGET_OR_ALL argument + because there's always global effect because the global variable + CMAKE_REQUIRED_DEFINITIONS is modified. - src/xz/hardware.c | 32 +++++++++++++++++++++++++++++++- - src/xz/xz.1 | 21 ++++++++++++++++++++- - 2 files changed, 51 insertions(+), 2 deletions(-) + CMakeLists.txt | 2 +- + cmake/tuklib_common.cmake | 27 +++++++++++++++------------ + 2 files changed, 16 insertions(+), 13 deletions(-) -commit 4433c2dc5727ee6aef570e001a5a024e0d94e609 +commit 4243c45a48ef8c103d77b75d9f93d48adcb631db Author: Lasse Collin -Date: 2020-01-26 20:53:25 +0200 +Date: 2025-03-08 14:54:29 +0200 - 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: - - 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. + doc/SHA256SUMS: Add 5.7.2beta - src/xz/coder.c | 6 +----- - src/xz/file_io.c | 6 +++++- - src/xz/mytime.c | 1 - - 3 files changed, 6 insertions(+), 7 deletions(-) + doc/SHA256SUMS | 3 +++ + 1 file changed, 3 insertions(+) -commit acc0ef3ac80f18e349c6d0252177707105c0a29c +commit cc7f2fc1cf9f3c63cbce90ee92bfbb004f98140b Author: Lasse Collin -Date: 2020-01-26 20:19:19 +0200 +Date: 2025-03-08 14:29:57 +0200 - xz: Move flush_needed from mytime.h to file_pair struct in file_io.h. + Bump version and soname for 5.7.2beta - 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/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 4 ++-- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) -commit 4afe69d30b66812682a2016ee18441958019cbb2 +commit 62e44b36167de27541776dcf677ed04077c9fd19 Author: Lasse Collin -Date: 2020-01-26 14:49:22 +0200 +Date: 2025-03-08 14:24:38 +0200 - xz: coder.c: Make writing output a separate function. - - 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. + Add NEWS for 5.7.2beta - src/xz/coder.c | 30 +++++++++++++++++------------- - 1 file changed, 17 insertions(+), 13 deletions(-) + NEWS | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) -commit ec26f3ace5f9b260ca91508030f07465ae2f9f78 +commit 70f1f203789433b5d7b8b22e1655abc465d659f7 Author: Lasse Collin -Date: 2020-01-26 14:13:42 +0200 +Date: 2025-03-08 14:23:00 +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: Remove the note about old releases - 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 | 19 ------------------- + 1 file changed, 19 deletions(-) -commit 38915703241e69a64f133ff9a02ec9100c6019c6 +commit db9827dc38ff79de747a6fc7a99619e961dbc5e6 Author: Lasse Collin -Date: 2020-01-26 13:47:31 +0200 +Date: 2025-03-08 14:22:28 +0200 - xz: Refactor io_read() a bit. + xz: Update the man page about the environment variables again - src/xz/file_io.c | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) + src/xz/xz.1 | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) -commit f6d24245349cecfae6ec0d2366fa80716c9f6d37 +commit 99c584891bd1d946561cebded2226df9b83f1efb Author: Lasse Collin -Date: 2020-01-26 13:37:08 +0200 +Date: 2025-03-06 19:26:09 +0200 - xz: Update a comment in file_io.h. + liblzma: Edit spelling in a comment + + It was found with codespell. - src/xz/file_io.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/liblzma/api/lzma/container.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 15b55d5c63d27f81776edb1abc05872a751fc674 +commit 7a234c8c05a8f64efde013cd6a6d31a90b7d0d28 Author: Lasse Collin -Date: 2020-01-26 13:27:51 +0200 +Date: 2025-03-06 19:14:23 +0200 - xz: Move the setting of flush_needed in file_io.c to a nicer location. + xz: Update the man page about the environment variables - src/xz/file_io.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + src/xz/xz.1 | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) -commit 609c7067859146ffc62ac655f6ba53599c891801 +commit 808f05af3ef40730d40b3798666757bd866484f1 Author: Lasse Collin -Date: 2020-02-05 19:56:09 +0200 +Date: 2025-03-06 17:37:39 +0200 - xz: Enable Capsicum sandboxing by default if available. - - It has been enabled in FreeBSD for a while and reported to work fine. + Docs: Add a few TRANSLATORS comments to man pages - Thanks to Xin Li. + All translators know that --command-line-options must not be translated. + With some other strings it's not obvious when the untranslated string + must be preserved. These comments hopefully help. - INSTALL | 6 ------ - configure.ac | 8 ++++---- - 2 files changed, 4 insertions(+), 10 deletions(-) + src/scripts/xzmore.1 | 2 ++ + src/xz/xz.1 | 22 ++++++++++++++++++++++ + 2 files changed, 24 insertions(+) -commit 00517d125cc26ecece0eebb84c1c3975cd19bee0 +commit 051de255f00dda331e2a6fa189a6e7fe56a7c69b Author: Lasse Collin -Date: 2019-12-31 22:41:45 +0200 +Date: 2025-03-06 16:34:32 +0200 - Rename unaligned_read32ne to read32ne, and similarly for the others. + Scripts: Mark the LZMA Utils script aliases as deprecated + + The deprecated aliases are lzcmp, lzdiff, lzless, lzmore, + lzgrep, lzegrep, and lzfgrep. The commands that start with + the xz prefix have identical behavior, for example, both + lzgrep and xzgrep handle all supported file formats. + + This doesn't affect lzma, unlzma, lzcat, lzmadec, or lzmainfo. + The last release of LZMA Utils was made in 2008, but the lzma + compatibility alias for the gzip-like tool is still in common use. + Deprecating it would cause unnecessary breakage. - 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(-) + src/scripts/xzdiff.1 | 5 ++++- + src/scripts/xzgrep.1 | 6 +++++- + src/scripts/xzless.1 | 4 +++- + src/scripts/xzmore.1 | 4 +++- + 4 files changed, 15 insertions(+), 4 deletions(-) -commit 52d89d8443c4a31a69c0701062f2c7711d82bbed +commit 4941ea454c02cf15a64d6434a0778fc2a81282fc Author: Lasse Collin -Date: 2019-12-31 00:29:48 +0200 +Date: 2025-03-02 21:13:04 +0200 - Rename read32ne to aligned_read32ne, and similarly for the others. - - 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. + Translations: Add Serbian man page translations - 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(-) + po4a/po4a.conf | 2 +- + po4a/sr.po | 3892 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 3893 insertions(+), 1 deletion(-) -commit 850620468b57d49f16093e5870d1050886fcb37a +commit d142d96f24daa451edaabfca8594e202932b3c0b Author: Lasse Collin -Date: 2019-12-31 00:18:24 +0200 +Date: 2025-03-02 20:42:14 +0200 - Revise tuklib_integer.h and .m4. - - 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. - - 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. - - 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. - - Other things: - - Support GCC/Clang __builtin_bswapXX - - Cleaner bswap fallback macros - - Minor cleanups + Translations: Update Georgian translation - m4/tuklib_integer.m4 | 43 ++++ - src/common/tuklib_integer.h | 488 ++++++++++++++++++++++++-------------------- - 2 files changed, 314 insertions(+), 217 deletions(-) + po/ka.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit a45badf0342666462cc6a7107a071418570ab773 +commit 9b7e45d841195c8fd8d286e26f810df28c53dd16 Author: Lasse Collin -Date: 2019-12-29 22:51:58 +0200 +Date: 2025-02-28 21:07:21 +0200 - Tests: Hopefully fix test_check.c to work on EBCDIC systems. - - Thanks to Daniel Richard G. + Update THANKS - tests/test_check.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit c9a8071e6690a8db8a485c075920df254e7c70ea +commit 9351592710e0df3238b09d39c545a643c50ac88f Author: Lasse Collin -Date: 2019-09-24 23:02:40 +0300 +Date: 2025-02-22 16:04:58 +0200 - 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. + Update THANKS - 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(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit aba140e2df3ff63ad124ae997de16d517b98ca50 +commit 9023be7831faca2f28def55e16c39e3a42e1e262 Author: Lasse Collin -Date: 2019-07-12 18:57:43 +0300 +Date: 2025-02-19 16:33:52 +0200 - Fix comment typos in tuklib_mbstr* files. + Translations: Update the Croatian translation - 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(-) + po/hr.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 710f5bd769a5d2bd8684256c2727d15350ee2ab8 +commit 2eaf242c56e8c65db83d48b018fa44aeafeb33a5 Author: Lasse Collin -Date: 2019-07-12 18:30:46 +0300 +Date: 2025-02-17 21:46:15 +0200 - Add missing include to tuklib_mbstr_width.c. + Build: Fix out-of-tree builds when using the replacement getopt_long + + Nowaways $(top_builddir)/lib/getopt.h depends on headers in + $(top_srcdir)/lib, so both have to be in the include path. + CMake-based build already did this. - It didn't matter in XZ Utils because sysdefs.h - includes string.h anyway. + Fixes: 7e884c00d0093c38339f17fb1d280eec493f42ca - src/common/tuklib_mbstr_width.c | 1 + - 1 file changed, 1 insertion(+) + src/lzmainfo/Makefile.am | 6 ++++-- + src/xz/Makefile.am | 6 ++++-- + src/xzdec/Makefile.am | 6 ++++-- + 3 files changed, 12 insertions(+), 6 deletions(-) -commit 0e491aa8cd72e0100cd15c1b9469cd57fae500b0 +commit 41322b2c60cd2c67a1053cb40d27e573420185b7 Author: Lasse Collin -Date: 2019-06-25 23:15:21 +0300 +Date: 2025-02-17 18:25:52 +0200 - liblzma: Fix a buggy comment. + m4/getopt.m4: Remove an outdated comment - src/liblzma/lz/lz_encoder_mf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + m4/getopt.m4 | 3 --- + 1 file changed, 3 deletions(-) -commit bfc245569f340a75bd71ad32a6beba786712683b +commit 03c23a4952bce1b50a1d213ca2d1c15acd76a489 Author: Lasse Collin -Date: 2019-06-25 00:16:06 +0300 +Date: 2025-02-17 18:11:58 +0200 - configure.ac: Fix a typo in a comment. + Build: Allow forcing the use of the replacement getopt_long + + Now one can pass gl_replace_getopt=yes to configure to force the use + of GNU getopt_long from the lib directory. This only checks that the + value of gl_replace_getopt is non-empty, so one cannot force the + replacement to be disabled. + + Closes: https://github.com/tukaani-project/xz/pull/166 - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + m4/getopt.m4 | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit f18eee9d15a22c8449ef395a05f0eb637c4ad253 +commit c23b837d15960ecc0d537f0260f389904e1e7f02 Author: Lasse Collin -Date: 2019-06-25 00:08:13 +0300 +Date: 2025-02-17 18:11:42 +0200 - Tests: Silence warnings from clang -Wassign-enum. - - Also changed 999 to 99 so it fits even if lzma_check happened - to be 8 bits wide. + Update THANKS - tests/test_block_header.c | 3 ++- - tests/test_stream_flags.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 25f74554723e8deabc66fed1abf0ec27a4ed19d5 +commit 2672a38f1159babf9ba3cca429f644bb823a8bdd Author: Lasse Collin -Date: 2019-06-24 23:52:17 +0300 +Date: 2025-02-12 19:23:31 +0200 - liblzma: Add a comment. + Update THANKS - src/liblzma/common/stream_encoder_mt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + THANKS | 2 ++ + 1 file changed, 2 insertions(+) + +commit 4fdcbfaf3f222299747c6a815762a74eeb1b0b23 +Author: Lasse Collin +Date: 2025-02-11 12:13:41 +0200 -commit 44eb961f2a51d02420d017bc5ff470360663650c + Update THANKS + + THANKS | 3 +++ + 1 file changed, 3 insertions(+) + +commit 0d553568f1af9a35779ecac41392a6c871786930 Author: Lasse Collin -Date: 2019-06-24 23:45:21 +0300 +Date: 2025-02-08 11:39:08 +0200 - liblzma: Silence clang -Wmissing-variable-declarations. + Translations: Update the Polish translation - src/liblzma/check/crc32_table.c | 3 +++ - src/liblzma/check/crc64_table.c | 3 +++ - 2 files changed, 6 insertions(+) + po/pl.po | 802 ++++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 464 insertions(+), 338 deletions(-) -commit 267afcd9955e668c1532b069230c21c348eb4f82 +commit 9f165076aebb3b5115d2b6520529db8fa11a6bdd Author: Lasse Collin -Date: 2019-06-24 22:57:43 +0300 +Date: 2025-02-07 19:12:03 +0200 - xz: Silence a warning from clang -Wsign-conversion in main.c. + Docs: Update TODO a little - src/xz/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + TODO | 22 ++++------------------ + 1 file changed, 4 insertions(+), 18 deletions(-) -commit 0e3c4002f809311ecef239b05e556d9c462b5703 +commit f5aa292c534f87b9dd588e667d1c65ed31e5f289 Author: Lasse Collin -Date: 2019-06-24 22:47:39 +0300 +Date: 2025-02-07 18:50:56 +0200 - liblzma: Remove incorrect uses of lzma_attribute((__unused__)). + Add researcher credits of CVE-2022-1271 and CVE-2024-47611 to THANKS - Caught by clang -Wused-but-marked-unused. + These are specific phrases that were included in the advisories and + NEWS. It's nice to have them in THANKS as well. - 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(-) + THANKS | 4 ++++ + 1 file changed, 4 insertions(+) -commit cb708e8fa3405ec13a0ebfebbbf2793f927deab1 +commit 7cf463b5add70e3fb48a10de3965c8beb6c01ad9 Author: Lasse Collin -Date: 2019-06-24 20:53:55 +0300 +Date: 2025-02-07 18:43:00 +0200 - Tests: Silence a warning from -Wsign-conversion. + Update THANKS - tests/create_compress_files.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + THANKS | 5 +++++ + 1 file changed, 5 insertions(+) -commit c8cace3d6e965c0fb537591372bf71b9357dd76c +commit 6b7fe7e27b77038592e2c2e31df955059dda7d1d Author: Lasse Collin -Date: 2019-06-24 20:45:49 +0300 +Date: 2025-02-04 14:12:46 +0200 - xz: Fix an integer overflow with 32-bit off_t. + Docs: Update the "Translations" section in README - 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. + Make it clearer that translations cannot be accepted if they don't + come via the Translation Project. + + Column headings have been handled automatically for years and now --help + is autowrapped too, so the related instructions can be removed. - src/xz/file_io.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) + README | 107 ++++++++++++++++++++++++----------------------------------------- + 1 file changed, 39 insertions(+), 68 deletions(-) -commit 65a42741e290fbcd85dfc5db8a62c4bce5f7712c +commit 2c7aee94936babf84b61b55420e503a0b2629ec1 Author: Lasse Collin -Date: 2019-06-24 00:57:23 +0300 +Date: 2025-02-04 13:23:53 +0200 - Tests: Remove a duplicate branch from tests/tests.h. + debug/translations.bash: Revise a little + + Make it work for out-of-tree builds without requiring one to specify + the location of the xz executable. + + Add xz --filters-help. - The duplication was introduced about eleven years ago and - should have been cleaned up back then already. + Make the output shorter by reducing the number of xz -lvv test files. - This was caught by -Wduplicated-branches. + Show the value of LANGUAGE environment variable. + + Show the xz.git version using git describe --abbrev=8 instead of =4. - tests/tests.h | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) + debug/translation.bash | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) -commit 5c4fb60e8df026e933afab0cfe0a8b55be20036c +commit c6b15e7045209002bbbf4979c48072af01c20d8d Author: Lasse Collin -Date: 2019-06-23 23:22:45 +0300 +Date: 2025-02-04 13:20:52 +0200 - tuklib_mbstr_width: Fix a warning from -Wsign-conversion. + Build: Use "git describe --abbrev=8" in snapshot tarball names + + 8 is more likely to be reproducible than the old 4 without being + excessively long for a small repository like this. - src/common/tuklib_mbstr_width.c | 2 +- + Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 37df03ce52ce53710e1513387648763f8a744154 +commit 0ce97987c5b27cfb6f98984e5fd7477880e0cf33 Author: Lasse Collin -Date: 2019-06-23 23:19:34 +0300 +Date: 2025-02-04 19:37:17 +0200 - xz: Fix some of the warnings from -Wsign-conversion. + Update THANKS - 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(-) + THANKS | 2 ++ + 1 file changed, 2 insertions(+) -commit 7c65ae0f5f2e2431f88621e8fe6d1dc7907e30c1 +commit 353c33355cb12e5016d49052fd1e90d15568aa37 Author: Lasse Collin -Date: 2019-06-23 22:27:45 +0300 +Date: 2025-02-03 16:29:31 +0200 - tuklib_cpucores: Silence warnings from -Wsign-conversion. + Translations: Update the Serbian translation - src/common/tuklib_cpucores.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + po/sr.po | 805 ++++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 458 insertions(+), 347 deletions(-) -commit a502dd1d000b598406637d452f535f4bbd43e2a4 +commit 887dc281885052bced32b3aa309506ea58a2e78e Author: Lasse Collin -Date: 2019-06-23 21:40:47 +0300 +Date: 2025-02-03 16:15:38 +0200 - xzdec: Fix warnings from -Wsign-conversion. + Translations: Update Chinese (traditional) translation + + Since there are no spaces between words, the unsophisticated automatic + word wrapping code needs some help. Compared to the version in the + Translation Project, I added a few \t characters which the word + wrapping code interprets as zero width spaces (hopefully they are + placed correctly). These edits can be seen with this command: + + grep -v ^# po/zh_TW.po | grep --color -F '\t' - src/xzdec/xzdec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/zh_TW.po | 843 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 471 insertions(+), 372 deletions(-) -commit a45d1a5374ceb22e23255b0b595b9e641e9860af +commit 0f1454cf5f460a4095f47f8f73f5a290e9777d7f Author: Lasse Collin -Date: 2019-06-23 21:38:56 +0300 +Date: 2025-02-03 16:12:44 +0200 - liblzma: Fix warnings from -Wsign-conversion. - - Also, more parentheses were added to the literal_subcoder - macro in lzma_comon.h (better style but no functional change - in the current usage). + Update THANKS - 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(-) + THANKS | 2 ++ + 1 file changed, 2 insertions(+) -commit 4ff87ddf80ed7cb233444cddd86ab1940b5b55ec +commit 23ea031820086d302a213be005a091df763b8a7b Author: Lasse Collin -Date: 2019-06-23 19:33:55 +0300 +Date: 2025-02-02 14:15:07 +0200 - tuklib_integer: Silence warnings from -Wsign-conversion. + Build: Update posix-shell.m4 from Gnulib + + Tabs have been converted to spaces and a "serial" number has been + added. The previous version was from 2008/2009. There are no functional + changes since then but now it's clearer that the copy in XZ Utils + isn't outdated. + + The new file was picked from the Gnulib commit + 81a4c1e3b7692e95c0806d948cbab9148ad85ef2. A later commit adds + a warranty disclaimer to the license, which obviously is fine, + but I didn't find a SPDX license identifier for the new license, + so for simplicity I used the earlier commit. - src/common/tuklib_integer.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + m4/posix-shell.m4 | 31 ++++++++++++++++--------------- + 1 file changed, 16 insertions(+), 15 deletions(-) -commit ed1a9d33984a3a37ae9a775a46859850d98ea4d0 +commit 84c33c0384aa4604ff7956f2fae6f83ea60ba96b Author: Lasse Collin -Date: 2019-06-20 19:40:30 +0300 +Date: 2025-02-02 12:51:03 +0200 - tuklib_integer: Fix usage of conv macros. + Build: Check for -fsanitize= also in $CC + + People may put -fsanitize in CC instead of CFLAGS so check both. + Landlock sandbox isn't compatible with sanitizers so it's nice + to catch the incompatible options at configure time. - Use a temporary variable instead of e.g. - conv32le(unaligned_read32ne(buf)) because the macro can - evaluate its argument multiple times. + Don't attempt to do the same in CMakeLists.txt; the check for + CMAKE_C_FLAGS / CFLAGS shall be enough there. The extra flags from + the CC environment variable go into the undocumented internal variable + CMAKE_C_COMPILER_ARG1 (all flags from CC go into that same variable). + Peeking the internal variable merely for improved diagnostics isn't + worth it. + + Fixes: 88588b1246d8c26ffbc138b3e5c413c5f14c3179 - src/common/tuklib_integer.h | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 612c88dfc08e2c572623954ecfde541d21c84882 +commit a7304ea4a7daede9789a8fe422b714e372737120 Author: Lasse Collin -Date: 2019-06-03 20:44:19 +0300 +Date: 2023-09-26 19:11:20 +0300 - Update THANKS. + Build: Remove the FIXME about -Werror checks - THANKS | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 7 ------- + 1 file changed, 7 deletions(-) -commit 85da31d8b882b8b9671ab3e3d74d88bd945cd0bb +commit 1780bba74075da5e7764615bd323e95e19057dee Author: Lasse Collin -Date: 2019-06-03 20:41:54 +0300 +Date: 2023-09-26 19:10:51 +0300 - liblzma: Fix comments. + Build: If using a GCC compatible compiler, ensure that -Werror works + + The check can be skipped by passing SKIP_WERROR_CHECK=yes to configure. + It won't be documented anywhere else than in the error message. - Thanks to Bruce Stark. + Ways to test: + + ./configure CC=gcc CFLAGS=-Wunused-macros + ./configure CC=clang CFLAGS=-Weverything + ./configure CC=clang CFLAGS=-Weverything SKIP_WERROR_CHECK=yes - 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 | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) -commit 6a73a7889587aa394e236c7e9e4f870b44851036 +commit 3aca2daefbdedd7cc0fb75ddde6b714273b1cc1d Author: Lasse Collin -Date: 2019-06-02 00:50:59 +0300 +Date: 2025-02-02 14:30:15 +0200 - liblzma: Fix one more unaligned read to use unaligned_read16ne(). + Update THANKS - src/liblzma/lz/lz_encoder_hash.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + THANKS | 4 ++++ + 1 file changed, 4 insertions(+) -commit ce59b34ec9ac344d62a57cad5f94f695f42cdaee +commit 186ff78ab40ceb07cde139506cab42a927ca99d2 Author: Lasse Collin -Date: 2019-06-01 21:41:55 +0300 +Date: 2025-02-01 12:49:09 +0200 - Update THANKS. + Translations: Update Romanian translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/ro.po | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) -commit 94aa3fb568fe41dd4925a961966ed5cf8213bd1f +commit 40a8ce3e10747ca5233610cc2cb704fc303c48e4 Author: Lasse Collin -Date: 2019-06-01 21:36:13 +0300 +Date: 2025-01-30 18:16:43 +0200 - liblzma: memcmplen: Use ctz32() from tuklib_integer.h. - - The same compiler-specific #ifdefs are already in tuklib_integer.h + Translations: Update Korean man page translations - src/liblzma/common/memcmplen.h | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) + po4a/ko.po | 146 ++++++++++++++++++++++++------------------------------------- + 1 file changed, 56 insertions(+), 90 deletions(-) -commit 412791486dfb430219d8e30bcbebbfc57a99484a +commit 1787f9bd18ea8798d64b636cdefe6d0fda9b8f72 Author: Lasse Collin -Date: 2019-06-01 21:30:03 +0300 +Date: 2025-01-30 18:15:52 +0200 - tuklib_integer: Cleanup MSVC-specific code. + Translations: Add Italian man page translations - src/common/tuklib_integer.h | 20 +++++++++----------- - 1 file changed, 9 insertions(+), 11 deletions(-) + po4a/it.po | 3876 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po4a/po4a.conf | 2 +- + 2 files changed, 3877 insertions(+), 1 deletion(-) -commit efbf6e5f0932e6c1a4250f91ee99059f449f2470 +commit 9b9182e561787a811fc0178489589f28c3e0174c Author: Lasse Collin -Date: 2019-06-01 19:01:21 +0300 +Date: 2025-01-29 22:18:29 +0200 - liblzma: Use unaligned_readXXne functions instead of type punning. - - Now gcc -fsanitize=undefined should be clean. - - Thanks to Jeffrey Walton. + Translations: Update the Finnish translation - src/liblzma/common/memcmplen.h | 12 ++++++------ - src/liblzma/lzma/lzma_encoder_private.h | 2 +- - 2 files changed, 7 insertions(+), 7 deletions(-) + po/fi.po | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) -commit 29afef03486d461c23f57150ac5436684bff7811 +commit 7d73ff7a9d8eab6270f0b1ff7d10c0aa6f5ba53f Author: Lasse Collin -Date: 2019-06-01 18:41:16 +0300 +Date: 2025-01-29 20:50:03 +0200 - 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. + lzmainfo: Use tuklib_mbstr_wrap for --help text - Avoiding type punning with unaligned access is needed to - silence gcc -fsanitize=undefined. - - New functions: unaliged_readXXne and unaligned_writeXXne where - XX is 16, 32, or 64. + Some languages have so long strings that they need to be wrapped. - src/common/tuklib_integer.h | 180 +++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 168 insertions(+), 12 deletions(-) + CMakeLists.txt | 4 ++++ + src/lzmainfo/Makefile.am | 2 ++ + src/lzmainfo/lzmainfo.c | 36 ++++++++++++++++++++++++++---------- + 3 files changed, 32 insertions(+), 10 deletions(-) -commit 596ed3de4485a4b1d83b5fe506ae9d0a172139b4 +commit c56eb4707627d700695813fccdddd1483eac4f21 Author: Lasse Collin -Date: 2019-05-13 20:05:17 +0300 +Date: 2025-01-29 20:00:06 +0200 - 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. - - 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. - - Thanks to Jeffrey Walton. + Translations: Update the Croatian translation - 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(-) + po/hr.po | 926 ++++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 529 insertions(+), 397 deletions(-) -commit b4b83555c576e1d845a2b98a193b23c021437804 +commit 69f4aec0a2442ab81f9ab66e5871a6546aefb0fc Author: Lasse Collin -Date: 2019-05-11 20:56:08 +0300 +Date: 2025-01-29 19:56:01 +0200 - Update THANKS. + Translations: Update the Finnish translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/fi.po | 911 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 483 insertions(+), 428 deletions(-) -commit 8d4906262b45557ed164cd74adb270e6ef7f6f03 +commit d49dde33cf5f488bb38b1f57e172c4e3343fb383 Author: Lasse Collin -Date: 2019-05-11 20:54:12 +0300 +Date: 2025-01-29 19:55:27 +0200 - xz: Update xz man page date. + Translations: Update the German man page translations - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po4a/de.po | 147 +++++++++++++++++++++++-------------------------------------- + 1 file changed, 55 insertions(+), 92 deletions(-) -commit 0d318402f8a022f707622c72f8f1894ea476cf89 -Author: Antoine Cœur -Date: 2019-05-08 13:30:57 +0800 +commit 23b99fc4a1f35bec5d63ffd02b14cacbdce9fe3c +Author: Lasse Collin +Date: 2025-01-29 19:55:17 +0200 - spelling + Translations: Update the German translation - Doxyfile.in | 2 +- - NEWS | 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/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/main.c | 2 +- - src/xz/mytime.h | 2 +- - src/xz/private.h | 2 +- - src/xz/xz.1 | 2 +- - windows/build.bash | 2 +- - 19 files changed, 21 insertions(+), 21 deletions(-) + po/de.po | 825 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 460 insertions(+), 365 deletions(-) -commit aeb3be8ac4c4b06a745c3799b80b38159fb78b1a +commit 7edab2bde0606b42229d9c04fe664069e38de3fb Author: Lasse Collin -Date: 2019-03-04 22:49:04 +0200 +Date: 2025-01-29 19:55:05 +0200 - README: Update translation instructions. - - XZ Utils is now part of the Translation Project - . + Translations: Update the Turkish translation - README | 32 +++++++++++++------------------- - 1 file changed, 13 insertions(+), 19 deletions(-) + po/tr.po | 892 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 490 insertions(+), 402 deletions(-) -commit 0c238dc3feb0a3eea1e713feb8d338c8dfba9f74 +commit fac4d0fa5277d7a1f621707621ee9516f0bdbac5 Author: Lasse Collin -Date: 2018-12-20 20:42:29 +0200 +Date: 2025-01-29 19:54:36 +0200 - Update THANKS. + Translations: Add the Dutch translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/LINGUAS | 1 + + po/nl.po | 1268 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1269 insertions(+) -commit 3ca432d9cce4bf7e793de173dd22025b68611c42 +commit abe5092f24b55dde9f7f78fac1bf810bce173273 Author: Lasse Collin -Date: 2018-12-14 20:34:30 +0200 +Date: 2025-01-29 19:53:50 +0200 - 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. - - Thanks to Filip Palian for - the bug report. + Translations: Update the Georgian translation - src/xz/coder.c | 11 +++++++---- - src/xz/message.c | 18 ++++++++++++++++-- - src/xz/message.h | 3 ++- - 3 files changed, 25 insertions(+), 7 deletions(-) + po/ka.po | 153 +++++++++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 115 insertions(+), 38 deletions(-) -commit fcc419e3c3f77a8b6fc5056a86b1b8abbe266e62 +commit b97b23c78d8100eec363c3e999c511560366d347 Author: Lasse Collin -Date: 2018-11-22 17:20:31 +0200 +Date: 2025-01-29 19:53:21 +0200 - xz: Update man page timestamp. + Translations: Update the Spanish translation - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/es.po | 824 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 450 insertions(+), 374 deletions(-) -commit 5a2fc3cd0194e55df329dd29f805299aaca5f32f -Author: Pavel Raiskup -Date: 2018-11-22 15:14:34 +0100 +commit c68318cb49e0562bd22e88724ce85e76c6789a3a +Author: Lasse Collin +Date: 2025-01-29 19:53:06 +0200 - 'have have' typos + Translations: Update the Korean translation - src/xz/signals.c | 2 +- - src/xz/xz.1 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + po/ko.po | 785 +++++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 460 insertions(+), 325 deletions(-) -commit 7143b04fe49390807f355b1dad686a3d8c4dbdcf +commit 153ee17f635962a474499f786ea1de1e1a2bb276 Author: Lasse Collin -Date: 2018-07-27 18:10:44 +0300 +Date: 2025-01-29 19:52:42 +0200 - xzless: Rename unused variables to silence static analysers. - - In this particular case I don't see this affecting readability - of the code. - - Thanks to Pavel Raiskup. + Translations: Update the Romanian man page translations - src/scripts/xzless.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po4a/ro.po | 141 +++++++++++++++++++++++-------------------------------------- + 1 file changed, 54 insertions(+), 87 deletions(-) -commit 273c33297bb69621045ed19665eaf8338bcf4a50 +commit 6ed308197e1f9d6c7a5cfe5aae301e75544017c4 Author: Lasse Collin -Date: 2018-07-27 16:02:58 +0300 +Date: 2025-01-29 19:51:59 +0200 - liblzma: Remove an always-true condition from lzma_index_cat(). - - This should help static analysis tools to see that newg - isn't leaked. - - Thanks to Pavel Raiskup. + Translations: Update the Romanian translation - src/liblzma/common/index.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + po/ro.po | 818 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 461 insertions(+), 357 deletions(-) -commit 65b4aba6d06d2cd24ba9ad01fa389c238ad8f352 +commit 06028803e19219f642aa9abddd3525c43594ec6c Author: Lasse Collin -Date: 2018-05-19 21:23:25 +0300 +Date: 2025-01-29 19:50:50 +0200 - liblzma: Improve lzma_properties_decode() API documentation. + Translations: Update the Ukrainian man page translations - src/liblzma/api/lzma/filter.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + po4a/uk.po | 142 +++++++++++++++++++++++-------------------------------------- + 1 file changed, 54 insertions(+), 88 deletions(-) -commit 531e78e5a253a3e2c4d4dd1505acaccee48f4083 +commit 8cbaf896a65a53c1d1e7e2ffc80d6ea216b1e8df Author: Lasse Collin -Date: 2019-05-01 16:52:36 +0300 +Date: 2025-01-29 19:50:26 +0200 - Update THANKS. + Translations: Update the Ukrainian translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/uk.po | 813 ++++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 460 insertions(+), 353 deletions(-) -commit 905de7e93528ca5a47039e7e1e5270163f9fc67e +commit 81c352907b8048b97d9868947026701a49f377ef Author: Lasse Collin -Date: 2019-05-01 16:43:16 +0300 +Date: 2025-01-29 19:48:43 +0200 - Windows: Update VS version in windows/vs2019/config.h. + Translations: Update the Swedish translation - windows/vs2019/config.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + po/sv.po | 847 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 462 insertions(+), 385 deletions(-) -commit 0ffd30e172fd18cc619823b2a86448bf56a67e22 -Author: Julien Marrec -Date: 2019-04-25 17:44:06 +0200 +commit 999ce263718a52ba74245c3e2a416ab11494d1b1 +Author: Lasse Collin +Date: 2025-01-28 16:33:32 +0200 - Windows: Upgrade solution itself + tuklib_physmem: Clean up disabled code - windows/vs2019/xz_win.sln | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + src/common/tuklib_physmem.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) -commit c2ef96685fc7ca36311649eeb2284b9808292040 -Author: Julien Marrec -Date: 2019-04-25 17:40:24 +0200 +commit 4d7e7c9d94f7a5ad4931a5bbd6ed9d00173fa1ab +Author: Lasse Collin +Date: 2025-01-28 16:28:18 +0200 - Windows: Upgrade solution with VS2019 + Windows: Avoid an error message on broken pipe + + Also make xz not process more input files after a broken pipe has + been detected. This matches the behavior on POSIX. If all files + are being written to standard output, trying with the next file is + pointless when it's known that standard output won't accept more data. + + xzdec already stopped after the first error. It does so with all + errors, so it differs from xz: + + $ xz -dc not_found_1 not_found_2 + xz: not_found_1: No such file or directory + xz: not_found_2: No such file or directory + + $ xzdec not_found_1 not_found_2 + xzdec: not_found_1: No such file or directory + + Reported-by: Vincent Torri - windows/vs2019/liblzma.vcxproj | 15 ++++++++------- - windows/vs2019/liblzma_dll.vcxproj | 15 ++++++++------- - 2 files changed, 16 insertions(+), 14 deletions(-) + src/xz/file_io.c | 13 +++++++++++++ + src/xzdec/xzdec.c | 11 ++++++++++- + 2 files changed, 23 insertions(+), 1 deletion(-) -commit 25fccaf00bea399d8aa026e5b8fa254ce196e6e0 -Author: Julien Marrec -Date: 2019-04-25 17:39:32 +0200 +commit 95b638480aa8203e547c709c651f421c22db1718 +Author: Lasse Collin +Date: 2025-01-23 19:59:17 +0200 - Windows: Duplicate windows/vs2017 before upgrading + doc/SHA256SUMS: Add 5.6.4 and 5.7.1alpha - windows/vs2019/config.h | 148 ++++++++++++++ - windows/vs2019/liblzma.vcxproj | 354 ++++++++++++++++++++++++++++++++++ - windows/vs2019/liblzma_dll.vcxproj | 383 +++++++++++++++++++++++++++++++++++++ - windows/vs2019/xz_win.sln | 48 +++++ - 4 files changed, 933 insertions(+) + doc/SHA256SUMS | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit 1424078d6328291c7c524b64328ce9660617cb24 +commit cdae0df31e4c2dfb1e885941cd1998e5a2b6e39d Author: Lasse Collin -Date: 2019-01-13 17:29:23 +0200 +Date: 2025-01-23 11:50:42 +0200 - 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 - - Thanks to "dom". + Bump version and soname for 5.7.1alpha - windows/INSTALL-MSVC.txt | 4 ++++ - windows/vs2017/liblzma.vcxproj | 1 - - windows/vs2017/liblzma_dll.vcxproj | 1 - - 3 files changed, 4 insertions(+), 2 deletions(-) + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + src/liblzma/liblzma_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) -commit b5be61cc06088bb07f488f9baf7d447ff47b37c1 +commit 4d2af2c43bae25ef4ef9cd88304471d4859aa322 Author: Lasse Collin -Date: 2018-04-29 19:00:06 +0300 +Date: 2025-01-23 11:48:43 +0200 - Bump version and soname for 5.2.4. + Translations: Run po4a/update-po - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + po4a/de.po | 64 +++++++++++++++++++++++++++++++++++++++++++++++++---------- + po4a/fr.po | 57 +++++++++++++++++++++++++++++++++++++++++++++++----- + po4a/ko.po | 64 +++++++++++++++++++++++++++++++++++++++++++++++++---------- + po4a/pt_BR.po | 57 +++++++++++++++++++++++++++++++++++++++++++++++----- + po4a/ro.po | 64 +++++++++++++++++++++++++++++++++++++++++++++++++---------- + po4a/uk.po | 64 +++++++++++++++++++++++++++++++++++++++++++++++++---------- + 6 files changed, 320 insertions(+), 50 deletions(-) -commit c47fa6d06745bb2e99866e76b81ac7a9c5a8bfec +commit ff0b825505e60e21b32e33c42f551c8f34ba393f Author: Lasse Collin -Date: 2018-04-29 18:48:00 +0300 +Date: 2025-01-23 11:40:46 +0200 - extra/scanlzma: Fix compiler warnings. + Add NEWS for 5.7.1alpha - extra/scanlzma/scanlzma.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + NEWS | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 107 insertions(+) -commit 7b350fe21aa4fd6495a3b6188a40e3f1ae7c0edf +commit f6cd3e3bfc8d1f5a76dd55170968bf4582b95baf Author: Lasse Collin -Date: 2018-04-29 18:15:37 +0300 +Date: 2025-01-23 11:40:46 +0200 - Add NEWS for 5.2.4. + Add NEWS for 5.6.4 - NEWS | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) + NEWS | 45 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 45 insertions(+) -commit 5801591162a280aa52d156dfde42c531ec7fd8b6 +commit b3af3297e4d6cf0eafb48155aa97bb06c82a9228 Author: Lasse Collin -Date: 2018-02-06 19:36:30 +0200 +Date: 2025-01-23 11:40:46 +0200 - Update THANKS. + NEWS: The security fix in 5.6.3 is known as CVE-2024-47611 - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + NEWS | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit c4a616f4536146f8906e1b4412eefeec07b28fae -Author: Ben Boeckel -Date: 2018-01-29 13:58:18 -0500 +commit a04b9dd0c7c74fabd8c393d2dc68a221276d6e29 +Author: Lasse Collin +Date: 2025-01-22 16:55:09 +0200 - nothrow: use noexcept for C++11 and newer + windows/build.bash: Fix error message - In C++11, the `throw()` specifier is deprecated and `noexcept` is - preffered instead. + Fixes: 1ee716f74085223c8fbcae1d5a384e6bf53c0f6a - src/liblzma/api/lzma.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + windows/build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 0b8947782ff3c5ef830a7f85412e44dcf3cdeb77 +commit 4eae859ae8ad7072eaa74aeaee79a2c3c12c55cb Author: Lasse Collin -Date: 2018-02-06 18:02:48 +0200 +Date: 2025-01-22 15:03:55 +0200 - liblzma: Remove incorrect #ifdef from range_common.h. + Windows: Disable MinGW-w64's stdio functions in size-optimized builds - In most cases it was harmless but it could affect some - custom build systems. + This only affects builds with UCRT. With legacy MSVCRT, the replacement + functions are always enabled. - Thanks to Pippijn van Steenhoven. - - src/liblzma/rangecoder/range_common.h | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 48f3b9f73ffea7f55d5678997aba0e79d2e82168 -Author: Lasse Collin -Date: 2018-01-10 22:10:39 +0200 - - Update THANKS. + Omitting the MinGW-w64 replacements saves over 20 KiB per executable. + The downside is that --enable-small or XZ_SMALL=ON disables thousand + separator support in xz messages. If someone is OK with the slower + speed of slightly smaller builds, lack of thousand separators won't + matter. + + Don't override __USE_MINGW_ANSI_STDIO if it is already defined (via + CPPFLAGS or such method). - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/common/sysdefs.h | 30 +++++++++++++++++++++--------- + src/xz/util.c | 6 +++++- + 2 files changed, 26 insertions(+), 10 deletions(-) -commit a3ce3e902342be37c626a561ce3d9ffcf27d0f94 +commit a831bc185bdd44c06847eae8df2d35cc281f65da Author: Lasse Collin -Date: 2018-01-10 21:54:27 +0200 +Date: 2025-01-20 16:44:27 +0200 - tuklib_integer: New Intel C compiler needs immintrin.h. + liblzma: Add raw ARM64, RISC-V, and x86 BCJ filter APIs - Thanks to Melanie Blower (Intel) for the patch. + Put them behind the LZMA_UNSTABLE macro for now. + + These low-level special APIs might become useful in erofs-utils. - src/common/tuklib_integer.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + src/liblzma/api/lzma/bcj.h | 99 +++++++++++++++++++++++++++++++++++++++++ + src/liblzma/common/common.h | 2 + + src/liblzma/liblzma_generic.map | 10 +++++ + src/liblzma/liblzma_linux.map | 10 +++++ + src/liblzma/simple/arm64.c | 18 ++++++++ + src/liblzma/simple/riscv.c | 18 ++++++++ + src/liblzma/simple/x86.c | 24 ++++++++++ + 7 files changed, 181 insertions(+) -commit 4505ca483985f88c6923c05a43b4327feaab83b1 +commit 6f5cdd4534faf7db4b6c123651d6a606bc59b98c Author: Lasse Collin -Date: 2017-09-24 20:04:24 +0300 +Date: 2025-01-20 16:31:49 +0200 - Update THANKS. + xz: Unify a few strings with liblzma + + Avoid having both "%s: foo" and "foo" as translatable strings + so that translators don't need to handle it twice. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/options.c | 11 ++++++----- + src/xz/util.c | 4 ++-- + 2 files changed, 8 insertions(+), 7 deletions(-) -commit 1ef3cc226e3ce173575c218238b71a4eecabc470 +commit 713fdaa8b06a83f18b06811aba7b9bd7b7cbf1cb Author: Lasse Collin -Date: 2017-09-16 20:36:20 +0300 +Date: 2025-01-20 16:31:49 +0200 - Windows: Fix paths in VS project files. + xz: Translate error messages from lzma_str_to_filters() - Some paths use slashes instead of backslashes as directory - separators... now it should work (I tested VS2013 version). + liblzma doesn't use gettext but the messages are included in xz.pot, + so xz can translate the messages. - 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/coder.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) -commit e775d2a8189d24f60470e6e49d8af881df3a1680 +commit f2e2b267cab8d7aa0b0a58c325546ee5070c0028 Author: Lasse Collin -Date: 2017-09-16 12:54:23 +0300 +Date: 2025-01-20 16:31:49 +0200 - Windows: Add project files for VS2017. - - These files match the v5.2 branch (no file info decoder). + liblzma: Mark string conversion messages as translatable - 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(+) + po/POTFILES.in | 1 + + src/liblzma/common/string_conversion.c | 96 ++++++++++++++++++++-------------- + 2 files changed, 59 insertions(+), 38 deletions(-) -commit 10e02e0fbb6e2173f8b41f6e39b7b570f47dd74d +commit f49d7413d9a0d480ded6d448c1ef7475ae6cd1c9 Author: Lasse Collin -Date: 2017-09-16 12:39:43 +0300 +Date: 2025-01-20 16:31:35 +0200 - Windows: Move VS2013 files into windows/vs2013 directory. + liblzma: Tweak a few error messages in lzma_str_to_filters() - 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/common/string_conversion.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) -commit 06eebd4543196ded36fa9b8b9544195b38b24ef2 +commit da359c360e986b21cd8d7b888c6a80f56b9d49c7 Author: Lasse Collin -Date: 2017-08-14 20:08:33 +0300 +Date: 2025-01-19 20:11:54 +0200 - Fix or hide warnings from GCC 7's -Wimplicit-fallthrough. + Update THANKS - src/liblzma/lzma/lzma_decoder.c | 6 ++++++ - src/xz/list.c | 2 ++ - 2 files changed, 8 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit ea4ea1dffafebaa8b2770bf3eca46900e4dd22dc -Author: Alexey Tourbin -Date: 2017-05-16 23:56:35 +0300 +commit f032373561cefaf07f92ffe3fbc471ec6770456e +Author: Lasse Collin +Date: 2025-01-19 19:40:32 +0200 - Docs: Fix a typo in a comment in doc/examples/02_decompress.c. + Update THANKS - doc/examples/02_decompress.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit eb2ef4c79bf405ea0d215f3b1df3d0eaf5e1d27b +commit 51f038f8cbd5d8a95954c05bfcbbc32f2a313615 Author: Lasse Collin -Date: 2017-05-23 18:34:43 +0300 +Date: 2025-01-13 08:44:58 +0200 - xz: Fix "xz --list --robot missing_or_bad_file.xz". + liblzma: memcmplen.h: Use 8-byte method on 64-bit unaligned archs - It ended up printing an uninitialized char-array when trying to - print the check names (column 7) on the "totals" line. + Previously it was enabled only on x86-64 and ARM64 when also support + for unaligned access was detected or manually enabled at built time. - 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. + In the default build configuration, the 8-byte method is now enabled + also on 64-bit RISC-V and 64-bit PowerPC (both endiannesses). It was + reported that on big endian POWER9, encoding time may reduce 12-13 %. - Thanks to kidmin for the bug report. + This change only affects builds with GCC and Clang because the code + uses __builtin_ctzll or __builtin_clzll. + + Thanks to Marcus Comstedt for testing on POWER9. - src/xz/list.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + src/liblzma/common/memcmplen.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit 3ea5dbd9b0d79048e336e40cef3b6d814fb74e13 +commit 96336b0110d47756a9fd2a103fbf0a99e905fbed Author: Lasse Collin -Date: 2017-04-24 19:48:47 +0300 +Date: 2025-01-12 13:06:17 +0200 - Build: Omit pre-5.0.0 entries from the generated ChangeLog. - - It makes ChangeLog significantly smaller. + Update THANKS - Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit bae24675936df99064de1502593c006bd902594b +commit 150356207c8d6a3e0af465b676430d19d62f884c Author: Lasse Collin -Date: 2017-04-24 19:30:22 +0300 +Date: 2025-01-12 12:59:20 +0200 - Update the Git repository URL to HTTPS in ChangeLog. + liblzma: Fix the encoder breakage on big endian ARM64 + + When the 8-byte method was enabled for ARM64, a check for endianness + wasn't added. This broke the LZMA/LZMA2 encoder. Test suite caught it. + + Fixes: cd64dd70d5665b6048829c45772d08606f44672e + Co-authored-by: Marcus Comstedt - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/common/memcmplen.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -commit 70f479211973b5361f4d7cb08ba5be69b4266e7a +commit b01b0958025a2da284b53a583f313f8140636cb5 Author: Lasse Collin -Date: 2017-04-19 22:17:35 +0300 +Date: 2025-01-12 11:04:27 +0200 - Update the home page URLs to HTTPS. + Windows: Update manifest comments about long UTF-8 filenames - 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(-) + src/common/w32_application.manifest.comments.txt | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) -commit 2a4b2fa75d06a097261a02ecd3cf2b6d449bf754 +commit 0dfc67d37ebb038be8a9b17b536d1b561d52e81a Author: Lasse Collin -Date: 2017-03-30 22:01:54 +0300 +Date: 2025-01-12 10:47:58 +0200 - xz: Use POSIX_FADV_RANDOM for in "xz --list" mode. + Windows: Update build.bash and its README-Windows.txt to UCRT - xz --list is random access so POSIX_FADV_SEQUENTIAL was clearly - wrong. + While MSVCRT builds are possible, UCRT works better with UTF-8. + A 32-bit build is included still but hopefully it's not actually + needed anymore. - src/xz/file_io.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + windows/README-Windows.txt | 17 ++++++++--------- + windows/build.bash | 20 ++++++++++++++------ + 2 files changed, 22 insertions(+), 15 deletions(-) -commit eb25743ade39170cffd9566a1aae272098cce216 +commit 7b3eb2db6c4ba24b5eb438e58ab1ca57e14e59c2 Author: Lasse Collin -Date: 2017-03-30 19:47:45 +0300 +Date: 2025-01-10 13:11:40 +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. + Translations: Update Serbian translation - 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(). - - 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. + I rewrapped a few overlong lines. Those edits aren't in the + Translation Project. Automatic wrapping in the master branch + means that these strings need to be updated soon anyway. - 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(-) + po/sr.po | 346 ++++++++++++++++++++++----------------------------------------- + 1 file changed, 121 insertions(+), 225 deletions(-) -commit ef36c6362f3f3853f21b8a6359bcd06576ebf207 +commit 950da11ce09c90412dcbca29689575037640667a Author: Lasse Collin -Date: 2017-03-30 19:16:55 +0300 +Date: 2025-01-08 19:26:29 +0200 - liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder. + Build: Use --sort=name in TAR_OPTIONS + + Use also LC_COLLATE=C to make the sorting locale-independent. + Sorting makes the file order reproducible. - 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(-) + Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 57616032650f03840480b696d7878acdd2065521 +commit 75d91d6b39ea3e2fae8f027dcec01be2dca9594d Author: Lasse Collin -Date: 2017-03-30 18:58:18 +0300 +Date: 2025-01-08 19:08:08 +0200 - liblzma: Fix handling of memlimit == 0 in lzma_index_decoder(). + xz: Workaround broken O_SEARCH in musl - 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. + Testing with musl 1.2.5 and Linux 6.12, O_SEARCH doesn't result + in a file descriptor that works with fsync() although it should work. + See the added comment. - 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. + The same issue affected gzip --synchronous: - 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 3d566cd519017eee1a400e7961ff14058dfaf33c -Author: Lasse Collin -Date: 2016-12-30 13:26:36 +0200 - - Bump version and soname for 5.2.3. + https://bugs.gnu.org/75405 + + Thanks to Paul Eggert. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xz/file_io.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 053e624fe33795e779ff736f16ce44a129c829b5 +commit ea92eae122a3ccefa61087f84fd99b417fc9ee3c Author: Lasse Collin -Date: 2016-12-30 13:25:10 +0200 +Date: 2025-01-07 21:34:33 +0200 - Update NEWS for 5.2.3. + Revert "xz: O_SEARCH cannot be used for fsync()" + + This reverts commit 4014e2479c7b0273f15bd0c9c017c5fe859b0d8f. + + POSIX-conforming O_SEARCH should allow fsync(). - NEWS | 39 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) + src/xz/file_io.c | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) -commit cae412b2b77d7fd88d187ed7659331709311f80d +commit 4014e2479c7b0273f15bd0c9c017c5fe859b0d8f Author: Lasse Collin -Date: 2015-04-01 14:45:25 +0300 +Date: 2025-01-05 21:43:11 +0200 - xz: Fix the Capsicum rights on user_abort_pipe. + xz: O_SEARCH cannot be used for fsync() + + Opening a directory with O_SEARCH results in a file descriptor that can + be used with functions like openat(). Such a file descriptor cannot be + used with fsync(). Use O_RDONLY instead. + + In musl, O_SEARCH becomes Linux-specific O_PATH. A file descriptor + from O_PATH doesn't allow fsync(). + + Seems that it's not possible to fsync() a directory that has write + and search permissions but not read permission. + + Fixes: 2a9e91d796d091740489d951fa7780525e4275f1 - src/xz/file_io.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/xz/file_io.c | 21 ++++++++++----------- + 1 file changed, 10 insertions(+), 11 deletions(-) -commit 9ccbae41000572193b9a09e7102f9e84dc6d96de +commit ad2b57cb477b753293c25a01fc24c7f84ee523c2 Author: Lasse Collin -Date: 2016-12-28 21:05:22 +0200 - - Mention potential sandboxing bugs in INSTALL. +Date: 2025-01-05 20:48:28 +0200 - INSTALL | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + CI: Make ctest show errors from failed tests -commit e013a337d3de77cce24360dffe956ea2339489b6 -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 8e0f1af3dcaec00a3879cce8ad7441edc6359d1c -Author: Lasse Collin -Date: 2016-12-26 20:50:25 +0200 - - Document --enable-sandbox configure option in INSTALL. - - INSTALL | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) + build-aux/ci_build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit ce2542d220de06acd618fd9f5c0a6683029fb4eb +commit c405264c031aceaf68dfd1546d6337afcebd48e5 Author: Lasse Collin -Date: 2015-03-31 22:19:34 +0300 +Date: 2025-01-05 20:14:49 +0200 - xz: Add support for sandboxing with Capsicum (disabled by default). - - In the v5.2 branch this feature is considered experimental - and thus disabled by default. + tuklib_mbstr_nonprint: Preserve the value of errno - 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. + A typical use case is like this: - 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. + printf("%s: %s\n", tuklib_mask_nonprint(filename), strerror(errno)); - Currently Capsicum is available on FreeBSD 10 and later - and there is a port to Linux too. + tuklib_mask_nonprint() may call mbrtowc() and malloc() which may modify + errno. If errno isn't preserved, the error message might be wrong if + a compiler decides to call tuklib_mask_nonprint() before strerror(). - Thanks to Loganaden Velvindron for help. + Fixes: 40e573305535960574404d2eae848b248c95ea7e - 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(-) + src/common/tuklib_mbstr_nonprint.c | 17 ++++++++++++++--- + src/common/tuklib_mbstr_nonprint.h | 4 +++- + 2 files changed, 17 insertions(+), 4 deletions(-) -commit 3ca1d5e6320111043e19434da881065fadafa0e4 +commit 2a9e91d796d091740489d951fa7780525e4275f1 Author: Lasse Collin -Date: 2015-03-31 21:12:30 +0300 +Date: 2025-01-05 20:14:49 +0200 - Fix bugs and otherwise improve ax_check_capsicum.m4. + xz: Use fsync() before deleting the input file, and add --no-sync - AU_ALIAS was removed because the new version is incompatible - with the old version. + xz's default behavior is to delete the input file after successful + compression or decompression (unless writing to standard output). + If the system crashes soon after the deletion, it is possible that + the newly written file has not yet hit the disk while the previous + delete operation might have. In that case neither the original file + nor the written file is available. - 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. + Call fsync() on the file. On POSIX systems, sync also the directory + where the file was created. - It no longer does a useless search for the Capsicum library - if the header wasn't found. + Add a new option --no-sync which disables fsync() usage. It can avoid + a (possibly significant) performance penalty when processing many + small files. It's fine to use --no-sync when one knows that the files + are easy to recreate or restore after a system crash. - 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. + Using fsync() after every flush initiated by --flush-timeout was + considered. It wasn't implemented at least for now. - 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. + - --flush-timeout is typically used when writing to stdout. If stdout + is a file, xz cannot (portably) sync the directory of the file. + One would need to create the output file first, sync the directory, + and then run xz with fsync() enabled. - The documentation was updated. + - If xz --flush-timeout output goes to a file, it's possible to use + a separate script to sync the file, for example, once per minute + while telling xz to flush more frequently. - Since there as no serial number, "#serial 2" was added. - - m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------ - 1 file changed, 51 insertions(+), 52 deletions(-) - -commit 5f3a742b64197fe8bedb6f05fc6ce5d177d11145 -Author: Lasse Collin -Date: 2015-03-31 19:20:24 +0300 - - Add m4/ax_check_capsicum.m4 for detecting Capsicum support. + - Not supporting syncing with --flush-timeout was simpler. - The file was loaded from this web page: - https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4 + Portability notes: - Thanks to Loganaden Velvindron for pointing it out for me. - - m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 86 insertions(+) - -commit d74377e62b4c649e40294dd441de72c0f092e67c -Author: Lasse Collin -Date: 2015-10-12 20:29:09 +0300 - - liblzma: Fix a memory leak in error path of lzma_index_dup(). + - On systems that lack O_SEARCH (like Linux), "xz dir/file" will now + fail if "dir" cannot be opened for reading. If "dir" still has + write and search permissions (like d-wx------ in "ls -l"), + previously xz would have been able to compress "dir/file" still. + Now it only works if using --no-sync (or --keep or --stdout). - 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(). + - and dirname() should be available on all POSIX systems, + and aren't needed on non-POSIX systems. - Thanks to Evan Nemerson for the bug report. + - fsync() is available on all POSIX systems. The directory syncing + could be changed to fdatasync() although at least on ext4 it + doesn't seem to make a performance difference in xz's usage. + fdatasync() would need a build system check to support (old) + special cases, for example, MINIX 3.3.0 doesn't have fdatasync() + and Solaris 10 needs -lrt. + + - On native Windows, _commit() is used to replace fsync(). Directory + syncing isn't done and shouldn't be needed. (In Cygwin, fsync() on + directories is a no-op.) + + - DJGPP has fsync() for files. ;-) + + Using fsync() was considered somewhere around 2009 and again in 2016 but + those times the idea was rejected. For comparison, GNU gzip 1.7 (2016) + added the option --synchronous which enables fsync(). + + Co-authored-by: Sebastian Andrzej Siewior + Fixes: https://bugs.debian.org/814089 + Link: https://www.mail-archive.com/xz-devel@tukaani.org/msg00282.html + Closes: https://github.com/tukaani-project/xz/pull/151 - src/liblzma/common/index.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) + src/xz/args.c | 14 ++++++ + src/xz/args.h | 2 +- + src/xz/file_io.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- + src/xz/file_io.h | 6 +++ + src/xz/message.c | 3 ++ + src/xz/sandbox.c | 5 ++- + src/xz/xz.1 | 24 ++++++++++- + 7 files changed, 177 insertions(+), 6 deletions(-) -commit f580732216dcf971f3f006fe8e01cd4979e1d964 +commit 2e28c7145747b3287283f13c9d2becd73a7c4a1f Author: Lasse Collin -Date: 2016-10-24 18:53:25 +0300 +Date: 2024-12-27 09:15:50 +0200 - Update THANKS. + xz: Use "goto" for error handling in io_open_dest_real() - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/file_io.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) -commit 88d7a7fd153bf1355cdf798ffdac7443d0169afc +commit 75107217670a97b7b772833669d88c3c2f188e37 Author: Lasse Collin -Date: 2016-10-24 18:51:36 +0300 +Date: 2025-01-05 12:10:05 +0200 - tuklib_cpucores: Add support for sched_getaffinity(). + liblzma: Always validate the first digit of a preset string + + lzma_str_to_filters() may call parse_lzma12_preset() in two ways. The + call from str_to_filters() detects the string type from the first + character(s) and as a side-effect it validates the first digit of + the preset string. So this change makes no difference there. + + However, the call from parse_options() doesn't pre-validate the string. + parse_lzma12_preset() will return an invalid value which is passed to + lzma_lzma_preset() which safely rejects it. The bug still affects the + the error message: + + $ xz --filters=lzma2:preset=X + xz: Error in --filters=FILTERS option: + xz: lzma2:preset=X + xz: ^ + xz: Unsupported preset - 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. + After the fix: - 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. + $ xz --filters=lzma2:preset=X + xz: Error in --filters=FILTERS option: + xz: lzma2:preset=X + xz: ^ + xz: Unsupported preset - Thanks to Sebastian Andrzej Siewior for the original patch - and testing. + The ^ now correctly points to the X and not past it because the X itself + is the problematic character. + + Fixes: cedeeca2ea6ada5b0411b2ae10d7a859e837f203 - m4/tuklib_cpucores.m4 | 30 +++++++++++++++++++++++++++++- - src/common/tuklib_cpucores.c | 9 +++++++++ - 2 files changed, 38 insertions(+), 1 deletion(-) + src/liblzma/common/string_conversion.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit 51baf684376903dbeddd840582bfdf9fa91b311b +commit 52ff32433734d03befd85a5bf00fba77d6501455 Author: Lasse Collin -Date: 2016-06-30 20:27:36 +0300 +Date: 2025-01-05 11:40:34 +0200 - xz: Fix copying of timestamps on Windows. + xz: Fix getopt_long argument type in --filters* + + Forgetting the argument (or not using = to separate the option from + the argument) resulted in lzma_str_to_filters() being called with NULL + as input string argument. The function handles it fine but xz passes + the NULL to printf() too: + + $ xz --filters + xz: Error in --filters=FILTERS option: + xz: (null) + xz: ^ + xz: Unexpected NULL pointer argument(s) to lzma_str_to_filters() - xz used to call utime() on Windows, but its result gets lost - on close(). Using _futime() seems to work. + Now it's correct: - Thanks to Martok for reporting the bug: - http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html + $ xz --filters + xz: option '--filters' requires an argument + + The --filters-help option doesn't take any arguments. + + Fixes: 9ded880a0221f4d1256845fc4ab957ffd377c760 + Fixes: d6af7f347077b22403133239592e478931307759 + Fixes: a165d7df1964121eb9df715e6f836a31c865beef - configure.ac | 2 +- - src/xz/file_io.c | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) + src/xz/args.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) -commit 1ddc479851139d6e8202e5835421bfe6578d9e07 +commit 2655c81b5e92278b0fd51f6537c1116f8349b02a Author: Lasse Collin -Date: 2016-06-16 22:46:02 +0300 +Date: 2025-01-04 20:04:56 +0200 - xz: Silence warnings from -Wlogical-op. + xzdec: Don't leave Landlock file descriptor open for no reason + + This fix is similar to 48ff3f06521ca326996ab9a04d1b342098960427. - Thanks to Evan Nemerson. + Fixes: d74fb5f060b76db709b50f5fd37490394e52f975 - src/xz/file_io.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + src/xzdec/xzdec.c | 2 ++ + 1 file changed, 2 insertions(+) -commit be647ff5ed5a1c244a65722af6ce250259f3b14a +commit 35df4c2bc0500e60ba9d0d163d37a6d110d6841e Author: Lasse Collin -Date: 2016-04-10 20:55:49 +0300 +Date: 2025-01-04 20:02:18 +0200 - Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am. + xz: Make --single-stream imply --keep - Thanks to Christian Kujau. + Suggested by xx on #tukaani on 2024-04-12. - src/xz/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 3 +++ + src/xz/xz.1 | 9 ++++++++- + 2 files changed, 11 insertions(+), 1 deletion(-) -commit fb6d50c15343831f35305982cefa82053099191d +commit 6f412814a8019700248229ce972530159a0d9872 Author: Lasse Collin -Date: 2016-04-10 20:54:17 +0300 +Date: 2025-01-04 19:57:07 +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. + Update AUTHORS - Thanks to Christian Kujau. + The contributions have been rewritten. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + AUTHORS | 2 +- + src/liblzma/check/crc32_arm64.h | 1 - + src/liblzma/check/crc32_fast.c | 1 - + src/liblzma/check/crc_common.h | 1 - + 4 files changed, 1 insertion(+), 4 deletions(-) -commit 74f8dad9f912a2993768d93d108ea2b0b2c196e0 +commit 5651d153031a7ee2581cdba9bff658031826cb50 Author: Lasse Collin -Date: 2016-03-13 20:21:49 +0200 +Date: 2025-01-04 15:02:16 +0200 - liblzma: Disable external SHA-256 by default. + xz: Avoid printf formats like %2$s - 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. + It's a POSIX feature that isn't in standard C. It's not available on + Windows. Even MinGW-w64 with __USE_MINGW_ANSI_STDIO doesn't support + it even though it supports POSIX %'d for thousand separators. - 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. + Gettext's provides overrides for printf and other functions + which do support the %2$s formats. Translations use them. But xz should + work on Windows without too. - 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. + Fixes: 3e9177fd206d20d6d8acc7d203c25a9ae0549229 - INSTALL | 36 ++++++++++++++++++++++ - configure.ac | 76 +++++++++++++++++++++++------------------------ - src/liblzma/check/check.h | 16 ++++------ - 3 files changed, 79 insertions(+), 49 deletions(-) + src/xz/message.c | 51 ++++++++++++++++++++++++++++++++------------------- + 1 file changed, 32 insertions(+), 19 deletions(-) -commit ea7f6ff04cb5bb1498088eb09960a4c3f13dfe39 +commit 63b246c90e7677c617faab1d3f6fc5c643b5e7cf Author: Lasse Collin -Date: 2016-03-10 20:27:05 +0200 +Date: 2025-01-04 14:41:37 +0200 - Update THANKS. + tuklib_mbstr_wrap: Add printf format attribute + + It's supported by GCC 3.x already. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/common/tuklib_common.h | 7 +++++++ + src/common/tuklib_mbstr_wrap.h | 1 + + 2 files changed, 8 insertions(+) -commit d0e018016b311232e82d9a98dc68f1e3dabce794 +commit a7313c01d9b8db71ffb61dc1dd7c4ea928824b4b Author: Lasse Collin -Date: 2016-03-10 20:26:49 +0200 +Date: 2025-01-04 13:44:12 +0200 - Build: Avoid SHA256_Init on FreeBSD and MINIX 3. + xz: Translate a Windows-specific string - 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. + Originally I thought that native Windows builds wouldn't be translated + but nowadays at least MSYS2 ships such binaries. - configure.ac | 27 +++++++++++++++++++++------ - 1 file changed, 21 insertions(+), 6 deletions(-) + src/xz/file_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5daae123915f32a4ed6dc948b831533c2d1beec3 +commit 00eb6073c088be9e7516dfc00a13ef520827b57c Author: Lasse Collin -Date: 2015-11-08 20:16:10 +0200 +Date: 2025-01-02 15:32:10 +0200 - tuklib_physmem: Hopefully silence a warning on Windows. + xz: Use my_landlock.h + + A slightly silly thing is that xz may now query the ABI version up to + three times. We could call my_landlock_ruleset_attr_forbid_all() only + once and cache the result but it didn't seem worth doing. - src/common/tuklib_physmem.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 1 + + src/xz/sandbox.c | 72 ++++++++++---------------------------------------------- + 2 files changed, 13 insertions(+), 60 deletions(-) -commit 491acc406e098167ccb7fce0728b94c2f32cff9f +commit 0fc5a625d7cc4ad51fde9367de088b9ad3bd40f6 Author: Lasse Collin -Date: 2015-11-04 23:17:43 +0200 +Date: 2025-01-02 15:32:10 +0200 - Update THANKS. + xzdec: Use my_landlock.h - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 1 + + src/xzdec/xzdec.c | 34 ++++++---------------------------- + 2 files changed, 7 insertions(+), 28 deletions(-) -commit 8173ff8790ad3502d04e1c07d014cb84a3b8187b +commit 38cb8ec9fd70d25fca6b473de44cf61586238552 Author: Lasse Collin -Date: 2015-11-04 23:14:00 +0200 +Date: 2025-01-02 15:32:10 +0200 - liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma. + Add my_landlock.h with helper functions to use Linux Landlock - 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. - - Thanks to Rich Prohaska. I remember this being mentioned long - ago by someone else but nothing was done back then. + This supports up to Landlock ABI version 6. The current code in + xz and xzdec only support up to ABI version 4. - src/liblzma/lz/lz_encoder.c | 4 ++++ - 1 file changed, 4 insertions(+) + src/Makefile.am | 1 + + src/common/my_landlock.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 142 insertions(+) -commit 013de2b5ab8094d2c82a2771f3d143eeb656eda9 +commit 672da29bb3a209a727ae46c0df948d7eea69f2e2 Author: Lasse Collin -Date: 2015-11-03 20:55:45 +0200 +Date: 2025-01-01 18:46:50 +0200 - liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c. - - It would be too annoying to update other build systems - just because of this. + liblzma: Silence warnings from "clang -Wimplicit-fallthrough" - src/liblzma/lzma/Makefile.inc | 2 +- - src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/liblzma/lzma/lzma_decoder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit a322f70ad96de88968c2c36e6a36bc08ae30bd20 +commit 1a8a1ad9a1e3179ce267baa551fb17b30624b4dd Author: Lasse Collin -Date: 2015-11-03 20:47:07 +0200 +Date: 2025-01-01 15:34:51 +0200 - Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built. + Build: Use -Wimplicit-fallthrough=5 when supported + + Now that we have the FALLTHROUGH macro, use the strictest mode with + GCC so that comment-based fallthrough markings are no longer accepted. - They all need decoder support and if that isn't available, - there's no point trying to build them. + In GCC, -Wextra includes -Wimplicit-fallthrough=3 and + -Wimplicit-fallthrough is the same as -Wimplicit-fallthrough=3. + Thus, the strict mode requires specifying -Wimplicit-fallthrough=5. + + Clang has -Wimplicit-fallthrough which is *not* enabled by -Wextra. + Clang doesn't have a variant that takes an argument. Thus we need + to check for -Wimplicit-fallthrough. Do it before checking for + -Wimplicit-fallthrough=5 so that the latter overrides the former + when using GCC. - configure.ac | 3 +++ - 1 file changed, 3 insertions(+) + CMakeLists.txt | 2 ++ + configure.ac | 2 ++ + 2 files changed, 4 insertions(+) -commit 8ea49606cf6427e32319de7693eca9e43f1c8ad6 +commit 94adc996e45cc5cad9352cc3271d3a1a2f5c4c22 Author: Lasse Collin -Date: 2015-11-03 20:35:19 +0200 +Date: 2025-01-01 15:30:50 +0200 - Build: Simplify $enable_{encoders,decoders} usage a bit. + Replace "Fall through" comments with FALLTHROUGH - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + src/liblzma/common/alone_decoder.c | 3 +-- + src/liblzma/common/auto_decoder.c | 5 ++--- + src/liblzma/common/block_decoder.c | 6 ++---- + src/liblzma/common/block_encoder.c | 6 ++---- + src/liblzma/common/common.c | 2 +- + src/liblzma/common/file_info.c | 22 +++++++++------------- + src/liblzma/common/index_decoder.c | 9 +++------ + src/liblzma/common/index_encoder.c | 6 ++---- + src/liblzma/common/index_hash.c | 7 +++---- + src/liblzma/common/lzip_decoder.c | 14 +++++--------- + src/liblzma/common/stream_decoder.c | 16 ++++++---------- + src/liblzma/common/stream_decoder_mt.c | 25 +++++++++---------------- + src/liblzma/common/stream_encoder_mt.c | 10 ++++------ + src/liblzma/lzma/lzma2_encoder.c | 9 +++------ + src/xz/args.c | 2 +- + src/xz/list.c | 3 +-- + 16 files changed, 54 insertions(+), 91 deletions(-) -commit 42131a25e52bfe400acfa7df93469a96bb78bb78 +commit f31c3a6647b5a5d056324a9c83e6b2c940ebec22 Author: Lasse Collin -Date: 2015-11-03 20:31:31 +0200 +Date: 2025-01-01 15:08:51 +0200 - Windows/MSVC: Update config.h. + sysdefs.h: Add FALLTHROUGH macro - windows/config.h | 6 ++++++ - 1 file changed, 6 insertions(+) + src/common/sysdefs.h | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit e9184e87cc989d14c7413e6adb3eca98f6ae0290 +commit e34dbd6a0ae7a560a5508d51fc0bd142c5a320dc Author: Lasse Collin -Date: 2015-11-03 20:29:58 +0200 +Date: 2025-01-01 15:06:15 +0200 - DOS: Update config.h. + xzdec: Fix language in a comment - dos/config.h | 6 ++++++ - 1 file changed, 6 insertions(+) + src/xzdec/xzdec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 2296778f3c9a1e3a8699973b09dd3610b8baa402 +commit 16821252c504071f5c2012e415e59cbf5fb79820 Author: Lasse Collin -Date: 2015-11-03 20:29:33 +0200 +Date: 2025-01-02 13:35:48 +0200 - 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. + Windows: Make NLS require UCRT and gettext-runtime >= 0.23.1 - This adds two new #defines to config.h: HAVE_ENCODERS and - HAVE_DECODERS. + Also remove the recently-added workaround from tuklib_gettext.h. + Requiring a new enough gettext-runtime is cleaner. I guess it's + mostly MSYS2 where xz is built with translation support, so once + MSYS2 has Gettext >= 0.23.1, this requirement shouldn't be a problem + in practice. - 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(-) + CMakeLists.txt | 29 ++++++++++++++++++++++++++ + configure.ac | 29 ++++++++++++++++++++++++++ + src/common/tuklib_gettext.h | 51 --------------------------------------------- + 3 files changed, 58 insertions(+), 51 deletions(-) -commit 97a3109281e475d9cf1b5095237d672fa0ad25e5 +commit aa1807ed942579f700a08ab091b796cf04e31aec Author: Lasse Collin -Date: 2015-11-03 18:06:40 +0200 +Date: 2025-01-02 11:52:17 +0200 - Build: Build LZMA1/2 presets also when only decoder is wanted. + windows/build-with-cmake.bat: Fix ENABLE_NLS to XZ_NLS - 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. - - lzma_encocder_presets.c was renamed to lzma_presets.c to - make it clear it's not used solely by the encoder code. + Fixes: 29f77c7b707f2458fb047e77497354b195e05b14 - src/liblzma/lzma/Makefile.inc | 6 +++++- - src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++- - 2 files changed, 7 insertions(+), 2 deletions(-) + windows/build-with-cmake.bat | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit dc6b78d7f0f6fe43e9d4215146e8581feb8090e7 +commit ea21c76aa2406ba06ac154fe57741734c04f260f Author: Lasse Collin -Date: 2015-11-03 17:54:48 +0200 +Date: 2024-12-30 11:21:57 +0200 - Build: Fix configure to handle LZMA1 dependency with LZMA2. + Build: Use git log --pretty=medium when creating ChangeLog - 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. + It's the default in git-log. Specifying it explicitly is good in case + a user has set format.pretty to a different value. - configure.ac | 5 ----- - 1 file changed, 5 deletions(-) + Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 46d76c9cd3cb26a31f5ae6c3a8bbcf38e6da1add +commit 08050c0788ce5bac0ffd572e9784a2749c4a13df Author: Lasse Collin -Date: 2015-11-03 17:41:54 +0200 +Date: 2024-12-30 10:51:33 +0200 - Build: Don't omit lzma_cputhreads() unless using --disable-threads. - - Previously it was omitted if encoders were disabled - with --disable-encoders. It didn't make sense and - it also broke the build. + Windows: Update MinGW-w64 + CMake instructions to recommend UCRT - src/liblzma/common/Makefile.inc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + windows/INSTALL-MinGW-w64_with_CMake.txt | 38 +++++++++++++++++++------------- + 1 file changed, 23 insertions(+), 15 deletions(-) -commit 16d68f874d89f1e4a1919786a35bbaef7d71a077 +commit 653732bd6f06d8f465bf353bf6e1c16f1405b906 Author: Lasse Collin -Date: 2015-11-02 18:16:51 +0200 +Date: 2024-12-30 10:51:26 +0200 - liblzma: Fix a build failure related to external SHA-256 support. + xz man page: Describe the source file deletion in -z and -d options + + The DESCRIPTION section always explained it, and the OPTIONS section + only described the differences to the default behavior. However, new + users in a hurry may skip reading DESCRIPTION. The default behavior + is a bit dangerous, thus it's good to repeat in --compress and + --decompress docs that source file is removed after successful operation. - If an appropriate header and structure were found by configure, - but a library with a usable SHA-256 functions wasn't, the build - failed. + Fixes: https://github.com/tukaani-project/xz/issues/150 - src/liblzma/check/check.h | 32 +++++++++++++++++++++++--------- - 1 file changed, 23 insertions(+), 9 deletions(-) + src/xz/xz.1 | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) -commit d9311647fc1ab512a3394596221ab8039c00af6b +commit bb79f79b278fd4fb06a0bcd5ab3445c468f9baaf Author: Lasse Collin -Date: 2015-11-02 15:19:10 +0200 +Date: 2024-12-27 21:52:28 +0200 - xz: Always close the file before trying to delete it. + Build: Set libtool -version-info so that it matches with CMake - unlink() can return EBUSY in errno for open files on some - operating systems and file systems. + In the past, they haven't been in sync in development versions + although they (of course) have been in stable releases. - src/xz/file_io.c | 25 ++++++++++++------------- - 1 file changed, 12 insertions(+), 13 deletions(-) + src/liblzma/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit f59c4183f3c9066626ce45dc3db4642fa603fa21 +commit cf54f70e14c218faf5019ffa2fa769ed73772ee8 Author: Lasse Collin -Date: 2015-10-12 21:08:42 +0300 +Date: 2024-12-28 18:28:56 +0200 - Update THANKS. + CMake/macOS: Use GNU Libtool compatible shared library versioning + + Because this increases the Mach-O compatibility_version, this commit + shouldn't cause any ABI compatibility trouble for existing CMake users + on macOS. This is assuming that they won't later downgrade to an older + liblzma version that was built with CMake before this commit. + + Meson allows customising the Mach-O versioning too. So the three + build systems can be configured to be compatible. - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 51 ++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 48 insertions(+), 3 deletions(-) -commit 35f189673e280c12e4c5129f9f97e54eef3bbc04 +commit 94e17916689d38bc09bf35e602ed6f6276034b59 Author: Lasse Collin -Date: 2015-10-12 21:07:41 +0300 +Date: 2024-12-28 14:49:45 +0200 - Tests: Add tests for the two bugs fixed in index.c. + CMake: Edit a comment - tests/test_index.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e10bfdb0fcaff12f3a6dadee51e0a022aadccb51 +commit 6b50590725aeae8a2aed06faa3238cb9f8771c1b Author: Lasse Collin -Date: 2015-10-12 20:45:15 +0300 +Date: 2024-12-28 20:39:49 +0200 - liblzma: Fix lzma_index_dup() for empty Streams. + version.sh: Omit an unwanted dot from development versions - Stream Flags and Stream Padding weren't copied from - empty Streams. + It printed 5.7.0.alpha instead of 5.7.0alpha. + + Fixes: e7a42cda7c827e016619e8cab15e2faf5d4181ae - src/liblzma/common/index.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) + build-aux/version.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 06f434bd8980f25ca23232eb7bb7df7e37dc8448 +commit f7a248f56e94310a080051c4a709c08514fa48b1 Author: Lasse Collin -Date: 2015-10-12 20:31:44 +0300 +Date: 2024-12-27 16:25:07 +0200 - liblzma: Add a note to index.c for those using static analyzers. + CMake: Remove a duplicate word from a comment - src/liblzma/common/index.c | 3 +++ - 1 file changed, 3 insertions(+) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 9815cdf6987ef91a85493bfcfd1ce2aaf3b47a0a +commit 8b7c55d148f4a9b3702207164e862437ddffad33 Author: Lasse Collin -Date: 2015-09-29 13:59:35 +0300 +Date: 2024-12-27 16:23:12 +0200 - Bump version and soname for 5.2.2. + INSTALL: Document CMAKE_DLL_NAME_WITH_SOVERSION - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + INSTALL | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) -commit cbe0cec8476bdd0416c7ca9bc83895c9bea1cf78 +commit 260d5d36203955a7148ae1ab05d0931c942028d5 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 49427ce7eececdd18bbd35dab23c81910d083e1c -Author: Andre Noll -Date: 2015-05-28 15:50:00 +0200 +Date: 2024-12-26 21:27:18 +0200 - Fix typo in German translation. - - As pointed out by Robert Pollak, there's a typo in the German - translation of the compression preset option (-0 ... -9) help text. - "The compressor" translates to "der Komprimierer", and the genitive - form is "des Komprimierers". The old word makes no sense at all. + xz: Fix comments - po/de.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/file_io.c | 4 ++-- + src/xz/file_io.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) -commit 608d6f06c940e7f28c25de005e8b99bdff42d27c -Author: Hauke Henningsen -Date: 2015-08-17 04:59:54 +0200 +commit bf6da9a573a780cd1a7fb1728ef55d09e58dad11 +Author: Dexter Castor Döpping +Date: 2024-12-22 13:44:03 +0100 - Update German translation, mostly wrt orthography + CMake: Disable unity builds project-wide - 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 + liblzma and xz can't be compiled as a unity/jumbo build because of + redeclarations and type name reuse. The CMake documentation recommends + setting UNITY_BUILD to false in this case. - Acked-By: Andre Noll + This is especially important if we're compiled as a subproject and the + consumer wants to use CMAKE_UNITY_BUILD=ON for the rest of their code + base. - * Update after msgmerge + Closes: https://github.com/tukaani-project/xz/pull/158 - po/de.po | 383 ++++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 196 insertions(+), 187 deletions(-) + CMakeLists.txt | 6 ++++++ + 1 file changed, 6 insertions(+) -commit c8988414e5b67b8ef2fe0ba7b1ccdd0ec73c60d3 +commit f8c328eed1bf0a0168132025a52116b7735f894c Author: Lasse Collin -Date: 2015-08-11 13:23:04 +0300 +Date: 2024-12-20 08:51:18 +0200 - Build: Minor Cygwin cleanup. + Windows: Workaround a UTF-8 issue in Gettext's libintl_setlocale() - Some tests used "cygwin*" and some used "cygwin". I changed - them all to use "cygwin". Shouldn't affect anything in practice. + See the comment. In this package, locale is set at program startup and + not changed later, so the point (2) in the comment isn't a problem. + + Fixes: 46ee0061629fb075d61d83839e14dd193337af59 - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/common/tuklib_gettext.h | 51 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 51 insertions(+) -commit 85a6dfed53477906bfe9a7c0123dd412e391cb48 +commit 03533906093529701ba91081907d8977991997de Author: Lasse Collin -Date: 2015-08-11 13:21:52 +0300 +Date: 2024-12-20 06:50:36 +0200 - Build: Support building of MSYS2 binaries. + Revert "Windows: Use UTF-8 locale when active code page is UTF-8" + + This reverts commit 0d0b574cc45045d6150d397776340c068df59e2a. - configure.ac | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) + src/common/tuklib_gettext.h | 32 ++------------------------------ + 1 file changed, 2 insertions(+), 30 deletions(-) -commit 77f270be8432df2e4516a0c48814b6976d6618c5 +commit 4b319e05afef4eab2fbafb6223f25d128ec99fce Author: Lasse Collin -Date: 2015-08-09 21:06:26 +0300 +Date: 2024-12-19 18:31:09 +0200 - Windows: Define DLL_EXPORT when building liblzma.dll with MSVC. + xzdec: Use setlocale() instead of tuklib_gettext_setlocale() - src/liblzma/common/common.h uses it to set __declspec(dllexport) - for the API symbols. + xzdec isn't translated and doesn't need libintl on Windows even + when NLS is enabled, thus libintl_setlocale() cannot interfere + with the locale settings. Thus, standard setlocale() works perfectly. - Thanks to Adam Walling. + In the commit 78868b6e, the explanation in the commit message is wrong. + + Fixes: 78868b6ed63fa4c89f73e3dfed27abfb8b0d46db - windows/liblzma_dll.vcxproj | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + src/xzdec/xzdec.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) -commit 8c975446c5903090a5a8493b5b96b71003056a88 +commit 34b80e282ea76ec793eaedaef58a36c3913dec78 Author: Lasse Collin -Date: 2015-08-09 21:02:20 +0300 +Date: 2024-12-19 19:36:15 +0200 - Windows: Omit unneeded header files from MSVC project files. + Windows: Revert the setlocale(LC_ALL, ".UTF8") documentation + + Only leave the FindFileFirstA() notes from 20dfca81, reverting + the incorrect setlocale() notes. On Windows, Gettext's + overrides setlocale() with libintl_setlocale() wrapper. I hadn't + noticed this, and thus my conclusions were wrong. + + Fixes: 20dfca8171dad4c64785ac61d5b68972c444877b - windows/liblzma.vcxproj | 5 ----- - windows/liblzma_dll.vcxproj | 5 ----- - 2 files changed, 10 deletions(-) + src/common/w32_application.manifest.comments.txt | 21 +-------------------- + 1 file changed, 1 insertion(+), 20 deletions(-) -commit 119a00434954726ca58e4a578e6469f530fca30e +commit 5794cda064ce980450eaa5a4e2c71bd317168ce4 Author: Lasse Collin -Date: 2015-07-12 20:48:19 +0300 +Date: 2024-12-18 17:49:05 +0200 - liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer. + tuklib_mbstr_wrap: Silence a warning from Clang + + Fixes: ca529c3f41a4a19a59e2e252e6dd9255f130c634 - src/liblzma/api/lzma.h | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) + src/common/tuklib_mbstr_wrap.c | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit d4e7c557fcab353539c9481a8d95cb04bcb15c7c +commit 16c9796ef970ae349c54fef9a346e394d7cc4c75 Author: Lasse Collin -Date: 2015-06-19 20:38:55 +0300 +Date: 2024-12-18 14:00:09 +0200 - Update THANKS. + Update THANKS THANKS | 2 ++ 1 file changed, 2 insertions(+) -commit 98001740ca56c894a7bd32eb47e9857a8a7d878d +commit 3b5c8a1fcab385eed9cc95684223fddd7cf5a053 Author: Lasse Collin -Date: 2015-06-19 20:21:30 +0300 +Date: 2024-12-18 14:00:09 +0200 - Windows: Update the docs. + Update TODO + + Fixes: 5f6dddc6c911df02ba660564e78e6de80947c947 - INSTALL | 29 ++++++++----- - windows/INSTALL-MSVC.txt | 47 ++++++++++++++++++++++ - windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} | 2 +- - 3 files changed, 67 insertions(+), 11 deletions(-) + TODO | 3 --- + 1 file changed, 3 deletions(-) -commit 28195e4c877007cc760ecea1d17f740693d66873 +commit 22a35e64ce3d331b668f15f858a7bb3da3acc78e Author: Lasse Collin -Date: 2015-06-19 17:25:31 +0300 +Date: 2024-12-18 14:00:09 +0200 - Windows: Add MSVC project files for building liblzma. - - Thanks to Adam Walling for creating these files. + lzmainfo: Use tuklib_mbstr_nonprint - windows/liblzma.vcxproj | 359 ++++++++++++++++++++++++++++++++++++++++ - windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++ - windows/xz_win.sln | 48 ++++++ - 3 files changed, 795 insertions(+) + CMakeLists.txt | 3 +++ + src/lzmainfo/Makefile.am | 1 + + src/lzmainfo/lzmainfo.c | 16 ++++++++++------ + 3 files changed, 14 insertions(+), 6 deletions(-) -commit 960440f3230dc628f6966d9f7614fc1b28baf44e +commit 03111595ee713e0f94fb4f4a19a15594d5149347 Author: Lasse Collin -Date: 2015-05-13 20:57:55 +0300 +Date: 2024-12-18 14:00:09 +0200 - Tests: Fix a memory leak in test_bcj_exact_size. - - Thanks to Cristian Rodríguez. + xzdec: Use tuklib_mbstr_nonprint - tests/test_bcj_exact_size.c | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 3 +++ + src/xzdec/Makefile.am | 2 ++ + src/xzdec/xzdec.c | 15 +++++++++++---- + 3 files changed, 16 insertions(+), 4 deletions(-) -commit 68cd35acafbdcdf4e8ea8b5bb843c736939d6f8b +commit d22f96921fd2f94d842f3cc2e5f729cb3cca5122 Author: Lasse Collin -Date: 2015-05-12 18:08:24 +0300 +Date: 2024-12-18 14:00:09 +0200 - Fix NEWS about threading in 5.2.0. + xz: Use tuklib_mbstr_nonprint + + Call tuklib_mask_nonprint() on filenames and also on a few other + strings from the command line too. - Thanks to Andy Hochhaus. + The filename printed by "xz --robot --list" (in list.c) is also masked. + It's good to get rid of tabs and newlines which would desync the output + but masking other chars wouldn't be strictly necessary. It might matter + with sensible filenames if LC_CTYPE is "C" (when iswprint() might reject + non-ASCII chars) and a script wants to read a filename from xz's output. + Hopefully it's an unusual enough corner case to not be a real problem. - NEWS | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 2 ++ + src/xz/Makefile.am | 1 + + src/xz/coder.c | 19 ++++++++----- + src/xz/file_io.c | 81 ++++++++++++++++++++++++++++++++++-------------------- + src/xz/list.c | 32 +++++++++++++-------- + src/xz/main.c | 10 +++++-- + src/xz/message.c | 8 ++++-- + src/xz/options.c | 10 ++++--- + src/xz/private.h | 1 + + src/xz/suffix.c | 12 ++++---- + 10 files changed, 113 insertions(+), 63 deletions(-) -commit ff96ed6d25786728356017a13baf8c14731b4f1e +commit 40e573305535960574404d2eae848b248c95ea7e Author: Lasse Collin -Date: 2015-05-11 21:26:16 +0300 +Date: 2024-12-18 14:00:09 +0200 - xz: Document that threaded decompression hasn't been implemented yet. + Add tuklib_mbstr_nonprint to mask non-printable characters + + Malicious filenames or other untrusted strings may affect the state of + the terminal when such strings are printed as part of (error) messages. + Add functions that mask such characters. + + It's not enough to handle only single-byte control characters. + In multibyte locales, some control characters are multibyte too, for + example, terminals interpret C1 control characters (U+0080 to U+009F) + that are two bytes as UTF-8. + + Instead of checking for control characters with iswcntrl(), this + uses iswprint() to detect printable characters. This is much stricter. + On Windows it's actually too strict as it rejects some characters that + definitely are printable. + + Gnulib's quotearg would do a lot more but I hope this simpler method + is good enough here. + + Thanks to Ryan Colyer for the discussion about the problems of + the earlier single-byte-only method. + + Thanks to Christian Weisgerber for reporting a bug in an earlier + version of this code. + + Thanks to Jeroen Roovers for a typo fix. + + Closes: https://github.com/tukaani-project/xz/pull/118 - src/xz/xz.1 | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + src/Makefile.am | 2 + + src/common/tuklib_mbstr_nonprint.c | 151 +++++++++++++++++++++++++++++++++++++ + src/common/tuklib_mbstr_nonprint.h | 69 +++++++++++++++++ + 3 files changed, 222 insertions(+) -commit 00d37b64a64ea8597fd2422d5187afd761ab9531 +commit 36190c8c4bb13d1eab84a30f3650a5ec5ff0e402 Author: Lasse Collin -Date: 2015-04-20 20:20:29 +0300 +Date: 2024-12-18 11:33:09 +0200 - Update THANKS. + Translations: Add preliminary Georgian translation + + Most of the auto-wrapped strings are translated already. A few + strings have changed since this was created though. This file + isn't in the Translation Project *yet* because these strings + are still very new. + + Closes: https://github.com/tukaani-project/xz/pull/145 - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/LINGUAS | 1 + + po/ka.po | 1186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 1187 insertions(+) -commit db190a832c49ca3aed6d69cc992fa5583cae7b11 +commit 4a0c4f92b820b84ace625a95305a9d56cb662f4e Author: Lasse Collin -Date: 2015-04-20 19:59:18 +0300 +Date: 2024-10-30 20:50:20 +0200 - 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. + xz: Make one string simpler for translators - Thanks to Michael Fox for the bug report. + Leading spaces in the string can get miscounted by translators. - configure.ac | 4 ++-- - src/xz/file_io.c | 9 +-------- - 2 files changed, 3 insertions(+), 10 deletions(-) + src/xz/list.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit eccd8155e107c5ada03d13e7730675cdf1a44ddc +commit 3fcf547e926f6c0414b23459f7b43164f7e8c378 Author: Lasse Collin -Date: 2015-03-29 22:14:47 +0300 +Date: 2024-12-17 10:26:10 +0200 - Update THANKS. + lzmainfo: Sync the translatable strings with xz - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/lzmainfo/lzmainfo.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) -commit 25263fd9e7a8a913395cb93d7c104cd48c2b4a00 +commit 3e9177fd206d20d6d8acc7d203c25a9ae0549229 Author: Lasse Collin -Date: 2015-03-29 22:13:48 +0300 +Date: 2024-12-17 10:26:10 +0200 - Fix the detection of installed RAM on QNX. + xz: Use automatic word wrapping for help texts - 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. + --long-help is now one line longer because --lzma1 is now on its + own line. - m4/tuklib_physmem.m4 | 6 +++--- - src/common/tuklib_physmem.c | 14 +++++++++++++- - 2 files changed, 16 insertions(+), 4 deletions(-) + CMakeLists.txt | 2 + + src/xz/Makefile.am | 3 +- + src/xz/message.c | 482 ++++++++++++++++++++++++++++++++++------------------- + 3 files changed, 313 insertions(+), 174 deletions(-) -commit 4c544d2410903d38402221cb783ed85585b6a007 +commit a0eecc9eb23ac583ccf442de3f5c106d4b09482d Author: Lasse Collin -Date: 2015-03-27 22:39:07 +0200 +Date: 2024-12-16 18:46:45 +0200 - Fix CPU core count detection on QNX. + po/Makevars: Add --keyword=W_:... to XGETTEXT_OPTIONS - 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. + The text was copied from tuklib_gettext.h. - sysconf() works. An alternative would have been to use - QNX-specific SYSPAGE_ENTRY(num_cpu) from . + Also rearrange the --keyword options to be last on the line. + + po/Makevars | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ca529c3f41a4a19a59e2e252e6dd9255f130c634 +Author: Lasse Collin +Date: 2024-12-16 18:43:52 +0200 + + Add tuklib_mbstr_wrap for automatic word wrapping - Thanks to Ole André Vadla Ravnås. + Automatic word wrapping makes translators' work easier and reduces + errors like misaligned columns or overlong lines. Right-to-left + languages and languages that don't use spaces between words will + still need extra effort. (xz hasn't been translated to any RTL + language so far.) - m4/tuklib_cpucores.m4 | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) + cmake/tuklib_mbstr.cmake | 4 + + m4/tuklib_mbstr.m4 | 2 +- + src/Makefile.am | 2 + + src/common/tuklib_gettext.h | 11 ++ + src/common/tuklib_mbstr_wrap.c | 285 +++++++++++++++++++++++++++++++++++++++++ + src/common/tuklib_mbstr_wrap.h | 203 +++++++++++++++++++++++++++++ + 6 files changed, 506 insertions(+), 1 deletion(-) -commit e0ea6737b03e83ccaff4514d00e31bb926f8f0f3 +commit 314b83cebad0244a0015a8abc6d8d086b581c215 Author: Lasse Collin -Date: 2015-03-07 22:05:57 +0200 +Date: 2024-12-17 17:57:18 +0200 - xz: size_t/uint32_t cleanup in options.c. + Build: Sort filenames to ASCII order in Makefile.am - src/xz/options.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8bcca29a65335fd679c13814b70b35b68fa5daed +commit df399c52554dfdf60259ca2cce97adbcfff39dc0 Author: Lasse Collin -Date: 2015-03-07 22:04:23 +0200 +Date: 2024-10-21 18:51:24 +0300 - xz: Fix a comment and silence a warning in message.c. + tuklib_mbstr_width: Add tuklib_mbstr_width_mem() + + It's a new function split from tuklib_mbstr_width(). + It's useful with partial strings that aren't terminated with \0. - src/xz/message.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + src/common/tuklib_mbstr.h | 17 +++++++++++++++++ + src/common/tuklib_mbstr_width.c | 8 ++++++++ + 2 files changed, 25 insertions(+) -commit f243f5f44c6b19a7c289a0ec73a03ee08364cb5b +commit 51081efae4c52c226e96da95313916eba99f885f Author: Lasse Collin -Date: 2015-03-07 22:01:00 +0200 +Date: 2024-12-16 20:08:27 +0200 - liblzma: Silence more uint32_t vs. size_t warnings. + tuklib_mbstr_width: Update a comment about shift states - src/liblzma/lz/lz_encoder.c | 2 +- - src/liblzma/lzma/lzma_encoder.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/common/tuklib_mbstr_width.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) -commit 7f0a4c50f4a374c40acf4b86848f301ad1e82d34 +commit 7ff1b0ac53866877bdfd79acf5fee0269058c58b Author: Lasse Collin -Date: 2015-03-07 19:54:00 +0200 +Date: 2024-10-21 18:47:56 +0300 - xz: Make arg_count an unsigned int to silence a warning. + tuklib_mbstr_width: Don't mention shift states in the API docs - Actually the value of arg_count cannot exceed INT_MAX - but it's nicer as an unsigned int. + It is assumed that this code won't be used with charsets that use + locking shift states. - src/xz/args.h | 2 +- - src/xz/main.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/common/tuklib_mbstr.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) -commit f6ec46801588b1be29c07c9db98558b521304002 +commit 3c16105936320e4095dbe84fa9a33a4a6d46a597 Author: Lasse Collin -Date: 2015-03-07 19:33:17 +0200 +Date: 2024-10-21 18:41:41 +0300 - liblzma: Fix a warning in index.c. + tuklib_mbstr_width: Use stricter return value checking + + This should make no difference in practice (at least if mbrtowc() + isn't broken). - src/liblzma/common/index.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/common/tuklib_mbstr_width.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit a24518971cc621315af142dd3bb7614fab04ad27 +commit b797c44c42ea54fe1c52722a2fca0c9618575598 Author: Lasse Collin -Date: 2015-02-26 20:46:14 +0200 +Date: 2024-12-16 20:06:07 +0200 - Build: Fix a CR+LF problem when running autoreconf -fi on OS/2. + tuklib_mbstr_width: Change the behavior when wcwidth() is not available + + If wcwidth() isn't available (Windows), previously it was assumed + that one byte == one column in the terminal. Now it is assumed that + one multibyte character == one column. This works better with UTF-8. + Languages that only use single-width characters without any combining + characters should work correctly with this. + + In xz, none of po/*.po contain combining characters and only ko.po, + zh_CN.po, and zh_TW.po contain fullwidth characters. Thus, "only" + those three translations in xz are broken on Windows with the + UTF-8 code page. Broken means that column headings in xz -lvv and + (only in the master branch) strings in --long-help are misaligned, + so it's not a huge problem. I don't know if those three languages + displayed perfectly before the UTF-8 change because I hadn't tested + translations with native Windows builds before. + + Fixes: 46ee0061629fb075d61d83839e14dd193337af59 - build-aux/version.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/common/tuklib_mbstr_width.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) -commit dec11497a71518423b5ff0e759100cf8aadf6c7b +commit 78868b6ed63fa4c89f73e3dfed27abfb8b0d46db Author: Lasse Collin -Date: 2015-02-26 16:53:44 +0200 +Date: 2024-12-18 14:23:13 +0200 - Bump version and soname for 5.2.1. + xzdec: Use setlocale() via tuklib_gettext_setlocale() + + xzdec isn't translated and didn't have locale-specific behavior + in the past. On Windows with UTF-8 in the application manifest, + setting the locale makes a difference though: + + - Without any setlocale() call, non-ASCII filenames don't display + properly in Command Prompt unless one first uses "chcp 65001" + to set the console code page to UTF-8. + + - setlocale(LC_ALL, "") is enough to make non-ASCII filenames + print correctly in Command Prompt without using "chcp 65001", + assuming that the non-UTF-8 code page (like 850) supports + those non-ASCII characters. + + - setlocale(LC_ALL, ".UTF8") is even better because then mbrtowc() and + such functions use an UTF-8 locale instead of a legacy code page. + The tuklib_gettext_setlocale() macro takes care of this (without + enabling any translations). + + Fixes: 46ee0061629fb075d61d83839e14dd193337af59 - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + src/xzdec/xzdec.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) -commit 29e39c79975ab89ee5dd671e97064534a9f3a649 +commit 0d0b574cc45045d6150d397776340c068df59e2a Author: Lasse Collin -Date: 2015-02-26 13:01:09 +0200 +Date: 2024-12-17 14:59:37 +0200 - Update NEWS for 5.2.1. + Windows: Use UTF-8 locale when active code page is UTF-8 + + XZ Utils 5.6.3 set the active code page to UTF-8 to fix CVE-2024-47611. + This wasn't paired with UCRT-specific setlocale(LC_ALL, ".UTF8"), thus + non-ASCII characters from translations became mojibake. + + Fixes: 46ee0061629fb075d61d83839e14dd193337af59 - NEWS | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + src/common/tuklib_gettext.h | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) -commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd +commit 20dfca8171dad4c64785ac61d5b68972c444877b Author: Lasse Collin -Date: 2015-02-22 19:38:48 +0200 +Date: 2024-12-17 15:01:29 +0200 - xz: Use pipe2() if available. + Windows: Document the need for setlocale(LC_ALL, ".UTF8") + + Also warn about unpaired surrogates and (somewhat UTF-8-specific) + MAX_PATH issue in FindFirstFileA(). + + Fixes: 46ee0061629fb075d61d83839e14dd193337af59 - configure.ac | 4 ++-- - src/xz/file_io.c | 9 ++++++++- - 2 files changed, 10 insertions(+), 3 deletions(-) + src/common/w32_application.manifest.comments.txt | 28 +++++++++++++++++++++++- + 1 file changed, 27 insertions(+), 1 deletion(-) -commit 117d962685c72682c63edc9bb765367189800202 +commit 4e936f234056e5831013ed922145b666b04bb1e3 Author: Lasse Collin -Date: 2015-02-21 23:40:26 +0200 +Date: 2024-12-18 14:12:22 +0200 - liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode. + xzdec: Call tuklib_progname_init() early enough + + If the early pledge() call on OpenBSD fails, it calls my_errorf() + which requires the "progname" variable. - 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. + Fixes: d74fb5f060b76db709b50f5fd37490394e52f975 - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xzdec/xzdec.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719 +commit 61feaf681bd793dc5c919732b44bca7dcf2ed1b8 Author: Lasse Collin -Date: 2015-02-21 23:00:19 +0200 +Date: 2024-12-15 19:08:32 +0200 - xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick. + CMake: Bump maximum policy version to 3.31 - Now it reads the old flags instead of blindly setting O_NONBLOCK. - The old code may have worked correctly, but this is better. + With CMake 3.31, there were a few warnings from + CMP0177 "install() DESTINATION paths are normalized". + These occurred because the install(FILES) command in + my_install_man_lang() is called with a DESTINATION path + that contains two consecutive slashes, for example, + "share/man//man1". Such a path is for the English man pages. + With translated man pages, the language code goes between + the slashes. The warning was probably triggered because the + extra slash gets removed by the normalization. - src/xz/file_io.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 2205bb5853098aea36a56df6f5747037175f66b4 +commit b0bb84dd7bbdcc85243386a0051c7b2cb5fc6a18 Author: Lasse Collin -Date: 2015-02-10 15:29:34 +0200 +Date: 2024-12-15 18:35:27 +0200 - Update THANKS. + Update THANKS THANKS | 1 + 1 file changed, 1 insertion(+) -commit d935b0cdf3db440269b9d952b2b281b18f8c7b08 -Author: Lasse Collin -Date: 2015-02-10 15:28:30 +0200 +commit bee0c044d30a6ad3b3d94901c27e7519f6f46e27 +Author: Dexter Castor Döpping +Date: 2024-12-08 18:24:29 +0100 - tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available. + liblzma: Fix incorrect macro name in a comment - In FreeBSD, cpuset_getaffinity() is the preferred way to get - the number of available cores. - - Thanks to Rui Paulo for the patch. I edited it slightly, but - hopefully I didn't break anything. + Fixes: 33b8a24b6646a9dbfd8358405aec466b13078559 + Closes: https://github.com/tukaani-project/xz/pull/155 - m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++- - src/common/tuklib_cpucores.c | 18 ++++++++++++++++++ - 2 files changed, 40 insertions(+), 1 deletion(-) + src/liblzma/api/lzma/lzma12.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560 +commit 2cfa1ad0a9eb62b1847cf13f9aee290158978a3a Author: Lasse Collin -Date: 2015-02-09 22:08:37 +0200 +Date: 2024-12-17 10:36:43 +0200 - xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp. + license-check.sh: Add an exception for doc/SHA256SUMS - Thanks to Rui Paulo for the fix. + Fixes: 36b531022f24a2ab57a2dfb9e5052f1c176e9d9a - src/scripts/xzdiff.in | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + build-aux/license-check.sh | 1 + + 1 file changed, 1 insertion(+) -commit b9a5b6b7a29029680af733082b6a46e0fc01623a +commit 36b531022f24a2ab57a2dfb9e5052f1c176e9d9a Author: Lasse Collin -Date: 2015-02-03 21:45:53 +0200 +Date: 2024-12-01 21:38:17 +0200 - Add a few casts to tuklib_integer.h to silence possible warnings. + doc/SHA256SUMS: Add the list of SHA-256 hashes of release files - I heard that Visual Studio 2013 gave warnings without the casts. + The release files are signed but verifying the signatures cannot + catch certain types of attacks: - Thanks to Gabi Davar. + 1. A malicious maintainer could make more than one variant of + a package. One could be for general distribution. Another + with malicious content could be targeted to specific users, + for example, distributing the malicious version on a mirror + controlled by the attacker. + + 2. If the signing key of an honest maintainer was compromised + without being detected, a similar situation as described + above could occur. + + SHA256SUMS could be put on the project website but having it in + the Git repository makes it obvious that old lines aren't modified + when the file is updated. + + Hashes of uncompressed files are included too. This way tarballs + can be recompressed and the hashes can still be verified. - src/common/tuklib_integer.h | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) + .gitattributes | 1 + + doc/SHA256SUMS | 218 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 219 insertions(+) -commit c45757135f40e4a0de730ba5fff0100219493982 +commit fe9e66993fdbcc2981c7361b9b034a451eb0fc42 Author: Lasse Collin -Date: 2015-01-26 21:24:39 +0200 +Date: 2024-11-30 12:05:59 +0200 - liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. + Docs: Remove .github/SECURITY.md + + One of the reasons to have this file in the xz repository was to + show vulnerability reporting info in the Security section on GitHub. + On 2024-11-25, I added SECURITY.md to the tukaani-project organization + on GitHub: + + https://github.com/tukaani-project/.github/blob/main/SECURITY.md + + GitHub shows that file in all projects in the organization unless + overridden by a project-specific SECURITY.md. Thus, removing + the file from the xz repo makes GitHub show the organization-wide + text instead. + + Maintaining a single copy for the whole GitHub organization makes + things simpler. It's also nicer to have fewer GitHub-specific files + in the xz repo. Information how to report bugs (including security + issues) is available in README and on the home page too. + + The OpenSSF Scorecard tool didn't find .github/SECURITY.md from the + xz repository. There was a suggestion to move the file to the top-level + directory where Scorecard should find it. However, Scorecard does find + the organization-wide SECURITY.md. Thus, the file isn't needed in the + xz repository to score points in the Scorecard game: + + https://scorecard.dev/viewer/?uri=github.com/tukaani-project/xz + + Closes: https://github.com/tukaani-project/xz/issues/148 + Closes: https://github.com/tukaani-project/xz/pull/149 - src/liblzma/common/memcmplen.h | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) + .github/SECURITY.md | 14 -------------- + 1 file changed, 14 deletions(-) -commit 3c500174ed5485f550972a2a6109c361e875f069 +commit b36177273602ebc83e9cc58517f63a7b6af33f70 Author: Lasse Collin -Date: 2015-01-26 20:40:16 +0200 +Date: 2024-11-30 10:27:14 +0200 - Update THANKS. + Translations: Update the Chinese (traditional) translation - THANKS | 1 + - 1 file changed, 1 insertion(+) + po/zh_TW.po | 201 +++++++++++++++++++++++++----------------------------------- + 1 file changed, 84 insertions(+), 117 deletions(-) -commit fec88d41e672d9e197c9442aecf02bd0dfa6d516 +commit c15115f7ede492f20c91b08ba485f9426f60233f Author: Lasse Collin -Date: 2015-01-26 20:39:28 +0200 +Date: 2024-10-30 19:54:34 +0200 - liblzma: Silence harmless Valgrind errors. + liblzma: Optimize the loop conditions in BCJ filters - Thanks to Torsten Rupp for reporting this. I had - forgotten to run Valgrind before the 5.2.0 release. + Compilers cannot optimize the addition "i + 4" away since theoretically + it could overflow. - src/liblzma/lz/lz_encoder.c | 6 ++++++ - 1 file changed, 6 insertions(+) + src/liblzma/simple/arm.c | 4 +++- + src/liblzma/simple/arm64.c | 4 +++- + src/liblzma/simple/armthumb.c | 7 ++++++- + src/liblzma/simple/ia64.c | 4 +++- + src/liblzma/simple/powerpc.c | 4 +++- + src/liblzma/simple/sparc.c | 5 +++-- + 6 files changed, 21 insertions(+), 7 deletions(-) -commit a9b45badfec0928d20a27c7176c005fa637f7d1e +commit 9f69e71e78621fd056f5eaaad7cdcd9279310fb5 Author: Lasse Collin -Date: 2015-01-09 21:50:19 +0200 +Date: 2024-11-25 16:26:54 +0200 - xz: Fix comments. + Update THANKS - src/xz/file_io.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 541aee6dd4aa97a809aba281475a21b641bb89e2 -Author: Lasse Collin -Date: 2015-01-09 21:35:06 +0200 +commit 48ff3f06521ca326996ab9a04d1b342098960427 +Author: Mark Wielaard +Date: 2024-11-25 12:28:44 +0200 - Update THANKS. + xz: Landlock: Fix a file descriptor leak - THANKS | 1 + + src/xz/sandbox.c | 1 + 1 file changed, 1 insertion(+) -commit 4170edc914655310d2363baccf5e615e09b04911 -Author: Lasse Collin -Date: 2015-01-09 21:34:06 +0200 +commit dbca3d078ec581600600abebbb18769d3d713914 +Author: Sam James +Date: 2024-10-02 03:04:03 +0100 - xz: Don't fail if stdout doesn't support O_NONBLOCK. - - This is similar to the case with stdin. + CI: update FreeBSD, NetBSD, OpenBSD, Solaris actions - Thanks to Brad Smith for the bug report and testing - on OpenBSD. + Checked the changes and they're all innocuous. This should hopefully + fix the "externally managed" pip error in these jobs that started + recently. - src/xz/file_io.c | 36 +++++++++++++++--------------------- - 1 file changed, 15 insertions(+), 21 deletions(-) + .github/workflows/freebsd.yml | 2 +- + .github/workflows/netbsd.yml | 2 +- + .github/workflows/openbsd.yml | 2 +- + .github/workflows/solaris.yml | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) -commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d +commit a94b85bea3f04d8c1f4e2e6f648a9a15bc6ce58f Author: Lasse Collin -Date: 2015-01-07 19:18:20 +0200 +Date: 2024-10-01 12:17:39 +0300 - xz: Fix a memory leak in DOS-specific code. + Add NEWS for 5.6.3 - src/xz/file_io.c | 2 ++ - 1 file changed, 2 insertions(+) + NEWS | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 125 insertions(+) -commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea +commit be4bf94446b6286a5dffdde85fc1d21448f4edff Author: Lasse Collin -Date: 2015-01-07 19:08:06 +0200 +Date: 2024-10-01 14:49:41 +0300 - xz: Don't fail if stdin doesn't support O_NONBLOCK. + cmake/tuklib_large_file_support.cmake: Add a missing include - 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. + v5.2 didn't build with CMake. Other branches had + include(CMakePushCheckState) in top-level CMakeLists.txt + which made the build work. - 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. + Fixes: 597f49b61475438a43a417236989b2acc968a686 - src/xz/file_io.c | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) + cmake/tuklib_large_file_support.cmake | 1 + + 1 file changed, 1 insertion(+) -commit d2d484647d9d9d679f03c75abb0404f67069271c +commit 1ebbe915d4e0d877154261b5f8103719a6722975 Author: Lasse Collin -Date: 2015-01-06 20:30:15 +0200 +Date: 2024-10-01 12:10:23 +0300 - Tests: Don't hide unexpected error messages in test_files.sh. - - Hiding them makes no sense since normally there's no error - when testing the "good" files. With "bad" files errors are - expected and then it makes sense to keep the messages hidden. + Update THANKS - tests/test_files.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + THANKS | 2 ++ + 1 file changed, 2 insertions(+) -commit aae6a6aeda51cf94a47e39ad624728f9bee75e30 +commit 74702ee00ecfd080d8ab11118cd25dbe6c437ec0 Author: Lasse Collin -Date: 2014-12-30 11:17:16 +0200 +Date: 2024-10-01 12:10:23 +0300 - Update Solaris notes in INSTALL. + Tests/Windows: Add the application manifest to the test programs - 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. - - INSTALL | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 7815112153178800a3521b9f31960e7cdc26cfba -Author: Lasse Collin -Date: 2014-12-26 12:00:05 +0200 - - Build: POSIX shell isn't required if scripts are disabled. + This ensures that the test programs get executed the same way as + the binaries that are installed. - INSTALL | 3 ++- - configure.ac | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) + CMakeLists.txt | 14 ++++++++++---- + tests/Makefile.am | 10 ++++++++++ + tests/tests.cmake | 33 ++++++++++++++++++++++++++++++++- + tests/tests_w32res.rc | 18 ++++++++++++++++++ + 4 files changed, 70 insertions(+), 5 deletions(-) -commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a +commit 7ddf2273e0e4654582ee65db19d44431bfdb5791 Author: Lasse Collin -Date: 2014-12-21 20:48:37 +0200 +Date: 2024-10-01 12:10:23 +0300 - DOS: Update Makefile. + license-check.sh: Add an exception for w32_application.manifest + + The file gets embedded as is into executables, thus it cannot + hold a license identifier. - dos/Makefile | 1 + + build-aux/license-check.sh | 1 + 1 file changed, 1 insertion(+) -commit b85ee0905ec4ab7656d22e63519fdd3bedb21f2e +commit 46ee0061629fb075d61d83839e14dd193337af59 Author: Lasse Collin -Date: 2014-12-21 19:50:38 +0200 +Date: 2024-10-01 12:10:23 +0300 - Windows: Fix bin_i486 to bin_i686 in build.bash. + Windows: Embed an application manifest in the EXE files + + IMPORTANT: This includes a security fix to command line tool + argument handling. + + Some toolchains embed an application manifest by default to declare + UAC-compliance. Some also declare compatibility with Vista/8/8.1/10/11 + to let the app access features newer than those of Vista. + + We want all the above but also two more things: + + - Declare that the app is long path aware to support paths longer + than 259 characters (this may also require a registry change). + + - Force the code page to UTF-8. This allows the command line tools + to access files whose names contain characters that don't exist + in the current legacy code page (except unpaired surrogates). + The UTF-8 code page also fixes security issues in command line + argument handling which can be exploited with malicious filenames. + See the new file w32_application.manifest.comments.txt. + + Thanks to Orange Tsai and splitline from DEVCORE Research Team + for discovering this issue. + + Thanks to Vijay Sarvepalli for reporting the issue to me. + + Thanks to Kelvin Lee for testing with MSVC and helping with + the required build system fixes. - windows/build.bash | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 18 +++ + src/Makefile.am | 4 +- + src/common/common_w32res.rc | 5 + + src/common/w32_application.manifest | 28 ++++ + src/common/w32_application.manifest.comments.txt | 178 +++++++++++++++++++++++ + 5 files changed, 232 insertions(+), 1 deletion(-) -commit cbafa710918195dbba3db02c3fab4f0538235206 +commit dad153091552b52a41b95ec4981c6951f1cae487 Author: Lasse Collin -Date: 2014-12-21 18:58:44 +0200 +Date: 2024-09-29 14:46:52 +0300 - Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c. + Windows: Set DLL name accurately in StringFileInfo on Cygwin and MSYS2 + + Now the information in the "Details" tab in the file properties + dialog matches the naming convention of Cygwin and MSYS2. This + is only a cosmetic change. - doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++---- - 1 file changed, 26 insertions(+), 4 deletions(-) + src/liblzma/liblzma_w32res.rc | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) -commit 8dbb57238d372c7263cfeb3e7f7fd9a73173156a +commit 8940ecb96fe9f0f2a9cfb8b66fe9ed31ffbea904 Author: Lasse Collin -Date: 2014-12-21 18:56:44 +0200 +Date: 2024-09-25 15:47:55 +0300 - Docs: Update docs/examples/00_README.txt. + common_w32res.rc: White space edits + + LANGUAGE and VS_VERSION_INFO begin new statements so put an empty line + between them. - doc/examples/00_README.txt | 4 ++++ - 1 file changed, 4 insertions(+) + src/common/common_w32res.rc | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) -commit 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6 +commit c3b9dad07d3fd9319f88386b7095019bcea45ce1 Author: Lasse Collin -Date: 2014-12-21 18:11:17 +0200 +Date: 2024-09-28 20:09:50 +0300 - Bump version and soname for 5.2.0. + CMake: Add the resource files to the Cygwin and MSYS2 builds + + Autotools-based build has always done this so this is for consistency. - 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. + However, the CMake build won't create the DEF file when building + for Cygwin or MSYS2 because in that context it should be useless. + (If Cygwin or MSYS2 is used to host building of normal Windows + binaries then the DEF file is still created.) - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 6 +++--- - src/liblzma/liblzma.map | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) + CMakeLists.txt | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) -commit 3e8bd1d15e417f2d588e9be50ce027ee3d48b2da +commit da4f275bd1c18b897e5c2dd0043546de3accce0a Author: Lasse Collin -Date: 2014-12-21 18:05:03 +0200 +Date: 2024-09-28 15:19:14 +0300 - Avoid variable-length arrays in the debug programs. + CMake: Fix Windows resource file dependencies + + If common_w32res.rc is modified, the resource files need to be rebuilt. + In contrast, the liblzma*.map files truly are link dependencies. - debug/full_flush.c | 3 ++- - debug/sync_flush.c | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) + CMakeLists.txt | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) -commit 72f7307cfdceb941aeb2bf30d424cc0d13621786 +commit 1c673c0aac7f7dee8dda2c1140351c8417a71e47 Author: Lasse Collin -Date: 2014-12-21 18:01:45 +0200 +Date: 2024-09-29 01:20:03 +0300 - Build: Include 04_compress_easy_mt.c in the tarball. + CMake: Checking for CYGWIN covers MSYS2 too + + On MSYS2, both CYGWIN and MSYS are set. - Makefile.am | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 2cb82ff21c62def11f3683a8bb0aaf363102aaa0 +commit 6aaa0173b839e28429d43a8b62d257ad2f3b4521 Author: Lasse Collin -Date: 2014-12-21 18:00:38 +0200 +Date: 2024-09-28 09:37:30 +0300 - Fix build when --disable-threads is used. + Translations: Add the SPDX license identifier to pt_BR.po - src/common/mythread.h | 2 ++ + po/pt_BR.po | 2 ++ 1 file changed, 2 insertions(+) -commit 9b9e3536e458ef958f66b0e8982efc9d36de4d17 -Author: Adrien Nader -Date: 2014-12-21 15:56:15 +0100 +commit dc7b9f24b737e4e55bcbbdde6754883f991c2cfb +Author: Lasse Collin +Date: 2024-09-25 16:41:37 +0300 - po/fr: improve wording for help for --lzma1/--lzma2. + Windows/CMake: Use the correct resource file for lzmadec.exe + + CMakeLists.txt was using xzdec_w32res.rc for both xzdec and lzmadec. + + Fixes: 998d0b29536094a89cf385a3b894e157db1ccefe - po/fr.po | 2 +- + CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit a8b6b569e7fadbf5b5b9139d53bc764015c15027 -Author: Adrien Nader -Date: 2014-12-21 15:55:48 +0100 +commit b834ae5f80911a3819d6cdb484f61b257174c544 +Author: Lasse Collin +Date: 2024-09-25 21:29:59 +0300 - po/fr: missing line in translation of --extreme. + Translations: Update the Brazilian Portuguese translation - po/fr.po | 1 + - 1 file changed, 1 insertion(+) + po/pt_BR.po | 144 ++++++++++++++++++++++-------------------------------------- + 1 file changed, 53 insertions(+), 91 deletions(-) -commit f168a6fd1a888cf4f0caaddcafcb21dadc6ab6e9 +commit eceb023d4c129fd63ee881a2d8696eaf52ad1532 Author: Lasse Collin -Date: 2014-12-21 14:32:33 +0200 +Date: 2024-09-17 01:21:15 +0300 - Update NEWS for 5.2.0. + Update THANKS - NEWS | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 65 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit cec2ee863b3a88f4bf039cb00f73c4a4fc93a429 -Author: Lasse Collin -Date: 2014-12-21 14:32:22 +0200 +commit 76cfd0a9bb33ae8e534b1f73f6359dc825589f2f +Author: Tobias Stoeckmann +Date: 2024-09-16 23:19:46 +0200 - Update NEWS for 5.0.8. + lzmainfo: Avoid integer overflow + + The MB output can overflow with huge numbers. Most likely these are + invalid .lzma files anyway, but let's avoid garbage output. + + lzmadec was adapted from LZMA Utils. The original code with this bug + was written in 2005, over 19 years ago. + + Co-authored-by: Lasse Collin + Closes: https://github.com/tukaani-project/xz/pull/144 - NEWS | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + src/lzmainfo/lzmainfo.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) -commit 42e97a32649bf53ce43be2258b902a417c6e7fa1 -Author: Lasse Collin -Date: 2014-12-21 14:07:54 +0200 +commit 78355aebb7fb654302e5e33692ba109909dacaff +Author: Tobias Stoeckmann +Date: 2024-09-16 22:04:40 +0200 - xz: Fix a comment. + xzdec: Remove unused short option -M + + "xzdec -M123" exited with exit status 1 without printing + any messages. The "M:" entry should have been removed when + the memory usage limiter support was removed from xzdec. + + Fixes: 792331bdee706aa852a78b171040ebf814c6f3ae + Closes: https://github.com/tukaani-project/xz/pull/143 + [ Lasse: Commit message edits ] - src/xz/options.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + src/xzdec/xzdec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 29b95d5d6665cedffa6a9d6d3d914f981e852182 +commit e5758db7bd75587a2499e0771907521a4aa86908 Author: Lasse Collin -Date: 2014-12-20 20:43:14 +0200 +Date: 2024-09-10 13:54:47 +0300 - Update INSTALL about the dependencies of the scripts. + Update THANKS - INSTALL | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 3af91040bb42c21afbb81f5568c3313125e61192 -Author: Lasse Collin -Date: 2014-12-20 20:42:33 +0200 +commit 80ffa38f56657257ed4d90d76f6bd2f2bcb8163c +Author: Firas Khalil Khana +Date: 2024-09-10 12:30:32 +0300 - Windows: Update build instructions. + Build: Fix a typo in autogen.sh + + Fixes: e9be74f5b129fe8a5388d588e68b1b7f5168a310 + Closes: https://github.com/tukaani-project/xz/pull/141 - INSTALL | 15 +++++++++------ - windows/INSTALL-Windows.txt | 44 +++++++++++++++++++++----------------------- - 2 files changed, 30 insertions(+), 29 deletions(-) + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 0152f72bf6289d744823dc6c849538f3a139ad70 +commit 68c54e45d042add64a4cb44bfc87ca74d29b87e2 Author: Lasse Collin -Date: 2014-12-20 20:41:48 +0200 +Date: 2024-09-02 20:08:40 +0300 - Windows: Update the build script and README-Windows.txt. + Translations: Update Chinese (simplified) translation - The 32-bit build is now for i686 or newer because the - prebuilt MinGW-w64 toolchains include i686 code in the - executables even if one uses -march=i486. + Differences to the zh_CN.po file from the Translation Project: - The build script builds 32-bit SSE2 enabled version too. - Run-time detection of SSE2 support would be nice (on any OS) - but it's not implemented in XZ Utils yet. + - Two uses of \v were fixed. + + - Missing "OPTS" translation in --riscv[=OPTS] was copied from + previous lines. + + - "make update-po" was run to remove line numbers from comments. - windows/README-Windows.txt | 30 ++++++++++++++++-------------- - windows/build.bash | 23 ++++++++++++++--------- - 2 files changed, 30 insertions(+), 23 deletions(-) + po/zh_CN.po | 102 ++++++++++++++++++++++++------------------------------------ + 1 file changed, 40 insertions(+), 62 deletions(-) -commit 4a1f6133ee5533cee8d91e06fcc22443e5f1881a +commit 2230692aa1bcebb586100183831e3daf1714d60a Author: Lasse Collin -Date: 2014-12-19 15:51:50 +0200 +Date: 2024-09-02 19:40:50 +0300 - Windows: Define TUKLIB_SYMBOL_PREFIX in config.h. + Translations: Update the Catalan translation + + Differences to the ca.po file from the Translation Project: + + - An overlong line translating --filters-help was wrapped. - It is to keep all symbols in the lzma_ namespace. + - "make update-po" was used to remove line numbers from the comments + to match the changes in fccebe2b4fd513488fc920e4dac32562ed3c7637 + and 093490b58271e9424ce38a7b1b38bcf61b9c86c6. xz.pot in the TP + is older than these commits. - windows/config.h | 3 +++ - 1 file changed, 3 insertions(+) + po/ca.po | 171 ++++++++++++++++++++++++++------------------------------------- + 1 file changed, 69 insertions(+), 102 deletions(-) -commit 7f7d093de79eee0c7dbfd7433647e46302f19f82 +commit 3e7723ce26f74c71919984a6180504b4548cbb7e Author: Lasse Collin -Date: 2014-12-16 21:00:09 +0200 +Date: 2024-08-22 14:06:16 +0300 - xz: Update the man page about --threads. + Update THANKS - src/xz/xz.1 | 5 ----- - 1 file changed, 5 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 009823448b82aa5f465668878a544c5842885407 +commit d3e0e679b2b8b428598bb8ba56a17715190814db Author: Lasse Collin -Date: 2014-12-16 20:57:43 +0200 +Date: 2024-08-22 14:06:16 +0300 - xz: Update the man page about --block-size. - - src/xz/xz.1 | 41 +++++++++++++++++++++++++++++++++-------- - 1 file changed, 33 insertions(+), 8 deletions(-) - -commit 7dddfbeb499e528940bc12047355c184644aafe9 -Author: Adrien Nader -Date: 2014-12-10 22:26:57 +0100 - - po/fr: several more translation updates: reword and handle --ignore-check. + CMake: Don't install lzmadec.1 symlinks if XZ_TOOL_LZMADEC=OFF + + Thanks-to: 榆柳松 (ZhengSen Wang) + Fixes: fb50c6ba1d4c9405e5b12b5988b01a3002638c5d + Closes: https://github.com/tukaani-project/xz/pull/134 - po/fr.po | 50 ++++++++++++++++++++++++++------------------------ - 1 file changed, 26 insertions(+), 24 deletions(-) + CMakeLists.txt | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) -commit 6eca5be40e04ddc4b738d493e4e56835956d8b69 -Author: Adrien Nader -Date: 2014-12-10 22:23:01 +0100 +commit acdf21033abe347d9a279e9fe757f90ed16c1dbb +Author: Lasse Collin +Date: 2024-08-22 14:06:16 +0300 - po/fr: yet another place where my email address had to be updated. + CMake: Fix the build when XZ_TOOL_LZMADEC=OFF + + Co-developed-by: 榆柳松 (ZhengSen Wang) + Fixes: fb50c6ba1d4c9405e5b12b5988b01a3002638c5d + Fixes: https://github.com/tukaani-project/xz/pull/134 - po/fr.po | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit d1003673e92ba47edd6aeeb3dbea05c18269d0e7 -Author: Adrien Nader -Date: 2014-12-10 22:22:20 +0100 +commit 5e375987509fab484b7bef0b90be92f241c58c91 +Author: Lasse Collin +Date: 2024-08-22 11:01:07 +0300 - po/fr: fix several typos that have been around since the beginning. + Update THANKS - po/fr.po | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 4c5aa911a0df027e46171e368debc543d2fa72b2 -Author: Adrien Nader -Date: 2014-12-03 20:02:31 +0100 +commit 6cd7c8607843c337edfe2c472aa316602a393754 +Author: Yifeng Li +Date: 2024-08-22 02:18:49 +0000 - po/fr: last batch of new translations for now. + liblzma: Fix x86-64 movzw compatibility in range_decoder.h + + Support for instruction "movzw" without suffix in "GNU as" was + added in commit [1] and stabilized in binutils 2.27, released + in August 2016. Earlier systems don't accept this instruction + without a suffix, making range_decoder.h's inline assembly + unable to build on old systems such as Ubuntu 16.04, creating + error messages like: + + lzma_decoder.c: Assembler messages: + lzma_decoder.c:371: Error: no such instruction: `movzw 2(%r11),%esi' + lzma_decoder.c:373: Error: no such instruction: `movzw 4(%r11),%edi' + lzma_decoder.c:388: Error: no such instruction: `movzw 6(%r11),%edx' + lzma_decoder.c:398: Error: no such instruction: `movzw (%r11,%r14,4),%esi' + + Change "movzw" to "movzwl" for compatibility. - Four new error messages. + [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c07315e0c610e0e3317b4c02266f81793df253d2 + + Suggested-by: Lasse Collin + Tested-by: Yifeng Li + Signed-off-by: Yifeng Li + Fixes: 3182a330c1512cc1f5c87b5c5a272578e60a5158 + Fixes: https://github.com/tukaani-project/xz/issues/121 + Closes: https://github.com/tukaani-project/xz/pull/136 - po/fr.po | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + src/liblzma/rangecoder/range_decoder.h | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) -commit 3e3099e36d27059499e7996fb38a62e8ab01d356 -Author: Adrien Nader -Date: 2014-12-03 20:01:32 +0100 +commit bf901dee5d4c46609645e50311c0cb2dfdcf9738 +Author: Lasse Collin +Date: 2024-07-19 20:02:43 +0300 - po/fr: translations for --threads, --block-size and --block-list. + Build: Comment that elf_aux_info(3) will be available on OpenBSD >= 7.6 - po/fr.po | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) + CMakeLists.txt | 2 +- + configure.ac | 17 +++++++++++------ + 2 files changed, 12 insertions(+), 7 deletions(-) -commit e7d96a5933eec4e9d4a62569ee88df0ebb0f1d53 -Author: Adrien Nader -Date: 2014-12-03 20:00:53 +0100 +commit f7103c2c2a8fa51d1f308ba7387beeff20a0d4dd +Author: Lasse Collin +Date: 2024-07-19 19:42:26 +0300 - po/fr: remove fuzzy marker for error messages that will be kept in English. + Revert "liblzma: Add ARM64 CRC32 instruction support detection on OpenBSD" - The following is a copy of a comment inside fr.po: + This reverts commit dc03f6290f5b9bd3d50c7e12e58dee870889d599. - Note from translator on "file status flags". - The following entry is kept un-translated on purpose. It is difficult to - translate and should only happen in exceptional circumstances which means - that translating would: - - lose some of the meaning - - make it more difficult to look up in search engines; it might happen one - in - a million times, if we dilute the error message in 20 languages, it will be - almost impossible to find an explanation and support for the error. - - po/fr.po | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - -commit 46cbb9033af8a21fafe543302d6919746e0d72af -Author: Adrien Nader -Date: 2014-12-03 19:58:25 +0100 - - po/fr: several minor updates and better wording. + OpenBSD 7.6 will support elf_aux_info(3), and the detection code used + on FreeBSD will work on OpenBSD 7.6 too. Keep things simpler and drop + the OpenBSD-specific sysctl() method. - Meaning doesn't change at all: it's only for better wording and/or - formatting of a few strings. + Thanks to Christian Weisgerber. - po/fr.po | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) + CMakeLists.txt | 6 ------ + configure.ac | 9 --------- + src/liblzma/check/crc32_arm64.h | 15 --------------- + src/liblzma/check/crc_common.h | 1 - + 4 files changed, 31 deletions(-) -commit 7ce49d444f04e73145f79c832eb4d510594b074a -Author: Adrien Nader -Date: 2014-12-03 19:56:12 +0100 +commit 7c292dd0bf23cefcdf4b1509f3666322e08a7ede +Author: Lasse Collin +Date: 2024-07-13 22:10:37 +0300 - po/fr: update my email address and copyright years. + liblzma: Tweak a comment - po/fr.po | 4 ++-- + src/liblzma/simple/arm64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit 214c553ebc3047cd720da1ce5c80cf7c38118d3c -Author: Adrien Nader -Date: 2014-11-26 10:08:26 +0100 +commit 6408edac5529d6ec0abf52794074f229c8362303 +Author: Lasse Collin +Date: 2024-07-11 22:17:56 +0300 - fr.po: commit file after only "update-po" so actual is readable. + CMake: Bump maximum policy version to 3.30 - po/fr.po | 311 ++++++++++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 199 insertions(+), 112 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 1190c641af09cde85f8bd0fbe5c4906f4a29431b +commit 9231c39ffb518196d6664a86e5325e744621a21b Author: Lasse Collin -Date: 2014-12-02 20:04:07 +0200 +Date: 2024-07-06 15:13:19 +0300 - liblzma: Document how lzma_mt.block_size affects memory usage. + CMake: Require CMake 3.20 or later + + This allows a few cleanups. - src/liblzma/api/lzma/container.h | 4 ++++ - 1 file changed, 4 insertions(+) + CMakeLists.txt | 78 ++++++++++++++++++++-------------------------------------- + 1 file changed, 27 insertions(+), 51 deletions(-) -commit e4fc1d2f9571fba79ce383595be2ea2a9257def0 +commit 028185dd4889e3d6235ff13560160ebca6985021 Author: Lasse Collin -Date: 2014-11-28 20:07:18 +0200 +Date: 2024-07-09 14:27:51 +0300 - Update INSTALL about a "make check" failure in test_scripts.sh. + Update THANKS - INSTALL | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 34f9e40a0a0c3bd2c2730cdb9cd550bbb8a3f2fe +commit baecfa142644eb5f5c6dd6f8e2f531c362fa3747 Author: Lasse Collin -Date: 2014-11-26 20:12:27 +0200 +Date: 2024-07-06 14:04:48 +0300 - Remove LZMA_UNSTABLE macro. + xz: Remove the TODO comment about --recursive + + It won't be implemented. find + xargs is more flexible, for example, + it allows compressing small files in parallel. An example for that + has been included in the xz man page since 2010. - src/liblzma/api/lzma/container.h | 4 ---- - src/liblzma/common/common.h | 2 -- - src/xz/private.h | 1 - - 3 files changed, 7 deletions(-) + src/xz/args.c | 1 - + 1 file changed, 1 deletion(-) -commit 6d9c0ce9f2677b159e32b224aba5b535b304a705 +commit f691d58fae82bd815c5f86ffad10fe9b6b59dad8 Author: Lasse Collin -Date: 2014-11-26 20:10:33 +0200 +Date: 2024-07-06 14:04:16 +0300 - liblzma: Update lzma_stream_encoder_mt() API docs. + Document --disable-loongarch-crc32 in INSTALL - src/liblzma/api/lzma/container.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + INSTALL | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit 2301f3f05dd9742f42cda8f0f318864f5dc39ab3 +commit b3e53122f42796aaebd767bab920cf7bedf69966 Author: Lasse Collin -Date: 2014-11-25 12:32:05 +0200 +Date: 2024-07-03 20:45:48 +0300 - liblzma: Verify the filter chain in threaded encoder initialization. + CMake: Link xz against Threads::Threads if using pthreads - This way an invalid filter chain is detected at the Stream - encoder initialization instead of delaying it to the first - call to lzma_code() which triggers the initialization of - the actual filter encoder(s). + The liblzma target was recently changed to link against Threads::Threads + with the PRIVATE keyword. I had forgotten that xz itself depends on + pthreads too due to pthread_sigmask(). Thus, the build broke when + building shared liblzma and pthread_sigmask() wasn't in libc. + + Thanks to Peter Seiderer for the bug report. + + Fixes: ac05f1b0d7cda1e7ae79775a8dfecc54601d7f1c + Fixes: https://github.com/tukaani-project/xz/issues/129#issuecomment-2204522994 - src/liblzma/common/stream_encoder_mt.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + CMakeLists.txt | 13 +++++++++++++ + 1 file changed, 13 insertions(+) -commit 107a263d5bb63cd3593fd6a5c938706539f84523 +commit 5742ec1fc7f2cf1c82cfe3477bb90594a4658374 Author: Lasse Collin -Date: 2014-11-17 19:11:49 +0200 +Date: 2024-07-02 22:49:33 +0300 - Build: Update m4/ax_pthread.m4 from Autoconf Archive. + Update THANKS - m4/ax_pthread.m4 | 71 +++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 47 insertions(+), 24 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit b13a781833399ff5726cfc997f3cb2f0acbdbf31 +commit 2d13d10357ecad243d7e4ff1de0e6b437c38a47a Author: Lasse Collin -Date: 2014-11-17 18:52:21 +0200 +Date: 2024-07-02 20:23:35 +0300 - Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING. + CMake: Improve NLS error messages - configure.ac | 36 ++++++++++++++++++------------------ - m4/tuklib_integer.m4 | 2 +- - 2 files changed, 19 insertions(+), 19 deletions(-) + CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) -commit 542cac122ed3550148a2af0033af22b757491378 +commit 628d8d2c4fdf9e6a91c7bba7a743f400a94c2909 Author: Lasse Collin -Date: 2014-11-17 18:43:19 +0200 +Date: 2024-07-02 20:19:47 +0300 - Build: Fix Autoconf warnings about escaped backquotes. + CMake: Update the comment at the top of CMakeLists.txt - Thanks to Daniel Richard G. for pointing out that it's - good to sometimes run autoreconf -fi with -Wall. + While po/*.gmo files won't be used from the release tarball, + the generated translated man pages will be used still. Those + are text files and po4a has slightly more dependencies than + gettext tools so installing po4a might be a bit more challenging + in some situations. - configure.ac | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) + CMakeLists.txt | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) -commit 7b03a15cea8cd4f19ed680b51c4bcbae3ce4142f +commit b4b23c94fd4429abc663ced28d5cdc9cf7eb7507 Author: Lasse Collin -Date: 2014-11-10 18:54:40 +0200 +Date: 2024-07-02 20:12:40 +0300 - xzdiff: Use mkdir if mktemp isn't available. + CMake: Drop support for pre-generated po/*.gmo files + + When a release tarball is created using Autotools, the tarball includes + po/*.gmo files which are binary files generated from po/*.po. Other + tarball creation methods don't and won't create the .gmo files. + + It feels clearer if CMake will never install pre-generated binary files + from the source package. If people are able to install CMake, they + likely are able to install gettext tools as well (assuming they want + translations). - src/scripts/xzdiff.in | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) + CMakeLists.txt | 66 +++++++++++++++++++--------------------------------------- + 1 file changed, 21 insertions(+), 45 deletions(-) -commit f8c13e5e3609581d5dd9f8777985ca07f2390ad7 +commit fb99f8e8c50171b898cb79fe1dc703d5f91e4f0a Author: Lasse Collin -Date: 2014-11-10 18:45:01 +0200 +Date: 2024-07-02 19:14:50 +0300 - xzdiff: Create a temporary directory to hold a temporary file. + CMake: Make XZ_NLS handling more robust - This avoids the possibility of "File name too long" when - creating a temp file when the input file name is very long. + If a user set XZ_NLS=ON but find_package(Intl) failed or CMake version + wasn't at least 3.20, the configuration would fail in a cryptic way. - This also means that other users on the system can no longer - see the input file names in /tmp (or whatever $TMPDIR is) - since the temporary directory will have a generic name. This - usually doesn't matter since on many systems one can see - the arguments given to all processes anyway. + If XZ_NLS is enabled, require that CMake is new enough and that either + gettext tools or pre-generated .gmo files are available. Otherwise fail + the configuration. Previously missing gettext tools and .gmo files would + only result in a warning. - The number X chars to mktemp where increased from 6 to 10. + Missing man page translations are still only a warning. - Note that with some shells temp files or dirs won't be used at all. - - src/scripts/xzdiff.in | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 7716dcf9df7f457500cb657314e7a9aea5fedb06 -Author: Lasse Collin -Date: 2014-11-10 15:38:47 +0200 - - liblzma: Fix lzma_mt.preset in lzma_stream_encoder_mt_memusage(). + Thanks to Peter Seiderer for the bug report. - It read the filter chain from a wrong variable. This is a similar - bug that was fixed in 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e. + Fixes: https://github.com/tukaani-project/xz/issues/129 + Closes: https://github.com/tukaani-project/xz/pull/130 - src/liblzma/common/stream_encoder_mt.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + CMakeLists.txt | 82 ++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 46 insertions(+), 36 deletions(-) -commit 230fa4a605542c84b4178a57381695a0af4e779b +commit ec6157570ea8a8e38158894e530d35416ff6a0f8 Author: Lasse Collin -Date: 2014-11-10 14:49:55 +0200 +Date: 2024-07-02 19:39:05 +0300 - Update THANKS. + CI: Add gettext as a dependency to CMake builds - THANKS | 1 + - 1 file changed, 1 insertion(+) + .github/workflows/ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 4e4ae08bc7c1711e399c9f2d26eb375d39d08101 +commit 24f0f7e399de03bb2ff675d97b723d14f17ed6ac Author: Lasse Collin -Date: 2014-10-29 21:28:25 +0200 +Date: 2024-07-02 18:43:56 +0300 - Update .gitignore files. + CMake: Fix ENABLE_NLS comment too + + Fixes: 29f77c7b707f2458fb047e77497354b195e05b14 - .gitignore | 2 ++ - m4/.gitignore | 3 +++ - 2 files changed, 5 insertions(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit c923b140b27d1a055db6284e10fd546ad1a7fcdb +commit a0df0676130bc565af0ec911e68a1d0fbc3ed0fb Author: Lasse Collin -Date: 2014-10-29 21:15:35 +0200 +Date: 2024-07-02 18:02:50 +0300 - Build: Prepare to support Automake's subdir-objects. - - Due to a bug in Automake, subdir-objects won't be enabled - for now. + CMake: The compile definition is ENABLE_NLS, not XZ_NLS - http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354 + The CMake variables were renamed and accidentally also + the compile definition was renamed. As a result, translation + support wasn't actually enabled in the executables. - Thanks to Daniel Richard G. for the original patches. + Fixes: 29f77c7b707f2458fb047e77497354b195e05b14 - configure.ac | 7 ++++++- - src/Makefile.am | 22 +++++++++++++++++++++- - src/liblzma/Makefile.am | 4 ++-- - src/lzmainfo/Makefile.am | 4 ++-- - src/xz/Makefile.am | 10 +++++----- - src/xzdec/Makefile.am | 8 ++++---- - 6 files changed, 40 insertions(+), 15 deletions(-) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 08c2aa16bea0df82828f665d51fba2e0a5e8997f +commit 45d08abc33ccc52d2f050dcec458badc2ce59d0b Author: Lasse Collin -Date: 2014-10-24 20:09:29 +0300 +Date: 2024-07-01 17:33:20 +0300 - Translations: Update the Italian translation. - - Thanks to Milo Casagrande. + Update AUTHORS and THANKS - po/it.po | 452 ++++++++++++++++++++++++++++++++++++++------------------------- - 1 file changed, 275 insertions(+), 177 deletions(-) + AUTHORS | 2 +- + THANKS | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) -commit 2f9f61aa83539c54ff6c118a2693890f0519b3dd -Author: Lasse Collin -Date: 2014-10-18 18:51:45 +0300 +commit 7baf6835cfbf9c85ba37f9ffb7d4f87fb86a474e +Author: Xi Ruoyao +Date: 2024-06-28 13:36:43 +0300 - Translations: Update the Polish translation. + liblzma: Speed up CRC32 calculation on 64-bit LoongArch - Thanks to Jakub Bogusz. - - po/pl.po | 332 ++++++++++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 214 insertions(+), 118 deletions(-) - -commit 4f9d233f67aea25e532824d11b7642cf7dee7a76 -Author: Andre Noll -Date: 2014-10-14 17:30:30 +0200 - - l10n: de.po: Change translator email address. + The crc.w.{b/h/w/d}.w instructions in LoongArch can calculate the CRC32 + result for 1/2/4/8 bytes in a single operation. Using these is much + faster compared to the generic method. + + Optimized CRC32 is enabled unconditionally on 64-bit LoongArch because + the LoongArch specification says that CRC32 instructions shall be + implemented for 64-bit processors. Optimized CRC32 isn't enabled for + 32-bit LoongArch processors because not enough information is available + about them. - Although the old address is still working, the new one should - be preferred. So this commit changes all three places in de.po - accordingly. + Co-authored-by: Lasse Collin - Signed-off-by: Andre Noll + Closes: https://github.com/tukaani-project/xz/pull/86 - po/de.po | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + CMakeLists.txt | 25 ++++++++++++++ + configure.ac | 40 +++++++++++++++++++++++ + src/liblzma/check/Makefile.inc | 3 +- + src/liblzma/check/crc32_fast.c | 2 ++ + src/liblzma/check/crc32_loongarch.h | 65 +++++++++++++++++++++++++++++++++++++ + src/liblzma/check/crc_common.h | 15 +++++++++ + 6 files changed, 149 insertions(+), 1 deletion(-) -commit 00502b2bedad43f0cc167ac17ae0608837ee196b -Author: Andre Noll -Date: 2014-10-14 17:30:29 +0200 +commit 0ed893668554fb0758003289f8a6af9bd08b89d1 +Author: Lasse Collin +Date: 2024-06-28 14:20:49 +0300 - l10n: de.po: Update German translation + liblzma: ARM64 CRC32: Align the buffer faster - Signed-off-by: Andre Noll + Instead of doing it byte by byte, use the 1/2/4-byte CRC32 instructions. - po/de.po | 531 +++++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 281 insertions(+), 250 deletions(-) + src/liblzma/check/crc32_arm64.h | 54 ++++++++++++++++++++++++++++++----------- + 1 file changed, 40 insertions(+), 14 deletions(-) -commit 706b0496753fb609e69f1570ec603f11162189d1 -Author: Andre Noll -Date: 2014-10-14 17:30:28 +0200 +commit 7e99856f66c07852c4e0de7aa01951e9147d86b0 +Author: Sam James +Date: 2024-06-28 14:18:35 +0300 - l10n: de.po: Fix typo: Schießen -> Schließen. + CI: Speed up Valgrind job by using --trace-children-skip-by-arg=... - That's a funny one since "schießen" means to shoot :) - - Signed-off-by: Andre Noll + This addresses the issue I mentioned in + 6c095a98fbec70b790253a663173ecdb669108c4 and speeds up the Valgrind + job a bit, because non-xz tools aren't run unnecessarily with + Valgrind by the script tests. - po/de.po | 2 +- + .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 7c32e6a935c3d7ee366abad1679bd5f322f0c7d4 +commit 2402e8a1ae92676fa0d4cb1b761d7f62f005c098 Author: Lasse Collin -Date: 2014-10-09 19:42:26 +0300 +Date: 2024-06-25 16:00:22 +0300 - Update THANKS. + Build: Prepend, not append, PTHREAD_CFLAGS to LIBS + + It shouldn't make any difference because LIBS should be empty + at that point in configure. But prepending is the correct way + because in general the libraries being added might require other + libraries that come later on the command line. - THANKS | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 076258cc458f1e705041ac7a729b15ffe8c5214a +commit 7bb46f2b7b3989c1b589a247a251470f65e91cda Author: Lasse Collin -Date: 2014-10-09 19:41:51 +0300 +Date: 2024-06-25 14:24:29 +0300 - Add support for AmigaOS/AROS to tuklib_physmem(). + Build: Use AC_LINK_IFELSE to handle implicit function declarations + + It's more robust in case the compiler allows pre-C99 implicit function + declarations. If an x86 intrinsic is missing and gets treated as + implicit function, the linking step will very probably fail. This + isn't the only way to workaround implicit function declarations but + it might be the simplest and cleanest. - Thanks to Fredrik Wikstrom. + The problem hasn't been observed in the wild. + + There are a couple more AC_COMPILE_IFELSE uses in configure.ac. + Of these, Landlock check calls prctl() and in theory could have + the same problem. In practice it doesn't as the check program + looks for several other things too. However, it was changed to + AC_LINK_IFELSE still to look more correct. + + Similarly, m4/tuklib_cpucores.m4 and m4/tuklib_physmem.m4 were + updated although they haven't given any trouble either. They + have worked all these years because those check programs rely + on specific headers and types: if headers or types are missing, + compilation will fail. Using the linker makes these checks more + similar to the ones in cmake/tuklib_*.cmake which always link. - m4/tuklib_physmem.m4 | 3 ++- - src/common/tuklib_physmem.c | 7 +++++++ - 2 files changed, 9 insertions(+), 1 deletion(-) + configure.ac | 8 ++++++-- + m4/tuklib_cpucores.m4 | 8 ++++---- + m4/tuklib_physmem.m4 | 17 +++++++++++------ + 3 files changed, 21 insertions(+), 12 deletions(-) -commit efa7b0a210e1baa8e128fc98c5443a944c39ad24 +commit 35eb57355ad1c415a838d26192d5af84abb7cf39 Author: Lasse Collin -Date: 2014-10-09 18:42:14 +0300 +Date: 2024-06-24 23:35:59 +0300 - xzgrep: Avoid passing both -q and -l to grep. + Build: Use AC_LINK_IFELSE instead of -Werror - The behavior of grep -ql varies: - - GNU grep behaves like grep -q. - - OpenBSD grep behaves like grep -l. + AC_COMPILE_IFELSE needed -Werror because Clang <= 14 would merely + warn about the unsupported attribute and implicit function declaration. + Changing to AC_LINK_IFELSE handles the implicit declaration because + the symbol __crc32d is unlikely to exist in libc. - POSIX doesn't make it 100 % clear what behavior is expected. - Anyway, using both -q and -l at the same time makes no sense - so both options simply should never be used at the same time. + Note that the other part of the check is that #include + must work. If the header is missing, most compilers give an error + and the linking step won't be attempted. - Thanks to Christian Weisgerber. + Avoiding -Werror makes the check more robust in case CFLAGS contains + warning flags that break -Werror anyway (but this isn't the only check + in configure.ac that has this problem). Using AC_LINK_IFELSE also makes + the check more similar to how it is done in CMakeLists.txt. - src/scripts/xzgrep.in | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + configure.ac | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) -commit 9c5f76098c9986b48d2fc574a0b764f4cde0c538 -Author: Trần Ngọc Quân -Date: 2014-09-25 09:22:45 +0700 +commit 5a728813c378cc3c4c9c95793762452418d08f1b +Author: Lasse Collin +Date: 2024-06-24 23:34:34 +0300 - l10n: vi.po: Update Vietnamese translation + Build: Sync the compile check changes from CMakeLists.txt - Signed-off-by: Trần Ngọc Quân + It's nice to keep these in sync. The use of main() will later allow + AC_LINK_IFELSE usage too which may avoid the more fragile -Werror. - po/vi.po | 136 +++++++++++++++++++++++++++++++++++++++------------------------ - 1 file changed, 84 insertions(+), 52 deletions(-) + configure.ac | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) -commit c4911f2db36d811896c73c008b4218d8fa9a4730 +commit 5279828635a95abdef82e691fc4979d362780e63 Author: Lasse Collin -Date: 2014-09-25 18:38:48 +0300 +Date: 2024-06-24 20:14:43 +0300 - Build: Detect supported compiler warning flags better. + CMake: Not experimental anymore + + While the CMake support has gotten a lot less testing than + the Autotools-based build, the supported features should now + be equal. The output may differ slightly, for example, + liblzma.pc may have + + Libs.private: -pthread -lpthread - Clang and nowadays also GCC accept any -Wfoobar option - but then may give a warning that an unknown warning option - was specified. To avoid adding unsupported warning options, - the options are now tested with -Werror. + with Autotools on GNU/Linux. CMake doesn't put any options + in Libs.private because on modern glibc the pthread functions + are in libc. The options options aren't required to link static + liblzma into an application. - Thanks to Charles Diza. + Autotools-based build doesn't generate or install + lib/cmake/liblzma-*.cmake files. This means that on most + platforms one cannot rely on + + find_package(liblzma 5.2.5 REQUIRED CONFIG) + + or such finding those files. - configure.ac | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + CMakeLists.txt | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) -commit 76e75522ed6f5c228d55587dee5a997893f6e474 +commit de215a0517645d16343f3a5336d3df884a4f665f Author: Lasse Collin -Date: 2014-09-20 21:01:21 +0300 +Date: 2024-06-25 16:11:13 +0300 - Update NEWS for 5.0.7. + CMake: Use configure_file() to copy a file + + I had missed this simpler method before. It does create a dependency + so that if .in.h changes the copying is done again. - NEWS | 11 +++++++++++ - 1 file changed, 11 insertions(+) + CMakeLists.txt | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) -commit d62028b4c1174fc67b6929f126f5eb24c018c700 +commit e620f35097c0ad20cd76d8258750aa706758ced9 Author: Lasse Collin -Date: 2014-09-20 19:42:56 +0300 +Date: 2024-06-25 15:51:48 +0300 - liblzma: Fix a portability problem in Makefile.am. - - POSIX supports $< only in inference rules (suffix rules). - Using it elsewhere is a GNU make extension and doesn't - work e.g. with OpenBSD make. + CMake: Always add pthread flags into CMAKE_REQUIRED_LIBRARIES - Thanks to Christian Weisgerber for the patch. + It was weird to add CMAKE_THREAD_LIBS_INIT in CMAKE_REQUIRED_LIBRARIES + only if CLOCK_MONOTONIC is available. Alternative would be to remove + the thread libs from CMAKE_REQUIRED_LIBRARIES after the check for + pthread_condattr_setclock() but keeping the libs should be fine too. + Then it's ready in case more pthread functions were wanted some day. - src/liblzma/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit c35de31d4283edad3e57d37ffe939406542cb7bb -Author: Lasse Collin -Date: 2014-09-14 21:54:09 +0300 +commit 068a70e54932ca32ca2922aff5a67a62615c650b +Author: Sam James +Date: 2024-06-24 19:25:30 +0100 - Bump the version number to 5.1.4beta. + CMake: Tweak comments + + Co-authored-by: Lasse Collin - src/liblzma/api/lzma/version.h | 4 ++-- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + CMakeLists.txt | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) -commit e9e097e22cacdaa23e5414fea7913535449cb340 +commit 3c95c93bca593bdd54ac5cc01526b12c82c78faa Author: Lasse Collin -Date: 2014-09-14 21:50:13 +0300 +Date: 2024-06-24 22:42:01 +0300 - Update NEWS for 5.0.6 and 5.1.4beta. + CMake: Edit white space for consistency - NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 50 insertions(+) + CMakeLists.txt | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) -commit 642f856bb8562ab66704b1e01ac7bc08b6d0a663 +commit 114cba69dbb96003e676c8c87a2e9943b12d065f Author: Lasse Collin -Date: 2014-09-14 21:02:41 +0300 +Date: 2024-06-24 22:41:10 +0300 - Update TODO. + CMake: Fix three checks if building with -flto + + In CMake, check_c_source_compiles() always links too. With + link-time optimization, unused functions may get omitted if + main() doesn't depend on them. Consider the following which + tries to check if somefunction() is available when + has been included: + + #include + int foo(void) { return somefunction(); } + int main(void) { return 0; } + + LTO may omit foo() completely because the program as a whole doesn't + need it and then the program will link even if the symbol somefunction + isn't available in libc or other library being linked in, and then + the test may pass when it shouldn't. + + What happens if doesn't declare somefunction()? + Shouldn't the test fail in the compilation phase already? It should + but many compilers don't follow the C99 and later standards that + prohibit implicit function declarations. Instead such compilers + assume that somefunction() exists, compilation succeeds (with a + warning), and then linker with LTO omits the call to somefunction(). + + Change the tests so that they are part of main(). If compiler accepts + implicitly declared functions, LTO cannot omit them because it has to + assume that they might have side effects and thus linking will fail. + On the other hand, if the functions/intrinsics being used are supported, + they might get optimized away but in that case it's fine because they + really are supported. + + It is fine to use __attribute__((target(...))) for main(). At least + it works with GCC 4.9 to 14.1 on x86-64. + + Reported-by: Sam James - TODO | 38 ++++++++++++++++++++++++++++++++++---- - 1 file changed, 34 insertions(+), 4 deletions(-) + CMakeLists.txt | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) -commit 6b5e3b9eff5b8cedb2aac5f524d4d60fc8a48124 +commit 78e882205e1f1e91df2af2cb7da00fe205dede99 Author: Lasse Collin -Date: 2014-08-05 22:32:36 +0300 +Date: 2024-06-24 21:19:14 +0300 - xz: Add --ignore-check. + CMake: Use MATCHES instead of multiple STREQUAL - src/xz/args.c | 7 +++++++ - src/xz/args.h | 1 + - src/xz/coder.c | 10 +++++++++- - src/xz/message.c | 2 ++ - src/xz/xz.1 | 19 +++++++++++++++++++ - 5 files changed, 38 insertions(+), 1 deletion(-) + CMakeLists.txt | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) -commit 9adbc2ff373f979c917cdfd3679ce0ebd59f1040 +commit d3f20382fc1bd865eb70a65455d5022ed05caac8 Author: Lasse Collin -Date: 2014-08-05 22:15:07 +0300 +Date: 2024-06-24 21:06:18 +0300 - liblzma: Add support for LZMA_IGNORE_CHECK. + CMake: Improve the comment about LIBS - src/liblzma/api/lzma/container.h | 24 ++++++++++++++++++++++++ - src/liblzma/common/common.h | 1 + - src/liblzma/common/stream_decoder.c | 14 ++++++++++++-- - 3 files changed, 37 insertions(+), 2 deletions(-) + CMakeLists.txt | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6 +commit 33ec377729a3889e58d98934b2777b2754a3e045 Author: Lasse Collin -Date: 2014-08-05 22:03:30 +0300 +Date: 2024-06-24 20:01:25 +0300 - liblzma: Add support for lzma_block.ignore_check. + CMake: Fix a typo in a message - Note that this slightly changes how lzma_block_header_decode() - has been documented. Earlier it said that the .version is set - to the lowest required value, but now it says that the .version - field is kept unchanged if possible. In practice this doesn't - affect any old code, because before this commit the only - possible .version was 0. + It was spotted with codespell. - src/liblzma/api/lzma/block.h | 50 ++++++++++++++++++++++++------- - src/liblzma/common/block_buffer_encoder.c | 2 +- - src/liblzma/common/block_decoder.c | 18 ++++++++--- - src/liblzma/common/block_encoder.c | 2 +- - src/liblzma/common/block_header_decoder.c | 12 ++++++-- - src/liblzma/common/block_header_encoder.c | 2 +- - src/liblzma/common/block_util.c | 2 +- - 7 files changed, 68 insertions(+), 20 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 71e1437ab585b46f7a25f5a131557d3d1c0cbaa2 +commit 2a47be823cd6c717bc91fa29c7710c9b1ae0331f Author: Lasse Collin -Date: 2014-08-04 19:25:58 +0300 +Date: 2024-06-24 19:58:54 +0300 - liblzma: Use lzma_memcmplen() in the BT3 match finder. - - I had missed this when writing the commit - 5db75054e900fa06ef5ade5f2c21dffdd5d16141. - - Thanks to Jun I Jin. + Document CMake options in INSTALL - src/liblzma/lz/lz_encoder_mf.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) + INSTALL | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 106 insertions(+), 9 deletions(-) -commit 41dc9ea06e1414ebe8ef52afc8fc15b6e3282b04 +commit 3faf4e8079a46bd46e05cd1234365724a6a33802 Author: Lasse Collin -Date: 2014-08-04 00:25:44 +0300 +Date: 2024-06-24 17:18:44 +0300 - Update THANKS. + CI: Don't omit crc32 from the list with CMake anymore + + XZ_CHECKS accepts it but works without too. - THANKS | 1 + - 1 file changed, 1 insertion(+) + build-aux/ci_build.bash | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) -commit 5dcffdbcc23a68abc3ac3539b30be71bc9b5af84 +commit 1bf83cded2955282fe1a868f08c83d4e5d6dca4a Author: Lasse Collin -Date: 2014-08-03 21:32:25 +0300 +Date: 2024-06-24 17:39:54 +0300 - liblzma: SHA-256: Optimize the Maj macro slightly. + CI: Workaround buggy config.guess on Ubuntu 22.04LTS and 24.04LTS + + Check for the wrong triplet from config.guess and override it with + the --build option on the configure command line. Then i386 assembly + autodetection will work. + + These Ubuntu versions (and as of writing, also Debian unstable) + ship config.guess version 2022-01-09 which contains a bug that + was fixed in version 2022-05-08. It results in a wrong configure + triplet when using CC="gcc -m32" to build i386 binaries. - The Maj macro is used where multiple things are added - together, so making Maj a sum of two expressions allows - some extra freedom for the compiler to schedule the - instructions. + Upstream fix: + https://git.savannah.gnu.org/cgit/config.git/commit/?id=f56a7140386d08a531bcfd444d632b28c61a6329 - I learned this trick from - . + More information: + https://mail.gnu.org/archive/html/config-patches/2022-05/msg00003.html - src/liblzma/check/sha256.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + build-aux/ci_build.bash | 9 +++++++++ + 1 file changed, 9 insertions(+) -commit a9477d1e0c6fd0e47e637d051e7b9e2a5d9af517 +commit dbcdabf68fee9ed694b68c3a82e6adbeff20b679 Author: Lasse Collin -Date: 2014-08-03 21:08:12 +0300 +Date: 2024-06-24 15:24:52 +0300 - liblzma: SHA-256: Optimize the way rotations are done. - - This looks weird because the rotations become sequential, - but it helps quite a bit on both 32-bit and 64-bit x86: - - - It requires fewer instructions on two-operand - instruction sets like x86. + CI: Use CC="gcc -m32" to get i386 compiler on x86-64 - - It requires one register less which matters especially - on 32-bit x86. - - I hope this doesn't hurt other archs. - - I didn't invent this idea myself, but I don't remember where - I saw it first. + The old method put it in CFLAGS which is a wrong place because + config.guess doesn't read CFLAGS. - src/liblzma/check/sha256.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) + .github/workflows/ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 5a76c7c8ee9a0afbeedb1c211db9224260404347 +commit 0c1e6d900bac127464fb30a854776e1810ab5f16 Author: Lasse Collin -Date: 2014-08-03 20:38:13 +0300 +Date: 2024-06-24 14:54:17 +0300 - liblzma: SHA-256: Remove the GCC #pragma that became unneeded. + CI: Let CMake use the CC environment variable - The unrolling in the previous commit should avoid the - situation where a compiler may think that an uninitialized - variable might be accessed. - - src/liblzma/check/sha256.c | 5 ----- - 1 file changed, 5 deletions(-) - -commit 9a096f8e57509775c331950b8351bbca77bdcfa8 -Author: Lasse Collin -Date: 2014-08-03 20:33:38 +0300 - - liblzma: SHA-256: Unroll a little more. + CC from environment is used to initialize CMAKE_C_COMPILER so + setting CMAKE_C_COMPILER explicitly isn't needed. - This way a branch isn't needed for each operation - to choose between blk0 and blk2, and still the code - doesn't grow as much as it would with full unrolling. - - src/liblzma/check/sha256.c | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) - -commit bc7650d87bf27f85f1a2a806dc2db1780e09e6a5 -Author: Lasse Collin -Date: 2014-08-03 19:56:43 +0300 + The syntax in ci_build.bash was broken in case one wished to put + spaces in CC. - liblzma: SHA-256: Do the byteswapping without a temporary buffer. - - src/liblzma/check/sha256.c | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) + build-aux/ci_build.bash | 4 ---- + 1 file changed, 4 deletions(-) -commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 +commit a3d6eb797c1bd9b0425ef6754e475e43e62bf075 Author: Lasse Collin -Date: 2014-07-25 22:38:28 +0300 +Date: 2024-06-20 23:25:42 +0300 - liblzma: Use lzma_memcmplen() in normal mode of LZMA. - - Two locations were not changed yet because the simplest change - assumes that the initial "len" may be greater than "limit". + CMake: Add autodetection for 32-bit x86 CRC assembly usage - src/liblzma/lzma/lzma_encoder_optimum_normal.c | 20 +++++--------------- - 1 file changed, 5 insertions(+), 15 deletions(-) + CMakeLists.txt | 33 ++++++++++++++++++--------------- + 1 file changed, 18 insertions(+), 15 deletions(-) -commit f48fce093b07aeda95c18850f5e086d9f2383380 +commit dbc14f213e5cf866f1f42b7c6381a91e1189908c Author: Lasse Collin -Date: 2014-07-25 22:30:38 +0300 +Date: 2024-06-20 23:00:59 +0300 - liblzma: Simplify LZMA fast mode code by using memcmp(). + CMake: Move option(XZ_ASM_I386) downwards a few lines - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 11 +---------- - 1 file changed, 1 insertion(+), 10 deletions(-) + CMakeLists.txt | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit 6bf5308e34e23dede5b301b1b9b4f131dacd9218 +commit e5c2b07b489b155c1bebd5cb5e5b94325c2fef1a Author: Lasse Collin -Date: 2014-07-25 22:29:49 +0300 +Date: 2024-06-20 18:45:41 +0300 - liblzma: Use lzma_memcmplen() in fast mode of LZMA. + DOS: Update Makefile and config.h for the CRC changes - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + dos/Makefile | 4 ++-- + dos/config.h | 3 +++ + 2 files changed, 5 insertions(+), 2 deletions(-) -commit 353212137e51e45b105a3a3fc2e6879f1cf0d492 +commit fe77c4e130d62dc3f9c1de40a18c0c6caa5a4d88 Author: Lasse Collin -Date: 2014-07-25 21:16:23 +0300 +Date: 2024-06-23 15:35:35 +0300 - Update THANKS. + liblzma: Tidy up crc_common.h + + Prefix ARM64_RUNTIME_DETECTION with CRC_ and reorder it to be with + the other ARM64-specific lines. That macro isn't used outside this + file. + + ARM64 CLMUL implementation doesn't exist yet and thus CRC64_ARM64_CLMUL + isn't used anywhere yet. + + It's not ideal that the single-letter CRC utility macros are here + as they pollute the namespace of the LZ encoder files. Those could + be moved their own crc_macros.h like they were in 5.2.x but in practice + this is fine enough already. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc_common.h | 62 ++++++++++++++++++++++++++++-------------- + 1 file changed, 42 insertions(+), 20 deletions(-) -commit 5db75054e900fa06ef5ade5f2c21dffdd5d16141 +commit 7484d375384f551d475ff44a93590a225e0cb8f6 Author: Lasse Collin -Date: 2014-07-25 21:15:07 +0300 +Date: 2024-06-23 14:22:08 +0300 - liblzma: Use lzma_memcmplen() in the match finders. + liblzma: Move lzma_crcXX_table[][] declarations to crc_common.h - This doesn't change the match finder output. + LZ encoder needs lzma_crc32_table[0] but otherwise those tables + are private to the CRC code. In contrast, the other things in + check.h are needed in several places. - src/liblzma/lz/lz_encoder.c | 13 ++++++++++++- - src/liblzma/lz/lz_encoder_mf.c | 33 +++++++++++---------------------- - 2 files changed, 23 insertions(+), 23 deletions(-) + src/liblzma/check/check.h | 18 ------------------ + src/liblzma/check/crc32_small.c | 3 +++ + src/liblzma/check/crc_common.h | 18 ++++++++++++++++++ + src/liblzma/lz/lz_encoder_hash.h | 4 ++-- + 4 files changed, 23 insertions(+), 20 deletions(-) -commit e1c8f1d01f4a4e2136173edab2dc63c71ef038f4 +commit 85b081f5d4598342b8c155a2c08697fb2adc372c Author: Lasse Collin -Date: 2014-07-25 20:57:20 +0300 +Date: 2024-06-19 18:38:22 +0300 - liblzma: Add lzma_memcmplen() for fast memory comparison. + liblzma: Make 32-bit x86 CRC assembly co-exist with CLMUL - This commit just adds the function. Its uses will be in - separate commits. + Now runtime detection of CLMUL support can pick between the CLMUL and + the generic assembly implementations. Whatever overhead this has for + builds that omit CLMUL completely isn't important because builds for + any non-ancient system is likely to include the CLMUL code too. - This hasn't been tested much yet and it's perhaps a bit early - to commit it but if there are bugs they should get found quite - quickly. + Handle the CRC tables in crcXX_fast.c files because now these files + are built even when assembly code is used. - Thanks to Jun I Jin from Intel for help and for pointing out - that string comparison needs to be optimized in liblzma. + If 32-bit x86 assembly is enabled then it will always be built even + if compiler flags were such that CLMUL would be allowed unconditionally. + That is, runtime detection will be used anyway. This keeps the build + rules simpler. + + In LZ encoder, build and use lzma_lz_hash_table[256] if CLMUL CRC + is used without runtime detection. Previously this wasn't needed + because crc32_table.c included the lzma_crc32_table[][] in the build + unless encoder support had been disabled. Including an 8 KiB table + was silly when only 1 KiB is actually used. So now liblzma is 7 KiB + smaller if CLMUL is enabled without runtime detection. - configure.ac | 13 +++ - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/memcmplen.h | 170 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 184 insertions(+) + CMakeLists.txt | 8 ++------ + src/liblzma/check/Makefile.inc | 8 ++------ + src/liblzma/check/crc32_fast.c | 14 ++++++++++++- + src/liblzma/check/crc32_table.c | 42 --------------------------------------- + src/liblzma/check/crc32_x86.S | 14 +++++-------- + src/liblzma/check/crc64_fast.c | 18 +++++++++++++---- + src/liblzma/check/crc64_table.c | 37 ---------------------------------- + src/liblzma/check/crc64_x86.S | 14 +++++-------- + src/liblzma/check/crc_common.h | 18 +++++++++-------- + src/liblzma/check/crc_x86_clmul.h | 5 ----- + src/liblzma/lz/lz_encoder.c | 2 +- + src/liblzma/lz/lz_encoder_hash.h | 30 ++++++++++++++++++++-------- + 12 files changed, 74 insertions(+), 136 deletions(-) -commit 765735cf52e5123586e74a51b9c073b5257f631f +commit 6667d503b5dc9826654e3d9ad505e1883ff6c388 Author: Lasse Collin -Date: 2014-07-12 21:10:09 +0300 +Date: 2024-06-19 17:44:41 +0300 - Update THANKS. + liblzma: CRC: Rename crcXX_generic to lzma_crcXX_generic + + This prepares for the possibility that lzma_crc32_generic and + lzma_crc64_generic are extern functions. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_fast.c | 6 +++--- + src/liblzma/check/crc64_fast.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) -commit 59da01785ef66c7e62f36e70ca808fd2824bb995 +commit 1dca581ff20aa1cde61e9e5267d3aeb0af9b6845 Author: Lasse Collin -Date: 2014-07-12 20:06:08 +0300 +Date: 2024-06-20 22:55:22 +0300 - Translations: Add Vietnamese translation. - - Thanks to Trần Ngọc Quân. + CMake: Define HAVE_CRC_X86_ASM when 32-bit x86 CRC assembly is used - po/LINGUAS | 1 + - po/vi.po | 1007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 1008 insertions(+) + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) -commit 17215f751c354852700e7f8592ccf319570a0721 +commit f76837acb65676e541d8ee79cd62dbbf27280a62 Author: Lasse Collin -Date: 2014-06-29 20:54:14 +0300 +Date: 2024-05-10 16:00:26 +0300 - xz: Update the help message of a few options. + Build: Define HAVE_CRC_X86_ASM when 32-bit x86 CRC assembly is used - Updated: --threads, --block-size, and --block-list - Added: --flush-timeout + This makes it easier to determine when the CRC tables are needed. - src/xz/message.c | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) + configure.ac | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -commit 96864a6ddf91ad693d102ea165f3d7918744d582 +commit 9ce0866b070850da4dc837741ff055faa218bdd6 Author: Lasse Collin -Date: 2014-06-18 22:07:06 +0300 +Date: 2024-06-21 00:46:09 +0300 - xz: Use lzma_cputhreads() instead of own copy of tuklib_cpucores(). + CI: Update to the new renamed options in CMakeLists.txt - src/xz/Makefile.am | 1 - - src/xz/hardware.c | 12 +++++++++--- - 2 files changed, 9 insertions(+), 4 deletions(-) + build-aux/ci_build.bash | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit a115cc3748482e277f42a968baa3cd266f031dba +commit 0232e66d5bc5b01a25a447c657e51747626488ab Author: Lasse Collin -Date: 2014-06-18 22:04:24 +0300 +Date: 2024-06-20 18:12:22 +0300 - liblzma: Add lzma_cputhreads(). + CMake: Add XZ_EXTERNAL_SHA256 - src/liblzma/Makefile.am | 8 +++++++- - src/liblzma/api/lzma/hardware.h | 14 ++++++++++++++ - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/hardware_cputhreads.c | 22 ++++++++++++++++++++++ - src/liblzma/liblzma.map | 1 + - 5 files changed, 45 insertions(+), 1 deletion(-) + CMakeLists.txt | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 116 insertions(+), 5 deletions(-) -commit 3ce3e7976904fbab4e6482bafa442856f77a51fa +commit 4535b80caead82a7ddf7feb988b8fbc773152522 Author: Lasse Collin -Date: 2014-06-18 19:11:52 +0300 +Date: 2024-06-20 18:12:21 +0300 - xz: Check for filter chain compatibility for --flush-timeout. + CMake: Move threading detection a few lines up - This avoids LZMA_PROG_ERROR from lzma_code() with filter chains - that don't support LZMA_SYNC_FLUSH. + It feels clearer this way, and when support for external SHA-256 + is added, this will keep the order of the library detection the + same as in configure.ac (check for pthreads before libmd) although + it shouldn't matter in practice. - src/xz/coder.c | 30 +++++++++++++++++++++--------- - 1 file changed, 21 insertions(+), 9 deletions(-) + CMakeLists.txt | 176 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 88 insertions(+), 88 deletions(-) -commit 381ac14ed79e5d38809f251705be8b3193bba417 +commit 94d062dbac34d366eb26625034200cc3457e6645 Author: Lasse Collin -Date: 2014-06-13 19:21:54 +0300 +Date: 2024-06-20 18:12:21 +0300 - xzgrep: List xzgrep_expected_output in tests/Makefile.am. + CMake: Move the sandbox code out of the liblzma section + + Sandboxing is for the command line tools, not liblzma. + No functional changes. - tests/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + CMakeLists.txt | 214 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 107 insertions(+), 107 deletions(-) -commit 4244b65b06d5ecaf6f9dd0387ac7e3166bd2364e +commit 75ce4797d49621710e6da95d8cb91541028c6d68 Author: Lasse Collin -Date: 2014-06-13 18:58:22 +0300 +Date: 2024-06-20 18:12:21 +0300 - xzgrep: Improve the test script. + CMake: Keep existing options in LIBS when adding -lrt - Now it should be close to the functionality of the original - version by Pavel Raiskup. + This makes no difference yet because -lrt is currently the only option + that might be added to LIBS. - tests/Makefile.am | 3 ++- - tests/test_scripts.sh | 24 ++++++++++++++---------- - tests/xzgrep_expected_output | 39 +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 55 insertions(+), 11 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 1e60f2c0a0ee6c18b02943ce56214799a70aac26 +commit 47aaa92516fd9609821d04e5e94ca6558e56d62b Author: Lasse Collin -Date: 2014-06-11 21:03:25 +0300 +Date: 2024-06-15 18:07:04 +0300 - xzgrep: Add a test for the previous fix. + CMake: Don't install scripts if the xz tool isn't built - This is a simplified version of Pavel Raiskup's - original patch. + The scripts need the xz tool. - tests/test_scripts.sh | 26 ++++++++++++++++++++++---- - 1 file changed, 22 insertions(+), 4 deletions(-) + CMakeLists.txt | 11 +++++++++-- + tests/tests.cmake | 2 +- + 2 files changed, 10 insertions(+), 3 deletions(-) -commit ceca37901783988204caaf40dff4623d535cc789 +commit fb50c6ba1d4c9405e5b12b5988b01a3002638c5d Author: Lasse Collin -Date: 2014-06-11 20:43:28 +0300 +Date: 2024-06-15 18:07:04 +0300 - xzgrep: exit 0 when at least one file matches. - - Mimic the original grep behavior and return exit_success when - at least one xz compressed file matches given pattern. - - Original bugreport: - https://bugzilla.redhat.com/show_bug.cgi?id=1108085 - - Thanks to Pavel Raiskup for the patch. + CMake: Add XZ_TOOL_XZDEC and XZ_TOOL_LZMADEC - src/scripts/xzgrep.in | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) + CMakeLists.txt | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) -commit 8c19216baccb92d011694590df8a1262da2e980c +commit def767f7d18ccbd81cd5e5b46c8b6031f3a1de34 Author: Lasse Collin -Date: 2014-06-09 21:21:24 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Force single-threaded mode when --flush-timeout is used. + CMake: Add XZ_TOOL_LZMAINFO - src/xz/coder.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 87f1a24810805187d7bbc8ac5512e7eec307ddf5 +commit 5600e370fb7e11eafabc6c3ef5bf6510e859f4f0 Author: Lasse Collin -Date: 2014-05-25 22:05:39 +0300 +Date: 2024-06-15 18:07:04 +0300 - Update THANKS. + CMake: Add XZ_TOOL_XZ - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit da1718f266fcfc091e7bf08aae1bc986d0e6cc6b +commit 6a3c4aaa43a90da441e1156c5ffd2e6098f5521f Author: Lasse Collin -Date: 2014-05-25 21:45:56 +0300 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Use lzma_alloc_zero() in LZ encoder initialization. + Windows: Drop Visual Studio 2013 support - This avoids a memzero() call for a newly-allocated memory, - which can be expensive when encoding small streams with - an over-sized dictionary. + This simplifies things a little. Building liblzma with VS2013 probably + still worked but building the command line tools was not supported. - To avoid using lzma_alloc_zero() for memory that doesn't - need to be zeroed, lzma_mf.son is now allocated separately, - which requires handling it separately in normalize() too. - - Thanks to Vincenzo Innocente for reporting the problem. - - src/liblzma/lz/lz_encoder.c | 84 ++++++++++++++++++++++-------------------- - src/liblzma/lz/lz_encoder.h | 2 +- - src/liblzma/lz/lz_encoder_mf.c | 31 +++++++++------- - 3 files changed, 62 insertions(+), 55 deletions(-) + Microsoft ended support for VS2013 on 2024-04. -commit 28af24e9cf2eb259997c85dce13d4c97b3daa47a -Author: Lasse Collin -Date: 2014-05-25 19:25:57 +0300 - - liblzma: Add the internal function lzma_alloc_zero(). + CMakeLists.txt | 9 +++++++-- + src/common/sysdefs.h | 6 +----- + windows/INSTALL-MSVC.txt | 8 ++------ + 3 files changed, 10 insertions(+), 13 deletions(-) - src/liblzma/common/common.c | 21 +++++++++++++++++++++ - src/liblzma/common/common.h | 6 ++++++ - 2 files changed, 27 insertions(+) - -commit ed9ac85822c490e34b68c259afa0b385d21d1c40 +commit 5d5c92b26246936461a635dda1f95740d7de2058 Author: Lasse Collin -Date: 2014-05-08 18:03:09 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Fix uint64_t vs. size_t which broke 32-bit build. - - Thanks to Christian Hesse. + CMake: Add XZ_TOOL_SCRIPTS - src/xz/coder.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 44 +++++++++++++++++++++++++++++--------------- + 1 file changed, 29 insertions(+), 15 deletions(-) -commit d716acdae3fa7996f9e68a7bac012e6d8d13dd02 +commit d274a2bc00d235f07e96aaf82c149794cfe82b12 Author: Lasse Collin -Date: 2014-05-04 11:09:11 +0300 +Date: 2024-06-15 18:07:04 +0300 - Docs: Update comments to refer to lzma/lzma12.h in example programs. + CMake: Add XZ_DOC - doc/examples/03_compress_custom.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + CMakeLists.txt | 45 ++++++++++++++++++++++++--------------------- + 1 file changed, 24 insertions(+), 21 deletions(-) -commit 4d5b7b3fda31241ca86ed35e08e73f776ee916e0 +commit 188143a50ade67253ed256608f50f78aa1380403 Author: Lasse Collin -Date: 2014-05-04 11:07:17 +0300 +Date: 2024-06-20 21:53:03 +0300 - liblzma: Rename the private API header lzma/lzma.h to lzma/lzma12.h. + CMake: Refactor XZ_SYMBOL_VERSIONING to match configure.ac + + Make the available options and their behavior match + --enable-symbol-versions in configure.ac. - It can be confusing that two header files have the same name. - The public API file is still lzma.h. + Don't enable symbol versions on Linux if not using glibc. Previously + the generic variant was selected on Microblaze or if using NVHPC + without checking that libc is glibc. + + Leave the cache variable to "auto" or "yes" if that was specified + instead of setting it to the autodetected value by default. A downside + is that one cannot easily see which variant the autodetection code + has selected. The same applies to XZ_SANDBOX and XZ_THREADS though. - src/liblzma/api/Makefile.am | 2 +- - src/liblzma/api/lzma.h | 2 +- - src/liblzma/api/lzma/{lzma.h => lzma12.h} | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + CMakeLists.txt | 125 ++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 75 insertions(+), 50 deletions(-) -commit 1555a9c5664afc7893a2b75e9970105437f01ef1 +commit cc52ef8ed3b75a581262c587f6c06c213a550f86 Author: Lasse Collin -Date: 2014-04-25 17:53:42 +0300 +Date: 2024-06-15 18:07:04 +0300 - Build: Fix the combination of --disable-xzdec --enable-lzmadec. + CMake: Use the same option list for XZ_THREADS as in configure.ac - In this case "make install" could fail if the man page directory - didn't already exist at the destination. If it did exist, a - dangling symlink was created there. Now the link is omitted - instead. This isn't the best fix but it's better than the old - behavior. + Also clarify that "yes" will fail if no threading support is found. + If no threading is wanted, it has to be disabled manually. + + configure.ac doesn't behave this way at the moment. Instead it + assumes pthreads to be present if not targeting Windows. If pthreads + actually are missing, the build fails later. - src/xzdec/Makefile.am | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + CMakeLists.txt | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) -commit 56056571df3377eaa6ae6233b3ccc5d72e81d43d +commit 37f7af3452bab0a34ce320c2ad532835f18752d9 Author: Lasse Collin -Date: 2014-04-25 17:44:26 +0300 +Date: 2024-06-15 18:07:04 +0300 - Build: Add --disable-doc to configure. + CMake: Use the same option list for XZ_SANDBOX as in configure.ac + + It's simpler to document this way. - INSTALL | 6 ++++++ - Makefile.am | 2 ++ - configure.ac | 6 ++++++ - 3 files changed, 14 insertions(+) + CMakeLists.txt | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) -commit 6de61d8721097a6214810841aa85b08e303ac538 +commit c715dec8e800b65145918cfb0ee9bbc90faa8aad Author: Lasse Collin -Date: 2014-04-24 18:06:24 +0300 +Date: 2024-06-15 18:07:04 +0300 - Update INSTALL. - - Add a note about failing "make check". The source of - the problem should be fixed in libtool (if it really is - a libtool bug and not mine) but I'm unable to spend time - on that for now. Thanks to Nelson H. F. Beebe for reporting - the issue. - - Add a note about a possible need to run "ldconfig" after - "make install". + CMake: Fix indentation - INSTALL | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 54df428799a8d853639b753d0e6784694d73eb3e +commit ea379f2f180befabd2039342db8eaeb757fdd2b7 Author: Lasse Collin -Date: 2014-04-09 17:26:10 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Rename a variable to avoid a namespace collision on Solaris. + CMake: Add warning options for GCC and Clang - I don't know the details but I have an impression that there's - no problem in practice if using GCC since people have built xz - with GCC (without patching xz), but renaming the variable cannot - hurt either. + The list was copied from configure.ac and should be kept in sync. + (Pretend that the deleted comment in CMakeLists.txt didn't exist.) - Thanks to Mark Ashley. + There is no need to add equivalent of --enable-werror as CMake >= 3.24 + supports -DCMAKE_COMPILE_WARNING_AS_ERROR=ON. - src/xz/signals.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) + CMakeLists.txt | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 59 insertions(+), 5 deletions(-) -commit 5876ca27daa1429676b1160007d9688266907f00 +commit 74223338197b7dfcd69f56df78b6502805a75f23 Author: Lasse Collin -Date: 2014-01-29 20:19:41 +0200 +Date: 2024-06-15 18:07:04 +0300 - Docs: Add example program for threaded encoding. + CMake: Use \040 instead of \x20 for a space - I didn't add -DLZMA_UNSTABLE to Makefile so one has to - specify it manually as long as LZMA_UNSTABLE is needed. + This is for consistency with 4c81c9611f8b2e1ad65eb7fa166afc570c58607e + where \040 has to be used because \0x20F gets interpret at three hex + digits. Octals escapes are never longer than three digits. - doc/examples/04_compress_easy_mt.c | 184 +++++++++++++++++++++++++++++++++++++ - doc/examples/Makefile | 3 +- - 2 files changed, 186 insertions(+), 1 deletion(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 9494fb6d0ff41c585326f00aa8f7fe58f8106a5e +commit e8854b6bdc956c46dc4232bd07c17163034a00f2 Author: Lasse Collin -Date: 2014-01-29 20:13:51 +0200 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Fix lzma_mt.preset not working with lzma_stream_encoder_mt(). - - It read the filter chain from a wrong variable. + CMake: Add XZ_ASSUME_RAM - src/liblzma/common/stream_encoder_mt.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 673a4cb53de3a715685cb1b836da57a3c7dcd43c +commit e1127e75cb82e0385f02c995771d6fe1420f43c5 Author: Lasse Collin -Date: 2014-01-20 11:20:40 +0200 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Fix typo in a comment. + CMake: Rename liblzma_INSTALL_CMAKEDIR to XZ_INSTALL_CMAKEDIR - src/liblzma/api/lzma/block.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit ad96a871a1470eb76d6233d3890ce9338047b7a3 +commit 96abfe98c15e431a50a6a31015c5bb05540ab2ff Author: Lasse Collin -Date: 2014-01-12 19:38:43 +0200 +Date: 2024-06-15 18:07:04 +0300 - Windows: Add config.h for building liblzma with MSVC 2013. + CMake: Refactor ADDITIONAL_CHECK_TYPES to XZ_CHECKS - This is for building liblzma. Building xz tool too requires - a little more work. Maybe it will be supported, but for most - MSVC users it's enough to be able to build liblzma. - - C99 support in MSVC 2013 is almost usable which is a big - improvement over earlier versions. It's "almost" because - there's a dumb bug that breaks mixed declarations after - an "if" statements unless the "if" statement uses braces: - - https://connect.microsoft.com/VisualStudio/feedback/details/808650/visual-studio-2013-c99-compiler-bug - https://connect.microsoft.com/VisualStudio/feedback/details/808472/c99-support-of-mixed-declarations-and-statements-fails-with-certain-types-and-constructs - - Hopefully it will get fixed. Then liblzma should be - compilable with MSVC 2013 without patching. + Now "crc32" is in the list too for completeness but it doesn't + actually have any effect. The description of the cache variable + says that "crc32 is always built" so it should be clear enough. - windows/config.h | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 139 insertions(+) + CMakeLists.txt | 14 +++++++------- + tests/tests.cmake | 17 ++++++++--------- + 2 files changed, 15 insertions(+), 16 deletions(-) -commit 3d5c090872fab4212b57c290e8ed4d02c78c1737 +commit 679500ffe00ecb4f02292129e7529ab7392f3943 Author: Lasse Collin -Date: 2014-01-12 17:41:14 +0200 +Date: 2024-06-15 18:07:04 +0300 - xz: Fix a comment. + CMake: Rename the cache variable POSIX_SHELL to XZ_POSIX_SHELL + + We still need the variable POSIX_SHELL for configure_file() + but it doesn't need to be a cache variable. - src/xz/coder.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit 69fd4e1c932c7975476a0143c86e45d81b60d3f9 +commit e5c0eb2e50e5522a0a55e7ba83fe49b04c8a6eef Author: Lasse Collin -Date: 2014-01-12 17:04:33 +0200 +Date: 2024-06-15 18:07:04 +0300 - Windows: Add MSVC defines for inline and restrict keywords. + CMake: Rename ENCODERS and DECODERS to use XZ_ prefix - src/common/sysdefs.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) + CMakeLists.txt | 34 +++++++++++++++++----------------- + tests/tests.cmake | 4 ++-- + 2 files changed, 19 insertions(+), 19 deletions(-) -commit a19d9e8575ee6647cd9154cf1f20203f1330485f +commit e7785e2061f95d44aa6c0856b09cc0fbad7d6154 Author: Lasse Collin -Date: 2014-01-12 16:44:52 +0200 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Avoid C99 compound literal arrays. - - MSVC 2013 doesn't like them. Maybe they aren't so good - for readability either since many aren't used to them. + CMake: Rename MATCH_FINDERS to XZ_MATCH_FINDERS - src/liblzma/lzma/lzma_encoder_presets.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit e28528f1c867b2ed4ac91195ad08efb9bb8a6263 +commit 63294806b488a27a28a0960f6a257695dd2b569a Author: Lasse Collin -Date: 2014-01-12 12:50:30 +0200 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Remove a useless C99ism from sha256.c. - - Unsurprisingly it makes no difference in compiled output. + CMake: Rename SYMBOL_VERSIONING to XZ_SYMBOL_VERSIONING - src/liblzma/check/sha256.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) -commit 5ad1effc45adfb7dabc9a98e79736077e6b7e2d5 +commit ad245b133675d285bca5d48123062e9d1e3f747e Author: Lasse Collin -Date: 2014-01-12 12:17:08 +0200 +Date: 2024-06-15 18:07:04 +0300 - xz: Fix use of wrong variable. - - Since the only call to suffix_set() uses optarg - as the argument, fixing this bug doesn't change - the behavior of the program. + CMake: Rename ENABLE_THREADS to XZ_THREADS - src/xz/suffix.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) -commit 3e62c68d75b5a3fdd46dbb34bb335d73289860d5 +commit 4250d4de32e66e558cc2ebe73b05255633c933ed Author: Lasse Collin -Date: 2014-01-12 12:11:36 +0200 +Date: 2024-06-15 18:07:04 +0300 - Fix typos in comments. + CMake: Rename ENABLE_SANDBOX to XZ_SANDBOX - src/common/mythread.h | 2 +- - src/liblzma/check/crc32_fast.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) -commit e90ea601fb72867ec04adf456cbe4bf9520fd412 +commit 0fdcd0c582f1a38542cd647dde449d9447d5888d Author: Lasse Collin -Date: 2013-11-26 18:20:16 +0200 +Date: 2024-06-15 18:07:04 +0300 - Update THANKS. + CMake: Rename ENABLE_X86_ASM to XZ_ASM_I386 - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit b22e94d8d15764416354e04729382a7371ae2c30 +commit e017d5526e316003fdb2a3f76acbb83443f14ddf Author: Lasse Collin -Date: 2013-11-26 18:20:09 +0200 +Date: 2024-06-15 18:07:04 +0300 - liblzma: Document the need for block->check for lzma_block_header_decode(). + CMake: Rename CREATE_XZ_SYMLINKS to XZ_TOOL_SYMLINKS - Thanks to Tomer Chachamu. - - src/liblzma/api/lzma/block.h | 3 +++ - 1 file changed, 3 insertions(+) - -commit d1cd8b1cb824b72421d1ee370e628024d2fcbec4 -Author: Lasse Collin -Date: 2013-11-12 16:38:57 +0200 - - xz: Update the man page about --block-size and --block-list. + This only affects the names unxz and xzcat. The xz-prefixed script + symlinks (xzfgrep and such) are always created if scripts are enabled. - src/xz/xz.1 | 24 +++++++++++++++--------- - 1 file changed, 15 insertions(+), 9 deletions(-) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 76be7c612e6bcc38724488ccc3b8bcb1cfec9f0a +commit 04cac14fcb9fb302c24e90b04ca4b77d3717b50c Author: Lasse Collin -Date: 2013-11-12 16:30:53 +0200 +Date: 2024-06-15 18:07:04 +0300 - Update THANKS. + CMake: Rename CREATE_LZMA_SYMLINKS to XZ_TOOL_LZMA_SYMLINKS + + Update the description too. + + It affects creation of not only the legacy lzma, unlzma, lzcat symlinks + but also lzgrep and other legacy names for the scripts. The last + LZMA Utils release was made in 2008 but these names are still used + in some places to handle .lzma files. - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit dd750acbe2259d75444ef0f8da2d4bacc90d7afc +commit 612ccebf884eb1a9b6848e230c24f97a03fe917a Author: Lasse Collin -Date: 2013-11-12 16:29:48 +0200 +Date: 2024-06-15 18:07:04 +0300 - xz: Make --block-list and --block-size work together in single-threaded. - - Previously, --block-list and --block-size only worked together - in threaded mode. Boundaries are specified by --block-list, but - --block-size specifies the maximum size for a Block. Now this - works in single-threaded mode too. + CMake: Rename ALLOW_ARM64_CRC32 to XZ_ARM64_CRC32 - Thanks to James M Leddy for the original patch. + Update description too. - src/xz/coder.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 75 insertions(+), 15 deletions(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit ae222fe9805d0161d022d75ba8485dab8bf6d7d5 +commit 3dcc12290d6dffbe7f10f501c141d325bad65901 Author: Lasse Collin -Date: 2013-10-26 13:26:14 +0300 +Date: 2024-06-15 18:07:04 +0300 - Bump the version number to 5.1.3alpha. + CMake: Rename ALLOW_CLMUL_CRC to XZ_CLMUL_CRC + + Update description too. - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 2193837a6a597cd3bf4e9ddf49421a5697d8e155 +commit 4b8faa72442da9aa1a356f5848aae798d8588a7d Author: Lasse Collin -Date: 2013-10-26 13:25:02 +0300 +Date: 2024-06-15 18:07:04 +0300 - Update NEWS for 5.1.3alpha. + CMake: Rename ENABLE_DOXYGEN to XZ_DOXYGEN - NEWS | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit ed48e75e2763876173aef8902da407a8eb28854b +commit b56273ae575bac350e50b0c689269dcab04b04b3 Author: Lasse Collin -Date: 2013-10-26 12:47:04 +0300 +Date: 2024-06-15 18:07:04 +0300 - Update TODO. + CMake: Rename LZIP_DECODER to XZ_LZIP_DECODER - TODO | 4 ---- - 1 file changed, 4 deletions(-) + CMakeLists.txt | 4 ++-- + tests/tests.cmake | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit 841da0352d79a56a44796a4c39163429c9f039a3 +commit 2343992fcbe8b436da6df888be37713cccaff0ab Author: Lasse Collin -Date: 2013-10-25 22:41:28 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Document behavior of --block-list with threads. - - This needs to be updated before 5.2.0. + CMake: Rename MICROLZMA_ENCODER/DECODER to XZ_MICROLZMA_ENCODER/DECODER - src/xz/xz.1 | 24 +++++++++++++++++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) + CMakeLists.txt | 8 ++++---- + tests/tests.cmake | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) -commit 56feb8665b78c1032aabd53c619c62af51defe64 +commit 96f0a6632cc0598a26d93255b0c444df18dc7891 Author: Lasse Collin -Date: 2013-10-22 20:03:12 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Document --flush-timeout=TIMEOUT on the man page. + CMake: Rename ENABLE_SMALL to XZ_SMALL - src/xz/xz.1 | 37 ++++++++++++++++++++++++++++++++++++- - 1 file changed, 36 insertions(+), 1 deletion(-) + CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) -commit ba413da1d5bb3324287cf3174922acd921165971 +commit 29f77c7b707f2458fb047e77497354b195e05b14 Author: Lasse Collin -Date: 2013-10-22 19:51:55 +0300 +Date: 2024-06-15 18:07:04 +0300 - xz: Take advantage of LZMA_FULL_BARRIER with --block-list. + CMake: Rename ENABLE_NLS to XZ_NLS - Now if --block-list is used in threaded mode, the encoder - won't need to flush at each Block boundary specified via - --block-list. This improves performance a lot, making - threading helpful with --block-list. + Also update the description to mention that this affects installation + of translated man pages too. - The flush timer was reset after LZMA_FULL_FLUSH but since - LZMA_FULL_BARRIER doesn't flush, resetting the timer is - no longer done. + Prefixing the cache variables with the project name helps if + the package is used as a subproject in another package. + It also makes the package-specific options group more nicely + in ccmake and cmake-gui. - src/xz/coder.c | 32 +++++++++++++++----------------- - 1 file changed, 15 insertions(+), 17 deletions(-) + CMakeLists.txt | 28 +++++++++++++++------------- + 1 file changed, 15 insertions(+), 13 deletions(-) -commit 0cd45fc2bc5537de287a0bc005e2d67467a92148 +commit ac05f1b0d7cda1e7ae79775a8dfecc54601d7f1c Author: Lasse Collin -Date: 2013-10-02 20:05:23 +0300 +Date: 2024-06-15 23:34:29 +0300 - liblzma: Support LZMA_FULL_FLUSH and _BARRIER in threaded encoder. + CMake: Link Threads::Threads as PRIVATE to liblzma - Now --block-list=SIZES works with in the threaded mode too, - although the performance is still bad due to the use of - LZMA_FULL_FLUSH instead of the new LZMA_FULL_BARRIER. + This way pthread options aren't passed to the linker when linking + against shared liblzma but they are still passed when linking against + static liblzma. (Also, one never needs the include path of the + threading library to use liblzma since liblzma's API headers + don't #include . But tends to be in the + default include path so here this change makes no difference.) + + One cannot mix target_link_libraries() calls that use the scope + (PRIVATE, PUBLIC, or INTERFACE) keyword and calls that don't use it. + The calls without the keyword are like PUBLIC except perhaps when + they aren't, or something like that... It seems best to always + specify a scope keyword as the meanings of those three keywords + at least are clear. - src/liblzma/common/stream_encoder_mt.c | 55 ++++++++++++++++++++++++---------- - 1 file changed, 39 insertions(+), 16 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 97bb38712f414fabecca908af2e38a12570293fd +commit 82986d8c691a294c78b48d8391303e5c428b5437 Author: Lasse Collin -Date: 2013-10-02 12:55:11 +0300 +Date: 2024-06-16 19:39:32 +0300 - liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder. - - In the single-threaded encoder LZMA_FULL_BARRIER is simply - an alias for LZMA_FULL_FLUSH. + CMake: Add empty lines - src/liblzma/api/lzma/base.h | 37 ++++++++++++++++++++++++++++++------- - src/liblzma/common/common.c | 17 +++++++++++++++-- - src/liblzma/common/common.h | 7 ++++++- - src/liblzma/common/stream_encoder.c | 4 +++- - 4 files changed, 54 insertions(+), 11 deletions(-) + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) -commit fef0c6b410c08e581c9178700a4e7599f0895ff9 +commit 2aecffe0f0e14f3ef635e8cd7b405420f2385de2 Author: Lasse Collin -Date: 2013-09-17 11:57:51 +0300 +Date: 2024-06-16 19:37:36 +0300 - liblzma: Add block_buffer_encoder.h into Makefile.inc. + CMake: Use CMAKE_THREAD_LIBS_INIT in liblzma.pc only with pthreads - This should have been in b465da5988dd59ad98fda10c2e4ea13d0b9c73bc. + This shouldn't make much difference in practice as on Windows + no flags are needed anyway and unitialized variable (when threading + is disabled) expands to empty. But it's clearer this way. - src/liblzma/common/Makefile.inc | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) -commit 8083e03291b6d21c0f538163e187b4e8cd5594e4 +commit 664918bd3635ea8e773f06022286ecb0c485166c Author: Lasse Collin -Date: 2013-09-17 11:55:38 +0300 +Date: 2024-06-17 18:20:14 +0300 - xz: Add a missing test for TUKLIB_DOSLIKE. + Update THANKS - src/xz/file_io.c | 2 ++ - 1 file changed, 2 insertions(+) + THANKS | 3 +++ + 1 file changed, 3 insertions(+) -commit 6b44b4a775fe29ecc7bcb7996e086e3bc09e5fd0 +commit 5ca96a93488d0f5a530c78b274cac317453807ff Author: Lasse Collin -Date: 2013-09-17 11:52:28 +0300 +Date: 2024-06-16 19:25:07 +0300 - Add native threading support on Windows. + CMake: Use native newlines in liblzma.pc - Now liblzma only uses "mythread" functions and types - which are defined in mythread.h matching the desired - threading method. - - Before Windows Vista, there is no direct equivalent to - pthread condition variables. Since this package doesn't - use pthread_cond_broadcast(), pre-Vista threading can - still be kept quite simple. The pre-Vista code doesn't - use anything that wasn't already available in Windows 95, - so the binaries should run even on Windows 95 if someone - happens to care. + vcpkg doesn't specify the newline type so it should be fine to + use native newlines in liblzma.pc on Windows. - INSTALL | 41 ++- - configure.ac | 118 ++++++-- - src/common/mythread.h | 513 ++++++++++++++++++++++++++------- - src/liblzma/common/stream_encoder_mt.c | 83 +++--- - src/xz/coder.c | 8 +- - windows/README-Windows.txt | 2 +- - windows/build.bash | 23 +- - 7 files changed, 573 insertions(+), 215 deletions(-) + CMakeLists.txt | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) -commit ae0ab74a88d5b9b15845f1d9a24ade4349a54f9f +commit ebd155c3a1b87411edae06d3bdaa9659ec057522 Author: Lasse Collin -Date: 2013-09-11 14:40:35 +0300 +Date: 2024-06-16 19:18:56 +0300 - Build: Remove a comment about Automake 1.10 from configure.ac. + CMake: Use relative paths in liblzma.pc if possible - The previous commit supports silent rules and that requires - Automake 1.11. + Now liblzma.pc can be relocatable only if using CMake >= 3.20 + but that should be OK as now we shouldn't get broken liblzma.pc + if CMAKE_INSTALL_LIBDIR or CMAKE_INSTALL_INCLUDEDIR contain an + absolute path. + + Thanks to Eli Schwartz. - configure.ac | 2 -- - 1 file changed, 2 deletions(-) + CMakeLists.txt | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) -commit 72975df6c8c59aaf849138ab3606e8fb6970596a +commit 7a366d93cfd74ce10201db400be8836199944e36 Author: Lasse Collin -Date: 2013-09-09 20:37:03 +0300 +Date: 2024-06-16 18:33:08 +0300 - Build: Create liblzma.pc in a src/liblzma/Makefile.am. + Revert "CMake: Set only "prefix" as an absolute path in liblzma.pc" - Previously it was done in configure, but doing that goes - against the Autoconf manual. Autoconf requires that it is - possible to override e.g. prefix after running configure - and that doesn't work correctly if liblzma.pc is created - by configure. + This reverts commit 5d1c649ba9eb7a5b9371252ebfbc2911dc774e69. - A potential downside of this change is that now e.g. - libdir in liblzma.pc is a standalone string instead of - being defined via ${prefix}, so if one overrides prefix - when running pkg-config the libdir won't get the new value. - I don't know if this matters in practice. + While CMAKE_INSTALL_ tend to be relative paths, they don't need + to be. Thus the commit was broken. A fancier method is required. - Thanks to Vincent Torri. + Thanks to Eli Schwartz for the bug report and explanation. - configure.ac | 1 - - src/liblzma/Makefile.am | 20 ++++++++++++++++++++ - 2 files changed, 20 insertions(+), 1 deletion(-) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 1c2b6e7e8382ed390f53e140f160488bb2205ecc +commit 30a2d5d51006301a3ddab5ef1f5ff0a9d74dce6f Author: Lasse Collin -Date: 2013-08-04 15:24:09 +0300 +Date: 2024-06-16 13:39:37 +0300 - Fix the previous commit which broke the build. + liblzma: CRC CLMUL: Omit is_arch_extension_supported() when not needed - Apparently I didn't even compile-test the previous commit. + On E2K the function compiles only due to compiler emulation but the + function is never used. It's cleaner to omit the function when it's + not needed even though it's a "static inline" function. - Thanks to Christian Hesse. + Thanks to Ilya Kurdyukov. - src/common/tuklib_cpucores.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/check/crc_x86_clmul.h | 4 ++++ + 1 file changed, 4 insertions(+) -commit 124eb69c7857f618b4807588c51bc9ba21bf8691 +commit 54eaea5ea49bb8bca4286d4412f19ac73187489e Author: Lasse Collin -Date: 2013-08-03 13:52:58 +0300 +Date: 2024-06-16 13:21:34 +0300 - Windows: Add Windows support to tuklib_cpucores(). + liblzma: x86 CLMUL CRC: Rewrite - It is used for Cygwin too. I'm not sure if that is - a good or bad idea. + It's faster with both tiny and large buffers and doesn't require + disabling any sanitizers. With large buffers the extra speed is + from folding four 16-byte chunks in parallel. - Thanks to Vincent Torri. - - m4/tuklib_cpucores.m4 | 19 +++++++++++++++++-- - src/common/tuklib_cpucores.c | 13 ++++++++++++- - 2 files changed, 29 insertions(+), 3 deletions(-) - -commit eada8a875ce3fd521cb42e4ace2624d3d49c5f35 -Author: Anders F Bjorklund -Date: 2013-08-02 15:59:46 +0200 - - macosx: separate liblzma package - - macosx/build.sh | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -commit be0100d01ca6a75899d051bee00acf17e6dc0c15 -Author: Anders F Bjorklund -Date: 2013-08-02 15:58:44 +0200 - - macosx: set minimum to leopard + The 32-bit x86 with MSVC reportedly still needs a workaround. + Now the simpler "__asm mov ebx, ebx" trick is enough but it + needs to be in lzma_crc64() instead of crc64_arch_optimized(). + Thanks to Iouri Kharon for testing and the fix. + + Thanks to Ilya Kurdyukov for testing the speed with aligned and + unaligned buffers on a few x86 processors and on E2K v6. + + Thanks to Sam James for general feedback. + + Fixes: https://github.com/tukaani-project/xz/issues/112 + Fixes: https://github.com/tukaani-project/xz/issues/122 - macosx/build.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) + src/liblzma/check/crc64_fast.c | 8 + + src/liblzma/check/crc_x86_clmul.h | 437 ++++++++++++++++++++------------------ + 2 files changed, 237 insertions(+), 208 deletions(-) -commit 416729e2d743f4b2fe9fd438eedeb98adce033c3 -Author: Anders F Bjorklund -Date: 2011-08-07 13:13:30 +0200 +commit c0e7eaae8d6eef1e313c9d0da20ccf126ec61f38 +Author: Lasse Collin +Date: 2024-06-01 14:44:04 +0300 - move configurables into variables + sysdefs.h: Add alignas - macosx/build.sh | 25 ++++++++++++++++++------- - 1 file changed, 18 insertions(+), 7 deletions(-) + src/common/sysdefs.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 16581080e5f29f9a4e49efece21c5bf572323acc +commit 20014c261451381d5e2f58e63e7b1fbefd4df4bf Author: Lasse Collin -Date: 2013-07-15 14:08:41 +0300 +Date: 2024-06-11 12:47:59 +0300 - Update THANKS. + liblzma: Use a single macro to select CLMUL CRC to build + + This way it's clearer that two things cannot be selected + at the same time. - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_fast.c | 2 +- + src/liblzma/check/crc64_fast.c | 2 +- + src/liblzma/check/crc_x86_clmul.h | 18 ++++++++++-------- + 3 files changed, 12 insertions(+), 10 deletions(-) -commit 3e2b198ba37b624efd9c7caee2a435dc986b46c6 +commit d8fb0986171bd6a3066b236fc9a6b3d573c8e441 Author: Lasse Collin -Date: 2013-07-15 14:08:02 +0300 +Date: 2024-06-10 15:31:01 +0300 - Build: Fix the detection of missing CRC32. + liblzma: CRC32 CLMUL: Refactor the constants and simplify - Thanks to Vincent Torri. + By using modulus scaled constants, the final reduction can + be simplified. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/liblzma/check/crc_x86_clmul.h | 52 +++++++-------------------------------- + 1 file changed, 9 insertions(+), 43 deletions(-) -commit dee6ad3d5915422bc30a6821efeacaeb8ca8ef00 +commit ef652ac391ff7e8cda656238dc5b5f83bc1554c2 Author: Lasse Collin -Date: 2013-07-04 14:18:46 +0300 +Date: 2024-06-10 15:12:48 +0300 - xz: Add preliminary support for --flush-timeout=TIMEOUT. - - When --flush-timeout=TIMEOUT is used, xz will use - LZMA_SYNC_FLUSH if read() would block and at least - TIMEOUT milliseconds has elapsed since the previous flush. - - This can be useful in realtime-like use cases where the - data is simultanously decompressed by another process - (possibly on a different computer). If new uncompressed - input data is produced slowly, without this option xz could - buffer the data for a long time until it would become - decompressible from the output. + liblzma: CRC64 CLMUL: Refactor the constants - If TIMEOUT is 0, the feature is disabled. This is the default. - - This commit affects the compression side. Using xz for - the decompression side for the above purpose doesn't work - yet so well because there is quite a bit of input and - output buffering when decompressing. - - The --long-help or man page were not updated yet. - The details of this feature may change. + Now it refers to crc_clmul_consts_gen.c. vfold8 was renamed to mu_p + and the p no longer has the lowest bit set (it makes no difference + as the output bits it affects are ignored). - src/xz/args.c | 7 +++++++ - src/xz/coder.c | 46 +++++++++++++++++++++++++++++++++++----------- - src/xz/file_io.c | 46 ++++++++++++++++++++++++++++++++++++---------- - 3 files changed, 78 insertions(+), 21 deletions(-) + src/liblzma/check/crc_x86_clmul.h | 43 +++++++-------------------------------- + 1 file changed, 7 insertions(+), 36 deletions(-) -commit fa381acaf9a29a8114e1c0a97de99bab9adb014e +commit 9f5fc17e32bf5c7c6cfadf40c29a1dedb4cc03ac Author: Lasse Collin -Date: 2013-07-04 13:41:03 +0300 +Date: 2024-06-10 14:45:44 +0300 - xz: Don't set src_eof=true after an I/O error because it's useless. + liblzma: Add crc_clmul_consts_gen.c + + It's a standalone program that prints the required constants. + It's won't be a part of the normal build of the package. - src/xz/file_io.c | 3 --- - 1 file changed, 3 deletions(-) + src/liblzma/check/Makefile.inc | 1 + + src/liblzma/check/crc_clmul_consts_gen.c | 160 +++++++++++++++++++++++++++++++ + 2 files changed, 161 insertions(+) -commit ea00545beace5b950f709ec21e46878e0f448678 +commit 71b147aab7fe4a60ed57b697d5bb490f099894be Author: Lasse Collin -Date: 2013-07-04 13:25:11 +0300 +Date: 2024-05-09 21:44:03 +0300 - xz: Fix the test when to read more input. + liblzma: Remove CRC_USE_GENERIC_FOR_SMALL_INPUTS - Testing for end of file was no longer correct after full flushing - became possible with --block-size=SIZE and --block-list=SIZES. - There was no bug in practice though because xz just made a few - unneeded zero-byte reads. + It was already commented out. - src/xz/coder.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/liblzma/check/crc32_fast.c | 21 --------------------- + src/liblzma/check/crc64_fast.c | 5 ----- + src/liblzma/check/crc_common.h | 14 -------------- + src/liblzma/check/crc_x86_clmul.h | 9 +-------- + 4 files changed, 1 insertion(+), 48 deletions(-) -commit 736903c64bef394c06685d79908e397bcb08b88f +commit f99a7be40645f86959a5b180dfae948dd165e07c Author: Lasse Collin -Date: 2013-07-04 12:51:57 +0300 +Date: 2024-05-09 21:03:39 +0300 - xz: Move some of the timing code into mytime.[hc]. + liblzma: Remove crc_attr_no_sanitize_address + + It's not enough to silence the address sanitizer. Also memory and + thread sanitizers would need to be silenced. They, at least currently, + aren't smart enough to see that the extra bytes are discarded from + the xmm registers by later instructions. + + Valgrind is smarter, possibly because this kind of code isn't weird + to write in assembly. Agner Fog's optimizing_assembly.pdf even mentions + this idea of doing an aligned read and then discarding the extra + bytes. The sanitizers don't instrument assembly code but Valgrind + checks all code. - This switches units from microseconds to milliseconds. + It's better to change the implementation to avoid the sanitization + attributes which also look scary in the code. (Somehow they can look + more scary than __asm__ which is implictly unsanitized.) - New clock_gettime(CLOCK_MONOTONIC) will be used if available. - There is still a fallback to gettimeofday(). + See also: + https://github.com/tukaani-project/xz/issues/112 + https://github.com/tukaani-project/xz/issues/122 - src/xz/Makefile.am | 2 ++ - src/xz/coder.c | 5 +++ - src/xz/message.c | 54 +++++++++------------------------ - src/xz/mytime.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/xz/mytime.h | 47 ++++++++++++++++++++++++++++ - src/xz/private.h | 1 + - 6 files changed, 158 insertions(+), 40 deletions(-) + src/liblzma/check/crc_common.h | 9 --------- + src/liblzma/check/crc_x86_clmul.h | 3 --- + 2 files changed, 12 deletions(-) -commit 24edf8d807e24ffaa1e793114d94cca3b970027d +commit ead4d151996f8a18bf9b07eb1e175c0a1590e562 Author: Lasse Collin -Date: 2013-07-01 14:35:03 +0300 +Date: 2024-06-10 15:37:49 +0300 - Update THANKS. + Revert "Build: Temporarily disable CRC CLMUL to silence OSS Fuzz" + + This reverts commit 9f1a6d6f9a258886933a22239a5b81af34b28199. - THANKS | 1 + - 1 file changed, 1 insertion(+) + configure.ac | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) -commit c0627b3fceacfa1ed162f5f55235360ea26f569a +commit 2178acf8a4d40a93e970cfcf9b807d5ef6c8da92 Author: Lasse Collin -Date: 2013-07-01 14:34:11 +0300 +Date: 2024-06-12 14:26:44 +0300 - xz: Silence a warning seen with _FORTIFY_SOURCE=2. + CMake: Prefer C11 with a fallback to C99 - Thanks to Christian Hesse. + There is no need to make a similar change in configure.ac. + With Autoconf 2.72, the deprecated macro AC_PROG_CC_C99 + is an alias for AC_PROG_CC which prefers a C11 compiler. - src/xz/file_io.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) + CMakeLists.txt | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) -commit 1936718bb38ee394bd89836fdd4eabc0beb02443 +commit c97e9c12fef4d1093ee2a75236742481361f50f5 Author: Lasse Collin -Date: 2013-06-30 19:40:11 +0300 +Date: 2024-06-12 14:20:21 +0300 - Update NEWS for 5.0.5. + Update THANKS - NEWS | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 52 insertions(+) + THANKS | 4 ++++ + 1 file changed, 4 insertions(+) -commit a37ae8b5eb6093a530198f109c6f7a538c80ecf0 +commit 89e9f12e03324b8a186e807b268f34f92d1b2f41 Author: Lasse Collin -Date: 2013-06-30 18:02:27 +0300 +Date: 2024-06-11 11:15:49 +0300 - Man pages: Use similar syntax for synopsis as in xz. + Tests: Improve the CRC32 test - The man pages of lzmainfo, xzmore, and xzdec had similar - constructs as the man page of xz had before the commit - eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond - didn't mention these man pages in his bug report, but - it's nice to be consistent. + A similar one was already there for CRC64 but nowadays also CRC32 + has a CLMUL implementation, so it's good to test it better too. - src/lzmainfo/lzmainfo.1 | 4 ++-- - src/scripts/xzmore.1 | 6 +++--- - src/xzdec/xzdec.1 | 10 +++++----- - 3 files changed, 10 insertions(+), 10 deletions(-) + tests/test_check.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) -commit cdba9ddd870ae72fd6219a125662c20ec997f86c +commit c7164b1927e3fe7cdba70ee4687e1a590a81043b Author: Lasse Collin -Date: 2013-06-29 15:59:13 +0300 +Date: 2024-06-11 22:42:26 +0300 - xz: Use non-blocking I/O for the output file. - - Now both reading and writing should be without - race conditions with signals. - - They might still be signal handling issues left. - Signals are blocked during many operations to avoid - EINTR but it may cause problems e.g. if writing to - stderr blocks when trying to display an error message. + xz: Fix white space - src/xz/file_io.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 49 insertions(+), 8 deletions(-) + src/xz/list.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit e61a5c95da3fe31281d959e5e842885a8ba2b5bd +commit 0a32d2072c598de281058b26dc08920fbf0cd2a1 Author: Lasse Collin -Date: 2013-06-28 23:56:17 +0300 +Date: 2024-06-11 21:59:09 +0300 - xz: Fix return value type in io_write_buf(). + liblzma: Fix a typo in a comment - It didn't affect the behavior of the code since -1 - becomes true anyway. + Thanks to Sam James for spotting it. + + Fixes: f644473a211394447824ea00518d0a214ff3f7f2 - src/xz/file_io.c | 2 +- + src/liblzma/check/crc_x86_clmul.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 9dc319eabb34a826f4945f91c71620f14a60e9e2 +commit afd9b4d282a10186808c3331dad4caf79c02d55f Author: Lasse Collin -Date: 2013-06-28 23:48:05 +0300 +Date: 2024-05-10 15:52:26 +0300 - xz: Use the self-pipe trick to avoid a race condition with signals. - - It is possible that a signal to set user_abort arrives right - before a blocking system call is made. In this case the call - may block until another signal arrives, while the wanted - behavior is to make xz clean up and exit as soon as possible. - - After this commit, the race condition is avoided with the - input side which already uses non-blocking I/O. The output - side still uses blocking I/O and thus has the race condition. + liblzma: Fix a comment indentation - src/xz/file_io.c | 56 ++++++++++++++++++++++++++++++++++++++++++++------------ - src/xz/file_io.h | 8 ++++++++ - src/xz/signals.c | 5 +++++ - 3 files changed, 57 insertions(+), 12 deletions(-) + src/liblzma/check/crc_common.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 3541bc79d0cfabc0ad155c99bfdad1289f17fec3 +commit 50e6bff274568c568930e15094da8217e7d47d28 Author: Lasse Collin -Date: 2013-06-28 22:51:02 +0300 +Date: 2024-05-09 22:09:12 +0300 - xz: Use non-blocking I/O for the input file. + liblzma: Fix white space - src/xz/file_io.c | 156 +++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 111 insertions(+), 45 deletions(-) + src/liblzma/check/crc32_table.c | 10 +++++----- + src/liblzma/check/crc_x86_clmul.h | 6 +++--- + src/liblzma/check/sha256.c | 2 +- + 3 files changed, 9 insertions(+), 9 deletions(-) -commit 78673a08bed5066c81e8a8e90d20e670c28ecfd5 +commit caea7844d3824755d053b4743c4913d73ac2db3d Author: Lasse Collin -Date: 2013-06-28 18:46:13 +0300 +Date: 2024-06-01 14:25:29 +0300 + + tuklib: __STDC_VERSION__ in C23 is 202311 - xz: Remove an outdated NetBSD-specific comment. + src/common/tuklib_common.h | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 9e73918a4f14be754a23f74dda45ca431939a4a0 +Author: RainRat +Date: 2024-06-05 15:21:49 -0700 + + Fix typos - Nowadays errno == EFTYPE is documented in open(2). + Closes: https://github.com/tukaani-project/xz/pull/124 - src/xz/file_io.c | 4 ---- - 1 file changed, 4 deletions(-) + INSTALL | 2 +- + doc/examples/03_compress_custom.c | 2 +- + src/common/tuklib_integer.h | 2 +- + src/liblzma/api/lzma/container.h | 2 +- + src/xz/mytime.c | 2 +- + tests/test_filter_str.c | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) -commit a616fdad34b48b2932ef03fb87309dcc8b829527 +commit 04b23addf3733873667675df2439725f076c2f36 Author: Lasse Collin -Date: 2013-06-28 18:09:47 +0300 +Date: 2024-06-07 15:47:20 +0300 - xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls. + tuklib_integer: Fix building on OpenBSD/sparc64 that uses GCC 4.2 - POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on - error and "other than -1" on success. This is how it is - documented e.g. on OpenBSD too. On Linux, success with - F_SETFL is always 0 (at least accorinding to fcntl(2) - from man-pages 3.51). + GCC 4.2 doesn't have __builtin_bswap16() and friends so tuklib_integer.h + tries to use OS-specific byte swap methods instead. On OpenBSD those + macros are swap16/32/64 instead of bswap16/32/64 like on other *BSDs + and Darwin. + + An alternative to "#ifdef __OpenBSD__" could be "#ifdef swap16" as it + is a macro. But since OpenBSD seems to be a special case under this + special case of "*BSDs and Darwin", checking for __OpenBSD__ seems + the more conservative choice now. + + Thanks to Christian Weisgerber and Brad Smith who both submitted + the same patch a few hours apart. + + Co-authored-by: Christian Weisgerber + Co-authored-by: Brad Smith + Closes: https://github.com/tukaani-project/xz/pull/126 - src/xz/file_io.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + src/common/tuklib_integer.h | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) -commit 4a08a6e4c61c65ab763ab314100a6d7a3bb89298 +commit dc03f6290f5b9bd3d50c7e12e58dee870889d599 Author: Lasse Collin -Date: 2013-06-28 17:36:47 +0300 +Date: 2024-06-07 15:06:59 +0300 - xz: Fix use of wrong variable in a fcntl() call. + liblzma: Add ARM64 CRC32 instruction support detection on OpenBSD - Due to a wrong variable name, when writing a sparse file - to standard output, *all* file status flags were cleared - (to the extent the operating system allowed it) instead of - only clearing the O_APPEND flag. In practice this worked - fine in the common situations on GNU/Linux, but I didn't - check how it behaved elsewhere. + The C code is from Christian Weisgerber, I merely reordered the OSes. + Then I added the build system checks without testing them. - The original flags were still restored correctly. I still - changed the code to use a separate boolean variable to - indicate when the flags should be restored instead of - relying on a special value in stdout_flags. + Also thanks to Brad Smith who submitted a similar patch on GitHub + a few hours after Christian had sent his via email. + + Co-authored-by: Christian Weisgerber + Closes: https://github.com/tukaani-project/xz/pull/125 - src/xz/file_io.c | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) + CMakeLists.txt | 6 ++++++ + configure.ac | 9 +++++++++ + src/liblzma/check/crc32_arm64.h | 15 +++++++++++++++ + src/liblzma/check/crc_common.h | 1 + + 4 files changed, 31 insertions(+) -commit b790b435daa3351067f80a5973b647f8d55367a2 +commit f5c2ae58ec68c665e62c790b842657afcb31474c Author: Lasse Collin -Date: 2013-06-28 14:55:37 +0300 +Date: 2024-06-05 13:55:43 +0300 - xz: Fix assertion related to posix_fadvise(). - - Input file can be a FIFO or something else that doesn't - support posix_fadvise() so don't check the return value - even with an assertion. Nothing bad happens if the call - to posix_fadvise() fails. + Update THANKS - src/xz/file_io.c | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) + THANKS | 2 ++ + 1 file changed, 2 insertions(+) -commit 84d2da6c9dc252f441deb7626c2522202b005d4d +commit e5491dfab9c54dc7078a8d3d07fabb91d6e06418 Author: Lasse Collin -Date: 2013-06-26 13:30:57 +0300 +Date: 2024-06-05 13:42:47 +0300 - xz: Check the value of lzma_stream_flags.version in --list. + CMake: Include the "alpha" or "beta" suffix in PACKAGE_VERSION + + This way the version string gets into xzgrep and other scripts + in full and also into liblzma.pc. - It is a no-op for now, but if an old xz version is used - together with a newer liblzma that supports something new, - then this check becomes important and will stop the old xz - from trying to parse files that it won't understand. + For the project() command, a suffixless string is required though. - src/xz/list.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + CMakeLists.txt | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) -commit 9376f5f8f762296f2173d61af9101112c36f38c0 +commit 1d3c61575fda0be6b2d50c9e32a343349d5cd5c0 Author: Lasse Collin -Date: 2013-06-26 12:17:00 +0300 +Date: 2024-06-05 13:30:28 +0300 - Build: Require Automake 1.12 and use serial-tests option. + CMake: Fix wrong version variable + + liblzma_VERSION has never existed in the repository. xz_VERSION from + the project() command was used for liblzma SOVERSION so use xz_VERSION + here too. - It should actually still work with Automake 1.10 if - the serial-tests option is removed. Automake 1.13 started - using parallel tests by default and the option to get - the old behavior isn't supported before 1.12. + The wrong variable did no harm in practice as PROJECT_VERSION + was used as the fallback. It has the same value as xz_VERSION. - At least for now, parallel tests don't improve anything - in XZ Utils but they hide the progress output from - test_compress.sh. + Fixes: 7e3493d40eac0c3fa3d5124097745a70e15c41f6 - configure.ac | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit b7e200d7bd0a3c7c171c13ad37d68296d6f73374 +commit 5d1c649ba9eb7a5b9371252ebfbc2911dc774e69 Author: Lasse Collin -Date: 2013-06-23 18:59:13 +0300 +Date: 2024-06-05 12:59:59 +0300 - Update THANKS. + CMake: Set only "prefix" as an absolute path in liblzma.pc + + CMake provides variables that are relative to CMAKE_INSTALL_PREFIX + so use them instead of repeating the full path. - THANKS | 1 + - 1 file changed, 1 insertion(+) + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 46540e4c10923e363741ff5aab99e79fc0ce6ee8 +commit e0d6d05ce0d464e966c0669bbf869202a43cc2f7 Author: Lasse Collin -Date: 2013-06-23 18:57:23 +0300 +Date: 2024-06-04 23:59:29 +0300 - liblzma: Avoid a warning about a shadowed variable. + CMake: Fix liblzma filename in Windows environments + + This is a mess because liblzma DLL outside Cygwin and MSYS2 + is liblzma.dll instead of lzma.dll to avoid a conflict with + lzma.dll from LZMA SDK. + + On Cygwin the name was "liblzma-5.dll" while "cyglzma-5.dll" + would have been correct (and match what Libtool produces). + MSYS2 likely was broken too as it uses the "msys-" prefix. + + This change has no effect with MinGW-w64 because with that + the "lib" prefix was correct already. + + With MSVC builds this is a small breaking change that requires developers + to adjust the library name when linking against liblzma. The liblzma.dll + name is kept as is but the import library and static library are now + lzma.lib instead of liblzma.lib. This is helpful when using pkgconf + because "pkgconf --msvc-syntax --libs liblzma" outputs "lzma.lib" + (it's converted from "-llzma" in liblzma.pc). It would be easy to + keep the liblzma.lib naming but the pkgconf compatibility seems worth + it in the long run. The lzma.lib name is compatible with MinGW-w64 + too as -llzma will find also lzma.lib. - On Mac OS X wait() is declared in that - we include one way or other so don't use "wait" as - a variable name. + vcpkg had been patching CMakeLists.txt this way since 2022 but I + learned this only recently. The reasoning for the patch makes sense, + and while this is a small breaking change with MSVC, it seems like + a decent compromise as it keeps the DLL name the same. - Thanks to Christian Kujau. + 2022 patch in vcpkg: https://github.com/microsoft/vcpkg/blob/0707a17ecf1466d64cf1a3c1ee18c8ff02aadb2d/ports/liblzma/win_output_name.patch + See the discussion: https://github.com/microsoft/vcpkg/pull/39024 + + Thanks to Vincent Torri for confirming the naming issue on Cygwin. - src/liblzma/common/stream_encoder_mt.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 34 ++++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) -commit ebb501ec73cecc546c67117dd01b5e33c90bfb4a +commit e7a42cda7c827e016619e8cab15e2faf5d4181ae Author: Lasse Collin -Date: 2013-06-23 17:36:47 +0300 +Date: 2024-06-03 16:55:03 +0300 - xz: Validate Uncompressed Size from Block Header in list.c. + Fix version.sh compatiblity with Solaris + + The ancient /bin/tr on Solaris doesn't support '\n'. + With /usr/xpg4/bin/tr it works but it might not be in PATH. + + Another problem was that sed was given input that didn't have a newline + at the end. Text files must end with a newline to be portable. - This affects only "xz -lvv". Normal decompression with xz - already detected if Block Header and Index had mismatched - Uncompressed Size fields. So this just makes "xz -lvv" - show such files as corrupt instead of showing the - Uncompressed Size from Index. + Fix both problems: + + - Handle multiline input within sed itself to avoid one tr invocation. + The default sed even on Solaris does understand \n. + + - Use octals in tr -d. \012 works for ASCII "line feed", it's even + used as an example in the Solaris man page. But we must strip + also ASCII "carriage return" \015 and EBCDIC "next line" \025. + The EBCDIC case got handled with \n previously. Stripping \012 + and \015 on EBCDIC system won't matter as those control chars + won't be present in the string in the first place. + + An awk-based solution could be an alternative but it might need + special casing on Solaris to used nawk instead of awk. The changes + in this commit are smaller and should have a smaller risk for + regressions. It's also possible that version.sh will be dropped + entirely at some point. - src/xz/list.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) + build-aux/version.sh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) -commit c09e91dd236d3cabee0fc48312b3dc8cceae41ab +commit a61c9ab4751f2710dcd5459c7d74bbf20781f0f9 Author: Lasse Collin -Date: 2013-06-21 22:08:11 +0300 +Date: 2024-06-03 17:07:11 +0300 - Update THANKS. + CI: Don't require po4a on Solaris - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + .github/workflows/solaris.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494 +commit 5229bdf5335ce18ed54beb7e646e39927663be86 Author: Lasse Collin -Date: 2013-06-21 22:04:45 +0300 +Date: 2024-06-03 15:08:15 +0300 - xz: Make the man page more friendly to doclifter. - - Thanks to Eric S. Raymond. + CI: Use set -e on Solaris too - src/xz/xz.1 | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + .github/workflows/solaris.yml | 1 + + 1 file changed, 1 insertion(+) -commit 0c0a1947e6ad90a0a10b7a5c39f6ab99a0aa5c93 +commit afa938e429c1ce07d26d02999352fb014b62ff3d Author: Lasse Collin -Date: 2013-06-21 21:54:59 +0300 +Date: 2024-06-03 17:44:50 +0300 - xz: A couple of man page fixes. + CMake: Install liblzma.pc even with MSVC - Now the interaction of presets and custom filter chains - is described correctly. Earlier it contradicted itself. + I had misunderstood that it wouldn't be useful with MSVC. + vcpkg had been installing liblzma.pc with custom rules since 2020, + years before liblzma.pc support was added to CMakeLists.txt. - Thanks to DevHC who reported these issues on IRC to me - on 2012-12-14. + See: + https://github.com/microsoft/vcpkg/blob/eb895b95aac6fd7485373702f29f508c42a180a0/ports/liblzma/portfile.cmake + https://github.com/microsoft/vcpkg/pull/39024#issuecomment-2145064670 - src/xz/xz.1 | 35 +++++++++++++++++++++++------------ - 1 file changed, 23 insertions(+), 12 deletions(-) + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) -commit 2fcda89939c903106c429e109083d43d894049e0 -Author: Lasse Collin -Date: 2013-06-21 21:50:26 +0300 +commit 35f8649f08341639a627fd06350e938124ca3622 +Author: Sam James +Date: 2024-06-03 06:16:23 +0100 - xz: Fix interaction between preset and custom filter chains. - - There was somewhat illogical behavior when --extreme was - specified and mixed with custom filter chains. - - Before this commit, "xz -9 --lzma2 -e" was equivalent - to "xz --lzma2". After it is equivalent to "xz -6e" - (all earlier preset options get forgotten when a custom - filter chain is specified and the default preset is 6 - to which -e is applied). I find this less illogical. - - This also affects the meaning of "xz -9e --lzma2 -7". - Earlier it was equivalent to "xz -7e" (the -e specified - before a custom filter chain wasn't forgotten). Now it - is "xz -7". Note that "xz -7e" still is the same as "xz -e7". + ci: don't pin official GH actions via commit, just tag - Hopefully very few cared about this in the first place, - so pretty much no one should even notice this change. + There's no real value in doing it via commit for official GH actions. We + can keep using pinned commits for unofficial actions. It's hassle for no + gain. - Thanks to Conley Moorhous. + Maybe going forward we can limit this further by only being paranoid + for the jobs with any access to tokens. - src/xz/coder.c | 35 +++++++++++++++++++++-------------- - 1 file changed, 21 insertions(+), 14 deletions(-) + .github/workflows/ci.yml | 4 ++-- + .github/workflows/freebsd.yml | 2 +- + .github/workflows/netbsd.yml | 2 +- + .github/workflows/openbsd.yml | 2 +- + .github/workflows/solaris.yml | 2 +- + .github/workflows/windows-ci.yml | 4 ++-- + 6 files changed, 8 insertions(+), 8 deletions(-) -commit 97379c5ea758da3f8b0bc444d5f7fa43753ce610 -Author: Lasse Collin -Date: 2013-04-27 22:07:46 +0300 +commit e885dae37ff5b1dbc760dabc1e03e866a7302ef2 +Author: Christoph Junghans +Date: 2024-04-30 07:49:26 -0600 - Build: Use -Wvla with GCC if supported. + ci: set -e on openbsd - Variable-length arrays are mandatory in C99 but optional in C11. - The code doesn't currently use any VLAs and it shouldn't in the - future either to stay compatible with C11 without requiring any - optional C11 features. + Closes: https://github.com/tukaani-project/xz/pull/116 - configure.ac | 1 + + .github/workflows/openbsd.yml | 1 + 1 file changed, 1 insertion(+) -commit 8957c58609d3987c58aa72b96c436cf565cc4917 -Author: Lasse Collin -Date: 2013-04-15 19:29:09 +0300 +commit 21b02dd128cf9e8c76325ec124f70381862dcf19 +Author: Christoph Junghans +Date: 2024-04-30 07:48:58 -0600 - xzdec: Improve the --help message. + ci: set -e on netbsd + + .github/workflows/netbsd.yml | 1 + + 1 file changed, 1 insertion(+) + +commit 8641f0c24c041136670c975b23408184b45431bc +Author: Christoph Junghans +Date: 2024-04-25 14:56:06 -0700 + + ci: actually fail on FreeBSD - The options are now ordered in the same order as in xz's help - message. + Without "set -e" the job will always be successful. - Descriptions were added to the options that are ignored. - I left them in parenthesis even if it looks a bit weird - because I find it easier to spot the ignored vs. non-ignored - options from the list that way. + See vmactions/freebsd-vm#72 - src/xzdec/xzdec.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + .github/workflows/freebsd.yml | 1 + + 1 file changed, 1 insertion(+) -commit ed886e1a92534a24401d0e99c11f1dcff3b5220a -Author: Lasse Collin -Date: 2013-04-05 19:25:40 +0300 +commit ef616683ef11f11ffdfbe0624da33905e28a70f9 +Author: Andrew Murray +Date: 2024-04-25 09:24:46 +1000 - Update THANKS. + Updated actions + + Closes: https://github.com/tukaani-project/xz/pull/115 - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + .github/workflows/ci.yml | 4 ++-- + .github/workflows/windows-ci.yml | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) -commit 5019413a055ce29e660dbbf15e02443cb5a26c59 -Author: Jeff Bastian -Date: 2013-04-03 13:59:17 +0200 +commit 57b440d316da9ac9cb312ee7e6890f5382556f10 +Author: Sam James +Date: 2024-06-03 02:49:40 +0100 - xzgrep: make the '-h' option to be --no-filename equivalent - - * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing. + ci: add po4a - src/scripts/xzgrep.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .github/workflows/netbsd.yml | 2 +- + .github/workflows/openbsd.yml | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) -commit 5ea900cb5ad862bca81316729f92357c1fc040ce -Author: Lasse Collin -Date: 2013-03-23 22:25:15 +0200 +commit 08cdf4be9a673d78efe393b53dd73bf43c81dd95 +Author: Sam James +Date: 2024-04-13 21:02:04 +0100 - liblzma: Be less picky in lzma_alone_decoder(). + ci: add Solaris + + Inspired by https://github.com/RsyncProject/rsync/commit/3f2a38b01184cae9a931280b534acf5a3dae2e94. - To avoid false positives when detecting .lzma files, - rare values in dictionary size and uncompressed size fields - were rejected. They will still be rejected if .lzma files - are decoded with lzma_auto_decoder(), but when using - lzma_alone_decoder() directly, such files will now be accepted. - Hopefully this is an OK compromise. + It runs on Solaris 5.11 via a VirtualBox VM. + + .github/workflows/solaris.yml | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +commit b69768c8bd1a34fde311935c551d061ba52d9a3f +Author: Sam James +Date: 2024-04-14 08:08:00 +0100 + + xz: list: suppress -Wformat-nonliteral for Solaris - This doesn't affect xz because xz still has its own file - format detection code. This does affect lzmadec though. - So after this commit lzmadec will accept files that xz or - xz-emulating-lzma doesn't. + Solaris' GCC can't understand that our use is fine, unlike modern compilers: + ``` + list.c: In function 'print_totals_basic': + list.c:1191:4: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] + uint64_to_str(totals.files, 0)); + ^~~~~~~~~~~~~ + cc1: all warnings being treated as errors + ``` - NOTE: lzma_alone_decoder() still won't decode all .lzma files - because liblzma's LZMA decoder doesn't support lc + lp > 4. + It's presumably because of older gettext missing format attributes. - Reported here: - http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827 + This is with `gcc (GCC) 7.3.0`. - src/liblzma/common/alone_decoder.c | 22 ++++++++++++++-------- - src/liblzma/common/alone_decoder.h | 5 +++-- - src/liblzma/common/auto_decoder.c | 2 +- - 3 files changed, 18 insertions(+), 11 deletions(-) + src/xz/list.c | 7 +++++++ + 1 file changed, 7 insertions(+) -commit bb117fffa84604b6e3811b068c80db82bf7f7b05 +commit bb90e1f66d9beb490c4c99763e79519045968710 Author: Lasse Collin -Date: 2013-03-23 21:55:13 +0200 +Date: 2024-06-03 11:44:28 +0300 - liblzma: Use lzma_block_buffer_bound64() in threaded encoder. + license-check.sh: Fix reporting of unclear license info - Now it uses lzma_block_uncomp_encode() if the data doesn't - fit into the space calculated by lzma_block_buffer_bound64(). + The main feature was broken because an old variable name hadn't + been updated to match the rest of the script. - src/liblzma/common/stream_encoder_mt.c | 66 +++++++++++++++++++++++++--------- - 1 file changed, 50 insertions(+), 16 deletions(-) + build-aux/license-check.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit e572e123b55b29527e54ce5f0807f115481d78b9 +commit b8d134e61ede9f4a296226d97f5c20721fb4e8e2 Author: Lasse Collin -Date: 2013-03-23 21:51:38 +0200 +Date: 2024-05-31 21:36:26 +0300 - liblzma: Fix another deadlock in the threaded encoder. - - This race condition could cause a deadlock if lzma_end() was - called before finishing the encoding. This can happen with - xz with debugging enabled (non-debugging version doesn't - call lzma_end() before exiting). + Update THANKS - src/liblzma/common/stream_encoder_mt.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + THANKS | 3 +++ + 1 file changed, 3 insertions(+) -commit b465da5988dd59ad98fda10c2e4ea13d0b9c73bc +commit 162587d3fb3fcedc6eee61eda3ccaaf60c80f0de Author: Lasse Collin -Date: 2013-03-23 19:17:33 +0200 +Date: 2024-05-29 17:47:13 +0300 - liblzma: Add lzma_block_uncomp_encode(). + Translations: Run po4a/update-po - This also adds a new internal function - lzma_block_buffer_bound64() which is similar to - lzma_block_buffer_bound() but uses uint64_t instead - of size_t. + Now the files are in the new formatting without source file + line numbers. Future updates should keep the diffs much smaller. - src/liblzma/api/lzma/block.h | 18 ++++++ - src/liblzma/common/block_buffer_encoder.c | 94 +++++++++++++++++++++---------- - src/liblzma/common/block_buffer_encoder.h | 24 ++++++++ - src/liblzma/liblzma.map | 1 + - 4 files changed, 106 insertions(+), 31 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 9e6dabcf22ef4679f4faaae15ebd5b137ae2fad1 +commit 50cd8ed002473c5cd53980e70a53e5e6ad646ffe Author: Lasse Collin -Date: 2013-03-05 19:14:50 +0200 +Date: 2024-05-29 17:44:53 +0300 - Avoid unneeded use of awk in xzless. + Translations: Run "make -C po update-po" - Use "read" instead of "awk" in xzless to get the version - number of "less". The need for awk was introduced in - the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e. - - Thanks to Ariel P for the patch. + 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/scripts/xzless.in | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + 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 e7b424d267a34803db8d92a3515528be2ed45abd +commit 16dbd865c8833462e1604a1e13f7effe55bb3fe6 Author: Lasse Collin -Date: 2012-12-14 20:13:32 +0200 +Date: 2024-05-29 18:03:04 +0300 - Make the progress indicator smooth in threaded mode. - - This adds lzma_get_progress() to liblzma and takes advantage - of it in xz. - - lzma_get_progress() collects progress information from - the thread-specific structures so that fairly accurate - progress information is available to applications. Adding - a new function seemed to be a better way than making the - information directly available in lzma_stream (like total_in - and total_out are) because collecting the information requires - locking mutexes. It's waste of time to do it more often than - the up to date information is actually needed by an application. + Add NEWS for 5.6.2 - src/liblzma/api/lzma/base.h | 22 +++++++++- - src/liblzma/common/common.c | 16 +++++++ - src/liblzma/common/common.h | 6 +++ - src/liblzma/common/stream_encoder_mt.c | 77 +++++++++++++++++++++++++++++++--- - src/liblzma/liblzma.map | 1 + - src/xz/message.c | 20 +++++---- - 6 files changed, 129 insertions(+), 13 deletions(-) + NEWS | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 130 insertions(+) -commit 2ebbb994e367f55f2561aa7c9e7451703c171f2f +commit a0eeb5f9369c43508610dcf00140edb8e2be92a6 Author: Lasse Collin -Date: 2012-12-14 11:01:41 +0200 +Date: 2024-05-29 18:03:04 +0300 - liblzma: Fix mythread_sync for nested locking. + Add NEWS for 5.4.7 - src/common/mythread.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + NEWS | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 89 insertions(+) -commit 4c7e28705f6de418d19cc77324ef301f996e01ff +commit 9b476fb93a9672f2e70b56e3e9c7e9cfedd6c162 Author: Lasse Collin -Date: 2012-12-13 21:05:36 +0200 +Date: 2024-05-29 18:03:04 +0300 - xz: Mention --threads in --help. - - Thanks to Olivier Delhomme for pointing out that this - was still missing. + Add NEWS for 5.2.13 - src/xz/message.c | 4 ++++ - 1 file changed, 4 insertions(+) + NEWS | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 115 insertions(+) -commit db5c1817fabf7cbb9e4087b1576eb26f0747338e -Author: Jonathan Nieder -Date: 2012-11-19 00:10:10 -0800 +commit 9284f1aea31f0eb23e2ea72f7218b271e2234762 +Author: Lasse Collin +Date: 2024-05-29 16:33:24 +0300 - xzless: Make "less -V" parsing more robust + Build: Update po/*.po files only when needed - In v4.999.9beta~30 (xzless: Support compressed standard input, - 2009-08-09), xzless learned to parse ‘less -V’ output to figure out - whether less is new enough to handle $LESSOPEN settings starting - with “|-”. That worked well for a while, but the version string from - ‘less’ versions 448 (June, 2012) is misparsed, producing a warning: + 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. - $ xzless /tmp/test.xz; echo $? - /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \ - integer expression expected - 0 + 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. - More precisely, modern ‘less’ lists the regexp implementation along - with its version number, and xzless passes the entire version number - with attached parenthetical phrase as a number to "test $a -gt $b", - producing the above confusing message. + 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. - $ less-444 -V | head -1 - less 444 - $ less -V | head -1 - less 456 (no regular expressions) + 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. + + Makefile.am | 3 ++- + po/Makevars | 6 +++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit 4beba1cd62d7f8f7a6f1e899b68292d94c53b599 +Author: Lasse Collin +Date: 2024-05-28 21:10:33 +0300 + + po4a/update-po: Disable wrapping in .pot and .po files - So relax the pattern matched --- instead of expecting "less ", - look for a line of the form "less [ (extra parenthetical)]". - While at it, improve the behavior when no matching line is found --- - instead of producing a cryptic message, we can fall back on a LESSPIPE - setting that is supported by all versions of ‘less’. + The .po files from the Translation Project come with unwrapped + strings so this matches it. - The implementation uses "awk" for simplicity. Hopefully that’s - portable enough. + 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. - Reported-by: Jörg-Volker Peetz - Signed-off-by: Jonathan Nieder + 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. - src/scripts/xzless.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + po4a/update-po | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) -commit 65536214a31ecd33b6b03b68a351fb597d3703d6 +commit b14c130a58a649f9a73392eeb122cb252327c569 Author: Lasse Collin -Date: 2012-10-03 15:54:24 +0300 +Date: 2024-05-28 18:36:53 +0300 - xz: Fix the note about --rsyncable on the man page. + Update contact info in README - src/xz/xz.1 | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) + README | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) -commit 3d93b6354927247a1569caf22ad27b07e97ee904 +commit 75f5f2e014b0ee646963f36bc6a9c840fb272353 Author: Lasse Collin -Date: 2012-09-28 20:11:09 +0300 +Date: 2024-05-28 13:25:07 +0300 - xz: Improve handling of failed realloc in xrealloc. + Translations: Use --package-name=xz-man with po4a - Thanks to Jim Meyering. + This is to match reality. See the added comment. - src/xz/util.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) + po4a/update-po | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) -commit ab225620664e235637833be2329935f9d290ba80 +commit eb217d016cfbbba1babc19a61095b3ea25898af6 Author: Lasse Collin -Date: 2012-08-24 16:27:31 +0300 +Date: 2024-05-28 13:03:40 +0300 - A few typo fixes to comments and the xz man page. + Translations: Omit --package-name from po/Makevars - Thanks to Jim Meyering. + This is closer to the reality in the po/*.po files. - configure.ac | 2 +- - src/liblzma/check/sha256.c | 1 - - src/xz/xz.1 | 4 ++-- - 3 files changed, 3 insertions(+), 4 deletions(-) + po/Makevars | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -commit f3c1ec69d910175ffd431fd82968dd35cec806ed +commit d28a4b2520adeeaa1b9e921bf42c7c1f36552c06 Author: Lasse Collin -Date: 2012-08-13 21:40:09 +0300 +Date: 2024-05-27 17:45:51 +0300 - xz: Add a warning to --help about alpha and beta versions. + license-check.sh: Use '--' with slightly untrusted filenames + + Names from git ls-files should be safe but if one runs it on + a tree without the .git dir and there are extra files, it's + safer to have the end of arguments marked with '--'. - src/xz/message.c | 5 +++++ - 1 file changed, 5 insertions(+) + build-aux/license-check.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit d8eaf9d8278c23c2cf2b7ca5562d4de570d3b5db +commit fda0ec862a34094cf23fc25d0e0a95858c3a3ab5 Author: Lasse Collin -Date: 2012-08-02 17:13:30 +0300 +Date: 2024-05-27 17:41:37 +0300 - Build: Bump gettext version requirement to 0.18. + license-check.sh: Use xargs -0 instead of -d + + Neither are in POSIX but -0 is much more portable in practice. - Otherwise too old version of m4/lib-link.m4 gets included - when autoreconf -fi is run. + Despite the old comment, the grep usage should be portable already. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + build-aux/license-check.sh | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) -commit 96e08902b09f0f304d4ff80c6e83ef7fff883f34 +commit 9114267038deaecf4832a5cacb5acbe6591ac839 Author: Lasse Collin -Date: 2012-07-17 18:29:08 +0300 +Date: 2024-05-28 01:17:45 +0300 - Update THANKS. + Translations: Omit man page line numbers from .pot and .po files - THANKS | 1 + - 1 file changed, 1 insertion(+) + po4a/update-po | 5 +++++ + 1 file changed, 5 insertions(+) -commit 3778db1be53e61ff285c573af5ee468803008456 -Author: Lasse Collin -Date: 2012-07-17 18:19:59 +0300 - - liblzma: Make the use of lzma_allocator const-correct. - - There is a tiny risk of causing breakage: If an application - assigns lzma_stream.allocator to a non-const pointer, such - code won't compile anymore. I don't know why anyone would do - such a thing though, so in practice this shouldn't cause trouble. - - Thanks to Jan Kratochvil for the patch. - - src/liblzma/api/lzma/base.h | 4 +++- - src/liblzma/api/lzma/block.h | 6 ++--- - src/liblzma/api/lzma/container.h | 9 +++++--- - src/liblzma/api/lzma/filter.h | 13 ++++++----- - src/liblzma/api/lzma/index.h | 16 ++++++------- - src/liblzma/api/lzma/index_hash.h | 4 ++-- - src/liblzma/common/alone_decoder.c | 6 ++--- - src/liblzma/common/alone_decoder.h | 2 +- - src/liblzma/common/alone_encoder.c | 8 +++---- - src/liblzma/common/auto_decoder.c | 6 ++--- - src/liblzma/common/block_buffer_decoder.c | 2 +- - src/liblzma/common/block_buffer_encoder.c | 4 ++-- - src/liblzma/common/block_decoder.c | 6 ++--- - src/liblzma/common/block_decoder.h | 2 +- - src/liblzma/common/block_encoder.c | 8 +++---- - src/liblzma/common/block_encoder.h | 2 +- - src/liblzma/common/block_header_decoder.c | 4 ++-- - src/liblzma/common/common.c | 10 ++++----- - src/liblzma/common/common.h | 20 +++++++++-------- - src/liblzma/common/easy_buffer_encoder.c | 4 ++-- - src/liblzma/common/filter_buffer_decoder.c | 3 ++- - src/liblzma/common/filter_buffer_encoder.c | 7 +++--- - src/liblzma/common/filter_common.c | 4 ++-- - src/liblzma/common/filter_common.h | 2 +- - src/liblzma/common/filter_decoder.c | 7 +++--- - 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/index.c | 26 ++++++++++----------- - src/liblzma/common/index_decoder.c | 12 +++++----- - src/liblzma/common/index_encoder.c | 6 ++--- - src/liblzma/common/index_encoder.h | 2 +- - src/liblzma/common/index_hash.c | 6 +++-- - src/liblzma/common/outqueue.c | 4 ++-- - src/liblzma/common/outqueue.h | 5 +++-- - src/liblzma/common/stream_buffer_decoder.c | 2 +- - src/liblzma/common/stream_buffer_encoder.c | 3 ++- - src/liblzma/common/stream_decoder.c | 9 ++++---- - src/liblzma/common/stream_decoder.h | 5 +++-- - src/liblzma/common/stream_encoder.c | 10 ++++----- - src/liblzma/common/stream_encoder_mt.c | 16 ++++++------- - src/liblzma/delta/delta_common.c | 4 ++-- - src/liblzma/delta/delta_decoder.c | 6 ++--- - src/liblzma/delta/delta_decoder.h | 5 +++-- - src/liblzma/delta/delta_encoder.c | 6 ++--- - src/liblzma/delta/delta_encoder.h | 3 ++- - src/liblzma/delta/delta_private.h | 2 +- - src/liblzma/lz/lz_decoder.c | 8 +++---- - src/liblzma/lz/lz_decoder.h | 7 +++--- - src/liblzma/lz/lz_encoder.c | 19 ++++++++-------- - src/liblzma/lz/lz_encoder.h | 6 ++--- - src/liblzma/lzma/lzma2_decoder.c | 8 +++---- - src/liblzma/lzma/lzma2_decoder.h | 5 +++-- - src/liblzma/lzma/lzma2_encoder.c | 6 ++--- - src/liblzma/lzma/lzma2_encoder.h | 2 +- - src/liblzma/lzma/lzma_decoder.c | 8 +++---- - src/liblzma/lzma/lzma_decoder.h | 7 +++--- - src/liblzma/lzma/lzma_encoder.c | 7 +++--- - src/liblzma/lzma/lzma_encoder.h | 5 +++-- - src/liblzma/simple/arm.c | 8 ++++--- - src/liblzma/simple/armthumb.c | 8 ++++--- - src/liblzma/simple/ia64.c | 8 ++++--- - src/liblzma/simple/powerpc.c | 8 ++++--- - src/liblzma/simple/simple_coder.c | 10 ++++----- - src/liblzma/simple/simple_coder.h | 36 ++++++++++++++++++++---------- - src/liblzma/simple/simple_decoder.c | 2 +- - src/liblzma/simple/simple_decoder.h | 2 +- - src/liblzma/simple/simple_private.h | 3 ++- - src/liblzma/simple/sparc.c | 8 ++++--- - src/liblzma/simple/x86.c | 8 ++++--- - 71 files changed, 269 insertions(+), 219 deletions(-) - -commit d625c7cf824fd3b61c6da84f56179e94917ff603 -Author: Lasse Collin -Date: 2012-07-05 07:36:28 +0300 - - Tests: Remove tests/test_block.c that had gotten committed accidentally. - - tests/test_block.c | 52 ---------------------------------------------------- - 1 file changed, 52 deletions(-) - -commit 0b09d266cce72bc4841933b171e79551e488927c -Author: Lasse Collin -Date: 2012-07-05 07:33:35 +0300 - - Build: Include macosx/build.sh in the distribution. - - It has been in the Git repository since 2010 but probably - few people have seen it since it hasn't been included in - the release tarballs. :-( +commit 093490b58271e9424ce38a7b1b38bcf61b9c86c6 +Author: Lasse Collin +Date: 2024-05-28 01:06:30 +0300 - Makefile.am | 1 + - 1 file changed, 1 insertion(+) + Translations: Use the xgettext option --add-location=file -commit d6e0b23d4613b9f417893dd96cc168c8005ece3d + po/Makevars | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit fccebe2b4fd513488fc920e4dac32562ed3c7637 Author: Lasse Collin -Date: 2012-07-05 07:28:53 +0300 +Date: 2024-05-28 00:43:53 +0300 - Build: Include validate_map.sh in the distribution. + Translations: Use the msgmerge option --add-location=file - It's required by "make mydist". + 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. - Fix also the location of EXTRA_DIST+= so that those files - get distributed also if symbol versioning isn't enabled. + The option is available since gettext 0.19 (2014). + configure.ac requires 0.19.6. - src/liblzma/Makefile.am | 2 +- + po/Makevars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 19de545d86097c3954d69ab5d12820387f6a09bc +commit f361d9ae85707a87eb28db400eb7229cec103d58 Author: Lasse Collin -Date: 2012-07-05 07:24:45 +0300 +Date: 2024-05-27 12:22:08 +0300 - Docs: Fix the name LZMA Utils -> XZ Utils in debug/README. + Build: Use $(SHELL) instead of sh to run scripts in Makefile.am - debug/README | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Makefile.am | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) -commit 672eccf57c31a40dfb956b7662db06d43e18618e +commit a26dece34793a09aac2476f954d162d03e9cf62b Author: Lasse Collin -Date: 2012-07-05 07:23:17 +0300 +Date: 2024-05-23 17:25:13 +0300 - Include debug/translation.bash in the distribution. + Translations: Change the home page URLs in man page translations - Also fix the script name mentioned in README. + 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. - README | 4 ++-- - debug/Makefile.am | 3 +++ - 2 files changed, 5 insertions(+), 2 deletions(-) + 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 cafb523adac1caf305e70a04bc37f25602bf990c +commit 24387c234b4eed1ef9a7eaa107391740b4095568 Author: Lasse Collin -Date: 2012-07-04 22:31:58 +0300 +Date: 2024-05-23 15:15:18 +0300 - xz: Document --block-list better. + CMake: Add manual support for 32-bit x86 assembly files - Thanks to Jonathan Nieder. - - src/xz/xz.1 | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit c7ff218528bc8f7c65e7ef73c6515777346c6794 -Author: Lasse Collin -Date: 2012-07-04 20:01:49 +0300 - - Bump the version number to 5.1.2alpha. + 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). - src/liblzma/api/lzma/version.h | 2 +- - src/liblzma/liblzma.map | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + CMakeLists.txt | 34 +++++++++++++++++++++++++++++++--- + 1 file changed, 31 insertions(+), 3 deletions(-) -commit 8f3c1d886f93e6478ad509ff52102b2ce7faa999 +commit 0fb3c9c3f684f5a25bd425ed079a20a79f0c969d Author: Lasse Collin -Date: 2012-07-04 20:01:19 +0300 +Date: 2024-05-23 14:26:45 +0300 - Update NEWS for 5.1.2alpha. + CMake: Rename USE_DOXYGEN to ENABLE_DOXYGEN + + It's more consistent with the other option() uses. - NEWS | 41 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 41 insertions(+) + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 0d5fa05466e580fbc458820f87013ae7644e20e5 +commit 6bbec3bda02bf87d24fa095074456e723589921f Author: Lasse Collin -Date: 2012-07-04 19:58:23 +0300 +Date: 2024-05-22 15:21:53 +0300 - xz: Fix the version number printed by xz -lvv. - - The decoder bug was fixed in 5.0.2 instead of 5.0.3. + Mention license-check.sh in COPYING - src/xz/list.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + COPYING | 6 ++++++ + 1 file changed, 6 insertions(+) -commit df11317985a4165731dde12bb0f0028da0e7b77f +commit 62733592a1cc6f0b41f46ef52e06d1a6fe1ff38a Author: Lasse Collin -Date: 2012-07-04 17:11:31 +0300 +Date: 2024-05-22 15:21:53 +0300 - Build: Add a comment to configure.ac about symbol versioning. + Use more confident language in COPYING - configure.ac | 4 ++++ - 1 file changed, 4 insertions(+) + COPYING | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit bd9cc179e8be3ef515201d3ed9c7dd79ae88869d +commit a119a4209e8827e1d7c2cfd30cb9f5a9b76f9dff Author: Lasse Collin -Date: 2012-07-04 17:06:49 +0300 +Date: 2024-05-22 15:21:53 +0300 - Update TODO. + Build: Run license-check.sh in "mydist" and "dist-hook" + + In mydist the point is to check using the file list from the Git + repository. In dist-hook it is to check that the TARBALL_IGNORE + patterns work when the .git dir or the "git" command aren't available. + + Refuse to create a distribution tarball if license issues are found. - TODO | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) -commit 4a238dd9b22f462cac5e199828bf1beb0df05884 +commit f3434ecfcb45154508752986f4fc670b8f0555dc Author: Lasse Collin -Date: 2012-07-04 17:05:46 +0300 +Date: 2024-05-22 15:21:53 +0300 - Document --enable-symbol-versions in INSTALL. + Add build-aux/license-check.sh + + This helps in spotting files that lack SPDX license identifier + and which haven't been explicitly white listed either. The script + requires the .git directory to be present as only the files that + are in the Git repository are checked. + + XZ Utils isn't FSFE REUSE compliant for now. - INSTALL | 5 +++++ - 1 file changed, 5 insertions(+) + Makefile.am | 1 + + build-aux/license-check.sh | 174 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 175 insertions(+) -commit 88ccf47205d7f3aa314d358c72ef214f10f68b43 +commit 9ae2ebc1e504a1814b0788de95fb5c58c0328dde Author: Lasse Collin -Date: 2012-07-03 21:16:39 +0300 +Date: 2024-04-29 17:16:38 +0300 - xz: Add incomplete support for --block-list. - - It's broken with threads and when also --block-size is used. + Add SPDX license identifiers to files under tests/ossfuzz - src/xz/args.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/xz/args.h | 1 + - src/xz/coder.c | 48 ++++++++++++++++++++++++++++------ - src/xz/coder.h | 4 +++ - src/xz/main.c | 1 + - src/xz/message.c | 6 +++++ - src/xz/xz.1 | 23 +++++++++++++++-- - 7 files changed, 151 insertions(+), 10 deletions(-) + 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 972179cdcdf5d8949c48ee31737d87d3050b44af +commit 9000d70eb9815bd7f43ffddc1c3316c507aa0e05 Author: Lasse Collin -Date: 2012-07-01 18:44:33 +0300 +Date: 2024-04-29 17:16:06 +0300 - xz: Update the man page about the new field in --robot -lvv. + Add SPDX license identifier to .codespellrc - src/xz/xz.1 | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) + .codespellrc | 2 ++ + 1 file changed, 2 insertions(+) -commit 1403707fc64a70976aebe66f8d9a9bd12f73a2c5 +commit 903c16fcfa5bfad0cdb2a7383d941243bcb12e76 Author: Lasse Collin -Date: 2012-06-28 10:47:49 +0300 +Date: 2024-05-22 15:12:09 +0300 - liblzma: Check that the first byte of range encoded data is 0x00. + Move entries po4a/.gitignore to the top level .gitignore - It is just to be more pedantic and thus perhaps catch broken - files slightly earlier. + 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. - src/liblzma/lzma/lzma_decoder.c | 8 ++++++-- - src/liblzma/rangecoder/range_decoder.h | 12 +++++++++--- - 2 files changed, 15 insertions(+), 5 deletions(-) + .gitignore | 4 ++++ + po4a/.gitignore | 3 --- + 2 files changed, 4 insertions(+), 3 deletions(-) -commit eccd8017ffe2c5de473222c4963ec53c62f7fda2 +commit 56f1d5ed68e84ba5dfa328ea2291b8f46c995125 Author: Lasse Collin -Date: 2012-06-22 19:00:23 +0300 +Date: 2024-05-20 16:55:00 +0300 - Update NEWS from 5.0.4. + Tests: Make the config.h grep patterns Meson compatible + + Now the test scripts detect both + + #define HAVE_DECODER_ARM + #define HAVE_DECODER_ARM 1 + + as support for the ARM filter without confusing it with these: + + #define HAVE_DECODER_ARM64 + #define HAVE_DECODER_ARM64 1 + + Previously only the ones ending with " 1" were accepted for + the macros where this kind of confusion was possible. + + This should help with Meson support because Meson's built-in + features produce config.h entries that are either + + #define FOO 1 + #define FOO 0 + + or: + + #define FOO + #undef FOO + + The former method has a benefit that one can use "#if FOO" and -Wundef + will catch if a #define is missing (for example, it helps catching + typos). But XZ Utils has to use the latter since it has been + convenient with Autoconf's default behavior.[*] While it's easy to + emulate the Autoconf style (#define FOO 1 vs. no #define at all) + in Meson, it results in clumsy code. Thus it's better to change + the few places in the tests where this difference matters. + + [*] While most checks in Autoconf default to the second style above, + a few things use the first style (like AC_CHECK_DECLS). The mix + of both styles is the most confusing as one has to remember which + macro needs #ifdef and which #if. Currently HAVE_VISIBILITY is + only such config.h entry that is 1 or 0. It comes unmodified + from Gnulib's visibility.m4. - NEWS | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) + tests/test_compress.sh | 4 ++-- + tests/test_files.sh | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) -commit 2e6754eac26a431e8d340c28906f63bcd1e177e8 +commit 9d997d6f9d4f042412e45c7b7a23a14ad2e4f9aa Author: Lasse Collin -Date: 2012-06-22 14:34:03 +0300 +Date: 2024-05-20 16:55:00 +0300 - xz: Update man page date to match the latest update. + CMake: Add comments - src/xz/xz.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/tests.cmake | 2 ++ + 1 file changed, 2 insertions(+) -commit b3235a0b1af45d5e1244cbe3191516966c076fa0 +commit d35368b33e54bad2f566df99fac29ffea38e34de Author: Lasse Collin -Date: 2012-06-18 21:27:47 +0300 +Date: 2024-05-20 16:55:00 +0300 - Docs: Language fix to 01_compress_easy.c. + CMake: Remove the note that some tests aren't run - Thanks to Jonathan Nieder. + They are now in the common build configurations. - doc/examples/01_compress_easy.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) -commit f1675f765fe228cb5a5f904f853445a03e33cfe9 +commit dc232d584619b2819a9c52d6ad5d8b5d56b392ba Author: Lasse Collin -Date: 2012-06-14 20:15:30 +0300 +Date: 2024-05-20 16:55:00 +0300 - Fix the top-level Makefile.am for the new example programs. + CMake: Add support for test_files.sh - Makefile.am | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + tests/tests.cmake | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) -commit 3a0c5378abefaf86aa39a62a7c9682bdb21568a1 +commit a7e9230af9d1f87f474fe38886eb977d4149dc9b Author: Lasse Collin -Date: 2012-06-14 10:52:33 +0300 +Date: 2024-05-20 16:55:00 +0300 - Docs: Add new example programs. + Tests: Make test_files.sh more flexible - These have more comments than the old examples and - human-readable error messages. More tutorial-like examples - are needed but these are a start. + 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. - doc/examples/00_README.txt | 27 ++++ - doc/examples/01_compress_easy.c | 297 ++++++++++++++++++++++++++++++++++++++ - doc/examples/02_decompress.c | 287 ++++++++++++++++++++++++++++++++++++ - doc/examples/03_compress_custom.c | 193 +++++++++++++++++++++++++ - doc/examples/Makefile | 23 +++ - 5 files changed, 827 insertions(+) + tests/test_files.sh | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) -commit 1bd2c2c553e30c4a73cfb82abc6908efd6be6b8d +commit b40e6efbb48d740b9b5b303e59e344801cbb5bd8 Author: Lasse Collin -Date: 2012-06-14 10:33:27 +0300 +Date: 2024-05-20 16:55:00 +0300 - Docs: Move xz_pipe_comp.c and xz_pipe_decomp.c to doc/examples_old. - - It is good to keep these around to so that if someone has - copied the decompressor bug from xz_pipe_decomp.c he has - an example how to easily fix it. + CMake: Add support for test_compress.sh tests - doc/{examples => examples_old}/xz_pipe_comp.c | 0 - doc/{examples => examples_old}/xz_pipe_decomp.c | 0 - 2 files changed, 0 insertions(+), 0 deletions(-) + tests/tests.cmake | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) -commit 905f0ab5b5ce544d4b68a2ed6077df0f3d021292 +commit ac3222d2cb1ff3a15eb6d58f9ea9bc78e8bc3bb2 Author: Lasse Collin -Date: 2012-06-14 10:33:01 +0300 +Date: 2024-05-20 16:55:00 +0300 - Docs: Fix a bug in xz_pipe_decomp.c example program. + Tests: Make test_compress.sh more flexible + + 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. + + 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. + + 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. + + Use the default check type instead of forcing CRC32 or CRC64. + Now the script doesn't need to check if CRC64 is available. - doc/examples/xz_pipe_decomp.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + tests/test_compress.sh | 41 +++++++++++++++++++++++++++++------------ + 1 file changed, 29 insertions(+), 12 deletions(-) -commit 4bd1a3bd5fdf4870b2f96dd0b8a21657c8a58ad8 +commit 006040b29c83104403621e950ada0c8956c56b3d Author: Lasse Collin -Date: 2012-05-30 23:14:33 +0300 +Date: 2024-05-20 16:55:00 +0300 - Translations: Update the French translation. + CMake: Prepare to support the test_*.sh tests - Thanks to Adrien Nader. + 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. - po/fr.po | 148 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 79 insertions(+), 69 deletions(-) + tests/tests.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) -commit d2e836f2f3a87df6fe6bb0589b037db51205d910 +commit 6167607a6ea72fb74eefb943c4566e3cab528cd2 Author: Lasse Collin -Date: 2012-05-29 23:42:37 +0300 +Date: 2024-05-20 16:55:00 +0300 - Translations: Update the German translation. - - The previous only included the new strings in v5.0. + Tests: test_suffix.sh: Add a comment - po/de.po | 229 +++++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 133 insertions(+), 96 deletions(-) + tests/test_suffix.sh | 3 +++ + 1 file changed, 3 insertions(+) -commit c9a16151577ba459afd6e3528df23bc0ddb95171 +commit 4e9023857d287f624562156b60dc23d2b64c0f10 Author: Lasse Collin -Date: 2012-05-29 22:26:27 +0300 +Date: 2024-05-18 00:34:07 +0300 - Translations: Update the German translation. + Fix typos + + Thanks to xx on #tukaani. - po/de.po | 169 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 91 insertions(+), 78 deletions(-) + 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 1530a74fd48f8493372edad137a24541efe24713 +commit b14d08fbbc254485ace9ccfe7908674f608a62ae Author: Lasse Collin -Date: 2012-05-29 22:14:21 +0300 +Date: 2024-05-18 00:23:52 +0300 - Translations: Update Polish translation. + liblzma: Fix white space + + Thanks to xx on #tukaani. - po/pl.po | 283 +++++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 165 insertions(+), 118 deletions(-) + src/liblzma/simple/simple_coder.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit d8db706acb8316f9861abd432cfbe001dd6d0c5c +commit 9f1a6d6f9a258886933a22239a5b81af34b28199 Author: Lasse Collin -Date: 2012-05-28 20:42:11 +0300 +Date: 2024-05-15 23:14:17 +0300 - liblzma: Fix possibility of incorrect LZMA_BUF_ERROR. - - lzma_code() could incorrectly return LZMA_BUF_ERROR if - all of the following was true: + Build: Temporarily disable CRC CLMUL to silence OSS Fuzz - - The caller knows how many bytes of output to expect - and only provides that much output space. + The code makes aligned 16-byte reads which may read up to 15 bytes + before the beginning or past the end of the buffer if the buffer + is misaligned. The unneeded bytes are then ignored. It cannot cross + page boundaries and thus cannot cause access violations. - - When the last output bytes are decoded, the - caller-provided input buffer ends right before - the LZMA2 end of payload marker. So LZMA2 won't - provide more output anymore, but it won't know it - yet and thus won't return LZMA_STREAM_END yet. + This inherently trips address sanitizer which was already disabled + with __attribute__((__no_sanitize_address__)). However, it also + trips memory sanitizer if the extra bytes are uninitialized because + memory sanitizer doesn't see that those bytes then get ignored by + byte shuffling in the xmm registers. - - A BCJ filter is in use and it hasn't left any - unfiltered bytes in the temp buffer. This can happen - with any BCJ filter, but in practice it's more likely - with filters other than the x86 BCJ. - - Another situation where the bug can be triggered happens - if the uncompressed size is zero bytes and no output space - is provided. In this case the decompression can fail even - if the whole input file is given to lzma_code(). - - A similar bug was fixed in XZ Embedded on 2011-09-19. + The plan is to change the code so that all sanitizers pass but it's + not finished yet (performance shouldn't get worse) so as a temporary + measure to keep OSS Fuzz happy, the CLMUL CRC is now disabled even + though I think think the code is fine to use (and easy enough to review + the memory accesses in it too). - src/liblzma/simple/simple_coder.c | 2 +- - tests/Makefile.am | 4 +- - tests/test_bcj_exact_size.c | 112 ++++++++++++++++++++++++++++++++++++++ - 3 files changed, 116 insertions(+), 2 deletions(-) + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 3f94b6d87f1b8f1c421ba548f8ebb83dca9c8cda +commit 142e670a413a7bce1a2647f1cf1f33f8ee2dbe88 Author: Lasse Collin -Date: 2012-05-28 15:38:32 +0300 +Date: 2024-05-13 17:15:04 +0300 - Update THANKS. + xz: Document the static function get_chains_memusage() - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) -commit 7769ea051d739a38a1640fd448cf5eb83cb119c6 +commit 78e984399a64bfee5d11e7308e0bdbc1006db2ca Author: Lasse Collin -Date: 2012-05-28 15:37:43 +0300 +Date: 2024-05-13 17:07:22 +0300 - xz: Don't show a huge number in -vv when memory limit is disabled. + xz: Rename filters_memusage_max() to get_chains_memusage() - src/xz/message.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + src/xz/coder.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) -commit ec921105725e4d3ef0a683dd83eee6f24ab60ccd +commit 54c3db0a83d3e67d89aba92a0957f2dce9b111a7 Author: Lasse Collin -Date: 2012-05-27 22:30:17 +0300 +Date: 2024-05-13 17:04:05 +0300 - xz: Document the "summary" lines of --robot -lvv. - - This documents only the columns that are in v5.0. - The new columns added in the master branch aren't - necessarily stable yet. + xz: Rename filter_memusages to chains_memusages - src/xz/xz.1 | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) + src/xz/coder.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit 27d24eb0a9f6eed96d6a4594c2b0bf7a91d29f9a +commit d9e1ae79ec90d6a7eafeaceaf0ece4f0c83d4417 Author: Lasse Collin -Date: 2012-05-27 21:53:20 +0300 +Date: 2024-05-12 22:26:30 +0300 - xz: Fix output of verbose --robot --list modes. + xz: Simplify the memory usage scaling code + + 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. - It printed the filename in "filename (x/y)" format - which it obviously shouldn't do in robot mode. + 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. + + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a - src/xz/message.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/coder.c | 163 ++++++++++++++++++++------------------------------------- + 1 file changed, 57 insertions(+), 106 deletions(-) -commit ab25b82a91754d9388c89abddf806424671d9431 +commit 0ee56983d198b776878432703de664049b1be32e Author: Lasse Collin -Date: 2012-05-24 18:33:54 +0300 +Date: 2024-05-13 12:14:00 +0300 - Build: Upgrade m4/acx_pthread.m4 to the latest version. + xz: Edit comments - m4/ax_pthread.m4 | 98 +++++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 62 insertions(+), 36 deletions(-) + src/xz/coder.h | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) -commit d05d6d65c41a4bc83f162fa3d67c5d84e8751634 +commit ec82a49c3553f7206104582dbfb8b64fa433b491 Author: Lasse Collin -Date: 2012-05-10 21:15:17 +0300 +Date: 2024-05-13 12:03:51 +0300 - Update THANKS. + xz: Rename chain_idx to chain_num - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit e077391982f9f28dbfe542bba8800e7c5b916666 +commit a731a6993c34bbbd55abaf9c166718682b1da24f Author: Lasse Collin -Date: 2012-05-10 21:14:16 +0300 +Date: 2024-05-12 22:29:11 +0300 - Docs: Cleanup line wrapping a bit. + xz: Edit coding style - README | 12 ++++++------ - doc/history.txt | 49 +++++++++++++++++++++++++------------------------ - 2 files changed, 31 insertions(+), 30 deletions(-) + src/xz/coder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit fc39849c350225c6a1cd7f6e6adff1020521eabc -Author: Benno Schulenberg -Date: 2012-03-13 22:04:04 +0100 +commit 32eb176b89243fce3112347fe43a8ad14a9fd2be +Author: Lasse Collin +Date: 2024-05-12 22:16:05 +0300 - Fix a few typos and add some missing articles in some documents. + xz: Edit comments - Also hyphenate several compound adjectives. + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + + src/xz/coder.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit b90339f4daa510d2b1b8c550f855a99667f1d004 +Author: Lasse Collin +Date: 2024-05-12 21:57:49 +0300 + + xz: Fix grammar in a comment - Signed-off-by: Benno Schulenberg + Fixes: cb3111e3ed84152912b5138d690c8d9f00c6ef02 - AUTHORS | 6 +++--- - README | 42 ++++++++++++++++++++--------------------- - doc/faq.txt | 24 ++++++++++++------------ - doc/history.txt | 58 ++++++++++++++++++++++++++++----------------------------- - 4 files changed, 65 insertions(+), 65 deletions(-) + src/xz/coder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 29fa0566d5df199cb9acb2d17bf7eea61acc7fa1 +commit 4c0bdaf13d651b22ba13bd93f8379724d6ccdc13 Author: Lasse Collin -Date: 2012-04-29 11:51:25 +0300 +Date: 2024-05-12 21:46:56 +0300 - Windows: Update notes about static linking with MSVC. + xz: Rename filter_memusages to encoder_memusages - windows/README-Windows.txt | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) + src/xz/coder.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) -commit aac1b31ea4e66cf5a7a8c116bdaa15aa45e6c56e +commit b54aa023e0ec291b06e976e5f094ab0549e7b09b Author: Lasse Collin -Date: 2012-04-19 15:25:26 +0300 +Date: 2024-05-12 21:42:05 +0300 - liblzma: Remove outdated comments. + xz: Edit coding style - src/liblzma/simple/simple_coder.c | 3 --- - src/liblzma/simple/simple_private.h | 3 +-- - 2 files changed, 1 insertion(+), 5 deletions(-) + src/xz/coder.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) -commit df14a46013bea70c0bd35be7821b0b9108f97de7 +commit 49f67d3d3f42b640a7dfc4ca04c8934f658e10ce Author: Lasse Collin -Date: 2012-04-19 14:17:52 +0300 +Date: 2024-05-12 21:31:02 +0300 - DOS: Link against DJGPP's libemu to support FPU emulation. + xz: Rename filters_index to chain_num - This way xz should work on 386SX and 486SX. Floating point - only is needed for verbose output in xz. + The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68. - dos/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 8 ++++---- + src/xz/coder.c | 8 ++++---- + src/xz/coder.h | 2 +- + 3 files changed, 9 insertions(+), 9 deletions(-) -commit 03ed742a3a4931bb5c821357832083b26f577b13 +commit ff9e8b3d069ecfa52ec43dcdb198542d1692a492 Author: Lasse Collin -Date: 2012-04-19 14:02:25 +0300 +Date: 2024-05-12 21:22:43 +0300 - liblzma: Fix Libs.private in liblzma.pc to include -lrt when needed. + xz: Replace a few uint32_t with "unsigned" to reduce the number of casts + + These hold only tiny values. - src/liblzma/liblzma.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 2 +- + src/xz/coder.c | 17 ++++++++--------- + src/xz/coder.h | 2 +- + 3 files changed, 10 insertions(+), 11 deletions(-) -commit 8c5b13ad59df70f49429bfdfd6ac120b8f892fda +commit b5e6c1113b1ba02c282bd9163eccdb521c937a78 Author: Lasse Collin -Date: 2012-04-19 13:58:55 +0300 +Date: 2024-05-12 21:10:45 +0300 - Docs: Update MINIX 3 information in INSTALL. + xz: Rename filters_used_mask to chains_used_mask + + The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68. - INSTALL | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) + src/xz/coder.c | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) -commit c7376fc415a1566f38b2de4b516a17013d516a8b +commit 32500dfaadae2ea36fda2e17b49ae7d9ac1acf52 Author: Lasse Collin -Date: 2012-02-22 14:23:13 +0200 +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 - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) -commit cff070aba6281ba743d29a62b8c0c66e5da4b2a6 +commit ad146b1f42bbb678175a503a45ce525e779f9b8b Author: Lasse Collin -Date: 2012-02-22 14:02:34 +0200 +Date: 2024-05-12 17:09:17 +0300 - Fix exit status of xzgrep when grepping binary files. + xz: Rename "filters" to "chains" - When grepping binary files, grep may exit before it has - read all the input. In this case, gzip -q returns 2 (eating - SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status - (e.g. 141). This causes wrong exit status when grepping - xz- or bzip2-compressed binary files. + The convention is that - The fix checks for the special exit status that indicates SIGPIPE. - It uses kill -l which should be supported everywhere since it - is in both SUSv2 (1997) and POSIX.1-2008. + lzma_filter filters[LZMA_FILTERS_MAX + 1]; - Thanks to James Buren for the bug report. + 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]. - src/scripts/xzgrep.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/xz/coder.c | 68 +++++++++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 34 deletions(-) -commit 41cafb2bf9beea915710ee68f05fe929cd17759c +commit 5a4ae4e4d0105404184e9a82ee08f94e1b7783e0 Author: Lasse Collin -Date: 2012-02-22 12:08:43 +0200 +Date: 2024-05-12 16:56:15 +0300 - Update THANKS. + xz: Clean up a comment - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) -commit 2dcea03712fa881930d69ec9eff70855c3d126d9 +commit 2de80494ed9a4dc7db395a32a5efb770ce769804 Author: Lasse Collin -Date: 2012-02-22 12:00:16 +0200 +Date: 2024-05-12 16:52:09 +0300 - Fix compiling with IBM XL C on AIX. + xz: Add clarifying assertions - INSTALL | 36 ++++++++++++++++++++++-------------- - configure.ac | 6 +++++- - 2 files changed, 27 insertions(+), 15 deletions(-) + src/xz/coder.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit 7db6bdf4abcf524115be2cf5659ed540cef074c5 +commit 1eaad004bf7748976324672db028e34f42802e61 Author: Lasse Collin -Date: 2012-01-10 17:13:03 +0200 +Date: 2024-05-10 20:23:33 +0300 - Tests: Fix a compiler warning with _FORTIFY_SOURCE. + xz: Add a clarifying assertion - Reported here: - http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385 + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a - tests/create_compress_files.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/xz/coder.c | 1 + + 1 file changed, 1 insertion(+) -commit 694952d545b6cf056547893ced69486eff9ece55 +commit 605094329b986244833c967c04963cacc41a868d Author: Lasse Collin -Date: 2011-12-19 21:21:29 +0200 +Date: 2024-05-12 16:47:17 +0300 - Docs: Explain the stable releases better in README. + xz: Clarify a comment - README | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/xz/coder.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 418fe668b3c53a9a20020b6cc652aaf25c734b29 +commit 8fac2577f2dbb9491afd8500f60d004c9071df3b Author: Lasse Collin -Date: 2011-11-07 13:07:52 +0200 +Date: 2024-05-12 16:28:25 +0300 - xz: Show minimum required XZ Utils version in xz -lvv. + xz: Use the info collected in parse_block_list() - Man page wasn't updated yet. + This is slightly simpler and it avoids looping through + the opt_block_list array. - src/xz/list.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 57 insertions(+), 6 deletions(-) + src/xz/coder.c | 95 ++++++++++++++++++++++++---------------------------------- + 1 file changed, 39 insertions(+), 56 deletions(-) -commit 7081d82c37326bac97184e338345fa1c327e3580 +commit 81d350dab864b985b740742772f3b132d4c52914 Author: Lasse Collin -Date: 2011-11-04 17:57:16 +0200 +Date: 2024-05-12 15:48:45 +0300 - xz: Fix a typo in a comment. - - Thanks to Bela Lubkin. + xz: Remember the filter chains and the largest Block in parse_block_list() - src/xz/args.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/args.c | 18 ++++++++++++++++++ + src/xz/coder.c | 2 ++ + src/xz/coder.h | 13 +++++++++++++ + 3 files changed, 33 insertions(+) -commit 232fe7cd70ad258d6a37f17e860e0f1b1891eeb5 +commit 46ab56968f7dfdac187710a1223659d832fa1565 Author: Lasse Collin -Date: 2011-11-03 17:08:02 +0200 +Date: 2024-05-12 15:38:48 +0300 - Update THANKS. + xz: Update a comment and initialization of filters_used_mask - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) -commit 74d2bae4d3449c68453b0473dd3430ce91fd90c1 +commit e89293a0baeb8663707c6b4a74fbb310ec698a8f Author: Lasse Collin -Date: 2011-11-03 17:07:22 +0200 +Date: 2024-05-12 15:08:10 +0300 - xz: Fix xz on EBCDIC systems. - - Thanks to Chris Donawa. + xz: parse_block_list: Edit integer type casting - src/xz/coder.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/xz/args.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) -commit 4ac4923f47cc0ef97dd9ca5cfcc44fc53eeab34a +commit 87011e40c168255cd2edea129ee68c901770603b Author: Lasse Collin -Date: 2011-10-23 17:09:10 +0300 +Date: 2024-05-12 14:51:37 +0300 - Update THANKS. + xz: Make filter_memusages a local variable - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/xz/coder.c | 35 +++++++++++++++++++++-------------- + 1 file changed, 21 insertions(+), 14 deletions(-) -commit ab50ae3ef40c81e5bf613905ca3fd636548b75e7 +commit 347b412a9374e0456bef9da0d7d79174c0b6f1a5 Author: Lasse Collin -Date: 2011-10-23 17:08:14 +0300 +Date: 2024-05-10 20:33:08 +0300 - liblzma: Fix invalid free() in the threaded encoder. + xz: Remove unused code and simplify - It was triggered if initialization failed e.g. due to - running out of memory. + 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. - Thanks to Arkadiusz Miskiewicz. + Since the message is shown only at V_DEBUG, skip the memusage + calculation if verbosity level isn't high enough. + + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a - src/liblzma/common/outqueue.c | 4 ++++ - 1 file changed, 4 insertions(+) + src/xz/coder.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) -commit 6b620a0f0813d28c3c544b4ff8cb595b38a6e908 +commit 31358c057c9de9d6aba96bae112b2d17942de7cb Author: Lasse Collin -Date: 2011-10-23 17:05:55 +0300 +Date: 2024-05-10 20:22:58 +0300 - liblzma: Fix a deadlock in the threaded encoder. + xz: Fix integer type from uint64_t to uint32_t - It was triggered when reinitializing the encoder, - e.g. when encoding two files. + lzma_options_lzma.dict_size is uint32_t so use it here too. + + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a - src/liblzma/common/stream_encoder_mt.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/xz/coder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit bd52cf150ecd51e3ab63a9cc1a3cff6a77500178 +commit 3f71e0f3a118e1012526f94fd640a626d30cb599 Author: Lasse Collin -Date: 2011-09-06 12:03:41 +0300 +Date: 2024-05-08 21:40:07 +0300 - Build: Fix "make check" on Windows. + 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 - tests/Makefile.am | 7 +++++-- - windows/build.bash | 2 ++ - 2 files changed, 7 insertions(+), 2 deletions(-) + debug/translation.bash | 1 - + 1 file changed, 1 deletion(-) -commit 5c5b2256969ac473001b7d67615ed3bd0a54cc82 +commit b05a516830095a0e1937aeb31c937fb0400408b6 Author: Lasse Collin -Date: 2011-08-09 21:19:13 +0300 +Date: 2024-05-07 20:41:28 +0300 - Update THANKS. + Fix the date of NEWS for 5.4.5 - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + NEWS | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 5b1e1f10741af9e4bbe4cfc3261fb7c7b04f7809 +commit 6d336aeb97b69c496ddc626af403f6f21c753658 Author: Lasse Collin -Date: 2011-08-09 21:16:44 +0300 +Date: 2024-05-07 16:21:15 +0300 - Workaround unusual SIZE_MAX on SCO OpenServer. + Build: Update visibility.m4 from Gnulib + + This fixes the syntax of the "serial" line and renames + a temporary variable. - src/common/sysdefs.h | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + m4/visibility.m4 | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) -commit e9ed88126eee86e2511fa42681a5c7104820cf0a +commit ab51e8ee610e2a893906859848f93d5cb0d5ba83 Author: Lasse Collin -Date: 2011-08-06 20:37:28 +0300 +Date: 2024-05-07 15:05:21 +0300 - Run the scripts with the correct shell in test_scripts.sh. + po4a/update-po: Delete the *.po.authors files - The scripts are now made executable in the build tree. - This way the scripts can be run like programs in - test_scripts.sh. Previously test_scripts.sh always - used sh but it's not correct if @POSIX_SHELL@ is set - to something else by configure. - - Thanks to Jonathan Nieder for the patch. + 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. - configure.ac | 8 ++++---- - tests/test_scripts.sh | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) + po4a/update-po | 4 ++++ + 1 file changed, 4 insertions(+) -commit 1c673e5681720491a74fc4b2992e075f47302c22 +commit e4780244a17420cc95d5498cd6e02ad10eac6e5f Author: Lasse Collin -Date: 2011-07-31 11:01:47 +0300 +Date: 2024-05-07 13:12:17 +0300 - Fix exit status of "xzdiff foo.xz bar.xz". - - xzdiff was clobbering the exit status from diff in a case - statement used to analyze the exit statuses from "xz" when - its operands were two compressed files. Save and restore - diff's exit status to fix this. - - The bug is inherited from zdiff in GNU gzip and was fixed - there on 2009-10-09. - - Thanks to Jonathan Nieder for the patch and - to Peter Pallinger for reporting the bug. + xz: Edit comments and coding style - src/scripts/xzdiff.in | 2 ++ - tests/Makefile.am | 4 +++- - tests/test_scripts.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 59 insertions(+), 1 deletion(-) + src/xz/coder.c | 25 ++++++++++++------------- + 1 file changed, 12 insertions(+), 13 deletions(-) -commit 324cde7a864f4506c32ae7846d688c359a83fe65 +commit fe4d8b0c80eaeca3381be302eeb89aba871a7e7c Author: Lasse Collin -Date: 2011-06-16 12:15:29 +0300 +Date: 2024-05-06 23:08:22 +0300 - liblzma: Remove unneeded semicolon. + xz: Omit an incorrect comment + + It likely was a leftover from a development version of the code. + + Fixes: 183819bfd9efac8c184d9bf123325719b7eee30f - src/liblzma/lz/lz_encoder_hash.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/xz/coder.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) -commit 492c86345551a51a29bf18e55fe55a5e86f169ce +commit 9bef5b8d17dd5e009d6a6b2becc2dc535da53937 Author: Lasse Collin -Date: 2011-05-28 19:24:56 +0300 +Date: 2024-05-06 23:04:31 +0300 - Build: Make configure print if symbol versioning is enabled or not. + xz: Add braces to a for-statement and to an if-statement + + No functional changes. + + Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a + Fixes: 479fd58d60622331fcbe48fddf756927b9f80d9a - configure.ac | 2 ++ - 1 file changed, 2 insertions(+) + src/xz/coder.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit fc4d4436969bd4d71b704d400a165875e596034a +commit de06b9f0c0a3f72569829ecadbc9c0a3ef099f57 Author: Lasse Collin -Date: 2011-05-28 16:43:26 +0300 +Date: 2024-05-06 23:00:09 +0300 - Don't call close(-1) in tuklib_open_stdxxx() on error. + liblzma: Omit an unneeded array from the x86 filter - Thanks to Jim Meyering. + Fixes: 6aa2a6deeba04808a0fe4461396e7fb70277f3d4 - src/common/tuklib_open_stdxxx.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/liblzma/simple/x86.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) -commit bd35d903a04c4d388adb4065b0fa271302380895 +commit 7da488cb933fdf51cfc14cb5810beb0766224380 Author: Lasse Collin -Date: 2011-05-28 15:55:39 +0300 +Date: 2024-05-06 22:56:31 +0300 - liblzma: Use symbol versioning. - - Symbol versioning is enabled by default on GNU/Linux, - other GNU-based systems, and FreeBSD. - - I'm not sure how stable this is, so it may need - backward-incompatible changes before the next release. - - The idea is that alpha and beta symbols are considered - unstable and require recompiling the applications that - use those symbols. Once a symbol is stable, it may get - extended with new features in ways that don't break - compatibility with older ABI & API. - - The mydist target runs validate_map.sh which should - catch some probable problems in liblzma.map. Otherwise - I would forget to update the map file for new releases. + CMake: Add test_suffix.sh to the tests - Makefile.am | 1 + - configure.ac | 21 +++++++++ - src/liblzma/Makefile.am | 6 +++ - src/liblzma/liblzma.map | 105 ++++++++++++++++++++++++++++++++++++++++++++ - src/liblzma/validate_map.sh | 68 ++++++++++++++++++++++++++++ - 5 files changed, 201 insertions(+) + tests/tests.cmake | 13 +++++++++++++ + 1 file changed, 13 insertions(+) -commit afbb244362c9426a37ce4eb9d54aab768da3adad +commit a805594ed0b4cbf7b81aa28ff46a8ab3c83c6876 Author: Lasse Collin -Date: 2011-05-28 09:46:46 +0300 +Date: 2024-05-06 22:55:54 +0300 - Translations: Update the Italian translation. + Test: Add CMake support to test_suffix.sh - Thanks to Milo Casagrande. + It needs to find the xz executable from a different directory + and work without config.h. - po/it.po | 365 +++++++++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 216 insertions(+), 149 deletions(-) + tests/test_suffix.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) -commit 79bef85e0543c0c3723281c3c817616c6cec343b +commit 50e19489387774bab3c4a988397d0d9c7a142a46 Author: Lasse Collin -Date: 2011-05-28 08:46:04 +0300 +Date: 2024-05-06 20:45:34 +0300 - Tests: Add a test file for the bug in the previous commit. + Update INSTALL about MINIX 3 + + 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. - tests/files/README | 4 ++++ - tests/files/bad-1-block_header-6.xz | Bin 0 -> 72 bytes - 2 files changed, 4 insertions(+) + INSTALL | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) -commit c0297445064951807803457dca1611b3c47e7f0f +commit 68d18aea1422a2b86b98b71d0b019233d84e01b0 Author: Lasse Collin -Date: 2011-05-27 22:25:44 +0300 +Date: 2024-05-02 23:00:16 +0300 - xz: Fix error handling in xz -lvv. + Windows: Remove the "doc/api" line from README-Windows.txt - It could do an invalid free() and read past the end - of the uninitialized filters array. + Fixes: 252aa1d67bc015eeba462803ab72edeb7744d864 - src/xz/list.c | 21 ++++++--------------- - 1 file changed, 6 insertions(+), 15 deletions(-) + windows/README-Windows.txt | 2 -- + 1 file changed, 2 deletions(-) -commit 8bd91918ac50731f00b1a2a48072980572eb2ff9 +commit 8ede961374613aa302a13571d662cfaea1cf91f7 Author: Lasse Collin -Date: 2011-05-27 22:09:49 +0300 +Date: 2024-05-02 22:59:04 +0300 - liblzma: Handle allocation failures correctly in lzma_index_init(). + 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. - Thanks to Jim Meyering. + Fixes: d3a77ebc04bf1db8d52de2d9b0f07877bc4fd139 - src/liblzma/common/index.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + Makefile.am | 5 ----- + 1 file changed, 5 deletions(-) -commit fe00f95828ef5627721b57e054f7eb2d42a2c961 -Author: Lasse Collin -Date: 2011-05-24 00:23:46 +0300 +commit 9a6761aa35ed84d30bd2fda2333a4fdf3f46ecdc +Author: Sam James +Date: 2024-05-02 13:26:40 +0100 - Build: Fix checking for system-provided SHA-256. + ci: add SPDX headers + + I've checked over each of these and they're straightforward applications + of the relevant Github Actions. - configure.ac | 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 21b45b9bab541f419712cbfd473ccc31802e0397 -Author: Lasse Collin -Date: 2011-05-23 18:30:30 +0300 +commit 81efe6119f86e3274e512c9eca5ec22b2196c2b3 +Author: Yaroslav Halchenko +Date: 2024-03-29 14:37:24 -0400 - Build: Set GZIP_ENV=-9n in top-level Makefile.am. + 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. - Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) + .codespellrc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -commit 48053e8a4550233af46359024538bff90c870ab1 +commit 905bfc74fe2670fd9c39014803017ab53d325401 Author: Lasse Collin -Date: 2011-05-22 16:42:11 +0300 +Date: 2024-04-30 14:37:11 +0300 - Update NEWS for 5.0.3. + Add .gitattributes to clean up git-archive output - NEWS | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) + .gitattributes | 7 +++++++ + 1 file changed, 7 insertions(+) -commit bba37df2c9e54ad773e15ff00a09d2d6989fb3b2 +commit 3334c71d3d4294a4f6569df3ba9bcf2443dfa501 Author: Lasse Collin -Date: 2011-05-21 16:28:44 +0300 +Date: 2024-04-19 12:11:09 +0300 - Add French translation. + xzdec: Support Landlock ABI version 4 - It is known that the BCJ filter --help text is only - partially translated. + This was added to xz in 02e3505991233901575b7eabc06b2c6c62a96899 + but I forgot to do the same in xzdec. + + 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. - po/LINGUAS | 1 + - po/fr.po | 864 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 865 insertions(+) + src/xzdec/xzdec.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) -commit 4161d7634965a7a287bf208dcd79f6185f448fe8 +commit 278563ef8f2b8d98d7f2c85e1a64ec1bc21d26d8 Author: Lasse Collin -Date: 2011-05-21 15:12:10 +0300 +Date: 2024-04-30 22:22:45 +0300 - xz: Translate also the string used to print the program name. + liblzma: Fix incorrect function type error from sanitizer + + 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. - French needs a space before a colon, e.g. "xz : foo error". + This issue could be a problem with control flow integrity (CFI) + methods that check the function type on indirect function calls. + + Fixes: 3b34851de1eaf358cf9268922fa0eeed8278d680 - src/xz/message.c | 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 b94aa0c8380cdb18cddb33440d625474c16643cf +commit 77c8f60547decefca8f2d0c905d9c708c38ee8ff Author: Lasse Collin -Date: 2011-05-21 15:08:44 +0300 +Date: 2024-04-30 21:41:11 +0300 - liblzma: Try to use SHA-256 from the operating system. + xz: Avoid arithmetic on a null pointer - If the operating system libc or other base libraries - provide SHA-256, use that instead of our own copy. - Note that this doesn't use OpenSSL or libgcrypt or - such libraries to avoid creating dependencies to - other packages. + It's undefined behavior. The result wasn't ever used as it occurred + in the last iteration of a loop. - This supports at least FreeBSD, NetBSD, OpenBSD, Solaris, - MINIX, and Darwin. They all provide similar but not - identical SHA-256 APIs; everyone is a little different. + Clang 17 with -fsanitize=address,undefined: - Thanks to Wim Lewis for the original patch, improvements, - and testing. + $ 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 - configure.ac | 54 +++++++++++++++++++++++++++ - src/liblzma/check/Makefile.inc | 2 + - src/liblzma/check/check.h | 83 ++++++++++++++++++++++++++++++++++++++---- - 3 files changed, 131 insertions(+), 8 deletions(-) + src/xz/args.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) -commit f004128678d43ea10b4a6401aa184cf83252d6ec +commit 64503cc2b76a388ced4ec5f68234a07f0dcddcd5 Author: Lasse Collin -Date: 2011-05-17 12:52:18 +0300 +Date: 2024-04-27 20:42:00 +0300 - Don't use clockid_t in mythread.h when clock_gettime() isn't available. + CMake: Support building liblzma API docs using Doxygen - Thanks to Wim Lewis for the patch. + 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. - src/common/mythread.h | 2 ++ - 1 file changed, 2 insertions(+) + CMakeLists.txt | 40 +++++++++++++++++++++++++++++++--------- + 1 file changed, 31 insertions(+), 9 deletions(-) -commit f779516f42ebd2db47a5b7d6143459bf7737cf2f +commit 0a7f5a80d8532a1d8cfa0a902c9d1ad7651eca37 Author: Lasse Collin -Date: 2011-05-17 12:26:28 +0300 +Date: 2024-04-20 23:36:39 +0300 - Update THANKS. + CMake: List API headers in LIBLZMA_API_HEADERS variable + + This way the same list will be usable in more than one location. - THANKS | 3 +++ - 1 file changed, 3 insertions(+) + CMakeLists.txt | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) -commit 830ba587775bb562f6eaf05cad61bf669d1f8892 +commit 541406bee3f09e9813103c6406b10fc6ab2e0d30 Author: Lasse Collin -Date: 2011-05-17 12:21:33 +0300 +Date: 2024-04-19 15:16:42 +0300 - Update INSTALL with a note about linker problem on OpenSolaris x86. + PACKAGERS: Document the optional Doxygen usage + + Also add a note that packagers should check the licensing + of the Doxygen output. - INSTALL | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) + PACKAGERS | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) -commit ec7106309c8060e9c646dba20c4f15689a0bbb04 +commit e21efdf96f39378fe417479f89e97046680406f5 Author: Lasse Collin -Date: 2011-05-17 12:01:37 +0300 +Date: 2024-04-27 17:47:09 +0300 - Build: Fix initialization of enable_check_* variables in configure.ac. - - This doesn't matter much in practice since it is unlikely - that anyone would have such environment variable names. + Build: Add --enable-doxygen to generate and install API docs - Thanks to Wim Lewis. + It requires Doxygen. This option is disabled by default. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + INSTALL | 6 ++++++ + configure.ac | 10 +++++++++- + src/liblzma/api/Makefile.am | 19 +++++++++++++++++++ + 3 files changed, 34 insertions(+), 1 deletion(-) -commit 4c6e146df99696920f12410fb17754412797ef36 +commit 0ece09a575d7e542bda8825808ddd6cf7de8cc4b Author: Lasse Collin -Date: 2011-05-17 11:54:38 +0300 +Date: 2024-04-19 15:15:17 +0300 - Add underscores to attributes (__attribute((__foo__))). + Doxygen: update-doxygen: Support out-of-tree builds + + Also, now $0 is used to refer to the script itself. - src/liblzma/common/alone_decoder.c | 2 +- - src/liblzma/common/alone_encoder.c | 2 +- - src/liblzma/common/block_encoder.c | 2 +- - src/liblzma/common/common.c | 2 +- - src/liblzma/common/common.h | 2 +- - src/liblzma/common/index_decoder.c | 9 +++++---- - src/liblzma/common/index_encoder.c | 11 ++++++----- - src/liblzma/delta/delta_encoder.c | 2 +- - src/liblzma/lz/lz_decoder.c | 2 +- - src/liblzma/lz/lz_encoder.c | 2 +- - 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 | 2 +- - src/liblzma/simple/sparc.c | 2 +- - src/lzmainfo/lzmainfo.c | 4 ++-- - src/xz/coder.c | 2 +- - src/xz/hardware.h | 2 +- - src/xz/message.c | 2 +- - src/xz/message.h | 18 +++++++++--------- - src/xz/options.c | 6 +++--- - src/xz/signals.c | 2 +- - src/xz/util.h | 6 +++--- - src/xzdec/xzdec.c | 6 +++--- - 25 files changed, 49 insertions(+), 47 deletions(-) + doxygen/update-doxygen | 110 ++++++++++++++++++++++++++++++------------------- + 1 file changed, 68 insertions(+), 42 deletions(-) -commit 7a480e485938884ef3021b48c3b0b9f9699dc9b6 +commit 2c519f641f266fd897edf680827d9c905f411440 Author: Lasse Collin -Date: 2011-05-01 12:24:23 +0300 +Date: 2024-04-28 21:08:00 +0300 - xz: Fix input file position when --single-stream is used. - - Now the following works as you would expect: + Doxygen: Simplify Doxyfile and add SPDX license identifier - echo foo | xz > foo.xz - echo bar | xz >> foo.xz - ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz + This omits all comments and a few non-default options that weren't + needed. Now it contains no copyrighted content from Doxygen itself. + + doxygen/Doxyfile | 2698 +----------------------------------------------------- + 1 file changed, 25 insertions(+), 2673 deletions(-) + +commit bdba39a57530d11b88440df8024002be3d09e4a1 +Author: Lasse Collin +Date: 2024-04-19 15:14:02 +0300 + + Doxygen: Don't strip JavaScript anymore - Note that it doesn't work if the input is not seekable - or if there is Stream Padding between the concatenated - .xz Streams. + 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. - src/xz/coder.c | 1 + - src/xz/file_io.c | 15 +++++++++++++++ - src/xz/file_io.h | 13 +++++++++++++ - 3 files changed, 29 insertions(+) + doxygen/update-doxygen | 21 --------------------- + 1 file changed, 21 deletions(-) -commit c29e6630c1450c630c4e7b783bdd76515db9004c +commit d3a77ebc04bf1db8d52de2d9b0f07877bc4fd139 Author: Lasse Collin -Date: 2011-05-01 12:15:51 +0300 +Date: 2024-04-19 17:26:41 +0300 - xz: Print the maximum number of worker threads in xz -vv. + Build: Remove old Doxygen rules from top-level Makefile.am - src/xz/coder.c | 4 ++++ - 1 file changed, 4 insertions(+) + Makefile.am | 12 ------------ + 1 file changed, 12 deletions(-) -commit 0b77c4a75158ccc416b07d6e81df8ee0abaea720 +commit fd7faa4c338a42a6a40e854b837d285ae2e8c609 Author: Lasse Collin -Date: 2011-04-19 10:44:48 +0300 +Date: 2024-04-19 15:10:06 +0300 - Build: Warn if no supported method to detect the number of CPU cores. + Update COPYING to match the autogen.sh and mydist changes - configure.ac | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) + COPYING | 11 ----------- + 1 file changed, 11 deletions(-) -commit e4622df9ab4982f8faa53d85b17be66216175a58 +commit b2bc55d8a0a9f2f59bfd4302067300e650f6baa3 Author: Lasse Collin -Date: 2011-04-19 09:55:06 +0300 +Date: 2024-04-19 17:23:43 +0300 - Update THANKS. + Build: Don't run update-doxygen as part of "make mydist" - THANKS | 1 + - 1 file changed, 1 insertion(+) + Makefile.am | 1 - + 1 file changed, 1 deletion(-) -commit 9c1b05828a88eff54409760b92162c7cc2c7cff6 +commit e9be74f5b129fe8a5388d588e68b1b7f5168a310 Author: Lasse Collin -Date: 2011-04-19 09:20:44 +0300 +Date: 2024-04-19 15:09:48 +0300 - Fix portability problems in mythread.h. - - Use gettimeofday() if clock_gettime() isn't available - (e.g. Darwin). - - The test for availability of pthread_condattr_setclock() - and CLOCK_MONOTONIC was incorrect. Instead of fixing the - #ifdefs, use an Autoconf test. That way if there exists a - system that supports them but doesn't specify the matching - POSIX #defines, the features will still get detected. - - Don't try to use pthread_sigmask() on OpenVMS. It doesn't - have that function. + autogen.sh: Don't generated Doxygen docs anymore + + autogen.sh | 18 +++--------------- + 1 file changed, 3 insertions(+), 15 deletions(-) + +commit 252aa1d67bc015eeba462803ab72edeb7744d864 +Author: Lasse Collin +Date: 2024-04-19 17:41:36 +0300 + + windows/build.bash: Omit Doxygen docs from the package - Guard mythread.h against being #included multiple times. + They will be omitted from the source tarball and I don't want + to make Doxygen a dependency of build.bash. - configure.ac | 7 +++++++ - src/common/mythread.h | 31 +++++++++++++++++++++++++++---- - 2 files changed, 34 insertions(+), 4 deletions(-) + windows/build.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 3de00cc75da7b0e7b65e84c62b5351e231f501e9 +commit 634095364d87444d62d8ec54c134c0cd4705f5d7 Author: Lasse Collin -Date: 2011-04-18 19:35:49 +0300 +Date: 2024-04-19 14:14:47 +0300 - Update THANKS. + README: Don't mention PDF man pages anymore - THANKS | 2 ++ - 1 file changed, 2 insertions(+) + README | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit bd5002f5821e3d1b04f2f56989e4a19318e73633 -Author: Martin Väth -Date: 2011-04-15 04:54:49 -0400 +commit dc684bf76ea23574ee9d88382057381e04e6089a +Author: Lasse Collin +Date: 2024-04-19 14:10:39 +0300 - xzgrep: fix typo in $0 parsing + Build: Omit PDF man pages from the package - Reported-by: Diego Elio Pettenò - Signed-off-by: Martin Väth - Signed-off-by: Mike Frysinger + 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. - src/scripts/xzgrep.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Makefile.am | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) -commit 6ef4eabc0acc49e1bb9dc68064706e19fa9fcf48 +commit e3531ab4125cbd5c01ebd3200791350960547189 Author: Lasse Collin -Date: 2011-04-12 12:48:31 +0300 +Date: 2024-04-19 13:54:39 +0300 - Bump the version number to 5.1.1alpha and liblzma soname to 5.0.99. + windows/build.bash: Don't copy PDF man pages to the package - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 2 +- + windows/README-Windows.txt | 2 +- + windows/build.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -commit 9a4377be0d21e597c66bad6c7452873aebfb3c1c +commit 710a4573ef2cbd19c66318c3b2d1388e418e26c7 Author: Lasse Collin -Date: 2011-04-12 12:42:37 +0300 +Date: 2024-04-28 01:34:50 +0300 - Put the unstable APIs behind #ifdef LZMA_UNSTABLE. + Tests: test_index: Fix failures when features are disabled - This way people hopefully won't complain if these APIs - change and break code that used an older API. + Fixes: cd88423e76d54eb72aea037364f3ebb21f122503 - src/liblzma/api/lzma/container.h | 4 ++++ - src/liblzma/common/common.h | 2 ++ - src/xz/private.h | 2 ++ - 3 files changed, 8 insertions(+) + tests/test_index.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) -commit 3e321a3acd50002cf6fdfd259e910f56d3389bc3 +commit aaff75c3486c4489ce88b0efb36b41cf138af7c3 Author: Lasse Collin -Date: 2011-04-12 11:59:49 +0300 +Date: 2024-04-20 17:09:11 +0300 - Remove doubled words from documentation and comments. + CMake: Keep the build working if the "tests" directory is missing - Spot candidates by running these commands: - git ls-files |xargs perl -0777 -n \ - -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \ - -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}' + 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. - Thanks to Jim Meyering for the original patch. + 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. - doc/lzma-file-format.txt | 4 ++-- - src/liblzma/common/alone_encoder.c | 2 +- - src/liblzma/lzma/lzma2_encoder.c | 2 +- - src/xz/file_io.c | 2 +- - src/xz/xz.1 | 2 +- - windows/INSTALL-Windows.txt | 2 +- - 6 files changed, 7 insertions(+), 7 deletions(-) + CMakeLists.txt | 76 ++--------------------------------------------- + tests/Makefile.am | 1 + + tests/tests.cmake | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 92 insertions(+), 73 deletions(-) -commit d91a84b534b012d19474f2fda1fbcaef873e1ba4 +commit a5f2aa5618fe9183706c9c514c3067985f6c338b Author: Lasse Collin -Date: 2011-04-12 11:46:01 +0300 +Date: 2024-04-20 13:12:50 +0300 - Update NEWS. + Tests: Remove x86 and SPARC BCJ tests + + 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. - NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 45 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 14e6ad8cfe0165c1a8beeb5b2a1536558b29b0a1 +commit d879686469c9c4bf2a7c0bb6420ebe4530fc8f07 Author: Lasse Collin -Date: 2011-04-12 11:45:40 +0300 +Date: 2024-04-27 18:30:40 +0300 - Update TODO. + Tests: test_index: Edit a misleading test - TODO | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + tests/test_index.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -commit 70e750f59793f9b5cd306a5adce9b8e427739e04 +commit 612005bbdb0dea9dc09e9e2e9cc16a15c1480acd Author: Lasse Collin -Date: 2011-04-12 11:08:55 +0300 +Date: 2024-04-27 16:46:01 +0300 - xz: Update the man page about threading. + Tests: test_index: Use minimal values to test integer overflow - src/xz/xz.1 | 34 ++++++++++++++++++++-------------- - 1 file changed, 20 insertions(+), 14 deletions(-) + tests/test_index.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 24e0406c0fb7494d2037dec033686faf1bf67068 +commit 4ad88b2544c2aaf8de8f38af54587098cbe66c1d Author: Lasse Collin -Date: 2011-04-11 22:06:03 +0300 +Date: 2024-04-27 15:13:39 +0300 - xz: Add support for threaded compression. + Tests: test_index: Test lzma_index_buffer_decode() more - src/xz/args.c | 3 +- - src/xz/coder.c | 202 +++++++++++++++++++++++++++++++++++---------------------- - 2 files changed, 125 insertions(+), 80 deletions(-) + tests/test_index.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) -commit de678e0c924aa79a19293a8a6ed82e8cb6572a42 +commit 575b11b0d291e66c5fce31ce7a72f11436d57c83 Author: Lasse Collin -Date: 2011-04-11 22:03:30 +0300 +Date: 2024-04-27 15:08:29 +0300 - liblzma: Add lzma_stream_encoder_mt() for threaded compression. + Tests: test_index: Test that *i = NULL is done on LZMA_PROG_ERROR - This is the simplest method to do threading, which splits - the uncompressed data into blocks and compresses them - independently from each other. There's room for improvement - especially to reduce the memory usage, but nevertheless, - this is a good start. + On LZMA_DATA_ERROR from lzma_index_buffer_decode(), *i = NULL was + already done but this adds a test for that case too. - configure.ac | 1 + - src/liblzma/api/lzma/container.h | 163 +++++ - src/liblzma/common/Makefile.inc | 7 + - src/liblzma/common/common.c | 9 +- - src/liblzma/common/common.h | 14 + - src/liblzma/common/outqueue.c | 180 ++++++ - src/liblzma/common/outqueue.h | 155 +++++ - src/liblzma/common/stream_encoder_mt.c | 1011 ++++++++++++++++++++++++++++++++ - 8 files changed, 1539 insertions(+), 1 deletion(-) + tests/test_index.c | 31 +++++++++++++++++++++++++++---- + 1 file changed, 27 insertions(+), 4 deletions(-) -commit 25fe729532cdf4b8fed56a4519b73cf31efaec50 +commit 2c970debdb285823f01f75e875561d893345ac2b Author: Lasse Collin -Date: 2011-04-11 21:15:07 +0300 +Date: 2024-04-27 15:01:25 +0300 - liblzma: Add the forgotten lzma_lzma2_block_size(). - - This should have been in 5eefc0086d24a65e136352f8c1d19cefb0cbac7a. + Tests: test_index: Test lzma_index_buffer_encode() with empty output buf - src/liblzma/lzma/lzma2_encoder.c | 10 ++++++++++ - src/liblzma/lzma/lzma2_encoder.h | 2 ++ - 2 files changed, 12 insertions(+) + tests/test_index.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 91afb785a1dee34862078d9bf844ef12b8cc3e35 +commit cd88423e76d54eb72aea037364f3ebb21f122503 Author: Lasse Collin -Date: 2011-04-11 21:04:13 +0300 +Date: 2024-04-27 14:59:55 +0300 - liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too. + Tests: test_index: Replace if-statements with tuktest assertions - src/liblzma/api/lzma/container.h | 9 +++++++++ - 1 file changed, 9 insertions(+) + tests/test_index.c | 22 +++++++++------------- + 1 file changed, 9 insertions(+), 13 deletions(-) -commit 4a9905302a9e4a1601ae09d650d3f08ce98ae9ee +commit 7f865577a6224fbbb5f5ca52574b62ea8ac9bf51 Author: Lasse Collin -Date: 2011-04-11 20:59:07 +0300 +Date: 2024-04-27 14:56:16 +0300 - liblzma: Document lzma_raw_(enc|dec)oder_memusage() better. + Tests: test_index: Make it clear that my_alloc() has no integer overflows - It didn't mention the return value that is used if - an error occurs. + liblzma guarantees that the product of the allocation size arguments + will fit in size_t. + + 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. - src/liblzma/api/lzma/filter.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + tests/test_index.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -commit 0badb0b1bd649163322783b0bd9e590b4bc7a93d +commit 12313a3b6596cdcf012e180597f84d231f8730d3 Author: Lasse Collin -Date: 2011-04-11 19:28:18 +0300 +Date: 2024-04-27 14:51:52 +0300 - liblzma: Use memzero() to initialize supported_actions[]. - - This is cleaner and makes it simpler to add new members - to lzma_action enumeration. + Tests: test_index: Verify also iter.block.number_in_stream - src/liblzma/common/common.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + tests/test_index.c | 2 ++ + 1 file changed, 2 insertions(+) -commit a7934c446a58e20268689899d2a39f50e571f251 +commit ad2654010d9d641ce1601beeff00630027e6bcd4 Author: Lasse Collin -Date: 2011-04-11 19:26:27 +0300 +Date: 2024-04-27 14:51:06 +0300 - liblzma: API comment about lzma_allocator with threaded coding. + Tests: test_index: Check cases that aren't a multiple of 4 bytes - src/liblzma/api/lzma/base.h | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) + tests/test_index.c | 33 +++++++++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 8 deletions(-) -commit 5eefc0086d24a65e136352f8c1d19cefb0cbac7a +commit 2524fcf2b68b662035437cee8edbe80067c0c240 Author: Lasse Collin -Date: 2011-04-11 19:16:30 +0300 +Date: 2024-04-27 14:40:25 +0300 - liblzma: Add an internal function lzma_mt_block_size(). - - This is based lzma_chunk_size() that was included in some - development version of liblzma. + Tests: test_index: Edit comments and white space - src/liblzma/common/filter_encoder.c | 46 ++++++++++++++++++------------------- - src/liblzma/common/filter_encoder.h | 4 ++-- - 2 files changed, 24 insertions(+), 26 deletions(-) + tests/test_index.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) -commit d1199274758049fc523d98c5b860ff814a799eec +commit 71eed2520e2eecae89bade9dceea16e56cfa2ea0 Author: Lasse Collin -Date: 2011-04-11 13:59:50 +0300 +Date: 2024-04-27 14:33:38 +0300 - liblzma: Don't create an empty Block in lzma_stream_buffer_encode(). + 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. - Empty Block was created if the input buffer was empty. - Empty Block wastes a few bytes of space, but more importantly - it triggers a bug in XZ Utils 5.0.1 and older when trying - to decompress such a file. 5.0.1 and older consider such - files to be corrupt. I thought that no encoder creates empty - Blocks when releasing 5.0.2 but I was wrong. + 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. - src/liblzma/common/stream_buffer_encoder.c | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) + src/liblzma/common/index_decoder.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) -commit 3b22fc2c87ec85fcdd385c163b68fc49c97aa848 +commit 0478473953f50716a2bc37b619b1c7dc2682b1ad Author: Lasse Collin -Date: 2011-04-11 13:28:40 +0300 +Date: 2024-04-26 18:25:18 +0300 - liblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK. - - This return value was missing from the API comments of - four functions. + CMake: Bump maximum policy version to 3.29 - src/liblzma/api/lzma/block.h | 1 + - src/liblzma/api/lzma/container.h | 3 +++ - 2 files changed, 4 insertions(+) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 71b9380145dccf001f22e66a06b9d508905c25ce -Author: Lasse Collin -Date: 2011-04-11 13:21:28 +0300 +commit a607e2b40d23f7d998dbaba76692aa30b4c3d9d3 +Author: Sam James +Date: 2024-04-13 22:30:44 +0100 - liblzma: Validate encoder arguments better. - - The biggest problem was that the integrity check type - wasn't validated, and e.g. lzma_easy_buffer_encode() - would create a corrupt .xz Stream if given an unsupported - Check ID. Luckily applications don't usually try to use - an unsupport Check ID, so this bug is unlikely to cause - many real-world problems. + ci: add NetBSD - src/liblzma/common/block_buffer_encoder.c | 18 ++++++++++++------ - src/liblzma/common/block_encoder.c | 5 +++++ - src/liblzma/common/stream_buffer_encoder.c | 3 +++ - 3 files changed, 20 insertions(+), 6 deletions(-) + .github/workflows/netbsd.yml | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) -commit ec7e3dbad704268825fc48f0bdd4577bc46b4f13 -Author: Lasse Collin -Date: 2011-04-11 09:57:30 +0300 +commit 72c210336de26fb87a928160d025fa10a638d23b +Author: Sam James +Date: 2024-04-13 23:49:26 +0100 - xz: Move the description of --block-size in --long-help. + ci: add FreeBSD - src/xz/message.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + .github/workflows/freebsd.yml | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) -commit cd3086ff443bb282bdf556919c28b3e3cbed8169 -Author: Lasse Collin -Date: 2011-04-11 09:55:35 +0300 +commit b526ec2dbfb5889845ea60548c4f5b1f97d84ab2 +Author: Sam James +Date: 2024-04-13 23:16:08 +0100 - Docs: Document --single-stream and --block-size. + ci: add OpenBSD - src/xz/xz.1 | 38 ++++++++++++++++++++++++++++++++++++-- - 1 file changed, 36 insertions(+), 2 deletions(-) + .github/workflows/openbsd.yml | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) -commit fb64a4924334e3c440865710990fe08090f2fed0 -Author: Lasse Collin -Date: 2011-04-11 09:27:57 +0300 +commit c7ef767c49351743d8d011574abb9e200bf6b24f +Author: Sam James +Date: 2024-04-15 05:53:01 +0100 - liblzma: Make lzma_stream_encoder_init() static (second try). + liblzma: outqueue: add header guard - It's an internal function and it's not needed by - anything outside stream_encoder.c. + Reported by github's codeql. - src/liblzma/common/Makefile.inc | 1 - - src/liblzma/common/easy_encoder.c | 1 - - src/liblzma/common/stream_encoder.c | 13 ++++++------- - src/liblzma/common/stream_encoder.h | 23 ----------------------- - 4 files changed, 6 insertions(+), 32 deletions(-) + src/liblzma/common/outqueue.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit a34730cf6af4d33a4057914e57227b6dfde6567e -Author: Lasse Collin -Date: 2011-04-11 08:31:42 +0300 +commit 55dcae3056d95cb2ddb8b560c12ba7596bc79f2c +Author: Sam James +Date: 2024-04-15 05:53:56 +0100 - Revert "liblzma: Make lzma_stream_encoder_init() static." + liblzma: easy_preset: add header guard - This reverts commit 352ac82db5d3f64585c07b39e4759388dec0e4d7. - I don't know what I was thinking. + Reported by github's codeql. - src/liblzma/common/Makefile.inc | 1 + - src/liblzma/common/stream_encoder.c | 9 +++++---- - src/liblzma/common/stream_encoder.h | 23 +++++++++++++++++++++++ - 3 files changed, 29 insertions(+), 4 deletions(-) + src/liblzma/common/easy_preset.h | 5 +++++ + 1 file changed, 5 insertions(+) -commit 9f0a806aef7ea79718e3f1f2baf3564295229a27 +commit 4ffc60f32397371769b7d6b5e3ed8626292d58df Author: Lasse Collin -Date: 2011-04-10 21:23:21 +0300 +Date: 2024-04-25 14:00:57 +0300 - Revise mythread.h. - - This adds: + tuklib_integer: Rename bswapXX to byteswapXX - - mythread_sync() macro to create synchronized blocks + 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). - - mythread_cond structure and related functions - and macros for condition variables with timed - waiting using a relative timeout + 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. - - mythread_create() to create a thread with all - signals blocked + 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. - Some of these wouldn't need to be inline functions, - but I'll keep them this way for now for simplicity. - - For timed waiting on a condition variable, librt is - now required on some systems to use clock_gettime(). - configure.ac was updated to handle this. + Thanks to Sam James for pointing out the compiler warning on + NetBSD 10.0. - configure.ac | 1 + - src/common/mythread.h | 200 +++++++++++++++++++++++++++++++++++++++++++++----- - 2 files changed, 181 insertions(+), 20 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 352ac82db5d3f64585c07b39e4759388dec0e4d7 +commit 08ab0966a75b501aa7c717622223f0c13a113c75 Author: Lasse Collin -Date: 2011-04-10 20:37:36 +0300 +Date: 2024-04-24 01:20:26 +0300 - liblzma: Make lzma_stream_encoder_init() static. - - It's an internal function and it's not needed by - anything outside stream_encoder.c. + liblzma: API doc cleanups - src/liblzma/common/Makefile.inc | 1 - - src/liblzma/common/stream_encoder.c | 9 ++++----- - src/liblzma/common/stream_encoder.h | 23 ----------------------- - 3 files changed, 4 insertions(+), 29 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 9e807fe3fe79618ac48f58207cf7082ea20a6928 +commit 3ac8a9bb4cccbee88350696dc9c645c48d77c989 Author: Lasse Collin -Date: 2011-04-10 14:58:10 +0300 +Date: 2024-04-23 16:35:33 +0300 - DOS: Update the docs and include notes about 8.3 filenames. + Tests: test_filter_str: Add a few assertions - dos/{README => INSTALL.txt} | 13 +---- - dos/README.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 125 insertions(+), 11 deletions(-) + tests/test_filter_str.c | 4 ++++ + 1 file changed, 4 insertions(+) -commit ebd54dbd6e481d31e80757f900ac8109ad1423c6 +commit 26c69be80523b05c84dea86c47c4ddd9a10945d7 Author: Lasse Collin -Date: 2011-04-10 13:09:42 +0300 +Date: 2024-04-23 16:35:08 +0300 - xz/DOS: Add experimental 8.3 filename support. - - This is incompatible with the 8.3 support patch made by - Juan Manuel Guerrero. I think this one is nicer, but - I need to get feedback from DOS users before saying - that this is the final version of 8.3 filename support. + Tests: test_filter_str: Move one assertion and add a comment - src/xz/suffix.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 167 insertions(+), 9 deletions(-) + tests/test_filter_str.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit cd4fe97852bcaeffe674ee51b4613709292a0972 +commit 4f6af853bc99904efb8b6c28a0af7b81a8476c1b Author: Lasse Collin -Date: 2011-04-10 12:47:47 +0300 +Date: 2024-04-23 16:26:06 +0300 - xz/DOS: Be more careful with the destination file. - - Try to avoid overwriting the source file if --force is - used and the generated destination filename refers to - the source file. This can happen with 8.3 filenames where - extra characters are ignored. + Tests: test_filter_str: Tweak comments and white space + + tests/test_filter_str.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit c92663aa1bd576e0615498a4189acf0df12e84b9 +Author: Lasse Collin +Date: 2024-04-23 16:25:22 +0300 + + Tests: test_filter_str: Add missing RISC-V case - If the generated output file refers to a special file - like "con" or "prn", refuse to write to it even if --force - is used. + Fixes: 89ea1a22f4ed3685b053b7260bc5acf6c75d1664 - src/xz/file_io.c | 35 +++++++++++++++++++++++++++++++++-- - 1 file changed, 33 insertions(+), 2 deletions(-) + tests/test_filter_str.c | 3 +++ + 1 file changed, 3 insertions(+) -commit 607f9f98ae5ef6d49f4c21c806d462bf6b3d6796 +commit b0366df1d7ed26268101f9303a001c91c0806dfc Author: Lasse Collin -Date: 2011-04-09 18:29:30 +0300 +Date: 2024-04-22 22:23:32 +0300 - Update THANKS. + Tests: test_filter_str: Test *error_pos more thoroughly - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/test_filter_str.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 76 insertions(+), 1 deletion(-) -commit fca396b37410d272b754843a5dc13847be443a3a +commit 70d12dd069bb9bb0d6bb1c8fafc4e6f77780263d Author: Lasse Collin -Date: 2011-04-09 18:28:58 +0300 +Date: 2024-04-22 21:54:39 +0300 - liblzma: Add missing #ifdefs to filter_common.c. + liblzma: lzma_str_to_filters: Set *error_pos on all errors - Passing --disable-decoders to configure broke a few - encoders due to missing #ifdefs in filter_common.c. + 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. - Thanks to Jason Gorski for the patch. + Fixes: cedeeca2ea6ada5b0411b2ae10d7a859e837f203 - src/liblzma/common/filter_common.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/liblzma/common/string_conversion.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit b03f6cd3ebadd675f2cc9d518cb26fa860269447 +commit ed8e552395701fbf046027cebc8be4a6755b263f Author: Lasse Collin -Date: 2011-04-09 15:24:59 +0300 +Date: 2024-04-22 20:31:25 +0300 - xz: Avoid unneeded fstat() on DOS-like systems. + liblzma: Clean up white space - src/xz/file_io.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) + src/liblzma/lz/lz_encoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 335fe260a81f61ec99ff5940df733b4c50aedb7c +commit 2f06920f20b1ad63b7953dc09569e1d424998849 Author: Lasse Collin -Date: 2011-04-09 15:11:13 +0300 +Date: 2024-04-22 18:35:19 +0300 - xz: Minor internal changes to handling of --threads. - - Now it always defaults to one thread. Maybe this - will change again if a threading method is added - that doesn't affect memory usage. + Tests: test_filter_flags: Edit comments and style - src/xz/args.c | 4 ++-- - src/xz/hardware.c | 24 ++++++++++++------------ - src/xz/hardware.h | 9 ++++----- - 3 files changed, 18 insertions(+), 19 deletions(-) + tests/test_filter_flags.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) -commit 9edd6ee895fbe71d245a173f48e511f154a99875 +commit b101e1d1dbc81577c0c9aa0cb89cf2e46a15eb82 Author: Lasse Collin -Date: 2011-04-08 17:53:05 +0300 +Date: 2024-04-22 16:39:44 +0300 - xz: Change size_t to uint32_t in a few places. + 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. - src/xz/coder.c | 6 +++--- - src/xz/coder.h | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) + tests/test_filter_flags.c | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) -commit 411013ea4506a6df24d35a060fcbd73a57b73eb3 +commit f8f3a220ac8afcb8cb2812917d3b77e00c2eab0d Author: Lasse Collin -Date: 2011-04-08 17:48:41 +0300 +Date: 2024-04-21 20:32:16 +0300 - xz: Fix a typo in a comment. + DOS: Omit useless defines from config.h - src/xz/coder.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + dos/config.h | 12 ------------ + 1 file changed, 12 deletions(-) -commit b34c5ce4b22e8d7b81f9895d15054af41d17f805 +commit fc1921b04b8840caaa777c2bd5340d41b259da20 Author: Lasse Collin -Date: 2011-04-05 22:41:33 +0300 +Date: 2024-04-21 20:27:50 +0300 - liblzma: Use TUKLIB_GNUC_REQ to check GCC version in sha256.c. + Build: Omit useless checks for fcntl.h, limits.h, and sys/time.h - src/liblzma/check/sha256.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) -commit db33117cc85c17e0b897b5312bd5eb43aac41c03 +commit 6aa2a6deeba04808a0fe4461396e7fb70277f3d4 Author: Lasse Collin -Date: 2011-04-05 17:12:20 +0300 +Date: 2024-04-19 22:04:21 +0300 - Build: Upgrade m4/acx_pthread.m4 to the latest version. + liblzma: Silence a warning from Coverity static analysis - It was renamed to ax_pthread.m4 in Autoconf Archive. + 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. - configure.ac | 2 +- - m4/{acx_pthread.m4 => ax_pthread.m4} | 170 ++++++++++++++++++----------------- - 2 files changed, 88 insertions(+), 84 deletions(-) + src/liblzma/simple/x86.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) -commit 1039bfcfc098b69d56ecb39d198a092552eacf6d +commit e89d3e83b4496d0b5410870634970c0aa9721d59 Author: Lasse Collin -Date: 2011-04-05 15:27:26 +0300 +Date: 2024-04-19 23:18:19 +0300 - xz: Use posix_fadvise() if it is available. + Update .gitignore - configure.ac | 3 +++ - src/xz/file_io.c | 15 +++++++++++++++ - 2 files changed, 18 insertions(+) + .gitignore | 21 ++++++++------------- + 1 file changed, 8 insertions(+), 13 deletions(-) -commit 1ef3cf44a8eb9512480af4482a5232ea08363b14 +commit 86fc4ee859709da0ff9617a1490f13ddac0a109b Author: Lasse Collin -Date: 2011-04-05 15:13:29 +0300 +Date: 2024-04-19 20:53:24 +0300 - xz: Call lzma_end(&strm) before exiting if debugging is enabled. + Tests: test_lzip_decoder: Tweak coding style and comments - src/xz/coder.c | 10 ++++++++++ - src/xz/coder.h | 5 +++++ - src/xz/main.c | 4 ++++ - 3 files changed, 19 insertions(+) + tests/test_lzip_decoder.c | 58 +++++++++++++++++++++++------------------------ + 1 file changed, 28 insertions(+), 30 deletions(-) -commit bd432015d33dcade611d297bc01eb0700088ef6c +commit 38be573a279bd7b608ee7d8509ec10884e6fb0d5 Author: Lasse Collin -Date: 2011-04-02 14:49:56 +0300 +Date: 2024-04-19 20:51:36 +0300 - liblzma: Fix a memory leak in stream_encoder.c. - - It leaks old filter options structures (hundred bytes or so) - every time the lzma_stream is reinitialized. With the xz tool, - this happens when compressing multiple files. + Tests: test_lzip_decoder: Remove redundant initializations - src/liblzma/common/stream_encoder.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_lzip_decoder.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) -commit 16889013214e7620d204b6e6c1bf9f3103a13655 +commit d7e4bc53eacfab9f3de95d8252bdfdc9419079c9 Author: Lasse Collin -Date: 2011-04-01 08:47:20 +0300 +Date: 2024-04-19 20:47:24 +0300 - Updated NEWS for 5.0.2. + Tests: test_lzip_decoder: Remove unneeded tuktest_malloc() calls - NEWS | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) + tests/test_lzip_decoder.c | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) -commit 85cdf7dd4e97b078e7b929e47f55a7f1da36010f +commit eeca8f7c5baf1ad69606bb734d5001763466d58f Author: Lasse Collin -Date: 2011-03-31 15:06:58 +0300 +Date: 2024-04-15 20:35:07 +0300 + + xz: Fix white space error. + + Thanks to xx on #tukaani. - Update INSTALL with another note about IRIX. + src/xz/args.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - INSTALL | 4 ++++ - 1 file changed, 4 insertions(+) +commit 462ca9409940a19f743daee6b3bcc611277d0007 +Author: Sam James +Date: 2024-04-11 23:01:44 +0100 -commit c3f4995586873d6a4fb7e451010a128571a9a370 + xz: add missing noreturn for message_filters_help + + Fixes: a165d7df1964121eb9df715e6f836a31c865beef + + src/xz/message.h | 1 + + 1 file changed, 1 insertion(+) + +commit 863f13d2828b99b0539ce73f9cf85bde32358034 +Author: Sam James +Date: 2024-04-11 19:34:04 +0100 + + 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. + + src/xz/signals.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit fcbd0d199933a69713cb293cbd7409a757d854cd Author: Lasse Collin -Date: 2011-03-31 12:22:55 +0300 +Date: 2024-04-13 22:19:40 +0300 - Tests: Add a new file to test empty LZMA2 streams. + Tests: test_microlzma: Add a "FIXME?" about LZMA_FINISH handling - tests/files/README | 4 ++++ - tests/files/good-1-lzma2-5.xz | Bin 0 -> 52 bytes - 2 files changed, 4 insertions(+) + tests/test_microlzma.c | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit 0d21f49a809dc2088da6cc0da7f948404df7ecfa +commit 0fe2dfa68355d2b165544b2bc8babf77dcc2039e Author: Lasse Collin -Date: 2011-03-31 11:54:48 +0300 +Date: 2024-04-13 18:05:31 +0300 - liblzma: Fix decoding of LZMA2 streams having no uncompressed data. + Tests: test_microlzma: Tweak comments, coding style, and minor details - The decoder considered empty LZMA2 streams to be corrupt. - This shouldn't matter much with .xz files, because no encoder - creates empty LZMA2 streams in .xz. This bug is more likely - to cause problems in applications that use raw LZMA2 streams. + 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. - src/liblzma/lzma/lzma2_decoder.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + tests/test_microlzma.c | 149 +++++++++++++++++++++++++++---------------------- + 1 file changed, 83 insertions(+), 66 deletions(-) -commit 40277998cb9bad564ce4827aff152e6e1c904dfa -Author: Lasse Collin -Date: 2011-03-24 01:42:49 +0200 +commit 97f0ee0f1f903f4e7c4ea23e9b89d687025d2992 +Author: Ryan Carsten Schmidt +Date: 2024-04-12 19:31:13 -0500 - Scripts: Better fix for xzgrep. + CI: Use only the active CPUs on macOS - Now it uses "grep -q". + hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts + only the active CPUs. + + build-aux/ci_build.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 73f629e321b74f68c9954728fa4f19261afccf46 +Author: Sam James +Date: 2024-04-10 18:33:55 +0100 + + ci: rename ci_build.sh -> ci_build.bash - Thanks to Gregory Margo. + 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. - src/scripts/xzgrep.in | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 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 2118733045ad0ca183a3f181a0399baf876983a6 -Author: Lasse Collin -Date: 2011-03-24 01:22:18 +0200 +commit 8709407a9ef8e7e8aec117879400e4dd3e227ada +Author: Sam James +Date: 2024-04-10 17:42:23 +0100 - Updated THANKS. + ci: build in parallel by default - THANKS | 1 + - 1 file changed, 1 insertion(+) + build-aux/ci_build.sh | 2 ++ + 1 file changed, 2 insertions(+) -commit c7210d9a3fca6f31a57208bfddfc9ab20a2e097a -Author: Lasse Collin -Date: 2011-03-24 01:21:32 +0200 +commit 65bf7e0a1ca6386f17608e8afb84ac470c18d23f +Author: Sam James +Date: 2024-04-10 15:41:08 +0100 - Scripts: Fix xzgrep -l. + ci: default to -O2 - It didn't work at all. It tried to use the -q option - for grep, but it appended it after "--". This works - around it by redirecting to /dev/null. The downside - is that this can be slower with big files compared - to proper use of "grep -q". + 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. + + build-aux/ci_build.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit bc899f9e0700ad153bd65f4804c4de7515c8a847 +Author: Sam James +Date: 2024-04-10 15:17:47 +0100 + + ci: make automake's test runner verbose on failures - Thanks to Gregory Margo. + This is a lot easier to work with than the save-logs thing the action + tries to do... - src/scripts/xzgrep.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 4eb83e32046a6d670862bc91c3d82530963b455e -Author: Lasse Collin -Date: 2011-03-19 13:08:22 +0200 +commit b5e3470442531717b2457b40ab412740296af1bc +Author: Sam James +Date: 2024-04-10 12:38:51 +0100 - Scripts: Add lzop (.lzo) support to xzdiff and xzgrep. + ci: make UBSAN abort on errors + + Unfortunately, UBSAN doesn't do this by default. See also the change + I made in Meson for this in October [0]. + + [0] https://github.com/mesonbuild/meson/commit/7b7d2e060b447de9c2642848847370a58711ac1c - src/scripts/xzdiff.1 | 6 ++++-- - src/scripts/xzdiff.in | 22 ++++++++++++++-------- - src/scripts/xzgrep.1 | 11 +++++++---- - src/scripts/xzgrep.in | 5 +++-- - 4 files changed, 28 insertions(+), 16 deletions(-) + .github/workflows/ci.yml | 1 + + 1 file changed, 1 insertion(+) -commit 923b22483bd9356f3219b2b784d96f455f4dc499 -Author: Lasse Collin -Date: 2011-03-18 19:10:30 +0200 +commit 6c095a98fbec70b790253a663173ecdb669108c4 +Author: Sam James +Date: 2024-04-10 11:43:10 +0100 - xz: Add --block-size=SIZE. + 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. - This uses LZMA_FULL_FLUSH every SIZE bytes of input. + 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... - Man page wasn't updated yet. + 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/ - src/xz/args.c | 7 +++++++ - src/xz/coder.c | 50 ++++++++++++++++++++++++++++++++++++++++---------- - src/xz/coder.h | 3 +++ - src/xz/message.c | 4 ++++ - 4 files changed, 54 insertions(+), 10 deletions(-) + .github/workflows/ci.yml | 11 ++++++++++- + build-aux/ci_build.sh | 8 +++++--- + 2 files changed, 15 insertions(+), 4 deletions(-) -commit 57597d42ca1740ad506437be168d800a50f1a0ad +commit 6286c1900c2d2ca33d9b1b397122c7bcdb9a4d59 Author: Lasse Collin -Date: 2011-03-18 18:19:19 +0200 +Date: 2024-04-10 23:20:02 +0300 - xz: Add --single-stream. - - This can be useful when there is garbage after the - compressed stream (.xz, .lzma, or raw stream). + liblzma: CRC: Simplify table omission macros - Man page wasn't updated yet. + A macro is useful to prevent a single #if directive from + getting too ugly but only one macro is needed for all archs. - src/xz/args.c | 6 ++++++ - src/xz/coder.c | 11 +++++++++-- - src/xz/coder.h | 3 +++ - src/xz/message.c | 6 +++++- - 4 files changed, 23 insertions(+), 3 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 96f94bc925d579a700147fa5d7793b64d69cfc18 +commit 45da936c879acf4f053a3055665bf1b10ded4462 Author: Lasse Collin -Date: 2011-02-04 22:49:31 +0200 +Date: 2024-04-10 23:09:40 +0300 - xz: Clean up suffix.c. + liblzma: ARM64 CRC: Fix omission of CRC32 table - struct suffix_pair isn't needed in compresed_name() - so get rid of it there. + The macro name had an odd typo so the table wasn't omitted + when it should have. + + Fixes: 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad - src/xz/suffix.c | 44 ++++++++++++++++++++------------------------ - 1 file changed, 20 insertions(+), 24 deletions(-) + src/liblzma/check/crc32_table.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8930c7ae3f82bdae15aa129f01de08be23d7e8d7 +commit 308a9af85400b0e2019f0f012c8354e831d06d65 Author: Lasse Collin -Date: 2011-02-04 11:29:47 +0200 +Date: 2024-04-10 22:21:51 +0300 - xz: Check if the file already has custom suffix when compressing. + Build: If ARM64 feature detection func is found, stop looking for others - Now "xz -S .test foo.test" refuses to compress the - file because it already has the suffix .test. The man - page had it documented this way already. + This can speed up configure a tiny bit. + + Fixes: c5f6d79cc9515a7f22d7ea4860c6cc394b295732 - src/xz/suffix.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 940d5852c6cf08abccc6befd9d1b5411c9076a58 +commit fc43cecd32bf9d5f8caa599206b15c9569af1eb6 Author: Lasse Collin -Date: 2011-02-02 23:01:51 +0200 +Date: 2024-04-10 22:04:27 +0300 - Updated THANKS. + liblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD + + I didn't test this but it shouldn't change any functionality. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_arm64.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -commit 4ebe65f839613f27f127bab7b8c347d982330ee3 +commit 1024cd4cd966b998fedec51e385e9ee9a49b3c57 Author: Lasse Collin -Date: 2011-02-02 23:00:33 +0200 +Date: 2024-04-10 21:59:27 +0300 - Translations: Add Polish translation. + liblzma: ARM64 CRC32: Add error checking to FreeBSD-specific code + + Also add parenthesis to the return statement. - Thanks to Jakub Bogusz. + I didn't test this. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 - po/LINGUAS | 1 + - po/pl.po | 825 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 826 insertions(+) + src/liblzma/check/crc32_arm64.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -commit fc1d292dca1925dfd17174f443f91a696ecd5bf8 +commit 2337f7021c860b026e3e849e60a9ae8d09ec0ea0 Author: Lasse Collin -Date: 2011-02-02 22:24:00 +0200 +Date: 2024-04-10 21:56:33 +0300 - Updated THANKS. + liblzma: ARM64 CRC32: Use negation instead of subtracting from 8 + + Subtracting from 0 is negation, this just keeps warnings away. + + Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575 - THANKS | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/check/crc32_arm64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 6dd061adfd2775428b079eb03d6fd47d7c0f1ffe -Merge: 9d542ce 5fbce0b +commit d8fffd01aa1a3c18e437a222abd34699e23ff5e7 Author: Lasse Collin -Date: 2011-02-06 20:13:01 +0200 +Date: 2024-04-10 21:55:10 +0300 + + liblzma: ARM64 CRC32: Tweak coding style and comments - Merge commit '5fbce0b8d96dc96775aa0215e3581addc830e23d' + src/liblzma/check/crc32_arm64.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit 5fbce0b8d96dc96775aa0215e3581addc830e23d +commit 780d2c236de0e4749655696c2e0c26fb7565afd3 Author: Lasse Collin -Date: 2011-01-28 20:16:57 +0200 +Date: 2024-04-09 21:55:01 +0300 - Update NEWS for 5.0.1. + Update SECURITY.md. - NEWS | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + .github/SECURITY.md | 25 ++++++++----------------- + 1 file changed, 8 insertions(+), 17 deletions(-) -commit 03ebd1bbb314f9f204940219a835c883bf442475 +commit 986865ea2f9d1f8dbef4a130926df106b0f6d41a Author: Lasse Collin -Date: 2011-01-26 12:19:08 +0200 +Date: 2024-04-09 17:47:01 +0300 - xz: Fix --force on setuid/setgid/sticky and multi-hardlink files. - - xz didn't compress setuid/setgid/sticky files and files - with multiple hard links even with --force. This bug was - introduced in 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4. - - Thanks to Charles Wilson. + CI: Remove ifunc support. - src/xz/file_io.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) + .github/workflows/ci.yml | 13 +++---------- + build-aux/ci_build.sh | 5 +---- + 2 files changed, 4 insertions(+), 14 deletions(-) -commit 9d542ceebcbe40b174169c132ccfcdc720ca7089 -Merge: 4f2c69a 7bd0a5e +commit 689ae2427342a2ea1206eb5ca08301baf410e7e0 Author: Lasse Collin -Date: 2011-01-19 11:45:35 +0200 +Date: 2024-04-09 17:43:16 +0300 - Merge branch 'v5.0' + liblzma: Remove ifunc support. + + 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. + + 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 7bd0a5e7ccc354f7c2e95c8bc27569c820f6a136 +commit 6b4c859059a7eb9b0547590c081668e14ecf8af6 Author: Lasse Collin -Date: 2011-01-18 21:25:24 +0200 +Date: 2024-04-08 22:04:41 +0300 - Updated THANKS. + tests/files/README: Update the main heading. - THANKS | 1 + - 1 file changed, 1 insertion(+) + tests/files/README | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit f71c4e16e913f660977526f0ef8d2acdf458d7c9 +commit 2a851e06b891ce894f918faff32a6cca6fdecee6 Author: Lasse Collin -Date: 2011-01-18 21:23:50 +0200 +Date: 2024-04-08 22:02:45 +0300 - Add alloc_size and malloc attributes to a few functions. - - Thanks to Cristian Rodríguez for the original patch. + tests/files/README: Explain how to recreate the ARM64 test files. - src/common/sysdefs.h | 6 ++++++ - src/liblzma/common/common.h | 2 +- - src/xz/util.h | 5 +++-- - 3 files changed, 10 insertions(+), 3 deletions(-) + tests/files/README | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) -commit 316cbe24465143edde8f6ffb7532834b7b2ea93f +commit 3d09b721b94e18fe1f853a04799697f5de10b291 Author: Lasse Collin -Date: 2010-12-13 16:36:33 +0200 +Date: 2024-04-08 21:51:55 +0300 - Scripts: Fix gzip and bzip2 support in xzdiff. + debug: Add generator for the ARM64 test file data. - src/scripts/xzdiff.in | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + debug/Makefile.am | 3 +- + debug/testfilegen-arm64.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 118 insertions(+), 1 deletion(-) -commit 4f2c69a4e3e0aee2e37b0b1671d34086e20c8ac6 -Merge: adb89e6 9311774 +commit 31ef676567c9d6fcc4ec9fc833c312f7a7c21c48 Author: Lasse Collin -Date: 2010-12-12 23:13:22 +0200 +Date: 2024-04-08 21:19:38 +0300 + + xz man page: Use .ft CR instead of CW to silence warnings from groff. - Merge branch 'v5.0' + src/xz/xz.1 | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) -commit 9311774c493c19deab51ded919dcd2e9c4aa2829 +commit 780cbf29d5a88db2b546e9b7b019c4c33ca72685 Author: Lasse Collin -Date: 2010-12-12 21:23:55 +0200 +Date: 2024-04-08 19:28:35 +0300 - Build: Enable ASM on DJGPP by default. + Fix NEWS for 5.6.0 and 5.6.1. - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + NEWS | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 4a42aaee282fc73b482581684d65110506d5efdd +commit bfd0c7c478e93a1911b845459549ff94587b6ea2 Author: Lasse Collin -Date: 2010-12-12 16:09:42 +0200 +Date: 2024-04-08 19:22:26 +0300 - Updated THANKS. + Remove the XZ logo. - THANKS | 1 + - 1 file changed, 1 insertion(+) + 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 ce56f63c41ee210e6308090eb6d49221fdf67d6c +commit 77a294d98a9d2d48f7e4ac273711518bf689f5c4 Author: Lasse Collin -Date: 2010-12-12 16:07:11 +0200 +Date: 2024-04-08 18:27:39 +0300 - Add missing PRIx32 and PRIx64 compatibility definitions. - - This fixes portability to systems that lack C99 inttypes.h. + Update maintainer and author info. - Thanks to Juan Manuel Guerrero. + The other maintainer suddenly disappeared. - src/common/sysdefs.h | 9 +++++++++ - 1 file changed, 9 insertions(+) + AUTHORS | 9 +++++++-- + README | 10 +++------- + THANKS | 1 - + src/liblzma/api/lzma.h | 2 +- + 4 files changed, 11 insertions(+), 11 deletions(-) -commit e6baedddcf54e7da049ebc49183565b99facd4c7 +commit 8dd03d4484ccf80022722a16d0ed9b37f2b58072 Author: Lasse Collin -Date: 2010-12-12 14:50:04 +0200 +Date: 2024-04-08 18:05:32 +0300 - DOS-like: Treat \ and : as directory separators in addition to /. + Docs: Update .xz file format specification to 1.2.1. - Juan Manuel Guerrero had fixed this in his XZ Utils port - to DOS/DJGPP. The bug affects also Windows and OS/2. + This only reverts the XZ URL changes. - src/xz/suffix.c | 33 +++++++++++++++++++++++++++++---- - 1 file changed, 29 insertions(+), 4 deletions(-) + doc/xz-file-format.txt | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) -commit adb89e68d43a4cadb0c215b45ef7a75737c9c3ec -Merge: 7c24e0d b7afd3e +commit 17aa2e1a796d3f758802df29afc89dcf335db567 Author: Lasse Collin -Date: 2010-12-07 18:53:04 +0200 +Date: 2024-04-08 17:33:56 +0300 + + Update website URLs back to tukaani.org. + + The XZ projects were moved back to their original URLs. - Merge branch 'v5.0' + .github/SECURITY.md | 2 +- + 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 +- + 12 files changed, 21 insertions(+), 22 deletions(-) -commit b7afd3e22a8fac115b75c738d40d3eb1de7e286f +commit 2739db981023373a2ddabc7b456c7e658bb4f582 Author: Lasse Collin -Date: 2010-12-07 18:52:04 +0200 +Date: 2024-04-08 17:07:08 +0300 - Translations: Fix Czech translation of "sparse file". - - Thanks to Petr Hubený and Marek Černocký. + xzdec: Tweak coding style and comments. - po/cs.po | 88 ++++++++++++++++++++++++++++++++-------------------------------- - 1 file changed, 44 insertions(+), 44 deletions(-) + src/xzdec/xzdec.c | 32 +++++++++++++++++++++----------- + 1 file changed, 21 insertions(+), 11 deletions(-) -commit 7c24e0d1b8a2e86e9263b0d56d39621e01aed7af -Merge: b4d42f1 3e56470 +commit 408b6adb2a07d07c6535f859571cca38837caaf3 Author: Lasse Collin -Date: 2010-11-15 14:33:01 +0200 +Date: 2024-04-08 15:53:46 +0300 - Merge branch 'v5.0' + tests/ossfuzz: Tiny fix to a comment. -commit 3e564704bc6f463cb2db11e3f3f0dbd71d85992e + tests/ossfuzz/fuzz_decode_stream.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit db4dd74a344580e0b81436598d9741a3454245b0 Author: Lasse Collin -Date: 2010-11-15 14:28:26 +0200 +Date: 2024-04-09 18:22:16 +0300 - liblzma: Document the return value of lzma_lzma_preset(). + Update THANKS. - src/liblzma/api/lzma/lzma.h | 3 +++ - 1 file changed, 3 insertions(+) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit 2964d8d691ed92abdcf214888d79ad6d79774735 -Author: Jonathan Nieder -Date: 2010-11-12 15:22:13 -0600 +commit e93e13c8b3bec925c56e0c0b675d8000a0f7f754 +Author: Lasse Collin +Date: 2024-04-08 15:32:58 +0300 - Simplify paths in generated API docs + 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. + + - 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. + + - The maintainer who added the backdoor has disappeared. + + - Backdoors are bad for security. - Currently the file list generated by Doxygen has src/ at the - beginning of each path. Paths like common/sysdefs.h and - liblzma/api/lzma.h are easier to read without such a prefix. + This reverts the following without making any other changes: - Builds from a separate build directory with + 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. - mkdir build - cd build - ../configure - doxygen Doxyfile + 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. - include an even longer prefix /home/someone/src/xz/src; this - patch has the nice side-effect of eliminating that prefix, too. + 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/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 f9cf4c05edd14dedfe63833f8ccbe41b55823b00 +Author: Lasse Collin +Date: 2024-03-30 14:36:28 +0200 + + CMake: Fix sabotaged Landlock sandbox check. - Fixes: http://bugs.debian.org/572273 + It never enabled it. - Doxyfile.in | 2 +- + CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit b4d42f1a7120e2cefeb2f14425efe2ca6db85416 -Author: Anders F Bjorklund -Date: 2010-11-05 12:56:11 +0100 +commit af071ef7702debef4f1d324616a0137a5001c14c +Author: Jia Tan +Date: 2024-03-26 01:50:02 +0800 - add build script for macosx universal + Docs: Simplify SECURITY.md. - macosx/build.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 92 insertions(+) + .github/SECURITY.md | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) -commit 15ee6935abe4a2fc76639ee342ca2e69af3e0ad6 +commit 0b99783d63f27606936bb79a16c52d0d70c0b56f Author: Lasse Collin -Date: 2010-11-04 18:31:40 +0200 +Date: 2024-03-22 17:46:30 +0200 - Update the copies of GPLv2 and LGPLv2.1 from gnu.org. - - There are only a few white space changes. + liblzma: memcmplen.h: Add a comment why subtraction is used. - COPYING.GPLv2 | 14 +++++++------- - COPYING.LGPLv2.1 | 16 +++++++--------- - 2 files changed, 14 insertions(+), 16 deletions(-) + src/liblzma/common/memcmplen.h | 13 +++++++++++++ + 1 file changed, 13 insertions(+) -commit 8e355f7fdbeee6fe394eb02a28f267ce99a882a2 -Merge: 974ebe6 37c2565 +commit 8a25ba024d55610c448c6e4f1400a00bae51b493 Author: Lasse Collin -Date: 2010-10-26 15:53:06 +0300 +Date: 2024-03-15 17:43:39 +0200 + + INSTALL: Document arguments of --enable-symbol-versions. - Merge branch 'v5.0' + INSTALL | 43 +++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 39 insertions(+), 4 deletions(-) -commit 37c25658efd25b034266daf87cd381d20d1df776 +commit 49324b711f9d42b3543bf2f3ae598eaa03360bd5 Author: Lasse Collin -Date: 2010-10-26 15:48:48 +0300 +Date: 2024-03-15 17:15:50 +0200 - Build: Copy the example programs to $docdir/examples. + Build: Use only the generic symbol versioning with NVIDIA HPC Compiler. - The example programs by Daniel Mealha Cabrita were included - in the git repository, but I had forgot to add them to - Makefile.am. Thus, they didn't get included in the source - package at all by "make dist". + This does the previous commit with CMake. + + 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. - Makefile.am | 5 +++++ - windows/build.bash | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) + configure.ac | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) -commit 974ebe63497bdf0d262e06474f0dd5a70b1dd000 +commit c273123ed0ebaebf49994057a7fe98aae7f42c40 Author: Lasse Collin -Date: 2010-10-26 10:36:41 +0300 +Date: 2024-03-15 16:36:35 +0200 - liblzma: Rename a few variables and constants. - - This has no semantic changes. I find the new names slightly - more logical and they match the names that are already used - in XZ Embedded. + CMake: Use only the generic symbol versioning with NVIDIA HPC Compiler. - The name fastpos wasn't changed (not worth the hassle). + It doesn't support the __symver__ attribute or __asm__(".symver ..."). + The generic symbol versioning can still be used since it only needs + linker support. - src/liblzma/lzma/fastpos.h | 55 +++++------ - src/liblzma/lzma/lzma2_encoder.c | 2 +- - src/liblzma/lzma/lzma_common.h | 45 ++++----- - src/liblzma/lzma/lzma_decoder.c | 58 +++++------ - src/liblzma/lzma/lzma_encoder.c | 56 +++++------ - src/liblzma/lzma/lzma_encoder_optimum_fast.c | 9 +- - src/liblzma/lzma/lzma_encoder_optimum_normal.c | 128 ++++++++++++------------- - src/liblzma/lzma/lzma_encoder_private.h | 16 ++-- - 8 files changed, 183 insertions(+), 186 deletions(-) + CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -commit 7c427ec38d016c0070a42315d752857e33792fc4 +commit df7f487648d18a3992386a59b8a061edca862d17 Author: Lasse Collin -Date: 2010-10-25 12:59:25 +0300 +Date: 2024-03-13 21:38:24 +0200 - Bump version 5.1.0alpha. + Update THANKS. - src/liblzma/api/lzma/version.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + THANKS | 1 + + 1 file changed, 1 insertion(+) -commit e45929260cd902036efd40c5610a8d0a50d5712b +commit 3217b82b3ec023bf8338249134a076bea0ea30ec Author: Lasse Collin -Date: 2010-10-23 17:25:52 +0300 +Date: 2024-03-13 21:30:18 +0200 - Build: Fix mydist rule when .git doesn't exist. + liblzma: Minor comment edits. - Makefile.am | 1 + - 1 file changed, 1 insertion(+) + src/liblzma/common/string_conversion.c | 4 ++-- + src/liblzma/delta/delta_decoder.c | 2 ++ + 2 files changed, 4 insertions(+), 2 deletions(-) + +commit 096bc0e3f8fb4bfc4d2f3f64a7f219401ffb4c31 +Author: Sergey Kosukhin +Date: 2024-03-13 13:07:13 +0100 + + liblzma: Fix building with NVHPC (NVIDIA HPC SDK). + + 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. + + This introduces NVHPC-specific workarounds that address the issues. + + 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 6e1326fcdf6b6209949be57cfe3ad4b781b65168 +commit 2ad7fad67080e88fa7fc191f9d613d8b7add9c62 Author: Lasse Collin -Date: 2010-10-23 14:15:35 +0300 +Date: 2024-03-13 21:17:10 +0200 - Add NEWS for 5.0.0. + CMake: Disable symbol versioning on non-glibc Linux. + + This better matches what configure.ac does. For example, musl has + only basic symbol versioning support: + + https://wiki.musl-libc.org/functional-differences-from-glibc.html#Symbol_versioning + + configure.ac tries to enable symbol versioning only with glibc + so now CMake does the same. - NEWS | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 62 insertions(+) + CMakeLists.txt | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) -commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c +commit 82f0c0d39eb2c026b1d96ee706f70ace868d4ed4 Author: Lasse Collin -Date: 2010-10-23 14:02:53 +0300 +Date: 2024-03-13 20:32:46 +0200 - Bump version to 5.0.0 and liblzma version-info to 5:0:0. + CMake: Make symbol versioning configurable. - src/liblzma/Makefile.am | 2 +- - src/liblzma/api/lzma/version.h | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) + CMakeLists.txt | 62 +++++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 42 insertions(+), 20 deletions(-) + +commit 45d33bfc45e4295b8ad743bc2ae61cc724f98076 +Author: Lasse Collin +Date: 2024-03-13 19:47:36 +0200 + + Build: Style tweaks to configure.ac. + + The AC_MSG_ERROR line is overlong anyway as are a few other + AC_MSG_ERROR lines already. + + configure.ac | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +commit f56ed6fac6619b56b005878d3b5210e2f0d721c0 +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. + + configure.ac | 91 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 50 insertions(+), 41 deletions(-) + +commit a4f2e20d8466369b1bb277c66f75c9e4ba9cc378 +Author: Jia Tan +Date: 2024-03-09 11:27:27 +0800 + + Add NEWS for 5.6.1 + + NEWS | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +commit f01be8ad754a905d8c418601767480ec11621b02 +Author: Jia Tan +Date: 2024-03-09 10:43:20 +0800 + + Translations: Add missing --riscv option to man page translations. + + 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 6e636819e8f070330d835fce46289a3ff72a7b89 +Author: Jia Tan +Date: 2024-03-09 10:18:29 +0800 + + Tests: Update two test files. + + 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. + + 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 a3a29bbd5d86183fc7eae8f0182dace374e778d8 +Author: Jia Tan +Date: 2024-03-09 10:08:32 +0800 + + Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz. + + The first stream in this file is valid, so this tests that xz properly + stops after decompressing it. + + tests/test_files.sh | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 0b4ccc91454dbcf0bf521b9bd51aa270581ee23c +Author: Jia Tan +Date: 2024-03-09 10:05:32 +0800 + + Tests: Update RISC-V test files. + + This increases code coverage and tests for possible shifting bugs. + + 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 8c9b8b2063daa78ead9f648c2ec3c91e8615dffb +Author: Jia Tan +Date: 2024-03-09 09:52:32 +0800 + + liblzma: Fix typos in crc32_fast.c and crc64_fast.c. + + src/liblzma/check/crc32_fast.c | 4 ++-- + src/liblzma/check/crc64_fast.c | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +commit b93a8d7631d9517da63f03e0185455024a4609e8 +Author: Jia Tan +Date: 2024-03-09 09:49:55 +0800 + + Tests: Replace HAVE_MICROLZMA usage in CMake and Autotools builds. + + This reverts commit adaacafde6661496ca2814b1e94a3ba5186428cb. + + CMakeLists.txt | 15 ++++++++++----- + configure.ac | 9 ++------- + tests/Makefile.am | 9 ++++++--- + tests/test_microlzma.c | 12 ++++-------- + 4 files changed, 22 insertions(+), 23 deletions(-) + +commit 82ecc538193b380a21622aea02b0ba078e7ade92 +Author: Jia Tan +Date: 2024-03-09 09:20:57 +0800 + + liblzma: Fix false Valgrind error report with GCC. + + 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. + + 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/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 3007e74ef250f0ce95d97ffbdf2282284f93764d +Author: Lasse Collin +Date: 2024-03-05 23:21:26 +0200 + + liblzma: Fix a typo in a comment in the RISC-V filter. + + src/liblzma/simple/riscv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 72d2933bfae514e0dbb123488e9f1eb7cf64175f +Author: Jia Tan +Date: 2024-03-05 00:34:46 +0800 + + liblzma: Use attribute no_profile_instrument_function with ifunc. + + 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 e5faaebbcf02ea880cfc56edc702d4f7298788ad +Author: Jia Tan +Date: 2024-03-05 00:27:31 +0800 + + Build: Require attribute no_profile_instrument_function for ifunc usage. + + 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. + + This bug was brought to our attention by: + + https://bugs.gentoo.org/925415 + + And was reported to upstream GCC by: + + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11411 + + CMakeLists.txt | 7 +++++++ + configure.ac | 7 +++++++ + 2 files changed, 14 insertions(+) + +commit 7eeadd279a24c26ca7ff1292b7df802b89409eb7 +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 5f3d0595296cc3035eae9e7bb6c3ffb1e1267333 +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 4cd1042ee752d61370c685d0d8b20c1e935672f7 +Author: Lasse Collin +Date: 2024-02-29 16:35:52 +0200 + + CMake: Warn if gettext tools and pre-created .gmo files are missing. + + It's only done with CMake >= 3.20 and if library support + for translation was already found. + + Sort of fixes: https://github.com/tukaani-project/xz/issues/82 + + CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +commit a94b42362c8e807f92236d6d63373f04991e3a50 +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 bbf112e32307a75a54a9e170bc392811443d5c87 +Author: Jia Tan +Date: 2024-02-27 23:42:41 +0800 + + xz: Change logging level for thread reduction to highest verbosity only. + + 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. + + To see these warning messages -vv or --verbose --verbose must be passed + to set xz into the highest possible verbosity mode. + + These warnings had caused automated testing frameworks to fail when they + expected no output to stderr. + + 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 649f6447441510d593a88475ad6df4bcdf74ce48 +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 1255b7d849bf53f196a842ef2a508ed0ff577eaa +Author: Jia Tan +Date: 2024-02-26 23:39:29 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit eee579fff50099ba163c12305e81a4bd42b7dd53 +Author: Chien Wong +Date: 2024-02-25 21:38:13 +0800 + + xz: Add missing RISC-V on the filter list in the man page + + Signed-off-by: Chien Wong + + src/xz/xz.1 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 328c52da8a2bbb81307644efdb58db2c422d9ba7 +Author: Jia Tan +Date: 2024-02-26 23:02:06 +0800 + + Build: Fix Linux Landlock feature test in Autotools and CMake builds. + + 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 eb8ad59e9bab32a8d655796afd39597ea6dcc64d +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 9eed1b9a3ae140e93a82febc05a0181e9a4f5093 +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 8bf9f72ee1c05b9e205a72807e8a9e304785673d +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 5d8d915ebe2e345820a0f54d1baf8d7d4824c0c7 +Author: Jia Tan +Date: 2024-02-24 16:30:06 +0800 + + Bump version and soname for 5.7.0alpha. + + Like 5.5.0alpha, 5.7.0alpha won't be released, it's just to mark that + the branch is not stable. + + 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/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. + + 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. + + 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 Yuri Chornoivan. + + src/scripts/xzmore.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5631aa206c8d16b4eeab85a46b8b698f4fc4cdba +Author: Jia Tan +Date: 2024-02-24 12:12:16 +0800 + + Translations: Update the Vietnamese translation. + + po/vi.po | 505 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 309 insertions(+), 196 deletions(-) + +commit a65fd7ce9d6228e87faf61dc56a35984d0088248 +Author: Jia Tan +Date: 2024-02-24 12:06:40 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 502 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 306 insertions(+), 196 deletions(-) + +commit cf44e4b7f5dfdbf8c78aef377c10f71e274f63c0 +Author: Jia Tan +Date: 2024-02-23 23:09:59 +0800 + + Tests: Add a few test files. + + 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 39f4a1a86ad80b2d064b812cee42668e6c8b8c73 +Author: Jia Tan +Date: 2024-02-23 20:58:36 +0800 + + Tests: Add MicroLZMA test. + + tests/Makefile.am | 4 +- + tests/test_microlzma.c | 548 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 551 insertions(+), 1 deletion(-) + +commit adaacafde6661496ca2814b1e94a3ba5186428cb +Author: Jia Tan +Date: 2024-02-23 20:57:59 +0800 + + 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. + + user_abort_pipe[] was still being used instead of the parameters. + + src/xz/sandbox.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 32b0a3ce19224f9074d01a4ffbc1655b05fcb82d +Author: Jia Tan +Date: 2024-02-23 16:12:32 +0800 + + 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. + + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 4c81c9611f8b2e1ad65eb7fa166afc570c58607e +Author: Lasse Collin +Date: 2024-02-22 19:16:35 +0200 + + CMake: Add LOCALEDIR to the windres workaround. + + LOCALEDIR may contain spaces like in "C:\Program Files". + + CMakeLists.txt | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit de4337fd89ca7db5feb97b5c40143404f6e22986 +Author: Lasse Collin +Date: 2024-02-22 15:18:25 +0200 + + xz: Landlock: Fix error message if input file is a directory. + + If xz is given a directory, it should look like this: + + $ xz /usr/bin + xz: /usr/bin: Is a directory, skipping + + The Landlock rules didn't allow opening directories for reading: + + $ xz /usr/bin + xz: /usr/bin: Permission denied + + 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. + + 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. + + src/xz/sandbox.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +commit 120da10ae139ea52ca4275452adf8eda02d07cc8 +Author: Lasse Collin +Date: 2024-02-22 14:41:29 +0200 + + liblzma: Disable branchless C version in range decoder. + + 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. + + 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. + + 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. + + windows/build.bash | 191 +++++++++++++++++++++++++++++++---------------------- + 1 file changed, 112 insertions(+), 79 deletions(-) + +commit 60462e42609a1d961868a1d1ebecc713c6d27e2e +Author: Jia Tan +Date: 2024-02-20 23:32:22 +0800 + + Translations: Update the Romanian man page translations. + + po4a/ro.po | 1715 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 875 insertions(+), 840 deletions(-) + +commit 10d733e5b8929c642e00891cfa9ead9c2cdd2e05 +Author: Jia Tan +Date: 2024-02-20 23:30:25 +0800 + + Translations: Update the Korean man page translations. + + po4a/ko.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 797a34b72ac6baff237d7a546fa941d8f78f2f62 +Author: Jia Tan +Date: 2024-02-20 21:03:53 +0800 + + Translations: Update the Spanish translation. + + 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. + + po/hu.po | 556 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 338 insertions(+), 218 deletions(-) + +commit 00b06cd0af6ad2ee93d3006bf80417db060c2b04 +Author: Lasse Collin +Date: 2024-02-19 16:48:05 +0200 + + 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. + + The original code was good enough for supporting GNU/Linux + and a few others but it wasn't very portable. + + 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. + + CMakeLists.txt | 26 ++++++++++++++++++++++---- + 1 file changed, 22 insertions(+), 4 deletions(-) + +commit 2ced9d34bef4dce52ecbbf84d0903ab0aae1442c +Author: Lasse Collin +Date: 2024-02-19 12:20:59 +0200 + + 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. + + -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. + + 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. + + CMakeLists.txt | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit 025eb6d7879e4c4e8cb29716b371e0f4c1aea660 +Author: Lasse Collin +Date: 2024-02-18 14:59:52 +0200 + + CMake: Handle symbol versioning on MicroBlaze specially. + + This is to match configure.ac. + + CMakeLists.txt | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +commit 2edd1a35b2507d1ce68b52dbaebe23c4850a74ce +Author: Lasse Collin +Date: 2024-02-17 22:18:12 +0200 + + 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. + + CMP0154 doesn't affect us since we don't use FILE_SET. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 + + CMake: Install scripts. + + 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. + + CMakeLists.txt | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 82 insertions(+), 1 deletion(-) + +commit 3462362ebd94d835c664e94ad8f414cfe7590ca7 +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + 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/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 67610c245ba6c68cf65991693bab9312b7dc987b +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Simplify symlink creation and install translated man pages. + + 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. + + CMakeLists.txt | 195 +++++++++++++++++++++++++++++---------------------------- + 1 file changed, 98 insertions(+), 97 deletions(-) + +commit 50cc1d8a5a8154428bf240c7e4972e32b17d99bf +Author: Lasse Collin +Date: 2024-02-17 15:35:35 +0200 + + CMake: Add support for building and installing xz with translations. + + 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. + + CMakeLists.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 66 insertions(+), 2 deletions(-) + +commit 746c471643009947f94a3494a1148f74c7381b56 +Author: Lasse Collin +Date: 2024-02-19 11:58:33 +0200 + + liblzma: Remove commented-out code. + + src/liblzma/rangecoder/range_decoder.h | 3 --- + 1 file changed, 3 deletions(-) + +commit 4ce300ce0884c6e552de2af9ae8050b47b01f0e7 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + 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. + + 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/xz/main.c | 46 +++++++++++++++++++++++++++++++++------------- + src/xz/sandbox.c | 32 ++++++++++++++++++++++++++++++++ + src/xz/sandbox.h | 4 ++++ + 3 files changed, 69 insertions(+), 13 deletions(-) + +commit 02e3505991233901575b7eabc06b2c6c62a96899 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + xz: Support Landlock ABI version 4. + + 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/xz/sandbox.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +commit 374868d81d473ab56556a1cfd6b1b36a1fab348b +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + xz: Move sandboxing code to sandbox.c and improve Landlock sandbox. + + 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. + + 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 7312dfbb02197c7f990c7a3cefd027a9387d1473 +Author: Lasse Collin +Date: 2024-02-17 23:07:35 +0200 + + 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. + + 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/xz/main.c | 3 ++- + src/xz/message.c | 2 +- + src/xz/message.h | 5 ++++- + 3 files changed, 7 insertions(+), 3 deletions(-) + +commit 9466306719f3b76e92fac4e55fbfd89ec92295fa +Author: Lasse Collin +Date: 2024-02-17 19:35:47 +0200 + + Build: Makefile.am: Sort EXTRA_DIST. + + Dirs first, then files in case-sensitive ASCII order. + + Makefile.am | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit f3440e78c9517db75bfa52e1a378fad60b073bbe +Author: Lasse Collin +Date: 2024-02-17 19:25:05 +0200 + + Build: Don't install TODO. + + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a7a3b62e2ab03c82b2bd5c78da1d1fb8b8490381 +Author: Jia Tan +Date: 2024-02-18 01:09:11 +0800 + + Translations: Update the Korean man page translations. + + po4a/ko.po | 1707 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 871 insertions(+), 836 deletions(-) + +commit 9b315db2d5e74700f3dc0755eb86c27947c0b393 +Author: Jia Tan +Date: 2024-02-18 01:08:32 +0800 + + Translations: Update the Korean translation. + + po/ko.po | 423 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 223 insertions(+), 200 deletions(-) + +commit 56246607dff177b0410d140fcca4a42c865723dc +Author: Lasse Collin +Date: 2024-02-17 16:23:14 +0200 + + Build: Install translated lzmainfo man pages. + + All other translated man pages were being installed but + lzmainfo had been forgotten. + + src/lzmainfo/Makefile.am | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +commit f1d6b88aefcced538403c5c2606ba57065b16e70 +Author: Lasse Collin +Date: 2024-02-17 16:01:32 +0200 + + 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/simple/riscv.c | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) + +commit 843ddc5f617b91ae132d6bab0f2f2d9c9fcd214a +Author: Lasse Collin +Date: 2024-02-17 15:48:28 +0200 + + liblzma: Wrap a line exceeding 80 chars. + + src/liblzma/rangecoder/range_decoder.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit e9053c907250c70d98b319d95fa54cb94fc76869 +Author: Sebastian Andrzej Siewior +Date: 2024-02-16 21:50:15 +0100 + + liblzma/rangecoder: Exclude x32 from the x86-64 optimisation. + + 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/rangecoder/range_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3d198fb13b87f8803442e5799d465f7434a70555 +Author: Jia Tan +Date: 2024-02-17 21:05:07 +0800 + + Translations: Update the Spanish translation. + + po/es.po | 427 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 226 insertions(+), 201 deletions(-) + +commit cf278bfe60a25b54b3786f06503bc61272970820 +Author: Jia Tan +Date: 2024-02-17 20:43:29 +0800 + + Translations: Update the Swedish translation. + + po/sv.po | 434 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 230 insertions(+), 204 deletions(-) + +commit b0f1a41be50560cc6cb528e8e96b02b2067c52c2 +Author: Jia Tan +Date: 2024-02-17 20:41:38 +0800 + + Translations: Update the Polish translation. + + po/pl.po | 424 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 224 insertions(+), 200 deletions(-) + +commit d74ed48b30c631b6a4c7e7858b06828293bf8520 +Author: Jia Tan +Date: 2024-02-17 20:41:02 +0800 + + Translations: Update the Ukrainian translation. + + po/uk.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 711e22d5c5f3bac39ac904efb3ede874a66e2045 +Author: Lasse Collin +Date: 2024-02-16 17:53:34 +0200 + + Translations: Use the same sentence in xz.pot-header that the TP uses. + + po/xz.pot-header | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fb5f6aaf18584672d0fee5dbe41fd30fc6bf5422 +Author: Jia Tan +Date: 2024-02-16 22:53:46 +0800 + + Fix typos discovered by codespell. + + AUTHORS | 2 +- + NEWS | 2 +- + src/liblzma/rangecoder/range_decoder.h | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +commit c64723bbb094e29b4edd98f6fcce866e1b569b42 +Author: Jia Tan +Date: 2024-02-16 22:52:41 +0800 + + Translations: Update the Ukrainian man page translations. + + po4a/uk.po | 1710 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 873 insertions(+), 837 deletions(-) + +commit 2895195ed0f68b245c7bd568c126ba6e685fa1d6 +Author: Jia Tan +Date: 2024-02-16 22:51:04 +0800 + + Translations: Update the Ukrainian translation. + + po/uk.po | 466 ++++++++++++++++++++++++++++++--------------------------------- + 1 file changed, 225 insertions(+), 241 deletions(-) + +commit 4c20781f4c8f04879b64d631a4f44b4909147bde +Author: Lasse Collin +Date: 2024-02-15 22:32:52 +0200 + + Translations: Omit the generic copyright line from man page headers. + + po4a/update-po | 1 + + 1 file changed, 1 insertion(+) + +commit 4323bc3e0c1e1d2037d5e670a3bf6633e8a3031e +Author: Jia Tan +Date: 2024-02-15 22:26:43 +0800 + + Update m4/.gitignore. + + m4/.gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 5394a1665b7a108a54cb8b4ef3ebe59d3dbcca3a +Author: Lasse Collin +Date: 2024-02-14 21:11:49 +0200 + + Tests: tuktest.h: Treat Clang separately from GCC. + + Don't assume that Clang defines __GNUC__ as the extensions + are available in clang-cl as well (and possibly in some other + Clang variants?). + + tests/tuktest.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit cce7330b9f23485a0879422e0c3395a7065439ac +Author: Lasse Collin +Date: 2024-02-14 21:11:03 +0200 + + Tests: tuktest.h: Add a missing word to a comment. + + tests/tuktest.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5dd8fc9452a3373cedc27379067ce638f992c741 +Author: Lasse Collin +Date: 2024-02-14 21:10:10 +0200 + + Tests: tuktest.h: Fix the comment about STest. + + tests/tuktest.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 6f1790254a03c5edf0f2976f773220f070450acd +Author: Jia Tan +Date: 2024-02-15 01:53:40 +0800 + + Bump version for 5.5.2beta. + + 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 924fdeedf48113fb1e0646d86bd89a356d21a055 +Author: Lasse Collin +Date: 2024-02-14 19:46:11 +0200 + + liblzma: Fix validate_map.sh. + + Adding the SPDX license identifier changed the line numbers. + + src/liblzma/validate_map.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 22140a2df6161b0110e6b4afa5ea0a07c5b60b01 +Author: Lasse Collin +Date: 2024-02-14 19:38:34 +0200 + + Build: Start the generated ChangeLog from around 5.4.0 instead of 5.2.0. + + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0b8cefa136c21d403a01b78517f4decb50172bdb +Author: Lasse Collin +Date: 2024-02-14 19:27:46 +0200 + + Fixed NEWS for 5.5.2beta. + + NEWS | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit a4557bad96361d93ea171ed859ac5a696fca824f +Author: Lasse Collin +Date: 2024-02-14 19:21:45 +0200 + + liblzma: Silence warnings in --enable-small build. + + src/liblzma/lzma/lzma_decoder.c | 2 ++ + src/liblzma/rangecoder/range_decoder.h | 1 + + 2 files changed, 3 insertions(+) + +commit 38edf473236d00b3e100dc4c4f0bf43a4993fed2 +Author: Lasse Collin +Date: 2024-02-14 19:15:58 +0200 + + Build: Install COPYING.0BSD as part of docs. + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit b74e10bd839bcdc239afb5300ffaee195f34c217 +Author: Lasse Collin +Date: 2024-02-14 19:14:05 +0200 + + Docs: List COPYING.0BSD in README. + + README | 1 + + 1 file changed, 1 insertion(+) + +commit dfdb60ffe933a1f1497d300dbb4513ed17ec6f0e +Author: Lasse Collin +Date: 2024-02-14 19:11:48 +0200 + + 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. + + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit 160b6862646d95dfdbd73ab7f1031ede0f54992d +Author: Lasse Collin +Date: 2024-02-14 19:05:58 +0200 + + liblzma: Silence a warning. + + src/liblzma/rangecoder/range_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit eeedd4d0925ea417add04ceb42a6c0829244b50c +Author: Lasse Collin +Date: 2024-02-14 18:32:27 +0200 + + Add NEWS for 5.5.2beta. + + NEWS | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 60 insertions(+) + +commit 8af7db854f903068d72a9a0d21103cb0c5027fa8 +Author: Lasse Collin +Date: 2024-02-13 14:32:47 +0200 + + 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 + + src/xz/list.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +commit 0668907ff736e4cd16738c10d39a2bc9e851aefb +Author: Lasse Collin +Date: 2024-02-14 14:58:36 +0200 + + liblzma: Add comments. + + src/liblzma/lzma/lzma_decoder.c | 9 +++++++++ + src/liblzma/rangecoder/range_decoder.h | 11 +++++++++-- + 2 files changed, 18 insertions(+), 2 deletions(-) + +commit 109f1913d4824c8214d5bbd38ebebf62c37572da +Author: Lasse Collin +Date: 2024-02-13 17:00:17 +0200 + + Scripts: Add lz4 support to xzgrep and xzdiff. + + 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 de55485cb23af56c5adbe3239b935c957ff8ac4f +Author: Lasse Collin +Date: 2024-02-13 14:05:13 +0200 + + liblzma: Choose the range decoder variants using a bitmask macro. + + src/liblzma/rangecoder/range_decoder.h | 64 ++++++++++++++++++++++++++++------ + 1 file changed, 53 insertions(+), 11 deletions(-) + +commit 0709c2b2d7c1d8f437b003f691880fd7810e5be5 +Author: Lasse Collin +Date: 2024-02-13 11:38:10 +0200 + + xz: Fix outdated threading related info on the man page. + + src/xz/xz.1 | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +commit 3182a330c1512cc1f5c87b5c5a272578e60a5158 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Range decoder: Add x86-64 inline assembly. + + It's compatible with GCC and Clang. + + src/liblzma/rangecoder/range_decoder.h | 491 +++++++++++++++++++++++++++++++++ + 1 file changed, 491 insertions(+) + +commit cba2edc991dffba7cd4891dbc1bd26cb950cf053 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Range decoder: Add branchless C code. + + 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/rangecoder/range_decoder.h | 76 ++++++++++++++++++++++++++++++++++ + 1 file changed, 76 insertions(+) + +commit e290a72d6dee71faf3a90c9678b2f730083666a7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Clarify a comment. + + src/liblzma/lzma/lzma_decoder.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 5e04706b91ca90d6befd4da24a588a55e631d4a9 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: LZMA decoder: Optimize loop comparison. + + But now it needs one more local variable. + + src/liblzma/lzma/lzma_decoder.c | 5 ++--- + src/liblzma/rangecoder/range_decoder.h | 10 +++++++++- + 2 files changed, 11 insertions(+), 4 deletions(-) + +commit 88276f9f2cb4871c7eb86952d93d07c1cf6caa66 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Optimize literal_subcoder() macro slightly. + + 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 5938f6de4d8ec9656776cd69e78ddfd6c3ad84e5 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: LZ decoder: Add unlikely(). + + src/liblzma/lz/lz_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9c252e3ed086c6b72590b2531586c42596d4a9d9 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: LZ decoder: Remove a useless unlikely(). + + src/liblzma/lz/lz_decoder.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f3872a59475456c5d365cad9f1c5be514cfa54b5 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Optimize LZ decoder slightly. + + 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. + + 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/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 eb518446e578acf079abae5f1ce28db7b6e59bc1 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: LZMA decoder: Get rid of next_state[]. + + 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). + + This also makes lzma_encoder.c use the new macros. + + 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 e0c0ee475c0800c08291ae45e0d66aa00d5ce604 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + liblzma: LZMA decoder improvements. + + This adds macros for bittree decoding which prepares the code + for alternative C versions and inline assembly. + + 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 de5c5e417645ad8906ef914bc059d08c1462fc29 +Author: Jia Tan +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Creates Non-resumable and Resumable modes for lzma_decoder. + + 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. + + src/liblzma/lz/lz_decoder.h | 14 +- + src/liblzma/lzma/lzma_decoder.c | 720 ++++++++++++++++++++++++++++------------ + 2 files changed, 521 insertions(+), 213 deletions(-) + +commit e446ab7a18abfde18f8d1cf02a914df72b1370e3 +Author: Jia Tan +Date: 2024-02-12 17:09:10 +0200 + + liblzma: Creates separate "safe" range decoder mode. + + 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. + + src/liblzma/lzma/lzma_decoder.c | 108 ++++++++------------------------- + src/liblzma/rangecoder/range_decoder.h | 77 +++++++++++++++++------ + 2 files changed, 82 insertions(+), 103 deletions(-) + +commit 7f6d9ca329ff3e01d4b0be7366eb4f5c93da41b9 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + doxygen/footer.html: Add missing closing tags and don't open a new tab. + + 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. + + doxygen/footer.html | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 26d1527d34d52b0f5d632d4fb636fb33d0867e92 +Author: Lasse Collin +Date: 2024-02-13 13:19:10 +0200 + + Tweak the expressions in AUTHORS. + + AUTHORS | 31 +++++++++++++++++++++++-------- + 1 file changed, 23 insertions(+), 8 deletions(-) + +commit d231d56580175fa040fdd3c6207a58243ce6217b +Author: Lasse Collin +Date: 2024-02-13 13:07:33 +0200 + + 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. + + po4a/.gitignore | 1 + + po4a/po4a.conf | 14 +++++++------- + po4a/update-po | 18 ++++++++++++++++++ + 3 files changed, 26 insertions(+), 7 deletions(-) + +commit 6d35fcb936474fca1acaebfd9502c097b6fde88e +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Translations: Translate also messages of lzmainfo. + + 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. + + po/POTFILES.in | 2 ++ + 1 file changed, 2 insertions(+) + +commit a9f369dd54b05f9ac4e00ead9d765d04fc259868 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Translations: Add custom .pot header with SPDX license identifier. + + The same is used for both po/xz.pot and po4a/xz-man.pot. + + Makefile.am | 1 + + po/xz.pot-header | 7 +++++++ + po4a/update-po | 8 ++++++++ + 3 files changed, 16 insertions(+) + +commit 469cd6653bb96e83c5cf1031c204d34566b15f44 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Translations: po4a/update-po: Add copyright notice to xz-man.pot. + + All man pages are under 0BSD now so this is simple now. + + po4a/update-po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 28ce45e38fbed4b5f54f2013e38dab47d22bf699 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Update COPYING about the man pages of the scripts. + + COPYING | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit e48287bf51afd5184ea74de1dcade9e153f873f7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + xzdiff, xzgrep, and xzmore: Rewrite the man pages. + + 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. + + 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. + + src/scripts/xzdiff.1 | 94 ++++++++++++++++++++++++----------------- + src/scripts/xzgrep.1 | 116 ++++++++++++++++++++++++++++++++------------------- + src/scripts/xzmore.1 | 79 ++++++++++++++++++++--------------- + 3 files changed, 173 insertions(+), 116 deletions(-) + +commit 3e551b111b8ae8150f1a1040364dbafc034f22be +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + xzless: Update man page slightly. + + The xz tool can decompress three file formats and xzless + has always supported uncompressed files too. + + src/scripts/xzless.1 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 40f36da2262d13d6e1ba8449caa855512ae626d7 +Author: Lasse Collin +Date: 2024-02-12 17:09:10 +0200 + + Translations: Change po/Makevars to add a copyright notice to po/xz.pot. + + 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 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: 2024-02-13 22:56:24 +0800 + + Translations: Update the Korean translation. + + po/ko.po | 526 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 284 insertions(+), 242 deletions(-) + +commit df873143ad1615c6d6aaa1bf8808b1676091dfe3 +Author: Jia Tan +Date: 2024-02-13 01:55:53 +0800 + + Translations: Update the Korean man page translations. + + po4a/ko.po | 1375 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 770 insertions(+), 605 deletions(-) + +commit b3f415eddb150341865a1af47959c3baba076b33 +Author: Jia Tan +Date: 2024-02-13 01:53:33 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 424 ++++++++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 268 insertions(+), 156 deletions(-) + +commit 9860d418d296eb3c721e5384fb367c0499b579c8 +Author: Lasse Collin +Date: 2024-02-09 23:21:01 +0200 + + xzless: Use ||- in LESSOPEN with with "less" 451 and newer. + + src/scripts/xzless.in | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit fd0692b0525e6c26b496492be9e2c865cab734f8 +Author: Lasse Collin +Date: 2024-02-09 23:00:05 +0200 + + xzless: Use --show-preproc-errors with "less" 632 and newer. + + This makes "less" show a warning if a decompression error occurred. + + src/scripts/xzless.in | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +commit adb073da76a920b5a81e6b32254f4ddb054dc57a +Author: Jia Tan +Date: 2024-02-09 23:59:54 +0800 + + liblzma: Fix typo discovered by codespell. + + src/liblzma/check/crc32_arm64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 55d9fc883d221cbace951a370f1fb144698f8c2e +Author: Jia Tan +Date: 2024-02-09 20:01:06 +0800 + + Translations: Update the Swedish translation. + + po/sv.po | 420 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 254 insertions(+), 166 deletions(-) + +commit 55ba4a1ea321499c805eedfa811ffde690bae311 +Author: Jia Tan +Date: 2024-02-08 20:09:04 +0800 + + Translations: Update the Spanish translation. + + po/es.po | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit 7f2293cd804a89d3c3b2d3ed573560ca9e1520ae +Author: Jia Tan +Date: 2024-02-07 21:34:35 +0800 + + Translations: Update the Spanish translation. + + po/es.po | 419 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 253 insertions(+), 166 deletions(-) + +commit f4af2036bc625739d6d33d9e1fede583a25c3828 +Author: Jia Tan +Date: 2024-02-07 21:28:32 +0800 + + Translations: Update the Polish translation. + + po/pl.po | 411 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 249 insertions(+), 162 deletions(-) + +commit e5e93bb816043c559cddf03a3b7ba13bec353ee4 +Author: Jia Tan +Date: 2024-02-07 19:40:12 +0800 + + Translations: Update the German translation. + + po/de.po | 396 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 242 insertions(+), 154 deletions(-) + +commit 28f18ff8e26902762fb007c13be235b4ac1ac071 +Author: Jia Tan +Date: 2024-02-07 19:27:25 +0800 + + Translations: Update the German man page translations. + + po4a/de.po | 1353 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 752 insertions(+), 601 deletions(-) + +commit cabfbc7947da05aa5dfe39bec9759e076f940e3c +Author: Jia Tan +Date: 2024-02-06 23:44:06 +0800 + + Translations: Update the Romanian translation. + + po/ro.po | 416 ++++++++++++++++++++++++++++++++++++++------------------------- + 1 file changed, 252 insertions(+), 164 deletions(-) + +commit bf20c94f5d748cea2147779f4fa7e2fd2eb8555e +Author: Jia Tan +Date: 2024-02-06 23:45:02 +0800 + + Translations: Update the Romanian man page translations. + + po4a/ro.po | 1759 +++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 966 insertions(+), 793 deletions(-) + +commit 7c25ec9feb0241e4affb7432681cc4f5696f3a96 +Author: Jia Tan +Date: 2024-02-07 20:56:57 +0800 + + 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 + + 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 + + src/liblzma/check/crc32_table.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ca9015f4dead2c97b48f5a6933631b0a448b65b9 +Author: Jia Tan +Date: 2024-02-01 16:06:29 +0800 + + liblzma: Check HAVE_USABLE_CLMUL before omitting CRC64 table. + + 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. + + src/liblzma/check/crc64_table.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 2f1552a91c825e87013925e1a67a0930e7aef592 +Author: Jia Tan +Date: 2024-01-23 18:02:13 +0800 + + 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/check/crc32_fast.c | 6 +++--- + src/liblzma/check/crc64_fast.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit 30a25f3742287697bc57a1bef86c19ecf5129322 +Author: Jia Tan +Date: 2024-01-22 22:08:45 +0800 + + Docs: Add --disable-arm64-crc32 description to INSTALL. + + INSTALL | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad +Author: Jia Tan +Date: 2024-01-22 21:36:09 +0800 + + liblzma: Omit CRC tables when not needed with ARM64 optimizations. + + This is similar to the existing x86-64 CLMUL conditions to omit the + tables. They were slightly refactored to improve readability. + + 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 761f5b69a4c778c8bcb09279b845b07c28790575 +Author: Jia Tan +Date: 2024-01-22 20:54:56 +0800 + + liblzma: Rename crc32_aarch64.h to crc32_arm64.h. + + 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. + + 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 455a08609caa3223066a717fb01bfa42c5dba47d +Author: Jia Tan +Date: 2024-01-22 20:49:30 +0800 + + 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/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 61908e816049af7a9f43ea804a57ee8570e2e644 +Author: Jia Tan +Date: 2024-01-22 00:42:28 +0800 + + CMake: Add support for ARM64 CRC32 instruction detection. + + CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +commit c5f6d79cc9515a7f22d7ea4860c6cc394b295732 +Author: Jia Tan +Date: 2024-01-22 00:36:47 +0800 + + 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. + + configure.ac | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 52 insertions(+) + +commit 849d0f282a6a890c5cf5a0e0f02980b12d9ebb0f +Author: Chenxi Mao +Date: 2024-01-09 17:23:11 +0800 + + Speed up CRC32 calculation on ARM64 + + 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. + + Optimized CRC32 will be enabled if ARM64 has CRC extension + running on Linux. + + Signed-off-by: Chenxi Mao + + 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 b43c3e48bf6097095eef36d44cdbec811074940a +Author: Jia Tan +Date: 2024-01-26 19:05:51 +0800 + + Bump version number for 5.5.1alpha. + + 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 c7a7ae1500ea90bd3c2d54533e4f433933eb598f +Author: Jia Tan +Date: 2024-01-26 19:00:52 +0800 + + Add NEWS for 5.5.1alpha + + NEWS | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 80 insertions(+) + +commit 0ef8192e8d5af4e6200d5d4aee22d1f177f7a2df +Author: Jia Tan +Date: 2024-01-26 18:54:24 +0800 + + Add NEWS for 5.4.6. + + NEWS | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +commit 93de7e751d17731315a899264f2a7239d7d2d316 +Author: Lasse Collin +Date: 2024-01-24 20:00:57 +0200 + + 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. + + 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 00fa01698df51c58ae2acf8c7fa4e1fb159f75a9 +Author: Jia Tan +Date: 2024-01-09 17:05:01 +0800 + + 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. + + README | 38 ++++++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 18 deletions(-) + +commit e280470040b27c5e58d78b25b9e2bb71fc6c3882 +Author: Jia Tan +Date: 2024-01-09 16:56:16 +0800 + + Build: Add the logo and license to the release. + + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +commit b1ee6cf259bb49ce91abe9f622294524e37edf4c +Author: Jia Tan +Date: 2024-01-09 16:44:42 +0800 + + COPYING: Add the license for the XZ logo. + + COPYING | 5 + + COPYING.CC-BY-SA-4.0 | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 432 insertions(+) + +commit 31293ae7074802cc7286089a89c7b552d930c97f +Author: Jia Tan +Date: 2024-01-09 16:40:56 +0800 + + 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. + + 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 6daa4d0ea46a8441f21f609149f3633158bf4704 +Author: Lasse Collin +Date: 2024-01-23 18:29:28 +0200 + + 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. + + - 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). + + src/xz/hardware.c | 6 +++++- + src/xz/message.c | 4 ++-- + src/xz/xz.1 | 9 +++++++++ + 3 files changed, 16 insertions(+), 3 deletions(-) + +commit a2dd2dc8e5307a7280bb99868bc478560facba2c +Author: Jia Tan +Date: 2024-01-23 23:52:49 +0800 + + CI: Use RISC-V filter when building with BCJ support. + + build-aux/ci_build.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3060e1070b2421b26c0e17794c1307ec5622f11d +Author: Jia Tan +Date: 2024-01-23 23:52:14 +0800 + + Tests: Use smaller dictionary size in RISC-V test files. + + 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 44ff2fa5c94dc345c4dd69195a19fc5238df60b3 +Author: Jia Tan +Date: 2024-01-23 23:50:57 +0800 + + Tests: Skip RISC-V test files if decoder was not built. + + tests/test_files.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 6133a3f30049d3beaf7d22535b1e5d38e109be4e +Author: Lasse Collin +Date: 2024-01-23 16:11:54 +0200 + + xz: Man page: Add more examples of LZMA2 options with BCJ filters. + + src/xz/xz.1 | 38 +++++++++++++++++++++++++++++++------- + 1 file changed, 31 insertions(+), 7 deletions(-) + +commit 50255feeaabcc7e7db22b858a6bd64a9b5b4f16d +Author: Lasse Collin +Date: 2024-01-23 00:09:48 +0200 + + liblzma: RISC-V filter: Use byte-by-byte access. + + 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/liblzma/simple/riscv.c | 114 +++++++++++++++++++++++++++++++++------------ + 1 file changed, 84 insertions(+), 30 deletions(-) + +commit db5eb5f563e8baa8d912ecf576f53391ff861596 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + 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. + + src/xz/list.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit e2870db5be1503e6a489fc3d47daf950d6f62723 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + 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(+) + +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 283f778908873eca61388029fc418fa800c9d7d7 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + 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. + + src/xz/xz.1 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit ac3691ccca051d67f60b4a3b05b88e511d0b1b28 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + Tests: Add RISC-V Filter test in test_compress.sh. + + tests/test_compress.sh | 1 + + 1 file changed, 1 insertion(+) + +commit 2959dbc7358efcf421ce51bc9cd7eae8fdd8fec4 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + liblzma: Update string_conversion.c to support RISC-V Filter. + + src/liblzma/common/string_conversion.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 34372a5adbe5a7f6bf29498410ba3a463a720966 +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + CMake: Support RISC-V BCJ Filter for encoding and decoding. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 440a2eccb082dc13400c09e22308a58fef85146c +Author: Jia Tan +Date: 2024-01-22 23:33:39 +0800 + + liblzma: Add RISC-V BCJ filter. + + The new Filter ID is 0x0B. + + Thanks to Chien Wong for the initial version of the Filter, + the xz CLI updates, and the Autotools build system modifications. + + Thanks to Igor Pavlov for his many contributions to the design of + the filter. + + 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 5540f4329bbdb4deb4850d4af48b18ad074bba19 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 + + Docs: Update .xz file format specification to 1.2.0. + + The new RISC-V filter was added to the specification, in addition to + updating the specification URL. + + doc/xz-file-format.txt | 29 +++++++++++++++++------------ + 1 file changed, 17 insertions(+), 12 deletions(-) + +commit 22d86192f8cf00902a1f90ee2a83ca600794459b +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 + + xz: Update website URLs in the man pages. + + src/xz/xz.1 | 6 +++--- + src/xzdec/xzdec.1 | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit 6b63c4c6139fa1bb21b570521d3d2b4a608bc34d +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 + + liblzma: Update website URL. + + dos/config.h | 2 +- + src/liblzma/api/lzma.h | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit fce4758018f3a3589236f3fe7999fd9dd08c77e9 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 + + Docs: Update website URLs. + + .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 c26812c5b2c8a2a47f43214afe6b0b840c73e4f5 +Author: Jia Tan +Date: 2024-01-19 23:08:14 +0800 + + Build: Update website URL. + + CMakeLists.txt | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit fbb3ce541ef79cad1710e88a27a5babb5f6f8e5b +Author: Lasse Collin +Date: 2024-01-11 15:01:50 +0200 + + liblzma: CRC: Add a comment to crc_x86_clmul.h about BUILDING_ macros. + + src/liblzma/check/crc_x86_clmul.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 4f518c1b6b7b7ce5dcefea81acd44d7a086a8882 +Author: Lasse Collin +Date: 2024-01-11 15:22:36 +0200 + + 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/check/crc_common.h | 20 -------------------- + src/liblzma/check/crc_x86_clmul.h | 2 +- + 2 files changed, 1 insertion(+), 21 deletions(-) + +commit 35c03ec6bf66f1b159964c9721a2dce0e2859b20 +Author: Lasse Collin +Date: 2024-01-11 14:39:46 +0200 + + liblzma: CRC: Update CLMUL comments to more generic wording. + + src/liblzma/check/crc32_fast.c | 16 ++++++++-------- + src/liblzma/check/crc64_fast.c | 10 +++++----- + 2 files changed, 13 insertions(+), 13 deletions(-) + +commit 66f080e8016129576536482ac377e2ecac7a2b90 +Author: Lasse Collin +Date: 2024-01-10 18:23:31 +0200 + + 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. + + 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 3dbed75b0b9c7087c76fe687acb5cf582cd57b99 +Author: Lasse Collin +Date: 2024-01-10 18:19:21 +0200 + + liblzma: Fix a comment in crc_common.h. + + src/liblzma/check/crc_common.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 419f55f9dfc2df8792902b8953d50690121afeea +Author: Lasse Collin +Date: 2023-10-20 23:35:10 +0300 + + 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. + + is_clmul_supported() stays as inline function as it's not needed + when doing a CLMUL-only build (avoids a warning about unused function). + + 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 e3833e297dfb5021a197bda34ba2a795e30aaf8a +Author: Lasse Collin +Date: 2023-10-21 00:06:52 +0300 + + liblzma: crc_clmul.c: Add crc_attr_target macro. + + This reduces the number of the complex #if directives. + + src/liblzma/check/crc_clmul.c | 30 ++++++++++++++++-------------- + 1 file changed, 16 insertions(+), 14 deletions(-) + +commit d164ac0e62904126f7920c25f9a2875c8cd28b97 +Author: Lasse Collin +Date: 2023-10-20 22:49:48 +0300 + + liblzma: Simplify existing cases with lzma_attr_no_sanitize_address. + + src/liblzma/check/crc_clmul.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +commit 9523c1300d22fa715765c181cf991d14d6112fb1 +Author: Lasse Collin +Date: 2023-10-20 21:53:35 +0300 + + liblzma: #define crc_attr_no_sanitize_address in crc_common.h. + + src/liblzma/check/crc_common.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 93d144f0930821590524247bd174afd38003d7f0 +Author: Lasse Collin +Date: 2023-10-20 23:25:14 +0300 + + liblzma: CRC: Add empty lines. + + And remove one too. + + 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 0c7e854ffd27f1cec2e9b0e61601d6f90bfa10ae +Author: Lasse Collin +Date: 2023-10-20 23:19:33 +0300 + + liblzma: crc_clmul.c: Tidy up the location of MSVC pragma. + + It makes no difference in practice. + + src/liblzma/check/crc_clmul.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 15cf3f04f270d707a5c91cc0208b23b6db42b774 +Author: Lasse Collin +Date: 2023-12-20 21:16:24 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit cd64dd70d5665b6048829c45772d08606f44672e +Author: Lasse Collin +Date: 2023-12-20 21:15:16 +0200 + + 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 %. + + This enables the 8-byte method on MSVC ARM64 too which + should work but wasn't tested. + + src/liblzma/common/memcmplen.h | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit 12c90c00f05e19da3c0c91d8cd8e0d0d45965606 +Author: Lasse Collin +Date: 2023-12-20 21:01:06 +0200 + + 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/memcmplen.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 133c5851eb917c6d99d0b623c1689c8518e65f38 +Author: Jia Tan +Date: 2023-12-21 21:39:08 +0800 + + Translations: Update the French translation. + + po/fr.po | 632 +++++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 370 insertions(+), 262 deletions(-) + +commit 710cbc186cad0ac601c38bd6bf31167648a5581e +Author: Jia Tan +Date: 2023-12-21 16:39:53 +0800 + + xz: Add a comment to Capsicum sandbox setup. + + 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. + + xzdec now also uses the sandbox when its configured. + + INSTALL | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +commit ebddf20214143a8e002ab897e95e880bb4c5ac44 +Author: Jia Tan +Date: 2023-12-20 22:39:13 +0800 + + CMake: Move sandbox detection outside of xz section. + + 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. + + CMakeLists.txt | 178 +++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 98 insertions(+), 80 deletions(-) + +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 + + xzdec: Add sandbox support for Pledge, Capsicum, and Landlock. + + 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. + + Thanks to Christian Weisgerber for the initial patch adding Pledge + sandboxing. + + src/xzdec/xzdec.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 139 insertions(+), 7 deletions(-) + +commit b34b6a9912d6165e34ba0db151b7f9941d2e06d5 +Author: Jia Tan +Date: 2023-12-20 21:31:34 +0800 + + 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/lz/lz_encoder.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 183a62f0b540ff4d23cc19b2b6bc2525f0bd64df +Author: Jia Tan +Date: 2023-12-16 20:51:38 +0800 + + liblzma: Set all values in lzma_lz_encoder to NULL after allocation. + + 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/lz/lz_encoder.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 1a1bb381db7a20cf86cb45a350e5cca35224d017 +Author: Jia Tan +Date: 2023-12-16 20:30:55 +0800 + + liblzma: Tweak a comment. + + src/liblzma/lz/lz_encoder.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 55810780e04f759747b02683fb8020b8cd022a85 +Author: Jia Tan +Date: 2023-12-16 20:28:21 +0800 + + 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/liblzma/common/filter_encoder.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 5dad6f628af742bab826819760deb677597445f7 +Author: Jia Tan +Date: 2023-12-16 20:18:47 +0800 + + 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/lzma/lzma_encoder.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit e1b1a9d6370b788bd6078952c6c201e12bc27cbf +Author: Jia Tan +Date: 2023-12-16 11:20:20 +0800 + + Docs: Update repository URL in Changelog. + + ChangeLog | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f9b82bc64a9405e486575c65c1729229eb0a8198 +Author: Jia Tan +Date: 2023-12-15 16:56:31 +0800 + + CI: Update Upload Artifact Action. + + .github/workflows/ci.yml | 2 +- + .github/workflows/windows-ci.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit d0b24efe6cdc47db5b0fdf6306f70a2e0e63e49e +Author: Jia Tan +Date: 2023-12-07 21:48:07 +0800 + + Tests: Silence -Wsign-conversion warning on GCC version < 10. + + 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; + + 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+. + + tests/test_block_header.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4a972a8ee3ed88ac14067c1d2f15b78988e5dae8 +Author: Jia Tan +Date: 2023-12-06 18:39:03 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit ee2f48350099201694a7586e41d7aa2f09fc74da +Author: Jia Tan +Date: 2023-12-06 18:30:25 +0800 + + Tests: Minor cleanups to OSS-Fuzz files. + + 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: + + - Author line edits + + - Small comment changes/additions + + - Using the return value in the error messages in the fuzz targets' + coder initialization code + + - Removed fuzz_encode_stream.options. This set a max length, which may + prevent some worthwhile code paths from being properly exercised. + + - 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 + + 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 483bb90eec7c83e1c2bcd06287714afd62d8c17d +Author: Maksym Vatsyk +Date: 2023-12-05 16:31:09 +0100 + + Tests: Add fuzz_encode_stream ossfuzz target. + + 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. + + tests/ossfuzz/config/fuzz_encode_stream.options | 2 + + tests/ossfuzz/fuzz_encode_stream.c | 79 +++++++++++++++++++++++++ + 2 files changed, 81 insertions(+) + +commit 7ca8c9869df82756c3128c4fcf1058da4d18aa48 +Author: Maksym Vatsyk +Date: 2023-12-04 17:23:24 +0100 + + Tests: Add fuzz_decode_alone OSS-Fuzz target + + 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. + + 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 37581a77ad5a49615325b1d1925fdc402b1e1d5a +Author: Maksym Vatsyk +Date: 2023-12-04 17:21:29 +0100 + + Tests: Update OSS-Fuzz Makefile. + + 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. + + tests/ossfuzz/Makefile | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +commit 28ce6a1c2a74866c51f7996a6869679c236d3c94 +Author: Maksym Vatsyk +Date: 2023-12-04 17:20:08 +0100 + + Tests: Move common OSS-Fuzz target code to .h file. + + tests/ossfuzz/fuzz_common.h | 56 ++++++++++++++++++++++++++++++++++++ + tests/ossfuzz/fuzz_decode_stream.c | 59 ++++++++++---------------------------- + 2 files changed, 71 insertions(+), 44 deletions(-) + +commit bf0521ea1591c25b9d510c1b8be86073e9d847c6 +Author: Maksym Vatsyk +Date: 2023-12-04 17:18:20 +0100 + + Tests: Rename OSS-Fuzz files. + + 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 685094b8e1c1aa1bf934de0366ca42ef599d25f7 +Author: Jia Tan +Date: 2023-11-30 23:10:43 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 3b3023e00b0071e10f589bbc3674e0ec432b8add +Author: Kian-Meng Ang +Date: 2023-11-30 23:01:19 +0800 + + Tests: Fix typos + + tests/test_index.c | 2 +- + tests/test_lzip_decoder.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 424d46ead8cbc0da57f406b76926ec4ed47437f5 +Author: Kian-Meng Ang +Date: 2023-11-30 22:59:47 +0800 + + xz: Fix typo + + src/xz/file_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 35558adf9c45e5597f2c8dbd969885dd484038d2 +Author: Jia Tan +Date: 2023-11-30 20:41:00 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit fd170e8557727bed6bec0518c16415064d972e4e +Author: Jia Tan +Date: 2023-11-22 21:20:12 +0800 + + CI: Test musl libc builds on Ubuntu runner. + + .github/workflows/ci.yml | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +commit db2b4aa068a492c0013279a4ed43803e8ff9bb3e +Author: Jia Tan +Date: 2023-11-22 21:12:15 +0800 + + CI: Allow ci_build.sh to set a different C compiler. + + build-aux/ci_build.sh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit ff7badef53c2cd698d4b72b945f34dfd0835e13c +Author: Jia Tan +Date: 2023-11-24 21:19:12 +0800 + + CMake: Use consistent indentation with check_c_source_compiles(). + + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d4af167570f2c14b002ee18a39d5b1e7e5a892b1 +Author: Jia Tan +Date: 2023-11-22 20:33:36 +0800 + + 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 + + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 45 insertions(+), 8 deletions(-) + +commit 20ecee40a0053fd16371ef0628046bf45e548d72 +Author: Jia Tan +Date: 2023-11-24 20:19:11 +0800 + + Docs: Update INSTALL for --enable_ifunc change. + + INSTALL | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit ffb456593d695d70052a2f71c7a2e6269217d194 +Author: Jia Tan +Date: 2023-11-21 20:56:55 +0800 + + 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. + + configure.ac | 61 +++++++++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 44 insertions(+), 17 deletions(-) + +commit 12b89bcc9915090eb42ae638e565af44b6832a23 +Author: Lasse Collin +Date: 2023-11-23 17:39:10 +0200 + + xz: Tweak a comment. + + src/xz/util.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 2ab2e4b5a542eab93902985ce4e642719a8b7a4e +Author: Jia Tan +Date: 2023-11-23 22:13:39 +0800 + + xz: Use is_tty() in message.c. + + src/xz/message.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit 584e3a258f32d579b1d07f99b4dc6e856c10ac7e +Author: Jia Tan +Date: 2023-11-23 22:04:35 +0800 + + 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: + + xz foo -c > /dev/null + + would fail because /dev/null was assumed to be a terminal. + + src/xz/util.c | 30 +++++++++++++++++++++++------- + src/xz/util.h | 14 ++++++++++++++ + 2 files changed, 37 insertions(+), 7 deletions(-) + +commit 6b05f827f50e686537e9a23c49c5aa4c0aa6b23d +Author: Jia Tan +Date: 2023-11-22 20:39:41 +0800 + + tuklib_integer: Fix typo discovered by codespell. + + Based on internet dictionary searches, 'choise' is an outdated spelling + of 'choice'. + + src/common/tuklib_integer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 659aca0d695807c0762d4101765189e4e33d1e2c +Author: Lasse Collin +Date: 2023-11-17 19:35:19 +0200 + + xz: Move the check for --suffix with --format=raw a few lines earlier. + + 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. + + 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. + + 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 following command caused a segmentation fault: + + xz -Fraw --lzma1 --files=foo + + 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. + + Later code assumed the suffix was set and caused a segmentation fault. + Now, the above command results in an error. + + src/xz/args.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 299920bab9ae258a247366339264e8aefca9e3ce +Author: Jia Tan +Date: 2023-11-17 20:04:58 +0800 + + Tests: Fix typo in a comment. + + tests/test_files.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f481523baac946fa3bc13d79186ffaf0c0b818a7 +Author: Jia Tan +Date: 2023-11-15 23:40:13 +0800 + + 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. + + src/xz/args.c | 38 +++++++++++++------------------------- + 1 file changed, 13 insertions(+), 25 deletions(-) + +commit 837ea40b1c9d4998cac4500b55171bf33e0c31a6 +Author: Jia Tan +Date: 2023-11-14 20:27:46 +0800 + + 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. + + src/xz/args.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit d4f4a4d040ef47a5e82dffd0f067e92716606ddf +Author: Jia Tan +Date: 2023-11-14 20:27:04 +0800 + + 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. + + src/xz/args.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 2ade7246e7ba729a91460d2fab0f4c7b89d3998b +Author: Jia Tan +Date: 2023-11-09 01:21:53 +0800 + + liblzma: Add missing comments to lz_encoder.h. + + src/liblzma/lz/lz_encoder.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 5fe1450603dc625340b8b7866fb4a83ff748ad06 +Author: Jia Tan +Date: 2023-11-01 20:18:30 +0800 + + Add NEWS for 5.4.5. + + NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +commit 46007049cd42e606543dbe650feb17bdf4469c29 +Author: Lasse Collin +Date: 2023-10-31 21:41:09 +0200 + + 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. + + src/liblzma/lzma/fastpos_tablegen.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 148e20607e95781558bdfc823ecba07b7af4b590 +Author: Jia Tan +Date: 2023-10-31 21:51:40 +0800 + + Build: Fix text wrapping in an output message. + + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 8c36ab79cbf23104ce7a3d533d5ac98cd492e57c +Author: Lasse Collin +Date: 2023-10-30 18:09:53 +0200 + + 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. + + src/liblzma/check/crc_common.h | 5 +++++ + 1 file changed, 5 insertions(+) + +commit e7a86b94cd247435ac96bc79ba528b690b9ca388 +Author: Lasse Collin +Date: 2023-10-22 17:59:11 +0300 + + liblzma: Use lzma_always_inline in memcmplen.h. + + src/liblzma/common/memcmplen.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit dcfe5632992fb7f06f921da13fcdd84f83d0d285 +Author: Lasse Collin +Date: 2023-10-30 17:43:03 +0200 + + liblzma: #define lzma_always_inline in common.h. + + src/liblzma/common/common.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 41113fe30a47f6fd3e30cb4494dd538e86212edf +Author: Lasse Collin +Date: 2023-10-22 17:15:32 +0300 + + liblzma: Use lzma_attr_visibility_hidden on private extern declarations. + + These variables are internal to liblzma and not exposed in the API. + + 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 a2f5ca706acc6f7715b8d260a8c6ed50d7717478 +Author: Lasse Collin +Date: 2023-10-22 17:08:39 +0300 + + 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. + + src/liblzma/common/common.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 2c7ee92e44e1e66f0a427555233eb22c78f6c4f8 +Author: Lasse Collin +Date: 2023-09-30 22:54:28 +0300 + + liblzma: Refer to MinGW-w64 instead of MinGW in the API headers. + + 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/api/lzma.h | 4 ++-- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 597f49b61475438a43a417236989b2acc968a686 +Author: Lasse Collin +Date: 2023-09-27 00:58:17 +0300 + + CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed. + + A CMake option LARGE_FILE_SUPPORT is created if and only if + -D_FILE_OFFSET_BITS=64 affects sizeof(off_t). + + 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. + + CMakeLists.txt | 7 ++++- + cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 1 deletion(-) + +commit 1bc548b8210366e44ba35b0b11577a8e328c1228 +Author: Lasse Collin +Date: 2023-09-30 02:14:25 +0300 + + CMake: Generate and install liblzma.pc if not using MSVC. + + 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. + + CMakeLists.txt | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 2add71966f891d315105d6245f724ed4f43a4eff +Author: Lasse Collin +Date: 2023-09-30 01:13:13 +0300 + + CMake: Rearrange the PACKAGE_ variables. + + The windres workaround now replaces spaces with \x20 so + the package name isn't repeated. + + These changes will help with creation of liblzma.pc. + + CMakeLists.txt | 26 +++++++++++++++----------- + 1 file changed, 15 insertions(+), 11 deletions(-) + +commit a7d1b2825c49dc83f1910eeb8ba0f1dfbd886d91 +Author: Lasse Collin +Date: 2023-09-29 20:46:11 +0300 + + liblzma: Add Cflags.private to liblzma.pc.in for MSYS2. + + 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. + + See: https://www.msys2.org/docs/pkgconfig/ + + src/liblzma/liblzma.pc.in | 1 + + 1 file changed, 1 insertion(+) + +commit 80e0750e3996c1c659e972ce9cf789ca2e99f702 +Author: Lasse Collin +Date: 2023-09-27 22:46:20 +0300 + + CMake: Create liblzma.def when building liblzma.dll with MinGW-w64. + + CMakeLists.txt | 20 ++++++++++++++++++++ + cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+) + +commit 08d12595f486890cf601b87f36ee0ddbce57728e +Author: Lasse Collin +Date: 2023-10-26 21:44:42 +0300 + + CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR. + + In this case they have identical values. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e67aaf698de75c73443a5ec786781cbf2034461d +Author: Lasse Collin +Date: 2023-10-01 19:10:57 +0300 + + 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. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 88588b1246d8c26ffbc138b3e5c413c5f14c3179 +Author: Lasse Collin +Date: 2023-10-25 19:13:25 +0300 + + 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 | 29 +++++++++++++++++++++++++++++ + configure.ac | 37 +++++++++++++++++++++++++++++++++---- + 2 files changed, 62 insertions(+), 4 deletions(-) + +commit 5e3d890f8862a7d4fbef5e38e11b6c9fbd98f468 +Author: Jia Tan +Date: 2023-10-24 00:50:08 +0800 + + 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. + + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit b1408987ea832e2760e478ae960a636df17a1363 +Author: Jia Tan +Date: 2023-10-24 00:15:39 +0800 + + CI: Allow disabling the sandbox in ci_build.sh. + + build-aux/ci_build.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 91c435cf1c7a1e893706d4d716dfd361621ed824 +Author: Lasse Collin +Date: 2023-10-11 19:47:44 +0300 + + 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. + + CMakeLists.txt | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +commit fa1609eb9393ecd30decfed4891c907829f06710 +Author: Lasse Collin +Date: 2023-10-09 22:28:49 +0300 + + Docs: Update INSTALL about sandboxing support. + + INSTALL | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 8276c7f41c671eee4aa3239490658b23dcfd3021 +Author: Lasse Collin +Date: 2023-10-09 22:07:52 +0300 + + xz: Support basic sandboxing with Linux Landlock (ABI versions 1-3). + + It is enabled only when decompressing one file to stdout, + similar to how Capsicum is used. + + Landlock was added in Linux 5.13. + + 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 3a1e9fd031b9320d769d63b503ef4e82e1b6ea8c +Author: Lasse Collin +Date: 2023-10-09 21:12:31 +0300 + + CMake: Edit threading related messages. + + It's mostly to change from "thread method" to "threading method". + + CMakeLists.txt | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +commit bf011352528ae3539ea7b780b45b96736ee57a99 +Author: Lasse Collin +Date: 2023-10-09 20:59:24 +0300 + + CMake: Use FATAL_ERROR if user-supplied options aren't understood. + + This way typos are caught quickly and compounding error messages + are avoided (a single typo could cause more than one error). + + 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. + + CMakeLists.txt | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit 3f53870c249945d657ca3d75e0993e6267d71f75 +Author: Lasse Collin +Date: 2023-10-09 18:37:32 +0300 + + CMake: Add sandboxing support. + + CMakeLists.txt | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 49 insertions(+), 1 deletion(-) + +commit 2e2cd11535ad77364cf021297e0b3f162fa3a3d0 +Author: Lasse Collin +Date: 2023-10-09 18:13:08 +0300 + + Simplify detection of Capsicum support. + + 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. + + 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 + + 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 c57858b60e186d020b2dbaf7aabd9b32c71da824 +Author: Lasse Collin +Date: 2023-09-25 01:46:36 +0300 + + xz/Windows: Allow clock_gettime with POSIX threads. + + If winpthreads are used for threading, it's OK to use clock_gettime() + from winpthreads too. + + src/xz/mytime.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit dd32f628bb5541ef4e8ce66966ef456a1934084c +Author: Lasse Collin +Date: 2023-09-25 01:39:26 +0300 + + 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/common/mythread.h | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +commit 680e52cdd086e92691d8a0bca2c98815565f60ca +Author: Lasse Collin +Date: 2023-09-23 03:06:36 +0300 + + CMake: Check for clock_gettime() even on Windows. + + This mirrors configure.ac although currently MinGW-w64 builds + don't use clock_gettime() even if it is found. + + CMakeLists.txt | 44 +++++++++++++++++++++----------------------- + 1 file changed, 21 insertions(+), 23 deletions(-) + +commit 1c1a8c3ee4dad0064dbe63b8dbc4ac4bc679f419 +Author: Lasse Collin +Date: 2023-09-23 03:23:32 +0300 + + Build: Check for clock_gettime() even if not using POSIX threads. + + See the new comment in the code. + + 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. + + configure.ac | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) + +commit 46fd991cd2808ef62554853864c946232e7547f0 +Author: Lasse Collin +Date: 2023-09-24 22:58:53 +0300 + + xz/Windows: Ensure that clock_gettime() isn't used with MinGW-w64. + + This commit alone doesn't change anything in the real-world: + + - configure.ac currently checks for clock_gettime() only + when using pthreads. + + - CMakeLists.txt doesn't check for clock_gettime() on Windows. + + So clock_gettime() wasn't used with MinGW-w64 before either. + + 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/mytime.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit cdb4d91f2464b50c985ef7b9517314ea237ddda7 +Author: Lasse Collin +Date: 2023-09-24 00:21:22 +0300 + + xz/Windows: Use GetTickCount64() with MinGW-w64 if using Vista threads. + + src/xz/mytime.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +commit 988e09f27b9b04a43d45d10f92782e0092ee27a9 +Author: Jia Tan +Date: 2023-10-20 19:17:46 +0800 + + 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. + + 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 105c7ca90d4152942e0798580a37f736d02faa22 +Author: Jia Tan +Date: 2023-10-19 16:23:32 +0800 + + Build: Remove check for COND_CHECK_CRC32 in check/Makefile.inc. + + 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/liblzma/check/Makefile.inc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 139757170468f0f1fafdf0a8ffa74363d1ea1d0c +Author: Jia Tan +Date: 2023-10-19 16:09:01 +0800 + + 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. + + CMakeLists.txt | 44 +++++++++++++++++++++++++------------------- + 1 file changed, 25 insertions(+), 19 deletions(-) + +commit c60b25569d414bb73b705977a4dd342f8f9f1965 +Author: Jia Tan +Date: 2023-10-19 00:22:50 +0800 + + 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. + + 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. + + src/liblzma/check/crc_clmul.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 9a78971261bc67622cbd7dae02f6966968ac1393 +Author: Lasse Collin +Date: 2023-10-14 20:16:13 +0300 + + tuklib_integer: Update the CMake test for fast unaligned access. + + cmake/tuklib_integer.cmake | 69 ++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 54 insertions(+), 15 deletions(-) + +commit 2f81ac852bc5aafc91c8e2adc66b5114761703c4 +Author: Lasse Collin +Date: 2023-09-23 23:28:48 +0300 + + 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. + + Documentation about an autodetection bug when using ARM64 GCC + with -mstrict-align was added to INSTALL. + + CMake files weren't updated yet. + + INSTALL | 39 +++++++++++++++++++++++++++++++++++++-- + m4/tuklib_integer.m4 | 34 +++++++++++++++++++++++++++------- + 2 files changed, 64 insertions(+), 9 deletions(-) + +commit c8f715f1bca4c30db814fcf1fd2fe88b8992ede2 +Author: Lasse Collin +Date: 2023-10-14 17:56:59 +0300 + + 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. + + src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------ + 1 file changed, 189 insertions(+), 67 deletions(-) + +commit 6828242735cbf61b93d140383336e1e51a006f2d +Author: Lasse Collin +Date: 2023-09-23 02:21:49 +0300 + + tuklib_integer: Add missing write64be and write64le fallback functions. + + src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +commit 1c8884f0af28b3a4690bb573cdf3240a8ec73416 +Author: Jia Tan +Date: 2023-10-18 19:57:10 +0800 + + 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. + + src/liblzma/check/crc_clmul.c | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +commit 5ce0f7a48bdf5c3b45430850a4487307afac6143 +Author: Lasse Collin +Date: 2023-10-18 14:30:00 +0300 + + liblzma: CRC_USE_GENERIC_FOR_SMALL_INPUTS cannot be used with ifunc. + + src/liblzma/check/crc_common.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 27735380491bb5ce0d0f41d5244d89c1d0825f6b +Author: Lasse Collin +Date: 2023-10-17 21:53:11 +0300 + + liblzma: Include common.h in crc_common.h. + + crc_common.h depends on common.h. The headers include common.h except + when there is a reason to not do so. + + src/liblzma/check/crc_clmul.c | 1 - + src/liblzma/check/crc_common.h | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +commit e13b7947b92355c334edd594295d3a2c99c4bca1 +Author: Jia Tan +Date: 2023-10-18 01:23:26 +0800 + + liblzma: Add include guards to crc_common.h. + + src/liblzma/check/crc_common.h | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 40abd88afcc61a8157fcd12d78d491caeb8e12be +Author: Jia Tan +Date: 2023-10-18 22:50:25 +0800 + + liblzma: Add the crc_always_inline macro to crc_simd_body(). + + 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. + + src/liblzma/check/crc_clmul.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a5966c276bd6fa975f0389f8a8dc61393de750b0 +Author: Jia Tan +Date: 2023-10-18 22:48:19 +0800 + + liblzma: Create crc_always_inline macro. + + 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). + + 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/liblzma/check/crc_common.h | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit 96b663f67c0e738a99ba8f35d9f4ced9add74544 +Author: Jia Tan +Date: 2023-10-14 13:23:23 +0800 + + 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. + + src/liblzma/check/crc32_fast.c | 64 +++++++++++++++++++++++++++++------------- + src/liblzma/check/crc64_fast.c | 61 ++++++---------------------------------- + 2 files changed, 53 insertions(+), 72 deletions(-) + +commit 8c0f9376f58c0696d5d6719705164d35542dd891 +Author: Jia Tan +Date: 2023-10-14 12:17:57 +0800 + + liblzma: Create crc_clmul.c. + + 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. + + 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. + + During the conversion, various cleanups were applied to code (thanks to + Lasse Collin) including: + + - 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 + + 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 a3ebc2c516b09616638060806c841bd4bcf7bce3 +Author: Jia Tan +Date: 2023-10-14 10:23:03 +0800 + + liblzma: Define CRC_USE_IFUNC in crc_common.h. + + 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/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 f1cd9d7194f005cd66ec03c6635ceae75f90ef17 +Author: Hans Jansen +Date: 2023-10-12 19:37:01 +0200 + + liblzma: Added crc32_clmul to crc32_fast.c. + + src/liblzma/check/crc32_fast.c | 247 ++++++++++++++++++++++++++++++++++++++-- + src/liblzma/check/crc32_table.c | 19 +++- + 2 files changed, 255 insertions(+), 11 deletions(-) + +commit 93e6fb08b22c7c13be2dd1e7274fe78413436254 +Author: Hans Jansen +Date: 2023-10-12 19:23:40 +0200 + + liblzma: Moved CLMUL CRC logic to crc_common.h. + + crc64_fast.c was updated to use the code from crc_common.h instead. + + src/liblzma/check/crc64_fast.c | 257 ++--------------------------------------- + src/liblzma/check/crc_common.h | 230 +++++++++++++++++++++++++++++++++++- + 2 files changed, 240 insertions(+), 247 deletions(-) + +commit 233885a437f8b55a5c8442984ebc0aaa579e92de +Author: Hans Jansen +Date: 2023-10-12 19:07:50 +0200 + + liblzma: Rename crc_macros.h to crc_common.h. + + 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(-) + +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. + + It's important to make sure the SHA's are from the original repositories and not forks. + + For reference: + + 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 + + .github/workflows/windows-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f28cc9bd481ce493da11f98c18526d324211599a +Author: Gabriela Gutierrez +Date: 2023-09-26 14:35:08 +0000 + + 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: + + 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 + + .github/workflows/ci.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f74f1740067b75042497edbfa6ea457ff75484b9 +Author: Jia Tan +Date: 2023-10-12 20:12:18 +0800 + + 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. + + m4/visibility.m4 | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 5c4bca521e6fb435898a0012b3276eee70a6dadf +Author: Lasse Collin +Date: 2023-10-06 19:36:35 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit d91cb6e884c73d0b05d7e7d68ad4e6eb29f4b44b +Author: Lasse Collin +Date: 2023-10-06 18:55:57 +0300 + + CMake/Windows: Fix when the windres workaround is applied. + + CMake doesn't set WIN32 on CYGWIN but the workaround is + probably needed on Cygwin too. Same for MSYS and MSYS2. + + 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 Martin Storsjö. + https://github.com/tukaani-project/xz/commit/0570308ddd9c0e39e85597ebc0e31d4fc81d436f#commitcomment-129098431 + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 01e34aa1171b04f8b28960b1cc6135a903e0c13d +Author: Jia Tan +Date: 2023-09-29 22:11:54 +0800 + + CI: Disable CLANG64 MSYS2 environment until bug is resolved. + + 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. + + 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. + + Link to bug: https://github.com/llvm/llvm-project/issues/67779. + + .github/workflows/windows-ci.yml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 30d0c35327f3639cb11224872aa58fdbf0b1526e +Author: Jia Tan +Date: 2023-09-29 20:14:39 +0800 + + CMake: Rename xz and man page symlink custom targets. + + 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. + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 506d03127a8565442b028ec991e1578124fd3025 +Author: Jia Tan +Date: 2023-09-29 19:58:44 +0800 + + CMake: Specify LINKER_LANGUAGE for libgnu target to fix Ninja Generator. + + CMake is unable to guess the linker language for just a header file so + it must be explicitly set. + + CMakeLists.txt | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 0570308ddd9c0e39e85597ebc0e31d4fc81d436f +Author: Lasse Collin +Date: 2023-09-27 19:54:35 +0300 + + 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. + + 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. + + See also: + https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47 + + CMakeLists.txt | 26 ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) + +commit 5a9af95f85a7e5d4f9c10cb8cf737651a921f1d1 +Author: Lasse Collin +Date: 2023-09-26 21:47:13 +0300 + + liblzma: Update a comment. + + 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/check/crc64_table.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 8ebaf3f665ddc7e4f19c613005050dde5ccbe499 +Author: Jia Tan +Date: 2023-09-27 00:02:11 +0800 + + liblzma: Avoid compiler warning without creating extra symbol. + + 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/check/crc64_table.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 092d21db2e5eea19fe079264ce48c178989c7606 +Author: Lasse Collin +Date: 2023-09-26 17:24:15 +0300 + + Build: Update the comment about -Werror usage in checks. + + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit a37a2763383e6c204fe878e1416dd35e7711d3a9 +Author: Lasse Collin +Date: 2023-09-26 15:00:43 +0300 + + Build: Fix __attribute__((ifunc(...))) detection with clang -Wall. + + Now if user-supplied CFLAGS contains -Wall -Wextra -Wpedantic + the two checks that need -Werror will still work. + + 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. + + This is not a full fix as things like -Wunused-macros in + user-supplied CFLAGS will still cause problems with both + GCC and Clang. + + CMakeLists.txt | 8 ++++++++ + configure.ac | 8 ++++++++ + 2 files changed, 16 insertions(+) + +commit 9c42f936939b813f25d0ff4e99c3eb9c2d17a0d2 +Author: Lasse Collin +Date: 2023-09-26 13:51:31 +0300 + + Build: Fix underquoted AC_LANG_SOURCE. + + It made no practical difference in this case. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9f1444a8a5c0e724b2c7ef83424f642f07a95982 +Author: Lasse Collin +Date: 2023-09-26 13:14:37 +0300 + + Build: Silence two Autoconf warnings. + + 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. + + configure.ac | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +commit 519e47c2818acde571fadc79551294527fe6cc22 +Author: Jia Tan +Date: 2023-09-26 01:17:11 +0800 + + CMake: Remove accidental extra newline. + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit bbb42412da6a02705ba3e668e90840c2683e4e67 +Author: Jia Tan +Date: 2023-09-26 00:47:26 +0800 + + Build: Remove Gnulib dependency from tests. + + The tests do not use any Gnulib replacements so they do not need to link + libgnu.a or have /lib in the include path. + + tests/Makefile.am | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit d265f6b75691c6c8fa876eb5320c3ff5aed17dfa +Author: Jia Tan +Date: 2023-09-26 00:43:43 +0800 + + CMake: Remove /lib from tests include path. + + The tests never included anything from /lib, so this was not needed. + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit 9fb5de41f2fb654ca952d4bda15cf3777c2b720f +Author: Jia Tan +Date: 2023-09-24 22:10:41 +0800 + + Scripts: Change quoting style from `...' to '...'. + + src/scripts/xzdiff.in | 2 +- + src/scripts/xzgrep.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit eaebdef4d4de3c088b0905f42626b74e0d23abf3 +Author: Jia Tan +Date: 2023-09-24 22:10:18 +0800 + + xz: Change quoting style from `...' to '...'. + + 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 f6667702bf075a05fbe336dbf3576ad1a82ec645 +Author: Jia Tan +Date: 2023-09-24 22:09:47 +0800 + + liblzma: Change quoting style from `...' to '...'. + + This was done for both internal and API headers. + + 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 be012b8097a4eaee335b51357d6befa745f753ce +Author: Jia Tan +Date: 2023-09-24 22:09:16 +0800 + + Build: Change quoting style from `...' to '...'. + + 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 ce162db07f03495bd333696e66883c8f36abdc1e +Author: Jia Tan +Date: 2023-09-24 22:05:02 +0800 + + 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. + + INSTALL | 6 +++--- + doc/examples/01_compress_easy.c | 2 +- + doc/examples/11_file_info.c | 16 ++++++++-------- + 3 files changed, 12 insertions(+), 12 deletions(-) + +commit db17656721e43939bfa4ec13506e7c76f4b86da6 +Author: Jia Tan +Date: 2023-09-24 21:25:01 +0800 + + lib: Silence -Wsign-conversion in getopt.c. + + lib/getopt.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit a6234f677d66888f435010bc0b67de6a32fefcf6 +Author: Jia Tan +Date: 2023-09-24 20:48:52 +0800 + + Build: Update getopt.m4 from Gnulib. + + This file was modified from upstream since we do not need to replace + getopt() and can avoid complexity and feature tests. + + m4/getopt.m4 | 79 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 39 insertions(+), 40 deletions(-) + +commit 84808b68f1075e8603a8ef95d361a61fdc6a5b10 +Author: Jia Tan +Date: 2023-09-26 00:09:53 +0800 + + CMake: Add /lib to include path. + + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 01804a0b4b64e0f33568e947e0579263808c59d3 +Author: Jia Tan +Date: 2023-09-24 20:36:34 +0800 + + CMake: Update libgnu target with new header files. + + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +commit d34558388fe1d8929f6478d61dc322eb4f2900af +Author: Jia Tan +Date: 2023-09-23 00:47:52 +0800 + + lib: Update Makefile.am for new header files. + + lib/Makefile.am | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit 52bf644bdf536e20fcc743b712cede135e05eec5 +Author: Jia Tan +Date: 2023-09-24 20:34:03 +0800 + + lib: Update getopt1.c from Gnulib. + + The only difference was maintaining the conditional inclusion for + config.h. + + lib/getopt1.c | 56 ++++++++++++++++++++++---------------------------------- + 1 file changed, 22 insertions(+), 34 deletions(-) + +commit 7e884c00d0093c38339f17fb1d280eec493f42ca +Author: Jia Tan +Date: 2023-09-23 03:27:00 +0800 + + 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. + + lib/getopt.in.h | 228 +++++++------------------------------------------------- + 1 file changed, 29 insertions(+), 199 deletions(-) + +commit cff05f82066ca3ce9425dafdb086325a8eef8de3 +Author: Jia Tan +Date: 2023-09-23 00:31:55 +0800 + + 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 + + lib: Update getopt.c from Gnulib with modifications. + + The code maintains the prior modifications of conditionally including + config.h and disabling NLS support. + + _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. + + lib/getopt.c | 1134 +++++++++++++++++++--------------------------------------- + 1 file changed, 377 insertions(+), 757 deletions(-) + +commit 56b42be7287844db20b3a3bc1372c6ae8c040d63 +Author: Jia Tan +Date: 2023-09-23 00:18:56 +0800 + + lib: Add getopt-cdefs.h for getopt_long update. + + 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. + + lib/getopt-cdefs.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 70 insertions(+) + +commit 9834e591a4cf9dc2f49e42e26bf28d1d247bc196 +Author: Jia Tan +Date: 2023-09-23 00:15:25 +0800 + + lib: Copy new header files from Gnulib without modification. + + 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. + + 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 5b7a6f06e93d99d6635a740fd2e12fab66096c93 +Author: Lasse Collin +Date: 2023-09-22 21:16:52 +0300 + + Windows: Update the version requirement comments from Win95 to W2k. + + windows/README-Windows.txt | 10 ++++------ + windows/build.bash | 6 +++--- + 2 files changed, 7 insertions(+), 9 deletions(-) + +commit e582f8e0fee46e7cd967f42f465d6bb608b73bc1 +Author: Lasse Collin +Date: 2023-09-22 21:12:54 +0300 + + tuklib_physmem: Comment out support for Windows versions older than 2000. + + src/common/tuklib_physmem.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) + +commit 7d73d1f0e08f96c4ab7aac91b958e37a3dadf07a +Author: Lasse Collin +Date: 2023-09-24 16:32:32 +0300 + + sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO. + + src/common/sysdefs.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +commit 2a9929af0ab7e6c0ab725565034afe3293e51d71 +Author: Lasse Collin +Date: 2023-09-22 02:33:29 +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: + + 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 + + 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. + + src/xz/file_io.c | 35 ++++++++++++++++++++++++++++------- + 1 file changed, 28 insertions(+), 7 deletions(-) + +commit 01311b81f03cce1c0ce847a3d556f84dbd439343 +Author: Lasse Collin +Date: 2023-09-21 20:42:52 +0300 + + CMake: Wrap two overlong lines that are possible to wrap. + + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 152d0771ddd0cffcac9042ad1a66f110d228eee2 +Author: Lasse Collin +Date: 2023-09-21 20:36:31 +0300 + + CMake: Add a comment about threads on Cygwin. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 6df988cceffaa3100b428ed816fad334935b27bf +Author: Lasse Collin +Date: 2023-09-12 23:53:25 +0300 + + MSVC: Remove Visual Studio project files and update INSTALL-MSVC.txt. + + CMake is now the preferred build file generator when building + with MSVC. + + 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 edd563daf0da1d00018684614803c77ab62efcd6 +Author: Lasse Collin +Date: 2023-09-21 19:17:40 +0300 + + CMake: Require VS2015 or later for building xzdec. + + 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. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit daea64d158a7151ca6c255a0e4554c6d521cd589 +Author: Lasse Collin +Date: 2023-09-12 23:43:49 +0300 + + CMake: Allow building xz with Visual Studio 2015 and later. + + 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. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8c2d197c940d246849b2ec48109bb22e54036927 +Author: Lasse Collin +Date: 2023-09-12 23:34:31 +0300 + + MSVC: #define inline and restrict only when needed. + + This also drops the check for _WIN32 as that shouldn't be needed. + + src/common/sysdefs.h | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +commit af66cd585902045e5689a0418103ec81f19f1d0a +Author: Lasse Collin +Date: 2023-09-12 22:16:56 +0300 + + CMake: Add support for replacement getopt_long (lib/getopt*). + + Thanks to Jia Tan for the initial work. I added the libgnu target + and made a few related minor edits. + + CMakeLists.txt | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 47 insertions(+), 7 deletions(-) + +commit e3288fdb45c580cb849f6799cf419c4922004ae5 +Author: Lasse Collin +Date: 2023-09-12 21:12:34 +0300 + + 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 other new policies shouldn't affect this package. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit aff1b479c7b168652bd20305ceed4317d5db6661 +Author: Lasse Collin +Date: 2023-09-12 20:55:10 +0300 + + lib/getopt*.c: Include only HAVE_CONFIG_H is defined. + + The CMake-based build doesn't use config.h. + + 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. + + lib/getopt.c | 4 +++- + lib/getopt1.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +commit aa0cd585d2ed1455d35732798e0d90e3520e8ba5 +Author: Lasse Collin +Date: 2023-09-08 19:08:57 +0300 + + Doxygen: Add more C macro names to PREDEFINED. + + doxygen/Doxyfile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit ee7709bae53637e1765ce142ef102914f1423cb5 +Author: Lasse Collin +Date: 2023-09-11 18:47:26 +0300 + + liblzma: Move a few __attribute__ uses in function declarations. + + The API headers have many attributes but these were left + as is for now. + + 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 217958d88713b5dc73d366d24dd64b2b311b86fe +Author: Lasse Collin +Date: 2023-09-11 19:03:35 +0300 + + xz, xzdec, lzmainfo: Use tuklib_attr_noreturn. + + 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__). + + 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/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 18a66fbac031c98f9c2077fc88846e4d07849197 +Author: Lasse Collin +Date: 2023-09-11 18:53:31 +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. + + 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 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/liblzma/common/common.c | 4 ++-- + src/liblzma/common/common.h | 4 ++-- + src/xz/util.h | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +commit 74b0e900c92d5b222b36f474f1efa431f8e262f7 +Author: Lasse Collin +Date: 2023-09-08 18:41:25 +0300 + + Build: Omit -Wc99-c11-compat since it warns about _Noreturn. + + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +commit 90c94dddfd57b7d744bfad64c54e10d15778144b +Author: Lasse Collin +Date: 2023-09-08 18:19:26 +0300 + + tuklib: Update tuklib_attr_noreturn for C11/C17 and C23. + + This makes no difference for GCC or Clang as they support + GNU C's __attribute__((__noreturn__)) but this helps with MSVC: + + - 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. + + - When MSVC isn't in C11/C17 mode, __declspec(noreturn) is used. + + C23 will deprecate _Noreturn (and ) + for [[noreturn]]. This commit anticipates that but + the final __STDC_VERSION__ value isn't known yet. + + src/common/tuklib_common.h | 22 +++++++++++++++++++++- + src/common/tuklib_exit.h | 4 ++-- + 2 files changed, 23 insertions(+), 3 deletions(-) + +commit 189f72581329ab281ad6af37f60135910cb1b146 +Author: Lasse Collin +Date: 2023-09-11 17:22:44 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 79334e7f20f2bf9e0de095835b48868f1238f584 +Author: Lasse Collin +Date: 2023-09-05 22:42:10 +0300 + + 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. + + src/xz/file_io.c | 26 ++++++++++++++++++++++++++ + src/xz/file_io.h | 10 ++++++++++ + 2 files changed, 36 insertions(+) + +commit c660b8d78b7bda43b12b285550d8c70e8ccec698 +Author: Lasse Collin +Date: 2023-09-05 21:33:35 +0300 + + MSVC: xz: Use GetTickCount64() to implement mytime_now(). + + It's available since Windows Vista. + + src/xz/mytime.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +commit 5c6f892d411670e3060f4bc309402617a209e57c +Author: Kelvin Lee +Date: 2023-09-05 15:05:09 +0300 + + MSVC: xz: Use _stricmp() instead of strcasecmp() in suffix.c. + + src/xz/suffix.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit e241051f50044259d174e8b4633dd9a1c4478408 +Author: Kelvin Lee +Date: 2023-09-05 15:01:10 +0300 + + MSVC: xz: Use _isatty() from to implement isatty(). + + src/xz/message.c | 5 +++++ + src/xz/util.c | 5 +++++ + 2 files changed, 10 insertions(+) + +commit d14bba8fc2be02a9fed8c9bcaaf61103451755f8 +Author: Kelvin Lee +Date: 2023-09-05 15:10:31 +0300 + + MSVC: xz: Use _fileno() instead of fileno(). + + src/xz/private.h | 4 ++++ + 1 file changed, 4 insertions(+) + +commit c4edd367678e6a38c42b149856159bf417da7fe1 +Author: Kelvin Lee +Date: 2023-09-05 15:00:07 +0300 + + MSVC: xzdec: Use _fileno and _setmode. + + src/xzdec/xzdec.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit cfd1054b9b539ee92524901e95d7bb5a1fe670a0 +Author: Kelvin Lee +Date: 2023-09-05 14:37:50 +0300 + + MSVC: Don't #include . + + 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 adef92f23563a2cc088b31ddee9040ecc96bc996 +Author: Lasse Collin +Date: 2023-09-19 14:03:45 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 953e775941a25bfcfa353f802b13e66acb1edf2c +Author: Jia Tan +Date: 2023-09-14 21:13:23 +0800 + + 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. + + .github/workflows/ci.yml | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +commit f167e79bc98f3f56af2e767b83aa81c2d2b9ed77 +Author: Lasse Collin +Date: 2023-09-14 16:35:46 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 4f44ef86758a41a8ec814096f4cb6ee6de04c82e +Author: Lasse Collin +Date: 2023-09-14 16:34:07 +0300 + + liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)). + + Thanks to Agostino Sarubbo. + Fixes: https://github.com/tukaani-project/xz/issues/62 + + src/liblzma/check/crc64_fast.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 7379bb3eed428c0ae734d0cc4a1fd04359d53f08 +Author: Jia Tan +Date: 2023-09-12 22:36:12 +0800 + + CMake: Fix time.h checks not running on second CMake run. + + 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. + + CMakeLists.txt | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit 5d691fe58286b92d704c0dc5cd0c4df22881c6c6 +Author: Jia Tan +Date: 2023-09-12 22:34:06 +0800 + + CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC. + + If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always + added as a compile definition even if the check for it failed. + + CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +commit eccf12866527b8d24c7d7f92f755142be8ef9b11 +Author: Lasse Collin +Date: 2023-08-31 19:50:05 +0300 + + xz: Refactor thousand separator detection and disable it on MSVC. + + 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/xz/util.c | 89 ++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 45 insertions(+), 44 deletions(-) + +commit f7093cd9d130477c234b40aeda613964171f8f21 +Author: Lasse Collin +Date: 2023-08-31 18:14:43 +0300 + + xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX. + + SSIZE_MAX isn't readily available on MSVC. Removing it means + that there is one thing less to worry when porting to MSVC. + + src/xz/file_io.c | 5 ++--- + src/xz/file_io.h | 4 ++-- + 2 files changed, 4 insertions(+), 5 deletions(-) + +commit 74c3449d8b816a724b12ebce7417e00fb597309a +Author: Jia Tan +Date: 2023-08-28 23:14:45 +0800 + + Tests: Improve invalid unpadded size check in test_lzma_index_append(). + + 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(). + + 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/liblzma/common/index.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ae5c07b22a6b3766b84f409f1b6b5c100469068a +Author: Jia Tan +Date: 2023-08-28 21:31:25 +0800 + + 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. + + 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. + + 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: + + - 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()) + + 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. + + Thanks to Joona Kannisto for reporting this. + + src/liblzma/common/index.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 1057765aaabfe0f1397b8094531846655376ae38 +Author: Jia Tan +Date: 2023-08-28 22:18:29 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f2e94d064f305bb8ad77ca70f91d93e55f5cf856 +Author: Jia Tan +Date: 2023-08-26 20:10:23 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 2b871f4dbffe3801d0da3f89806b5935f758d5f3 +Author: Jia Tan +Date: 2023-08-09 20:55:36 +0800 + + 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__)). + + INSTALL | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 356ad5b26b4196f085ce3afa1869154ca81faad8 +Author: Jia Tan +Date: 2023-08-09 20:54:15 +0800 + + CMake: Conditionally allow win95 threads and --enable-small. + + CMakeLists.txt | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +commit de574404c4c2f87aca049f232c38526e3ce092aa +Author: Jia Tan +Date: 2023-08-09 20:35:16 +0800 + + Build: Conditionally allow win95 threads and --enable-small. + + 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. + + 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. + + configure.ac | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +commit 6bf33b704cd31dccf25e68480464aa22d3fcad5a +Author: Jamaika1 +Date: 2023-08-08 14:07:59 +0200 + + mythread.h: Fix typo error in Vista threads mythread_once(). + + 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/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 80cb961e5380a3878246d41341ff91378ca59e05 +Author: Jia Tan +Date: 2023-08-04 22:17:11 +0800 + + codespell: Add .codespellrc to set default options. + + 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. + + .codespellrc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit cd678a6077358935249b64a4a16fe8d17434f9c9 +Author: Jia Tan +Date: 2023-08-03 20:10:21 +0800 + + Tests: Style fixes to test_lzip_decoder.c. + + tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) + +commit 1cac5ed4fa45c9861d745b02d80575cb2ff01d81 +Author: Jia Tan +Date: 2023-08-03 15:56:20 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 16068f6c30b888cdb873f6285af941d00f95741d +Author: Lasse Collin +Date: 2023-08-02 17:15:12 +0300 + + xz: Omit an empty paragraph on the man page. + + src/xz/xz.1 | 1 - + 1 file changed, 1 deletion(-) + +commit 9ae4371b5106189486e850ce777e40f7b6021c0b +Author: Jia Tan +Date: 2023-08-02 20:30:07 +0800 + + Add NEWS for 5.4.4. + + NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +commit e8c2203b2c76466d8d3387c5212b46151de8e605 +Author: Lasse Collin +Date: 2023-08-02 15:19:43 +0300 + + build-aux/manconv.sh: Fix US-ASCII and UTF-8 output. + + 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. + + build-aux/manconv.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9a706167b0d903d92fd134895acb4bc6a5e3e688 +Author: Lasse Collin +Date: 2023-08-01 19:10:43 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 33e25a0f5650754c38bed640deedefe3b4fec5ef +Author: Lasse Collin +Date: 2023-08-01 18:22:24 +0300 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 81db3b889830132334d1f2129bdc93177ac2ca7d +Author: ChanTsune <41658782+ChanTsune@users.noreply.github.com> +Date: 2023-08-01 18:17:17 +0300 + + 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. + + 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.) + + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 71c638c611324e606d324c8189fef8fe79db6991 +Author: Jia Tan +Date: 2023-08-01 21:58:51 +0800 + + Add newline to end of .gitignore. + + Newline was accidentally removed in commit + 01cbb7f023ee7fda8ddde04bd17cf7d3c2418706. + + .gitignore | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 42df7c7aa1cca385e509eb33c65136e61890f0bf +Author: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> +Date: 2023-07-31 14:02:21 +0200 + + Docs: Fix typos found by codespell + + 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 01cbb7f023ee7fda8ddde04bd17cf7d3c2418706 +Author: Jia Tan +Date: 2023-07-26 20:26:23 +0800 + + Update .gitignore. + + .gitignore | 4 ++++ + 1 file changed, 4 insertions(+) + +commit f97a1afd564c48ad9cb94682e10972a72e11fa08 +Author: Jia Tan +Date: 2023-07-28 22:03:08 +0800 + + 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. + + The default for MSYS2 does not allow for broken symlinks, so the CMake + build has been broken for MSYS2 since commit + 80a1a8bb838842a2be343bd88ad1462c21c5e2c9. + + CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 75 insertions(+), 7 deletions(-) + +commit 7190f4cc7c9ade5b9b3675d0cbfa3b6d6ec9cb4f +Author: Jia Tan +Date: 2023-07-28 21:56:48 +0800 + + CI: Fix windows-ci dependency installation. + + 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. + + .github/workflows/windows-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit a048f472cd9a2245265cb292853cbbcdd4f02001 +Author: Jia Tan +Date: 2023-07-28 21:54:22 +0800 + + CI: Update ci_build.sh CMake to always make Unix Makefiles. + + 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. + + build-aux/ci_build.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7870396a0ca945473aa0d1d790f4cbef456610bd +Author: Jia Tan +Date: 2023-07-25 20:17:23 +0800 + + CI: Test CMake builds and test framework with MSYS2. + + .github/workflows/windows-ci.yml | 32 ++++++++++++++++++++------------ + 1 file changed, 20 insertions(+), 12 deletions(-) + +commit 6497d1f8875cb7e3007f714336cc09c06fed235b +Author: Jia Tan +Date: 2023-07-25 20:14:53 +0800 + + CI: Windows CI rename system matrix variable -> msys2_env. + + Calling the MSYS2 environment "system" was a bit vague and should be + more specific. + + .github/workflows/windows-ci.yml | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +commit 785e4121d9b2921ad36bd3af1cf61fa20a9265bd +Author: Jia Tan +Date: 2023-07-24 23:11:45 +0800 + + CI: Add Clang64 MSYS2 environment to Windows CI. + + .github/workflows/windows-ci.yml | 1 + + 1 file changed, 1 insertion(+) + +commit d9166b52cf3458a4da3eb92224837ca8fc208d79 +Author: Jia Tan +Date: 2023-07-24 21:43:44 +0800 + + 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). + + src/liblzma/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit db5019d691f980d622fb56fdcf383af2c3519c98 +Author: Jia Tan +Date: 2023-07-22 18:37:56 +0800 + + Translations: Update the Vietnamese translation. + + po/vi.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) + +commit f3a055f762ba5b71b746fc2d44a6ababde2c61b5 +Author: Jia Tan +Date: 2023-07-22 14:55:42 +0800 + + CI: Add Windows runner for Autotools builds with MSYS2. + + 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. + + 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. + + 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. + + Thanks to Arthur S for the original proposing the original patch. + + Closes: https://github.com/tukaani-project/xz/pull/34 + + .github/workflows/windows-ci.yml | 119 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 119 insertions(+) + +commit 556536a3525df9e5ed78b8c7057991cfa9edfac8 +Author: Jia Tan +Date: 2023-07-21 22:11:01 +0800 + + CI: Add argument to ci_build.sh to pass flags to autogen.sh. + + build-aux/ci_build.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 39a32d36fc465c4e70f13192eea380e518ba6e8a +Author: Jia Tan +Date: 2023-07-21 18:05:44 +0800 + + Tests: Skip .lz files in test_files.sh if not configured. + + Previously if the lzip decoder was not configured then test_files.sh + would pass the lzip tests instead of skipping them. + + tests/test_files.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 194d12724b30fe42789d12a0184f9d412c449347 +Author: Jia Tan +Date: 2023-07-20 22:11:13 +0800 + + Tests: Add ARM64 filter test to test_compress.sh. + + tests/test_compress.sh | 1 + + 1 file changed, 1 insertion(+) + +commit d850365c444368102c69beaddf849ed463c33467 +Author: Jia Tan +Date: 2023-07-20 20:30:05 +0800 + + Translations: Update the Croatian translation. + + po/hr.po | 49 ++++++++++++++++++++++++++++++------------------- + 1 file changed, 30 insertions(+), 19 deletions(-) + +commit 24049eb7acf6d42a60f00efe4e7289fe8e1797fe +Author: Jia Tan +Date: 2023-07-20 20:28:32 +0800 + + Translations: Update the Korean man page translations. + + po4a/ko.po | 1255 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 626 deletions(-) + +commit 4d4a4fa07de6cb9d913fb2f97712fddda2527b49 +Author: Jia Tan +Date: 2023-07-20 20:25:24 +0800 + + Translations: Update the Korean translation. + + po/ko.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) + +commit 237f06d9c55cf438a7538a598354bcf103f23711 +Author: Jia Tan +Date: 2023-07-20 20:24:05 +0800 + + Translations: Update the Polish translation. + + po/pl.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 80c2c832136656d5ac7a1bca8bc42d95e13d281a +Author: Jia Tan +Date: 2023-07-20 20:22:23 +0800 + + Translations: Update the German man page translations. + + po4a/de.po | 1255 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 626 deletions(-) + +commit fdbde14503ca03069d3649aa51926f5f796b89d8 +Author: Jia Tan +Date: 2023-07-20 20:18:44 +0800 + + Translations: Update the German translation. + + po/de.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 9f3bf5ff5b2b5cf0b252a2bf381238ca49dc4101 +Author: Jia Tan +Date: 2023-07-20 20:17:10 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 376938c588011567c74f1d5a160c0ccce6336d46 +Author: Jia Tan +Date: 2023-07-20 20:15:47 +0800 + + Translations: Update the Swedish translation. + + po/sv.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 26b0bc6eb82c84559936a7c7080de5c71c8276f8 +Author: Jia Tan +Date: 2023-07-20 20:14:00 +0800 + + Translations: Update the Ukrainian man page translations. + + po4a/uk.po | 1253 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 628 insertions(+), 625 deletions(-) + +commit 2d02c8b7640b54f3c5aa1c8b5990ba56f322393b +Author: Jia Tan +Date: 2023-07-20 20:09:15 +0800 + + Translations: Update the Ukrainian translation. + + po/uk.po | 45 ++++++++++++++++++++++++++++----------------- + 1 file changed, 28 insertions(+), 17 deletions(-) + +commit f881018b503fd334331c24a09075429558abbce1 +Author: Jia Tan +Date: 2023-07-20 20:06:57 +0800 + + Translations: Update the Spanish translation. + + po/es.po | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +commit 791fe6d3ffd6877fa5f852be69d9251397dfaa31 +Author: Jia Tan +Date: 2023-07-20 20:05:19 +0800 + + Translations: Update the Romanian translation. + + po/ro.po | 48 ++++++++++++++++++++++++++++++------------------ + 1 file changed, 30 insertions(+), 18 deletions(-) + +commit 8827e90704f699fe08bb5bed56b1717a2bc0eb77 +Author: Jia Tan +Date: 2023-07-20 20:02:56 +0800 + + Translations: Update the Romanian man page translations. + + po4a/ro.po | 1254 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 629 insertions(+), 625 deletions(-) + +commit 0184d344fa4f215cd345bb131db9068e077c69b8 +Author: Jia Tan +Date: 2023-07-19 23:36:00 +0800 + + liblzma: Suppress -Wunused-function warning. + + 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()__)). + + At this time, the bug is still unresolved, but has been reported: + https://github.com/llvm/llvm-project/issues/63957 + + This is not a problem in GCC. + + src/liblzma/check/crc64_fast.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 43845fa70fc751736c44c18f4cee42d49bfd1392 +Author: Jia Tan +Date: 2023-07-18 22:52:25 +0800 + + liblzma: Reword lzma_str_list_filters() documentation. + + 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/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 818701ba1c9dff780b7fbf28f9ab8eb11a25dd67 +Author: Jia Tan +Date: 2023-07-18 22:49:57 +0800 + + liblzma: Improve comment in string_conversion.c. + + The comment used "flag" when referring to decoder options. Just + referring to them as options is more clear and consistent. + + src/liblzma/common/string_conversion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b6b7d065853cd4c3f5b8d9be8aea0b6dcb0fe090 +Author: Lasse Collin +Date: 2023-07-18 17:37:33 +0300 + + xz: Translate the second "%s: " in message.c since French needs "%s : ". + + This string is used to print a filename when using "xz -v" and + stderr isn't a terminal. + + src/xz/message.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit be644042c3066d8e7a2834f989671ba74d27f749 +Author: Lasse Collin +Date: 2023-07-18 14:35:33 +0300 + + xz: Make "%s: %s" translatable because French needs "%s : %s". + + 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 97fd5cb669ee0afc48d2087675ab166aff89eaa2 +Author: Lasse Collin +Date: 2023-07-18 13:57:54 +0300 + + liblzma: Tweak #if condition in memcmplen.h. + + Maybe ICC always #defines _MSC_VER on Windows but now + it's very clear which code will get used. + + src/liblzma/common/memcmplen.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 40392c19f71985852d75997f109dea97177d6f3f +Author: Lasse Collin +Date: 2023-07-18 13:49:43 +0300 + + liblzma: Omit unnecessary parenthesis in a preprocessor directive. + + src/liblzma/common/memcmplen.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit abc1d5601b7e419ebc28a1ab4b268613b52e6f98 +Author: Jia Tan +Date: 2023-07-18 00:51:48 +0800 + + xz: Update Authors list in a few files. + + 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 289034a168878baa9df6ff6e159110aade69cba5 +Author: Jia Tan +Date: 2023-07-14 23:20:33 +0800 + + 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 + + INSTALL | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 64 insertions(+), 17 deletions(-) + +commit 1119e5f5a519b0ab71c81fc4dc84c0cc72abe513 +Author: Jia Tan +Date: 2023-07-14 21:10:27 +0800 + + Docs: Update README. + + This adds an entry to "Other implementations of the .xz format" for + XZ for Java. + + README | 4 ++++ + 1 file changed, 4 insertions(+) + +commit f99e2e4e53b7ea89e4eef32ddd4882e0416357c9 +Author: Jia Tan +Date: 2023-07-13 23:32:10 +0800 + + 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. + + src/xz/xz.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f907705eb1f6c5edaafc9668a34c51a989932f1d +Author: Jia Tan +Date: 2023-07-13 21:46:12 +0800 + + xz: Minor clean up for coder.c + + * 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 + + src/xz/coder.c | 53 +++++++++++++++++++++-------------------------------- + 1 file changed, 21 insertions(+), 32 deletions(-) + +commit 9adc9e56157ecbf2948e5036df8567809b9ae177 +Author: Jia Tan +Date: 2023-07-13 21:26:47 +0800 + + xz: Update man page Authors and date. + + src/xz/xz.1 | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit c12e429f2635da8d8f5749e5f733f451baca6945 +Author: Jia Tan +Date: 2023-06-20 20:32:59 +0800 + + xz: Add a section to man page for robot mode --filters-help. + + src/xz/xz.1 | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) + +commit e10f2db5d10300c16fa482a136ed31c1aa6e8e8d +Author: Jia Tan +Date: 2023-06-19 23:11:41 +0800 + + xz: Slight reword in xz man page for consistency. + + Changed will print => prints in xz --robot --version description to + match --robot --info-memory description. + + src/xz/xz.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f5dc172a402fa946f3c45a16929d7fe14c9f5e81 +Author: Jia Tan +Date: 2023-06-19 23:07:10 +0800 + + 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 + + src/xz/xz.1 | 192 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 96 insertions(+), 96 deletions(-) + +commit 9628be23aef2784249fd9f3199799d785d2ec5cc +Author: Jia Tan +Date: 2023-05-13 00:46:50 +0800 + + xz: Update man page for new --filters-help option. + + src/xz/xz.1 | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit a165d7df1964121eb9df715e6f836a31c865beef +Author: Jia Tan +Date: 2023-05-13 00:44:41 +0800 + + 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. + + src/xz/args.c | 8 ++++++++ + src/xz/message.c | 30 ++++++++++++++++++++++++++++++ + src/xz/message.h | 5 +++++ + 3 files changed, 43 insertions(+) + +commit 95f1a414b156ee35d3e71862a14915fdd138f913 +Author: Jia Tan +Date: 2023-04-21 20:28:11 +0800 + + xz: Update the man page for --block-list and --filtersX + + 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/xz/xz.1 | 106 +++++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 80 insertions(+), 26 deletions(-) + +commit 47a63cad2aa778280e0c1926b7159427ea028cb1 +Author: Jia Tan +Date: 2023-04-21 19:50:14 +0800 + + xz: Update --long-help for the new --filtersX option. + + src/xz/message.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit 8b9913a13daca2550d02dfdcdc9be15f55ca4d13 +Author: Jia Tan +Date: 2023-06-17 20:46:21 +0800 + + 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. + + src/xz/coder.c | 66 ++++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 48 insertions(+), 18 deletions(-) + +commit 183819bfd9efac8c184d9bf123325719b7eee30f +Author: Jia Tan +Date: 2023-05-13 20:11:13 +0800 + + 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. + + src/xz/coder.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 67 insertions(+), 1 deletion(-) + +commit afb2dbec3d857b026486b75e42a4728e12d234cb +Author: Jia Tan +Date: 2023-05-11 00:09:41 +0800 + + xz: Validate --flush-timeout for all specified filter chains. + + src/xz/coder.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +commit 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a +Author: Jia Tan +Date: 2023-05-13 19:54:33 +0800 + + xz: Allows --block-list filters to scale down memory usage. + + 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/coder.c | 269 +++++++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 214 insertions(+), 55 deletions(-) + +commit 479fd58d60622331fcbe48fddf756927b9f80d9a +Author: Jia Tan +Date: 2023-05-10 21:50:33 +0800 + + xz: Do not include block splitting if encoders are disabled. + + 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/xz/coder.c | 29 ++++++++++++++++++++--------- + 1 file changed, 20 insertions(+), 9 deletions(-) + +commit f86ede22500f7ae024ec3ec3f3489ab5a857a3b3 +Author: Jia Tan +Date: 2023-05-10 22:38:59 +0800 + + 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. + + src/xz/coder.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit f281cd0d692ac0c70fc7669b80dddb863ea947e1 +Author: Jia Tan +Date: 2023-05-13 19:28:23 +0800 + + xz: Add a message if --block-list is used outside of xz compresssion. + + --block-list is only supported with compression in xz format. This avoids + silently ignoring when --block-list is unused. + + src/xz/args.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit d6af7f347077b22403133239592e478931307759 +Author: Jia Tan +Date: 2023-04-18 20:29:09 +0800 + + xz: Create command line options for filters[1-9]. + + 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/xz/args.c | 82 ++++++++++++++++++++++--- + src/xz/coder.c | 188 ++++++++++++++++++++++++++++++++++++++++++--------------- + src/xz/coder.h | 20 +++++- + 3 files changed, 230 insertions(+), 60 deletions(-) + +commit 072d29250113268536719ad0e040ab8a66fb6435 +Author: Jia Tan +Date: 2023-05-13 19:36:09 +0800 + + xz: Use lzma_filters_free() in forget_filter_chain(). + + 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/xz/coder.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit 3d21da5cff4b511633cb6e0d8a1090485c0c1059 +Author: Jia Tan +Date: 2023-04-17 22:22:45 +0800 + + xz: Separate string to filter conversion into a helper function. + + Converting from string to filter will also need to be done for block + specific filter chains. + + src/xz/coder.c | 33 ++++++++++++++++++++------------- + 1 file changed, 20 insertions(+), 13 deletions(-) + +commit a6583726e5f950278f96abcf79c04f1056810be6 +Author: Jia Tan +Date: 2023-01-06 00:03:35 +0800 + + Tests: Use new --filters option in test_compress.sh + + tests/test_compress.sh | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 5f3b898d07cc9b7160c7c88b3120b7edabb8a5b0 +Author: Jia Tan +Date: 2023-01-06 00:03:06 +0800 + + xz: Update --long-help and man page for new --filters option. + + src/xz/message.c | 6 ++++++ + src/xz/xz.1 | 41 ++++++++++++++++++++++++++++++++++++----- + 2 files changed, 42 insertions(+), 5 deletions(-) + +commit 9ded880a0221f4d1256845fc4ab957ffd377c760 +Author: Jia Tan +Date: 2023-01-06 00:02:29 +0800 + + xz: Add --filters option to CLI. + + 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. + + src/xz/args.c | 9 +++++++-- + src/xz/coder.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- + src/xz/coder.h | 3 +++ + 3 files changed, 58 insertions(+), 4 deletions(-) + +commit 2c189bb00af73dc7ba1a67a9d274d5be03ee3a88 +Author: Jia Tan +Date: 2023-07-14 21:30:25 +0800 + + 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. + + 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. + + tests/test_compress.sh | 4 ++-- + tests/test_files.sh | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 80a6b9bcad016c99c9ba3f3eeb4a619fcadfd357 +Author: Jia Tan +Date: 2023-07-10 20:56:28 +0800 + + Translations: Update the Chinese (traditional) translation. + + po/zh_TW.po | 659 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 377 insertions(+), 282 deletions(-) + +commit 17f8844e6fc355abf997d77637a7447c4f7bbcbd +Author: Jia Tan +Date: 2023-07-08 21:24:19 +0800 + + liblzma: Remove non-portable empty initializer. + + 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/common/stream_encoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3aca4f629cd577f0c54f594d5d88722edf0b0413 +Author: Jia Tan +Date: 2023-07-08 20:03:59 +0800 + + Translations: Update the Vietnamese translation. + + po/vi.po | 620 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 349 insertions(+), 271 deletions(-) + +commit 66bdcfa85fef2911cc80f5f30fed3f9610faccb4 +Author: Jia Tan +Date: 2023-06-28 20:46:31 +0800 + + 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. + + tests/test_index.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit fe3bd438fb119f9bad3f08dc29d331e4956196e1 +Author: Jia Tan +Date: 2023-06-28 20:43:29 +0800 + + 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/test_block_header.c | 38 ++++++++++++++++++++++---------------- + 1 file changed, 22 insertions(+), 16 deletions(-) + +commit 78704f36e74205857c898a351c757719a6c8b666 +Author: Jia Tan +Date: 2023-06-28 20:31:11 +0800 + + 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. + + src/liblzma/common/stream_encoder_mt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e3356a204c5ae02db3ec4552b6c1be354e9b6142 +Author: Jia Tan +Date: 2023-06-28 20:22:38 +0800 + + 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 + . + + Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as + expected. + + src/liblzma/common/memcmplen.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 45e250a9e9f3c3e8e8af2983366b170bf54f890e +Author: Jia Tan +Date: 2023-06-28 21:01:22 +0800 + + CI: Add test with -fsanitize=address,undefined. + + 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. + + This test will only run on Autotools Linux. + + .github/workflows/ci.yml | 23 +++++++++++++++++++---- + build-aux/ci_build.sh | 8 +++++++- + 2 files changed, 26 insertions(+), 5 deletions(-) + +commit 596ee722cd7ddf0afae584fc06365adc0e735977 +Author: Jia Tan +Date: 2023-06-28 20:16:04 +0800 + + CI: Upgrade checkout action from v2 to v3. + + .github/workflows/ci.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 86118ea320f867e09e98a8682cc08cbbdfd640e2 +Author: Jia Tan +Date: 2023-06-27 23:38:32 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 3d1fdddf92321b516d55651888b9c669e254634e +Author: Jia Tan +Date: 2023-06-27 17:27:09 +0300 + + Docs: Document the configure option --disable-ifunc in INSTALL. + + INSTALL | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit b4cf7a2822e8d30eb2b12a1a07fd04383b10ade3 +Author: Lasse Collin +Date: 2023-06-27 17:24:49 +0300 + + Minor tweaks to style and comments. + + CMakeLists.txt | 8 ++++---- + configure.ac | 9 +++++---- + 2 files changed, 9 insertions(+), 8 deletions(-) + +commit 23fb9e3a329117c2968c1e7388b6ef07c782dba1 +Author: Lasse Collin +Date: 2023-06-27 17:19:49 +0300 + + 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. + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit ee44863ae88e377a5df10db007ba9bfadde3d314 +Author: Lasse Collin +Date: 2023-06-27 17:05:23 +0300 + + liblzma: Add ifunc implementation to crc64_fast.c. + + 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. + + 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 Hans Jansen for the original patch. + Closes: https://github.com/tukaani-project/xz/pull/53 + + src/liblzma/check/crc64_fast.c | 35 ++++++++++++++++++++++++++--------- + 1 file changed, 26 insertions(+), 9 deletions(-) + +commit b72d21202402a603db6d512fb9271cfa83249639 +Author: Hans Jansen +Date: 2023-06-22 19:49:30 +0200 + + Add ifunc check to CMakeLists.txt + + 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. + + CMakeLists.txt | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit 23b5c36fb71904bfbe16bb20f976da38dadf6c3b +Author: Hans Jansen +Date: 2023-06-22 19:46:55 +0200 + + Add ifunc check to configure.ac + + 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. + + configure.ac | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +commit dbb3a536ed9873ffa0870321f6873e564c6a9da8 +Author: Jia Tan +Date: 2023-06-07 00:18:30 +0800 + + CI: Add apt update command before installing dependencies. + + Without the extra command, all of the CI tests were automatically + failing because the Ubuntu servers could not be reached properly. + + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 6bcd516812331de42b347922913230895bebad34 +Author: Jia Tan +Date: 2023-06-07 00:10:38 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 0d94ba69220d894d2a86081821d2d7a89df5a10b +Author: Benjamin Buch +Date: 2023-06-06 15:32:45 +0200 + + CMake: Protects against double find_package + + 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.` + + This can simply be fixed by skipping the alias part on secondary + `find_package` runs. + + CMakeLists.txt | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +commit 045d7aae286ecd2ce163be9e0d9041343a03f89a +Author: Jia Tan +Date: 2023-05-31 20:26:42 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 185 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 92 insertions(+), 93 deletions(-) + +commit b0cc7c2dcefe4cbc4e1e697598c14fb687ed0b78 +Author: Jia Tan +Date: 2023-05-31 20:25:00 +0800 + + Translations: Update the Croatian translation. + + po/hr.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit af045ef6f848f02cd14c9ad195a5f87bb0c02dce +Author: Jia Tan +Date: 2023-05-31 20:15:53 +0800 + + Translations: Update the Chinese (simplified) translation. + + po/zh_CN.po | 317 ++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 157 insertions(+), 160 deletions(-) + +commit e6b92d5817fe91ad27a0f7f57bd0f2144311e383 +Author: Jia Tan +Date: 2023-05-17 23:12:13 +0800 + + Translations: Update German translation of man pages. + + po4a/de.po | 52 ++++++++++++---------------------------------------- + 1 file changed, 12 insertions(+), 40 deletions(-) + +commit 592961ccdbba39c7d60fe37e36764232feb57c60 +Author: Jia Tan +Date: 2023-05-17 23:09:18 +0800 + + Translations: Update the German translation. + + po/de.po | 189 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 94 insertions(+), 95 deletions(-) + +commit 13572cb2c391f5b7503e333c6e05b20bd5bbb524 +Author: Jia Tan +Date: 2023-05-17 20:30:01 +0800 + + Translations: Update the Croatian translation. + + po/hr.po | 187 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 93 insertions(+), 94 deletions(-) + +commit 4e6e425ea8f097c6fb43e69cc9540294dca3680d +Author: Jia Tan +Date: 2023-05-17 20:26:54 +0800 + + 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 + + Translations: Update Romanian translation of man pages. + + po4a/ro.po | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +commit cb6fd57f889c5d9fab36ae8c9e10083a5fe32dea +Author: Jia Tan +Date: 2023-05-16 23:43:51 +0800 + + Translations: Update Ukrainian translation of man pages. + + po4a/uk.po | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit c3e8fcbc2db4861f92ad15606c995bd255803c52 +Author: Jia Tan +Date: 2023-05-16 23:37:54 +0800 + + Translations: Update the Ukrainian translation. + + po/uk.po | 321 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 159 insertions(+), 162 deletions(-) + +commit 27b81b84fcedbc55aa6e6b21004c44070b15b038 +Author: Jia Tan +Date: 2023-05-16 23:07:35 +0800 + + Translations: Update the Polish translation. + + po/pl.po | 316 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 155 insertions(+), 161 deletions(-) + +commit 8024ad636a65ed6ea95c94d57255be4c6724d6ed +Author: Jia Tan +Date: 2023-05-16 22:52:14 +0800 + + Translations: Update the Swedish translation. + + po/sv.po | 319 +++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 158 insertions(+), 161 deletions(-) + +commit 6699a29673f227c4664826db485ed9f7596320d2 +Author: Jia Tan +Date: 2023-05-16 21:21:38 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +commit f36ca7982f6bd5e9827219ed4f3c5a1fbf5d7bdf +Author: Jia Tan +Date: 2023-05-13 21:21:54 +0800 + + liblzma: Slightly rewords lzma_str_list_filters() documentation. + + 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/liblzma/api/lzma/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3374a5359e52f1671d8f831d65827d5020fe2595 +Author: Jia Tan +Date: 2023-05-11 23:49:23 +0800 + + liblzma: Adds lzma_nothrow to MicroLZMA API functions. + + None of the liblzma functions may throw an exception, so this + attribute should be applied to all liblzma API functions. + + src/liblzma/api/lzma/container.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 8f236574986e7c414c0ea059f441982d1387e6a4 +Author: Jia Tan +Date: 2023-05-09 20:20:06 +0800 + + liblzma: Exports lzma_mt_block_size() as an API function. + + 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. + + 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/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 d0f33d672a4da7985ebb5ba8d829f885de49c171 +Author: Jia Tan +Date: 2023-05-08 22:58:09 +0800 + + liblzma: Creates IS_ENC_DICT_SIZE_VALID() macro. + + This creates an internal liblzma macro to test if the dictionary size + is valid for encoding. + + src/liblzma/lz/lz_encoder.c | 4 +--- + src/liblzma/lz/lz_encoder.h | 8 ++++++++ + 2 files changed, 9 insertions(+), 3 deletions(-) + +commit c247d06e1f6cada9a76f4f6225cbd97ea760f52f +Author: Jia Tan +Date: 2023-05-02 20:39:56 +0800 + + Add NEWS for 5.4.3. + + NEWS | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 77050b78364ffb6b0f129e742b7c31602d725c08 +Author: Jia Tan +Date: 2023-05-02 20:39:37 +0800 + + Add NEWS for 5.2.12. + + NEWS | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +commit 713e15e43eb6279a7ab4bbad3d1325ebfdcf09a0 +Author: Jia Tan +Date: 2023-05-04 20:38:52 +0800 + + Translations: Update the Croatian translation. + + po/hr.po | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 9ad64bdf309844b6ca6c3e8a4dfb6dbaedda0ca9 +Author: Jia Tan +Date: 2023-05-04 20:30:25 +0800 + + tuklib_integer.h: Reverts previous commit. + + Previous commit 6be460dde07113fe3f08f814b61ddc3264125a96 would cause an + error if the integer size was 32 bit. + + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6be460dde07113fe3f08f814b61ddc3264125a96 +Author: Jia Tan +Date: 2023-05-04 19:25:20 +0800 + + tuklib_integer.h: Changes two other UINT_MAX == UINT32_MAX to >=. + + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 44c0c5eae990a22ef04e9b88c1a15838a0d00878 +Author: Lasse Collin +Date: 2023-05-03 22:46:42 +0300 + + 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. + + src/common/tuklib_integer.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 2cf5ae5b5b279b0b2e69ca4724e7bd705865fe68 +Author: Jia Tan +Date: 2023-04-25 20:06:15 +0800 + + CI: Adds a build and test for small configuration. + + .github/workflows/ci.yml | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 16b81a057a87c2f18e6ed6447f003af0cbdcfe43 +Author: Jia Tan +Date: 2023-04-25 20:05:26 +0800 + + CI: ci_build.sh allows configuring small build. + + build-aux/ci_build.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 78ccd93951f9e988d447bcdd70b24f6df5448d1d +Author: Jia Tan +Date: 2023-04-20 20:15:00 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit f41df2ac2fed347d3f107f3533e76e000d29c6cb +Author: Jia Tan +Date: 2023-04-19 22:22:16 +0800 + + 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. + + src/common/tuklib_integer.h | 6 ++++++ + src/liblzma/common/memcmplen.h | 10 ++++++++++ + 2 files changed, 16 insertions(+) + +commit 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7 +Author: Jia Tan +Date: 2023-04-19 21:59:03 +0800 + + 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. + + Thanks to Anton Kochkov for notifying us about the bug. + + src/common/tuklib_integer.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 3938718ce3773c90755785c0df8777f133b7ae29 +Author: Lasse Collin +Date: 2023-04-14 18:42:33 +0300 + + liblzma: Update project maintainers in lzma.h. + + AUTHORS was updated earlier, lzma.h was simply forgotten. + + src/liblzma/api/lzma.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2a89670ab295e377f8b44f5bda6d198deb8ea285 +Author: Jia Tan +Date: 2023-04-13 20:45:19 +0800 + + liblzma: Cleans up old commented out code. + + src/liblzma/common/alone_encoder.c | 11 ----------- + 1 file changed, 11 deletions(-) + +commit 0fbb2b87a7b5a1dd9d0f4a5e84ac7919557dbe81 +Author: Jia Tan +Date: 2023-04-07 20:46:41 +0800 + + Docs: Add missing word to SECURITY.md. + + .github/SECURITY.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fb9c50f38a17bf37581de4034b36c8df8ec90a87 +Author: Jia Tan +Date: 2023-04-07 20:43:22 +0800 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 537c6cd8a9db0dd6b13683e64ddac2943190d715 +Author: Jia Tan +Date: 2023-04-07 20:42:12 +0800 + + Docs: Minor edits to SECURITY.md. + + .github/SECURITY.md | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +commit 6549df8dd53f358345957e232648fdb699930074 +Author: Gabriela Gutierrez +Date: 2023-04-07 12:08:30 +0000 + + Docs: Create SECURITY.md + + Signed-off-by: Gabriela Gutierrez + + .github/SECURITY.md | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +commit d0faa85df5a5d253a4625d45313cf5e9277e6cd2 +Author: Jia Tan +Date: 2023-03-28 22:48:24 +0800 + + CI: Tests for disabling threading on CMake builds. + + .github/workflows/ci.yml | 3 --- + build-aux/ci_build.sh | 4 ++-- + 2 files changed, 2 insertions(+), 5 deletions(-) + +commit 8be5cc3b1359d88b4b30a39067466c0ae0bfbc4d +Author: Jia Tan +Date: 2023-03-28 22:45:42 +0800 + + CI: Removes CMakeCache.txt between builds. + + 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. + + build-aux/ci_build.sh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 2cb6028fc31de082b7f927632363bb1426b61aaa +Author: Jia Tan +Date: 2023-03-28 22:32:40 +0800 + + CMake: Update liblzma-config.cmake generation. + + Now that the threading is configurable, the liblzma CMake package only + needs the threading library when using POSIX threads. + + CMakeLists.txt | 33 ++++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) + +commit 4d7fac0b07cc722825ba8d7838c558827e635611 +Author: Jia Tan +Date: 2023-03-28 22:25:33 +0800 + + CMake: Allows setting thread method. + + 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. + + CMakeLists.txt | 144 +++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 104 insertions(+), 40 deletions(-) + +commit 20cd905d898c1494dee42b78530769bb9c9f8076 +Author: Jia Tan +Date: 2023-03-24 23:05:48 +0800 + + CI: Runs CMake feature tests. + + 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. + + .github/workflows/ci.yml | 169 +++++++++++++++-------------------------------- + 1 file changed, 55 insertions(+), 114 deletions(-) + +commit 4fabdb269f1fc5624b3b94a170c4efb329d1d229 +Author: Jia Tan +Date: 2023-03-24 20:35:11 +0800 + + CI: ci_build.sh allows CMake features to be configured. + + Also included various clean ups for style and helper functions for + repeated work. + + build-aux/ci_build.sh | 233 +++++++++++++++++++++++++++++++------------------- + 1 file changed, 143 insertions(+), 90 deletions(-) + +commit cf3d1f130e50cf63da4bb1031771605f6f443b6a +Author: Jia Tan +Date: 2023-03-24 20:06:33 +0800 + + CI: Change ci_build.sh to use bash instead of sh. + + 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. + + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ddfe164368e779c40d061aa4ccc376129e92f8e1 +Author: Jia Tan +Date: 2023-03-24 20:05:59 +0800 + + CMake: Only build xzdec if decoders are enabled. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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: 2023-03-23 15:14:29 +0200 + + CMake: Bump maximum policy version to 3.26. + + 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. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 + + CMake: Allow configuring features as cache variables. + + 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. + + CMakeLists.txt | 528 ++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 391 insertions(+), 137 deletions(-) + +commit 8be136f667aaeb8f9e16fbd57a83cb282f0c27ff +Author: Lasse Collin +Date: 2023-03-21 14:07:51 +0200 + + Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69. + + 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. + + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +commit 53cc475f2652d9e390ca002018dfd0af0626ef80 +Author: Lasse Collin +Date: 2023-03-21 14:04:37 +0200 + + Build: configure.ac: Use AS_IF and AS_CASE where required. + + 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. + + configure.ac | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +commit 3b8890a40233b6c783bb101ec14405e786871775 +Author: Lasse Collin +Date: 2023-03-21 13:12:03 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 5a5bd7f871818029d5ccbe189f087f591258c294 +Author: Lasse Collin +Date: 2023-03-21 13:11:49 +0200 + + 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. + + Thanks to Frank Busse for reporting the bug. + Fixes: https://github.com/tukaani-project/xz/issues/45 + + configure.ac | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit dfe1710784c0a3c3a90c17b80c9e1fe19b5fce06 +Author: Lasse Collin +Date: 2023-03-19 22:45:59 +0200 + + liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h. + + Thanks to Christian Hesse for reporting the issue. + Fixes: https://github.com/tukaani-project/xz/issues/44 + + src/liblzma/common/memcmplen.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit f0c580c5fc38bf49a184b48d76c1d8c057d499ce +Author: Jia Tan +Date: 2023-03-18 22:10:57 +0800 + + Add NEWS for 5.4.2. + + NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 48 insertions(+) + +commit af4925e6043113ec9b5f9c0cf13abf2a18ccb1f6 +Author: Jia Tan +Date: 2023-03-18 22:10:12 +0800 + + Add NEWS for 5.2.11. + + NEWS | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +commit 5a7b930efa7f9849d8da8397e8e5d8638f92be40 +Author: Lasse Collin +Date: 2023-03-18 16:00:54 +0200 + + Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3. + + COPYING.GPLv3 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit b473a92891f7e991398a3b5eff305f6f2b6d7293 +Author: Lasse Collin +Date: 2023-03-18 15:51:57 +0200 + + Change a few HTTP URLs to HTTPS. + + The xz man page timestamp was intentionally left unchanged. + + 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 8b2f6001b4f412c259a7883427f2f2c8cea98ea8 +Author: Jia Tan +Date: 2023-03-18 00:40:28 +0800 + + CMake: Fix typo in a comment. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 76e2315e14c399c15cc90e7930fd4d3d086b0227 +Author: Lasse Collin +Date: 2023-03-17 18:36:22 +0200 + + Windows: build.bash: Copy liblzma API docs to the output package. + + windows/build.bash | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 133cf55edc5ce92952d2709abd992e48ef1f45ee +Author: Lasse Collin +Date: 2023-03-17 08:53:38 +0200 + + Windows: Add microlzma_*.c to the VS project files. + + These should have been included in 5.3.2alpha already. + + 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 75c9ca450fab6982fda9286b168081c9d54126cd +Author: Lasse Collin +Date: 2023-03-17 08:43:51 +0200 + + CMake: Add microlzma_*.c to the build. + + These should have been included in 5.3.2alpha already. + + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit 0cc3313bd4e569c51e686e5aab8c40c35241d34b +Author: Lasse Collin +Date: 2023-03-17 08:41:36 +0200 + + Build: Update comments about unaligned access to mention 64-bit. + + cmake/tuklib_integer.cmake | 7 +++---- + m4/tuklib_integer.m4 | 4 ++-- + 2 files changed, 5 insertions(+), 6 deletions(-) + +commit 5e57e3301319f20c35f8111dea73fa58403b96b1 +Author: Lasse Collin +Date: 2023-03-17 00:02:30 +0200 + + Tests: Update .gitignore. + + .gitignore | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 0007394d54e21bf30abb9a5e09cbc1e8d44a73ac +Author: Lasse Collin +Date: 2023-03-14 20:04:03 +0200 + + po4a/update-po: Display the script name consistently in error messages. + + po4a/update-po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 509157c80c500426ec853bd992d684ebafc8500c +Author: Jia Tan +Date: 2023-03-17 01:30:36 +0800 + + Doc: Rename Doxygen HTML doc directory name liblzma => api. + + 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. + + .gitignore | 2 +- + Makefile.am | 18 +++++++++--------- + PACKAGERS | 4 ++-- + doxygen/Doxyfile | 2 +- + doxygen/update-doxygen | 18 +++++++++--------- + 5 files changed, 22 insertions(+), 22 deletions(-) + +commit fd90e2f4c29180b44e33c7ef726f94e4eae54ed3 +Author: Jia Tan +Date: 2023-03-16 22:07:15 +0800 + + 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/liblzma/api/lzma/bcj.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4f50763b981f9056c5f1763dfb26cfa4a26a181d +Author: Jia Tan +Date: 2023-03-16 21:44:02 +0800 + + CI: Add doxygen as a dependency. + + Autogen now requires --no-doxygen or having doxygen installed to run + without errors. + + .github/workflows/ci.yml | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit f68f4b27f62f53fdac570885a1f4f23367ce6599 +Author: Lasse Collin +Date: 2023-03-15 19:19:13 +0200 + + COPYING: Add a note about the included Doxygen-generated HTML. + + COPYING | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 8979308528c1f45cb9ee52d511f05232b4ad90a1 +Author: Jia Tan +Date: 2023-03-16 21:41:09 +0800 + + Doc: Update PACKAGERS with details about liblzma API docs install. + + PACKAGERS | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +commit 55ba6e93004842ae0a0792214a23504267ad8f43 +Author: Jia Tan +Date: 2023-03-16 21:38:32 +0800 + + 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/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 16f21255597f6a57e5692780f962cdc090f62b8c +Author: Jia Tan +Date: 2023-03-16 21:37:32 +0800 + + 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. + + autogen.sh | 35 +++++++++++++++++++++++++++++------ + 1 file changed, 29 insertions(+), 6 deletions(-) + +commit 1321852a3be7196bd7fcfd146221a5669e46407c +Author: Jia Tan +Date: 2023-03-16 21:35:55 +0800 + + 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. + + 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. + + 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. + + Makefile.am | 1 + + doxygen/update-doxygen | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 112 insertions(+) + +commit b1216a7772952d2fe7fe9c6acfcbd98d30abbc7b +Author: Jia Tan +Date: 2023-03-16 21:34:36 +0800 + + 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. + + If the doxygen docs exist in the source tree, they will also be included + in the distribution now too. + + Makefile.am | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +commit c97d12f300b2a94c9f54a44c8931c8bc08cf0a73 +Author: Lasse Collin +Date: 2023-03-16 21:23:48 +0800 + + Doxygen: Refactor Doxyfile.in to doxygen/Doxyfile. + + 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. + + Going forward, the documentation should be generated in two different + modes: liblzma or internal. + + liblzma is useful for most users. It is the documentation for just + the liblzma API header files. This is the default. + + 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. + + .gitignore | 3 +- + Makefile.am | 1 - + configure.ac | 40 --- + Doxyfile.in => doxygen/Doxyfile | 721 +++++++++++++++++++++++++--------------- + 4 files changed, 456 insertions(+), 309 deletions(-) + +commit 1b7661faa4bbf4a54c6b75900b5059835c382a0f +Author: Jia Tan +Date: 2023-02-28 23:22:36 +0800 + + Tests: Remove unused macros and functions. + + tests/tests.h | 75 ----------------------------------------------------------- + 1 file changed, 75 deletions(-) + +commit af55191102f01e76de658c881299f0909ca0feda +Author: Jia Tan +Date: 2022-12-29 21:52:15 +0800 + + liblzma: Defines masks for return values from lzma_index_checks(). + + src/liblzma/api/lzma/index.h | 23 +++++++++++++++++++++++ + tests/test_index.c | 22 +++++++++++----------- + 2 files changed, 34 insertions(+), 11 deletions(-) + +commit 8f38cdd9ab71e2a9d5a9787550222b7578243b73 +Author: Jia Tan +Date: 2023-01-12 22:29:07 +0800 + + 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. + + tests/test_index.c | 2036 ++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 1492 insertions(+), 544 deletions(-) + +commit 717aa3651ce582807f379d8654c2516e1594df77 +Author: Lasse Collin +Date: 2023-03-11 18:42:08 +0200 + + xz: Simplify the error-label in Capsicum sandbox code. + + 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/xz/file_io.c | 27 ++++++++++++--------------- + 1 file changed, 12 insertions(+), 15 deletions(-) + +commit a0eecc235d3ba8ad3453da98b46c7bc3e644de75 +Author: Lasse Collin +Date: 2023-03-07 19:59:23 +0200 + + xz: Make Capsicum sandbox more strict with stdin and stdout. + + src/xz/file_io.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 916448d624aaf55cef0fc3e53754affb8c4f309d +Author: Jia Tan +Date: 2023-03-08 23:08:46 +0800 + + Revert: "Add warning if Capsicum sandbox system calls are unsupported." + + 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/file_io.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +commit 01587dda2a8f13fef7e12fd624e6d05da5f9624f +Author: Jia Tan +Date: 2023-03-07 20:02:22 +0800 + + xz: Fix -Wunused-label in io_sandbox_enter(). + + Thanks to Xin Li for recommending the fix. + + src/xz/file_io.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5fb936786601a1cd013a5d436adde65982b1e13c +Author: Jia Tan +Date: 2023-03-06 21:37:45 +0800 + + 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. + + src/xz/file_io.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 61ee82cb1232a402c82282bbae42821f2b952b0d +Author: Jia Tan +Date: 2023-03-06 21:27:53 +0800 + + xz: Skip Capsicum sandbox system calls when they are unsupported. + + 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. + + src/xz/file_io.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +commit f070722b57ba975a0dff36492d766f03026b1d21 +Author: Jia Tan +Date: 2023-03-06 21:08:26 +0800 + + 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/xz/file_io.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f1ab1f6b339d16a53ac53efeb97779ecd2bae70f +Author: Jia Tan +Date: 2023-02-24 23:46:23 +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. + + src/liblzma/api/lzma/lzma12.h | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 4b7fb3bf41a0ca4c97fad3799949a2aa61b13b99 +Author: Lasse Collin +Date: 2023-02-27 18:38:35 +0200 + + CMake: Require that the C compiler supports C99 or a newer standard. + + Thanks to autoantwort for reporting the issue and suggesting + a different patch: + https://github.com/tukaani-project/xz/pull/42 + + CMakeLists.txt | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 9aa7fdeb04c486d2700967090956af88fdccab7e +Author: Jia Tan +Date: 2023-02-24 18:10:37 +0800 + + 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. + + tests/test_vli.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 3cf72c4bcba5370f07477c9b9b62ae33069ef9a9 +Author: Jia Tan +Date: 2023-02-06 21:46:43 +0800 + + liblzma: Replace '\n' -> newline in filter.h documentation. + + The '\n' renders as a newline when the comments are converted to html + by Doxygen. + + src/liblzma/api/lzma/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 002006be62d77c706565fa6ec828bea64be302da +Author: Jia Tan +Date: 2023-02-06 21:45:37 +0800 + + liblzma: Shorten return description for two functions in filter.h. + + Shorten the description for lzma_raw_encoder_memusage() and + lzma_raw_decoder_memusage(). + + src/liblzma/api/lzma/filter.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit 463d9359b8595f01d44ada1739d75aeb87f36524 +Author: Jia Tan +Date: 2023-02-06 21:44:45 +0800 + + liblzma: Reword a few lines in filter.h + + src/liblzma/api/lzma/filter.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 01441df92c0fd6a6c02fe5ac27982a54ce887cc0 +Author: Jia Tan +Date: 2023-02-06 21:35:06 +0800 + + 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. + + 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/liblzma/api/lzma/filter.h | 226 ++++++++++++++++++++++++++---------------- + 1 file changed, 143 insertions(+), 83 deletions(-) + +commit 805b45cd60bfd5da3d3d89077de3789df179b324 +Author: Lasse Collin +Date: 2023-02-23 20:46:16 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 30e95bb44c36ae26b2ab12a94343b215fec285e7 +Author: Lasse Collin +Date: 2023-02-21 22:57:10 +0200 + + liblzma: Avoid null pointer + 0 (undefined behavior in C). + + 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): + + void bar(char *a, char *b); + + 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/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 fa9065fac54194fe0407fc7f0cc9633fdce13c21 +Author: Jia Tan +Date: 2023-02-07 00:00:44 +0800 + + liblzma: Adjust container.h for consistency with filter.h. + + src/liblzma/api/lzma/container.h | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) + +commit 00a721b63d82dfb658dca8d8cb599d8a245c663f +Author: Jia Tan +Date: 2023-02-07 00:00:09 +0800 + + liblzma: Fix small typos and reword a few things in filter.h. + + src/liblzma/api/lzma/container.h | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +commit 5b1c171d4ffe89ef18fa31509bb0185d6fd11d39 +Author: Jia Tan +Date: 2023-02-06 23:42:08 +0800 + + liblzma: Convert list of flags in lzma_mt to bulleted list. + + src/liblzma/api/lzma/container.h | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit dbd47622eb99fefb3538a22baec3def002aa56f5 +Author: Jia Tan +Date: 2023-01-26 23:17:41 +0800 + + liblzma: Fix typo in documentation in container.h + + lzma_microlzma_decoder -> lzma_microlzma_encoder + + src/liblzma/api/lzma/container.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 14cd30806d69e55906073745bcce3ee50e0ec942 +Author: Jia Tan +Date: 2023-01-26 23:16:34 +0800 + + liblzma: Improve documentation for container.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. + + src/liblzma/api/lzma/container.h | 146 +++++++++++++++++++++++++-------------- + 1 file changed, 93 insertions(+), 53 deletions(-) + +commit c9c8bfae3502842dcead85eeb2b951b437c2cd88 +Author: Jia Tan +Date: 2023-02-22 20:59:41 +0800 + + CMake: Add LZIP decoder test to list of tests. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit b9f171dd00a3cc32b6d41ea8e082cf545640ec2a +Author: Lasse Collin +Date: 2023-02-17 20:56:49 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 2ee86d20e49985b903b78ebcfa3fa672e73e93aa +Author: Lasse Collin +Date: 2023-02-17 20:48:28 +0200 + + 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 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 + + configure.ac | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit d831072cceca458d94d2d5da201862f6d43a417b +Author: Lasse Collin +Date: 2023-02-16 21:09:00 +0200 + + 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/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 f029daea39c215fd7d5cb6b6798818b055cf5b22 +Author: Jia Tan +Date: 2023-02-17 00:54:33 +0800 + + liblzma: Adjust spacing in doc headers in bcj.h. + + src/liblzma/api/lzma/bcj.h | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit a5de68bac2bb7e1b9119e6cea7d761a22ea73e9c +Author: Jia Tan +Date: 2023-02-17 00:44:44 +0800 + + liblzma: Adjust documentation in bcj.h for consistent style. + + src/liblzma/api/lzma/bcj.h | 43 ++++++++++++++++++++++--------------------- + 1 file changed, 22 insertions(+), 21 deletions(-) + +commit efa498c13b883810497e0ea8a169efd6f48f5026 +Author: Jia Tan +Date: 2023-02-17 00:36:05 +0800 + + liblzma: Rename field => member in documentation. + + Also adjusted preset value => preset level. + + 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 718b22a6c5e3ee5de123323ea798872381f9320e +Author: Lasse Collin +Date: 2023-02-16 17:59:50 +0200 + + liblzma: Silence a warning from MSVC. + + 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 Nathan Moinvaziri for reporting this. + + src/liblzma/check/crc64_fast.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 87c53553fa7d50f777b4edfa99f2083628f590fe +Author: Jia Tan +Date: 2023-02-16 21:04:54 +0800 + + 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. + + A few small things were reworded and long sentences broken up. + + src/liblzma/api/lzma/stream_flags.h | 76 ++++++++++++++++++++++--------------- + 1 file changed, 46 insertions(+), 30 deletions(-) + +commit 13d99e75a543e9e5f8633cc241eae55b91a3b242 +Author: Jia Tan +Date: 2023-02-14 21:50:16 +0800 + + liblzma: Improve documentation in lzma12.h. + + All functions now explicitly specify parameter and return values. + + src/liblzma/api/lzma/lzma12.h | 32 +++++++++++++++++++++++--------- + 1 file changed, 23 insertions(+), 9 deletions(-) + +commit 43ec344c868f930e96879eb9e49212cce92a9884 +Author: Jia Tan +Date: 2023-01-27 22:44:06 +0800 + + liblzma: Improve documentation in check.h. + + 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 + + All functions now explicitly specify parameter and return values. + + src/liblzma/api/lzma/index.h | 177 ++++++++++++++++++++++++++++++------------- + 1 file changed, 126 insertions(+), 51 deletions(-) + +commit 421f2f2e160720f6009e3b6a125cafe2feaa9419 +Author: Jia Tan +Date: 2023-02-08 20:35:32 +0800 + + liblzma: Reword a comment in index.h. + + src/liblzma/api/lzma/index.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b67539484981351d501b68de5e925425e50c59b1 +Author: Jia Tan +Date: 2023-02-08 20:30:23 +0800 + + 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/liblzma/api/lzma/index.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 0c9e4fc2ad6d88d54f299240fcc5a2ce7d695d96 +Author: Jia Tan +Date: 2023-01-21 21:32:03 +0800 + + liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR. + + LZMA_MEMLIMIT_ERROR was missing the "<" character needed to put + documentation after a member. + + src/liblzma/api/lzma/base.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 816fec125aa74bcef46512c73acc6d9e5a700d15 +Author: Jia Tan +Date: 2023-01-21 00:29:38 +0800 + + liblzma: Improve documentation for base.h. + + 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(-) + +commit 862dacef1a4e7e1b28d465956fa4244ed01df154 +Author: Jia Tan +Date: 2023-02-14 00:12:34 +0800 + + liblzma: Add one more missing [out] annotation in vli.h + + src/liblzma/api/lzma/vli.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 867b08ae4254bf55dd1f7fd502cc618231b92f75 +Author: Jia Tan +Date: 2023-02-14 00:08:33 +0800 + + 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. + + src/liblzma/api/lzma/vli.h | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +commit 90d0e628ff11e5030bcc4fc000bca056adda6603 +Author: Jia Tan +Date: 2023-02-10 21:38:02 +0800 + + 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 + + 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. + + src/liblzma/api/lzma/index_hash.h | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) + +commit 1dbe12b90cff79bb51923733ac0840747b4b4131 +Author: Lasse Collin +Date: 2023-02-07 19:07:45 +0200 + + 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. + + src/xz/mytime.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +commit 7673ef5aa80c1af7fb693360dd82f527b46c2c56 +Author: Jia Tan +Date: 2023-02-04 21:06:35 +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). + + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit b8bce89be7fb5bffe5fef4a2782ca9b2b107eaac +Author: Jia Tan +Date: 2023-02-04 12:01:23 +0800 + + xz: Add a comment clarifying the use of start_time in mytime.c. + + src/xz/mytime.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 912af91b10a18fb9bb3167247ecaaefca8248ee9 +Author: Jia Tan +Date: 2023-01-26 09:50:21 +0800 + + liblzma: Improve documentation for version.h. + + Specified parameter and return values for API functions and documented + a few more of the macros. + + src/liblzma/api/lzma/version.h | 29 ++++++++++++++++++++++------- + 1 file changed, 22 insertions(+), 7 deletions(-) + +commit 850adec171203cd22b57d016084d713f72ae5307 +Author: Jia Tan +Date: 2023-02-03 22:52:55 +0800 + + Docs: Omit SIGTSTP not handled from TODO. + + TODO | 4 ---- + 1 file changed, 4 deletions(-) + +commit 2c78a83c6faec70154d9eb78022a618ed62cdcb3 +Author: Jia Tan +Date: 2023-02-03 00:33:32 +0800 + + liblzma: Fix bug in lzma_str_from_filters() not checking filters[] length. + + 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/liblzma/common/string_conversion.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit e01f01b9af1c074463b92694a16ecc16a31907c0 +Author: Jia Tan +Date: 2023-02-03 00:32:47 +0800 + + Tests: Create test_filter_str.c. + + Tests lzma_str_to_filters(), lzma_str_from_filters(), and + lzma_str_list_filters() API functions. + + CMakeLists.txt | 1 + + tests/Makefile.am | 2 + + tests/test_filter_str.c | 593 ++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 596 insertions(+) + +commit 8dfc029e7a4ce45809c30313dc0e502f0d22be26 +Author: Jia Tan +Date: 2023-01-22 08:49:00 +0800 + + liblzma: Fix typos in comments in string_conversion.c. + + src/liblzma/common/string_conversion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 54ad83c1ae2180dcc0cb2445b181dc1e9732a5d6 +Author: Jia Tan +Date: 2023-02-03 00:20:20 +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. + + src/liblzma/api/lzma/block.h | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +commit f680e771b3eb2a46310fe85b3e000ac3a1a0640f +Author: Jia Tan +Date: 2023-02-03 00:12:24 +0800 + + Update lzma_block documentation for lzma_block_uncomp_encode(). + + src/liblzma/api/lzma/block.h | 3 +++ + 1 file changed, 3 insertions(+) + +commit 504cf4af895fd45aad0c56eb3b49d90acd54465b +Author: Jia Tan +Date: 2023-02-03 00:11:37 +0800 + + liblzma: Minor edits to lzma_block header_size documentation. + + src/liblzma/api/lzma/block.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 115b720fb521f99aa832d06b2c12b7f8c6c50680 +Author: Jia Tan +Date: 2023-02-03 00:11:07 +0800 + + liblzma: Enumerate functions that read version in lzma_block. + + src/liblzma/api/lzma/block.h | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +commit 85ea0979adcf808a3830aefbe7a4ec884e542ea1 +Author: Jia Tan +Date: 2023-02-03 00:10:34 +0800 + + liblzma: Clarify comment in block.h. + + src/liblzma/api/lzma/block.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 1f7ab90d9ce224230a04de6b921ad6e2029023a8 +Author: Jia Tan +Date: 2023-02-03 00:07:23 +0800 + + liblzma: Improve documentation for block.h. + + 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/api/lzma/block.h | 96 ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 75 insertions(+), 21 deletions(-) + +commit c563a4bc554a96bd0b6aab3c139715b7ec8f6ca3 +Author: Jia Tan +Date: 2023-02-01 23:38:30 +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. + + src/liblzma/api/lzma/filter.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 315c64c7e18acc59a745b68148188a73e998252b +Author: Jia Tan +Date: 2023-02-01 21:43:33 +0800 + + CI: Update .gitignore for artifacts directory in build-aux. + + 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. + + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 2c1341f4fa06e7f487d61142aa354c433e17ec7f +Author: Jia Tan +Date: 2023-02-01 21:36:46 +0800 + + CI: Add quotes around variables in a few places. + + build-aux/ci_build.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 3a401b0e0c7a2658af7801dd0690256ef24149e0 +Author: Jia Tan +Date: 2023-02-01 21:36:22 +0800 + + CI: Upload test logs as artifacts if a test fails. + + .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++-------------- + build-aux/ci_build.sh | 31 ++++++++++++++++++++----- + 2 files changed, 68 insertions(+), 23 deletions(-) + +commit 610dde15a88f12cc540424eb3eb3ed61f3876f74 +Author: Lasse Collin +Date: 2023-01-27 20:02:49 +0200 + + xz: Use clock_gettime() even if CLOCK_MONOTONIC isn't available. + + mythread.h and thus liblzma already does it. + + src/xz/mytime.c | 11 ++++++++--- + src/xz/private.h | 3 +-- + 2 files changed, 9 insertions(+), 5 deletions(-) + +commit 2e02877288f6576cd4595e9ac7684f867cd47d68 +Author: Lasse Collin +Date: 2023-01-27 19:41:19 +0200 + + po4a/po4a.conf: Sort the language identifiers in alphabetical order. + + po4a/po4a.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ff592c616eda274215b485cf1b8d34f060c9f3be +Author: Lasse Collin +Date: 2023-01-26 18:29:17 +0200 + + 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 + + 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 3b1c8ac8d1d553cbb1fb22b545d2b1424c752b76 +Author: Jia Tan +Date: 2023-01-27 20:14:51 +0800 + + Translations: Add Brazilian Portuguese translation of man pages. + + Thanks to Rafael Fontenelle. + + po4a/po4a.conf | 2 +- + po4a/pt_BR.po | 3677 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 3678 insertions(+), 1 deletion(-) + +commit a15a7552f9f67c4e402f5d2967324e0ccfd6fccc +Author: Lasse Collin +Date: 2023-01-26 17:51:06 +0200 + + Build: Avoid different quoting style in --enable-doxygen doc. + + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit af5a4bd5afc089d9697756dded38feafaa987ae4 +Author: Lasse Collin +Date: 2023-01-26 17:39:46 +0200 + + tuklib_physmem: Check for __has_warning before GCC version. + + Clang can be configured to fake a too high GCC version so + this way it's more robust. + + src/common/tuklib_physmem.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f35d98e20609e0be6a04ae2604bfb7cb9d5bd5e4 +Author: Jia Tan +Date: 2023-01-24 20:48:50 +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. + + src/liblzma/api/lzma/filter.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2f78ecc5939b3d97ddfc2a6bd31b50108a28d0a2 +Author: Lasse Collin +Date: 2023-01-23 23:44:58 +0200 + + 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. + + src/common/tuklib_common.h | 7 ------- + 1 file changed, 7 deletions(-) + +commit 8366cf8738e8b7bb74c967d07bf0fd2a1878e575 +Author: Lasse Collin +Date: 2023-01-23 23:38:34 +0200 + + 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. + + 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_physmem.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +commit 683a3c7e2fcd922200c31078e5c9dd1348e90941 +Author: Lasse Collin +Date: 2023-01-24 00:05:38 +0200 + + 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. + + src/xz/args.c | 6 +++--- + src/xz/suffix.c | 2 +- + src/xz/suffix.h | 1 + + 3 files changed, 5 insertions(+), 4 deletions(-) + +commit cc5aa9ab138beeecaee5a1e81197591893ee9ca0 +Author: Jia Tan +Date: 2023-01-07 21:55:06 +0800 + + xz: Refactor duplicated check for custom suffix when using --format=raw + + src/xz/args.c | 8 ++++++++ + src/xz/suffix.c | 26 ++++++++------------------ + src/xz/suffix.h | 7 +++++++ + 3 files changed, 23 insertions(+), 18 deletions(-) + +commit 9663141274e01592a281a7f2df5d7a31a1dac8bf +Author: Jia Tan +Date: 2023-01-20 21:53:14 +0800 + + liblzma: Set documentation on all reserved fields to private. + + This prevents the reserved fields from being part of the generated + Doxygen documentation. + + 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 6327a045f34d48fc5afc58ba0d32a82c94403049 +Author: Jia Tan +Date: 2022-12-20 21:39:59 +0800 + + Doxygen: Update Doxyfile.in from 1.4.7 to 1.8.17. + + 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. + + Doxyfile.in | 2523 ++++++++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 1893 insertions(+), 630 deletions(-) + +commit bbf71b69ebf9d0d62a0af150a5c37d193b8159ad +Author: Jia Tan +Date: 2023-01-03 20:37:30 +0800 + + 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. + + Doxyfile.in | 18 +++++++++--------- + configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 48 insertions(+), 9 deletions(-) + +commit 6fcf4671b6047113c583a0919fc850987a4ec5f4 +Author: Jia Tan +Date: 2022-12-21 23:59:43 +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. + + 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 b43ff180fb2e372adce876bfa155fc9bcf0c3db4 +Author: Jia Tan +Date: 2023-01-19 20:35:09 +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. + + src/common/tuklib_physmem.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 82e3c968bfa10e3ff13333bd9cbbadb5988d6766 +Author: Jia Tan +Date: 2023-01-19 20:32:40 +0800 + + 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. + + src/common/tuklib_common.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit b2ba1a489df451cdcd93b2334e319dd06778de19 +Author: Jia Tan +Date: 2023-01-18 22:11:05 +0800 + + CI: Reorder 32-bit build first for Linux autotool builds. + + 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. + + .github/workflows/ci.yml | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +commit dd1c1135741057c91e8d018be9ec4d43968b0e64 +Author: Jia Tan +Date: 2023-01-18 21:51:43 +0800 + + 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. + + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d3e11477053764c003eec2daa5198c747d70ff69 +Author: Jia Tan +Date: 2023-01-16 21:35:45 +0800 + + xz: Add missing comment for coder_set_compression_settings() + + src/xz/coder.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 123255b6ed15f4428b2aa92e4962015a5362f6bf +Author: Jia Tan +Date: 2023-01-16 20:55:10 +0800 + + 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/args.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 571919c47b9ff5171ede84378620ed0a9aeb98c0 +Author: Jia Tan +Date: 2023-01-13 20:37:06 +0800 + + Translations: Update the Brazilian Portuguese translation. + + po/pt_BR.po | 603 ++++++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 344 insertions(+), 259 deletions(-) + +commit 81cb02e2c22bbc036cdfaa2d2c4176f6bd60d3cf +Author: Jia Tan +Date: 2023-01-12 23:43:06 +0800 + + 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. + + .github/workflows/ci.yml | 56 ++++++++++++++++++++++++------------------------ + 1 file changed, 28 insertions(+), 28 deletions(-) + +commit 58a052198a7bcaf6e958f87fad72e69e19a2579b +Author: Jia Tan +Date: 2023-01-12 23:39:19 +0800 + + 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. + + .github/workflows/ci.yml | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 4110a998b83459fe2bc9bc1bec30ad68afa8f797 +Author: Jia Tan +Date: 2023-01-12 23:09:03 +0800 + + CI: Allow disabling Native Language Support. + + build-aux/ci_build.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 0dec634e705b5bf89a37c5d62d71e8511d480058 +Author: Jia Tan +Date: 2023-01-12 23:02:20 +0800 + + CI: Only run autogen.sh if it has not already run. + + build-aux/ci_build.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +commit 32287dc8def94df4546e903495d14c132bd54cc4 +Author: Jia Tan +Date: 2023-01-12 22:58:36 +0800 + + CI: Allow disabling shared library in autotools builds. + + build-aux/ci_build.sh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 77d1ebcc99ddd82a300d1838f608150221931dcd +Author: Jia Tan +Date: 2023-01-12 22:44:18 +0800 + + CI: Improve Usage readability and add -h option. + + build-aux/ci_build.sh | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +commit a8bb8358d10b059274f3cf993d9b8f490bafb268 +Author: Lasse Collin +Date: 2023-01-12 13:04:05 +0200 + + Build: Omit -Wmissing-noreturn from the default warnings. + + 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. + + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +commit 52dc033d0bde0d19e3912303c6c74bae559d6498 +Author: Lasse Collin +Date: 2023-01-12 06:05:58 +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. + + src/xz/file_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b1a6d180a363d57b2b1c89526ff3f0782bf863d3 +Author: Lasse Collin +Date: 2023-01-12 06:01:12 +0200 + + xz: Silence warnings from -Wsign-conversion in a 32-bit build. + + src/common/tuklib_mbstr_fw.c | 2 +- + src/xz/list.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 31c21c734b7c7d7428a3da7402a2cb7bc2587339 +Author: Lasse Collin +Date: 2023-01-12 05:38:48 +0200 + + 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. + + src/liblzma/lz/lz_encoder_mf.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit 37fbdfb7263522c11c7ad2685413d6295532581d +Author: Lasse Collin +Date: 2023-01-12 04:46:45 +0200 + + liblzma: Silence a warning from -Wsign-conversion in a 32-bit build. + + src/common/mythread.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5ce6ddc221d0bfb57d810d845bb65fb0aac0b008 +Author: Lasse Collin +Date: 2023-01-12 04:17:24 +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. + + configure.ac | 36 +++++++++++++++++++++++++++++++----- + 1 file changed, 31 insertions(+), 5 deletions(-) + +commit bfc3a0a8ac16de90049c1b1ba1445a7626d0230c +Author: Lasse Collin +Date: 2023-01-12 04:14:18 +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. + + 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 49245bb31e215ad455a1ab85e4ed6783152dc522 +Author: Lasse Collin +Date: 2023-01-12 03:51:07 +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. + + tests/test_check.c | 6 +++--- + tests/test_stream_flags.c | 10 +++++----- + 2 files changed, 8 insertions(+), 8 deletions(-) + +commit 3f13bf6b9e8624cbe6d6e3e82d6c98a3ed1ad571 +Author: Lasse Collin +Date: 2023-01-12 03:19:59 +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. + + src/liblzma/common/stream_decoder_mt.c | 8 +++++--- + src/liblzma/common/stream_encoder_mt.c | 2 +- + 2 files changed, 6 insertions(+), 4 deletions(-) + +commit 6c886cc5b3c90c6a75e6be8b1278ec2261e452a6 +Author: Lasse Collin +Date: 2023-01-12 03:11:40 +0200 + + Fix warnings from clang -Wdocumentation. + + 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 a0e7fb1c1ea658b67f30517f5d1975efd0226dba +Author: Lasse Collin +Date: 2023-01-12 03:04:28 +0200 + + Tests: test_lzip_decoder: Remove trailing white-space. + + tests/test_lzip_decoder.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c0f8d6782f29e219fd496dd23f6a033270509d5c +Author: Lasse Collin +Date: 2023-01-12 03:03:55 +0200 + + Tests: test_lzip_decoder: Silence warnings from -Wsign-conversion. + + tests/test_lzip_decoder.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +commit 62efd48a825e8f439e84c85e165d8774ddc68fd2 +Author: Jia Tan +Date: 2023-01-11 23:58:16 +0800 + + Add NEWS for 5.4.1. + + NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 70 insertions(+) + +commit d1561c47ec8cd3844a785d3741dc932f9b9c5790 +Author: Jia Tan +Date: 2023-01-11 22:46:48 +0800 + + 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/xz/message.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 8c0f115cc489331c48df77beca92fe378039d919 +Author: Jia Tan +Date: 2023-01-11 20:58:31 +0800 + + Tests: Fix test_filter_flags copy/paste error. + + tests/test_filter_flags.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 25035813d1d596fde692addc33e7f715f1fe55eb +Author: Jia Tan +Date: 2023-01-11 20:42:29 +0800 + + Tests: Fix type-limits warning in test_filter_flags. + + 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. + + tests/test_filter_flags.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +commit 0b8fa310cf56fec55663f62340e49e8e1441594f +Author: Lasse Collin +Date: 2023-01-10 22:14:03 +0200 + + liblzma: CLMUL CRC64: Work around a bug in MSVC, second attempt. + + 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. + + src/liblzma/check/crc64_fast.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +commit 765354b50c2886fc0d294d6be3b207f7ae2ada70 +Author: Jia Tan +Date: 2023-01-11 01:18:50 +0800 + + 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. + + tests/test_block_header.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 7c23c05befdcc73231c0d6632a7d943dbeaea1aa +Author: Jia Tan +Date: 2023-01-11 01:08:03 +0800 + + 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. + + tests/test_index_hash.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 57464bb4ebd6c00dc8b19803f05ea55ddd0826f6 +Author: Jia Tan +Date: 2023-01-11 00:54:45 +0800 + + CI/CD: Add 32-bit build and test steps to Ubuntu autotools runner. + + If all goes well, Mac autotools and Linux and Mac CMake will be added + later for 32-bit builds. + + .github/workflows/ci.yml | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 923eb689a4b863b6cca8df6360d4962aae994edf +Author: Jia Tan +Date: 2023-01-11 00:51:01 +0800 + + CI/CD: Enables warnings as errors in autotool build. + + This will help us catch warnings and potential bugs in builds that are + not often tested by us. + + build-aux/ci_build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit feae5528a30c006b6e2f96a95116e20b983703fc +Author: Jia Tan +Date: 2023-01-11 00:48:35 +0800 + + CI/CD: Add -f argument to set CFLAGS in ci_build.sh. + + For now, the suggested option is for -m32 only, but this can be updated + later if other flags are deemed useful. + + build-aux/ci_build.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit cfabb62a4874c146e7d6f30445637602545bc054 +Author: Lasse Collin +Date: 2023-01-10 12:47:16 +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. + + src/liblzma/check/crc64_fast.c | 6 ------ + 1 file changed, 6 deletions(-) + +commit 0b64215170dd3562f207ef26f794755bcd600526 +Author: Lasse Collin +Date: 2023-01-10 11:56:11 +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. + + src/common/sysdefs.h | 6 ------ + 1 file changed, 6 deletions(-) + +commit ec2fc39fe4f4e6e242b3a669585049763968cdeb +Author: Lasse Collin +Date: 2023-01-10 11:23:41 +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. + + src/xz/suffix.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 7049c4a76c805ad27d6cf4ee119a2ef2a7add59f +Author: Lasse Collin +Date: 2023-01-10 10:05:13 +0200 + + sysdefs.h: Fix a comment. + + src/common/sysdefs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 194a5fab69277d9e804a6113b5f676b8666b3a61 +Author: Lasse Collin +Date: 2023-01-10 10:04:06 +0200 + + 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. + + src/common/sysdefs.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit 5e34774c31d1b7509b5cb77a3be9973adec59ea0 +Author: Lasse Collin +Date: 2023-01-10 08:29:32 +0200 + + CMake: Fix appending to CMAKE_RC_FLAGS. + + It's a string, not a list. It only worked when the variable was empty. + + Thanks to Iouri Kharon. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6e652ceb18c615c578c869db300fa0756788b4e0 +Author: Lasse Collin +Date: 2023-01-10 00:33:14 +0200 + + Windows: Update INSTALL-MSVC.txt to recommend CMake over project files. + + windows/INSTALL-MSVC.txt | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +commit 6b117d3b1fe91eb26d533ab16a2e552f84148d47 +Author: Lasse Collin +Date: 2023-01-09 23:41:25 +0200 + + CMake: Fix windres issues again. + + 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. + + CMakeLists.txt | 35 +++++++++++++++++++++++------------ + 1 file changed, 23 insertions(+), 12 deletions(-) + +commit 0c210ca7f489e971e94e1ddc72b0b0806e3c7935 +Author: Lasse Collin +Date: 2023-01-06 22:53:38 +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. + + - Various tweaks to comments such as filter id -> Filter ID + + tests/test_filter_flags.c | 153 +++++++++++++++++++++++----------------------- + 1 file changed, 78 insertions(+), 75 deletions(-) + +commit 5c9fdd3bf53a9655f5eb2807d662b3af0d5e1865 +Author: Jia Tan +Date: 2022-12-29 23:33:33 +0800 + + Tests: Refactors existing filter flags tests. + + Converts the existing filter flags tests into tuktests. + + tests/test_filter_flags.c | 655 ++++++++++++++++++++++++++++++++-------------- + 1 file changed, 457 insertions(+), 198 deletions(-) + +commit 36edc65ab4cf10a131f239acbd423b4510ba52d5 +Author: Lasse Collin +Date: 2023-01-09 12:22:05 +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. + + Thanks to Iouri Kharon for the bug report and the patch. + + src/liblzma/check/crc64_fast.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 790a12a95a78ff82d8c6d4efe3b789851ca9470d +Author: Lasse Collin +Date: 2023-01-09 11:27:24 +0200 + + CMake: Fix a copypaste error in xzdec Windows resource file handling. + + It was my mistake. Thanks to Iouri Kharon for the bug report. + + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 0e1545fea39c0514c7b7032a0a3592a9a33d2848 +Author: Lasse Collin +Date: 2023-01-08 00:32:29 +0200 + + 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. + + tests/tuktest.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 69d5d78c6904668eb09a131da86276beec3281f8 +Author: Lasse Collin +Date: 2023-01-08 00:24:23 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit dd38655f80c113c9db73b9ed370dc900e1c4dc41 +Author: Lasse Collin +Date: 2023-01-07 21:57:11 +0200 + + 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. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a890a637bee9193d5b690aefa9a59eba5b8532ae +Author: Lasse Collin +Date: 2023-01-07 19:50:35 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 6e38e595dd56ac1800478cef1f6f754d0eba0d2e +Author: Lasse Collin +Date: 2023-01-07 19:50:03 +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. + + Thanks to Iouri Kharon for the bug report and the original patch. + + CMakeLists.txt | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 443dfebced041adc88f10d824188eeef5b5821a9 +Author: Lasse Collin +Date: 2023-01-07 19:48:52 +0200 + + CMake/Windows: Add a workaround for windres from GNU binutils. + + Thanks to Iouri Kharon for the bug report and the original patch. + + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +commit ceb805011747d04a915f3f39e4bed9eed151c634 +Author: Lasse Collin +Date: 2023-01-07 19:31:15 +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. + + CMakeLists.txt | 3 ++- + configure.ac | 8 ++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +commit 8d372bd94066b1a5b0570b2550f83c2868486adf +Author: Jia Tan +Date: 2023-01-07 21:05:15 +0800 + + 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. + + .github/workflows/ci.yml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 747c7f2b34bd498f6702c6875500a26b06201772 +Author: Jia Tan +Date: 2023-01-07 11:16:55 +0800 + + 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. + + .github/workflows/ci.yml | 95 ++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 83 insertions(+), 12 deletions(-) + +commit 4de35fd6b58d46fc887c78faf163f6a37b790c45 +Author: Jia Tan +Date: 2023-01-07 10:07:20 +0800 + + CI/CD: Add new -p (PHASE) argument to ci_build.sh + + 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. + + build-aux/ci_build.sh | 140 +++++++++++++++++++++++++++----------------------- + 1 file changed, 76 insertions(+), 64 deletions(-) + +commit 6fd39664de47801e670a16617863196bfbde4755 +Merge: 78e0561d fc0c7884 +Author: Jia Tan +Date: 2023-01-07 00:10:50 +0800 + + Merge pull request #7 from tukaani-project/tuktest_index_hash + + Tuktest index hash + +commit fc0c788469159f634f09ff23c8cef6925c91da57 +Author: Lasse Collin +Date: 2023-01-06 17:58:48 +0200 + + Tests: test_index_hash: Add an assert_uint_eq(). + + tests/test_index_hash.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit d550304f5343b3a082da265107cd820e0d81dc71 +Author: Lasse Collin +Date: 2023-01-06 17:55:06 +0200 + + Tests: test_index_hash: Fix a memory leak. + + tests/test_index_hash.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 02608f74ea1f2d2d56585711ff241c34b4ad0937 +Author: Lasse Collin +Date: 2023-01-06 17:53:03 +0200 + + Tests: test_index_hash: Don't treat pointers as booleans. + + tests/test_index_hash.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 056766c8601a3808bea1761f6cc833197a35a3e0 +Author: Lasse Collin +Date: 2023-01-06 17:51:41 +0200 + + Tests: test_index_hash: Fix a typo in a comment. + + tests/test_index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 873e684028ba9738f071c5236db7d452ed797b4c +Author: Lasse Collin +Date: 2023-01-06 17:44:29 +0200 + + Tests: test_index_hash: Avoid the variable name "index". + + It can trigger warnings from -Wshadow on some systems. + + tests/test_index_hash.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit d1f24c35874eeba8432d75aa77b06c50375ed937 +Author: Lasse Collin +Date: 2023-01-06 17:35:50 +0200 + + Tests: test_index_hash: Use the word "Record" instead of "entry". + + tests/test_index_hash.c | 102 ++++++++++++++++++++++++------------------------ + 1 file changed, 51 insertions(+), 51 deletions(-) + +commit b93f7c5cbb02b42024ac866fc0af541de3d816e2 +Author: Lasse Collin +Date: 2023-01-06 17:35:05 +0200 + + Tests: test_index_hash: Tweak comments and style. + + The words defined in the .xz file format specification + begin with capital letter to emphasize that they have + a specific meaning. + + tests/test_index_hash.c | 62 ++++++++++++++++++++++++++----------------------- + 1 file changed, 33 insertions(+), 29 deletions(-) + +commit c48b24fc06d98569adb72f13c2e8e5ff30bb8036 +Author: Lasse Collin +Date: 2023-01-06 17:17:37 +0200 + + Tests: test_index_hash: Use INDEX_INDICATOR constant instead of 0. + + tests/test_index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 78e0561dfebaa9d5e34558de537efcda890e0629 +Author: Jia Tan +Date: 2023-01-06 20:43:31 +0800 + + Style: Change #if !defined() to #ifndef in mythread.h. + + src/common/mythread.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e834e1e934ed0af673598d8c0c34afb2af56bee0 +Author: Jia Tan +Date: 2023-01-06 20:35:55 +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. + + 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 84f9687cbae972c2c342e10bf69f8ec8f70ae111 +Author: Jia Tan +Date: 2023-01-05 20:57:25 +0800 + + 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. Also, + this prevents include order problems because common.h will redefine + LZMA_API resulting in a warning. + + 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 7657ce1c3c4abff7560336a7b687d98e0e2bd14f +Author: Lasse Collin +Date: 2023-01-04 22:40:54 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit aafd67fba045ab99683971263a5a26fb2a6e8ce2 +Author: Lasse Collin +Date: 2023-01-04 18:40:28 +0200 + + Tests: Adjust style in test_compress.sh. + + tests/test_compress.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +commit 52380678f42364daa4510f92f6d3b18ec98c3638 +Author: Jia Tan +Date: 2023-01-04 23:58:58 +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. + + 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 d0eb345bb7d148a62883ee299adec2b74a0f6f3b +Author: Jia Tan +Date: 2023-01-03 21:02:38 +0800 + + Translations: Add Korean translation of man pages. + + Thanks to Seong-ho Cho + + po4a/ko.po | 5552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + po4a/po4a.conf | 2 +- + 2 files changed, 5553 insertions(+), 1 deletion(-) + +commit c4145978d95ebf1690c778d354e15f7c2823d7a8 +Author: Jia Tan +Date: 2023-01-03 20:47:27 +0800 + + Translations: Update the Esperanto translation. + + po/eo.po | 620 ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 332 insertions(+), 288 deletions(-) + +commit 4103a2e78ac60b00c888485cd967a5fe5d1b917c +Author: Lasse Collin +Date: 2023-01-02 17:20:47 +0200 + + Bump version and soname for 5.5.0alpha. + + 5.5.0alpha won't be released, it's just to mark that + the branch is not for stable 5.4.x. + + 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/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 73c9e6d6b970ccc3d5ad61dcaa21cba050e5df0a +Author: Lasse Collin +Date: 2023-01-02 17:05:07 +0200 + + Build: Fix config.h comments. + + configure.ac | 2 +- + m4/tuklib_progname.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit bb740e3b117f1a3c65152d01e5755523a908ecb1 +Author: Jia Tan +Date: 2023-01-02 22:33:48 +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. + + 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 064cd385a716abc78d93a3612411a82d69ceb221 +Author: Jia Tan +Date: 2022-12-29 00:30:52 +0800 + + Adds test_index_hash to .gitignore. + + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 3959162baec074511d83ba0fec1284c3ed724799 +Author: Jia Tan +Date: 2022-12-29 00:25:18 +0800 + + Tests: Creates test_index_hash.c + + Tests all API functions exported from index_hash.h. Does not have a + dedicated test for lzma_index_hash_end. + + CMakeLists.txt | 2 + + tests/Makefile.am | 3 + + tests/test_index_hash.c | 379 ++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 384 insertions(+) + +commit f16e12d5e755d371247202fcccbcccd1ec16b2cf +Author: Jia Tan +Date: 2022-08-17 20:20:16 +0800 + + liblzma: Add NULL check to lzma_index_hash_append. + + This is for consistency with lzma_index_append. + + src/liblzma/common/index_hash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 203b008eb220208981902e0db541c02d1c1c9f5e +Author: Jia Tan +Date: 2022-08-17 17:59:51 +0800 + + liblzma: Replaced hardcoded 0x0 index indicator byte with macro + + 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 dfecda875211f737d0db92dc1d3c58a3a2afb0c0 +Author: Lasse Collin +Date: 2022-12-30 20:10:08 +0200 + + Tests: test_check: Test corner cases of CLMUL CRC64. + + tests/test_check.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +commit ce96bb20435212fe797d6d84738fb9fd4ea13cc7 +Author: Lasse Collin +Date: 2022-12-30 19:36:49 +0200 + + Tests: Clarify a comment in test_lzip_decoder.c. + + tests/test_lzip_decoder.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 2fcba17fc4d7eda8fc60567169cf2a0e6fcfb2f8 +Author: Jia Tan +Date: 2022-12-29 01:55:19 +0800 + + xz: Includes and conditionally in mytime.c. + + Previously, mytime.c depended on mythread.h for to be included. + + src/xz/mytime.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit f82294c8318a7a0990583d51ac5c7de682ad36ef +Author: Jia Tan +Date: 2022-12-29 01:15:27 +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. + + src/common/mythread.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 74dae7d30091e906d6a92a57952dea4354473f9b +Author: Jia Tan +Date: 2022-12-29 01:10:53 +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. + + CMakeLists.txt | 8 +++----- + configure.ac | 5 ++++- + src/common/mythread.h | 4 ++-- + src/xz/mytime.c | 5 ++--- + 4 files changed, 11 insertions(+), 11 deletions(-) + +commit 7339e39dc060df6eda74a2c5b69961befc3d5d24 +Author: Jia Tan +Date: 2022-12-28 01:14:07 +0800 + + Translations: Add Ukrainian translations of man pages. + + Thanks to Yuri Chornoivan + + po4a/po4a.conf | 2 +- + po4a/uk.po | 3676 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 3677 insertions(+), 1 deletion(-) + +commit 9f05c27a58ce8cd7803079aa295e41c24665ce6e +Author: Jia Tan +Date: 2022-12-23 00:34:48 +0800 + + CI/CD: Create initial version of CI/CD workflow. + + 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. + + .github/workflows/ci.yml | 72 ++++++++++++++++++++++++ + build-aux/ci_build.sh | 141 +++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 213 insertions(+) + +commit 1275ebfba74230dbd028049141423c79c8b83b8f +Author: Jia Tan +Date: 2022-12-22 23:14:53 +0800 + + liblzma: Update documentation for lzma_filter_encoder. + + src/liblzma/common/filter_encoder.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +commit 7c9ff5f1667a16733163b75dfd4b509662c387f4 +Author: Jia Tan +Date: 2022-12-21 21:12:03 +0800 + + Tests: Adds lzip decoder tests + + .gitignore | 1 + + tests/Makefile.am | 2 + + tests/test_lzip_decoder.c | 471 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 474 insertions(+) + +commit 799ead162de63b8400733603d3abcd2e1977bdca +Author: Jia Cheong Tan +Date: 2022-12-20 22:05:21 +0800 + + Doxygen: Update .gitignore for generating docs for in source build. + + In source builds are not recommended, but we should still ignore + the generated artifacts. + + .gitignore | 2 ++ + 1 file changed, 2 insertions(+) + +commit 5f7ce42a16b1e86ca8408b5c670c25e2a12acc4e +Author: Jia Tan +Date: 2022-12-20 20:46:44 +0800 + + 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. + + src/liblzma/common/microlzma_encoder.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 8ace358d65059152d9a1f43f4770170d29d35754 +Author: Jia Tan +Date: 2022-12-16 20:58:55 +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. + + .gitignore | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +commit 8fd225a2c149f30aeac377e68eb5abf6b28300ad +Author: Lasse Collin +Date: 2022-12-16 18:30:02 +0200 + + liblzma: Update authors list in arm64.c. + + src/liblzma/simple/arm64.c | 1 + + 1 file changed, 1 insertion(+) + +commit b69da6d4bb6bb11fc0cf066920791990d2b22a06 +Author: Lasse Collin +Date: 2022-12-13 20:37:17 +0200 + + 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_generic.map | 2 +- + src/liblzma/liblzma_linux.map | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doxyfile.in b/Doxyfile.in deleted file mode 100644 index 1364ff2d89..0000000000 --- a/Doxyfile.in +++ /dev/null @@ -1,1234 +0,0 @@ -# Doxyfile 1.4.7 - -# Copyright (C) 1997-2007 by Dimitri van Heesch -# License: GNU GPLv2+ - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a 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 (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "@PACKAGE_NAME@" - -# 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 = "@PACKAGE_VERSION@" - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# 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 -# 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 cause performance problems for the file system. - -CREATE_SUBDIRS = 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. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) 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. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) 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. - -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" "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. - -ALWAYS_DETAILED_SEC = YES - -# 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. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then 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. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then 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. - -STRIP_FROM_PATH = @top_srcdir@/src - -# 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 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. - -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 -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_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 behaviour. -# 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 behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -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. - -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. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" 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:". -# You can put \n's in the value part of an alias to insert newlines. - -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. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# 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. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) 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. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# 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 and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# 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. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) 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. - -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 (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -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 (the default) these blocks will be appended to the -# function's detailed documentation block. - -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 (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) 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. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = 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 default), 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. - -SORT_BY_SCOPE_NAME = 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. - -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. - -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. - -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. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of 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 initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -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. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = 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 , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED 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. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = 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) - -WARN_FORMAT = "$file:$line: $text" - -# 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 stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be 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. - -INPUT = @top_srcdir@/src - -# If the value of the INPUT tag contains directories, you can use the -# FILE_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 the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = *.h *.c - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# 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. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -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 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. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are 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. - -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 -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# 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 also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# 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. - -REFERENCES_LINK_SOURCE = YES - -# 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 http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) 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. - -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. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -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. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -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 the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, 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. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag 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 (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# 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. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = YES - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = LZMA_API(type)=type \ - LZMA_API_IMPORT \ - LZMA_API_CALL= - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/INSTALL b/INSTALL index a55affb03d..ec89047274 100644 --- a/INSTALL +++ b/INSTALL @@ -16,19 +16,22 @@ XZ Utils Installation 1.2.8. DOS 1.2.9. z/OS 1.3. Adding support for new platforms - 2. configure options + 2. configure and CMake options 2.1. Static vs. dynamic linking of liblzma 2.2. Optimizing xzdec and lzmadec 3. xzgrep and other scripts 3.1. Dependencies 3.2. PATH - 4. Troubleshooting - 4.1. "No C99 compiler was found." - 4.2. "No POSIX conforming shell (sh) was found." - 4.3. configure works but build fails at crc32_x86.S - 4.4. Lots of warnings about symbol visibility - 4.5. "make check" fails - 4.6. liblzma.so (or similar) not found when running xz + 4. Tests + 4.1 Testing in parallel + 4.2 Cross compiling + 5. Troubleshooting + 5.1. "No C99 compiler was found." + 5.2. "No POSIX conforming shell (sh) was found." + 5.3. configure works but build fails at crc32_x86.S + 5.4. Lots of warnings about symbol visibility + 5.5. "make check" fails + 5.6. liblzma.so (or similar) not found when running xz 0. Preface @@ -73,6 +76,11 @@ XZ Utils Installation you use CC=xlc instead, you must disable threading support with --disable-threads (usually not recommended). + If building a 32-bit executable, the address space available to xz + might be limited to 256 MiB by default. To increase the address + space to 2 GiB, pass LDFLAGS=-Wl,-bmaxdata:0x80000000 as an argument + to configure. + 1.2.2. IRIX @@ -87,21 +95,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. - - 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 - . + Version 3.3.0 and later are supported. - 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. + 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. - See section 4.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 @@ -127,58 +129,50 @@ XZ Utils Installation missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). Nowadays /usr/xpg4/bin is added to the script PATH by default on Solaris (see --enable-path-for-scripts=PREFIX in section 2), but old xz - releases needed extra steps. See sections 4.5 and 3.2 for more + releases needed extra steps. See sections 5.5 and 3.2 for more information. 1.2.6. Tru64 If you try to use the native C compiler on Tru64 (passing CC=cc to - configure), you may need the workaround mention in section 4.1 in + configure), you may need the workaround mention in section 5.1 in this file (pass also ac_cv_prog_cc_c99= to configure). 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 experimental CMake support. As it is, it should be - good enough to build static liblzma with Visual Studio. - Building liblzma.dll might work too (if it doesn't, it should - be fixed). 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 @@ -224,19 +218,53 @@ XZ Utils Installation in C89 or C++. -2. configure options --------------------- +2. configure and CMake options +------------------------------ In most cases, the defaults are what you want. Many of the options below are useful only when building a size-optimized version of liblzma or command line tools. + configure options are those that begin with two dashes "--" + or "gl_". + + CMake options begin with "XZ_", "TUKLIB_", or "CMAKE_". To use + them on the command line, prefix them with "-D", for example, + "cmake -DCMAKE_COMPILE_WARNING_AS_ERROR=ON". + + CMAKE_BUILD_TYPE=TYPE + CMake only: + + For release builds, CMAKE_BUILD_TYPE=Release is fine. + On targets where CMake defaults to -O3, the default + value is overridden to -O2. + + Empty value (CMAKE_BUILD_TYPE=) is fine if using custom + optimization options. *In this package* the empty build + type also disables debugging code just like "Release" + does. To enable debugging code with empty build type, + use -UNDEBUG in the CFLAGS environment variable or in + the CMAKE_C_FLAGS CMake variable to override -DNDEBUG. + + Non-standard build types like "None" do NOT disable + debugging code! Such non-standard build types should + be avoided for production builds! + --enable-encoders=LIST --disable-encoders - Specify a comma-separated LIST of filter encoders to - build. See "./configure --help" for exact list of - available filter encoders. The default is to build all - supported encoders. + XZ_ENCODERS=LIST + Specify a LIST of filter encoders to build. In the + configure option the list is comma separated. + CMake lists are semicolon separated. + + To see the exact list of available filter encoders: + + - Autotools: ./configure --help + + - CMake: Configure the tree normally first, then use + "cmake -LH ." to list the cache variables. + + The default is to build all supported encoders. If LIST is empty or --disable-encoders is used, no filter encoders will be built and also the code shared between @@ -248,10 +276,12 @@ XZ Utils Installation --enable-decoders=LIST --disable-decoders + XZ_DECODERS=LIST This is like --enable-encoders but for decoders. The default is to build all supported decoders. --enable-match-finders=LIST + XZ_MATCH_FINDERS=LIST liblzma includes two categories of match finders: hash chains and binary trees. Hash chains (hc3 and hc4) are quite fast but they don't provide the best compression @@ -268,9 +298,11 @@ XZ Utils Installation or LZMA2 filter encoders are being built. --enable-checks=LIST + XZ_CHECKS=LIST liblzma support multiple integrity checks. CRC32 is - mandatory, and cannot be omitted. See "./configure --help" - for exact list of available integrity check types. + mandatory, and cannot be omitted. Supported check + types are "crc32", "crc64", and "sha256". By default + all supported check types are enabled. liblzma and the command line tools can decompress files which use unsupported integrity check type, but naturally @@ -281,6 +313,7 @@ XZ Utils Installation it is known to not cause problems. --enable-external-sha256 + XZ_EXTERNAL_SHA256=ON Try to use SHA-256 code from the operating system libc or similar base system libraries. This doesn't try to use OpenSSL or libgcrypt or such libraries. @@ -316,10 +349,29 @@ XZ Utils Installation | xz -v -0 -Csha256 > foo.xz time xz --test foo.xz + --disable-microlzma + XZ_MICROLZMA_ENCODER=OFF + XZ_MICROLZMA_DECODER=OFF + Don't build MicroLZMA encoder and decoder. This omits + lzma_microlzma_encoder() and lzma_microlzma_decoder() + API functions from liblzma. These functions are needed + by specific applications only. They were written for + erofs-utils but they may be used by others too. + + --disable-lzip-decoder + XZ_LZIP_DECODER=OFF + Disable decompression support for .lz (lzip) files. + This omits the API function lzma_lzip_decoder() from + liblzma and .lz support from the xz tool. + --disable-xz --disable-xzdec --disable-lzmadec --disable-lzmainfo + XZ_TOOL_XZ=OFF + XZ_TOOL_XZDEC=OFF + XZ_TOOL_LZMADEC=OFF + XZ_TOOL_LZMAINFO=OFF Don't build and install the command line tool mentioned in the option name. @@ -329,47 +381,159 @@ XZ Utils Installation a dangling man page symlink lzmadec.1 -> xzdec.1 is created. + XZ_TOOL_SYMLINKS=OFF + Don't create the unxz and xzcat symlinks. (There is + no "configure" option to disable these symlinks.) + --disable-lzma-links + XZ_TOOL_SYMLINKS_LZMA=OFF Don't create symlinks for LZMA Utils compatibility. This includes lzma, unlzma, and lzcat. If scripts are installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep, lzmore, and lzless will be omitted if this option is used. --disable-scripts + XZ_TOOL_SCRIPTS=OFF Don't install the scripts xzdiff, xzgrep, xzmore, xzless, and their symlinks. --disable-doc + XZ_DOC=OFF Don't install the documentation files to $docdir (often /usr/doc/xz or /usr/local/doc/xz). Man pages will still be installed. The $docdir can be changed with --docdir=DIR. + --enable-doxygen + XZ_DOXYGEN=ON + 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. + + NOTE: --disable-doc or XZ_DOC=OFF don't affect this. + --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 + XZ_ASM_I386=OFF + 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. - --enable-unaligned-access - Allow liblzma to use unaligned memory access for 16-bit - and 32-bit loads and stores. This should be enabled only - when the hardware supports this, i.e. when unaligned - access is fast. Some operating system kernels emulate - unaligned access, which is extremely slow. This option - shouldn't be used on systems that rely on such emulation. + The assembly code is compatible with only certain OSes + and toolchains (it's not compatible with MSVC). + + Since XZ Utils 5.7.1alpha, the 32-bit x86 assembly code + co-exists with the modern CLMUL code: CLMUL is used if + support for it is detected at runtime. On old processors + the assembly code is used. + + --disable-clmul-crc + XZ_CLMUL_CRC=OFF + 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 + is used only if --disable-assembler is used (this might + be fixed in the future). The code works on E2K too. + + If using compiler options that unconditionally allow the + required extensions (-msse4.1 -mpclmul) then runtime + detection isn't used and the generic code is omitted. + + --disable-arm64-crc32 + XZ_ARM64_CRC32=OFF + 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. + + --disable-loongarch-crc32 + XZ_LOONGARCH_CRC32=OFF + Disable the use of the 64-bit LoongArch CRC32 + instruction extension even if compiler support for + it is detected. There is no runtime detection because + all 64-bit LoongArch processors should support + the CRC32 instructions. - Unaligned access is enabled by default on x86, x86-64, - and big endian PowerPC. + --enable-unaligned-access + TUKLIB_FAST_UNALIGNED_ACCESS=ON + Allow liblzma to use unaligned memory access for 16-bit, + 32-bit, and 64-bit loads and stores. This should be + enabled only when the hardware supports this, that is, + when unaligned access is fast. Some operating system + kernels emulate unaligned access, which is extremely + slow. This option shouldn't be used on systems that + rely on such emulation. + + 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 + TUKLIB_USE_UNSAFE_TYPE_PUNNING=ON + This enables use of code like + + uint8_t *buf8 = ...; + *(uint32_t *)buf8 = ...; + + which violates strict aliasing rules and may result + in broken code. There should be no need to use this + option with recent GCC or Clang versions on any + arch as just as fast code can be generated in a safe + way too (using __builtin_assume_aligned + memcpy). + + However, this option might improve performance in some + other cases, especially with old compilers (for example, + GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7). --enable-small + XZ_SMALL=ON Reduce the size of liblzma by selecting smaller but semantically equivalent version of some functions, and omit precomputed lookup tables. This option tends to @@ -386,6 +550,7 @@ XZ Utils Installation flag(s) to CFLAGS manually. --enable-assume-ram=SIZE + XZ_ASSUME_RAM=SIZE On the most common operating systems, XZ Utils is able to detect the amount of physical memory on the system. This information is used by the options --memlimit-compress, @@ -402,6 +567,7 @@ XZ Utils Installation src/common/tuklib_physmem.c for details. --enable-threads=METHOD + XZ_THREADS=METHOD Threading support is enabled by default so normally there is no need to specify this option. @@ -416,62 +582,128 @@ XZ Utils Installation win95 Use Windows 95 compatible threads. This is compatible with Windows XP and later too. This is the default for 32-bit x86 - Windows builds. The `win95' threading is - incompatible with --enable-small. + Windows builds. Unless the compiler + supports __attribute__((__constructor__)), + 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. - NOTE: If combined with --enable-small, the + NOTE: If combined with --enable-small + and the compiler doesn't support + __attribute__((__constructor__)), the resulting liblzma won't be thread safe, that is, if a multi-threaded application calls any liblzma functions from more than one thread, something bad may happen. --enable-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'. + XZ_SANDBOX=METHOD + 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: auto Look for a supported sandboxing method and use it if found. If no method is found, then sandboxing isn't used. + This is the default. 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. - --enable-symbol-versions - Use symbol versioning for liblzma. This is enabled by - default on GNU/Linux, other GNU-based systems, and - FreeBSD. + pledge Use pledge(2) (OpenBSD >= 5.9) for + sandboxing. If pledge(2) isn't found, + configure will give an error. + + landlock + Use Landlock (Linux >= 5.13) for + sandboxing. If no Landlock support + is found, configure will give an error. + + --enable-symbol-versions[=VARIANT] + XZ_SYMBOL_VERSIONING=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 run-time consistency checks. It makes the code slower, so you normally don't want to have this enabled. + In CMake, the build type (CMAKE_BUILD_TYPE) controls if + -DNDEBUG is passed to the compiler. *In this package*, + an empty build type disables debugging code too. + Non-standard build types like "None" do NOT disable + debugging code! + + To enable debugging code with empty build type in CMake, + use -UNDEBUG in the CFLAGS environment variable or in + the CMAKE_C_FLAGS CMake variable to override -DNDEBUG. + --enable-werror + CMAKE_COMPILE_WARNING_AS_ERROR=ON (CMake >= 3.24) If building with GCC, make all compiler warnings an error, that abort the compilation. This may help catching bugs, and should work on most systems. This has no effect on the resulting binaries. --enable-path-for-scripts=PREFIX + (CMake determines this from the path of XZ_POSIX_SHELL) If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in the beginning of the scripts (xzgrep and others). The default is empty except on Solaris the default is @@ -488,6 +720,36 @@ XZ Utils Installation the PATH for the scripts. It is described in section 3.2 and is supported in this xz version too. + gl_cv_posix_shell=/path/to/bin/sh + XZ_POSIX_SHELL=/path/to/bin/sh + POSIX shell to use for xzgrep and other scripts. + + - configure should autodetect this well enough. + Typically it's /bin/sh but in some cases, like + Solaris, something else is used. + + - CMake build uses /bin/sh except on Solaris the + default is /usr/xpg4/bin/sh. + + CMAKE_DLL_NAME_WITH_SOVERSION=ON + CMake on native Windows (not Cygwin) only: + + This changes the filename liblzma.dll to liblzma-5.dll. + + The unversioned filename liblzma.dll has been used + since XZ Utils 5.0.0 when creating binary packages + using the included windows/build.bash. The same + unversioned filename is the default with CMake. + However, there are popular builds that, very + understandably and reasonably, use the versioned + filename produced by GNU Libtool. + + This option should usually be left to its default value + (OFF). It can be set to ON if the liblzma DLL filename + must be compatible with the versioned filename + produced by GNU Libtool. For example, binaries + distributed in MSYS2 use a versioned DLL filename. + 2.1. Static vs. dynamic linking of liblzma @@ -517,7 +779,7 @@ XZ Utils Installation liblzma, pass --enable-small to configure. - Tell the compiler to optimize for size instead of speed. - E.g. with GCC, put -Os into CFLAGS. + For example, with GCC, put -Os into CFLAGS. - xzdec and lzmadec will never use multithreading capabilities of liblzma. You can avoid dependency on libpthread by passing @@ -550,7 +812,7 @@ XZ Utils Installation a fallback xzdiff will use mkdir to securely create a temporary directory. Having mktemp available is still recommended since the mkdir fallback method isn't as robust as mktemp is. The original - mktemp can be found from . On GNU, most will + mktemp can be found from . On GNU, most will use the mktemp program from GNU coreutils instead of the original implementation. Both mktemp versions are fine. @@ -578,10 +840,54 @@ XZ Utils Installation src/scripts/xz*.in -4. Troubleshooting +4. Tests +-------- + + The test framework can be built and run by executing "make check" in + the build directory. The tests are a mix of executables and POSIX + shell scripts (sh). All tests should pass if the default configuration + is used. Disabling features through the configure options may cause + some tests to be skipped. If any tests do not pass, see section 5.5. + + +4.1. Testing in parallel + + The tests can be run in parallel using the "-j" make option on systems + that support it. For instance, "make -j4 check" will run up to four + tests simultaneously. + + +4.2. Cross compiling + + The tests can be built without running them: + + make check TESTS= + + The TESTS variable is the list of tests you wish to run. Leaving it + empty will compile the tests without running any. + + If the tests are copied to a target machine to execute, the test data + files in the directory tests/files must also be copied. The tests + search for the data files using the environment variable $srcdir, + expecting to find the data files under $srcdir/files/. If $srcdir + isn't set then it defaults to the current directory. + + The shell script tests can be copied from the source directory to the + target machine to execute. In addition to the test files, these tests + will expect the following relative file paths to execute properly: + + ./create_compress_files + ../config.h + ../src/xz/xz + ../src/xzdec/xzdec + ../src/scripts/xzdiff + ../src/scripts/xzgrep + + +5. Troubleshooting ------------------ -4.1. "No C99 compiler was found." +5.1. "No C99 compiler was found." You need a C99 compiler to build XZ Utils. If the configure script cannot find a C99 compiler and you think you have such a compiler @@ -596,7 +902,7 @@ XZ Utils Installation support enough C99. -4.2. "No POSIX conforming shell (sh) was found." +5.2. "No POSIX conforming shell (sh) was found." xzgrep and other scripts need a shell that (roughly) conforms to POSIX. The configure script tries to find such a shell. If @@ -606,13 +912,13 @@ XZ Utils Installation this error by passing --disable-scripts to configure. -4.3. configure works but build fails at crc32_x86.S +5.3. configure works but build fails at crc32_x86.S The easy fix is to pass --disable-assembler to the configure script. The configure script determines if assembler code can be used by looking at the configure triplet; there is currently no check if - the assembler code can actually actually be built. The x86 assembler + the assembler code can actually be built. The x86 assembler code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW, Cygwin, and DJGPP. On other x86 systems, there may be problems and the assembler code may need to be disabled with the configure option. @@ -623,7 +929,7 @@ XZ Utils Installation (see INSTALL.generic). -4.4. Lots of warnings about symbol visibility +5.4. Lots of warnings about symbol visibility On some systems where symbol visibility isn't supported, GCC may still accept the visibility options and attributes, which will make @@ -635,7 +941,7 @@ XZ Utils Installation using --enable-werror. -4.5. "make check" fails +5.5. "make check" fails If the other tests pass but test_scripts.sh fails, then the problem is in the scripts in src/scripts. Comparing the contents of @@ -661,7 +967,7 @@ XZ Utils Installation information. -4.6. liblzma.so (or similar) not found when running xz +5.6. liblzma.so (or similar) not found when running xz If you installed the package with "make install" and get an error about liblzma.so (or a similarly named file) being missing, try diff --git a/Makefile.am b/Makefile.am index 3a63499193..fc54f477e1 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,33 +34,34 @@ 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 endif EXTRA_DIST = \ - po4a \ - extra \ + cmake \ dos \ + doxygen \ + extra \ + po4a \ windows \ - macosx \ - autogen.sh \ - Doxyfile.in \ + CMakeLists.txt \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ INSTALL.generic \ PACKAGERS \ + TODO \ + autogen.sh \ + build-aux/license-check.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 conver 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 \ @@ -74,41 +71,53 @@ manfiles = \ src/scripts/xzless.1 \ 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. +# Create ChangeLog using "git log". +# 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 \ - b667a3ef6338a2c1db7b7706b1f6c99ea392221c^..HEAD ) \ + ( cd "$(srcdir)" && git log --pretty=medium --date=iso --stat \ + 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 + cd "$(distdir)" && $(SHELL) "build-aux/license-check.sh" # 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 + $(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-`; \ + $(SHELL) "$(srcdir)/build-aux/license-check.sh" || exit 1; \ + SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=8 | cut -b2-`; \ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \ fi; \ - TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \ + TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w --sort=name' \ + LC_COLLATE=C \ $(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 e3c5e79e7f..3182afa2c9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -70,6 +70,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -91,8 +93,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,13 +114,12 @@ 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 CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = Doxyfile +CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -147,9 +148,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/||"`;; \ @@ -172,20 +173,17 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } -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 = \ @@ -194,8 +192,8 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -212,11 +210,8 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/build-aux/compile \ +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.rpath \ $(top_srcdir)/build-aux/config.sub \ @@ -232,8 +227,8 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) @@ -264,10 +259,14 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ @@ -278,7 +277,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -CAPSICUM_LIB = @CAPSICUM_LIB@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ @@ -288,6 +286,8 @@ CFLAGS = @CFLAGS@ CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -298,8 +298,10 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -352,6 +354,7 @@ POSUB = @POSUB@ PREFERABLY_POSIX_SHELL = @PREFERABLY_POSIX_SHELL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ RC = @RC@ @@ -374,8 +377,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ @@ -402,6 +407,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@ @@ -410,6 +417,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -427,11 +435,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 \ @@ -444,32 +452,33 @@ 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 \ - autogen.sh \ - Doxyfile.in \ + CMakeLists.txt \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ INSTALL.generic \ PACKAGERS \ + TODO \ + autogen.sh \ + build-aux/license-check.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 conver 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 \ @@ -522,17 +531,15 @@ config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h + $(AM_V_at)rm -f stamp-h1 + $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ + $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + $(AM_V_at)rm -f stamp-h1 + $(AM_V_at)touch $@ distclean-hdr: -rm -f config.h stamp-h1 -Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -584,27 +591,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. @@ -711,13 +697,12 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" + $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -803,6 +788,10 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -832,7 +821,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -842,9 +831,11 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -860,7 +851,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -916,7 +907,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 @@ -943,8 +934,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -971,8 +962,7 @@ info: info-recursive info-am: -install-data-am: install-dist_docDATA install-dist_examplesDATA \ - install-dist_examplesoldDATA +install-data-am: install-dist_docDATA install-dist_examplesDATA install-dvi: install-dvi-recursive @@ -1012,14 +1002,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-am: uninstall-dist_docDATA uninstall-dist_examplesDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -1027,64 +1016,82 @@ uninstall-am: uninstall-dist_docDATA uninstall-dist_examplesDATA \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ 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-dist_docDATA \ - install-dist_examplesDATA install-dist_examplesoldDATA \ - 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 + 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 pdf-local \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dist_docDATA uninstall-dist_examplesDATA .PRECIOUS: Makefile -# Create ChangeLog from output of "git log --date=iso --stat". -# Convert the man pages to PDF and plain text (ASCII only) formats. +# Create ChangeLog using "git log". +# 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 \ - b667a3ef6338a2c1db7b7706b1f6c99ea392221c^..HEAD ) \ + ( cd "$(srcdir)" && git log --pretty=medium --date=iso --stat \ + 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 + cd "$(distdir)" && $(SHELL) "build-aux/license-check.sh" # 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 + $(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-`; \ + $(SHELL) "$(srcdir)/build-aux/license-check.sh" || exit 1; \ + SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=8 | cut -b2-`; \ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \ fi; \ - TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \ + TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w --sort=name' \ + LC_COLLATE=C \ $(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: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/NEWS b/NEWS index d3f7d60234..978ef54b91 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,2250 @@ XZ Utils Release Notes ====================== +5.8.1 (2025-04-03) + + IMPORTANT: This includes a security fix for CVE-2025-31115 which + affects XZ Utils from 5.3.3alpha to 5.8.0. No new 5.4.x or 5.6.x + releases will be made, but the fix is in the v5.4 and v5.6 branches + in the xz Git repository. A standalone patch for all affected + versions is available as well. + + * Multithreaded .xz decoder (lzma_stream_decoder_mt()): + + - Fix a bug that could at least result in a crash with + invalid input. (CVE-2025-31115) + + - Fix a performance bug: Only one thread was used if the whole + input file was provided at once to lzma_code(), the output + buffer was big enough, timeout was disabled, and LZMA_FINISH + was used. There are no bug reports about this, thus it's + possible that no real-world application was affected. + + * Avoid even with C11/C17 compilers. This fixes the + build with Oracle Developer Studio 12.6 on Solaris 10 when the + compiler is in C11 mode (the header doesn't exist). + + * Autotools: Restore compatibility with GNU make versions older + than 4.0 by creating the package using GNU gettext 0.23.1 + infrastructure instead of 0.24. + + * Update Croatian translation. + + +5.8.0 (2025-03-25) + + This bumps the minor version of liblzma because new features were + added. The API and ABI are still backward compatible with liblzma + 5.6.x, 5.4.x, 5.2.x, and 5.0.x. + + * liblzma on 32/64-bit x86: When possible, use SSE2 intrinsics + instead of memcpy() in the LZMA/LZMA2 decoder. In typical cases, + this may reduce decompression time by 0-5 %. However, when built + against musl libc, over 15 % time reduction was observed with + highly compressed files. + + * CMake: Make the feature test macros match the Autotools-based + build on NetBSD, Darwin, and mingw-w64. + + * Update the Croatian, Italian, Portuguese, and Romanian + translations. + + * Update the German, Italian, Korean, Romanian, Serbian, and + Ukrainian man page translations. + + Summary of changes in the 5.7.x development releases: + + * Mark the following LZMA Utils script aliases as deprecated: + lzcmp, lzdiff, lzless, lzmore, lzgrep, lzegrep, and lzfgrep. + + * liblzma: + + - Improve LZMA/LZMA2 encoder speed on 64-bit PowerPC (both + endiannesses) and those 64-bit RISC-V processors that + support fast unaligned access. + + - Add low-level APIs for RISC-V, ARM64, and x86 BCJ filters + to lzma/bcj.h. These are primarily for erofs-utils. + + - x86/x86-64/E2K CLMUL CRC code was rewritten. + + - Use the CRC32 instructions on LoongArch. + + * xz: + + - Synchronize the output file and its directory using fsync() + before deleting the input file. No syncing is done when xz + isn't going to delete the input file. + + - Add --no-sync to disable the sync-before-delete behavior. + + - Make --single-stream imply --keep. + + * xz, xzdec, lzmainfo: When printing messages, replace + non-printable characters with question marks. + + * xz and xzdec on Linux: Support Landlock ABI versions 5 and 6. + + * CMake: Revise the configuration variables and some of their + options, and document them in the file INSTALL. CMake support + is no longer experimental. (It was already not experimental + when building for native Windows.) + + * Add build-aux/license-check.sh. + + +5.7.2beta (2025-03-08) + + * On the man pages, mark the following LZMA Utils script aliases as + deprecated: lzcmp, lzdiff, lzless, lzmore, lzgrep, lzegrep, and + lzfgrep. The commands that start with xz* instead of lz* have + identical behavior. + + The LZMA Utils aliases lzma, unlzma, and lzcat aren't deprecated + because some of these aliases are still in common use. lzmadec + and lzmainfo aren't deprecated either. + + * xz: In the ENVIRONMENT section of the man page, warn about + problems that some uses of XZ_DEFAULTS and XZ_OPT may create. + + * Windows (native builds, not Cygwin): In xz, xzdec, and lzmadec, + avoid an error message on broken pipe. + + * Autotools: Fix out-of-tree builds when using the bundled + getopt_long. + + * Translations: + + - Updated: Chinese (traditional), Croatian, Finnish, Georgian, + German, Korean, Polish, Romanian, Serbian, Spanish, Swedish, + Turkish, and Ukrainian + + - Added: Dutch + + * Man page translations: + + - Updated: German, Korean, Romanian, and Ukrainian + + - Added: Italian and Serbian + + +5.7.1alpha (2025-01-23) + + * All fixes from 5.6.4. + + * liblzma: + + - Improve LZMA/LZMA2 encoder speed on 64-bit PowerPC (both + endiannesses) and those 64-bit RISC-V processors that + support fast unaligned access. + + - x86/x86-64/E2K CLMUL CRC code was rewritten. It's faster and + doesn't cause false positives from sanitizers. Attributes + like __attribute__((__no_sanitize_address__)) are no longer + present. + + - On 32-bit x86, CLMUL CRC and the old (but still good) + assembly versions now co-exist with runtime detection. + Both Autotools and CMake build systems handle this + automatically now. + + - Use the CRC32 instructions on LoongArch to make CRC32 + calculation faster. + + - Add low-level APIs for RISC-V, ARM64, and x86 BCJ filters + to lzma/bcj.h. These are primarily for erofs-utils. + + - Minor tweaks to ARM64 CRC32 code and BCJ filters were made. + + * xz: + + - Synchronize the output file and its directory before deleting + the input file using fsync(). This reduces the probability of + data loss after a system crash. However, it can be a major + performance hit if processing many small files. + + NOTE: No syncing is done when xz isn't going to delete + the input file. + + - Add a new option --no-sync to disable the sync-before-delete + behavior. It's useful when compressing many small files and + one doesn't worry about data loss in case of a system crash. + + - Make --single-stream imply --keep. + + - Use automatic word wrapping for the text in --help and + similar situations to hopefully make the strings easier for + majority of translators (no need to count spaces anymore). + + * xz, xzdec, lzmainfo: When printing messages, replace + non-printable characters with question marks. This way + malicious filenames cannot be used to send escape sequences + to a terminal. This change is also applied to filenames shown + in "xz --robot --list". + + * xz and xzdec on Linux: Add support for Landlock ABI versions 5 + and 6. + + * CMake updates: + + - Increase the minimum required CMake version to 3.20. + + - Revise the configuration variables and some of their options. + Document them in the file INSTALL. + + - Attempt to produce liblzma.pc so that the paths are based on + ${prefix}, which makes it simpler to override the paths + if the liblzma files have been moved. + + - To enable translations, gettext-tools is now required. The + CMake build no longer supports installing pre-compiled + message catalog binary files (po/*.gmo). + + - Apple: Use Mach-O shared library versioning that is + compatible with GNU Libtool. This should make it easier to + switch between the build systems on Apple OSes that enforce + the correct compatibility_version (macOS >= 12 doesn't?). + This change is backward compatible: binaries linked against + old CMake-built liblzma will run with liblzma that uses + Libtool style versioning. + + - Windows (not Cygwin): Document CMAKE_DLL_NAME_WITH_SOVERSION + (CMake >= 3.27) in the file INSTALL. This option should + usually be left to its default value (OFF). It can be set + to ON if the liblzma DLL filename must be compatible with + the versioned filename produced by GNU Libtool. For example, + binaries distributed in MSYS2 use a versioned DLL filename. + + - CMake support is no longer experimental. (It was already + not experimental when building for native Windows.) + + * Windows: Building liblzma with Visual Studio 2013 is no longer + supported. Visual Studio 2015 or later (with CMake) can be used + to build liblzma and the command line tools. + + * Add preliminary Georgian translation. This already contains + translations of most of the strings that are now automatically + word wrapped. + + * Add build-aux/license-check.sh. Without arguments, it checks that + no license information has been forgotten. With the -v argument, + it shows the license info (or the lack of it) for each file. + + If the .git directory is available, only the files in the + repository are checked. Without the .git directory, a clean tree + from an extracted release tarball is expected. + + +5.6.4 (2025-01-23) + + * liblzma: Fix LZMA/LZMA2 encoder on big endian ARM64. + + * xz: + + - Fix --filters= and --filters1= ... --filters9= options + parsing. They require an argument, thus "xz --filters lzma2" + should work in addition to "xz --filters=lzma2". + + - On the man page, note in the --compress and --decompress + options that the default behavior is to delete the input + file unless writing to standard output. It was already + documented in the DESCRIPTION section but new users in + a hurry might miss it. + + * Windows (native builds, not Cygwin): Fix regressions introduced + in XZ Utils 5.6.3 which caused non-ASCII characters to display + incorrectly. Only builds with translation support were affected + (--enable-nls or ENABLE_NLS=ON). The following changes affect + builds that have translations enabled: + + - Require UCRT because MSVCRT doesn't support UTF-8 + locales and thus translations won't be readable on + Windows 10 version 1903 and later. (MSVCRT builds + are still possible with --disable-nls or ENABLE_NLS=OFF.) + + - Require gettext-runtime >= 0.23.1 because older versions + don't autodetect the use of the UTF-8 code page. This + resulted in garbled non-ASCII characters even with UCRT. + + - Partially fix alignment issues in xz --verbose --list + with translated messages. Chinese (simplified), + Chinese (traditional), and Korean column headings + are misaligned still because Windows and MinGW-w64 + don't provide wcwidth() and XZ Utils doesn't include + a replacement function either. + + * CMake: Explicitly disable unity builds. This prevents build + failures when another project uses XZ Utils via CMake's + FetchContent module, and that project enables unity builds. + + * Update Chinese (traditional) and Serbian translations. + + +5.6.3 (2024-10-01) + + IMPORTANT: This includes a Windows-specific security fix to + the command line tools (CVE-2024-47611). liblzma isn't affected + by this issue. + + * liblzma: + + - Fix x86-64 inline assembly compatibility with GNU Binutils + older than 2.27. + + - Fix the build with GCC 4.2 on OpenBSD/sparc64. + + * xzdec: Display an error instead of failing silently if the + unsupported option -M is specified. + + * lzmainfo: Fix integer overflows when rounding the dictionary and + uncompressed sizes to the nearest mebibyte. + + * Windows (except Cygwin and MSYS2): Add an application manifest to + xz, xzdec, lzmadec, and lzmainfo executables: + + - Declare them compatible with Vista/7/8/8.1/10/11. This way + the programs won't needlessly use Operating System Context + of Vista when running on later Windows versions. This setting + doesn't mean that the executables cannot run on even older + versions if otherwise built that way. + + - Declare them as UAC-compliant. MSVC added this by default + already but it wasn't done with MinGW-w64, at least not + with all toolchain variants. + + - Declare them long path aware. This makes long path names + work on Windows 10 and 11 if the feature has been enabled + in the Windows registry. + + - Use the UTF-8 code page on Windows 10 version 1903 and later. + + * Now command line tools can access files whose names + contain characters that don't exist in the current + legacy code page. + + * The options --files and --files0 now expect file lists + to be in UTF-8 instead of the legacy code page. + + * This fixes a security issue: If a command line contains + Unicode characters (for example, filenames) that don't + exist in the current legacy code page, the characters are + converted to similar-looking characters with best-fit + mapping. Some best-fit mappings result in ASCII + characters that change the meaning of the command line, + which can be exploited with malicious filenames to do + argument injection or directory traversal attacks. + UTF-8 avoids best-fit mappings and thus fixes the issue. + (CVE-2024-47611) + + Forcing the process code page to UTF-8 is possible only + on Windows 10 version 1903 and later. The command line + tools remain vulnerable if used on an old older + version of Windows. + + This issue was discovered by Orange Tsai and splitline + from DEVCORE Research Team. + + A related smaller issue remains: Windows filenames may + contain unpaired surrogates (invalid UTF-16). These are + converted to the replacement character U+FFFD in the + UTF-8 code page. Thus, filenames with different unpaired + surrogates appear identical and aren't distinguishable + from filenames that contain the actual replacement + character U+FFFD. + + * When building with MinGW-w64, it is recommended to use + UCRT version instead of the old MSVCRT. For example, + non-ASCII characters from filenames won't print + correctly in messages to console with MSVCRT with + the UTF-8 code page (a cosmetic issue). liblzma-only + builds are still fine with MSVCRT. + + - Cygwin and MSYS2 process command line options differently and + the above issues don't exist. There is no need to replace the + default application manifest on Cygwin and MSYS2. + + * Autotools-based build: + + - Fix feature checks with link-time optimization (-flto). + + - Solaris: Fix a compatibility issue in version.sh. It matters + if one wants to regenerate configure by running autoconf. + + * CMake: + + - Use paths relative to ${prefix} in liblzma.pc when possible. + This is done only with CMake >= 3.20. + + - MSVC: Install liblzma.pc as it can be useful with MSVC too. + + - Windows: Fix liblzma filename prefix, for example: + + * Cygwin: The DLL was incorrectly named liblzma-5.dll. + Now it is cyglzma-5.dll. + + * MSVC: Rename import library from liblzma.lib to lzma.lib + while keeping liblzma.dll name as is. This helps with + "pkgconf --msvc-syntax --libs liblzma" because it mungles + "-llzma" in liblzma.pc to "lzma.lib". + + * MinGW-w64: No changes. + + - Windows: Use the correct resource file for lzmadec.exe. + Previously the resource file for xzdec.exe was used for both. + Autotools-based build isn't affected. + + - Prefer a C11 compiler over a C99 compiler but accept both. + + - Link Threads::Threads against liblzma using PRIVATE so that + -pthread and such flags won't unnecessarily get included in + the usage requirements of shared liblzma. That is, + target_link_libraries(foo PRIVATE liblzma::liblzma) no + longer adds -pthread if using POSIX threads and linking + against shared liblzma. The threading flags are still added + if linking against static liblzma. + + * Updated translations: Catalan, Chinese (simplified), and + Brazilian Portuguese. + + +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: + + - Use __attribute__((__no_sanitize_address__)) to avoid address + sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads + which can extend past the bounds of the input buffer and + inherently trigger address sanitization errors. This isn't + a bug. + + - Fixed 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. + + - Fixed a bug that prevented building with Windows Vista + threading when __attribute__((__constructor__)) is not + supported. + + * xz now properly handles special files such as "con" or "nul" on + Windows. Before this fix, 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 + + * Build systems: + + - Allow builds with Windows win95 threading and small mode when + __attribute__((__constructor__)) is supported. + + - Added 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. + + - CMake specific changes: + + * Fixed a bug that allowed CLOCK_MONOTONIC to be used even + if the check for it failed. + + * Fixed a bug where configuring CMake multiple times + resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC + not being set. + + * Fixed 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" + + * Fixed a bug causing the Ninja Generator to fail on + UNIX-like systems. This bug was introduced in 5.4.0. + + * Added a new option to disable CLMUL CRC64. + + * A module-definition (.def) file is now created when + building liblzma.dll with MinGW-w64. + + * The pkg-config liblzma.pc file is now installed on all + builds except when using MSVC on Windows. + + * Added 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. + + * Small fixes and improvements to the tests. + + * Updated translations: Chinese (simplified) and Esperanto. + + +5.4.4 (2023-08-02) + + * liblzma and xzdec can now build against WASI SDK when threading + support is disabled. xz and tests don't build yet. + + * CMake: + + - Fixed a bug preventing other projects from including liblzma + multiple times using find_package(). + + - Don't create broken symlinks in Cygwin and MSYS2 unless + supported by the environment. This prevented building for the + default MSYS2 environment. The problem was introduced in + xz 5.4.0. + + * Documentation: + + - Small improvements to man pages. + + - Small improvements and typo fixes for liblzma API + documentation. + + * Tests: + + - Added a new section to INSTALL to describe basic test usage + and address recent questions about building the tests when + cross compiling. + + - Small fixes and improvements to the tests. + + * Translations: + + - Fixed a mistake that caused one of the error messages to not + be translated. This only affected versions 5.4.2 and 5.4.3. + + - Updated the Chinese (simplified), Croatian, Esperanto, German, + Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and + Vietnamese translations. + + - Updated the German, Korean, Romanian, and Ukrainian man page + translations. + + +5.4.3 (2023-05-04) + + * All fixes from 5.2.12 + + * Features in the CMake build can now be disabled as CMake cache + variables, similar to the Autotools build. + + * Minor update to the Croatian translation. + + +5.4.2 (2023-03-18) + + * All fixes from 5.2.11 that were not included in 5.4.1. + + * If xz is built with support for the Capsicum sandbox but running + in an environment that doesn't support Capsicum, xz now runs + normally without sandboxing instead of exiting with an error. + + * liblzma: + + - Documentation was updated to improve the style, consistency, + and completeness of the liblzma API headers. + + - The Doxygen-generated HTML documentation for the liblzma API + header files is now included in the source release and is + installed as part of "make install". All JavaScript is + removed to simplify license compliance and to reduce the + install size. + + - Fixed a minor bug in lzma_str_from_filters() that produced + too many filters in the output string instead of reporting + an error if the input array had more than four filters. This + bug did not affect xz. + + * Build systems: + + - autogen.sh now invokes the doxygen tool via the new wrapper + script doxygen/update-doxygen, unless the command line option + --no-doxygen is used. + + - Added microlzma_encoder.c and microlzma_decoder.c to the + VS project files for Windows and to the CMake build. These + should have been included in 5.3.2alpha. + + * Tests: + + - Added a test to the CMake build that was forgotten in the + previous release. + + - Added and refactored a few tests. + + * Translations: + + - Updated the Brazilian Portuguese translation. + + - Added Brazilian Portuguese man page translation. + + +5.4.1 (2023-01-11) + + * liblzma: + + - Fixed the return value of lzma_microlzma_encoder() if the + LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options + made the function return LZMA_STREAM_END without encoding + anything instead of returning LZMA_OPTIONS_ERROR. + + - Windows / Visual Studio: Workaround a possible compiler bug + when targeting 32-bit x86 and compiling the CLMUL version of + the CRC64 code. The CLMUL code isn't enabled by the Windows + project files but it is in the CMake-based builds. + + * Build systems: + + - Windows-specific CMake changes: + + * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x() + isn't available. This fixes CMake-based build with Visual + Studio 2013. + + * Created a workaround for a build failure with windres + from GNU binutils. It is used only when the C compiler + is GCC (not Clang). The workaround is incompatible + with llvm-windres, resulting in "XZx20Utils" instead + of "XZ Utils" in the resource file, but without the + workaround llvm-windres works correctly. See the + comment in CMakeLists.txt for details. + + * Included the resource files in the xz and xzdec build + rules. Building the command line tools is still + experimental but possible with MinGW-w64. + + - Visual Studio: Added stream_decoder_mt.c to the project + files. Now the threaded decompressor lzma_stream_decoder_mt() + gets built. CMake-based build wasn't affected. + + - Updated windows/INSTALL-MSVC.txt to mention that CMake-based + build is now the preferred method with Visual Studio. The + project files will probably be removed after 5.4.x releases. + + - Changes to #defines in config.h: + + * HAVE_DECL_CLOCK_MONOTONIC was replaced by + HAVE_CLOCK_MONOTONIC. The old macro was always defined + in configure-generated config.h to either 0 or 1. The + new macro is defined (to 1) only if the declaration of + CLOCK_MONOTONIC is available. This matches the way most + other config.h macros work and makes things simpler with + other build systems. + + * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by + HAVE_PROGRAM_INVOCATION_NAME for the same reason. + + * Tests: + + - Fixed test script compatibility with ancient /bin/sh + versions. Now the five test_compress_* tests should + no longer fail on Solaris 10. + + - Added and refactored a few tests. + + * Translations: + + - Updated the Catalan and Esperanto translations. + + - Added Korean and Ukrainian man page translations. + + +5.4.0 (2022-12-13) + + This bumps the minor version of liblzma because new features were + added. The API and ABI are still backward compatible with liblzma + 5.2.x and 5.0.x. + + Since 5.3.5beta: + + * All fixes from 5.2.10. + + * The ARM64 filter is now stable. The xz option is now --arm64. + Decompression requires XZ Utils 5.4.0. In the future the ARM64 + filter will be supported by XZ for Java, XZ Embedded (including + the version in Linux), LZMA SDK, and 7-Zip. + + * Translations: + + - Updated Catalan, Croatian, German, Romanian, and Turkish + translations. + + - Updated German man page translations. + + - Added Romanian man page translations. + + Summary of new features added in the 5.3.x development releases: + + * liblzma: + + - Added threaded .xz decompressor lzma_stream_decoder_mt(). + It can use multiple threads with .xz files that have multiple + Blocks with size information in Block Headers. The threaded + encoder in xz has always created such files. + + Single-threaded encoder cannot store the size information in + Block Headers even if one used LZMA_FULL_FLUSH to create + multiple Blocks, so this threaded decoder cannot use multiple + threads with such files. + + If there are multiple Streams (concatenated .xz files), one + Stream will be decompressed completely before starting the + next Stream. + + - A new decoder flag LZMA_FAIL_FAST was added. It makes the + threaded decompressor report errors soon instead of first + flushing all pending data before the error location. + + - New Filter IDs: + * LZMA_FILTER_ARM64 is for ARM64 binaries. + * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't + necessarily use the end marker. + + - Added lzma_str_to_filters(), lzma_str_from_filters(), and + lzma_str_list_filters() to convert a preset or a filter chain + string to a lzma_filter[] and vice versa. These should make + it easier to write applications that allow users to specify + custom compression options. + + - Added lzma_filters_free() which can be convenient for freeing + the filter options in a filter chain (an array of lzma_filter + structures). + + - lzma_file_info_decoder() to makes it a little easier to get + the Index field from .xz files. This helps in getting the + uncompressed file size but an easy-to-use random access + API is still missing which has existed in XZ for Java for + a long time. + + - Added lzma_microlzma_encoder() and lzma_microlzma_decoder(). + It is used by erofs-utils and may be used by others too. + + The MicroLZMA format is a raw LZMA stream (without end marker) + whose first byte (always 0x00) has been replaced with + bitwise-negation of the LZMA properties (lc/lp/pb). It was + created for use in EROFS but may be used in other contexts + as well where it is important to avoid wasting bytes for + stream headers or footers. The format is also supported by + XZ Embedded (the XZ Embedded version in Linux got MicroLZMA + support in Linux 5.16). + + The MicroLZMA encoder API in liblzma can compress into a + fixed-sized output buffer so that as much data is compressed + as can be fit into the buffer while still creating a valid + MicroLZMA stream. This is needed for EROFS. + + - Added lzma_lzip_decoder() to decompress the .lz (lzip) file + format version 0 and the original unextended version 1 files. + Also lzma_auto_decoder() supports .lz files. + + - lzma_filters_update() can now be used with the multi-threaded + encoder (lzma_stream_encoder_mt()) to change the filter chain + after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH. + + - In lzma_options_lzma, allow nice_len = 2 and 3 with the match + finders that require at least 3 or 4. Now it is internally + rounded up if needed. + + - CLMUL-based CRC64 on x86-64 and E2K with runtime processor + detection. On 32-bit x86 it currently isn't available unless + --disable-assembler is used which can make the non-CLMUL + CRC64 slower; this might be fixed in the future. + + - Building with --disable-threads --enable-small + is now thread-safe if the compiler supports + __attribute__((__constructor__)). + + * xz: + + - Using -T0 (--threads=0) will now use multi-threaded encoder + even on a single-core system. This is to ensure that output + from the same xz binary is identical on both single-core and + multi-core systems. + + - --threads=+1 or -T+1 is now a way to put xz into + multi-threaded mode while using only one worker thread. + The + is ignored if the number is not 1. + + - A default soft memory usage limit is now used for compression + when -T0 is used and no explicit limit has been specified. + This soft limit is used to restrict the number of threads + but if the limit is exceeded with even one thread then xz + will continue with one thread using the multi-threaded + encoder and this limit is ignored. If the number of threads + is specified manually then no default limit will be used; + this affects only -T0. + + This change helps on systems that have very many cores and + using all of them for xz makes no sense. Previously xz -T0 + could run out of memory on such systems because it attempted + to reserve memory for too many threads. + + This also helps with 32-bit builds which don't have a large + amount of address space that would be required for many + threads. The default soft limit for -T0 is at most 1400 MiB + on all 32-bit platforms. + + - Previously a low value in --memlimit-compress wouldn't cause + xz to switch from multi-threaded mode to single-threaded mode + if the limit cannot otherwise be met; xz failed instead. Now + xz can switch to single-threaded mode and then, if needed, + scale down the LZMA2 dictionary size too just like it already + did when it was started in single-threaded mode. + + - The option --no-adjust no longer prevents xz from scaling down + the number of threads as that doesn't affect the compressed + output (only performance). Now --no-adjust only prevents + adjustments that affect compressed output, that is, with + --no-adjust xz won't switch from multi-threaded mode to + single-threaded mode and won't scale down the LZMA2 + dictionary size. + + - Added a new option --memlimit-mt-decompress=LIMIT. This is + used to limit the number of decompressor threads (possibly + falling back to single-threaded mode) but it will never make + xz refuse to decompress a file. This has a system-specific + default value because without any limit xz could end up + allocating memory for the whole compressed input file, the + whole uncompressed output file, multiple thread-specific + decompressor instances and so on. Basically xz could + attempt to use an insane amount of memory even with fairly + common files. The system-specific default value is currently + the same as the one used for compression with -T0. + + The new option works together with the existing option + --memlimit-decompress=LIMIT. The old option sets a hard limit + that must not be exceeded (xz will refuse to decompress) + while the new option only restricts the number of threads. + If the limit set with --memlimit-mt-decompress is greater + than the limit set with --memlimit-compress, then the latter + value is used also for --memlimit-mt-decompress. + + - Added new information to the output of xz --info-memory and + new fields to the output of xz --robot --info-memory. + + - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders + now that liblzma handles it. + + - Don't mention endianness for ARM and ARM-Thumb filters in + --long-help. The filters only work for little endian + instruction encoding but modern ARM processors using + big endian data access still use little endian + instruction encoding. So the help text was misleading. + In contrast, the PowerPC filter is only for big endian + 32/64-bit PowerPC code. Little endian PowerPC would need + a separate filter. + + - Added decompression support for the .lz (lzip) file format + version 0 and the original unextended version 1. It is + autodetected by default. See also the option --format on + the xz man page. + + - Sandboxing enabled by default: + * Capsicum (FreeBSD) + * pledge(2) (OpenBSD) + + * Scripts now support the .lz format using xz. + + * A few new tests were added. + + * The liblzma-specific tests are now supported in CMake-based + builds too ("make test"). + + +5.3.5beta (2022-12-01) + + * All fixes from 5.2.9. + + * liblzma: + + - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to + handle raw LZMA1 streams that don't have end of payload marker + (EOPM) alias end of stream (EOS) marker. It can be used in + filter chains, for example, with the x86 BCJ filter. + + - Added lzma_str_to_filters(), lzma_str_from_filters(), and + lzma_str_list_filters() to make it easier for applications + to get custom compression options from a user and convert + it to an array of lzma_filter structures. + + - Added lzma_filters_free(). + + - lzma_filters_update() can now be used with the multi-threaded + encoder (lzma_stream_encoder_mt()) to change the filter chain + after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH. + + - In lzma_options_lzma, allow nice_len = 2 and 3 with the match + finders that require at least 3 or 4. Now it is internally + rounded up if needed. + + - ARM64 filter was modified. It is still experimental. + + - Fixed LTO build with Clang if -fgnuc-version=10 or similar + was used to make Clang look like GCC >= 10. Now it uses + __has_attribute(__symver__) which should be reliable. + + * xz: + + - --threads=+1 or -T+1 is now a way to put xz into multi-threaded + mode while using only one worker thread. + + - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders + now that liblzma handles it. + + * Updated translations: Chinese (simplified), Korean, and Turkish. + + +5.3.4alpha (2022-11-15) + + * All fixes from 5.2.7 and 5.2.8. + + * liblzma: + + - Minor improvements to the threaded decoder. + + - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL + instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's + not enabled unless --disable-assembler is used but then + the non-CLMUL code might be slower. Processor support is + detected at runtime so this is built by default on x86-64 + and E2K. On these platforms, if compiler flags indicate + unconditional CLMUL support (-msse4.1 -mpclmul) then the + generic version is not built, making liblzma 8-9 KiB smaller + compared to having both versions included. + + With extremely compressible files this can make decompression + up to twice as fast but with typical files 5 % improvement + is a more realistic expectation. + + The CLMUL version is slower than the generic version with + tiny inputs (especially at 1-8 bytes per call, but up to + 16 bytes). In normal use in xz this doesn't matter at all. + + - Added an experimental ARM64 filter. This is *not* the final + version! Files created with this experimental version won't + be supported in the future versions! The filter design is + a compromise where improving one use case makes some other + cases worse. + + - Added decompression support for the .lz (lzip) file format + version 0 and the original unextended version 1. See the + API docs of lzma_lzip_decoder() for details. Also + lzma_auto_decoder() supports .lz files. + + - Building with --disable-threads --enable-small + is now thread-safe if the compiler supports + __attribute__((__constructor__)) + + * xz: + + - Added support for OpenBSD's pledge(2) as a sandboxing method. + + - Don't mention endianness for ARM and ARM-Thumb filters in + --long-help. The filters only work for little endian + instruction encoding but modern ARM processors using + big endian data access still use little endian + instruction encoding. So the help text was misleading. + In contrast, the PowerPC filter is only for big endian + 32/64-bit PowerPC code. Little endian PowerPC would need + a separate filter. + + - Added --experimental-arm64. This will be renamed once the + filter is finished. Files created with this experimental + filter will not be supported in the future! + + - Added new fields to the output of xz --robot --info-memory. + + - Added decompression support for the .lz (lzip) file format + version 0 and the original unextended version 1. It is + autodetected by default. See also the option --format on + the xz man page. + + * Scripts now support the .lz format using xz. + + * Build systems: + + - New #defines in config.h: HAVE_ENCODER_ARM64, + HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H, + HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL + + - New configure options: --disable-clmul-crc, + --disable-microlzma, --disable-lzip-decoder, and + 'pledge' is now an option in --enable-sandbox (but + it's autodetected by default anyway). + + - INSTALL was updated to document the new configure options. + + - PACKAGERS now lists also --disable-microlzma and + --disable-lzip-decoder as configure options that must + not be used in builds for non-embedded use. + + * Tests: + + - Fix some of the tests so that they skip instead of fail if + certain features have been disabled with configure options. + It's still not perfect. + + - Other improvements to tests. + + * Updated translations: Croatian, Finnish, Hungarian, Polish, + Romanian, Spanish, Swedish, and Ukrainian. + + +5.3.3alpha (2022-08-22) + + * All fixes from 5.2.6. + + * liblzma: + + - Fixed 32-bit build. + + - Added threaded .xz decompressor lzma_stream_decoder_mt(). + It can use multiple threads with .xz files that have multiple + Blocks with size information in Block Headers. The threaded + encoder in xz has always created such files. + + Single-threaded encoder cannot store the size information in + Block Headers even if one used LZMA_FULL_FLUSH to create + multiple Blocks, so this threaded decoder cannot use multiple + threads with such files. + + If there are multiple Streams (concatenated .xz files), one + Stream will be decompressed completely before starting the + next Stream. + + - A new decoder flag LZMA_FAIL_FAST was added. It makes the + threaded decompressor report errors soon instead of first + flushing all pending data before the error location. + + * xz: + + - Using -T0 (--threads=0) will now use multi-threaded encoder + even on a single-core system. This is to ensure that output + from the same xz binary is identical on both single-core and + multi-core systems. + + - A default soft memory usage limit is now used for compression + when -T0 is used and no explicit limit has been specified. + This soft limit is used to restrict the number of threads + but if the limit is exceeded with even one thread then xz + will continue with one thread using the multi-threaded + encoder and this limit is ignored. If the number of threads + is specified manually then no default limit will be used; + this affects only -T0. + + This change helps on systems that have very many cores and + using all of them for xz makes no sense. Previously xz -T0 + could run out of memory on such systems because it attempted + to reserve memory for too many threads. + + This also helps with 32-bit builds which don't have a large + amount of address space that would be required for many + threads. The default limit is 1400 MiB on all 32-bit + platforms with -T0. + + Now xz -T0 should just work. It might use too few threads + in some cases but at least it shouldn't easily run out of + memory. It's possible that this will be tweaked before 5.4.0. + + - 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 multi-threaded mode to single-threaded mode or scale + down the LZMA2 dictionary size. This seemed illogical. + + Now --memlimit-compress can make xz switch to single-threaded + mode if one thread in multi-threaded 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. + + - Added a new option --memlimit-mt-decompress=LIMIT. This is + used to limit the number of decompressor threads (possibly + falling back to single-threaded mode) but it will never make + xz refuse to decompress a file. This has a system-specific + default value because without any limit xz could end up + allocating memory for the whole compressed input file, the + whole uncompressed output file, multiple thread-specific + decompressor instances and so on. Basically xz could + attempt to use an insane amount of memory even with fairly + common files. + + The new option works together with the existing option + --memlimit-decompress=LIMIT. The old option sets a hard limit + that must not be exceeded (xz will refuse to decompress) + while the new option only restricts the number of threads. + If the limit set with --memlimit-mt-decompress is greater + than the limit set with --memlimit-compress, then the latter + value is used also for --memlimit-mt-decompress. + + * Tests: + + - Added a few more tests. + + - Added tests/code_coverage.sh to create a code coverage report + of the tests. + + * Build systems: + + - Automake's parallel test harness is now used to make tests + finish faster. + + - Added the CMake files to the distribution tarball. These were + supposed to be in 5.2.5 already. + + - Added liblzma tests to the CMake build. + + - Windows: Fix building of liblzma.dll with the included + Visual Studio project files. + + +5.3.2alpha (2021-10-28) + + This release was made on short notice so that recent erofs-utils can + be built with LZMA support without needing a snapshot from xz.git. + Thus many pending things were not included, not even updated + translations (which would need to be updated for the new --list + strings anyway). + + * All fixes from 5.2.5. + + * xz: + + - When copying metadata from the source file to the destination + file, don't try to set the group (GID) if it is already set + correctly. This avoids a failure on OpenBSD (and possibly on + a few other OSes) where files may get created so that their + group doesn't belong to the user, and fchown(2) can fail even + if it needs to do nothing. + + - The --keep option now accepts symlinks, hardlinks, and + setuid, setgid, and sticky files. Previously this required + using --force. + + - Split the long strings used in --list and --info-memory modes + to make them much easier for translators. + + - If built with sandbox support and enabling the sandbox fails, + xz will now immediately exit with exit status of 1. Previously + it would only display a warning if -vv was used. + + - Cap --memlimit-compress to 2000 MiB on MIPS32 because on + MIPS32 userspace processes are limited to 2 GiB of address + space. + + * liblzma: + + - Added lzma_microlzma_encoder() and lzma_microlzma_decoder(). + The API is in lzma/container.h. + + The MicroLZMA format is a raw LZMA stream (without end marker) + whose first byte (always 0x00) has been replaced with + bitwise-negation of the LZMA properties (lc/lp/pb). It was + created for use in EROFS but may be used in other contexts + as well where it is important to avoid wasting bytes for + stream headers or footers. The format is also supported by + XZ Embedded. + + The MicroLZMA encoder API in liblzma can compress into a + fixed-sized output buffer so that as much data is compressed + as can be fit into the buffer while still creating a valid + MicroLZMA stream. This is needed for EROFS. + + - Added fuzzing support. + + - Support Intel Control-flow Enforcement Technology (CET) in + 32-bit x86 assembly files. + + - Visual Studio: Use non-standard _MSVC_LANG to detect C++ + standard version in the lzma.h API header. It's used to + detect when "noexcept" can be used. + + * Scripts: + + - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when + the correct value is 1. + + - Fix exit status of xzgrep. + + - Detect corrupt .bz2 files in xzgrep. + + - Add zstd support to xzgrep and xzdiff/xzcmp. + + - Fix less(1) version detection in xzless. It failed if the + version number from "less -V" contained a dot. + + * Fix typos and technical issues in man pages. + + * Build systems: + + - Windows: Fix building of resource files when config.h isn't + used. CMake + Visual Studio can now build liblzma.dll. + + - Various fixes to the CMake support. It might still need a few + more fixes even for liblzma-only builds. + + +5.3.1alpha (2018-04-29) + + * All fixes from 5.2.4. + + * Add lzma_file_info_decoder() into liblzma and use it in xz to + implement the --list feature. + + * Capsicum sandbox support is enabled by default where available + (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 + --block-list command line options. This fixes confusing + arguments in process listing (like "ps auxf"). + + * GNU/Linux only: Use __has_attribute(__symver__) to detect if + that attribute is supported. This fixes build on Mandriva where + Clang is patched to define __GNUC__ to 11 by default (instead + of 4 as used by Clang upstream). + + +5.2.9 (2022-11-30) + + * liblzma: + + - Fixed an infinite loop in LZMA encoder initialization + if dict_size >= 2 GiB. (The encoder only supports up + to 1536 MiB.) + + - Fixed two cases of invalid free() that can happen if + a tiny allocation fails in encoder re-initialization + or in lzma_filters_update(). These bugs had some + similarities with the bug fixed in 5.2.7. + + - Fixed lzma_block_encoder() not allowing the use of + LZMA_SYNC_FLUSH with lzma_code() even though it was + documented to be supported. The sync-flush code in + the Block encoder was already used internally via + lzma_stream_encoder(), so this was just a missing flag + in the lzma_block_encoder() API function. + + - GNU/Linux only: Don't put symbol versions into static + liblzma as it breaks things in some cases (and even if + it didn't break anything, symbol versions in static + libraries are useless anyway). The downside of the fix + is that if the configure options --with-pic or --without-pic + are used then it's not possible to build both shared and + static liblzma at the same time on GNU/Linux anymore; + with those options --disable-static or --disable-shared + must be used too. + + * New email address for bug reports is which + forwards messages to Lasse Collin and Jia Tan. + + +5.2.8 (2022-11-13) + + * xz: + + - If xz cannot remove an input file when it should, this + is now treated as a warning (exit status 2) instead of + an error (exit status 1). This matches GNU gzip and it + is more logical as at that point the output file has + already been successfully closed. + + - Fix handling of .xz files with an unsupported check type. + Previously such printed a warning message but then xz + behaved as if an error had occurred (didn't decompress, + exit status 1). Now a warning is printed, decompression + is done anyway, and exit status is 2. This used to work + slightly before 5.0.0. In practice this bug matters only + if xz has been built with some check types disabled. As + instructed in PACKAGERS, such builds should be done in + special situations only. + + - Fix "xz -dc --single-stream tests/files/good-0-empty.xz" + which failed with "Internal error (bug)". That is, + --single-stream was broken if the first .xz stream in + the input file didn't contain any uncompressed data. + + - Fix displaying file sizes in the progress indicator when + working in passthru mode and there are multiple input files. + Just like "gzip -cdf", "xz -cdf" works like "cat" when the + input file isn't a supported compressed file format. In + this case the file size counters weren't reset between + files so with multiple input files the progress indicator + displayed an incorrect (too large) value. + + * liblzma: + + - API docs in lzma/container.h: + * Update the list of decoder flags in the decoder + function docs. + * Explain LZMA_CONCATENATED behavior with .lzma files + in lzma_auto_decoder() docs. + + - OpenBSD: Use HW_NCPUONLINE to detect the number of + available hardware threads in lzma_physmem(). + + - Fix use of wrong macro to detect x86 SSE2 support. + __SSE2_MATH__ was used with GCC/Clang but the correct + one is __SSE2__. The first one means that SSE2 is used + for floating point math which is irrelevant here. + The affected SSE2 code isn't used on x86-64 so this affects + only 32-bit x86 builds that use -msse2 without -mfpmath=sse + (there is no runtime detection for SSE2). It improves LZMA + compression speed (not decompression). + + - Fix the build with Intel C compiler 2021 (ICC, not ICX) + on Linux. It defines __GNUC__ to 10 but doesn't support + the __symver__ attribute introduced in GCC 10. + + * Scripts: Ignore warnings from xz by using --quiet --no-warn. + This is needed if the input .xz files use an unsupported + check type. + + * Translations: + + - Updated Croatian and Turkish translations. + + - One new translations wasn't included because it needed + technical fixes. It will be in upcoming 5.4.0. No new + translations will be added to the 5.2.x branch anymore. + + - Renamed the French man page translation file from + fr_FR.po to fr.po and thus also its install directory + (like /usr/share/man/fr_FR -> .../fr). + + - Man page translations for upcoming 5.4.0 are now handled + in the Translation Project. + + * Update doc/faq.txt a little so it's less out-of-date. + + +5.2.7 (2022-09-30) + + * liblzma: + + - Made lzma_filters_copy() to never modify the destination + array if an error occurs. lzma_stream_encoder() and + lzma_stream_encoder_mt() already assumed this. Before this + change, if a tiny memory allocation in lzma_filters_copy() + failed it would lead to a crash (invalid free() or invalid + memory reads) in the cleanup paths of these two encoder + initialization functions. + + - Added missing integer overflow check to lzma_index_append(). + This affects xz --list and other applications that decode + the Index field from .xz files using lzma_index_decoder(). + Normal decompression of .xz files doesn't call this code + and thus most applications using liblzma aren't affected + by this bug. + + - Single-threaded .xz decoder (lzma_stream_decoder()): 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 decoder) this already worked correctly. + + - Fixed accumulation of integrity check type statistics in + lzma_index_cat(). This bug made lzma_index_checks() return + only the type of the integrity check of the last Stream + when multiple lzma_indexes were concatenated. Most + applications don't use these APIs but in xz it made + xz --list not list all check types from concatenated .xz + files. In xz --list --verbose only the per-file "Check:" + lines were affected and in xz --robot --list only the "file" + line was affected. + + - Added ABI compatibility with executables that were linked + against liblzma in RHEL/CentOS 7 or other liblzma builds + that had copied the problematic patch from RHEL/CentOS 7 + (xz-5.2.2-compat-libs.patch). For the details, see the + comment at the top of src/liblzma/validate_map.sh. + + WARNING: This uses __symver__ attribute with GCC >= 10. + In other cases the traditional __asm__(".symver ...") + is used. Using link-time optimization (LTO, -flto) with + GCC versions older than 10 can silently result in + broken liblzma.so.5 (incorrect symbol versions)! If you + want to use -flto with GCC, you must use GCC >= 10. + LTO with Clang seems to work even with the traditional + __asm__(".symver ...") method. + + * xzgrep: Fixed compatibility with old shells that break if + comments inside command substitutions have apostrophes ('). + This problem was introduced in 5.2.6. + + * Build systems: + + - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX + + - Windows: Fixed liblzma.dll build with Visual Studio project + files. It broke in 5.2.6 due to a change that was made to + improve CMake support. + + - Windows: Building liblzma with UNICODE defined should now + work. + + - CMake files are now actually included in the release tarball. + They should have been in 5.2.5 already. + + - Minor CMake fixes and improvements. + + * Added a new translation: Turkish + + +5.2.6 (2022-08-12) + + * xz: + + - The --keep option now accepts symlinks, hardlinks, and + setuid, setgid, and sticky files. Previously this required + using --force. + + - When copying metadata from the source file to the destination + file, don't try to set the group (GID) if it is already set + correctly. This avoids a failure on OpenBSD (and possibly on + a few other OSes) where files may get created so that their + group doesn't belong to the user, and fchown(2) can fail even + if it needs to do nothing. + + - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on + MIPS32 because on MIPS32 userspace processes are limited + to 2 GiB of address space. + + * liblzma: + + - Fixed a missing error-check in the threaded encoder. If a + small memory allocation fails, a .xz file with an invalid + Index field would be created. Decompressing such a file would + produce the correct output but result in an error at the end. + Thus this is a "mild" data corruption bug. Note that while + a failed memory allocation can trigger the bug, it cannot + cause invalid memory access. + + - The decoder for .lzma files now supports files that have + uncompressed size stored in the header and still use the + end of payload marker (end of stream marker) at the end + of the LZMA stream. Such files are rare but, according to + the documentation in LZMA SDK, they are valid. + doc/lzma-file-format.txt was updated too. + + - Improved 32-bit x86 assembly files: + * Support Intel Control-flow Enforcement Technology (CET) + * Use non-executable stack on FreeBSD. + + - Visual Studio: Use non-standard _MSVC_LANG to detect C++ + standard version in the lzma.h API header. It's used to + detect when "noexcept" can be used. + + * xzgrep: + + - Fixed arbitrary command injection via a malicious filename + (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for + this was released to the public on 2022-04-07. A slight + robustness improvement has been made since then and, if + using GNU or *BSD grep, a new faster method is now used + that doesn't use the old sed-based construct at all. This + also fixes bad output with GNU grep >= 3.5 (2020-09-27) + when xzgrepping binary files. + + This vulnerability was discovered by: + cleemy desu wayo working with Trend Micro Zero Day Initiative + + - Fixed detection of corrupt .bz2 files. + + - Improved error handling to fix exit status in some situations + and to fix handling of signals: in some situations a signal + didn't make xzgrep exit when it clearly should have. It's + possible that the signal handling still isn't quite perfect + but hopefully it's good enough. + + - Documented exit statuses on the man page. + + - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead + of the deprecated egrep and fgrep commands. + + - Fixed parsing of the options -E, -F, -G, -P, and -X. The + problem occurred when multiple options were specified in + a single argument, for example, + + echo foo | xzgrep -Fe foo + + treated foo as a filename because -Fe wasn't correctly + split into -F -e. + + - Added zstd support. + + * xzdiff/xzcmp: + + - Fixed wrong exit status. Exit status could be 2 when the + correct value is 1. + + - Documented on the man page that exit status of 2 is used + for decompression errors. + + - Added zstd support. + + * xzless: + + - Fix less(1) version detection. It failed if the version number + from "less -V" contained a dot. + + * Translations: + + - Added new translations: Catalan, Croatian, Esperanto, + Korean, Portuguese, Romanian, Serbian, Spanish, Swedish, + and Ukrainian + + - Updated the Brazilian Portuguese translation. + + - Added French man page translation. This and the existing + German translation aren't complete anymore because the + English man pages got a few updates and the translators + weren't reached so that they could update their work. + + * Build systems: + + - Windows: Fix building of resource files when config.h isn't + used. CMake + Visual Studio can now build liblzma.dll. + + - Various fixes to the CMake support. Building static or shared + liblzma should work fine in most cases. In contrast, building + the command line tools with CMake is still clearly incomplete + and experimental and should be used for testing only. + + 5.2.5 (2020-03-17) * liblzma: diff --git a/PACKAGERS b/PACKAGERS index 6c5d219cb7..b12c4851a4 100644 --- a/PACKAGERS +++ b/PACKAGERS @@ -44,6 +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 Example programs and, if enabled at build time, + Doxygen-generated liblzma API docs (HTML) 2. Package description @@ -109,20 +111,28 @@ Information to packagers of XZ Utils This package includes the API headers, static library, and other development files related to liblzma. + liblzma-doc: + + liblzma API documentation in HTML and example usage + + This package includes the Doxygen-generated liblzma API + HTML docs and example programs showing how to use liblzma. + 3. License ---------- 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 @@ -138,6 +148,8 @@ Information to packagers of XZ Utils --enable-checks --enable-small (*) --disable-threads (*) + --disable-microlzma (*) + --disable-lzip-decoder (*) (*) These are OK when building xzdec and lzmadec as described in INSTALL. @@ -158,12 +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. - liblzma API is currently only documented using Doxygen tags in the - API headers. It hasn't been tested much how good results Doxygen - is able to make from the tags (e.g. Doxyfile might need tweaking, - the tagging may need to be improved etc.), so it might be simpler - to just let people read docs directly from the .h files for now, - and also save quite a bit in package size at the same time. + 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 3f0c38dca6..41671676a5 100644 --- a/README +++ b/README @@ -10,6 +10,7 @@ XZ Utils 2. Version numbering 3. Reporting bugs 4. Translations + 4.1. Testing translations 5. Other implementations of the .xz format 6. Contact information @@ -67,24 +68,25 @@ XZ Utils 1.1. Overall documentation - README This file + 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 + 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 + 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 + 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 +96,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 @@ -113,8 +115,8 @@ XZ Utils Since the liblzma API has similarities to the zlib API, some people may find it useful to read the zlib docs and tutorial too: - http://zlib.net/manual.html - http://zlib.net/zlib_how.html + https://zlib.net/manual.html + https://zlib.net/zlib_how.html 2. Version numbering @@ -202,9 +204,47 @@ XZ Utils https://translationproject.org/html/translators.html - Several strings will change in a future version of xz so if you - wish to start a new translation, look at the code in the xz git - repostiory instead of a 5.2.x release. + Updates to translations won't be accepted by methods that bypass + the Translation Project because there is a risk of duplicate work: + translation updates made in the xz repository aren't seen by the + translators in the Translation Project. If you have found bugs in + a translation, please report them to the Language-Team address + which can be found near the beginning of the PO file. + + If you find language problems in the original English strings, + feel free to suggest improvements. Ask if something is unclear. + + +4.1. Testing translations + + Testing can be done by installing xz into a temporary directory. + + If building from Git repository (not tarball), generate the + Autotools files: + + ./autogen.sh + + Create a subdirectory for the build files. The tmp-build directory + can be deleted after testing. + + mkdir tmp-build + cd tmp-build + ../configure --disable-shared --enable-debug --prefix=$PWD/inst + + Edit the .po file in the po directory. Then build and install to + the "tmp-build/inst" directory, and use translations.bash to see + how some of the messages look. Repeat these steps if needed: + + make -C po update-po + make -j"$(nproc)" install + bash ../debug/translation.bash | less + bash ../debug/translation.bash | less -S # For --list outputs + + To test other languages, set the LANGUAGE environment variable + before running translations.bash. The value should match the PO file + name without the .po suffix. Example: + + export LANGUAGE=fi 5. Other implementations of the .xz format @@ -213,24 +253,29 @@ XZ Utils 7-Zip and the p7zip port of 7-Zip support the .xz format starting from the version 9.00alpha. - http://7-zip.org/ - http://p7zip.sourceforge.net/ + https://7-zip.org/ + https://p7zip.sourceforge.net/ XZ Embedded is a limited implementation written for use in the Linux kernel, but it is also suitable for other embedded use. https://tukaani.org/xz/embedded.html + XZ for Java is a complete implementation written in pure Java. + + https://tukaani.org/xz/java.html + 6. Contact information ---------------------- - If you have questions, bug reports, patches etc. related to XZ Utils, - contact Lasse Collin (in Finnish or English). - I'm sometimes slow at replying. If you haven't got a reply within two - weeks, assume that your email has got lost and resend it or use IRC. + 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 can find me also from #tukaani on Freenode; my nick is Larhzu. - The channel tends to be pretty quiet, so just ask your question and - someone may wake up. + Lead maintainer: + - Email: Lasse Collin + - IRC: Larhzu on Libera Chat diff --git a/README.md b/README.md deleted file mode 100644 index f2dcb404c8..0000000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# cpython-source-deps -Source for packages that the cpython build process depends on - -## XZ Utils -Find updates for these at https://tukaani.org/xz/ diff --git a/THANKS b/THANKS index 4301f205c3..a6a7a67210 100644 --- a/THANKS +++ b/THANKS @@ -5,127 +5,232 @@ 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 + - Karl Beldan - Karl Berry - Anders F. Björklund - Emmanuel Blot - Melanie Blower + - Alexander Bluhm - Martin Blumenstingl - Ben Boeckel - Jakub Bogusz + - Adam Borowski - Maarten Bosmans + - Roel Bouckaert + - Lukas Braune + - Benjamin Buch - Trent W. Buck + - Kevin R. Bulgrien - James Buren - David Burklund + - Frank Busse - Daniel Mealha Cabrita - Milo Casagrande + - Cristiano Ceglia - Marek Černocký - Tomer Chachamu + - Vitaly Chikunov - Antoine Cœur + - Elijah Almeida Coimbra + - Felix Collin + - Ryan Colyer + - Marcus Comstedt + - Vincent Cruz - Gabi Davar + - Ron Desmond + - İhsan Doğan - Chris Donawa - Andrew Dudman - Markus Duft - İsmail Dönmez + - Dexter Castor Döpping + - Paul Eggert - Robert Elz - Gilles Espinasse - Denis Excoffier + - Vincent Fazio - Michael Felt + - Sean Fenian - Michael Fox + - Andres Freund - Mike Frysinger + - Collin Funk - Daniel Richard G. + - Tomasz Gajc + - Bjarni Ingi Gislason + - John Paul Adrian Glaubitz - Bill Glessner + - Matthew Good + - Michał Górny - Jason Gorski + - Alexander M. Greenham - Juan Manuel Guerrero + - Gabriela Gutierrez - Diederik de Haas + - Jan Terje Hansen + - Tobias Lahrmann Hansen - Joachim Henke + - Lizandro Heredia - Christian Hesse - Vincenzo Innocente - Peter Ivanov + - Nicholas Jackson + - Sam James + - Hajin Jang + - Hans Jansen - Jouk Jansen - Jun I Jin + - Christoph Junghans - Kiyoshi Kanazawa + - Joona Kannisto - Per Øyvind Karlsen + - Firas Khalil Khana + - Iouri Kharon + - Kim Jinyeong - Thomas Klausner - Richard Koch + - Anton Kochkov + - Harri K. Koskinen - Ville Koskinen + - Sergey Kosukhin + - Marcin Kowalczyk - Jan Kratochvil - Christian Kujau - Stephan Kulow + - Ilya Kurdyukov - Peter Lawler - James M Leddy + - Kelvin Lee + - Vincent Lefevre - Hin-Tak Leung - Andraž 'ruskie' Levstik - Cary Lewis - Wim Lewis - Xin Li + - Yifeng Li - Eric Lindblad - Lorenzo De Liso + - H.J. Lu - Bela Lubkin + - Chenxi Mao - Gregory Margo - Julien Marrec + - Pierre-Yves Martin + - Ed Maste - Martin Matuška + - Scott McAllister + - Chris McCrohan + - Derwin McGeary + - Ivan A. Melnikov - Jim Meyering - Arkadiusz Miskiewicz + - Nathan Moinvaziri + - Étienne Mollier - Conley Moorhous + - Dirk Müller + - Rainer Müller + - Andrew Murray - Rafał Mużyło - Adrien Nader - Evan Nemerson + - Alexander Neumann - Hongbo Ni - Jonathan Nieder + - Asgeir Storesund Nilsen - Andre Noll + - Ruarí Ødegaard - Peter O'Gorman + - Dimitri Papadopoulos Orfanos + - Daniel Packard - Filip Palian - Peter Pallinger + - Kai Pastor + - Keith Patton - Rui Paulo - Igor Pavlov - Diego Elio Pettenò - Elbert Pol + - Guiorgy Potskhishvili - Mikko Pouru + - Frank Prochnow - Rich Prohaska - Trần Ngọc Quân - Pavel Raiskup + - Matthieu Rakotojaona - Ole André Vadla Ravnås + - Eric S. Raymond - Robert Readman - Bernhard Reutner-Fischer - - Eric S. Raymond + - Markus Rickert - Cristian Rodríguez + - Jeroen Roovers - Christian von Roques + - Boud Roukema - Torsten Rupp + - Stephen Sachs - Jukka Salmi + - Agostino Sarubbo + - Vijay Sarvepalli - Alexandre Sauvé - Benno Schulenberg - Andreas Schwab + - Eli Schwartz + - Peter Seiderer - Bhargava Shastry - Dan Shechter - Stuart Shelton - Sebastian Andrzej Siewior + - Andrej Skenderija + - Ville Skyttä - Brad Smith - Bruce Stark - Pippijn van Steenhoven + - Tobias Stoeckmann + - Martin Storsjö - Jonathan Stott - Dan Stromberg + - Douglas Thor - Vincent Torri + - Alexey Tourbin - Paul Townsend - Mohammed Adnène Trojette - - Alexey Tourbin + - Orange Tsai + - Taiki Tsunekawa + - Mathieu Vachon + - Maksym Vatsyk - Loganaden Velvindron - Patrick J. Volkerding - Martin Väth - Adam Walling - Jeffrey Walton - Christian Weisgerber + - Dan Weiss - Bert Wesarg + - Mark Wielaard - Fredrik Wikstrom - Jim Wilcoxson - Ralf Wildenhues - Charles Wilson - Lars Wirzenius + - Vincent Wixsom - Pilorz Wojciech + - Chien Wong + - Xi Ruoyao - Ryan Young - Andreas Zieringer + - 榆柳松 (ZhengSen Wang) + +Companies: + - Google + - Sandfly Security + +Other credits: + - cleemy desu wayo working with Trend Micro Zero Day Initiative + - Orange Tsai and splitline from DEVCORE Research Team Also thanks to all the people who have participated in the Tukaani project. diff --git a/TODO b/TODO index 45ba433a58..7a0bf16ed8 100644 --- a/TODO +++ b/TODO @@ -5,12 +5,7 @@ XZ Utils To-Do List Known bugs ---------- - The test suite is too incomplete. - - If the memory usage limit is less than about 13 MiB, xz is unable to - automatically scale down the compression settings enough even though - it would be possible by switching from BT2/BT3/BT4 match finder to - HC3/HC4. + The test suite is incomplete. XZ Utils compress some files significantly worse than LZMA Utils. This is due to faster compression presets used by XZ Utils, and @@ -19,15 +14,8 @@ Known bugs compress extremely well, so going from compression ratio of 0.003 to 0.004 means big relative increase in the compressed file size. - xz doesn't quote unprintable characters when it displays file names - given on the command line. - 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. @@ -45,9 +33,6 @@ Missing features be mostly useful when using a preset dictionary in LZMA2, but it may have other uses too. Compare to deflateCopy() in zlib. - Support LZMA_FINISH in raw decoder to indicate end of LZMA1 and - other streams that don't have an end of payload marker. - Adjust dictionary size when the input file size is known. Maybe do this only if an option is given. @@ -59,8 +44,6 @@ Missing features - Implement threaded match finders. - Implement pigz-style threading in LZMA2. - Multithreaded decompression - Buffer-to-buffer coding could use less RAM (especially when decompressing LZMA1 or LZMA2). @@ -73,9 +56,9 @@ Missing features Support LZMA_FULL_FLUSH for lzma_stream_decoder() to stop at Block and Stream boundaries. - lzma_strerror() to convert lzma_ret to human readable form? - This is tricky, because the same error codes are used with - slightly different meanings, and this cannot be fixed anymore. + Error codes from lzma_code() aren't very specific. A more detailed + error message (string) could be provided too. It could be returned + by a new function or use a currently-reserved member of lzma_stream. Make it possible to adjust LZMA2 options in the middle of a Block so that the encoding speed vs. compression ratio can be optimized @@ -103,9 +86,3 @@ Documentation Document the LZMA1 and LZMA2 algorithms. - -Miscellaneous ------------- - - Try to get the media type for .xz registered at IANA. - diff --git a/aclocal.m4 b/aclocal.m4 index e896dacf24..00c2802246 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ 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.69],, -[m4_warning([this file was generated for autoconf 2.69. +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'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' +[am__api_version='1.17' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.17], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.17])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -293,7 +293,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: + # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -391,7 +391,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + 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).]) fi @@ -418,7 +420,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -446,6 +448,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -482,7 +488,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -534,7 +540,21 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -AC_REQUIRE([AM_SILENT_RULES])dnl +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + +AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. @@ -542,47 +562,9 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. +AC_REQUIRE([_AM_PROG_RM_F]) +AC_REQUIRE([_AM_PROG_XARGS_N]) -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. @@ -615,7 +597,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -636,7 +618,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -657,7 +639,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -700,7 +682,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -721,12 +703,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -739,7 +716,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -768,7 +745,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -815,7 +792,23 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_RM_F +# --------------- +# Check whether 'rm -f' without any arguments works. +# https://bugs.gnu.org/10828 +AC_DEFUN([_AM_PROG_RM_F], +[am__rm_f_notfound= +AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) +AC_SUBST(am__rm_f_notfound) +]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -834,16 +827,169 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# _AM_SLEEP_FRACTIONAL_SECONDS +# ---------------------------- +AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl +AC_CACHE_CHECK([whether sleep supports fractional seconds], + am_cv_sleep_fractional_seconds, [dnl +AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], + [am_cv_sleep_fractional_seconds=no]) +])]) + +# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION +# ----------------------------------- +# Determine the filesystem's resolution for file modification +# timestamps. The coarsest we know of is FAT, with a resolution +# of only two seconds, even with the most recent "exFAT" extensions. +# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one +# nanosecond, matching clock_gettime. However, it is probably not +# possible to delay execution of a shell script for less than one +# millisecond, due to process creation overhead and scheduling +# granularity, so we don't check for anything finer than that. (See below.) +AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl +AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) +AC_CACHE_CHECK([filesystem timestamp resolution], + am_cv_filesystem_timestamp_resolution, [dnl +# Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# ; be careful, easy to get confused.) +if ( + set X `[ls -t conftest.ts[12]]` && + { + test "$[]*" != "X conftest.ts1 conftest.ts2" || + test "$[]*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + _AS_ECHO_UNQUOTED( + ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], + [AS_MESSAGE_LOG_FD]) + AC_MSG_FAILURE([ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment.]) +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$[]2" = conftest.ts3 && + test "$[]3" = conftest.ts2 && + test "$[]4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) +])]) + # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) +[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) +# This check should not be cached, as it may vary across builds of +# different projects. +AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -862,49 +1008,40 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[]*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$[]2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +AC_MSG_RESULT([$am_build_env_is_sane]) +if test "$am_build_env_is_sane" = no; then + AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT([yes]) + # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & +AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl + ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! -fi +]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then @@ -915,18 +1052,18 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl +# _AM_SILENT_RULES +# ---------------- +# Enable less verbose build rules support. +AC_DEFUN([_AM_SILENT_RULES], +[AM_DEFAULT_VERBOSITY=1 +AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -934,11 +1071,6 @@ AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. @@ -957,14 +1089,6 @@ am__doit: else am_cv_make_support_nested_variables=no fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl @@ -973,9 +1097,33 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls +dnl to AM_SILENT_RULES to change the default value. +AC_CONFIG_COMMANDS_PRE([dnl +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or +# empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_REQUIRE([_AM_SILENT_RULES]) +AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1003,7 +1151,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1022,7 +1170,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1068,15 +1216,19 @@ m4_if([$1], [v7], am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) + if test x$am_uid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) + elif test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - _am_tools=none + AC_MSG_RESULT([no]) + _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) + if test x$gm_gid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) + elif test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none @@ -1153,8 +1305,28 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/ax_check_capsicum.m4]) +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_XARGS_N +# ---------------- +# Check whether 'xargs -n' works. It should work everywhere, so the fallback +# is not optimized at all as we never expect to use it. +AC_DEFUN([_AM_PROG_XARGS_N], +[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl +AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) +AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl + am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' +])dnl +AC_SUBST(am__xargs_n) +]) + 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 old mode 100644 new mode 100755 index 020c365c70..231344d4de --- 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 @@ -21,13 +19,24 @@ ${AUTOMAKE:-automake} -acf --foreign # 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 to 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. -if test "x$1" != "x--no-po4a"; then +# Pass --no-po4a to 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" + +for arg in "$@" +do + case $arg in + "--no-po4a") + generate_po4a="n" + ;; + esac +done + +if test "$generate_po4a" != "n"; then cd po4a sh update-po + cd .. fi exit 0 diff --git a/build-aux/compile b/build-aux/compile old mode 100644 new mode 100755 index 99e50524b3..49b3d05fde --- a/build-aux/compile +++ b/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -143,7 +143,7 @@ func_cl_wrapper () # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "compile $scriptversion" + echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; diff --git a/build-aux/config.guess b/build-aux/config.guess old mode 100644 new mode 100755 index 256083a70d..48a684601b --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. -timestamp='2018-03-08' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2024-07-27' # 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 -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,17 +29,25 @@ timestamp='2018-03-08' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + 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 @@ -50,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 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 @@ -84,85 +94,109 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # 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. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c17 c99 c89 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -174,12 +208,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -188,18 +222,18 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -215,7 +249,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -226,7 +260,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -237,45 +271,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -289,7 +335,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -326,117 +372,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + # 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 + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -446,43 +496,43 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -508,82 +558,84 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -593,16 +645,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -610,64 +662,65 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + if test "$HP_ARCH" = ""; then + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -698,9 +751,9 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,14 +772,14 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -754,36 +807,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -791,17 +844,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -809,103 +863,155 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + 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:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + 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 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -916,183 +1022,245 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + 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:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + 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 __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=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + 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. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1100,12 +1268,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1115,11 +1283,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1127,31 +1295,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1176,249 +1344,411 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-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:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +int +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld -# should be set by the caller. -# -# The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer @@ -25,6 +17,81 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. +# func_usage +# outputs to stdout the --help usage message. +func_usage () +{ + echo "\ +Usage: config.rpath [OPTION] HOST + +Prints shell variable assignments that describe how to hardcode a directory +for the lookup of shared libraries into a binary (executable or shared library). + +The first argument passed to this file is the canonical host specification, + CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +or + CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + +The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +should be set by the caller. + +The set of defined variables is at the end of this script. + +Options: + --help print this help and exit + --version print version information and exit + +Send patches and bug reports to ." +} + +# func_version +# outputs to stdout the --version message. +func_version () +{ + echo "config.rpath (GNU gnulib, module havelib)" + echo "Copyright (C) 2024 Free Software Foundation, Inc. +License: All-Permissive. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + echo + printf 'Written by %s.\n' "Bruno Haible" +} + +# func_fatal_error message +# outputs to stderr a fatal error message, and terminates the program. +func_fatal_error () +{ + echo "config.rpath: *** $1" 1>&2 + echo "config.rpath: *** Stop." 1>&2 + exit 1 +} + +# Command-line option processing. +while test $# -gt 0; do + case "$1" in + --help | --hel | --he | --h ) + func_usage + exit 0 ;; + --version | --versio | --versi | --vers | --ver | --ve | --v ) + func_version + exit 0 ;; + -- ) # Stop option processing + shift; break ;; + -* ) + func_fatal_error "unrecognized option: $1" + ;; + * ) + break ;; + esac +done + +if test $# -gt 1; then + func_fatal_error "too many arguments" +fi +if test $# -lt 1; then + func_fatal_error "too few arguments" +fi + # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a @@ -371,7 +438,7 @@ else hardcode_direct=yes hardcode_minus_L=yes ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; @@ -547,7 +614,7 @@ case "$host_os" in freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) library_names_spec='$libname$shrext' ;; gnu*) diff --git a/build-aux/config.sub b/build-aux/config.sub old mode 100644 new mode 100755 index 9ccf09a7a3..4aaae46f6f --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. -timestamp='2018-03-08' +# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale + +timestamp='2024-05-27' # 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 -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ timestamp='2018-03-08' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ timestamp='2018-03-08' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 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 @@ -89,7 +98,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -110,1223 +119,1371 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -lynx*) - os=-lynxos + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + cloudabi*-eabi* \ + | kfreebsd*-gnu* \ + | knetbsd*-gnu* \ + | kopensolaris*-gnu* \ + | linux-* \ + | managarm-* \ + | netbsd*-eabi* \ + | netbsd*-gnu* \ + | nto-qnx* \ + | os2-emx* \ + | rtmk-nova* \ + | storm-chaos* \ + | uclinux-gnu* \ + | uclinux-uclibc* \ + | windows-* ) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac ;; - -psos*) - os=-psos + *-*) + case $field1-$field2 in + # Shorthands that happen to contain a single dash + convex-c[12] | convex-c3[248]) + basic_machine=$field2-convex + basic_os= + ;; + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Do not treat sunos as a manufacturer + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + 3100* \ + | 32* \ + | 3300* \ + | 3600* \ + | 7300* \ + | acorn \ + | altos* \ + | apollo \ + | apple \ + | atari \ + | att* \ + | axis \ + | be \ + | bull \ + | cbm \ + | ccur \ + | cisco \ + | commodore \ + | convergent* \ + | convex* \ + | cray \ + | crds \ + | dec* \ + | delta* \ + | dg \ + | digital \ + | dolphin \ + | encore* \ + | gould \ + | harris \ + | highlevel \ + | hitachi* \ + | hp \ + | ibm* \ + | intergraph \ + | isi* \ + | knuth \ + | masscomp \ + | microblaze* \ + | mips* \ + | motorola* \ + | ncr* \ + | news \ + | next \ + | ns \ + | oki \ + | omron* \ + | pc533* \ + | rebel \ + | rom68k \ + | rombug \ + | semi \ + | sequent* \ + | siemens \ + | sgi* \ + | siemens \ + | sim \ + | sni \ + | sony* \ + | stratus \ + | sun \ + | sun[234]* \ + | tektronix \ + | tti* \ + | ultra \ + | unicom* \ + | wec \ + | winbond \ + | wrs) + basic_machine=$field1-$field2 + basic_os= + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # 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) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux + cpu=powerpc + vendor=ibm + basic_os=cnk ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 ;; - nindy960) - basic_machine=i960-intel - os=-nindy + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) + cpu=m68k + vendor=motorola + ;; + # This used to be dpx2*, but that gets the RS6000-based + # DPX/20 and the x86-based DPX/2-100 wrong. See + # https://oldskool.silicium.org/stations/bull_dpx20.htm + # https://www.feb-patrimoine.com/english/bull_dpx2.htm + # https://www.feb-patrimoine.com/english/unix_and_bull.htm + dpx2 | dpx2[23]00 | dpx2[23]xx) + cpu=m68k + vendor=bull + ;; + dpx2100 | dpx21xx) + cpu=i386 + vendor=bull + ;; + dpx20) + cpu=rs6000 + vendor=bull ;; - mon960) - basic_machine=i960-intel - os=-mon960 + encore | umax | mmax) + cpu=ns32k + vendor=encore ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} ;; - np1) - basic_machine=np1-gould + fx2800) + cpu=i860 + vendor=alliant ;; - neo-tandem) - basic_machine=neo-tandem + genix) + cpu=ns32k + vendor=ns ;; - nse-tandem) - basic_machine=nse-tandem + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; - nsr-tandem) - basic_machine=nsr-tandem + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp ;; - nsv-tandem) - basic_machine=nsv-tandem + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp ;; - nsx-tandem) - basic_machine=nsx-tandem + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp ;; - openrisc | openrisc-*) - basic_machine=or32-unknown + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp ;; - os400) - basic_machine=powerpc-ibm - os=-os400 + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp ;; - os68k) - basic_machine=m68k-none - os=-os68k + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp ;; - paragon) - basic_machine=i860-intel - os=-osf + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 ;; - parisc) - basic_machine=hppa-unknown - os=-linux + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv ;; - pbd) - basic_machine=sparc-tti + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 ;; - pbb) - basic_machine=m68k-tti + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac ;; - pc98) - basic_machine=i386-pc + miniframe) + cpu=m68000 + vendor=convergent ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc + next | m*-next) + cpu=m68k + vendor=next ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + np1) + cpu=np1 + vendor=gould ;; - pentium4) - basic_machine=i786-pc + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + pbd) + cpu=sparc + vendor=tti ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + pbb) + cpu=m68k + vendor=tti ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + pc532) + cpu=ns32k + vendor=pc532 ;; pn) - basic_machine=pn-gould + cpu=pn + vendor=gould ;; - power) basic_machine=power-ibm + power) + cpu=power + vendor=ibm ;; - ppc | ppcbe) basic_machine=powerpc-unknown + ps2) + cpu=i386 + vendor=ibm ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + rm[46]00) + cpu=mips + vendor=siemens ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} ;; - ppc64) basic_machine=powerpc64-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - ps2) - basic_machine=i386-ibm + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none ;; - pw32) - basic_machine=i586-unknown - os=-pw32 + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - rdos32) - basic_machine=i386-pc - os=-rdos + + *-*) + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a \ + | 580 \ + | [cjt]90 \ + | a29k \ + | aarch64 \ + | aarch64_be \ + | aarch64c \ + | abacus \ + | alpha \ + | alpha64 \ + | alpha64ev56 \ + | alpha64ev6[78] \ + | alpha64ev[4-8] \ + | alpha64pca5[67] \ + | alphaev56 \ + | alphaev6[78] \ + | alphaev[4-8] \ + | alphapca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc \ + | arc32 \ + | arc64 \ + | arceb \ + | arm \ + | arm64e \ + | arm64ec \ + | arm[lb]e \ + | arme[lb] \ + | armv* \ + | asmjs \ + | avr \ + | avr32 \ + | ba \ + | be32 \ + | be64 \ + | bfin \ + | bpf \ + | bs2000 \ + | c30 \ + | c4x \ + | c8051 \ + | c[123]* \ + | clipper \ + | craynv \ + | csky \ + | cydra \ + | d10v \ + | d30v \ + | dlx \ + | dsp16xx \ + | e2k \ + | elxsi \ + | epiphany \ + | f30[01] \ + | f700 \ + | fido \ + | fr30 \ + | frv \ + | ft32 \ + | fx80 \ + | h8300 \ + | h8500 \ + | hexagon \ + | hppa \ + | hppa1.[01] \ + | hppa2.0 \ + | hppa2.0[nw] \ + | hppa64 \ + | i*86 \ + | i370 \ + | i860 \ + | i960 \ + | ia16 \ + | ia64 \ + | ip2k \ + | iq2000 \ + | javascript \ + | k1om \ + | kvx \ + | le32 \ + | le64 \ + | lm32 \ + | loongarch32 \ + | loongarch64 \ + | m32c \ + | m32r \ + | m32rle \ + | m5200 \ + | m68000 \ + | m680[012346]0 \ + | m6811 \ + | m6812 \ + | m68360 \ + | m683?2 \ + | m68hc11 \ + | m68hc12 \ + | m68hcs12x \ + | m68k \ + | m88110 \ + | m88k \ + | maxq \ + | mb \ + | mcore \ + | mep \ + | metag \ + | microblaze \ + | microblazeel \ + | mips* \ + | mmix \ + | mn10200 \ + | mn10300 \ + | moxie \ + | msp430 \ + | mt \ + | nanomips* \ + | nds32 \ + | nds32be \ + | nds32le \ + | nfp \ + | nios \ + | nios2 \ + | nios2eb \ + | nios2el \ + | none \ + | np1 \ + | ns16k \ + | ns32k \ + | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 \ + | pdp11 \ + | picochip \ + | pj \ + | pjl \ + | pn \ + | power \ + | powerpc \ + | powerpc64 \ + | powerpc64le \ + | powerpcle \ + | powerpcspe \ + | pru \ + | pyramid \ + | riscv \ + | riscv32 \ + | riscv32be \ + | riscv64 \ + | riscv64be \ + | rl78 \ + | romp \ + | rs6000 \ + | rx \ + | s390 \ + | s390x \ + | score \ + | sh \ + | sh64 \ + | sh64le \ + | sh[12345][lb]e \ + | sh[1234] \ + | sh[1234]e[lb] \ + | sh[23]e \ + | sh[23]ele \ + | sh[24]a \ + | sh[24]ae[lb] \ + | sh[lb]e \ + | she[lb] \ + | shl \ + | sparc \ + | sparc64 \ + | sparc64b \ + | sparc64v \ + | sparc86x \ + | sparclet \ + | sparclite \ + | sparcv8 \ + | sparcv9 \ + | sparcv9b \ + | sparcv9v \ + | spu \ + | sv1 \ + | sx* \ + | tahoe \ + | thumbv7* \ + | tic30 \ + | tic4x \ + | tic54x \ + | tic55x \ + | tic6x \ + | tic80 \ + | tron \ + | ubicom32 \ + | v70 \ + | v810 \ + | v850 \ + | v850e \ + | v850e1 \ + | v850e2 \ + | v850e2v3 \ + | v850es \ + | vax \ + | vc4 \ + | visium \ + | w65 \ + | wasm32 \ + | wasm64 \ + | we32k \ + | x86 \ + | x86_64 \ + | xc16x \ + | xgate \ + | xps100 \ + | xstormy16 \ + | xtensa* \ + | ymp \ + | z80 \ + | z8k) + ;; + + *) + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,203 +1491,247 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$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 + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + saved_IFS=$IFS + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1543,254 +1744,606 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +kernel= +obj= +case $cpu-$vendor in score-*) - os=-elf + os= + obj=elf ;; spu-*) - os=-elf + os= + obj=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + kernel=linux + 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-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os= + obj=aout ;; mep-*) - os=-elf + os= + obj=elf + ;; + # The -sgi and -siemens entries must be before the mips- entry + # or we get the wrong os. + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 ;; 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 + # This must be before the sparc-* entry or we get the wrong os. + *-tti) + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os= + obj=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiuxwe2 ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 + os=bsd ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os= + obj=coff ;; *-*bug) - os=-coff + os= + obj=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac + fi +# 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. + llvm* | musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # 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. + # Each alternative MUST end in a * to match a version number. + abug \ + | aix* \ + | amdhsa* \ + | amigados* \ + | amigaos* \ + | android* \ + | aof* \ + | aos* \ + | aros* \ + | atheos* \ + | auroraux* \ + | aux* \ + | beos* \ + | bitrig* \ + | bme* \ + | bosx* \ + | bsd* \ + | cegcc* \ + | chorusos* \ + | chorusrdb* \ + | clix* \ + | cloudabi* \ + | cnk* \ + | conix* \ + | cos* \ + | cxux* \ + | cygwin* \ + | darwin* \ + | dgux* \ + | dicos* \ + | dnix* \ + | domain* \ + | dragonfly* \ + | drops* \ + | ebmon* \ + | ecoff* \ + | ekkobsd* \ + | emscripten* \ + | emx* \ + | es* \ + | fiwix* \ + | freebsd* \ + | fuchsia* \ + | genix* \ + | genode* \ + | glidix* \ + | gnu* \ + | go32* \ + | haiku* \ + | hcos* \ + | hiux* \ + | hms* \ + | hpux* \ + | ieee* \ + | interix* \ + | ios* \ + | iris* \ + | irix* \ + | ironclad* \ + | isc* \ + | its* \ + | l4re* \ + | libertybsd* \ + | lites* \ + | lnews* \ + | luna* \ + | lynxos* \ + | mach* \ + | macos* \ + | magic* \ + | mbr* \ + | midipix* \ + | midnightbsd* \ + | mingw32* \ + | mingw64* \ + | minix* \ + | mint* \ + | mirbsd* \ + | mks* \ + | mlibc* \ + | mmixware* \ + | mon960* \ + | morphos* \ + | moss* \ + | moxiebox* \ + | mpeix* \ + | mpw* \ + | msdos* \ + | msys* \ + | mvs* \ + | nacl* \ + | netbsd* \ + | netware* \ + | newsos* \ + | nextstep* \ + | nindy* \ + | nonstopux* \ + | nova* \ + | nsk* \ + | nucleus* \ + | nx6 \ + | nx7 \ + | oabi* \ + | ohos* \ + | onefs* \ + | openbsd* \ + | openedition* \ + | openstep* \ + | os108* \ + | os2* \ + | os400* \ + | os68k* \ + | os9* \ + | ose* \ + | osf* \ + | oskit* \ + | osx* \ + | palmos* \ + | phoenix* \ + | plan9* \ + | powermax* \ + | powerunix* \ + | proelf* \ + | psos* \ + | psp* \ + | ptx* \ + | pw32* \ + | qnx* \ + | rdos* \ + | redox* \ + | rhapsody* \ + | riscix* \ + | riscos* \ + | rtems* \ + | rtmk* \ + | rtu* \ + | scout* \ + | secbsd* \ + | sei* \ + | serenity* \ + | sim* \ + | skyos* \ + | solaris* \ + | solidbsd* \ + | sortix* \ + | storm-chaos* \ + | sunos \ + | sunos[34]* \ + | superux* \ + | syllable* \ + | sym* \ + | sysv* \ + | tenex* \ + | tirtos* \ + | toppers* \ + | tops10* \ + | tops20* \ + | tpf* \ + | tvos* \ + | twizzler* \ + | uclinux* \ + | udi* \ + | udk* \ + | ultrix* \ + | unicos* \ + | uniplus* \ + | unleashed* \ + | unos* \ + | uwin* \ + | uxpv* \ + | v88r* \ + |*vms* \ + | vos* \ + | vsta* \ + | vxsim* \ + | vxworks* \ + | wasi* \ + | watchos* \ + | wince* \ + | windiss* \ + | windows* \ + | winnt* \ + | xenix* \ + | xray* \ + | zephyr* \ + | zvmoe* ) + ;; + # 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': 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-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) + ;; + uclinux-uclibc*- | uclinux-gnu*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) + ;; + windows*-msvc*-) + ;; + -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 + exit 1 + ;; + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) + ;; + rtmk-nova-) + ;; + *-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. + ;; + --*) + # 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 + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - -sunos*) + *-sunos* | *-solaris*) vendor=sun ;; - -cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - -beos*) + *-beos*) vendor=be ;; - -hpux*) + *-hpux*) vendor=hp ;; - -mpeix*) + *-mpeix*) vendor=hp ;; - -hiux*) + *-hiux*) vendor=hitachi ;; - -unos*) + *-unos*) vendor=crds ;; - -dgux*) + *-dgux*) vendor=dg ;; - -luna*) + *-luna*) vendor=omron ;; - -genix*) + *-genix*) vendor=ns ;; - -mvs* | -opened*) + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - -os400*) + s390-* | s390x-*) vendor=ibm ;; - -ptx*) + *-ptx*) vendor=sequent ;; - -tpf*) + *-tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - -aux*) + *-aux*) vendor=apple ;; - -hms*) + *-hms*) vendor=hitachi ;; - -mpw* | -macos*) + *-mpw* | *-macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - -vos*) + *-vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/build-aux/depcomp b/build-aux/depcomp old mode 100644 new mode 100755 index 65cbf7093a..1f0aa972c9 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,11 +47,13 @@ Environment variables: libtool Whether libtool is used (yes/no). Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "depcomp $scriptversion" + echo "depcomp (GNU Automake) $scriptversion" exit $? ;; esac @@ -113,7 +115,6 @@ nl=' # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then @@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" -# Avoid interferences from the environment. +# Avoid interference from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We @@ -198,8 +199,8 @@ gcc3) ;; gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. +## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: diff --git a/build-aux/install-sh b/build-aux/install-sh old mode 100644 new mode 100755 index 8175c640fe..b1d7a6f67f --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2024-06-19.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ posix_mkdir= # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,19 +104,29 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." while test $# -ne 0; do case $1 in @@ -137,8 +152,13 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -150,7 +170,7 @@ while test $# -ne 0; do -T) is_target_a_directory=never;; - --version) echo "$0 $scriptversion"; exit $?;; + --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; --) shift break;; @@ -255,6 +275,10 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ do fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibility with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ do then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ do prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ do trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ do then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff --git a/build-aux/license-check.sh b/build-aux/license-check.sh new file mode 100644 index 0000000000..e994233ec7 --- /dev/null +++ b/build-aux/license-check.sh @@ -0,0 +1,177 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +############################################################################### +# +# Look for missing license info in xz.git +# +# The project doesn't conform to the FSFE REUSE specification for now. +# Instead, this script helps in finding files that lack license info. +# Pass -v as an argument to get license info from all files in xz.git or, +# when .git isn't available, from files extracted from a release tarball +# (in case of a release tarball, the tree must be clean of any extra files). +# +# NOTE: This relies on non-POSIX xargs -0. It's supported on GNU and *BSDs. +# +############################################################################### +# +# Author: Lasse Collin +# +############################################################################### + +# Print good files too if -v is passed as an argument. +VERBOSE=false +case $1 in + '') + ;; + -v) + VERBOSE=true + ;; + *) + echo "Usage: $0 [-v]" + exit 1 + ;; +esac + + +# Use the C locale so that sorting is always the same. +LC_ALL=C +export LC_ALL + + +# String to match the SPDX license identifier tag. +# Spell it here in a way that doesn't match regular grep patterns. +SPDX_LI='SPDX''-License-''Identifier'':' + +# Pattern for files that don't contain SPDX tags but they are under +# a free license that isn't 0BSD. +PAT_UNTAGGED_MISC='^COPYING\. +^INSTALL\.generic$' + +# Pattern for files that are 0BSD but don't contain SPDX tags. +# (The two file format specification files are public domain but +# they can be treated as 0BSD too.) +PAT_UNTAGGED_0BSD='^(.*/)?\.gitattributes$ +^(.*/)?\.gitignore$ +^\.github/SECURITY\.md$ +^AUTHORS$ +^COPYING$ +^ChangeLog$ +^INSTALL$ +^NEWS$ +^PACKAGERS$ +^(.*/)?README$ +^THANKS$ +^TODO$ +^(.*/)?[^/]+\.txt$ +^doc/SHA256SUMS$ +^po/LINGUAS$ +^src/common/w32_application\.manifest$ +^tests/xzgrep_expected_output$ +^tests/files/[^/]+\.(lz|lzma|xz)$' + +# Pattern for files that must be ignored when Git isn't available. This is +# useful when this script is run right after extracting a release tarball. +PAT_TARBALL_IGNORE='^(m4/)?[^/]*\.m4$ +^(.*/)?Makefile\.in(\.in)?$ +^(po|po4a)/.*[^.]..$ +^ABOUT-NLS$ +^build-aux/(config\..*|ltmain\.sh|[^.]*)$ +^config\.h\.in$ +^configure$' + + +# Go to the top source dir. +cd "$(dirname "$0")/.." || exit 1 + +# Get the list of files to check from git if possible. +# Otherwise list the whole source tree. This script should pass +# if it is run right after extracting a release tarball. +if test -d .git && type git > /dev/null 2>&1; then + FILES=$(git ls-files) || exit 1 + IS_TARBALL=false +else + FILES=$(find . -type f) || exit 1 + FILES=$(printf '%s\n' "$FILES" | sed 's,^\./,,') + IS_TARBALL=true +fi + +# Sort to keep the order consistent. +FILES=$(printf '%s\n' "$FILES" | sort) + + +# Find the tagged files. +TAGGED=$(printf '%s\n' "$FILES" \ + | tr '\n' '\000' | xargs -0r grep -l "$SPDX_LI" --) + +# Find the tagged 0BSD files. +TAGGED_0BSD=$(printf '%s\n' "$TAGGED" \ + | tr '\n' '\000' | xargs -0r grep -l "$SPDX_LI 0BSD" --) + +# Find the tagged non-0BSD files, that is, remove the 0BSD-tagged files +# from the list of tagged files. +TAGGED_MISC=$(printf '%s\n%s\n' "$TAGGED" "$TAGGED_0BSD" | sort | uniq -u) + + +# Remove the tagged files from the list. +FILES=$(printf '%s\n%s\n' "$FILES" "$TAGGED" | sort | uniq -u) + +# Find the intentionally-untagged files. +UNTAGGED_0BSD=$(printf '%s\n' "$FILES" | grep -E "$PAT_UNTAGGED_0BSD") +UNTAGGED_MISC=$(printf '%s\n' "$FILES" | grep -E "$PAT_UNTAGGED_MISC") + +# Remove the intentionally-untagged files from the list. +FILES=$(printf '%s\n' "$FILES" | grep -Ev \ + -e "$PAT_UNTAGGED_0BSD" -e "$PAT_UNTAGGED_MISC") + + +# FIXME: Allow untagged translations if they have a public domain notice. +# These are old translations that haven't been updated after 2024-02-14. +# Eventually these should go away. +PD_PO=$(printf '%s\n' "$FILES" | grep '\.po$' | tr '\n' '\000' \ + | xargs -0r grep -Fl '# This file is put in the public domain.' --) + +if test -n "$PD_PO"; then + # Remove the public domain .po files from the list. + FILES=$(printf '%s\n%s\n' "$FILES" "$PD_PO" | sort | uniq -u) +fi + + +# Remove generated files from the list which don't have SPDX tags but which +# can be present in release tarballs. This step is skipped when the file list +# is from "git ls-files". +GENERATED= +if $IS_TARBALL; then + GENERATED=$(printf '%s\n' "$FILES" | grep -E "$PAT_TARBALL_IGNORE") + FILES=$(printf '%s\n' "$FILES" | grep -Ev "$PAT_TARBALL_IGNORE") +fi + + +if $VERBOSE; then + printf '# Tagged 0BSD files:\n%s\n\n' "$TAGGED_0BSD" + printf '# Intentionally untagged 0BSD:\n%s\n\n' "$UNTAGGED_0BSD" + + # FIXME: Remove when no longer needed. + if test -n "$PD_PO"; then + printf '# Old public domain translations:\n%s\n\n' "$PD_PO" + fi + + printf '# Tagged non-0BSD files:\n%s\n\n' "$TAGGED_MISC" + printf '# Intentionally untagged miscellaneous: \n%s\n\n' \ + "$UNTAGGED_MISC" + + if test -n "$GENERATED"; then + printf '# Generated files whose license was NOT checked:\n%s\n\n' \ + "$GENERATED" + fi +fi + + +# Look for files with an unknown license and set the exit status accordingly. +STATUS=0 +if test -n "$FILES"; then + printf '# ERROR: Licensing is unclear:\n%s\n' "$FILES" + STATUS=1 +fi + +exit "$STATUS" diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 48cea9b0e5..a7cbc61e00 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2018-07-24.06 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6.42-b88ce-dirty +# libtool (GNU libtool) 2.5.4.1-baa1-dirty # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2018 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.6.42-b88ce-dirty -package_revision=2.4.6.42 +VERSION=2.5.4.1-baa1-dirty +package_revision=2.5.4.1 ## ------ ## @@ -64,7 +64,7 @@ package_revision=2.4.6.42 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2018-07-24.06; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -72,11 +72,11 @@ scriptversion=2018-07-24.06; # UTC # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Copyright (C) 2004-2018 Bootstrap Authors +# Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# , and GPL version 3 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. @@ -130,6 +130,12 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -137,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 && { @@ -368,6 +374,35 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -554,7 +589,7 @@ func_require_term_colors () # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. + # usable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes @@ -704,7 +739,7 @@ eval 'func_dirname () # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. -# value retuned in "$func_basename_result" +# value returned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () @@ -862,7 +897,7 @@ func_mkdir_p () # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. + # list in case some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done @@ -1108,6 +1143,8 @@ func_quote_portable () { $debug_cmd + $require_check_ifs_backslash + func_quote_portable_result=$2 # one-time-loop (easy break) @@ -1122,8 +1159,10 @@ func_quote_portable () # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) - case $func_quote_portable_result in - *[\[\*\?]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break @@ -1497,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-2018 Bootstrap Authors +# Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license -# , and GPL version 3 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. @@ -1510,7 +1549,7 @@ func_lt_ver () # # Set a version string for this script. -scriptversion=2018-07-24.06; # UTC +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -2056,7 +2095,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -2082,7 +2121,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2176,7 +2215,30 @@ func_version () # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6.42-b88ce-dirty' +scriptversion='(GNU libtool) 2.5.4.1-baa1-dirty' + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + year=`date +%Y` + + cat < +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Originally written by Gordon Matzigkeit, 1996 +(See AUTHORS for complete contributor listing) +EOF + + exit $? +} # func_echo ARG... @@ -2199,18 +2261,6 @@ func_echo () } -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - ## ---------------- ## ## Options parsing. ## ## ---------------- ## @@ -2222,19 +2272,23 @@ usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information + --finish use operation '--mode=finish' + --mode=MODE use operation mode MODE + --no-finish don't update shared library cache + --no-quiet, --no-silent print default informational messages + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --reorder-cache=DIRS reorder shared library cache for preferred DIRS + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. @@ -2267,13 +2321,13 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6.42-b88ce-dirty + version: $progname $scriptversion 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 } @@ -2463,8 +2517,11 @@ libtool_options_prep () opt_dry_run=false opt_help=false opt_mode= + opt_reorder_cache=false opt_preserve_dup_deps=false opt_quiet=false + opt_finishing=true + opt_warning= nonopt= preserve_args= @@ -2554,14 +2611,18 @@ libtool_parse_options () clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" + *) func_error "invalid argument '$1' for $_G_opt" exit_cmd=exit - break ;; esac shift ;; + --no-finish) + opt_finishing=false + func_append preserve_args " $_G_opt" + ;; + --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" @@ -2577,6 +2638,24 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; + --reorder-cache) + opt_reorder_cache=true + shared_lib_dirs=$1 + if test -n "$shared_lib_dirs"; then + case $1 in + # Must begin with /: + /*) ;; + + # Catch anything else as an error (relative paths) + *) func_error "invalid argument '$1' for $_G_opt" + func_error "absolute paths are required for $_G_opt" + exit_cmd=exit + ;; + esac + fi + shift + ;; + --silent|--quiet) opt_quiet=: opt_verbose=false @@ -2613,6 +2692,18 @@ libtool_parse_options () func_add_hook func_parse_options libtool_parse_options +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + if $opt_warning; then + $debug_cmd + $warning_func ${1+"$@"} + fi +} + # libtool_validate_options [ARG]... # --------------------------------- @@ -2629,10 +2720,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=: ;; @@ -2964,7 +3055,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. # @@ -2996,9 +3087,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. @@ -3141,6 +3233,15 @@ func_convert_path_front_back_pathsep () # end func_convert_path_front_back_pathsep +# func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER +# Replaces a delimiter for a given path. +func_convert_delimited_path () +{ + converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"` +} +# end func_convert_delimited_path + + ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## @@ -3475,6 +3576,65 @@ func_dll_def_p () } +# func_reorder_shared_lib_cache DIRS +# Reorder the shared library cache by unconfiguring previous shared library cache +# and configuring preferred search directories before previous search directories. +# Previous shared library cache: /usr/lib /usr/local/lib +# Preferred search directories: /tmp/testing +# Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib +func_reorder_shared_lib_cache () +{ + $debug_cmd + + case $host_os in + openbsd*) + get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` + func_convert_delimited_path "$get_search_directories" ':' '\ ' + save_search_directories=$converted_path + func_convert_delimited_path "$1" ':' '\ ' + + # Ensure directories exist + for dir in $converted_path; do + # Ensure each directory is an absolute path + case $dir in + /*) ;; + *) func_error "Directory '$dir' is not an absolute path" + exit $EXIT_FAILURE ;; + esac + # Ensure no trailing slashes + func_stripname '' '/' "$dir" + dir=$func_stripname_result + if test -d "$dir"; then + if test -n "$preferred_search_directories"; then + preferred_search_directories="$preferred_search_directories $dir" + else + preferred_search_directories=$dir + fi + else + func_error "Directory '$dir' does not exist" + exit $EXIT_FAILURE + fi + done + + PATH="$PATH:/sbin" ldconfig -U $save_search_directories + PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories + get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` + func_convert_delimited_path "$get_search_directories" ':' '\ ' + reordered_search_directories=$converted_path + + $ECHO "Original: $save_search_directories" + $ECHO "Reordered: $reordered_search_directories" + exit $EXIT_SUCCESS + ;; + *) + func_error "--reorder-cache is not supported for host_os=$host_os." + exit $EXIT_FAILURE + ;; + esac +} +# end func_reorder_shared_lib_cache + + # func_mode_compile arg... func_mode_compile () { @@ -3653,7 +3813,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 @@ -3862,7 +4022,8 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3968,6 +4129,8 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4044,6 +4207,12 @@ if $opt_help; then fi +# If option '--reorder-cache', reorder the shared library cache and exit. +if $opt_reorder_cache; then + func_reorder_shared_lib_cache $shared_lib_dirs +fi + + # func_mode_execute arg... func_mode_execute () { @@ -4228,7 +4397,7 @@ func_mode_finish () fi fi - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -4253,6 +4422,12 @@ func_mode_finish () for libdir in $libdirs; do $ECHO " $libdir" done + if test "false" = "$opt_finishing"; then + echo + echo "NOTE: finish_cmds were not executed during testing, so you must" + echo "manually run ldconfig to add a given test directory, LIBDIR, to" + echo "the search path for generated executables." + fi echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" @@ -4489,8 +4664,15 @@ func_mode_install () func_append dir "$objdir" if test -n "$relink_command"; then + # Strip any trailing slash from the destination. + func_stripname '' '/' "$libdir" + destlibdir=$func_stripname_result + + func_stripname '' '/' "$destdir" + s_destdir=$func_stripname_result + # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -4527,7 +4709,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= @@ -4640,7 +4822,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 @@ -4868,7 +5050,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"' ;; @@ -4880,7 +5062,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"' ;; @@ -4894,7 +5076,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" @@ -4920,8 +5102,16 @@ extern \"C\" { eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + case $host in + i[3456]86-*-mingw32*) + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + ;; + *) + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'" + ;; + esac } else # not an import lib $opt_dry_run || { @@ -5069,7 +5259,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%"` @@ -5145,7 +5335,7 @@ func_win32_libid () *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || @@ -5412,7 +5602,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. @@ -5420,7 +5610,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 () { @@ -5545,7 +5735,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 @@ -5613,7 +5803,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 @@ -5745,7 +5935,7 @@ EOF #endif #include #include -#ifdef _MSC_VER +#if defined _WIN32 && !defined __GNUC__ # include # include # include @@ -5770,7 +5960,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__ @@ -5968,7 +6158,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);" ;; @@ -5987,7 +6177,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 @@ -6071,7 +6261,7 @@ EOF EOF case $host_os in - mingw*) + mingw* | windows*) cat <<"EOF" { char* p; @@ -6113,7 +6303,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); @@ -6532,7 +6722,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(). @@ -6707,7 +6897,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 @@ -6731,6 +6921,7 @@ func_mode_link () finalize_command=$nonopt compile_rpath= + compile_rpath_tail= finalize_rpath= compile_shlibpath= finalize_shlibpath= @@ -6771,10 +6962,12 @@ func_mode_link () xrpath= perm_rpath= temp_rpath= + temp_rpath_tail= thread_safe=no vinfo= vinfo_number=no weak_libs= + rpath_arg= single_module=$wl-single_module func_infer_tag $base_compile @@ -7037,7 +7230,7 @@ func_mode_link () case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - func_fatal_error "only absolute run-paths are allowed" + func_fatal_error "argument to -rpath is not absolute: $arg" ;; esac if test rpath = "$prev"; then @@ -7064,6 +7257,13 @@ func_mode_link () prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7206,7 +7406,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:"*) ;; @@ -7226,7 +7426,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 ;; @@ -7234,7 +7434,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*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7254,7 +7454,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7277,16 +7477,29 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) + # -q