Commit Graph

43 Commits

Author SHA1 Message Date
Mika T. Lindqvist
c970422caa Fix definition of z_size_t to match documentation of legacy zlib API. 2023-02-23 12:17:34 +01:00
Nathan Moinvaziri
92aa5d1caf Use zutil.h which already includes zlib headers. 2022-03-18 15:57:25 +01:00
Nathan Moinvaziri
ab0a6d9fa7 Remove zutil.h includes from many files to prevent zlib.h being included. 2022-01-29 17:03:22 +01:00
Nathan Moinvaziri
1f10aa4e29 Rename ZEXPORT and ZEXTERN for consistency. 2020-08-31 12:33:16 +02:00
Nathan Moinvaziri
7cffba4dd6 Rename ZLIB_INTERNAL to Z_INTERNAL for consistency. 2020-08-31 12:33:16 +02:00
Mika Lindqvist
28e5e73f34
Reintroduce support for ZLIB_CONST in compat mode. (#704)
* Reintroduce support for ZLIB_CONST in compat mode.
2020-08-23 09:58:57 +02:00
Pavel P
762068fdc6 Remove cvs keywords 2020-03-17 15:26:47 +01:00
Nathan Moinvaziri
e0a711cdde Fixed formatting, 4 spaces for code intent, 2 spaces for preprocessor indent, initial function brace on the same line as definition, removed extraneous spaces and new lines. 2020-02-07 10:44:20 +01:00
Mika Lindqvist
df1fd1567f Move private defines from zconf.h and zconf-ng.h to zbuild.h
* move definition of z_size_t to zbuild.h
2018-03-22 10:18:27 +01:00
Mika Lindqvist
ec6adfbfb0 [MSVC] Fix size_t/ssize_t when using ZLIB_COMPAT. (#161)
* zconf.h.in wasn't including Windows.h, that is correct header to include definitions from BaseTsd.h, and such missing required type definition for ssize_t when compiling using MS Visual C++
* Various places need implicit casting to z_size_t to get around compatibility issues, this will truncate the result when ZLIB_COMPAT is defined, calling code should check for truncation.
* Add ZLIB_COMPAT flag to nmake Makefile and use it to determine correct
  filenames instead of WITH_GZFILEOP
2018-03-22 10:01:18 +01:00
Mika Lindqvist
cd3f3d6e68 [compat] Use unsigned long for size parameters of compress/compressBound/uncompress 2018-02-16 15:48:06 +01:00
Mika Lindqvist
aff0fc6e3c Adapt code to support PREFIX macros and update build scripts 2018-01-31 10:45:29 +01:00
Hans Kristian Rosbach
f5e888a6a6 Add function prefix (zng_) to all exported functions to allow zlib-ng
to co-exist in an application that has been linked to something that
depends on stock zlib. Previously, that would cause random problems
since there is no way to guarantee what zlib version is being used
for each dynamically linked function.

Add the corresponding zlib-ng.h.

Tests, example and minigzip will not compile before they have been
adapted to use the correct functions as well.
Either duplicate them, so we have minigzip-ng.c for example, or add
compile-time detection in the source code.
2018-01-31 10:45:29 +01:00
Mark Adler
cd0071573c Use a uniform approach for the largest value of an unsigned type. 2017-02-07 10:38:47 +01:00
Mark Adler
ffdc43fea1 Add uncompress2() function, which returns the input size used. 2017-02-02 11:44:34 +01:00
Mika Lindqvist
602531cf3d Replace Z_NULL with NULL. Fix incorrect uses of NULL/Z_NULL. 2017-01-31 10:53:22 +01:00
Mika Lindqvist
63523d388d Use size_t for total_in and total_out. 2015-12-14 11:00:31 +02:00
Mika Lindqvist
9c3a280877 Type cleanup. 2015-12-14 11:00:22 +02:00
Mika Lindqvist
8f6c80710f Type cleanup. 2015-11-25 16:12:40 +01:00
Hans Kristian Rosbach
a8c8743112 Fix merge errors. 2015-11-03 19:35:54 +01:00
Mark Adler
b673ee00f3 Do not initialize unsigned with -1 in compress.c uncompr.c.
Sun compiler complained.  Use (unsigned)0 - 1 instead.
2015-11-03 18:52:30 +01:00
Mark Adler
1326f9ee20 Fix uncompress() to work on lengths more than a maximum unsigned.
Conflicts:
	uncompr.c
2015-11-03 18:52:21 +01:00
Hans Kristian Rosbach
ae0043b988 Style cleanup for compress/uncompress and longest_match code 2015-05-25 23:04:39 +02:00
Mika Lindqvist
09403c93fd Cleanup user-defined types for 'unsigned char'
* Change 'uch' to 'unsigned char'
* Change 'Byte' to 'unsigned char'
2015-05-23 01:22:20 +03:00
Daniel Axtens
24cfc4d7bb Kill Byte and Bytef
Signed-off-by: Daniel Axtens <dja@axtens.net>

Conflicts:
	adler32.c
	compress.c
	deflate.c
	inflate.c
	match.c
	test/example.c
	uncompr.c
	zlib.h
2015-05-17 18:11:59 +02:00
Daniel Axtens
48f9b2a0e9 z_const -> const
Signed-off-by: Daniel Axtens <dja@axtens.net>

Conflicts:
	arch/x86/crc_folding.c
	crc32.c
2015-05-13 14:18:18 +02:00
Hans Kristian Rosbach
abae9eefc4 Convert remaining K&R function declarations to ANSI-C declarations. 2015-05-12 18:54:20 +02:00
hansr
c4963b5ebf Remove FAR variants of variables ushf, schf, Posf, Bytef, charf,
intf, uIntf and uLongf
2014-10-16 15:32:17 +02:00
hansr
279e637d95 Remove legacy 16-bit workarounds 2014-10-09 14:35:50 +02:00
Mark Adler
62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
2012-08-13 00:02:40 -07:00
Mark Adler
dc5a43ebfa zlib 1.2.3.6 2011-09-09 23:26:58 -07:00
Mark Adler
4b5a43a219 zlib 1.2.0.5 2011-09-09 23:22:37 -07:00
Mark Adler
8e34b3a802 zlib 1.2.0.2 2011-09-09 23:22:10 -07:00
Mark Adler
7c2a874e50 zlib 1.2.0 2011-09-09 23:21:47 -07:00
Mark Adler
a383133c4e zlib 1.1.4 2011-09-09 23:20:42 -07:00
Mark Adler
b8c9ecb076 zlib 1.0.9 2011-09-09 23:19:21 -07:00
Mark Adler
7850e4e406 zlib 1.0.7 2011-09-09 23:17:33 -07:00
Mark Adler
423eb40306 zlib 1.0.1 2011-09-09 23:14:39 -07:00
Mark Adler
8a2acbffc8 zlib 1.0-pre 2011-09-09 23:13:27 -07:00
Mark Adler
56bcb184fa zlib 0.99 2011-09-09 23:11:37 -07:00
Mark Adler
23c69f1069 zlib 0.94 2011-09-09 23:09:18 -07:00
Mark Adler
bdde4e09d2 zlib 0.92 2011-09-09 23:08:07 -07:00
Mark Adler
bcf78a2097 zlib 0.71 2011-09-09 22:36:31 -07:00