]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
2 years agoAdd missing Z_INTERNAL to some functions that should not be exported.
Hans Kristian Rosbach [Sun, 5 Feb 2023 17:01:48 +0000 (18:01 +0100)] 
Add missing Z_INTERNAL to some functions that should not be exported.

2 years agoUse memcpy instead of memcmp for unaligned memory comparisons.
Nathan Moinvaziri [Sun, 5 Feb 2023 20:14:18 +0000 (12:14 -0800)] 
Use memcpy instead of memcmp for unaligned memory comparisons.

Use memcpy because it is better supported for compilers that support unaligned
access than memcmp.

2 years agoFixed link fuzzers against zlib when BUILD_SHARED_LIBS=ON.
Nathan Moinvaziri [Wed, 8 Feb 2023 06:27:37 +0000 (22:27 -0800)] 
Fixed link fuzzers against zlib when BUILD_SHARED_LIBS=ON.

2 years agoSimplify linking gtest_zlib with zlib target based on BUILD_SHARED_LIBS.
Nathan Moinvaziri [Wed, 8 Feb 2023 06:08:55 +0000 (22:08 -0800)] 
Simplify linking gtest_zlib with zlib target based on BUILD_SHARED_LIBS.

Since we turn ZLIBNG_ENABLE_TESTS on or off based on BUILD_SHARED_LIBS, then we
don't have to worry about it when linking against zlib.

2 years agoDisable zlib-ng internal tests when BUILD_SHARED_LIBS=ON.
Nathan Moinvaziri [Wed, 8 Feb 2023 08:32:54 +0000 (00:32 -0800)] 
Disable zlib-ng internal tests when BUILD_SHARED_LIBS=ON.

When BUILD_SHARED_LIBS=ON some zlib-ng internal functions are not exported,
which are used by gtest_zlib and benchmark_zlib. Therefore, we must disable
those tests/projects.

2 years agoAdded CI tests for checking undefined symbols in version scripts.
Nathan Moinvaziri [Wed, 8 Feb 2023 02:20:44 +0000 (18:20 -0800)] 
Added CI tests for checking undefined symbols in version scripts.

2 years agoCorrect inflate_fast function signature
Pavel P [Mon, 6 Feb 2023 15:06:30 +0000 (18:06 +0300)] 
Correct inflate_fast function signature

2 years agoFix ambiguous shift warning in inflateCopy.
Mika T. Lindqvist [Tue, 7 Feb 2023 22:38:33 +0000 (00:38 +0200)] 
Fix ambiguous shift warning in inflateCopy.

2 years agoAdd official Ubuntu mirror list as fallback for Actions caching proxy
Hans Kristian Rosbach [Mon, 6 Feb 2023 14:36:15 +0000 (15:36 +0100)] 
Add official Ubuntu mirror list as fallback for Actions caching proxy

2 years agoUbuntu 18.04 is being removed shortly, update workflows to use 20.04.
Hans Kristian Rosbach [Tue, 7 Feb 2023 22:18:31 +0000 (23:18 +0100)] 
Ubuntu 18.04 is being removed shortly, update workflows to use 20.04.
Clang-6.0 is still supported according to Ubuntu package list website.

2 years agoUpdate mymindstorm/setup-emsdk
Hans Kristian Rosbach [Tue, 7 Feb 2023 16:23:06 +0000 (17:23 +0100)] 
Update mymindstorm/setup-emsdk

2 years agoUpdate ilammy/msvc-dev-cmd
Hans Kristian Rosbach [Tue, 7 Feb 2023 16:20:24 +0000 (17:20 +0100)] 
Update ilammy/msvc-dev-cmd

2 years agoUpdate release uploader
Hans Kristian Rosbach [Tue, 7 Feb 2023 16:19:05 +0000 (17:19 +0100)] 
Update release uploader

2 years agoUpdate codecov uploader
Hans Kristian Rosbach [Tue, 7 Feb 2023 16:18:54 +0000 (17:18 +0100)] 
Update codecov uploader

2 years agoUpdate to actions/upload-artifact@v3
Hans Kristian Rosbach [Tue, 7 Feb 2023 16:10:06 +0000 (17:10 +0100)] 
Update to actions/upload-artifact@v3

2 years agoRemove x86 cpu feature detection for tzcnt
Hans Kristian Rosbach [Sun, 5 Feb 2023 11:55:39 +0000 (12:55 +0100)] 
Remove x86 cpu feature detection for tzcnt

2 years agoRemove FORCE_TZCNT/X86_NOCHECK_TZCNT
Hans Kristian Rosbach [Sat, 4 Feb 2023 21:19:40 +0000 (22:19 +0100)] 
Remove FORCE_TZCNT/X86_NOCHECK_TZCNT

2 years agoReplace __builtin_ctz[ll] fallback functions with branchless implementations.
Hans Kristian Rosbach [Sat, 4 Feb 2023 20:54:09 +0000 (21:54 +0100)] 
Replace __builtin_ctz[ll] fallback functions with branchless implementations.
Added debug assert check for value = 0.
Added more details to the comment to avoid future confusion.
Added fallback logic for older MSVC versions, just in case.

2 years agoRemove unused chunk memory functions from functable.
Nathan Moinvaziri [Sun, 28 Aug 2022 02:34:30 +0000 (19:34 -0700)] 
Remove unused chunk memory functions from functable.

2 years agoUse arch-specific versions of inflate_fast.
Nathan Moinvaziri [Mon, 29 Aug 2022 03:27:37 +0000 (20:27 -0700)] 
Use arch-specific versions of inflate_fast.

This should reduce the cost of indirection that occurs when calling functable
chunk copying functions inside inflate_fast. It should also allow the compiler
to optimize the inflate fast path for the specific architecture.

2 years agoPin Google Benchmark to v1.7.1 to fix the upstream issue https://github.com/google...
Vladislav Shchapov [Fri, 3 Feb 2023 20:06:47 +0000 (01:06 +0500)] 
Pin Google Benchmark to v1.7.1 to fix the upstream issue https://github.com/google/benchmark/issues/1454.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoRename local `functable` variable to `ft`
Pavel P [Sun, 22 Jan 2023 11:27:16 +0000 (14:27 +0300)] 
Rename local `functable` variable to `ft`

2 years agoUse local functable variable instead of standalone function pointers
Pavel P [Sun, 22 Jan 2023 10:50:04 +0000 (13:50 +0300)] 
Use local functable variable instead of standalone function pointers

2 years agoMove initialization of functable to `init_functable` function
Pavel P [Fri, 13 Jan 2023 19:27:45 +0000 (22:27 +0300)] 
Move initialization of functable to `init_functable` function

2 years agoAvoid `functable` redefinition in functable.c
Pavel P [Fri, 13 Jan 2023 18:34:32 +0000 (21:34 +0300)] 
Avoid `functable` redefinition in functable.c

`functable` is already declared by functable.h which is included by functable.c

2 years agoSync with zlib 1.2.13 and declare compatibility.
Mika T. Lindqvist [Wed, 14 Dec 2022 13:12:43 +0000 (15:12 +0200)] 
Sync with zlib 1.2.13 and declare compatibility.

2 years agoFix crash when gzsetparams() attempted for transparent write.
Mark Adler [Tue, 27 Dec 2022 07:36:01 +0000 (23:36 -0800)] 
Fix crash when gzsetparams() attempted for transparent write.

gzsetparams() now returns a Z_STREAM_ERROR in this case.

2 years agoFix bug in deflateBound() for level 0 and memLevel 9.
Mark Adler [Thu, 15 Dec 2022 17:07:13 +0000 (09:07 -0800)] 
Fix bug in deflateBound() for level 0 and memLevel 9.

memLevel 9 would cause deflateBound() to assume the use of fixed
blocks, even if the compression level was 0, which forces stored
blocks. That could result in a bound less than the size of the
compressed data. Now level 0 always uses the stored blocks bound.

2 years agoRemove redundant check in gz_look().
Mark Adler [Thu, 6 Oct 2022 19:57:31 +0000 (12:57 -0700)] 
Remove redundant check in gz_look().

2 years agoRemove -pedantic from configure -w compile options.
Mark Adler [Thu, 6 Oct 2022 08:03:18 +0000 (01:03 -0700)] 
Remove -pedantic from configure -w compile options.

2 years agoAdd WIN32_LEAN_AND_MEAN for windows.h include.
Mark Adler [Mon, 3 Oct 2022 15:47:03 +0000 (08:47 -0700)] 
Add WIN32_LEAN_AND_MEAN for windows.h include.

2 years agoFix bug in block type selection when Z_FIXED used.
Mark Adler [Sun, 2 Oct 2022 02:55:29 +0000 (19:55 -0700)] 
Fix bug in block type selection when Z_FIXED used.

A fixed block could be chosen when a stored block was smaller. Now
the smaller of the two is always chosen.

2 years agoHave infback() deliver all of the available output up to any error.
Mark Adler [Sun, 24 Jul 2022 18:41:07 +0000 (11:41 -0700)] 
Have infback() deliver all of the available output up to any error.

2 years agoHave build test report library version if it doesn't match zlib.h.
Mark Adler [Thu, 26 May 2022 15:47:51 +0000 (08:47 -0700)] 
Have build test report library version if it doesn't match zlib.h.

2 years agoAllow disabling visibility attribute with configure
Mika Lindqvist [Sat, 21 Jan 2023 23:16:11 +0000 (01:16 +0200)] 
Allow disabling visibility attribute with configure
* Disable visibility check for Cygwin, MinGW and MSYS as the compiler will only issue warning instead of error for unsupported attributes.

2 years agoFix missing gzip functions when linking example and minigzip binaries.
Mika Lindqvist [Sat, 21 Jan 2023 23:12:24 +0000 (01:12 +0200)] 
Fix missing gzip functions when linking example and minigzip binaries.

2 years agoFix building resource files during out-of-tree build with configure
Mika Lindqvist [Sat, 21 Jan 2023 23:04:55 +0000 (01:04 +0200)] 
Fix building resource files during out-of-tree build with configure

2 years agoAdd support for symbol prefix to linker definition files.
Mika Lindqvist [Sat, 21 Jan 2023 22:59:08 +0000 (00:59 +0200)] 
Add support for symbol prefix to linker definition files.

2 years agoFix configure to use correct linker definition file when --without-gzfileops is speci...
Mika Lindqvist [Sat, 21 Jan 2023 22:57:18 +0000 (00:57 +0200)] 
Fix configure to use correct linker definition file when --without-gzfileops is specified.

2 years agoFix MinGW build
Mika Lindqvist [Fri, 20 Jan 2023 21:37:36 +0000 (23:37 +0200)] 
Fix MinGW build
* Add detection of XSAVE intrinsics

2 years agoAdd assert for tzcnt if building with X86_NOCHECK_TZCNT
Pavel P [Tue, 17 Jan 2023 01:42:24 +0000 (04:42 +0300)] 
Add assert for tzcnt if building with X86_NOCHECK_TZCNT

2 years agoAdd temporary cmake build dirs/files to gitignore
Pavel P [Sun, 22 Jan 2023 21:48:10 +0000 (00:48 +0300)] 
Add temporary cmake build dirs/files to gitignore

2 years agoFix typo found by codespell
Dimitri Papadopoulos [Thu, 2 Feb 2023 15:06:52 +0000 (16:06 +0100)] 
Fix typo found by codespell

2 years agoFix ABI checking...
Mika T. Lindqvist [Tue, 13 Dec 2022 20:06:43 +0000 (22:06 +0200)] 
Fix ABI checking...
* Ubuntu 22.04 use different format for ABI files so old ones need to be removed
* Use more recent zlib-ng commit to avoid issues with internal adler32 and crc32 functions

2 years agoMatch __builtin_ctzl/__builtin_ctzll signatures
Pavel P [Tue, 17 Jan 2023 01:39:37 +0000 (04:39 +0300)] 
Match __builtin_ctzl/__builtin_ctzll signatures

make sure input/output args match original functions from clang/gcc

2 years agoFix MSVC warnings in benchmark code
Cameron Cawley [Fri, 30 Sep 2022 17:59:55 +0000 (18:59 +0100)] 
Fix MSVC warnings in benchmark code

2 years agoUse size_t instead of uint64_t for len in all adler32 functions
Cameron Cawley [Fri, 30 Sep 2022 15:54:16 +0000 (16:54 +0100)] 
Use size_t instead of uint64_t for len in all adler32 functions

2 years agoUse size_t instead of uint64_t for len in all crc32 functions
Cameron Cawley [Fri, 30 Sep 2022 15:06:42 +0000 (16:06 +0100)] 
Use size_t instead of uint64_t for len in all crc32 functions

2 years agoFix compilation error where `crc32_fold` type matches field name in struct functable_s
Pavel P [Fri, 13 Jan 2023 18:31:48 +0000 (21:31 +0300)] 
Fix compilation error where `crc32_fold` type matches field name in struct functable_s

If functable.h is included by a c++ compiler, compiler issues the following error (VS 2022):
```
zlib-ng/functable.h(20,49): error C2327: 'functable_s::crc32_fold': is not a type name, static, or enumerator
```
The error happens on line 20 because on previous line crc32_fold is declared as a struct member. Using `struct crc32_fold_s` instead of `crc32_fold` fixes the error.

2 years agoDo not use cpuid.h on Windows
Pavel P [Tue, 17 Jan 2023 02:50:14 +0000 (05:50 +0300)] 
Do not use cpuid.h on Windows

According to msdn docs __cpuid/__cpuidex/_xgetbv are provided by intrin.h and should be used on windows

2 years agoMake sure inflate_p.h is fully guarded by header guard
Pavel P [Fri, 13 Jan 2023 18:23:07 +0000 (21:23 +0300)] 
Make sure inflate_p.h is fully guarded by header guard

2 years agoUse const char* for z_error argument
Pavel P [Fri, 13 Jan 2023 18:21:43 +0000 (21:21 +0300)] 
Use const char* for z_error argument

2 years agoDelete ctzl.h
Cameron Cawley [Wed, 11 Jan 2023 20:04:41 +0000 (20:04 +0000)] 
Delete ctzl.h

2 years agoChange pkgcheck to use macos-11 runner
Mika Lindqvist [Wed, 18 Jan 2023 23:47:14 +0000 (01:47 +0200)] 
Change pkgcheck to use macos-11 runner
* macos-latest runner doesn't have XCode 11.7.0 anymore, newer XCode versions have incompatible toolchain

2 years agoChange configure workflow to use gcc-11 for MacOS
Mika Lindqvist [Thu, 19 Jan 2023 00:01:11 +0000 (02:01 +0200)] 
Change configure workflow to use gcc-11 for MacOS
* gcc-9 is not installed on macos-latest runner

2 years agoFix visibility of a few internal functions.
Hans Kristian Rosbach [Thu, 29 Dec 2022 12:39:35 +0000 (13:39 +0100)] 
Fix visibility of a few internal functions.

2 years agoCorrect indents
Piotr Kubaj [Sat, 12 Nov 2022 00:51:22 +0000 (01:51 +0100)] 
Correct indents

2 years agoFix configure script for FreeBSD/powerpc*
Piotr Kubaj [Mon, 3 Oct 2022 23:43:02 +0000 (01:43 +0200)] 
Fix configure script for FreeBSD/powerpc*

2 years agoAdd FreeBSD/powerpc* support to cmake/detect-intrinsics.cmake
Piotr Kubaj [Tue, 27 Sep 2022 22:57:46 +0000 (00:57 +0200)] 
Add FreeBSD/powerpc* support to cmake/detect-intrinsics.cmake

2 years agoFix build on FreeBSD/powerpc*
Piotr Kubaj [Tue, 6 Sep 2022 17:19:15 +0000 (19:19 +0200)] 
Fix build on FreeBSD/powerpc*

Use elf_aux_info() instead of getauxval() on FreeBSD.

2 years agoAllow gtest_zlib to be manually disabled
Cameron Cawley [Thu, 13 Oct 2022 17:52:50 +0000 (18:52 +0100)] 
Allow gtest_zlib to be manually disabled

2 years agoPrefix shared functions to prevent symbol conflict when linking native api against...
Nathan Moinvaziri [Sat, 25 Jun 2022 22:25:22 +0000 (15:25 -0700)] 
Prefix shared functions to prevent symbol conflict when linking native api against compat api.

2 years agoAdd missing symbol name mangling
Dženan Zukić [Thu, 4 Aug 2022 20:55:30 +0000 (16:55 -0400)] 
Add missing symbol name mangling

See https://github.com/InsightSoftwareConsortium/ITK/issues/3530

2 years agoIncrease ghostflow-director max-size for crc32_braid_tbl.h
Dženan Zukić [Thu, 4 Aug 2022 21:47:33 +0000 (17:47 -0400)] 
Increase ghostflow-director max-size for crc32_braid_tbl.h

2 years agoIBM zSystems DFLTCC: Do not update strm.adler for raw streams
Ilya Leoshkevich [Thu, 22 Dec 2022 09:34:57 +0000 (10:34 +0100)] 
IBM zSystems DFLTCC: Do not update strm.adler for raw streams

Commit d38dd9240f2d ("IBM Z DFLTCC: Fix updating strm.adler with
inflate()") broke libxml2, as can be seen with the repro from [1]:

    $ echo "<a></a>" | gzip >file.xml.gz
    $ python3 -c 'import libxml2; libxml2.parseFile("file.xml.gz")'
    file.xml.gz:1: parser error : Document is empty

This is because libxml2 expects strm.adler to be untouched for raw
streams.

Fix this and a similar issue in deflate by adding state->wrap checks.
Add tests.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2155328
[2] https://gitlab.gnome.org/GNOME/libxml2/-/blob/v2.10.3/xzlib.c#L607

2 years agoForce ppc64le to ubuntu 20.04 to prevent illegal instruction.
Nathan Moinvaziri [Tue, 27 Dec 2022 22:42:22 +0000 (14:42 -0800)] 
Force ppc64le to ubuntu 20.04 to prevent illegal instruction.

2 years agoForce sparc64 to ubuntu 20.04 to prevent segfault.
Nathan Moinvaziri [Tue, 27 Dec 2022 22:24:40 +0000 (14:24 -0800)] 
Force sparc64 to ubuntu 20.04 to prevent segfault.

2 years agoFixed MSAN failed to allocate error on Ubuntu 22.
Nathan Moinvaziri [Tue, 27 Dec 2022 23:27:13 +0000 (15:27 -0800)] 
Fixed MSAN failed to allocate error on Ubuntu 22.

https://github.com/llvm/llvm-project/issues/55785

2 years agoUse Clang 11.1.0 sources same as Clang version on Ubuntu 22.
Nathan Moinvaziri [Tue, 27 Dec 2022 23:25:07 +0000 (15:25 -0800)] 
Use Clang 11.1.0 sources same as Clang version on Ubuntu 22.

2 years agoTell scan-build ASSERT_TRUE() behaves like assert().
Mika T. Lindqvist [Thu, 15 Dec 2022 04:51:51 +0000 (06:51 +0200)] 
Tell scan-build ASSERT_TRUE() behaves like assert().

2 years agollvm-cov-11 needs llvm-11 on Ubuntu 22.04.
Mika T. Lindqvist [Sun, 11 Dec 2022 14:26:00 +0000 (16:26 +0200)] 
llvm-cov-11 needs llvm-11 on Ubuntu 22.04.

2 years agoIBM zSystems DFLTCC: Support inflate with small window
Ilya Leoshkevich [Thu, 20 Oct 2022 00:28:47 +0000 (02:28 +0200)] 
IBM zSystems DFLTCC: Support inflate with small window

There is no hardware control for DFLTCC window size, and because of
that supporting small windows for deflate is not trivial: one has to
make sure that DFLTCC does not emit large distances, which most likely
entails somehow trimming the window and/or input in order to make sure
that whave + avail_in <= wsize.

But inflate is much easier: one only has to allocate enough space. Do
that in dfltcc_alloc_window(), and also introduce ZCOPY_WINDOW() in
order to copy everything, not just what the software implementation
cares about.

After this change, software and hardware window formats no longer
match: the software will use wbits and wsize, and the hardware will use
HB_BITS and HB_SIZE. Unlike deflate, inflate does not switch between
software and hardware implementations mid-stream, which leaves only
inflateSetDictionary() and inflateGetDictionary() interesting.

2 years agoAdd CodeQL workflow for GitHub code scanning
LGTM Migrator [Wed, 9 Nov 2022 11:28:47 +0000 (11:28 +0000)] 
Add CodeQL workflow for GitHub code scanning

2 years agoFixed cast to smaller integer type on MSYS2 Clang64.
Nathan Moinvaziri [Sat, 19 Nov 2022 23:03:41 +0000 (15:03 -0800)] 
Fixed cast to smaller integer type on MSYS2 Clang64.

zlib/crc32_braid.c:128:24: error: cast to smaller integer type 'unsigned long'
 from 'const uint8_t *' (aka 'const unsigned char *')

2 years agoUpdate wine32 dependencies for Ubuntu 22.04
Mika T. Lindqvist [Sun, 4 Dec 2022 17:51:12 +0000 (19:51 +0200)] 
Update wine32 dependencies for Ubuntu 22.04

2 years agoUbuntu 22.04 CI image doesn't have clang-11 installed.
Mika T. Lindqvist [Mon, 5 Dec 2022 12:06:09 +0000 (14:06 +0200)] 
Ubuntu 22.04 CI image doesn't have clang-11 installed.

2 years agoUse CMake detection for Emscripten due to a bug in vcpkg.
Ingvar Stepanyan [Fri, 4 Nov 2022 16:31:13 +0000 (16:31 +0000)] 
Use CMake detection for Emscripten due to a bug in vcpkg.

When installing for wasm32 with vcpkg, CMake's try_run does not end up running
with the correct compiler. This issue has been mention in a few existing vcpkg
portfiles.

Alternatively, we could check the VCPKG_TARGET_ARCHITECTURE variable for wasm32
but instead we check for EMSCRIPTEN CMake variable.

2 years agoAll overriding the emulator used by configure script with EMU_RUN.
Nathan Moinvaziri [Mon, 10 Oct 2022 01:41:50 +0000 (18:41 -0700)] 
All overriding the emulator used by configure script with EMU_RUN.

2 years agoUpload generated makefiles when configure runs fail.
Nathan Moinvaziri [Mon, 22 Aug 2022 01:59:45 +0000 (18:59 -0700)] 
Upload generated makefiles when configure runs fail.

2 years agoAdded cmake and configure matrix runs for Emscripten.
Nathan Moinvaziri [Mon, 22 Aug 2022 01:37:14 +0000 (18:37 -0700)] 
Added cmake and configure matrix runs for Emscripten.

2 years agoRemove unused qemu-run variable from configure workflow matrix.
Nathan Moinvaziri [Mon, 22 Aug 2022 00:48:25 +0000 (17:48 -0700)] 
Remove unused qemu-run variable from configure workflow matrix.

The configure script automatically determines this with variable QEMU_ARCH.

2 years agoDon't run deflate concurrency Google Test for Emscripten/WASM32.
Nathan Moinvaziri [Sat, 20 Aug 2022 16:09:55 +0000 (09:09 -0700)] 
Don't run deflate concurrency Google Test for Emscripten/WASM32.

2 years agoTurn off tests for Emscripten that use large amounts of data.
Nathan Moinvaziri [Mon, 22 Aug 2022 02:26:32 +0000 (19:26 -0700)] 
Turn off tests for Emscripten that use large amounts of data.

2 years agoAdd support for compiling to WebAssembly using Emscripten.
Piotr Sikora [Mon, 22 Aug 2022 00:41:54 +0000 (17:41 -0700)] 
Add support for compiling to WebAssembly using Emscripten.

Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
2 years agoSupport using aligned_alloc() for memory allocation
Cameron Cawley [Thu, 13 Oct 2022 13:59:18 +0000 (14:59 +0100)] 
Support using aligned_alloc() for memory allocation

2 years agoIntroduce ZLIBNG_ENABLE_TESTS
Ilya Leoshkevich [Tue, 27 Sep 2022 22:50:36 +0000 (00:50 +0200)] 
Introduce ZLIBNG_ENABLE_TESTS

This patch adds the ability to run zlib-ng test suite against the
original zlib as follows:

    cmake -DZLIB_COMPAT=ON -DZLIBNG_ENABLE_TESTS=OFF .
    make
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make test

The benefit of this is that modifications to the original zlib can be
tested with a more extensive zlib-ng's testsuite, and the assumptions
that the zlib-ng tests make can be validated against the original zlib.

In addition to a number of tests that exercise purely zlib-ng specific
API, there are a few that expect zlib-ng specific behavior from the
original zlib API:

- deflate() (obviously) emits different streams
- zlib-ng's deflatePrime() can take more than 16 bits
- zVersion() returns a different string

Adjust or disable the respective tests for ZLIBNG_ENABLE_TESTS=OFF.

2 years agoMakefile.in: distclean should remove zlib.pc instead of clean
tch69 [Thu, 27 Oct 2022 14:42:19 +0000 (21:42 +0700)] 
Makefile.in: distclean should remove zlib.pc instead of clean

2 years agoDetect the availability of _Thread_local using a configure check
Cameron Cawley [Thu, 29 Sep 2022 18:30:31 +0000 (19:30 +0100)] 
Detect the availability of _Thread_local using a configure check

2 years agoEnable and fix -Wimplicit-fallthrough warnings
Cameron Cawley [Thu, 13 Oct 2022 15:07:37 +0000 (16:07 +0100)] 
Enable and fix -Wimplicit-fallthrough warnings

2 years ago[MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant...
Mika Lindqvist [Thu, 13 Oct 2022 15:18:52 +0000 (18:18 +0300)] 
[MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant code

2 years agoFix typo in README.md
Cameron Cawley [Wed, 12 Oct 2022 21:21:21 +0000 (22:21 +0100)] 
Fix typo in README.md

2 years agoFix deflate() with Z_BEST_COMPRESSION ignoring the dictionary
Ilya Leoshkevich [Thu, 20 Oct 2022 04:28:44 +0000 (06:28 +0200)] 
Fix deflate() with Z_BEST_COMPRESSION ignoring the dictionary

deflate_slow() uses s->quick_insert_string(), while
deflateSetDictionary() uses functable.insert_string(). These functions
use different hashing algorithms, which leads to deflate_slow()
ignoring the dictionary.

Fix by using s->insert_string() instead of functable.insert_string(),
which is set by lm_set_level() and matches what deflate_*() uses
(suggested by Mika Lindqvist).

2 years agoImprove Microsoft Visual Studio CI
Vladislav Shchapov [Sun, 2 Oct 2022 11:23:25 +0000 (16:23 +0500)] 
Improve Microsoft Visual Studio CI

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix crc32_fold_pclmulqdq.c(241): error C2719: 'fold3': formal parameter with requeste...
Vladislav Shchapov [Sun, 2 Oct 2022 13:16:24 +0000 (18:16 +0500)] 
Fix crc32_fold_pclmulqdq.c(241): error C2719: 'fold3': formal parameter with requested alignment of 16 won't be aligned (MSVC 2015 Win32).

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix missing intrinsics (MSVS 2015, 2017)
Vladislav Shchapov [Tue, 11 Oct 2022 13:12:16 +0000 (18:12 +0500)] 
Fix missing intrinsics (MSVS 2015, 2017)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix AVX2 detect
Vladislav Shchapov [Sun, 2 Oct 2022 18:01:52 +0000 (23:01 +0500)] 
Fix AVX2 detect

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix memcpy() overflow in adler32_fold.c and crc32_fold.c
Mika Lindqvist [Wed, 5 Oct 2022 10:58:28 +0000 (13:58 +0300)] 
Fix memcpy() overflow in adler32_fold.c and crc32_fold.c
* On 32-bit platforms, last parameter of memcpy() is limited to SSIZE_MAX, but is likely to overlap if used

2 years agoFix compiler warnings when ARM_NEON_HASLD4 is undefined
Cameron Cawley [Sat, 1 Oct 2022 15:01:52 +0000 (16:01 +0100)] 
Fix compiler warnings when ARM_NEON_HASLD4 is undefined

2 years agoSimplify feature checks in neon_intrins.h
Cameron Cawley [Thu, 29 Sep 2022 20:45:39 +0000 (21:45 +0100)] 
Simplify feature checks in neon_intrins.h

2 years agoMove the NEON compatibility defines into a separate file
Cameron Cawley [Thu, 29 Sep 2022 18:55:34 +0000 (19:55 +0100)] 
Move the NEON compatibility defines into a separate file