X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6c139d6e362f04a1582e8a8f511f8aeab031fecf..f46e768107c0250eb0609a89a74b66ab3c9d8cec:/apt-pkg/contrib/mmap.h diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 55feda741..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.3 1998/07/07 04:17:15 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(). @@ -27,23 +27,23 @@ #define PKGLIB_MMAP_H #ifdef __GNUG__ -#pragma interface "pkglib/mmap.h" +#pragma interface "apt-pkg/mmap.h" #endif #include -#include +#include 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(); };