]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/mmap.cc
Made configure smarter about detecting the previous hp-...
[apt.git] / apt-pkg / contrib / mmap.cc
index b5c1320e62207553f070f593c8bea07eda7ebad1..230e133a55cbbb7c75d436e20ae45106147f302c 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: mmap.cc,v 1.18 1999/08/28 01:49:07 jgg Exp $
+// $Id: mmap.cc,v 1.20 1999/10/02 04:14:54 jgg Exp $
 /* ######################################################################
    
    MMap Class - Provides 'real' mmap or a faked mmap using read().
@@ -35,8 +35,6 @@
 #include <fcntl.h>
                                                                        /*}}}*/
 
-#undef _POSIX_SYNCHRONIZED_IO   
-
 // MMap::MMap - Constructor                                            /*{{{*/
 // ---------------------------------------------------------------------
 /* */
@@ -119,7 +117,7 @@ bool MMap::Sync()
 #ifdef _POSIX_SYNCHRONIZED_IO   
    if ((Flags & ReadOnly) != ReadOnly)
       if (msync((char *)Base,iSize,MS_SYNC) != 0)
-        return _error->Error("msync","Unable to write mmap");
+        return _error->Errno("msync","Unable to write mmap");
 #endif   
    return true;
 }
@@ -136,7 +134,7 @@ bool MMap::Sync(unsigned long Start,unsigned long Stop)
    unsigned long PSize = sysconf(_SC_PAGESIZE);
    if ((Flags & ReadOnly) != ReadOnly)
       if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
-        return _error->Error("msync","Unable to write mmap");
+        return _error->Errno("msync","Unable to write mmap");
 #endif   
    return true;
 }