Index: setup.py =================================================================== --- setup.py (revision 74955) +++ setup.py (working copy) @@ -695,7 +695,7 @@ # a release. Most open source OSes come with one or more # versions of BerkeleyDB already installed. - max_db_ver = (4, 7) + max_db_ver = (4, 8) min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? Index: Modules/_bsddb.c =================================================================== --- Modules/_bsddb.c (revision 74955) +++ Modules/_bsddb.c (working copy) @@ -215,7 +215,11 @@ #define DB_BUFFER_SMALL ENOMEM #endif +#if (DBVER < 48) +#define DB_GID_SIZE DB_XIDDATASIZE +#endif + /* --------------------------------------------------------------------- */ /* Structure definitions */ @@ -4501,7 +4505,11 @@ DBTxnObject *txn; #define PREPLIST_LEN 16 DB_PREPLIST preplist[PREPLIST_LEN]; +#if (DBVER < 48) long retp; +#else + u_int32_t retp; +#endif CHECK_ENV_NOT_CLOSED(self); @@ -4522,7 +4530,7 @@ flags=DB_NEXT; /* Prepare for next loop pass */ for (i=0; i= 42) {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS}, @@ -7089,6 +7101,7 @@ ADD_INT(d, DB_MAX_PAGES); ADD_INT(d, DB_MAX_RECORDS); +#if (DBVER < 48) #if (DBVER >= 42) ADD_INT(d, DB_RPCCLIENT); #else @@ -7096,7 +7109,11 @@ /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */ _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); #endif +#endif + +#if (DBVER < 48) ADD_INT(d, DB_XA_CREATE); +#endif ADD_INT(d, DB_CREATE); ADD_INT(d, DB_NOMMAP); @@ -7113,7 +7130,13 @@ ADD_INT(d, DB_INIT_TXN); ADD_INT(d, DB_JOINENV); +#if (DBVER >= 48) + ADD_INT(d, DB_GID_SIZE); +#else ADD_INT(d, DB_XIDDATASIZE); + /* Allow new code to work in old BDB releases */ + _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE); +#endif ADD_INT(d, DB_RECOVER); ADD_INT(d, DB_RECOVER_FATAL);