summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-08-21 15:46:30 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-08-21 15:46:30 +0200
commit3c5412fc8f42c9376875b9ed5524cc0be19ef656 (patch)
treef38cee2aa7b62bd4245eb78d68b96500626fe9ee
parent13419befff7171f92d4dfb168110997ab1aad972 (diff)
parent1b21b560741373638b8d1ffe2a4a672717cb6656 (diff)
downloadphp-git-3c5412fc8f42c9376875b9ed5524cc0be19ef656.tar.gz
Merge branch 'PHP-7.4' into master
* PHP-7.4: sqlite3 linkage issue on some systems/package combination fix.
-rw-r--r--ext/sqlite3/config.w321
-rw-r--r--ext/sqlite3/config0.m44
-rw-r--r--ext/sqlite3/sqlite3.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/ext/sqlite3/config.w32 b/ext/sqlite3/config.w32
index 41eccb5af9..ab54989e1c 100644
--- a/ext/sqlite3/config.w32
+++ b/ext/sqlite3/config.w32
@@ -8,6 +8,7 @@ if (PHP_SQLITE3 != "no") {
AC_DEFINE("HAVE_SQLITE3", 1, "SQLite support");
AC_DEFINE("HAVE_SQLITE3_ERRSTR", 1, "have sqlite3_errstr function");
+ AC_DEFINE("HAVE_SQLITE3_EXPANDED_SQL", 1, "have sqlite3_expanded_sql function");
} else {
WARNING("sqlite3 not enabled; libraries and/or headers not found");
}
diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4
index 0d607593b7..e83ec5f224 100644
--- a/ext/sqlite3/config0.m4
+++ b/ext/sqlite3/config0.m4
@@ -15,6 +15,10 @@ if test $PHP_SQLITE3 != "no"; then
AC_DEFINE(HAVE_SQLITE3_ERRSTR, 1, [have sqlite3_errstr function])
], [], [$SQLITE3_SHARED_LIBADD])
+ PHP_CHECK_LIBRARY(sqlite3, sqlite3_expanded_sql, [
+ AC_DEFINE(HAVE_SQLITE3_EXPANDED_SQL, 1, [have sqlite3_expanded_sql function])
+ ], [], [$SQLITE3_SHARED_LIBADD])
+
PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,
[],
[AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension support])],
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index ad85d0f11f..b06f723b4c 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -1641,7 +1641,7 @@ PHP_METHOD(SQLite3Stmt, getSQL)
}
if (expanded) {
-#if SQLITE_VERSION_NUMBER >= 3014000
+#ifdef HAVE_SQLITE3_EXPANDED_SQL
char *sql = sqlite3_expanded_sql(stmt_obj->stmt);
RETVAL_STRING(sql);
sqlite3_free(sql);