static void
g_zlib_compressor_set_gzheader (GZlibCompressor *compressor)
{
+ /* On win32, these functions were not exported before 1.2.4 */
+#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240
const gchar *filename;
if (compressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP ||
if (deflateSetHeader (&compressor->zstream, &compressor->gzheader) != Z_OK)
g_warning ("unexpected zlib error: %s\n", compressor->zstream.msg);
+#endif /* !G_OS_WIN32 || ZLIB >= 1.2.4 */
}
G_DEFINE_TYPE_WITH_CODE (GZlibCompressor, g_zlib_compressor, G_TYPE_OBJECT,
static void
g_zlib_decompressor_set_gzheader (GZlibDecompressor *decompressor)
{
+ /* On win32, these functions were not exported before 1.2.4 */
+#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240
if (decompressor->format != G_ZLIB_COMPRESSOR_FORMAT_GZIP)
return;
if (inflateGetHeader (&decompressor->zstream, &decompressor->header_data->gzheader) != Z_OK)
g_warning ("unexpected zlib error: %s\n", decompressor->zstream.msg);
+#endif /* !G_OS_WIN32 || ZLIB >= 1.2.4 */
}
G_DEFINE_TYPE_WITH_CODE (GZlibDecompressor, g_zlib_decompressor, G_TYPE_OBJECT,
*bytes_read = inbuf_size - decompressor->zstream.avail_in;
*bytes_written = outbuf_size - decompressor->zstream.avail_out;
+#if !defined (G_OS_WIN32) || ZLIB_VERNUM >= 0x1240
if (decompressor->header_data != NULL &&
decompressor->header_data->gzheader.done == 1)
{
g_object_notify (G_OBJECT (decompressor), "file-info");
}
+#endif /* !G_OS_WIN32 || ZLIB >= 1.2.4 */
if (res == Z_STREAM_END)
return G_CONVERTER_FINISHED;