Browse Source

Update contrib/libs/lzma to 5.6.0
de6c124a343d1b577cd3e4a152607415cfd3de0e

robot-contrib 11 months ago
parent
commit
1f10341ce6

+ 27 - 13
contrib/libs/lzma/AUTHORS

@@ -9,15 +9,13 @@ Authors of XZ Utils
     specifically the LZMA SDK <https://7-zip.org/sdk.html>. Without
     this code, XZ Utils wouldn't exist.
 
-    The SHA-256 implementation in liblzma is based on the code found from
-    7-Zip <https://7-zip.org/>, which has a modified version of the SHA-256
-    code found from Crypto++ <https://www.cryptopp.com/>. 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 <https://www.cryptopp.com/>.
 
-    Some scripts have been adapted from gzip. The original versions
-    were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
-    Andrew Dudman helped adapting the scripts and their man pages for
-    XZ Utils.
+    A few scripts have been adapted from GNU gzip. The original
+    versions were written by Jean-loup Gailly, Charles Levert, and
+    Paul Eggert. Andrew Dudman helped adapting the scripts and their
+    man pages for XZ Utils.
 
     The initial version of the threaded .xz decompressor was written
     by Sebastian Andrzej Siewior.
@@ -25,15 +23,31 @@ Authors of XZ Utils
     The initial version of the .lz (lzip) decoder was written
     by Michał Górny.
 
-    CLMUL-accelerated CRC code was contributed by Ilya Kurdyukov.
+    Architecture-specific CRC optimizations were contributed by
+    Ilya Kurdyukov, Hans Jansen, and Chenxi Mao.
 
     Other authors:
       - Jonathan Nieder
       - Joachim Henke
 
-    The GNU Autotools-based build system contains files from many authors,
-    which I'm not trying to list here.
+    Many people have contributed improvements or reported bugs.
+    Most of these people are mentioned in the file THANKS.
 
-    Several people have contributed fixes or reported bugs. Most of them
-    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.
 

+ 68 - 45
contrib/libs/lzma/COPYING

@@ -6,72 +6,95 @@ XZ Utils Licensing
     is a rough summary of which licenses apply to which parts of this
     package (but check the individual files to be sure!):
 
-      - 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+.
-
-      - All the documentation in the doc directory and most of the
-        XZ Utils specific documentation files in other directories
-        are in the public domain.
+        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.
+
+      - 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.
+
+      - Doxygen-generated HTML version of the liblzma API documentation:
+        While Doxygen is under the GNU GPLv2, the license information
+        in Doxygen includes the following exception:
+
+            Documents produced by doxygen are derivative works
+            derived from the input used in their production;
+            they are not affected by this license.
 
         Note: The JavaScript files (under the MIT license) have
-        been removed from the Doxygen-generated HTML version of the
-        liblzma API documentation. Doxygen itself is under the GNU GPL
-        but the remaining files generated by Doxygen are not affected
-        by the licenses used in Doxygen because Doxygen licensing has
-        the following exception:
+        been removed from the Doxygen output.
 
-            "Documents produced by doxygen are derivative works
-            derived from the input used in their production;
-            they are not affected by this license."
+      - The XZ logo (xz-logo.png) included in the Doxygen-generated
+        documentation is under the Creative Commons BY-SA 4.0 license.
 
-      - 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 contain files that are under various
+        free software licenses.
 
-    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.
+    For the files under the BSD Zero Clause License (0BSD), if
+    a copyright notice is needed, the following is sufficient:
 
-    As usual, this software is provided "as is", without any warranty.
+        Copyright (C) The XZ Utils authors and contributors
 
-    If you copy significant amounts of public domain code from XZ Utils
+    If you copy significant amounts of 0BSD-licensed code from XZ Utils
     into your project, acknowledging this somewhere in your software is
     polite (especially if it is proprietary, non-free software), but
-    naturally it is not legally required. Here is an example of a good
-    notice to put into "about box" or into documentation:
+    it is not legally required by the license terms. Here is an example
+    of a good notice to put into "about box" or into documentation:
 
         This software includes code from XZ Utils
         <https://xz.tukaani.org/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.
+      - COPYING.CC-BY-SA-4.0: Creative Commons Attribution-ShareAlike 4.0
+                              International Public License
+
+    A note about old XZ Utils releases:
+
+        XZ Utils releases 5.4.6 and older and 5.5.1alpha have a
+        significant amount of code put into the public domain and
+        that obviously remains so. The switch from public domain to
+        0BSD for newer releases was made in Febrary 2024 because
+        public domain has (real or perceived) legal ambiguities in
+        some jurisdictions.
+
+        There is very little *practical* difference between public
+        domain and 0BSD. The main difference likely is that one
+        shouldn't claim that 0BSD-licensed code is in the public
+        domain; 0BSD-licensed code is copyrighted but available under
+        an extremely permissive license. Neither 0BSD nor public domain
+        require retaining or reproducing author, copyright holder, or
+        license notices when distributing the software. (Compare to,
+        for example, BSD 2-Clause "Simplified" License which does have
+        such requirements.)
+
+    If you have questions, don't hesitate to ask for more information.
+    The contact information is in the README file.
 

+ 11 - 0
contrib/libs/lzma/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.

+ 427 - 0
contrib/libs/lzma/COPYING.CC-BY-SA-4.0

@@ -0,0 +1,427 @@
+Attribution-ShareAlike 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+     Considerations for licensors: Our public licenses are
+     intended for use by those authorized to give the public
+     permission to use material in ways otherwise restricted by
+     copyright and certain other rights. Our licenses are
+     irrevocable. Licensors should read and understand the terms
+     and conditions of the license they choose before applying it.
+     Licensors should also secure all rights necessary before
+     applying our licenses so that the public can reuse the
+     material as expected. Licensors should clearly mark any
+     material not subject to the license. This includes other CC-
+     licensed material, or material used under an exception or
+     limitation to copyright. More considerations for licensors:
+    wiki.creativecommons.org/Considerations_for_licensors
+
+     Considerations for the public: By using one of our public
+     licenses, a licensor grants the public permission to use the
+     licensed material under specified terms and conditions. If
+     the licensor's permission is not necessary for any reason--for
+     example, because of any applicable exception or limitation to
+     copyright--then that use is not regulated by the license. Our
+     licenses grant only permissions under copyright and certain
+     other rights that a licensor has authority to grant. Use of
+     the licensed material may still be restricted for other
+     reasons, including because others have copyright or other
+     rights in the material. A licensor may make special requests,
+     such as asking that all changes be marked or described.
+     Although not required by our licenses, you are encouraged to
+     respect those requests where reasonable. More considerations
+     for the public:
+    wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-ShareAlike 4.0 International Public
+License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-ShareAlike 4.0 International Public License ("Public
+License"). To the extent this Public License may be interpreted as a
+contract, You are granted the Licensed Rights in consideration of Your
+acceptance of these terms and conditions, and the Licensor grants You
+such rights in consideration of benefits the Licensor receives from
+making the Licensed Material available under these terms and
+conditions.
+
+
+Section 1 -- Definitions.
+
+  a. Adapted Material means material subject to Copyright and Similar
+     Rights that is derived from or based upon the Licensed Material
+     and in which the Licensed Material is translated, altered,
+     arranged, transformed, or otherwise modified in a manner requiring
+     permission under the Copyright and Similar Rights held by the
+     Licensor. For purposes of this Public License, where the Licensed
+     Material is a musical work, performance, or sound recording,
+     Adapted Material is always produced where the Licensed Material is
+     synched in timed relation with a moving image.
+
+  b. Adapter's License means the license You apply to Your Copyright
+     and Similar Rights in Your contributions to Adapted Material in
+     accordance with the terms and conditions of this Public License.
+
+  c. BY-SA Compatible License means a license listed at
+     creativecommons.org/compatiblelicenses, approved by Creative
+     Commons as essentially the equivalent of this Public License.
+
+  d. Copyright and Similar Rights means copyright and/or similar rights
+     closely related to copyright including, without limitation,
+     performance, broadcast, sound recording, and Sui Generis Database
+     Rights, without regard to how the rights are labeled or
+     categorized. For purposes of this Public License, the rights
+     specified in Section 2(b)(1)-(2) are not Copyright and Similar
+     Rights.
+
+  e. Effective Technological Measures means those measures that, in the
+     absence of proper authority, may not be circumvented under laws
+     fulfilling obligations under Article 11 of the WIPO Copyright
+     Treaty adopted on December 20, 1996, and/or similar international
+     agreements.
+
+  f. Exceptions and Limitations means fair use, fair dealing, and/or
+     any other exception or limitation to Copyright and Similar Rights
+     that applies to Your use of the Licensed Material.
+
+  g. License Elements means the license attributes listed in the name
+     of a Creative Commons Public License. The License Elements of this
+     Public License are Attribution and ShareAlike.
+
+  h. Licensed Material means the artistic or literary work, database,
+     or other material to which the Licensor applied this Public
+     License.
+
+  i. Licensed Rights means the rights granted to You subject to the
+     terms and conditions of this Public License, which are limited to
+     all Copyright and Similar Rights that apply to Your use of the
+     Licensed Material and that the Licensor has authority to license.
+
+  j. Licensor means the individual(s) or entity(ies) granting rights
+     under this Public License.
+
+  k. Share means to provide material to the public by any means or
+     process that requires permission under the Licensed Rights, such
+     as reproduction, public display, public performance, distribution,
+     dissemination, communication, or importation, and to make material
+     available to the public including in ways that members of the
+     public may access the material from a place and at a time
+     individually chosen by them.
+
+  l. Sui Generis Database Rights means rights other than copyright
+     resulting from Directive 96/9/EC of the European Parliament and of
+     the Council of 11 March 1996 on the legal protection of databases,
+     as amended and/or succeeded, as well as other essentially
+     equivalent rights anywhere in the world.
+
+  m. You means the individual or entity exercising the Licensed Rights
+     under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+  a. License grant.
+
+       1. Subject to the terms and conditions of this Public License,
+          the Licensor hereby grants You a worldwide, royalty-free,
+          non-sublicensable, non-exclusive, irrevocable license to
+          exercise the Licensed Rights in the Licensed Material to:
+
+            a. reproduce and Share the Licensed Material, in whole or
+               in part; and
+
+            b. produce, reproduce, and Share Adapted Material.
+
+       2. Exceptions and Limitations. For the avoidance of doubt, where
+          Exceptions and Limitations apply to Your use, this Public
+          License does not apply, and You do not need to comply with
+          its terms and conditions.
+
+       3. Term. The term of this Public License is specified in Section
+          6(a).
+
+       4. Media and formats; technical modifications allowed. The
+          Licensor authorizes You to exercise the Licensed Rights in
+          all media and formats whether now known or hereafter created,
+          and to make technical modifications necessary to do so. The
+          Licensor waives and/or agrees not to assert any right or
+          authority to forbid You from making technical modifications
+          necessary to exercise the Licensed Rights, including
+          technical modifications necessary to circumvent Effective
+          Technological Measures. For purposes of this Public License,
+          simply making modifications authorized by this Section 2(a)
+          (4) never produces Adapted Material.
+
+       5. Downstream recipients.
+
+            a. Offer from the Licensor -- Licensed Material. Every
+               recipient of the Licensed Material automatically
+               receives an offer from the Licensor to exercise the
+               Licensed Rights under the terms and conditions of this
+               Public License.
+
+            b. Additional offer from the Licensor -- Adapted Material.
+               Every recipient of Adapted Material from You
+               automatically receives an offer from the Licensor to
+               exercise the Licensed Rights in the Adapted Material
+               under the conditions of the Adapter's License You apply.
+
+            c. No downstream restrictions. You may not offer or impose
+               any additional or different terms or conditions on, or
+               apply any Effective Technological Measures to, the
+               Licensed Material if doing so restricts exercise of the
+               Licensed Rights by any recipient of the Licensed
+               Material.
+
+       6. No endorsement. Nothing in this Public License constitutes or
+          may be construed as permission to assert or imply that You
+          are, or that Your use of the Licensed Material is, connected
+          with, or sponsored, endorsed, or granted official status by,
+          the Licensor or others designated to receive attribution as
+          provided in Section 3(a)(1)(A)(i).
+
+  b. Other rights.
+
+       1. Moral rights, such as the right of integrity, are not
+          licensed under this Public License, nor are publicity,
+          privacy, and/or other similar personality rights; however, to
+          the extent possible, the Licensor waives and/or agrees not to
+          assert any such rights held by the Licensor to the limited
+          extent necessary to allow You to exercise the Licensed
+          Rights, but not otherwise.
+
+       2. Patent and trademark rights are not licensed under this
+          Public License.
+
+       3. To the extent possible, the Licensor waives any right to
+          collect royalties from You for the exercise of the Licensed
+          Rights, whether directly or through a collecting society
+          under any voluntary or waivable statutory or compulsory
+          licensing scheme. In all other cases the Licensor expressly
+          reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+  a. Attribution.
+
+       1. If You Share the Licensed Material (including in modified
+          form), You must:
+
+            a. retain the following if it is supplied by the Licensor
+               with the Licensed Material:
+
+                 i. identification of the creator(s) of the Licensed
+                    Material and any others designated to receive
+                    attribution, in any reasonable manner requested by
+                    the Licensor (including by pseudonym if
+                    designated);
+
+                ii. a copyright notice;
+
+               iii. a notice that refers to this Public License;
+
+                iv. a notice that refers to the disclaimer of
+                    warranties;
+
+                 v. a URI or hyperlink to the Licensed Material to the
+                    extent reasonably practicable;
+
+            b. indicate if You modified the Licensed Material and
+               retain an indication of any previous modifications; and
+
+            c. indicate the Licensed Material is licensed under this
+               Public License, and include the text of, or the URI or
+               hyperlink to, this Public License.
+
+       2. You may satisfy the conditions in Section 3(a)(1) in any
+          reasonable manner based on the medium, means, and context in
+          which You Share the Licensed Material. For example, it may be
+          reasonable to satisfy the conditions by providing a URI or
+          hyperlink to a resource that includes the required
+          information.
+
+       3. If requested by the Licensor, You must remove any of the
+          information required by Section 3(a)(1)(A) to the extent
+          reasonably practicable.
+
+  b. ShareAlike.
+
+     In addition to the conditions in Section 3(a), if You Share
+     Adapted Material You produce, the following conditions also apply.
+
+       1. The Adapter's License You apply must be a Creative Commons
+          license with the same License Elements, this version or
+          later, or a BY-SA Compatible License.
+
+       2. You must include the text of, or the URI or hyperlink to, the
+          Adapter's License You apply. You may satisfy this condition
+          in any reasonable manner based on the medium, means, and
+          context in which You Share Adapted Material.
+
+       3. You may not offer or impose any additional or different terms
+          or conditions on, or apply any Effective Technological
+          Measures to, Adapted Material that restrict exercise of the
+          rights granted under the Adapter's License You apply.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+     to extract, reuse, reproduce, and Share all or a substantial
+     portion of the contents of the database;
+
+  b. if You include all or a substantial portion of the database
+     contents in a database in which You have Sui Generis Database
+     Rights, then the database in which You have Sui Generis Database
+     Rights (but not its individual contents) is Adapted Material,
+     including for purposes of Section 3(b); and
+
+  c. You must comply with the conditions in Section 3(a) if You Share
+     all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+  c. The disclaimer of warranties and limitation of liability provided
+     above shall be interpreted in a manner that, to the extent
+     possible, most closely approximates an absolute disclaimer and
+     waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+  a. This Public License applies for the term of the Copyright and
+     Similar Rights licensed here. However, if You fail to comply with
+     this Public License, then Your rights under this Public License
+     terminate automatically.
+
+  b. Where Your right to use the Licensed Material has terminated under
+     Section 6(a), it reinstates:
+
+       1. automatically as of the date the violation is cured, provided
+          it is cured within 30 days of Your discovery of the
+          violation; or
+
+       2. upon express reinstatement by the Licensor.
+
+     For the avoidance of doubt, this Section 6(b) does not affect any
+     right the Licensor may have to seek remedies for Your violations
+     of this Public License.
+
+  c. For the avoidance of doubt, the Licensor may also offer the
+     Licensed Material under separate terms or conditions or stop
+     distributing the Licensed Material at any time; however, doing so
+     will not terminate this Public License.
+
+  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+     License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+  a. The Licensor shall not be bound by any additional or different
+     terms or conditions communicated by You unless expressly agreed.
+
+  b. Any arrangements, understandings, or agreements regarding the
+     Licensed Material not stated herein are separate from and
+     independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+  a. For the avoidance of doubt, this Public License does not, and
+     shall not be interpreted to, reduce, limit, restrict, or impose
+     conditions on any use of the Licensed Material that could lawfully
+     be made without permission under this Public License.
+
+  b. To the extent possible, if any provision of this Public License is
+     deemed unenforceable, it shall be automatically reformed to the
+     minimum extent necessary to make it enforceable. If the provision
+     cannot be reformed, it shall be severed from this Public License
+     without affecting the enforceability of the remaining terms and
+     conditions.
+
+  c. No term or condition of this Public License will be waived and no
+     failure to comply consented to unless expressly agreed to by the
+     Licensor.
+
+  d. Nothing in this Public License constitutes or may be interpreted
+     as a limitation upon, or waiver of, any privileges and immunities
+     that apply to the Licensor or You, including from the legal
+     processes of any jurisdiction or authority.
+
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.

+ 107 - 52
contrib/libs/lzma/INSTALL

@@ -143,43 +143,37 @@ XZ Utils Installation
 
 1.2.7. Windows
 
-    If it is enough to build liblzma (no command line tools):
+    The "windows" directory contains instructions for a few types
+    of builds:
 
-      - There is CMake support. It should be good enough to build
-        static liblzma or liblzma.dll with Visual Studio. The CMake
-        support may work with MinGW or MinGW-w64. Read the comment
-        in the beginning of CMakeLists.txt before running CMake!
+      - INSTALL-MinGW-w64_with_CMake.txt
+                Simple instructions how to build XZ Utils natively on
+                Windows using only CMake and a prebuilt toolchain
+                (GCC + MinGW-w64 or Clang/LLVM + MinGW-w64).
 
-      - There are Visual Studio project files under the "windows"
-        directory. See windows/INSTALL-MSVC.txt. In the future the
-        project files will be removed when CMake support is good
-        enough. Thus, please test the CMake version and help fix
-        possible issues.
+      - INSTALL-MinGW-w64_with_Autotools.txt
+                Native build under MSYS2 or cross-compilation from
+                GNU/Linux using a bash script that creates a .zip
+                and .7z archives of the binaries and documentation.
+                The related file README-Windows.txt is for the
+                resulting binary package.
 
-    To build also the command line tools:
+      - INSTALL-MSVC.txt
+                Building with MSVC / Visual Studio and CMake.
 
-      - MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
-        for building the official binary packages for Windows.
-        There is windows/build.bash to ease packaging XZ Utils with
-        MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
-        See windows/INSTALL-MinGW.txt for more information.
+      - liblzma-crt-mixing.txt
+                Documentation what to take into account as a programmer
+                if liblzma.dll and the application don't use the same
+                CRT (MSVCRT or UCRT).
 
-      - MinGW + MSYS (32-bit x86): I haven't recently tested this.
+    Other choices:
 
-      - Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
-        under Cygwin older than 1.7.35 can lead to DATA LOSS! If
-        you must use an old Cygwin version, stick to XZ Utils 5.0.x
-        which is safe under older Cygwin versions. You can check
-        the Cygwin version with the command "cygcheck -V".
+      - Cygwin: https://cygwin.com/
+        Building on Cygwin can be done like on many POSIX operating
+        systems. XZ Utils >= 5.2.0 isn't compatible with Cygwin older
+        than 1.7.35 (data loss!). 1.7.35 was released on 2015-03-04.
 
-    It may be possible to build liblzma with other toolchains too, but
-    that will probably require writing a separate makefile. Building
-    the command line tools with non-GNU toolchains will be harder than
-    building only liblzma.
-
-    Even if liblzma is built with MinGW(-w64), the resulting DLL can
-    be used by other compilers and linkers, including MSVC. See
-    windows/README-Windows.txt for details.
+      - MSYS2: https://www.msys2.org/
 
 
 1.2.8. DOS
@@ -359,20 +353,20 @@ XZ Utils Installation
                 with --docdir=DIR.
 
     --disable-assembler
-                liblzma includes some assembler optimizations. Currently
-                there is only assembler code for CRC32 and CRC64 for
-                32-bit x86.
-
-                All the assembler code in liblzma is position-independent
-                code, which is suitable for use in shared libraries and
-                position-independent executables. So far only i386
-                instructions are used, but the code is optimized for i686
-                class CPUs. If you are compiling liblzma exclusively for
+                This disables CRC32 and CRC64 assembly code on
+                32-bit x86. This option currently does nothing
+                on other architectures (not even on x86-64).
+
+                The 32-bit x86 assembly is position-independent code
+                which is suitable for use in shared libraries and
+                position-independent executables. It uses only i386
+                instructions but the code is optimized for i686 class
+                CPUs. If you are compiling liblzma exclusively for
                 pre-i686 systems, you may want to disable the assembler
                 code.
 
     --disable-clmul-crc
-                Disable the use carryless multiplication for CRC
+                Disable the use of carryless multiplication for CRC
                 calculation even if compiler support for it is detected.
                 The code uses runtime detection of SSSE3, SSE4.1, and
                 CLMUL instructions on x86. On 32-bit x86 this currently
@@ -383,6 +377,16 @@ XZ Utils Installation
                 required extensions (-msse4.1 -mpclmul) then runtime
                 detection isn't used and the generic code is omitted.
 
+    --disable-arm64-crc32
+                Disable the use of the ARM64 CRC32 instruction extension
+                even if compiler support for it is detected. The code will
+                detect support for the instruction at runtime.
+
+                If using compiler options that unconditionally allow the
+                required extensions (-march=armv8-a+crc or -march=armv8.1-a
+                and later) then runtime detection isn't used and the
+                generic code is omitted.
+
     --enable-unaligned-access
                 Allow liblzma to use unaligned memory access for 16-bit,
                 32-bit, and 64-bit loads and stores. This should be
@@ -392,8 +396,43 @@ XZ Utils Installation
                 slow. This option shouldn't be used on systems that
                 rely on such emulation.
 
-                Unaligned access is enabled by default on x86, x86-64,
-                big endian PowerPC, some ARM, and some ARM64 systems.
+                Unaligned access is enabled by default on these:
+                  - 32-bit x86
+                  - 64-bit x86-64
+                  - 32-bit big endian PowerPC
+                  - 64-bit big endian PowerPC
+                  - 64-bit little endian PowerPC
+                  - some RISC-V [1]
+                  - some 32-bit ARM [2]
+                  - some 64-bit ARM64 [2] (NOTE: Autodetection bug
+                    if using GCC -mstrict-align, see below.)
+
+                [1] Unaligned access is enabled by default if
+                    configure sees that the C compiler
+                    #defines __riscv_misaligned_fast.
+
+                [2] Unaligned access is enabled by default if
+                    configure sees that the C compiler
+                    #defines __ARM_FEATURE_UNALIGNED:
+
+                      - ARMv7 + GCC or Clang: It works. The options
+                        -munaligned-access and -mno-unaligned-access
+                        affect this macro correctly.
+
+                      - ARM64 + Clang: It works. The options
+                        -munaligned-access, -mno-unaligned-access,
+                        and -mstrict-align affect this macro correctly.
+                        Clang >= 17 supports -mno-strict-align too.
+
+                      - ARM64 + GCC: It partially works. The macro
+                        is always #defined by GCC versions at least
+                        up to 13.2, even when using -mstrict-align.
+                        If building for strict-align ARM64, the
+                        configure option --disable-unaligned-access
+                        should be used if using a GCC version that has
+                        this issue because otherwise the performance
+                        may be degraded. It likely won't crash due to
+                        how unaligned access is done in the C code.
 
     --enable-unsafe-type-punning
                 This enables use of code like
@@ -460,14 +499,14 @@ XZ Utils Installation
                                 too. This is the default for 32-bit x86
                                 Windows builds. Unless the compiler
                                 supports __attribute__((__constructor__)),
-                                the `win95' threading is incompatible with
+                                the 'win95' threading is incompatible with
                                 --enable-small.
 
                         vista   Use Windows Vista compatible threads. The
                                 resulting binaries won't run on Windows XP
                                 or older. This is the default for Windows
                                 excluding 32-bit x86 builds (that is, on
-                                x86-64 the default is `vista').
+                                x86-64 the default is 'vista').
 
                         no      Disable threading support. This is the
                                 same as using --disable-threads.
@@ -479,14 +518,25 @@ XZ Utils Installation
                                 calls any liblzma functions from more than
                                 one thread, something bad may happen.
 
+    --enable-ifunc
+                Use __attribute__((__ifunc__())) in liblzma. This is
+                enabled by default on GNU/Linux and FreeBSD.
+
+                The ifunc attribute is incompatible with
+                -fsanitize=address. --disable-ifunc must be used
+                if any -fsanitize= option is specified in CFLAGS.
+
     --enable-sandbox=METHOD
-                There is limited sandboxing support in the xz tool. If
-                built with sandbox support, it's used automatically when
-                (de)compressing exactly one file to standard output and
-                the options --files or --files0 weren't used. This is a
-                common use case, for example, (de)compressing .tar.xz
-                files via GNU tar. The sandbox is also used for
-                single-file `xz --test' or `xz --list'.
+                There is limited sandboxing support in the xz and xzdec
+                tools. If built with sandbox support, xz uses it
+                automatically when (de)compressing exactly one file to
+                standard output when the options --files or --files0 aren't
+                used. This is a common use case, for example,
+                (de)compressing .tar.xz files via GNU tar. The sandbox is
+                also used for single-file 'xz --test' or 'xz --list'.
+                xzdec always uses the sandbox, except when more than one
+                file are decompressed. In this case it will enable the
+                sandbox for the last file that is decompressed.
 
                 Supported METHODs:
 
@@ -498,7 +548,7 @@ XZ Utils Installation
                         no      Disable sandboxing support.
 
                         capsicum
-                                Use Capsicum (FreeBSD >= 10) for
+                                Use Capsicum (FreeBSD >= 10.2) for
                                 sandboxing. If no Capsicum support
                                 is found, configure will give an error.
 
@@ -506,6 +556,11 @@ XZ Utils Installation
                                 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
                 Use symbol versioning for liblzma. This is enabled by
                 default on GNU/Linux, other GNU-based systems, and

+ 329 - 1
contrib/libs/lzma/NEWS

@@ -2,6 +2,293 @@
 XZ Utils Release Notes
 ======================
 
+5.6.0 (2024-02-24)
+
+    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 is 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 <lzma/index.h>.
+
+    * 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 <lzma/index.h>.
+
+        - 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.6 (2024-01-26)
 
     * Fixed a bug involving internal function pointers in liblzma not
@@ -24,7 +311,7 @@ XZ Utils Release Notes
     * Added a new test.
 
 
-5.4.5 (2023-11-01)
+5.4.5 (2023-11-31)
 
     * liblzma:
 
@@ -826,6 +1113,47 @@ XZ Utils Release Notes
       (FreeBSD >= 10).
 
 
+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 <intrin.h> 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

+ 21 - 18
contrib/libs/lzma/README

@@ -67,24 +67,27 @@ XZ Utils
 
 1.1. Overall documentation
 
-    README              This file
-
-    INSTALL.generic     Generic install instructions for those not familiar
-                        with packages using GNU Autotools
-    INSTALL             Installation instructions specific to XZ Utils
-    PACKAGERS           Information to packagers of XZ Utils
-
-    COPYING             XZ Utils copyright and license information
-    COPYING.GPLv2       GNU General Public License version 2
-    COPYING.GPLv3       GNU General Public License version 3
-    COPYING.LGPLv2.1    GNU Lesser General Public License version 2.1
-
-    AUTHORS             The main authors of XZ Utils
-    THANKS              Incomplete list of people who have helped making
-                        this software
-    NEWS                User-visible changes between XZ Utils releases
-    ChangeLog           Detailed list of changes (commit log)
-    TODO                Known bugs and some sort of to-do list
+    README                This file
+
+    INSTALL.generic       Generic install instructions for those not
+                          familiar with packages using GNU Autotools
+    INSTALL               Installation instructions specific to XZ Utils
+    PACKAGERS             Information to packagers of XZ Utils
+
+    COPYING               XZ Utils copyright and license information
+    COPYING.0BSD          BSD Zero Clause License
+    COPYING.GPLv2         GNU General Public License version 2
+    COPYING.GPLv3         GNU General Public License version 3
+    COPYING.LGPLv2.1      GNU Lesser General Public License version 2.1
+    COPYING.CC-BY-SA-4.0  Creative Commons Attribution-ShareAlike 4.0
+                          International Public License
+
+    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.

+ 24 - 4
contrib/libs/lzma/common/mythread.h

@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
 ///////////////////////////////////////////////////////////////////////////////
 //
 /// \file       mythread.h
@@ -5,9 +7,6 @@
 //
 //  Author:     Lasse Collin
 //
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef MYTHREAD_H
@@ -112,6 +111,25 @@ mythread_sigmask(int how, const sigset_t *restrict set,
 #	include <sys/time.h>
 #endif
 
+// MinGW-w64 with winpthreads:
+//
+// NOTE: Typical builds with MinGW-w64 don't use this code (MYTHREAD_POSIX).
+// Instead, native Windows threading APIs are used (MYTHREAD_VISTA or
+// MYTHREAD_WIN95).
+//
+// MinGW-w64 has _sigset_t (an integer type) in <sys/types.h>.
+// If _POSIX was #defined, the header would add the alias sigset_t too.
+// Let's keep this working even without _POSIX.
+//
+// There are no functions that actually do something with sigset_t
+// because signals barely exist on Windows. The sigfillset macro below
+// is just to silence warnings. There is no sigfillset() in MinGW-w64.
+#ifdef __MINGW32__
+#	include <sys/types.h>
+#	define sigset_t _sigset_t
+#	define sigfillset(set_ptr) do { *(set_ptr) = 0; } while (0)
+#endif
+
 #define MYTHREAD_RET_TYPE void *
 #define MYTHREAD_RET_VALUE NULL
 
@@ -140,11 +158,13 @@ typedef struct timespec mythread_condtime;
 
 // Use pthread_sigmask() to set the signal mask in multi-threaded programs.
 // Do nothing on OpenVMS since it lacks pthread_sigmask().
+// Do nothing on MinGW-w64 too to silence warnings (its pthread_sigmask()
+// is #defined to 0 so it's a no-op).
 static inline void
 mythread_sigmask(int how, const sigset_t *restrict set,
 		sigset_t *restrict oset)
 {
-#ifdef __VMS
+#if defined(__VMS) || defined(__MINGW32__)
 	(void)how;
 	(void)set;
 	(void)oset;

+ 10 - 8
contrib/libs/lzma/common/sysdefs.h

@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
 ///////////////////////////////////////////////////////////////////////////////
 //
 /// \file       sysdefs.h
@@ -8,9 +10,6 @@
 //
 //  Author:     Lasse Collin
 //
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef LZMA_SYSDEFS_H
@@ -159,13 +158,16 @@ typedef unsigned char _Bool;
 
 #include <string.h>
 
-// As of MSVC 2013, inline and restrict are supported with
-// non-standard keywords.
-#if defined(_WIN32) && defined(_MSC_VER)
-#	ifndef inline
+// Visual Studio 2013 update 2 supports only __inline, not inline.
+// MSVC v19.0 / VS 2015 and newer support both.
+//
+// MSVC v19.27 (VS 2019 version 16.7) added support for restrict.
+// Older ones support only __restrict.
+#ifdef _MSC_VER
+#	if _MSC_VER < 1900 && !defined(inline)
 #		define inline __inline
 #	endif
-#	ifndef restrict
+#	if _MSC_VER < 1927 && !defined(restrict)
 #		define restrict __restrict
 #	endif
 #endif

+ 23 - 4
contrib/libs/lzma/common/tuklib_common.h

@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
 ///////////////////////////////////////////////////////////////////////////////
 //
 /// \file       tuklib_common.h
@@ -5,9 +7,6 @@
 //
 //  Author:     Lasse Collin
 //
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef TUKLIB_COMMON_H
@@ -57,8 +56,28 @@
 #	define TUKLIB_GNUC_REQ(major, minor) 0
 #endif
 
-#if TUKLIB_GNUC_REQ(2, 5)
+// tuklib_attr_noreturn attribute is used to mark functions as non-returning.
+// We cannot use "noreturn" as the macro name because then C23 code that
+// uses [[noreturn]] would break as it would expand to [[ [[noreturn]] ]].
+//
+// tuklib_attr_noreturn must be used at the beginning of function declaration
+// to work in all cases. The [[noreturn]] syntax is the most limiting, it
+// must be even before any GNU C's __attribute__ keywords:
+//
+//     tuklib_attr_noreturn
+//     __attribute__((nonnull(1)))
+//     extern void foo(const char *s);
+//
+// FIXME: Update __STDC_VERSION__ for the final C23 version. 202000 is used
+// by GCC 13 and Clang 15 with -std=c2x.
+#if   defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000
+#	define tuklib_attr_noreturn [[noreturn]]
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112
+#	define tuklib_attr_noreturn _Noreturn
+#elif TUKLIB_GNUC_REQ(2, 5)
 #	define tuklib_attr_noreturn __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+#	define tuklib_attr_noreturn __declspec(noreturn)
 #else
 #	define tuklib_attr_noreturn
 #endif

Some files were not shown because too many files changed in this diff