[617118d] | 1 | Submitted By: Igor Zivkovic <igor@linuxfromscratch.org>
|
---|
| 2 | Date: 2004-12-09
|
---|
| 3 | Initial Package Version: 2.3.4
|
---|
| 4 | Upstream Status: Submitted at Python patch tracker.
|
---|
| 5 | Origin: Michal Cihar and Suzuki Hisao
|
---|
| 6 | Description: 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',
|
---|