unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob f37eeb2e64fe29208ac317d78c8453a3b0fdf1ea 749 bytes (raw)
name: gnu/packages/patches/nvi-dbpagesize-binpower.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
This patch originates from the Debian project, see https://www.debian.org/

18dbpagesize_binpower.dpatch by  <hesso@pool.math.tu-berlin.de>


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;

debug log:

solving f37eeb2 ...
found f37eeb2 in https://yhetil.org/guix-devel/54BFC4FF.5030006@gmail.com/ ||
	https://yhetil.org/guix-devel/54BE9C68.9070103@gmail.com/

applying [1/1] https://yhetil.org/guix-devel/54BFC4FF.5030006@gmail.com/
diff --git a/gnu/packages/patches/nvi-dbpagesize-binpower.patch b/gnu/packages/patches/nvi-dbpagesize-binpower.patch
new file mode 100644
index 0000000..f37eeb2

1:17: space before tab in indent.
 		 * (vi should have good locality) or smaller than 1K.
1:18: space before tab in indent.
 		 */
1:19: space before tab in indent.
 		psize = ((sb.st_size / 15) + 1023) / 1024;
1:29: trailing whitespace.
 
1:30: space before tab in indent.
 		F_SET(ep, F_DEVSET);
Checking patch gnu/packages/patches/nvi-dbpagesize-binpower.patch...
Applied patch gnu/packages/patches/nvi-dbpagesize-binpower.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

skipping https://yhetil.org/guix-devel/54BE9C68.9070103@gmail.com/ for f37eeb2
index at:
100644 f37eeb2e64fe29208ac317d78c8453a3b0fdf1ea	gnu/packages/patches/nvi-dbpagesize-binpower.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).