diff options
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 85a94898c..9925bbed4 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -25,6 +25,8 @@ #include <string> #include <vector> +#include <zlib.h> + using std::string; class FileFd @@ -36,6 +38,7 @@ class FileFd HitEof = (1<<3)}; unsigned long Flags; string FileName; + gzFile gz; public: enum OpenMode {ReadOnly,WriteEmpty,WriteExists,WriteAny,WriteTemp}; @@ -69,12 +72,12 @@ class FileFd inline string &Name() {return FileName;}; FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1), - Flags(0) + Flags(0), gz(NULL) { Open(FileName,Mode,Perms); }; - FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose) {}; - FileFd(int Fd,bool) : iFd(Fd), Flags(0) {}; + FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose), gz(NULL) {}; + FileFd(int Fd,bool) : iFd(Fd), Flags(0), gz(NULL) {}; virtual ~FileFd(); }; |