diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-11-30 19:14:21 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-12-07 18:51:21 +0100 |
commit | 7525cfa63719a65d5c5f924219b13a0111f1343f (patch) | |
tree | 459dbac35248cc6b5b0c93e8764d42b5a5d541b6 /testing/nvi/18dbpagesize_binpower.patch | |
parent | 4b763f9b85d0696d458ffbd14d99544cdd7550cf (diff) | |
download | aports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.bz2 aports-7525cfa63719a65d5c5f924219b13a0111f1343f.tar.xz |
testing/nvi: new aport
Including a subset of the debian patchset.
Diffstat (limited to 'testing/nvi/18dbpagesize_binpower.patch')
-rw-r--r-- | testing/nvi/18dbpagesize_binpower.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/nvi/18dbpagesize_binpower.patch b/testing/nvi/18dbpagesize_binpower.patch new file mode 100644 index 0000000000..ec0450472d --- /dev/null +++ b/testing/nvi/18dbpagesize_binpower.patch @@ -0,0 +1,22 @@ +From: <hesso@pool.math.tu-berlin.de> +Subject: Make sure that the pagesize passed to db__set_pagesize() is +a power of two. + +--- nvi-1.81.6.orig/common/exf.c 2009-03-09 01:48:01.695862889 +0100 ++++ nvi-1.81.6/common/exf.c 2009-03-09 10:42:41.147866272 +0100 +@@ -249,11 +249,10 @@ + * (vi should have good locality) or smaller than 1K. + */ + psize = ((sb.st_size / 15) + 1023) / 1024; +- if (psize > 10) +- psize = 10; +- if (psize == 0) +- psize = 1; +- psize *= 1024; ++ if (psize >= 8) psize=8<<10; ++ else if (psize >= 4) psize=4<<10; ++ else if (psize >= 2) psize=2<<10; ++ else psize=1<<10; + + F_SET(ep, F_DEVSET); + ep->mdev = sb.st_dev; |