From 61b61617682b760f6384a416a462f143fdec4e1c Mon Sep 17 00:00:00 2001 From: Ahrimdon Date: Sun, 25 Feb 2024 14:26:13 -0500 Subject: [PATCH] Update local deps --- deps/GSL/.github/workflows/android.yml | 2 +- .../.github/workflows/cmake_find_package.yml | 2 +- deps/GSL/.github/workflows/ios.yml | 2 +- deps/GSL/include/gsl/byte | 2 +- deps/GSL/include/gsl/pointers | 6 +- deps/GSL/include/gsl/span | 4 +- deps/GSL/tests/notnull_tests.cpp | 12 + .../include/rapidjson/internal/regex.h | 2 +- deps/rapidjson/include/rapidjson/schema.h | 16 +- deps/zlib/.github/workflows/c-std.yml | 208 +++++++++++++++++ deps/zlib/.github/workflows/cmake.yml | 15 +- deps/zlib/.github/workflows/configure.yml | 6 +- deps/zlib/.github/workflows/fuzz.yml | 2 +- deps/zlib/CMakeLists.txt | 44 ++-- deps/zlib/ChangeLog | 12 +- deps/zlib/FAQ | 5 +- deps/zlib/LICENSE | 2 +- deps/zlib/Makefile.in | 16 +- deps/zlib/README | 8 +- deps/zlib/configure | 14 +- deps/zlib/contrib/ada/readme.txt | 2 +- deps/zlib/contrib/delphi/ZLib.pas | 2 +- .../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 2 +- .../zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 2 +- deps/zlib/contrib/gcc_gvmat64/gvmat64.S | 2 +- deps/zlib/contrib/infback9/inftree9.c | 6 +- deps/zlib/contrib/iostream3/zfstream.h | 4 +- deps/zlib/contrib/minizip/Makefile | 2 +- deps/zlib/contrib/minizip/configure.ac | 2 +- deps/zlib/contrib/minizip/miniunz.c | 20 +- deps/zlib/contrib/minizip/unzip.c | 12 +- deps/zlib/contrib/minizip/unzip.h | 6 +- deps/zlib/contrib/minizip/zip.c | 5 +- deps/zlib/contrib/nuget/nuget.csproj | 4 +- deps/zlib/contrib/pascal/zlibpas.pas | 2 +- deps/zlib/contrib/puff/puff.c | 8 +- deps/zlib/contrib/puff/pufftest.c | 4 + deps/zlib/contrib/vstudio/readme.txt | 2 +- deps/zlib/contrib/vstudio/vc10/zlib.rc | 8 +- deps/zlib/contrib/vstudio/vc11/zlib.rc | 8 +- deps/zlib/contrib/vstudio/vc12/zlib.rc | 8 +- deps/zlib/contrib/vstudio/vc14/zlib.rc | 8 +- deps/zlib/contrib/vstudio/vc17/zlib.rc | 8 +- deps/zlib/contrib/vstudio/vc9/zlib.rc | 8 +- deps/zlib/deflate.c | 45 ++-- deps/zlib/deflate.h | 4 +- deps/zlib/doc/algorithm.txt | 2 +- deps/zlib/examples/gzlog.c | 4 +- deps/zlib/examples/gznorm.c | 4 + deps/zlib/examples/zpipe.c | 4 + deps/zlib/examples/zran.c | 211 ++++++++++-------- deps/zlib/examples/zran.h | 10 +- deps/zlib/gzguts.h | 62 +++-- deps/zlib/gzlib.c | 43 ++-- deps/zlib/gzread.c | 3 +- deps/zlib/inftrees.c | 6 +- deps/zlib/old/Makefile.riscos | 2 +- deps/zlib/old/visual-basic.txt | 2 +- deps/zlib/os400/README400 | 2 +- deps/zlib/os400/zlib.inc | 6 +- deps/zlib/qnx/package.qpg | 12 +- deps/zlib/test/example.c | 8 +- deps/zlib/test/infcover.c | 6 +- deps/zlib/test/minigzip.c | 79 ++++--- deps/zlib/treebuild.xml | 4 +- deps/zlib/trees.c | 6 +- deps/zlib/win32/DLL_FAQ.txt | 22 +- deps/zlib/win32/README-WIN32.txt | 4 +- deps/zlib/zconf.h | 28 +-- deps/zlib/zconf.h.cmakein | 28 +-- deps/zlib/zconf.h.in | 28 +-- deps/zlib/zlib.3 | 8 +- deps/zlib/zlib.3.pdf | Bin 19505 -> 25523 bytes deps/zlib/zlib.h | 47 ++-- deps/zlib/zutil.h | 38 +--- 75 files changed, 743 insertions(+), 500 deletions(-) create mode 100644 deps/zlib/.github/workflows/c-std.yml diff --git a/deps/GSL/.github/workflows/android.yml b/deps/GSL/.github/workflows/android.yml index dd0b5a4..939c461 100644 --- a/deps/GSL/.github/workflows/android.yml +++ b/deps/GSL/.github/workflows/android.yml @@ -12,7 +12,7 @@ jobs: run: working-directory: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Create build directory run: mkdir -p build diff --git a/deps/GSL/.github/workflows/cmake_find_package.yml b/deps/GSL/.github/workflows/cmake_find_package.yml index 5155d9c..fd2f7a8 100644 --- a/deps/GSL/.github/workflows/cmake_find_package.yml +++ b/deps/GSL/.github/workflows/cmake_find_package.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ ubuntu-latest, macos-latest ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: lukka/get-cmake@latest with: cmakeVersion: 3.14.0 diff --git a/deps/GSL/.github/workflows/ios.yml b/deps/GSL/.github/workflows/ios.yml index d231b4c..89627a1 100644 --- a/deps/GSL/.github/workflows/ios.yml +++ b/deps/GSL/.github/workflows/ios.yml @@ -12,7 +12,7 @@ jobs: run: working-directory: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Create build directory run: mkdir -p build diff --git a/deps/GSL/include/gsl/byte b/deps/GSL/include/gsl/byte index dc4b742..7f30ae2 100644 --- a/deps/GSL/include/gsl/byte +++ b/deps/GSL/include/gsl/byte @@ -167,7 +167,7 @@ constexpr byte to_byte(T t) noexcept { static_assert(std::is_same::value, "gsl::to_byte(t) must be provided an unsigned char, otherwise data loss may occur. " - "If you are calling to_byte with an integer contant use: gsl::to_byte() version."); + "If you are calling to_byte with an integer constant use: gsl::to_byte() version."); return byte(t); } diff --git a/deps/GSL/include/gsl/pointers b/deps/GSL/include/gsl/pointers index 8cd4eb5..611e364 100644 --- a/deps/GSL/include/gsl/pointers +++ b/deps/GSL/include/gsl/pointers @@ -100,19 +100,19 @@ public: static_assert(details::is_comparable_to_nullptr::value, "T cannot be compared to nullptr."); template ::value>> - constexpr not_null(U&& u) : ptr_(std::forward(u)) + constexpr not_null(U&& u) noexcept(std::is_nothrow_move_constructible::value) : ptr_(std::forward(u)) { Expects(ptr_ != nullptr); } template ::value>> - constexpr not_null(T u) : ptr_(std::move(u)) + constexpr not_null(T u) noexcept(std::is_nothrow_move_constructible::value) : ptr_(std::move(u)) { Expects(ptr_ != nullptr); } template ::value>> - constexpr not_null(const not_null& other) : not_null(other.get()) + constexpr not_null(const not_null& other) noexcept(std::is_nothrow_move_constructible::value) : not_null(other.get()) {} not_null(const not_null& other) = default; diff --git a/deps/GSL/include/gsl/span b/deps/GSL/include/gsl/span index 3f82a5e..62a8dbd 100644 --- a/deps/GSL/include/gsl/span +++ b/deps/GSL/include/gsl/span @@ -42,7 +42,7 @@ #pragma warning(disable : 4702) // unreachable code // Turn MSVC /analyze rules that generate too much noise. TODO: fix in the tool. -#pragma warning(disable : 26495) // uninitalized member when constructor calls constructor +#pragma warning(disable : 26495) // uninitialized member when constructor calls constructor #pragma warning(disable : 26446) // parser bug does not allow attributes on some templates #endif // _MSC_VER @@ -53,7 +53,7 @@ #define GSL_USE_STATIC_CONSTEXPR_WORKAROUND #endif // !(defined(__cplusplus) && (__cplusplus >= 201703L)) -// GCC 7 does not like the signed unsigned missmatch (size_t ptrdiff_t) +// GCC 7 does not like the signed unsigned mismatch (size_t ptrdiff_t) // While there is a conversion from signed to unsigned, it happens at // compiletime, so the compiler wouldn't have to warn indiscriminately, but // could check if the source value actually doesn't fit into the target type diff --git a/deps/GSL/tests/notnull_tests.cpp b/deps/GSL/tests/notnull_tests.cpp index 4c317d9..df8e5a9 100644 --- a/deps/GSL/tests/notnull_tests.cpp +++ b/deps/GSL/tests/notnull_tests.cpp @@ -24,6 +24,7 @@ #include // for operator<<, ostringstream, basic_ostream:... #include // for basic_string, operator==, string, operator<< #include // for type_info +#include // for variant, monostate, get #include "deathTestCommon.h" using namespace gsl; @@ -514,6 +515,17 @@ TEST(notnull_tests, TestNotNullConstructorTypeDeduction) } #endif } + +TEST(notnull_tests, TestVariantEmplace) +{ + int i = 0; + std::variant> v; + v.emplace>(&i); + + EXPECT_FALSE(v.valueless_by_exception()); + EXPECT_TRUE(v.index() == 1); + EXPECT_TRUE(std::get>(v) == &i); +} #endif // #if defined(__cplusplus) && (__cplusplus >= 201703L) TEST(notnull_tests, TestMakeNotNull) diff --git a/deps/rapidjson/include/rapidjson/internal/regex.h b/deps/rapidjson/include/rapidjson/internal/regex.h index 6446c40..7740dcd 100644 --- a/deps/rapidjson/include/rapidjson/internal/regex.h +++ b/deps/rapidjson/include/rapidjson/internal/regex.h @@ -615,7 +615,7 @@ public: RAPIDJSON_ASSERT(regex_.IsValid()); if (!allocator_) ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); - stateSet_ = static_cast(allocator_->Malloc(GetStateSetSize())); + stateSet_ = static_cast(allocator_->Malloc(GetStateSetSize())); state0_.template Reserve(regex_.stateCount_); state1_.template Reserve(regex_.stateCount_); } diff --git a/deps/rapidjson/include/rapidjson/schema.h b/deps/rapidjson/include/rapidjson/schema.h index 973e935..02a6d0f 100644 --- a/deps/rapidjson/include/rapidjson/schema.h +++ b/deps/rapidjson/include/rapidjson/schema.h @@ -24,13 +24,9 @@ #if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX) #define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1 -#else -#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0 #endif -#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)) -#define RAPIDJSON_SCHEMA_USE_STDREGEX 1 -#else +#if !defined(RAPIDJSON_SCHEMA_USE_STDREGEX) || !(__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)) #define RAPIDJSON_SCHEMA_USE_STDREGEX 0 #endif @@ -1645,9 +1641,13 @@ private: bool CheckDoubleMultipleOf(Context& context, double d) const { double a = std::abs(d), b = std::abs(multipleOf_.GetDouble()); - double q = std::floor(a / b); - double r = a - q * b; - if (r > 0.0) { + double q = a / b; + double qRounded = std::floor(q + 0.5); + double scaledEpsilon = (q + qRounded) * std::numeric_limits::epsilon(); + double difference = std::abs(qRounded - q); + bool isMultiple = (difference <= scaledEpsilon) + || (difference < std::numeric_limits::min()); + if (!isMultiple) { context.error_handler.NotMultipleOf(d, multipleOf_); RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf); } diff --git a/deps/zlib/.github/workflows/c-std.yml b/deps/zlib/.github/workflows/c-std.yml new file mode 100644 index 0000000..44417bf --- /dev/null +++ b/deps/zlib/.github/workflows/c-std.yml @@ -0,0 +1,208 @@ +name: C Standard + +# Compile with as many C standards as possible. +# The worflow is setup to fail on any compilation warnings. + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + + main: + name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }} + runs-on: ${{ matrix.os.value }} + strategy: + fail-fast: false + matrix: + os: + - name: Linux + value: ubuntu-latest + + - name: MacOS + value: macos-latest + + - name: Windows + value: windows-latest + cmake-opt: -G Ninja + + compiler: + - gcc + - clang + + arch: + - name: 64-bit + tag: amd64 + compiler-opt: -m64 + cmake-opt: -A x64 + + - name: 32-bit + tag: i386 + compiler-opt: -m32 + cmake-opt: -A Win32 + + + builder: + - configure + - cmake + + std: + - name: c89 + value: c89 + + - name: gnu89 + value: gnu89 + + - name: c94 + value: iso9899:199409 + + - name: c99 + value: c99 + + - name: gnu99 + value: gnu99 + + - name: c11 + value: c11 + + - name: gnu11 + value: gnu11 + + - name: c17 + value: c17 + + - name: gnu17 + value: gnu17 + + - name: c2x + value: c2x + + - name: gnu2x + value: gnu2x + + exclude: + # Don't run 32-bit on MacOS + - { os: { name: MacOS }, + arch: { tag: i386 } } + + # Don't run configure on Windows + - { os: { name: Windows }, + builder: configure } + + # Don't run gcc 32-bit on Windows + - { os: { name: Windows }, + arch: { tag: i386 } } + + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + show-progress: 'false' + + - name: Install packages (Linux) + if: runner.os == 'Linux' && matrix.arch.tag == 'i386' + run: | + sudo apt-get update + sudo apt install gcc-multilib libc6-dev-i386-cross + + - name: Install packages (Windows) + if: runner.os == 'Windows' + run: | + choco install --no-progress ninja + + - name: Generate project files (configure) + if: matrix.builder == 'configure' + run: | + ./configure + env: + CC: ${{ matrix.compiler }} + CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra + + - name: Compile source code (configure) + if: matrix.builder == 'configure' + run: make -j2 + + - name: Run test cases (configure) + if: matrix.builder == 'configure' + run: | + make test + make cover + + - name: Generate project files (cmake) + if: matrix.builder == 'cmake' + run: | + cmake -S . -B . -D CMAKE_BUILD_TYPE=Release -D ZLIB_BUILD_EXAMPLES=OFF ${{ matrix.os.cmake-opt }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra + + - name: Compile source code (cmake) + if: matrix.builder == 'cmake' + run: cmake --build . --config Release + + - name: Run test cases (cmake) + if: matrix.builder == 'cmake' + run: ctest -C Release --output-on-failure --max-width 120 + + + msvc: + name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }} + runs-on: ${{ matrix.os.value }} + strategy: + fail-fast: false + matrix: + os: + - name: Windows + value: windows-latest + + compiler: + - cl + + arch: + - name: 32-bit + value: -A Win32 + + - name: 64-bit + value: -A x64 + + builder: + - cmake + + std: + - name: default + value: "" + + - name: C11 + value: /std:c11 + + - name: C17 + value: /std:c17 + + # not available on the runner yet + # - name: C20 + # value: /std:c20 + + - name: latest + value: /std:clatest + + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + show-progress: 'false' + + - name: Generate project files (cmake) + run: | + cmake -S . -B . ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release + env: + CC: ${{ matrix.compiler }} + CFLAGS: /WX ${{ matrix.std.value }} + + - name: Compile source code (cmake) + run: cmake --build . --config Release -v + + - name: Run test cases (cmake) + run: ctest -C Release --output-on-failure --max-width 120 \ No newline at end of file diff --git a/deps/zlib/.github/workflows/cmake.yml b/deps/zlib/.github/workflows/cmake.yml index d15fda8..e258b64 100644 --- a/deps/zlib/.github/workflows/cmake.yml +++ b/deps/zlib/.github/workflows/cmake.yml @@ -11,54 +11,63 @@ jobs: - name: Ubuntu GCC os: ubuntu-latest compiler: gcc + cflags: -Werror -Wall -Wextra # Test out of source builds - name: Ubuntu GCC OSB os: ubuntu-latest compiler: gcc + cflags: -Werror -Wall -Wextra build-dir: ../build src-dir: ../zlib - name: Ubuntu GCC -O3 os: ubuntu-latest compiler: gcc - cflags: -O3 + cflags: -O3 -Werror -Wall -Wextra - name: Ubuntu Clang os: ubuntu-latest compiler: clang + cflags: -Werror -Wall -Wextra - name: Ubuntu Clang Debug os: ubuntu-latest compiler: clang + cflags: -Werror -Wall -Wextra build-config: Debug - name: Windows MSVC Win32 os: windows-latest compiler: cl + cflags: /WX /W3 cmake-args: -A Win32 - name: Windows MSVC Win64 os: windows-latest compiler: cl + cflags: /WX /W3 cmake-args: -A x64 - name: Windows GCC os: windows-latest compiler: gcc + cflags: -Werror -Wall -Wextra cmake-args: -G Ninja - name: macOS Clang os: macos-latest compiler: clang + cflags: -Werror -Wall -Wextra - name: macOS GCC os: macos-latest compiler: gcc-11 + cflags: -Werror -Wall -Wextra steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install packages (Windows) if: runner.os == 'Windows' @@ -79,7 +88,7 @@ jobs: working-directory: ${{ matrix.build-dir || '.' }} - name: Upload build errors - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: ${{ matrix.name }} (cmake) diff --git a/deps/zlib/.github/workflows/configure.yml b/deps/zlib/.github/workflows/configure.yml index e783921..0d71689 100644 --- a/deps/zlib/.github/workflows/configure.yml +++ b/deps/zlib/.github/workflows/configure.yml @@ -95,7 +95,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install packages (Ubuntu) if: runner.os == 'Linux' && matrix.packages @@ -110,7 +110,7 @@ jobs: ${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }} env: CC: ${{ matrix.compiler }} - CFLAGS: ${{ matrix.cflags }} + CFLAGS: ${{ matrix.cflags }} -Werror LDFLAGS: ${{ matrix.ldflags }} CHOST: ${{ matrix.chost }} @@ -127,7 +127,7 @@ jobs: QEMU_RUN: ${{ matrix.qemu-run }} - name: Upload build errors - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: ${{ matrix.name }} (configure) diff --git a/deps/zlib/.github/workflows/fuzz.yml b/deps/zlib/.github/workflows/fuzz.yml index 48cd2b9..ddca83c 100644 --- a/deps/zlib/.github/workflows/fuzz.yml +++ b/deps/zlib/.github/workflows/fuzz.yml @@ -18,7 +18,7 @@ jobs: dry-run: false - name: Upload Crash - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: artifacts diff --git a/deps/zlib/CMakeLists.txt b/deps/zlib/CMakeLists.txt index ae0f8ea..3d9b58d 100644 --- a/deps/zlib/CMakeLists.txt +++ b/deps/zlib/CMakeLists.txt @@ -3,7 +3,9 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) -set(VERSION "1.3.0.1") +set(VERSION "1.3.1.1") + +option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") @@ -63,7 +65,8 @@ if(MSVC) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) endif() -if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) +option(RENAME_ZCONF "Rename the zconf when building out of source" ON) +if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND RENAME_ZCONF) # If we're doing an out of source build and the user has a zconf.h # in their source tree... if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) @@ -148,7 +151,13 @@ if(MINGW) endif(MINGW) add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +target_include_directories(zlib PUBLIC + $ + $) add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +target_include_directories(zlibstatic PUBLIC + $ + $) set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) set_target_properties(zlib PROPERTIES SOVERSION 1) @@ -166,7 +175,7 @@ endif() if(UNIX) # On unix-like platforms the library is almost always called libz set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) - if(NOT APPLE) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") endif() elseif(BUILD_SHARED_LIBS AND WIN32) @@ -193,21 +202,22 @@ endif() #============================================================================ # Example binaries #============================================================================ +if(ZLIB_BUILD_EXAMPLES) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) -add_executable(example test/example.c) -target_link_libraries(example zlib) -add_test(example example) + add_executable(minigzip test/minigzip.c) + target_link_libraries(minigzip zlib) -add_executable(minigzip test/minigzip.c) -target_link_libraries(minigzip zlib) + if(HAVE_OFF64_T) + add_executable(example64 test/example.c) + target_link_libraries(example64 zlib) + set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_test(example64 example64) -if(HAVE_OFF64_T) - add_executable(example64 test/example.c) - target_link_libraries(example64 zlib) - set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") - add_test(example64 example64) - - add_executable(minigzip64 test/minigzip.c) - target_link_libraries(minigzip64 zlib) - set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_executable(minigzip64 test/minigzip.c) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() endif() diff --git a/deps/zlib/ChangeLog b/deps/zlib/ChangeLog index dfd6524..1f83ab0 100644 --- a/deps/zlib/ChangeLog +++ b/deps/zlib/ChangeLog @@ -1,9 +1,19 @@ ChangeLog file for zlib -Changes in 1.3.0.1 (xx Aug 2023) +Changes in 1.3.1.1 (xx Jan 2024) - +Changes in 1.3.1 (22 Jan 2024) +- Reject overflows of zip header fields in minizip +- Fix bug in inflateSync() for data held in bit buffer +- Add LIT_MEM define to use more memory for a small deflate speedup +- Fix decision on the emission of Zip64 end records in minizip +- Add bounds checking to ERR_MSG() macro, used by zError() +- Neutralize zip file traversal attacks in miniunz +- Fix a bug in ZLIB_DEBUG compiles in check_match() +- Various portability and appearance improvements + Changes in 1.3 (18 Aug 2023) - Remove K&R function definitions and zlib2ansi - Fix bug in deflateBound() for level 0 and memLevel 9 diff --git a/deps/zlib/FAQ b/deps/zlib/FAQ index 55f1cdc..f72cac6 100644 --- a/deps/zlib/FAQ +++ b/deps/zlib/FAQ @@ -14,13 +14,12 @@ The latest zlib FAQ is at http://zlib.net/zlib_faq.html 2. Where can I get a Windows DLL version? The zlib sources can be compiled without change to produce a DLL. See the - file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the - precompiled DLL are found in the zlib web site at http://zlib.net/ . + file win32/DLL_FAQ.txt in the zlib distribution. 3. Where can I get a Visual Basic interface to zlib? See - * http://marknelson.us/1997/01/01/zlib-engine/ + * https://marknelson.us/posts/1997/01/01/zlib-engine.html * win32/DLL_FAQ.txt in the zlib distribution 4. compress() returns Z_BUF_ERROR. diff --git a/deps/zlib/LICENSE b/deps/zlib/LICENSE index ab8ee6f..b517acd 100644 --- a/deps/zlib/LICENSE +++ b/deps/zlib/LICENSE @@ -1,6 +1,6 @@ Copyright notice: - (C) 1995-2022 Jean-loup Gailly and Mark Adler + (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/deps/zlib/Makefile.in b/deps/zlib/Makefile.in index b584073..5b18f76 100644 --- a/deps/zlib/Makefile.in +++ b/deps/zlib/Makefile.in @@ -1,5 +1,5 @@ # Makefile for zlib -# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler +# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: @@ -22,13 +22,13 @@ CFLAGS=-O SFLAGS=-O LDFLAGS= -TEST_LDFLAGS=$(LDFLAGS) -L. libz.a +TEST_LIBS=-L. libz.a LDSHARED=$(CC) CPP=$(CC) -E STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.3.0.1 +SHAREDLIBV=libz.so.1.3.1.1 SHAREDLIBM=libz.so.1 LIBS=$(STATICLIB) $(SHAREDLIBV) @@ -282,10 +282,10 @@ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a -@rmdir objs example$(EXE): example.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TEST_LIBS) minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TEST_LIBS) examplesh$(EXE): example.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV) @@ -294,10 +294,10 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV) example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ example64.o $(TEST_LIBS) minigzip64$(EXE): minigzip64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip64.o $(TEST_LIBS) install-libs: $(LIBS) -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi @@ -360,7 +360,7 @@ zconf: $(SRCDIR)zconf.h.in cp -p $(SRCDIR)zconf.h.in zconf.h minizip-test: static - cd contrib/minizip && { CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } + cd contrib/minizip && { CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; } minizip-clean: cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; } diff --git a/deps/zlib/README b/deps/zlib/README index 20f7064..75da520 100644 --- a/deps/zlib/README +++ b/deps/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.3.0.1 is a general purpose data compression library. All the code is +zlib 1.3.1.1 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at https://marknelson.us/posts/1997/01/01/zlib-engine.html . -The changes made in version 1.3.0.1 are documented in the file ChangeLog. +The changes made in version 1.3.1.1 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -69,8 +69,6 @@ Notes for some targets: - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with other compilers. Use "make test" to check your compiler. -- gzdopen is not supported on RISCOS or BEOS. - - For PalmOs, see http://palmzlib.sourceforge.net/ @@ -83,7 +81,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2023 Jean-loup Gailly and Mark Adler + (C) 1995-2024 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/deps/zlib/configure b/deps/zlib/configure index 7aaf5df..7e71a12 100644 --- a/deps/zlib/configure +++ b/deps/zlib/configure @@ -25,7 +25,7 @@ if test $SRCDIR = "."; then ZINCOUT="-I." SRCDIR="" else - ZINC='-include zconf.h' + ZINC='-I. -include zconf.h' ZINCOUT='-I. -I$(SRCDIR)' SRCDIR="$SRCDIR/" fi @@ -91,6 +91,7 @@ warn=0 debug=0 address=0 memory=0 +unknown=0 old_cc="$CC" old_cflags="$CFLAGS" OBJC='$(OBJZ) $(OBJG)' @@ -144,12 +145,12 @@ case "$1" in --sanitize) address=1; shift ;; --address) address=1; shift ;; --memory) memory=1; shift ;; - *) - echo "unknown option: $1" | tee -a configure.log - echo "$0 --help for help" | tee -a configure.log - leave 1;; + *) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;; esac done +if test $unknown -eq 1; then + echo "$0 --help for help" | tee -a configure.log +fi # temporary file name test=ztest$$ @@ -258,6 +259,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then SHAREDLIB='libz.sl' ;; esac ;; AIX*) + LDSHARED=${LDSHARED-"$cc -shared"} LDFLAGS="${LDFLAGS} -Wl,-brtl" ;; Darwin* | darwin* | *-darwin*) shared_ext='.dylib' @@ -442,7 +444,7 @@ EOF if test $shared -eq 1; then echo Checking for shared library support... | tee -a configure.log # we must test in two steps (cc then ld), required at least on SunOS 4.x - if try $CC -w -c $SFLAGS $test.c && + if try $CC -c $SFLAGS $test.c && try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log elif test -z "$old_cc" -a -z "$old_cflags"; then diff --git a/deps/zlib/contrib/ada/readme.txt b/deps/zlib/contrib/ada/readme.txt index efdd639..dd136c8 100644 --- a/deps/zlib/contrib/ada/readme.txt +++ b/deps/zlib/contrib/ada/readme.txt @@ -2,7 +2,7 @@ Release 1.3 ZLib.Ada is a thick binding interface to the popular ZLib data -compression library, available at http://www.gzip.org/zlib/. +compression library, available at https://zlib.net/. It provides Ada-style access to the ZLib C library. diff --git a/deps/zlib/contrib/delphi/ZLib.pas b/deps/zlib/contrib/delphi/ZLib.pas index 814ffa6..a64b1a3 100644 --- a/deps/zlib/contrib/delphi/ZLib.pas +++ b/deps/zlib/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.3.0'; + zlib_version = '1.3.1.1'; type EZlibError = class(Exception); diff --git a/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index bffe609..9b6c390 100644 --- a/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -34,7 +34,7 @@ namespace DotZLib } /// - /// Initializes a new instance of the checksum generator basewith a specified value + /// Initializes a new instance of the checksum generator base with a specified value /// /// The value to set the current checksum to public ChecksumGeneratorBase(uint initialValue) diff --git a/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index 209c8de..e8cf70b 100644 --- a/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -156,7 +156,7 @@ namespace DotZLibTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.3.0", Info.Version); + Assert.AreEqual("1.3.1.1", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); diff --git a/deps/zlib/contrib/gcc_gvmat64/gvmat64.S b/deps/zlib/contrib/gcc_gvmat64/gvmat64.S index 23309fa..51a46eb 100644 --- a/deps/zlib/contrib/gcc_gvmat64/gvmat64.S +++ b/deps/zlib/contrib/gcc_gvmat64/gvmat64.S @@ -177,7 +177,7 @@ printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s) ; ; gcc on macosx-linux: -; see http://www.x86-64.org/documentation/abi-0.99.pdf +; see https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf ; param 1 in rdi, param 2 in rsi ; rbx, rsp, rbp, r12 to r15 must be preserved diff --git a/deps/zlib/contrib/infback9/inftree9.c b/deps/zlib/contrib/infback9/inftree9.c index 23f3050..cbbdd2a 100644 --- a/deps/zlib/contrib/infback9/inftree9.c +++ b/deps/zlib/contrib/infback9/inftree9.c @@ -1,5 +1,5 @@ /* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2023 Mark Adler + * Copyright (C) 1995-2024 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.3.0.1 Copyright 1995-2023 Mark Adler "; + " inflate9 1.3.1.1 Copyright 1995-2024 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -59,7 +59,7 @@ int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes, static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 70, 200}; + 133, 133, 133, 133, 144, 73, 200}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/deps/zlib/contrib/iostream3/zfstream.h b/deps/zlib/contrib/iostream3/zfstream.h index 8574479..3dabc0f 100644 --- a/deps/zlib/contrib/iostream3/zfstream.h +++ b/deps/zlib/contrib/iostream3/zfstream.h @@ -413,7 +413,7 @@ template class gzomanip2 { public: - // Allows insertor to peek at internals + // Allows inserter to peek at internals template friend gzofstream& operator<<(gzofstream&, @@ -452,7 +452,7 @@ template : func(f), val1(v1), val2(v2) { } -// Insertor applies underlying manipulator function to stream +// Inserter applies underlying manipulator function to stream template inline gzofstream& operator<<(gzofstream& s, const gzomanip2& m) diff --git a/deps/zlib/contrib/minizip/Makefile b/deps/zlib/contrib/minizip/Makefile index aac76e0..3d927ec 100644 --- a/deps/zlib/contrib/minizip/Makefile +++ b/deps/zlib/contrib/minizip/Makefile @@ -1,4 +1,4 @@ -CC=cc +CC?=cc CFLAGS := $(CFLAGS) -O -I../.. UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a diff --git a/deps/zlib/contrib/minizip/configure.ac b/deps/zlib/contrib/minizip/configure.ac index cdfee49..6e3fff3 100644 --- a/deps/zlib/contrib/minizip/configure.ac +++ b/deps/zlib/contrib/minizip/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([minizip], [1.3.0.1], [bugzilla.redhat.com]) +AC_INIT([minizip], [1.3.1.1], [bugzilla.redhat.com]) AC_CONFIG_SRCDIR([minizip.c]) AM_INIT_AUTOMAKE([foreign]) LT_INIT diff --git a/deps/zlib/contrib/minizip/miniunz.c b/deps/zlib/contrib/minizip/miniunz.c index 8ada038..d871b3f 100644 --- a/deps/zlib/contrib/minizip/miniunz.c +++ b/deps/zlib/contrib/minizip/miniunz.c @@ -79,7 +79,7 @@ /* change_file_date : change the date/time of a file filename : the filename of the file where date/time must be modified - dosdate : the new date at the MSDos format (4 bytes) + dosdate : the new date at the MSDOS format (4 bytes) tmu_date : the SAME new date at the tm_unz format */ static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) { #ifdef _WIN32 @@ -240,7 +240,7 @@ static int do_list(unzFile uf) { printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); for (i=0;i #include -#ifndef NOUNCRYPT - #define NOUNCRYPT -#endif - #include "zlib.h" #include "unzip.h" @@ -117,7 +113,7 @@ const char unz_copyright[] = " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; -/* unz_file_info_interntal contain internal info about a file in zipfile*/ +/* unz_file_info64_internal contain internal info about a file in zipfile*/ typedef struct unz_file_info64_internal_s { ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ @@ -450,7 +446,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return CENTRALDIRINVALID; - /* number of the disk with the start of the zip64 end of central directory */ + /* number of the disk with the start of the zip64 end of central directory */ if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) return CENTRALDIRINVALID; if (uL != 0) @@ -497,9 +493,9 @@ local unzFile unzOpenInternal(const void *path, ZPOS64_T central_pos; uLong uL; - uLong number_disk; /* number of the current dist, used for + uLong number_disk; /* number of the current disk, used for spanning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used + uLong number_disk_with_CD; /* number the disk with central dir, used for spanning ZIP, unsupported, always 0*/ ZPOS64_T number_entry_CD; /* total number of entries in the central dir diff --git a/deps/zlib/contrib/minizip/unzip.h b/deps/zlib/contrib/minizip/unzip.h index 1410584..ceb614e 100644 --- a/deps/zlib/contrib/minizip/unzip.h +++ b/deps/zlib/contrib/minizip/unzip.h @@ -306,13 +306,17 @@ extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, Get Info about the current file if pfile_info!=NULL, the *pfile_info structure will contain some info about the current file - if szFileName!=NULL, the filemane string will be copied in szFileName + if szFileName!=NULL, the filename string will be copied in szFileName (fileNameBufferSize is the size of the buffer) if extraField!=NULL, the extra field information will be copied in extraField (extraFieldBufferSize is the size of the buffer). This is the Central-header version of the extra field if szComment!=NULL, the comment string of the file will be copied in szComment (commentBufferSize is the size of the buffer) + The file name and comment will be zero-terminated if there is room in the + provided buffer. Otherwise the buffer will contain as much as will fit. If at + least 65537 bytes of room is provided, then the result will always be + complete and zero-terminated. */ diff --git a/deps/zlib/contrib/minizip/zip.c b/deps/zlib/contrib/minizip/zip.c index e2e9da0..a6329ae 100644 --- a/deps/zlib/contrib/minizip/zip.c +++ b/deps/zlib/contrib/minizip/zip.c @@ -575,7 +575,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; - /* number of the disk with the start of the zip64 end of central directory */ + /* number of the disk with the start of the zip64 end of central directory */ if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) return 0; if (uL != 0) @@ -1027,7 +1027,6 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c int err = ZIP_OK; # ifdef NOCRYPT - (crcForCrypting); if (password != NULL) return ZIP_PARAMERROR; # endif @@ -1608,7 +1607,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) { - // we can not write more data to the buffer that we have room for. + // we cannot write more data to the buffer that we have room for. return ZIP_BADZIPFILE; } diff --git a/deps/zlib/contrib/nuget/nuget.csproj b/deps/zlib/contrib/nuget/nuget.csproj index b72cbb6..852e450 100644 --- a/deps/zlib/contrib/nuget/nuget.csproj +++ b/deps/zlib/contrib/nuget/nuget.csproj @@ -6,8 +6,8 @@ $(PackageId).win $(PackageId).linux $(PackageId).osx - (C) 1995-2023 Jean-loup Gailly and Mark Adler - 1.3.0.1 + (C) 1995-2024 Jean-loup Gailly and Mark Adler + 1.3.1.1 NuGet Package for consuming native builds of zlib into .NET without complexity.