aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/lib/berkeley-db-1.xx/PORT/ptx.2.0/OTHER_PATCHES
blob: 891cccb833588b19429976543fe57b0f2df0b971 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
*** PORT/db/btree/bt_open.c.orig	1993/11/24 11:16:51
--- PORT/db/btree/bt_open.c	1993/11/24 12:38:12
***************
*** 256,262 ****
--- 256,266 ----
  		 * Don't overflow the page offset type.
  		 */
  		if (b.psize == 0) {
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ 			b.psize = 4096;
+ #else
  			b.psize = sb.st_blksize;
+ #endif
  			if (b.psize < MINPSIZE)
  				b.psize = MINPSIZE;
  			if (b.psize > MAX_PAGE_OFFSET + 1)
*** PORT/db/recno/rec_open.c.orig	1993/11/29 18:26:26
--- PORT/db/recno/rec_open.c	1993/11/30 11:35:21
***************
*** 159,164 ****
--- 159,167 ----
  				SET(t, R_EOF);
  			else {
  				t->bt_msize = sb.st_size;
+ #ifdef MMAP_NOT_AVAILABLE
+ 				goto slow;
+ #else
  				if ((t->bt_smap = mmap(NULL, t->bt_msize,
  				    PROT_READ, MAP_PRIVATE, rfd,
  				    (off_t)0)) == (caddr_t)-1)
***************
*** 168,173 ****
--- 171,177 ----
  				t->bt_irec = ISSET(t, R_FIXLEN) ?
  				    __rec_fmap : __rec_vmap;
  				SET(t, R_MEMMAPPED);
+ #endif
  			}
  		}
  	}
*** PORT/db/hash/hash_log2.c.orig	1993/11/24 11:10:40
--- PORT/db/hash/hash_log2.c	1993/11/24 12:38:52
***************
*** 40,50 ****
  
  #include <sys/types.h>
  
! u_int
  __log2(num)
! 	u_int num;
  {
! 	register u_int i, limit;
  
  	limit = 1;
  	for (i = 0; limit < num; limit = limit << 1, i++);
--- 40,50 ----
  
  #include <sys/types.h>
  
! unsigned int
  __log2(num)
! 	unsigned int num;
  {
! 	register unsigned int i, limit;
  
  	limit = 1;
  	for (i = 0; limit < num; limit = limit << 1, i++);
*** PORT/db/hash/hash.c.orig	1993/11/24 11:18:44
--- PORT/db/hash/hash.c	1993/11/24 12:38:29
***************
*** 301,307 ****
--- 301,311 ----
  	if (file != NULL) {
  		if (stat(file, &statbuf))
  			return (NULL);
+ #ifdef STBLKSIZE_NOT_AVAILABLE
+ 		hashp->BSIZE = 4096;
+ #else
  		hashp->BSIZE = statbuf.st_blksize;
+ #endif
  		hashp->BSHIFT = __log2(hashp->BSIZE);
  	}
  
*** PORT/db/hash/hash.h.orig	1993/11/24 11:20:03
--- PORT/db/hash/hash.h	1993/11/24 12:38:38
***************
*** 261,266 ****
--- 261,267 ----
  #define	REAL_KEY	4
  
  /* Short hands for accessing structure */
+ #undef BSIZE
  #define BSIZE		hdr.bsize
  #define BSHIFT		hdr.bshift
  #define DSIZE		hdr.dsize