Selaa lähdekoodia

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

Arch Librarian 22 vuotta sitten
vanhempi
commit
35c22def87
3 muutettua tiedostoa jossa 7 lisäystä ja 22 poistoa
  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 -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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().
    MMap Class - Provides 'real' mmap or a faked mmap using read().
@@ -31,7 +31,6 @@
 
 
 #include <sys/mman.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
-#include <sys/user.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <fcntl.h>
    									/*}}}*/
    									/*}}}*/
@@ -119,10 +118,10 @@ bool MMap::Sync()
 /* */
 /* */
 bool MMap::Sync(unsigned long Start,unsigned long Stop)
 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 ((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");
 	 return _error->Error("msync","Unable to write mmap");
 #endif   
 #endif   
    return true;
    return true;

+ 1 - 15
configure.in

@@ -106,20 +106,6 @@ AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
 
 
 dnl Check for YODL
 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)
 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.
 brokenpackages.
 
 
 dit(bf(clean))
 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/)
 removes everything but the lock file from bf(/var/cache/apt/archives/)
 and bf(/var/cache/apt/archives/partial/).
 and bf(/var/cache/apt/archives/partial/).
 When APT is used as a bf(dselect(8)) method, bf(clean) is run automatically.
 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.
 from time to time to free up disk space.
 
 
 dit(bf(autoclean))
 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
 package files. The difference is that it only removes package files that
 can no longer be downloaded, and are largely useless. This allows a
 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
 cache to be maintained over a long period without it growing out of