diff options
author | Christopher Jones <sixd@php.net> | 2008-06-19 22:39:56 +0000 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2008-06-19 22:39:56 +0000 |
commit | 2bb7df3504fd7fbbd1fa04dee0a8095fe557cc77 (patch) | |
tree | 4fa5b936e867b9c8f9692384a8f6400494ae453e /ext/dba/dba_db4.c | |
parent | 6d63a0d9d121dc86d4e33d063efb974ce515fb09 (diff) | |
download | php-git-2bb7df3504fd7fbbd1fa04dee0a8095fe557cc77.tar.gz |
MFH:
Fix bug #45266 (Fix build with BDB 4)
Fix bug #45267 (Revert invalid assumption about BDB 4 locking; let DBA handle locking)
Fix bug #45268 (Fix error callback prototype)
Diffstat (limited to 'ext/dba/dba_db4.c')
-rw-r--r-- | ext/dba/dba_db4.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 69f3967bb5..e0e6ec0424 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -36,7 +36,11 @@ #include <db.h> #endif -static void php_dba_db4_errcall_fcn(const char *errpfx, char *msg) +static void php_dba_db4_errcall_fcn( +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3) + const DB_ENV *dbenv, +#endif + const char *errpfx, const char *msg) { TSRMLS_FETCH(); @@ -81,7 +85,6 @@ DBA_OPEN_FUNC(db4) return FAILURE; /* not possible */ } - gmode |= DB_INIT_LOCK; if (info->flags & DBA_PERSISTENT) { gmode |= DB_THREAD; } @@ -91,10 +94,6 @@ DBA_OPEN_FUNC(db4) filemode = Z_LVAL_PP(info->argv[0]); } -#ifdef DB_FCNTL_LOCKING - gmode |= DB_FCNTL_LOCKING; -#endif - if ((err=db_create(&dbp, NULL, 0)) == 0) { dbp->set_errcall(dbp, php_dba_db4_errcall_fcn); if ( |