Restore gzgetc function for binary compatibility.

Newly compiled applications will use the gzgetc macro.
This commit is contained in:
Mark Adler
2011-12-18 14:47:08 -08:00
parent df60b50769
commit 3d85f02a09
7 changed files with 16 additions and 5 deletions

View File

@@ -390,10 +390,7 @@ int ZEXPORT gzgetc_(file)
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* try output buffer (no need to check for skip request) -- while
this check really isn't required since the gzgetc() macro has
already determined that x.have is zero, we leave it in for
completeness. */
/* try output buffer (no need to check for skip request) */
if (state->x.have) {
state->x.have--;
state->x.pos++;
@@ -405,6 +402,13 @@ int ZEXPORT gzgetc_(file)
return ret < 1 ? -1 : buf[0];
}
#undef gzgetc
int ZEXPORT gzgetc(file)
gzFile file;
{
return gzgetc_(file);
}
/* -- see zlib.h -- */
int ZEXPORT gzungetc(c, file)
int c;