From d962e8d2d650c7b297dcd041b55060bc29996a93 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 15 Aug 2002 22:09:26 +0000 Subject: bleeeeh --- generic/Handle.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'generic/Handle.cpp') diff --git a/generic/Handle.cpp b/generic/Handle.cpp index 6390a6d..29b4816 100644 --- a/generic/Handle.cpp +++ b/generic/Handle.cpp @@ -149,6 +149,7 @@ void Handle::close() throw (GeneralException) { } if (h >= 0) { +#ifdef HAVE_ZLIB if (z) { // cerr << "Performing gzclose on handle " << h << endl; int err = gzclose(zfile); @@ -161,6 +162,9 @@ void Handle::close() throw (GeneralException) { } } } else { +#else + { +#endif int err = ::close(h); if (err) { throw GeneralException(String(_("Error during close: ")) + strerror(errno)); @@ -204,6 +208,7 @@ void Handle::Dup(const Handle & H) { } } +#ifdef HAVE_ZLIB void Handle::SetZ(int az) throw (GeneralException) { if (z) { throw GeneralException(_("Can't SetZ a Handle twice.")); @@ -229,8 +234,10 @@ void Handle::SetZ(int az) throw (GeneralException) { z = az; } } +#endif ssize_t Handle::uwrite(const void * buf, size_t count) throw (GeneralException) { +#ifdef HAVE_ZLIB if (z) { itell += count; // cerr << "Performing gzwrite of " << count << " byte for handle " << h << endl; @@ -246,12 +253,16 @@ ssize_t Handle::uwrite(const void * buf, size_t count) throw (GeneralException) } return err; } else { +#else + { +#endif itell += count = ::write(h, buf, count); return count; } } ssize_t Handle::uread(void * buf, size_t count) { +#ifdef HAVE_ZLIB if (z) { itell += count; // cerr << "Performing gzread of " << count << " byte for handle " << h << endl; @@ -267,6 +278,9 @@ ssize_t Handle::uread(void * buf, size_t count) { } return err; } else { +#else + { +#endif itell += count = ::read(h, buf, count); return count; } -- cgit v1.2.3