]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
3 years agoInclude win directory in pigz even if not using threads.
Nathan Moinvaziri [Thu, 1 Jul 2021 21:06:06 +0000 (14:06 -0700)] 
Include win directory in pigz even if not using threads.

3 years ago[MacOS] Downgrade to XCode 11.7.0 for pkgcheck.
Mika Lindqvist [Fri, 29 Oct 2021 17:57:31 +0000 (20:57 +0300)] 
[MacOS] Downgrade to XCode 11.7.0 for pkgcheck.

3 years agoAdded build system check for posix_memalign support.
Nathan Moinvaziri [Sat, 26 Jun 2021 00:23:34 +0000 (17:23 -0700)] 
Added build system check for posix_memalign support.

Co-authored-by: concatime <concatime@users.noreply@github.com>
Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
3 years agoFill out gzheader before calling deflateSetHeader for better code coverage in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:59:21 +0000 (16:59 -0700)] 
Fill out gzheader before calling deflateSetHeader for better code coverage in example.

3 years ago[arm] Disable ACLE, UNALIGNED_OK and UNALIGNED64_OK on armv7 and earlier.
Mika Lindqvist [Wed, 21 Jul 2021 16:26:43 +0000 (19:26 +0300)] 
[arm] Disable ACLE, UNALIGNED_OK and UNALIGNED64_OK on armv7 and earlier.
* armv7 has partial support for unaligned reads, but compiler might use instructions that do not support unaligned accesses

3 years agoAdded unit test to ensure that inflate with adler32 hash works on previously failed...
Nathan Moinvaziri [Tue, 7 Dec 2021 21:24:26 +0000 (16:24 -0500)] 
Added unit test to ensure that inflate with adler32 hash works on previously failed test case.

3 years agoWorkaround for installation failure of wine32.
Mika Lindqvist [Sat, 4 Dec 2021 06:25:17 +0000 (08:25 +0200)] 
Workaround for installation failure of wine32.

3 years agoENH: Transition to Ubuntu 18.04 in `GitHub` actions workflows
Jon Haitz Legarreta Gorroño [Wed, 13 Oct 2021 13:58:41 +0000 (09:58 -0400)] 
ENH: Transition to Ubuntu 18.04 in `GitHub` actions workflows

Transition to Ubuntu 18.04 in `GitHub` actions workflows.

Fixes:
```
Ubuntu 16.04 Clang
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.

Ubuntu 16.04 GCC
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
```

reported for example at:
https://github.com/zlib-ng/zlib-ng/actions/runs/1326434358

Official `GitHub` notice related to the removal of the 16.04 virtual
environments:
https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/

3 years agoIBM Z: Fix building outside of a source directory
Ilya Leoshkevich [Mon, 11 Oct 2021 11:12:42 +0000 (13:12 +0200)] 
IBM Z: Fix building outside of a source directory

Do not use relative includes, since they are valid only within the
source directory. Rely on the build system to pass the necessary
include flags instead.

3 years agoAdded code coverage for inflateGetDictionary in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:17:30 +0000 (16:17 -0700)] 
Added code coverage for inflateGetDictionary in example.

3 years agoCall deflateBound to calculate length with custom gzip header in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:58:48 +0000 (16:58 -0700)] 
Call deflateBound to calculate length with custom gzip header in example.

3 years agoAdded CI instances for CTZLL and CTZ builtin existence to improve code coverage.
Nathan Moinvaziri [Sat, 10 Jul 2021 17:08:53 +0000 (10:08 -0700)] 
Added CI instances for CTZLL and CTZ builtin existence to improve code coverage.

3 years agoAdd new crc32 unit test
Matheus Castanho [Wed, 16 Jun 2021 17:36:24 +0000 (14:36 -0300)] 
Add new crc32 unit test

4 years agoFix Z_SOLO mode
Bernhard Rosenkränzer [Sun, 27 Jun 2021 12:31:54 +0000 (14:31 +0200)] 
Fix Z_SOLO mode

Without this patch, #include <zlib.h> with Z_SOLO defined
(e.g. while building perl 5.34.0) fails because of use of
undefined types.

4 years agoVersion 2.0.5 2.0.5
Hans Kristian Rosbach [Mon, 21 Jun 2021 10:07:01 +0000 (12:07 +0200)] 
Version 2.0.5
- Fix inflate corruption on aarch64 #1008
- Fix MSVC warnings #1002 #1013
- Minor chunkset improvements #1000 #994 #1015
- Minor cleanup #997
- Add CI test for pigz on aarch64 #1004
- Cmake improvements #996

4 years ago[functable] Add missing call to cpu_check_features().
Mika Lindqvist [Mon, 21 Jun 2021 22:41:16 +0000 (01:41 +0300)] 
[functable] Add missing call to cpu_check_features().

4 years agoCast calculation of safe length to unsigned int to avoid compiler warnings.
Mika Lindqvist [Mon, 21 Jun 2021 06:07:59 +0000 (09:07 +0300)] 
Cast calculation of safe length to unsigned int to avoid compiler warnings.

4 years ago[chunkcopy_safe] Don't call chunkcopy().
Mika Lindqvist [Fri, 18 Jun 2021 23:08:20 +0000 (02:08 +0300)] 
[chunkcopy_safe] Don't call chunkcopy().
* chunkcopy() can read or write more than the safe length if the length is not multiple of chunk size.

4 years ago[chunkset_neon] Use vdupq_n_u64.
Mika Lindqvist [Fri, 18 Jun 2021 21:10:44 +0000 (00:10 +0300)] 
[chunkset_neon] Use vdupq_n_u64.
* Using vdupq_n_u64 duplicates the unsigned 64-bit integer to two consecutive aligned memory locations in stack so compiler can use wider load instructions.
  All different-sized general-purpose registers overlay on ARM/AArch64, so any vector cast is no-op in assembly.

4 years ago[chunkset_neon] Don't use signed vector types.
Mika Lindqvist [Fri, 18 Jun 2021 20:15:28 +0000 (23:15 +0300)] 
[chunkset_neon] Don't use signed vector types.
* There is no need to convert between unsigned and signed vector types. All relevant intrinsics have versions for all unsigned vector types.

4 years agoReduce number of branches in partial chunk copy based on chunk size.
Nathan Moinvaziri [Sun, 13 Jun 2021 22:57:28 +0000 (15:57 -0700)] 
Reduce number of branches in partial chunk copy based on chunk size.

4 years agoFix MSVC warnings in hash_head_0.c test
Ilya Leoshkevich [Mon, 14 Jun 2021 19:03:51 +0000 (21:03 +0200)] 
Fix MSVC warnings in hash_head_0.c test

4 years agoAdded aarch64 to pigz GitHub actions workflow.
Nathan Moinvaziri [Wed, 16 Jun 2021 15:11:33 +0000 (08:11 -0700)] 
Added aarch64 to pigz GitHub actions workflow.

4 years agoAdded Z_UNUSED define for ignore unused variables.
Nathan Moinvaziri [Sun, 13 Jun 2021 22:16:20 +0000 (15:16 -0700)] 
Added Z_UNUSED define for ignore unused variables.

4 years agoChange WITH_SANITIZER to be a multi-option parameter (for ccmake etc).
Hans Kristian Rosbach [Sun, 13 Jun 2021 13:11:23 +0000 (15:11 +0200)] 
Change WITH_SANITIZER to be a multi-option parameter (for ccmake etc).
Add support for selcting Thread sanitizer.

4 years agoAdded assert in chunkcopy to detect invalid length.
Nathan Moinvaziri [Fri, 11 Jun 2021 00:25:27 +0000 (17:25 -0700)] 
Added assert in chunkcopy to detect invalid length.

4 years agoCalculate from and out buffer advance only once in chunkcopy.
Nathan Moinvaziri [Fri, 4 Jun 2021 22:27:26 +0000 (15:27 -0700)] 
Calculate from and out buffer advance only once in chunkcopy.

4 years agoOnly need to add rem if it is greater than zero in chunkmemset.
Nathan Moinvaziri [Fri, 4 Jun 2021 22:24:23 +0000 (15:24 -0700)] 
Only need to add rem if it is greater than zero in chunkmemset.

4 years agoMust use safe chunk copies due to inflateBack using the same allocation for output...
Nathan Moinvaziri [Fri, 11 Jun 2021 00:19:25 +0000 (17:19 -0700)] 
Must use safe chunk copies due to inflateBack using the same allocation for output and   window. In this instance if too many bytes are written it will not correctly write matches with distances close to the window size.

4 years agoVersion 2.0.4 2.0.4
Hans Kristian Rosbach [Fri, 11 Jun 2021 10:44:06 +0000 (12:44 +0200)] 
Version 2.0.4
- Fix inflate corruption #982
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980 #989

4 years ago[CHUNKMEMSET_SAFE] Precalculate "from".
Mika Lindqvist [Thu, 10 Jun 2021 15:23:34 +0000 (18:23 +0300)] 
[CHUNKMEMSET_SAFE] Precalculate "from".
* limit len to minimum of len and left

4 years ago[inflate_fast] Always use safe versions of chunkcopy and chunkmemset to avoid errors...
Nathan Moinvaziri [Wed, 9 Jun 2021 16:15:52 +0000 (19:15 +0300)] 
[inflate_fast] Always use safe versions of chunkcopy and chunkmemset to avoid errors with optimizations enabled.

4 years ago[CHUNKCOPY_SAFE] Fix off-by-one error
Mika Lindqvist [Wed, 9 Jun 2021 16:15:12 +0000 (19:15 +0300)] 
[CHUNKCOPY_SAFE] Fix off-by-one error
* When chunk size was more than 8 bytes, the comparison logic failed if safe length was one less than chunk size.

4 years agofix: unterminated #elif in detect-arch.c
Ilya Kurdyukov [Wed, 9 Jun 2021 12:27:24 +0000 (19:27 +0700)] 
fix: unterminated #elif in detect-arch.c

```
$ gcc detect-arch.c
detect-arch.c:8:6: error: #error archfound x86_64
     #error archfound x86_64
      ^~~~~
detect-arch.c:7:0: error: unterminated #elif
 #if defined(__x86_64__) || defined(_M_X64)
```

4 years agofix: SSE42CMPSTR compiled even if WITH_SSE4=OFF
Ilya Kurdyukov [Wed, 9 Jun 2021 12:19:50 +0000 (19:19 +0700)] 
fix: SSE42CMPSTR compiled even if WITH_SSE4=OFF

4 years agoAdded pigz tests for no threads and no optimizations.
Nathan Moinvaziri [Fri, 4 Jun 2021 15:01:30 +0000 (08:01 -0700)] 
Added pigz tests for no threads and no optimizations.

4 years agoAdded GH-979 failure test case against for inflateBack.
Nathan Moinvaziri [Fri, 4 Jun 2021 01:44:08 +0000 (18:44 -0700)] 
Added GH-979 failure test case against for inflateBack.

4 years agoAdded CMake project for building pigz.
Nathan Moinvaziri [Fri, 4 Jun 2021 01:02:03 +0000 (18:02 -0700)] 
Added CMake project for building pigz.
Added GitHub Actions CI for testing pigz.

4 years agoMove MIN() macro to zbuild.h
Mika Lindqvist [Wed, 2 Jun 2021 23:38:24 +0000 (02:38 +0300)] 
Move MIN() macro to zbuild.h

4 years agoUse SET_BAD macro in inflateBack.
Nathan Moinvaziri [Wed, 2 Jun 2021 23:32:00 +0000 (16:32 -0700)] 
Use SET_BAD macro in inflateBack.

4 years agoReplace CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR
Vladislav Shchapov [Sat, 29 May 2021 12:34:40 +0000 (17:34 +0500)] 
Replace CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR

4 years agoFixed trying to uncompress after compressing in gzip direct mode which is not support...
Nathan Moinvaziri [Thu, 27 May 2021 17:27:09 +0000 (10:27 -0700)] 
Fixed trying to uncompress after compressing in gzip direct mode which is not supported by gz functions.
https://oss-fuzz.com/testcase-detail/6194422837542912

4 years agoFixed gz mode for compression level not using ascii numeric value.
Nathan Moinvaziri [Thu, 27 May 2021 17:17:08 +0000 (10:17 -0700)] 
Fixed gz mode for compression level not using ascii numeric value.

4 years agoUse different fuzzer bits in example_dict_fuzzer for more input value combinations.
Nathan Moinvaziri [Thu, 27 May 2021 16:31:47 +0000 (09:31 -0700)] 
Use different fuzzer bits in example_dict_fuzzer for more input value combinations.

4 years agoExplicitly state clang version to prevent future code coverage format mismatches.
Nathan Moinvaziri [Sat, 29 May 2021 19:01:07 +0000 (12:01 -0700)] 
Explicitly state clang version to prevent future code coverage format mismatches.

4 years agoUse latest version of llvm-cov 11 to prevent code coverage version mismatch when...
Nathan Moinvaziri [Sat, 29 May 2021 18:14:48 +0000 (11:14 -0700)] 
Use latest version of llvm-cov 11 to prevent code coverage version mismatch when using clang.

4 years agoOnly when using Visual C++, the static library name should be "zlibstatic"
Mika Lindqvist [Sat, 22 May 2021 05:38:46 +0000 (08:38 +0300)] 
Only when using Visual C++, the static library name should be "zlibstatic"
* On CygWin, MSYS and MinGW, the static library name should be "z" like on other Unix-like systems

4 years agoRemove unnecessary test for stdarg.h
Mika Lindqvist [Tue, 25 May 2021 17:45:27 +0000 (20:45 +0300)] 
Remove unnecessary test for stdarg.h

4 years agoHandle HAVE_UNISTD_H defined to 0.
Paweł Wegner [Thu, 13 May 2021 15:15:37 +0000 (17:15 +0200)] 
Handle HAVE_UNISTD_H defined to 0.

FFmpeg during the configure stage generates a config.h file with
```
#define HAVE_UNISTD_H 0
```
on windows. Then somewhere in FFmpeg's code there is:
```
#include "config.h"  // FFmpeg's config.h
#include <zlib.h>
```
which causes zlib.h to include unistd.h on windows. It is way easier to handle the issue here than in FFmpeg.

Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
4 years agoFix warnings in configure
Mika Lindqvist [Tue, 25 May 2021 16:55:27 +0000 (19:55 +0300)] 
Fix warnings in configure
* Don't assign contents of variable to itself
* Quote strings containing "="

4 years agoFix build under Cygwin.
Mika Lindqvist [Tue, 25 May 2021 14:46:46 +0000 (17:46 +0300)] 
Fix build under Cygwin.

4 years agoOpenBSD build fix proposal
David Carlier [Fri, 21 May 2021 19:36:21 +0000 (20:36 +0100)] 
OpenBSD build fix proposal

4 years agoFix build on NetBSD
Kolby Crouch [Sat, 15 May 2021 18:17:42 +0000 (13:17 -0500)] 
Fix build on NetBSD

4 years agoRemove redundancy; apple is unix
Greg Sjaardema [Thu, 13 May 2021 14:41:22 +0000 (08:41 -0600)] 
Remove redundancy; apple is unix

4 years agoFix compiler detection to avoid bad mpicc match
Greg Sjaardema [Thu, 13 May 2021 13:57:24 +0000 (07:57 -0600)] 
Fix compiler detection to avoid bad mpicc match

4 years agoSpelling fixes
Greg Sjaardema [Thu, 13 May 2021 23:10:12 +0000 (17:10 -0600)] 
Spelling fixes

4 years agoVersion 2.0.3 2.0.3
Hans Kristian Rosbach [Sat, 8 May 2021 16:45:00 +0000 (18:45 +0200)] 
Version 2.0.3

- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936 #952
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940

4 years ago[ARM/AArch64] More thorough testing of getauxval() macros and includes
Mika Lindqvist [Sun, 9 May 2021 05:17:03 +0000 (08:17 +0300)] 
[ARM/AArch64] More thorough testing of getauxval() macros and includes
* 32-bit ARM and AArch64 use slightly different macros for CRC32 and NEON feature bits
* 32-bit ARM sometimes requires asm/hwcap.h for AT_HWCAP2

4 years agoupgrade links to HTTPS
Viktor Szakats [Thu, 6 May 2021 17:49:21 +0000 (19:49 +0200)] 
upgrade links to HTTPS

http://infozip.sourceforge.net/ is sadly not having HTTPS access
enabled. Shoutout to somebody with admin access for this project:
It would be nice to enable it and thus allowing secure access to
these pages via https://infozip.sourceforge.io/ . The option has
been there for a while now:
  https://sourceforge.net/blog/introducing-https-for-project-websites/

also:
- follow permanent redirects
- add ending slashes

4 years agoDon't check for SSSE3 on non-x86 architectures.
Hans Kristian Rosbach [Sat, 8 May 2021 12:46:15 +0000 (14:46 +0200)] 
Don't check for SSSE3 on non-x86 architectures.

4 years agoFix cmake detection of risc-v (32 and 64 bit)
Vladimir Smirnov [Sun, 2 May 2021 12:56:16 +0000 (14:56 +0200)] 
Fix cmake detection of risc-v (32 and 64 bit)

Add a case to detect risc-v architectures.

Fixes #941

4 years agoReintroduce Z_SOLO support for compatibility mode.
Mika Lindqvist [Mon, 3 May 2021 14:06:05 +0000 (17:06 +0300)] 
Reintroduce Z_SOLO support for compatibility mode.

4 years agoAdd status messages in test-compress cmake script.
Nathan Moinvaziri [Fri, 30 Apr 2021 01:18:36 +0000 (18:18 -0700)] 
Add status messages in test-compress cmake script.
Change filenames used during test to make it more clear what stage they are apart of.

4 years agoSimplify cleaning up files in test-compress cmake script and always clean up files...
Nathan Moinvaziri [Fri, 30 Apr 2021 01:16:56 +0000 (18:16 -0700)] 
Simplify cleaning up files in test-compress cmake script and always clean up files on successful run.

4 years agoCreate temporary files in CTest's Testing/Temporary directory and upload all files...
Nathan Moinvaziri [Fri, 30 Apr 2021 01:02:34 +0000 (18:02 -0700)] 
Create temporary files in CTest's Testing/Temporary directory and upload all files as artifacts.

4 years agoPrint differences between expected output in test-compress cmake script and upload...
Nathan Moinvaziri [Fri, 30 Apr 2021 01:45:41 +0000 (18:45 -0700)] 
Print differences between expected output in test-compress cmake script and upload as artifacts.

4 years agoDecompress gzip compressed archive to a separate file to prevent corruption issues...
Nathan Moinvaziri [Sun, 2 May 2021 13:05:35 +0000 (06:05 -0700)] 
Decompress gzip compressed archive to a separate file to prevent corruption issues on macOS. (#939)

* Decompress gzip compressed archive to a separate file to prevent corruption issues on macOS.
* Clean up fatal error messages in test-compress cmake script.

4 years agocrc: fix three conversion warnings
Aaron Boxer [Tue, 20 Apr 2021 22:03:32 +0000 (18:03 -0400)] 
crc: fix three conversion warnings

4 years agoDetect hwcap flags needed for runtime detection on ARM Linux
Josh Triplett [Sun, 25 Apr 2021 22:21:54 +0000 (15:21 -0700)] 
Detect hwcap flags needed for runtime detection on ARM Linux

This allows us to provide useful warning messages from cmake or
configure if the system headers don't provide the necessary flags to do
runtime detection.

4 years agoDon't directly include asm/hwcap.h; fix compilation on musl aarch64
Josh Triplett [Sat, 24 Apr 2021 20:27:58 +0000 (13:27 -0700)] 
Don't directly include asm/hwcap.h; fix compilation on musl aarch64

sys/auxv.h includes the appropriate headers to provide the HWCAP
constants, on both glibc and musl, which makes it unnecessary to include
asm/hwcap.h directly. And on musl, asm/hwcap.h doesn't exist.

4 years agoAdded Z_FIXED and direct gzip out modes to minigzip fuzzer.
Nathan Moinvaziri [Thu, 15 Apr 2021 15:44:52 +0000 (08:44 -0700)] 
Added Z_FIXED and direct gzip out modes to minigzip fuzzer.

4 years agoChanged minigzip fuzzer outmode[3] to be determined based on a different value then...
Nathan Moinvaziri [Thu, 15 Apr 2021 15:44:03 +0000 (08:44 -0700)] 
Changed minigzip fuzzer outmode[3] to be determined based on a different value then outmode[2] for better coverage.

4 years agoFix cmake coverage detection requiring cmake 3.14 or newer.
Hans Kristian Rosbach [Sat, 24 Apr 2021 21:58:35 +0000 (23:58 +0200)] 
Fix cmake coverage detection requiring cmake 3.14 or newer.

4 years agoFix build with LTO on GCC
Victor Westerhuis [Sat, 24 Apr 2021 22:55:10 +0000 (00:55 +0200)] 
Fix build with LTO on GCC

4 years agoRemove unnecessary malloc.h header include from minigzip and minigzip_fuzzer.
Nathan Moinvaziri [Sat, 27 Mar 2021 00:50:28 +0000 (17:50 -0700)] 
Remove unnecessary malloc.h header include from minigzip and minigzip_fuzzer.

4 years ago[ARM] Use temporary variable when loading more than 8 bits in chunkmemset_neon().
Mika Lindqvist [Sat, 10 Apr 2021 00:13:33 +0000 (03:13 +0300)] 
[ARM] Use temporary variable when loading more than 8 bits in chunkmemset_neon().
* using memcpy() forbids optimizer to optimize away the temporary variable due to aliasing rules.

4 years agoWrite generated files during tests to CMake's build directory using the name of the...
Nathan Moinvaziri [Sat, 27 Mar 2021 01:43:18 +0000 (18:43 -0700)] 
Write generated files during tests to CMake's build directory using the name of the test.

Co-authored-by: Vladislav Shchapov <phprus@users.noreply.github.com>
4 years agoChanged auto-detection of float-abi support by removing triplet check in favor of...
Nathan Moinvaziri [Tue, 30 Mar 2021 02:59:06 +0000 (19:59 -0700)] 
Changed auto-detection of float-abi support by removing triplet check in favor of compilation and link test. #911

4 years agoInstall clang-6 package if it is not present on Ubuntu when compiling against clang...
Nathan Moinvaziri [Thu, 8 Apr 2021 23:28:29 +0000 (16:28 -0700)] 
Install clang-6 package if it is not present on Ubuntu when compiling against clang-6 in CI.

4 years agoAdded Windows ARM and ARM64 binaries in releases. #909
Nathan Moinvaziri [Fri, 26 Mar 2021 00:16:40 +0000 (17:16 -0700)] 
Added Windows ARM and ARM64 binaries in releases. #909

4 years agoAlias ZEXTERN, ZEXPORT and ZEXPORTVA to Z_EXTERN, Z_EXPORT and Z_EXPORTVA respectively.
Mika Lindqvist [Thu, 25 Mar 2021 00:07:56 +0000 (02:07 +0200)] 
Alias ZEXTERN, ZEXPORT and ZEXPORTVA to Z_EXTERN, Z_EXPORT and Z_EXPORTVA respectively.

4 years agoFix build if -D_FILE_OFFSET_BITS=64 is set manually.
Mika Lindqvist [Wed, 31 Mar 2021 06:35:14 +0000 (09:35 +0300)] 
Fix build if -D_FILE_OFFSET_BITS=64 is set manually.

4 years agoInclude porting guide in GH release packages.
Nathan Moinvaziri [Fri, 26 Mar 2021 00:48:23 +0000 (17:48 -0700)] 
Include porting guide in GH release packages.

4 years agoAdded build differences between zlib-compat and zlib-ng native mode to porting doc.
Nathan Moinvaziri [Wed, 24 Mar 2021 01:42:50 +0000 (18:42 -0700)] 
Added build differences between zlib-compat and zlib-ng native mode to porting doc.

4 years agoVersion 2.0.2 2.0.2
Hans Kristian Rosbach [Mon, 22 Mar 2021 09:51:33 +0000 (10:51 +0100)] 
Version 2.0.2

4 years agoFix MSVC warnings in deflate_quick_block_open
Ilya Leoshkevich [Fri, 19 Mar 2021 21:34:32 +0000 (22:34 +0100)] 
Fix MSVC warnings in deflate_quick_block_open

Add casts in order to fix the following warnings [1]:

C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(62,69): warning C4244: '=': conversion from '__int64' to
 'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj]
C:\Users\Nathan\Source\zlib-ng\test\deflate_quick_block_open.c(73,1): warning C4244: 'initializing': conversion from '_
_int64' to 'uint32_t', possible loss of data [C:\Users\Nathan\Source\zlib-ng\deflate_quick_block_open.vcxproj]

[1] https://github.com/zlib-ng/zlib-ng/pull/880#issuecomment-802432700

4 years agoDetect unsupported VS at configure time (and not at compile time)
tbeu [Sun, 21 Mar 2021 18:28:04 +0000 (19:28 +0100)] 
Detect unsupported VS at configure time (and not at compile time)

4 years agoSupport for posix_memalign in FreeBSD 11. #873
Nathan Moinvaziri [Sat, 20 Mar 2021 03:45:13 +0000 (20:45 -0700)] 
Support for posix_memalign in FreeBSD 11. #873

Co-authored-by: Hans Kristian Rosbach <hk-git@circlestorm.org>
Co-authored-by: concatime <concatime@users.noreply@github.com>
4 years agoOnly perform auto-detection of floating point ABI on ARM arch. #895
Nathan Moinvaziri [Sat, 20 Mar 2021 02:38:42 +0000 (19:38 -0700)] 
Only perform auto-detection of floating point ABI on ARM arch. #895

Co-authored-by: zhangn1985 <zhangn1985@users.noreply.github.com>
4 years agoRestore hash_head != 0 checks
Ilya Leoshkevich [Thu, 18 Mar 2021 13:54:46 +0000 (14:54 +0100)] 
Restore hash_head != 0 checks

Commit bc5915e2dec7 ("Fixed unsigned integer overflow ASAN error when
hash_head > s->strstart.") removed hash_head != 0 checks in fast,
medium and slow deflate, because it improved performance [1].

Unfortunately, the attached test started failing after that.
Apparently, as the comments suggest, the code implicitly relies on
matches with the beginning of the window being skipped. So restore the
check.

[1] https://github.com/zlib-ng/zlib-ng/pull/772#issuecomment-710760300

4 years agoAdded preprocessor error guards to ensure proper library usage.
Nathan Moinvaziri [Thu, 18 Mar 2021 04:19:18 +0000 (21:19 -0700)] 
Added preprocessor error guards to ensure proper library usage.

4 years agoAdd a CMake macro for simple test executables
Ilya Leoshkevich [Thu, 18 Mar 2021 13:08:20 +0000 (14:08 +0100)] 
Add a CMake macro for simple test executables

6 tests use the same pattern: build a binary linked with zlib-ng and
run it. At the moment this requires 5 near-identical lines of CMake
code, leading to proliferation of copy-paste. Introduce a macro to get
rid of it.

4 years agoDon't test corpora when processing MinGW jobs. This should reduce the time these...
Nathan Moinvaziri [Thu, 18 Mar 2021 17:01:25 +0000 (10:01 -0700)] 
Don't test corpora when processing MinGW jobs. This should reduce the time these CI runs take considerably.

4 years agoFix GNUInstallDirs includedir detection
Victor Westerhuis [Thu, 18 Mar 2021 11:21:56 +0000 (12:21 +0100)] 
Fix GNUInstallDirs includedir detection

CMake uses `INCLUDEDIR` instead of `INCDIR`.

4 years agoCmake: Accept custom install dirs in various formats from command line.
Hans Kristian Rosbach [Wed, 17 Mar 2021 18:16:46 +0000 (19:16 +0100)] 
Cmake: Accept custom install dirs in various formats from command line.

4 years agoRemove unused header checks from CMake. These are legacy checks that zlib used to...
Nathan Moinvaziri [Tue, 16 Mar 2021 16:35:37 +0000 (09:35 -0700)] 
Remove unused header checks from CMake. These are legacy checks that zlib used to use.

4 years agoFix .pc file generation in CMakeLists.txt
Victor Westerhuis [Wed, 17 Mar 2021 15:38:38 +0000 (16:38 +0100)] 
Fix .pc file generation in CMakeLists.txt

Two words were swapped in a variable name, leading to empty
libdir and includedir variables in the generated .pc files.

4 years agoVersion 2.0.1 - Hotfix 2.0.1
Hans Kristian Rosbach [Wed, 17 Mar 2021 09:24:36 +0000 (10:24 +0100)] 
Version 2.0.1 - Hotfix

4 years agoFix block_open handling in deflate_quick()
Ilya Leoshkevich [Wed, 17 Mar 2021 00:14:41 +0000 (01:14 +0100)] 
Fix block_open handling in deflate_quick()

The attached test fails with "inflate() failed", because the deflate
stream that it produces ends up being corrupted. Bisect points to the
commit e7bb6db09a18 ("Replace hash_bits, hash_size and hash_mask with
defines."), but it's most likely a coincidence.

In any case, the reason is that if we happen to simultaneously exhaust
all the buffers (in, out and bi), we return finish_started without
writing the end of block symbol, which will never happen afterwards.

Fix by adding another check to the tricky condition: if we are in the
middle of a block, return need_more instead of finish_started.

4 years agoStable release 2.0.0 2.0.0
Hans Kristian Rosbach [Mon, 8 Mar 2021 13:36:15 +0000 (14:36 +0100)] 
Stable release 2.0.0