forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The code paths to interact with zlib has been cleaned up in preparation for building with zlib-ng. * ps/zlib-ng: ci: make "linux-musl" job use zlib-ng ci: switch linux-musl to use Meson compat/zlib: allow use of zlib-ng as backend git-zlib: cast away potential constness of `next_in` pointer compat/zlib: provide stubs for `deflateSetHeader()` compat/zlib: provide `deflateBound()` shim centrally git-compat-util: move include of "compat/zlib.h" into "git-zlib.h" compat: introduce new "zlib.h" header git-compat-util: drop `z_const` define compat: drop `uncompress2()` compatibility shim
- Loading branch information
Showing
20 changed files
with
100 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef COMPAT_ZLIB_H | ||
#define COMPAT_ZLIB_H | ||
|
||
#ifdef HAVE_ZLIB_NG | ||
# include <zlib-ng.h> | ||
|
||
# define z_stream zng_stream | ||
#define gz_header_s zng_gz_header_s | ||
|
||
# define crc32(crc, buf, len) zng_crc32(crc, buf, len) | ||
|
||
# define inflate(strm, bits) zng_inflate(strm, bits) | ||
# define inflateEnd(strm) zng_inflateEnd(strm) | ||
# define inflateInit(strm) zng_inflateInit(strm) | ||
# define inflateInit2(strm, bits) zng_inflateInit2(strm, bits) | ||
# define inflateReset(strm) zng_inflateReset(strm) | ||
|
||
# define deflate(strm, flush) zng_deflate(strm, flush) | ||
# define deflateBound(strm, source_len) zng_deflateBound(strm, source_len) | ||
# define deflateEnd(strm) zng_deflateEnd(strm) | ||
# define deflateInit(strm, level) zng_deflateInit(strm, level) | ||
# define deflateInit2(stream, level, method, window_bits, mem_level, strategy) zng_deflateInit2(stream, level, method, window_bits, mem_level, strategy) | ||
# define deflateReset(strm) zng_deflateReset(strm) | ||
# define deflateSetHeader(strm, head) zng_deflateSetHeader(strm, head) | ||
|
||
#else | ||
# include <zlib.h> | ||
|
||
# if defined(NO_DEFLATE_BOUND) || ZLIB_VERNUM < 0x1200 | ||
# define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11) | ||
# endif | ||
|
||
# if ZLIB_VERNUM < 0x1221 | ||
struct gz_header_s { | ||
int os; | ||
}; | ||
|
||
static int deflateSetHeader(z_streamp strm, struct gz_header_s *head) | ||
{ | ||
(void)(strm); | ||
(void)(head); | ||
return Z_OK; | ||
} | ||
# endif | ||
#endif /* HAVE_ZLIB_NG */ | ||
|
||
#endif /* COMPAT_ZLIB_H */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.