[Zlib-devel] Patch for example.c
Cosmin Truta
cosmin at cs.toronto.edu
Wed Sep 10 23:45:29 EDT 2003
Hi,
I realized that, if NO_GZCOMPRESS is defined, none of the demo programs
work. At least it's possible to have a working example.c by ifdef'ing
out the body of test_gzio() when NO_GZCOMPRESS is defined.
Best regards,
Cosmin
--- zlib-1.2.0.5/example.c Wed Aug 20 16:57:18 2003
+++ zlib-cos/example.c Tue Sep 09 22:34:00 2003
@@ -89,6 +89,7 @@
Byte *uncompr;
uLong uncomprLen;
{
+#ifndef NO_GZCOMPRESS
int err;
int len = (int)strlen(hello)+1;
gzFile file;
@@ -159,6 +160,9 @@
}
gzclose(file);
+#else
+ fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
+#endif
}
More information about the Zlib-devel
mailing list