diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-20 10:37:48 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-20 10:37:48 +0200 |
commit | 7cd1cf99412e76e10d072eae82bd608cc1e76c24 (patch) | |
tree | fe84ea7f63e8257531866b58670916df83b89942 | |
parent | 8fa3c5becf6f417c1a01fe878f5548d7d3bf2292 (diff) | |
download | librpm-tizen-7cd1cf99412e76e10d072eae82bd608cc1e76c24.tar.gz librpm-tizen-7cd1cf99412e76e10d072eae82bd608cc1e76c24.tar.bz2 librpm-tizen-7cd1cf99412e76e10d072eae82bd608cc1e76c24.zip |
Conditionalize zlib conditional pieces of code on HAVE_ZLIB_H.
-rw-r--r-- | rpmio/rpmio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 0d2f0f742..f7ab21d6f 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -120,8 +120,10 @@ static const char * fdbg(FD_t fd) sprintf(be, "FD %d fp %p", fps->fdno, fps->fp); } else if (fps->io == ufdio) { sprintf(be, "UFD %d fp %p", fps->fdno, fps->fp); +#if HAVE_ZLIB_H } else if (fps->io == gzdio) { sprintf(be, "GZD %p fdno %d", fps->fp, fps->fdno); +#endif #if HAVE_BZLIB_H } else if (fps->io == bzdio) { sprintf(be, "BZD %p fdno %d", fps->fp, fps->fdno); @@ -1544,9 +1546,11 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd)); if (end && *end) { if (!strcmp(end, "fdio")) { iof = fdio; +#if HAVE_ZLIB_H } else if (!strcmp(end, "gzdio")) { iof = gzdio; fd = gzdFdopen(fd, zstdio); +#endif #if HAVE_BZLIB_H } else if (!strcmp(end, "bzdio")) { iof = bzdio; @@ -1691,9 +1695,11 @@ int Ferror(FD_t fd) if (fps->io == fpio) { ec = ferror(fdGetFILE(fd)); +#if HAVE_ZLIB_H } else if (fps->io == gzdio) { ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; i--; /* XXX fdio under gzdio always has fdno == -1 */ +#endif #if HAVE_BZLIB_H } else if (fps->io == bzdio) { ec = (fd->syserrno || fd->errcookie != NULL) ? -1 : 0; |