source: scripts/untested/blfs-patches/Python-2.4-db43-2.patch@ b15e4602

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b15e4602 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: 3.3 KB
RevLine 
[617118d]1diff -uNr Python-2.4-orig/Modules/_bsddb.c Python-2.4/Modules/_bsddb.c
2--- Python-2.4-orig/Modules/_bsddb.c 2004-09-04 11:36:59.000000000 +1000
3+++ Python-2.4/Modules/_bsddb.c 2005-02-05 22:03:38.805737040 +1100
4@@ -466,7 +466,15 @@
5 /* Callback used to save away more information about errors from the DB
6 * library. */
7 static char _db_errmsg[1024];
8-static void _db_errorCallback(const char* prefix, char* msg)
9+static void _db_errorCallback(
10+#if (DBVER >= 43)
11+ const DB_ENV *dbenv,
12+#endif
13+ const char* prefix,
14+#if (DBVER >= 43)
15+ const
16+#endif
17+ char* msg)
18 {
19 strcpy(_db_errmsg, msg);
20 }
21@@ -2146,7 +2154,11 @@
22
23 MYDB_BEGIN_ALLOW_THREADS;
24 #if (DBVER >= 33)
25- err = self->db->stat(self->db, &sp, flags);
26+ err = self->db->stat(self->db,
27+#if (DBVER >= 43)
28+ NULL /*txnid*/,
29+#endif
30+ &sp, flags);
31 #else
32 err = self->db->stat(self->db, &sp, NULL, flags);
33 #endif
34@@ -2408,7 +2420,11 @@
35
36 MYDB_BEGIN_ALLOW_THREADS;
37 #if (DBVER >= 33)
38- err = self->db->stat(self->db, &sp, flags);
39+ err = self->db->stat(self->db,
40+#if (DBVER >= 43)
41+ NULL /*txnid*/,
42+#endif
43+ &sp, flags);
44 #else
45 err = self->db->stat(self->db, &sp, NULL, flags);
46 #endif
47@@ -2536,7 +2552,11 @@
48 err = self->db->get(self->db, txn, &key, &data, 0);
49 MYDB_END_ALLOW_THREADS;
50 FREE_DBT(key);
51+#if (DBVER >= 43)
52+ return PyInt_FromLong((err == DB_BUFFER_SMALL) || (err == 0));
53+#else
54 return PyInt_FromLong((err == ENOMEM) || (err == 0));
55+#endif
56 }
57
58
59@@ -4903,7 +4923,12 @@
60
61 #if (DBVER >= 33)
62 ADD_INT(d, DB_LSTAT_ABORTED);
63+#if (DBVER < 43)
64 ADD_INT(d, DB_LSTAT_ERR);
65+#endif
66+#if (DBVER >= 42)
67+ ADD_INT(d, DB_LSTAT_EXPIRED);
68+#endif
69 ADD_INT(d, DB_LSTAT_FREE);
70 ADD_INT(d, DB_LSTAT_HELD);
71 #if (DBVER == 33)
72diff -uNr Python-2.4-orig/setup.py Python-2.4/setup.py
73--- Python-2.4-orig/setup.py 2004-11-13 22:13:34.000000000 +1100
74+++ Python-2.4/setup.py 2005-02-05 22:14:00.675198512 +1100
75@@ -492,15 +492,18 @@
76 # when sorted in reverse order, keys for this dict must appear in the
77 # order you wish to search - e.g., search for db4 before db3
78 db_try_this = {
79- 'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',),
80- 'libdirs': ('/usr/local/BerkeleyDB.4.2/lib',
81+ 'db4': {'libs': ('db-4.3', 'db43', 'db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',),
82+ 'libdirs': ('/usr/local/BerkeleyDB.4.3/lib',
83+ '/usr/local/BerkeleyDB.4.2/lib',
84 '/usr/local/BerkeleyDB.4.1/lib',
85 '/usr/local/BerkeleyDB.4.0/lib',
86 '/usr/local/lib',
87 '/opt/sfw',
88 '/sw/lib',
89 ),
90- 'incdirs': ('/usr/local/BerkeleyDB.4.2/include',
91+ 'incdirs': ('/usr/local/BerkeleyDB.4.3/include',
92+ '/usr/local/include/db43',
93+ '/usr/local/BerkeleyDB.4.2/include',
94 '/usr/local/include/db42',
95 '/usr/local/BerkeleyDB.4.1/include',
96 '/usr/local/include/db41',
Note: See TracBrowser for help on using the repository browser.