From d81e7213b7c5756e8f82af2f2d9649d49112e8d7 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 18 Feb 2012 14:10:20 -0800 Subject: [PATCH] Restore gzgetc_ for backward compatibility with 1.2.6. --- as400/bndsrc | 6 ++++++ as400/zlib.inc | 3 +++ contrib/vstudio/vc10/zlibvc.def | 1 + contrib/vstudio/vc9/zlibvc.def | 1 + gzread.c | 6 ++++++ win32/zlib.def | 1 + zconf.h | 1 + zconf.h.cmakein | 1 + zconf.h.in | 1 + zlib.h | 1 + zlib.map | 1 + 11 files changed, 23 insertions(+) diff --git a/as400/bndsrc b/as400/bndsrc index da6eaa6e..52cc6613 100644 --- a/as400/bndsrc +++ b/as400/bndsrc @@ -190,6 +190,12 @@ STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') EXPORT SYMBOL("deflateResetKeep") EXPORT SYMBOL("deflatePending") +/********************************************************************/ +/* *MODULE GZWRITE ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("gzgetc_") + /********************************************************************/ /* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ /********************************************************************/ diff --git a/as400/zlib.inc b/as400/zlib.inc index e22ee4f7..747c598a 100644 --- a/as400/zlib.inc +++ b/as400/zlib.inc @@ -187,6 +187,9 @@ D c 10I 0 value Character to write * D gzgetc PR 10i 0 extproc('gzgetc') + D file value like(gzFile) File pointer + * + D gzgetc_ PR 10i 0 extproc('gzgetc_') D file value like(gzFile) File pointer * D gzungetc PR 10i 0 extproc('gzungetc') diff --git a/contrib/vstudio/vc10/zlibvc.def b/contrib/vstudio/vc10/zlibvc.def index d6411fd6..b4bb8f61 100644 --- a/contrib/vstudio/vc10/zlibvc.def +++ b/contrib/vstudio/vc10/zlibvc.def @@ -131,5 +131,6 @@ EXPORTS inflateUndermine @160 ; zlib1 v1.2.6 added: + gzgetc_ @161 inflateResetKeep @163 deflateResetKeep @164 diff --git a/contrib/vstudio/vc9/zlibvc.def b/contrib/vstudio/vc9/zlibvc.def index d6411fd6..b4bb8f61 100644 --- a/contrib/vstudio/vc9/zlibvc.def +++ b/contrib/vstudio/vc9/zlibvc.def @@ -131,5 +131,6 @@ EXPORTS inflateUndermine @160 ; zlib1 v1.2.6 added: + gzgetc_ @161 inflateResetKeep @163 deflateResetKeep @164 diff --git a/gzread.c b/gzread.c index 88807c98..3493d34d 100644 --- a/gzread.c +++ b/gzread.c @@ -408,6 +408,12 @@ int ZEXPORT gzgetc(file) return ret < 1 ? -1 : buf[0]; } +int ZEXPORT gzgetc_(file) +gzFile file; +{ + return gzgetc(file); +} + /* -- see zlib.h -- */ int ZEXPORT gzungetc(c, file) int c; diff --git a/win32/zlib.def b/win32/zlib.def index 4004ce9b..a2a2081c 100644 --- a/win32/zlib.def +++ b/win32/zlib.def @@ -80,3 +80,4 @@ EXPORTS inflateUndermine inflateResetKeep deflateResetKeep + gzgetc_ diff --git a/zconf.h b/zconf.h index 2f91b975..7f705dfb 100644 --- a/zconf.h +++ b/zconf.h @@ -67,6 +67,7 @@ # define gzerror z_gzerror # define gzflush z_gzflush # define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ # define gzgets z_gzgets # define gzoffset z_gzoffset # define gzoffset64 z_gzoffset64 diff --git a/zconf.h.cmakein b/zconf.h.cmakein index a7a4f699..9510eabd 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -69,6 +69,7 @@ # define gzerror z_gzerror # define gzflush z_gzflush # define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ # define gzgets z_gzgets # define gzoffset z_gzoffset # define gzoffset64 z_gzoffset64 diff --git a/zconf.h.in b/zconf.h.in index 2f91b975..7f705dfb 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -67,6 +67,7 @@ # define gzerror z_gzerror # define gzflush z_gzflush # define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ # define gzgets z_gzgets # define gzoffset z_gzoffset # define gzoffset64 z_gzoffset64 diff --git a/zlib.h b/zlib.h index 1ad592f0..2cbd9818 100644 --- a/zlib.h +++ b/zlib.h @@ -1649,6 +1649,7 @@ struct gzFile_s { unsigned char *next; z_off64_t pos; }; +ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ #ifdef Z_PREFIX_SET # undef z_gzgetc # define z_gzgetc(g) \ diff --git a/zlib.map b/zlib.map index e3bddd63..771f4204 100644 --- a/zlib.map +++ b/zlib.map @@ -73,5 +73,6 @@ ZLIB_1.2.5.1 { ZLIB_1.2.5.2 { deflateResetKeep; + gzgetc_; inflateResetKeep; } ZLIB_1.2.5.1;