Skip to content

Commit bd77462

Browse files
authored
Update sqlite3 and pdo_sqlite preprocessor macros help texts (#15291)
1 parent d7a8a04 commit bd77462

File tree

6 files changed

+21
-14
lines changed

6 files changed

+21
-14
lines changed

ext/pdo_sqlite/config.m4

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,26 @@ if test "$PHP_PDO_SQLITE" != "no"; then
1515
PHP_SETUP_SQLITE([PDO_SQLITE_SHARED_LIBADD])
1616

1717
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_close_v2],
18-
[AC_DEFINE([HAVE_SQLITE3_CLOSE_V2], [1], [have sqlite3_close_v2])],
18+
[AC_DEFINE([HAVE_SQLITE3_CLOSE_V2], [1],
19+
[Define to 1 if SQLite library has the 'sqlite3_close_v2' function.])],
1920
[],
2021
[$PDO_SQLITE_SHARED_LIBADD])
2122

2223
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_column_table_name],
2324
[AC_DEFINE([HAVE_SQLITE3_COLUMN_TABLE_NAME], [1],
24-
[have sqlite3_column_table_name])],
25+
[Define to 1 if SQLite library was compiled with the
26+
SQLITE_ENABLE_COLUMN_METADATA and has the 'sqlite3_column_table_name'
27+
function.])],
2528
[],
2629
[$PDO_SQLITE_SHARED_LIBADD])
2730

2831
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_load_extension],
2932
[],
3033
[AC_DEFINE([PDO_SQLITE_OMIT_LOAD_EXTENSION], [1],
31-
[have sqlite3 with extension support])],
34+
[Define to 1 if SQLite library was compiled with the
35+
SQLITE_OMIT_LOAD_EXTENSION and does not have the extension support with
36+
the 'sqlite3_load_extension' function. For usage in the pdo_sqlite. See
37+
https://www.sqlite.org/compile.html.])],
3238
[$PDO_SQLITE_SHARED_LIBADD])
3339

3440
PHP_SUBST([PDO_SQLITE_SHARED_LIBADD])

ext/pdo_sqlite/config.w32

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (PHP_PDO_SQLITE != "no") {
77
EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c");
88

99
ADD_EXTENSION_DEP('pdo_sqlite', 'pdo');
10-
AC_DEFINE("HAVE_SQLITE3_COLUMN_TABLE_NAME", 1, "have sqlite3_column_table_name");
11-
AC_DEFINE("HAVE_SQLITE3_CLOSE_V2", 1, "have sqlite3_close_v2");
10+
AC_DEFINE("HAVE_SQLITE3_COLUMN_TABLE_NAME", 1, "Define to 1 if SQLite library was compiled with the SQLITE_ENABLE_COLUMN_METADATA and has the 'sqlite3_column_table_name' function.");
11+
AC_DEFINE("HAVE_SQLITE3_CLOSE_V2", 1, "Define to 1 if SQLite library has the 'sqlite3_close_v2' function.");
1212
ADD_MAKEFILE_FRAGMENT();
1313
} else {
1414
WARNING("pdo_sqlite not enabled; libraries and/or headers not found");

ext/pdo_sqlite/pdo_sqlite.stub.php

-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ public function createFunction(
5151
int $flags = 0
5252
): bool {}
5353

54-
// PDO_SQLITE_OMIT_LOAD_EXTENSION might be defined by ext/pdo_sqlite/config.m4
55-
// if Sqlite3 did not have the sqlite3_load_extension function present
56-
// which can depend on how SQLite was compiled: https://www.sqlite.org/compile.html
5754
#ifndef PDO_SQLITE_OMIT_LOAD_EXTENSION
5855
public function loadExtension(string $name): void {}
5956
#endif

ext/pdo_sqlite/pdo_sqlite_arginfo.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/sqlite3/config.w32

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (PHP_SQLITE3 != "no") {
77
EXTENSION("sqlite3", "sqlite3.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
88

99
AC_DEFINE("HAVE_SQLITE3", 1, "Define to 1 if the PHP extension 'sqlite3' is available.");
10-
AC_DEFINE("HAVE_SQLITE3_ERRSTR", 1, "have sqlite3_errstr function");
11-
AC_DEFINE("HAVE_SQLITE3_EXPANDED_SQL", 1, "have sqlite3_expanded_sql function");
10+
AC_DEFINE("HAVE_SQLITE3_ERRSTR", 1, "Define to 1 if SQLite library has the 'sqlite3_errstr' function.");
11+
AC_DEFINE("HAVE_SQLITE3_EXPANDED_SQL", 1, "Define to 1 if SQLite library has the 'sqlite3_expanded_sql' function.");
1212
} else {
1313
WARNING("sqlite3 not enabled; libraries and/or headers not found");
1414
}

ext/sqlite3/config0.m4

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ if test $PHP_SQLITE3 != "no"; then
1010
[Define to 1 if the PHP extension 'sqlite3' is available.])
1111

1212
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_errstr],
13-
[AC_DEFINE([HAVE_SQLITE3_ERRSTR], [1], [have sqlite3_errstr function])],
13+
[AC_DEFINE([HAVE_SQLITE3_ERRSTR], [1],
14+
[Define to 1 if SQLite library has the 'sqlite3_errstr' function.])],
1415
[],
1516
[$SQLITE3_SHARED_LIBADD])
1617

1718
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_expanded_sql],
1819
[AC_DEFINE([HAVE_SQLITE3_EXPANDED_SQL], [1],
19-
[have sqlite3_expanded_sql function])],
20+
[Define to 1 if SQLite library has the 'sqlite3_expanded_sql' function.])],
2021
[],
2122
[$SQLITE3_SHARED_LIBADD])
2223

2324
PHP_CHECK_LIBRARY([sqlite3], [sqlite3_load_extension],
2425
[],
2526
[AC_DEFINE([SQLITE_OMIT_LOAD_EXTENSION], [1],
26-
[have sqlite3 with extension support])],
27+
[Define to 1 if SQLite library was compiled with the
28+
SQLITE_OMIT_LOAD_EXTENSION and does not have the extension support with
29+
the 'sqlite3_load_extension' function. For usage in the sqlite3 PHP
30+
extension. See https://www.sqlite.org/compile.html.])],
2731
[$SQLITE3_SHARED_LIBADD])
2832

2933
PHP_NEW_EXTENSION([sqlite3],

0 commit comments

Comments
 (0)