make gz* functions compatible with zlib 1.2.3+
This commit is contained in:
@@ -7,9 +7,7 @@
|
|||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ZLIB_VERNUM == 0x1260 && !defined(_LARGEFILE64_SOURCE)
|
|
||||||
// #define _LARGEFILE64_SOURCE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ZLIB_VERNUM <= 0x1240
|
#if ZLIB_VERNUM <= 0x1240
|
||||||
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
|
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
|
||||||
|
|||||||
@@ -381,11 +381,24 @@ int ZEXPORT gzread(file, buf, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -- see zlib.h -- */
|
/* -- see zlib.h -- */
|
||||||
|
#if ZLIB_VERNUM >= 0x1261
|
||||||
#ifdef Z_PREFIX_SET
|
#ifdef Z_PREFIX_SET
|
||||||
# undef z_gzgetc
|
# undef z_gzgetc
|
||||||
#else
|
#else
|
||||||
# undef gzgetc
|
# undef gzgetc
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ZLIB_VERNUM == 0x1260
|
||||||
|
# undef gzgetc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ZLIB_VERNUM <= 0x1250
|
||||||
|
ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
|
||||||
|
ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int ZEXPORT gzgetc(file)
|
int ZEXPORT gzgetc(file)
|
||||||
gzFile file;
|
gzFile file;
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define ZLIB_CONST
|
#define ZLIB_CONST
|
||||||
#define Z_PREFIX
|
#define Z_PREFIX
|
||||||
|
#define ZLIB_INTERNAL /* disables gz*64 functions but fixes zlib 1.2.4 with Z_PREFIX */
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
#if !defined(z_const)
|
#if !defined(z_const)
|
||||||
|
|||||||
Reference in New Issue
Block a user