ID:               45268
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         DBM/DBA related
 Operating System: Linux
 PHP Version:      5.3CVS-2008-06-14 (CVS)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-06-19 03:57:12] [EMAIL PROTECTED]

The extra parameter was added in BDB 4.3, so the prototype code should
be similar to:

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)


------------------------------------------------------------------------

[2008-06-14 01:19:49] [EMAIL PROTECTED]

BDB was built with ../dist/configure --prefix=$HOME/bdb-4.7.25
PHP was built with ... --enable-dba --with-db4=$HOME/bdb-4.7.25


------------------------------------------------------------------------

[2008-06-14 01:05:17] [EMAIL PROTECTED]

Description:
------------
For BDB 4.7.25 (and probably earlier), the prototype
php_dba_db4_errcall_fcn() needs three arguments.

Documentation for the callback is at:
http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_errcall.html

The expected prototype is:
void DB_ENV->set_errcall(DB_ENV *dbenv, void (*db_errcall_fcn)
  (const DB_ENV *dbenv, const char *errpfx, const char *msg));

In ext/dba/dba_db4.c:
static void php_dba_db4_errcall_fcn(const char *errpfx, char *msg)
should be:
static void php_dba_db4_errcall_fcn(const DB_ENV *dbenv, const char
*errpfx, const char *msg)





Actual result:
--------------
Currently a compile warning is given:

/home/cjones/phpsrc/php53/ext/dba/dba_db4.c:99: warning: passing
argument 2 of 'dbp->set_errcall' from incompatible pointer type


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45268&edit=1

Reply via email to