summaryrefslogtreecommitdiff
path: root/xmlIO.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2010-03-18 07:40:32 +0100
committerMike Hommey <glandium@debian.org>2010-03-18 07:40:32 +0100
commiteb5d521a2df72fa829a7f8196b957c696e7ccc58 (patch)
tree224599e18a48f87e82aa8a32456563277c68ae58 /xmlIO.c
parent8a10e02b2f4971d3fdacab7dc7baecced34056fb (diff)
downloadlibxml2-eb5d521a2df72fa829a7f8196b957c696e7ccc58.tar.gz
Import upstream version 2.7.7upstream/2.7.7.dfsg
Diffstat (limited to 'xmlIO.c')
-rw-r--r--xmlIO.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmlIO.c b/xmlIO.c
index c03ac43..8fc00e3 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -2518,6 +2518,9 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
#ifdef HAVE_ZLIB_H
if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
(strcmp(URI, "-") != 0)) {
+#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
+ ret->compressed = !gzdirect(context);
+#else
if (((z_stream *)context)->avail_in > 4) {
char *cptr, buff4[4];
cptr = (char *) ((z_stream *)context)->next_in;
@@ -2529,6 +2532,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
gzrewind(context);
}
}
+#endif
}
#endif
}