Преглед изворни кода

Fixes for mmap and yodl
Author: jgg
Date: 1999-03-18 04:32:45 GMT
Fixes for mmap and yodl

Arch Librarian пре 22 година
родитељ
комит
35c22def87
3 измењених фајлова са 7 додато и 22 уклоњено
  1. 4 5
      apt-pkg/contrib/mmap.cc
  2. 1 15
      configure.in
  3. 2 2
      doc/apt-get.8.yo

+ 4 - 5
apt-pkg/contrib/mmap.cc

@@ -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;

+ 1 - 15
configure.in

@@ -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])
-#[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)

+ 2 - 2
doc/apt-get.8.yo

@@ -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