source: scripts/untested/blfs-patches/Python-2.4-db43-1.patch@ def3913

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since def3913 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[617118d]1Submitted By: Igor Zivkovic <igor@linuxfromscratch.org>
2Date: 2004-12-09
3Initial Package Version: 2.3.4
4Upstream Status: Submitted at Python patch tracker.
5Origin: Michal Cihar and Suzuki Hisao
6Description: Adds support for Berkeley DB-4.3.x.
7
8$LastChangedBy: igor $
9$Date: 2005-01-10 15:43:51 -0700 (Mon, 10 Jan 2005) $
10
11--- Python-2.3.4/Modules/_bsddb.c.orig 2004-12-09 15:26:24.807332600 +0000
12+++ Python-2.3.4/Modules/_bsddb.c 2004-12-09 15:26:39.966028128 +0000
13@@ -422,7 +422,15 @@
14 /* Callback used to save away more information about errors from the DB
15 * library. */
16 static char _db_errmsg[1024];
17-static void _db_errorCallback(const char* prefix, char* msg)
18+static void _db_errorCallback(
19+#if (DBVER >= 43)
20+ const DB_ENV *dbenv,
21+#endif
22+ const char* prefix,
23+#if (DBVER >= 43)
24+ const
25+#endif
26+ char* msg)
27 {
28 strcpy(_db_errmsg, msg);
29 }
30@@ -1987,7 +1995,11 @@
31
32 MYDB_BEGIN_ALLOW_THREADS;
33 #if (DBVER >= 33)
34- err = self->db->stat(self->db, &sp, flags);
35+ err = self->db->stat(self->db,
36+#if (DBVER >= 43)
37+ NULL /*txnid*/,
38+#endif
39+ &sp, flags);
40 #else
41 err = self->db->stat(self->db, &sp, NULL, flags);
42 #endif
43@@ -2249,7 +2261,11 @@
44
45 MYDB_BEGIN_ALLOW_THREADS;
46 #if (DBVER >= 33)
47- err = self->db->stat(self->db, &sp, flags);
48+ err = self->db->stat(self->db,
49+#if (DBVER >= 43)
50+ NULL /*txnid*/,
51+#endif
52+ &sp, flags);
53 #else
54 err = self->db->stat(self->db, &sp, NULL, flags);
55 #endif
56@@ -2375,7 +2391,11 @@
57 err = self->db->get(self->db, txn, &key, &data, 0);
58 MYDB_END_ALLOW_THREADS;
59 FREE_DBT(key);
60+#if (DBVER >= 43)
61+ return PyInt_FromLong((err == DB_BUFFER_SMALL) || (err == 0));
62+#else
63 return PyInt_FromLong((err == ENOMEM) || (err == 0));
64+#endif
65 }
66
67
68@@ -4527,7 +4547,12 @@
69
70 #if (DBVER >= 33)
71 ADD_INT(d, DB_LSTAT_ABORTED);
72+#if (DBVER < 43)
73 ADD_INT(d, DB_LSTAT_ERR);
74+#endif
75+#if (DBVER >= 42)
76+ ADD_INT(d, DB_LSTAT_EXPIRED);
77+#endif
78 ADD_INT(d, DB_LSTAT_FREE);
79 ADD_INT(d, DB_LSTAT_HELD);
80 #if (DBVER == 33)
81--- Python-2.3.4/setup.py.orig 2004-12-09 15:26:30.007542048 +0000
82+++ Python-2.3.4/setup.py 2004-12-09 15:26:39.971027368 +0000
83@@ -480,7 +480,7 @@
84 # when sorted in reverse order, keys for this dict must appear in the
85 # order you wish to search - e.g., search for db4 before db3
86 db_try_this = {
87- 'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',),
88+ 'db4': {'libs': ('db-4.3', 'db43', 'db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',),
89 'libdirs': ('/usr/local/BerkeleyDB.4.2/lib',
90 '/usr/local/BerkeleyDB.4.1/lib',
91 '/usr/local/BerkeleyDB.4.0/lib',
Note: See TracBrowser for help on using the repository browser.