X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/094a497dd2dba1f47157e07d57f97c338a5ddaa0..50b513a12b4f9f5098d1bcd08f6b19b7693397d0:/apt-pkg/contrib/mmap.h diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 0e80c15d2..682024789 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: mmap.h,v 1.4 1998/07/12 23:58:51 jgg Exp $ +// $Id: mmap.h,v 1.7 1998/11/12 03:14:40 jgg Exp $ /* ###################################################################### MMap Class - Provides 'real' mmap or a faked mmap using read(). @@ -37,13 +37,13 @@ class MMap { protected: - File &Fd; + FileFd &Fd; unsigned long Flags; unsigned long iSize; void *Base; bool Map(); - bool Close(bool DoClose = true); + bool Close(bool DoClose = true,bool DoSync = true); public: @@ -58,7 +58,7 @@ class MMap bool Sync(); bool Sync(unsigned long Start,unsigned long Stop); - MMap(File &F,unsigned long Flags); + MMap(FileFd &F,unsigned long Flags); virtual ~MMap(); }; @@ -89,7 +89,7 @@ class DynamicMMap : public MMap inline unsigned long WriteString(string S) {return WriteString(S.begin(),S.size());}; void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;}; - DynamicMMap(File &F,unsigned long Flags,unsigned long WorkSpace = 1024*1024); + DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024); virtual ~DynamicMMap(); };