LDAP_BEGIN_DECL
+#define DB_VERSION_FULL ((DB_VERSION_MAJOR << 24) | (DB_VERSION_MINOR << 16) | DB_VERSION_PATCH)
+
#define BDB_SUBENTRIES 1
#define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define XLOCK_ID_FREE(env, locker) (env)->lock_id_free(env, locker)
/* BDB 4.1.17 adds txn arg to db->open */
-#if DB_VERSION_MINOR > 1 || DB_VERSION_PATCH >= 17
+#if DB_VERSION_FULL >= 0x04010011
#undef DB_OPEN
#define DB_OPEN(db, file, name, type, flags, mode) \
(db)->open(db, NULL, file, name, type, (flags)|DB_AUTO_COMMIT, mode)
*
* configure now requires Berkeley DB 4.1.
*/
-#if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR == 0)
+#if DB_VERSION_FULL < 0x04010000
# define BDB_ENOUGH 5
#else
# define BDB_ENOUGH 1
bi->bi_controls = controls;
{ /* version check */
- int major, minor, patch;
+ int major, minor, patch, ver;
char *version = db_version( &major, &minor, &patch );
#ifdef HAVE_EBCDIC
char v2[1024];
version = v2;
#endif
- if( major != DB_VERSION_MAJOR ||
- minor != DB_VERSION_MINOR ||
- patch < DB_VERSION_PATCH )
+ ver = (major << 24) | (minor << 16) | patch;
+ if( ver < DB_VERSION_FULL )
{
Debug( LDAP_DEBUG_ANY,
"bdb_initialize: BDB library version mismatch:"