From 41fdbffa72cab3c4f18ef5f34ab2fa0ec10d4d53 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 Aug 2008 14:25:41 +0200 Subject: zlib: we don't need the inflateReset2 prototype twice metze (This used to be commit 0dbbc287f65a51330c5309df5a96b3acd4d044d5) --- source4/lib/zlib/zlib.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/lib/zlib/zlib.h') diff --git a/source4/lib/zlib/zlib.h b/source4/lib/zlib/zlib.h index 20a16d9588..e80eed9a7e 100644 --- a/source4/lib/zlib/zlib.h +++ b/source4/lib/zlib/zlib.h @@ -789,8 +789,6 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, unsigned flags)); - ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, -- cgit From 5e4f668468d83b09765c4b15ff1b40b88401fb00 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Aug 2008 13:32:51 +0200 Subject: zlib: fix compiler warnings metze (This used to be commit ce44a608f66bf27070fd43d576551fde6f545d7c) --- source4/lib/zlib/zlib.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'source4/lib/zlib/zlib.h') diff --git a/source4/lib/zlib/zlib.h b/source4/lib/zlib/zlib.h index e80eed9a7e..5549f9cf57 100644 --- a/source4/lib/zlib/zlib.h +++ b/source4/lib/zlib/zlib.h @@ -80,7 +80,7 @@ typedef void (*free_func) OF((voidpf opaque, voidpf address)); struct internal_state; typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ + const Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ uLong total_in; /* total nb of input bytes read so far */ @@ -88,7 +88,7 @@ typedef struct z_stream_s { uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total nb of bytes output so far */ - char *msg; /* last error message, NULL if no error */ + const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ @@ -210,6 +210,16 @@ typedef gz_header FAR *gz_headerp; #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define _Z_PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define _Z_PRINTF_ATTRIBUTE(a1, a2) +#endif + /* basic functions */ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); @@ -887,7 +897,7 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, match the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef unsigned (*in_func) OF((void FAR *, unsigned const char FAR * FAR *)); typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, @@ -1132,7 +1142,8 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, (0 in case of error). */ -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)) + _Z_PRINTF_ATTRIBUTE(2, 3); /* Converts, formats, and writes the args to the compressed file under control of the format string, as in fprintf. gzprintf returns the number of -- cgit From 7474196d837eb6f9c8e6f26cd649cbb638fd34d8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 Aug 2008 14:26:53 +0200 Subject: zlib: mark as modified for samba metze (This used to be commit 0fb265e567d700b3c16eb8f28bc5f26653a819fa) --- source4/lib/zlib/zlib.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/lib/zlib/zlib.h') diff --git a/source4/lib/zlib/zlib.h b/source4/lib/zlib/zlib.h index 5549f9cf57..edf09d2b1e 100644 --- a/source4/lib/zlib/zlib.h +++ b/source4/lib/zlib/zlib.h @@ -37,8 +37,14 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.3" -#define ZLIB_VERNUM 0x1230 +#define ZLIB_VERSION "1.2.3.1.Samba" +#define ZLIB_VERNUM 0x1231 +/* + * Modified for Samba by Stefan Metzmacher 2008 + * + * inflateReset2() added and compiler warnings fixed + */ + /* The 'zlib' compression library provides in-memory compression and -- cgit