Fixes for mmap and yodl
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:13 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:13 +0000 (16:53 +0000)
Author: jgg
Date: 1999-03-18 04:32:45 GMT
Fixes for mmap and yodl

apt-pkg/contrib/mmap.cc
configure.in
doc/apt-get.8.yo

index cc58862..7a5065f 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: mmap.cc,v 1.13 1999/03/18 04:10:21 doogie Exp $
+// $Id: mmap.cc,v 1.14 1999/03/18 04:32:46 jgg Exp $
 /* ######################################################################
    
    MMap Class - Provides 'real' mmap or a faked mmap using read().
@@ -31,7 +31,6 @@
 
 #include <sys/mman.h>
 #include <sys/stat.h>
-#include <sys/user.h>
 #include <unistd.h>
 #include <fcntl.h>
                                                                        /*}}}*/
@@ -119,10 +118,10 @@ bool MMap::Sync()
 /* */
 bool MMap::Sync(unsigned long Start,unsigned long Stop)
 {
-
-#ifdef _POSIX_SYNCHRONIZED_IO   
+#ifdef _POSIX_SYNCHRONIZED_IO
+   unsigned long PSize = sysconf(_SC_PAGESIZE);
    if ((Flags & ReadOnly) != ReadOnly)
-      if (msync((char *)Base+(int)(Start/PAGE_SIZE)*PAGE_SIZE,Stop - Start,MS_SYNC) != 0)
+      if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
         return _error->Error("msync","Unable to write mmap");
 #endif   
    return true;
index eba1a15..02bd7c0 100644 (file)
@@ -106,20 +106,6 @@ AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
 
 dnl Check for YODL
-AC_ARG_WITH(YODL,
-        [  --with-YODL   Use YODL macro processor],
-        [private_YODL=yes],
-        [private_YODL=no])
-if test $private_YODL = yes ;then
-       if test $withval = yes;then
-               AC_MSG_RESULT([checking for yodl2man.. (cmdline) yes])
-               AC_DEFINE_UNQUOTED(YODL_MAN,"yes")
-       else
-               AC_MSG_RESULT([checking for yodl2man.. (cmdline) no])
-#\e[29~         AC_DEFINE_UNQUOTED(YODL_MAN,"")
-       fi
-else
-       AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")
-fi
+AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")
 
 AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs)
index f57b62e..02f3dd8 100644 (file)
@@ -84,7 +84,7 @@ bf(check) is a diagnostic tool; it updates the package cache and checks for
 brokenpackages.
 
 dit(bf(clean))
-df(clean) clears out the local repository of retrieved package files. It 
+bf(clean) clears out the local repository of retrieved package files. It 
 removes everything but the lock file from bf(/var/cache/apt/archives/)
 and bf(/var/cache/apt/archives/partial/).
 When APT is used as a bf(dselect(8)) method, bf(clean) is run automatically.
@@ -92,7 +92,7 @@ Those who do not use dselect will likely want to run code(apt-get clean)
 from time to time to free up disk space.
 
 dit(bf(autoclean))
-Like bf(clean), df(autoclean) clears out the local repository of retrieved 
+Like bf(clean), bf(autoclean) clears out the local repository of retrieved 
 package files. The difference is that it only removes package files that
 can no longer be downloaded, and are largely useless. This allows a
 cache to be maintained over a long period without it growing out of