mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
fix build with old system libsqlite (sqlite3_close_v2 may be missing)
This commit is contained in:
parent
5e5895a464
commit
afdf7519d1
2 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,9 @@ if test "$PHP_PDO_SQLITE" != "no"; then
|
|||
PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[
|
||||
AC_DEFINE(HAVE_SQLITE3_KEY,1, [have commercial sqlite3 with crypto support])
|
||||
])
|
||||
PHP_CHECK_LIBRARY(sqlite3,sqlite3_close_v2,[
|
||||
AC_DEFINE(HAVE_SQLITE3_CLOSE_V2, 1, [have sqlite3_close_v2])
|
||||
])
|
||||
|
||||
PHP_SUBST(PDO_SQLITE_SHARED_LIBADD)
|
||||
PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core, $ext_shared,,-I$pdo_cv_inc_path)
|
||||
|
@ -79,6 +82,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then
|
|||
threadsafe_flags="-DSQLITE_THREADSAFE=0"
|
||||
fi
|
||||
|
||||
AC_DEFINE(HAVE_SQLITE3_CLOSE_V2, 1, [have sqlite3_close_v2])
|
||||
other_flags="-DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1"
|
||||
|
||||
dnl As long as intl is not shared we can have ICU support
|
||||
|
|
|
@ -161,7 +161,11 @@ static int sqlite_handle_closer(pdo_dbh_t *dbh) /* {{{ */
|
|||
|
||||
pdo_sqlite_cleanup_callbacks(H);
|
||||
if (H->db) {
|
||||
#ifdef HAVE_SQLITE3_CLOSE_V2
|
||||
sqlite3_close_v2(H->db);
|
||||
#else
|
||||
sqlite3_close(H->db);
|
||||
#endif
|
||||
H->db = NULL;
|
||||
}
|
||||
if (einfo->errmsg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue