Skip to content

Commit df481ef

Browse files
authored
Simplify PDO include paths (#14444)
PDO include paths can be simplified and synced as done in other extensions: either the project root directory or the phpincludedir (for the system installation). The 'ext' include is automatically appended when doing phpize build. In php-src it is only present on Windows build. The PHP_CHECK_PDO_INCLUDES is left intact working as before and checks if PDO headers are found.
1 parent 802612b commit df481ef

25 files changed

+50
-48
lines changed

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ PHP 8.4 INTERNALS UPGRADE NOTES
138138
- M4 macro PHP_CHECK_GCC_ARG has been removed since PHP 8.0 (use
139139
AX_CHECK_COMPILE_FLAG).
140140
- Added php-config --lib-dir and --lib-embed options for PHP embed SAPI.
141+
- PDO extensions in php-src don't have the include flag -I$pdo_cv_inc_path
142+
directory anymore.
141143

142144
c. Windows build system changes
143145
- The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19 have

ext/pdo_dblib/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
4444
PHP_CHECK_PDO_INCLUDES
4545

4646
PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\""
47-
PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,,-I$pdo_cv_inc_path $PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
47+
PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,, $PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
4848
PHP_SUBST(PDO_DBLIB_SHARED_LIBADD)
4949

5050
PHP_ADD_EXTENSION_DEP(pdo_dblib, pdo)

ext/pdo_dblib/dblib_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "php.h"
2323
#include "php_ini.h"
2424
#include "ext/standard/info.h"
25-
#include "pdo/php_pdo.h"
26-
#include "pdo/php_pdo_driver.h"
25+
#include "ext/pdo/php_pdo.h"
26+
#include "ext/pdo/php_pdo_driver.h"
2727
#include "php_pdo_dblib.h"
2828
#include "php_pdo_dblib_int.h"
2929
#include "zend_exceptions.h"

ext/pdo_dblib/dblib_stmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "php.h"
2323
#include "php_ini.h"
2424
#include "ext/standard/info.h"
25-
#include "pdo/php_pdo.h"
26-
#include "pdo/php_pdo_driver.h"
25+
#include "ext/pdo/php_pdo.h"
26+
#include "ext/pdo/php_pdo_driver.h"
2727
#include "php_pdo_dblib.h"
2828
#include "php_pdo_dblib_int.h"
2929
#include "zend_exceptions.h"

ext/pdo_dblib/pdo_dblib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "php.h"
2323
#include "php_ini.h"
2424
#include "ext/standard/info.h"
25-
#include "pdo/php_pdo.h"
26-
#include "pdo/php_pdo_driver.h"
25+
#include "ext/pdo/php_pdo.h"
26+
#include "ext/pdo/php_pdo_driver.h"
2727
#include "php_pdo_dblib.h"
2828
#include "php_pdo_dblib_int.h"
2929
#include "zend_exceptions.h"

ext/pdo_firebird/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
6060

6161
PHP_CHECK_PDO_INCLUDES
6262

63-
PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
63+
PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared)
6464
PHP_SUBST(PDO_FIREBIRD_SHARED_LIBADD)
6565
PHP_ADD_EXTENSION_DEP(pdo_firebird, pdo)
6666
fi

ext/pdo_firebird/firebird_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#include "zend_exceptions.h"
2727
#include "php_ini.h"
2828
#include "ext/standard/info.h"
29-
#include "pdo/php_pdo.h"
30-
#include "pdo/php_pdo_driver.h"
29+
#include "ext/pdo/php_pdo.h"
30+
#include "ext/pdo/php_pdo_driver.h"
3131
#include "php_pdo_firebird.h"
3232
#include "php_pdo_firebird_int.h"
3333

ext/pdo_firebird/firebird_statement.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "php.h"
2222
#include "php_ini.h"
2323
#include "ext/standard/info.h"
24-
#include "pdo/php_pdo.h"
25-
#include "pdo/php_pdo_driver.h"
24+
#include "ext/pdo/php_pdo.h"
25+
#include "ext/pdo/php_pdo_driver.h"
2626
#include "php_pdo_firebird.h"
2727
#include "php_pdo_firebird_int.h"
2828

ext/pdo_firebird/pdo_firebird.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "php.h"
2222
#include "php_ini.h"
2323
#include "ext/standard/info.h"
24-
#include "pdo/php_pdo.h"
25-
#include "pdo/php_pdo_driver.h"
24+
#include "ext/pdo/php_pdo.h"
25+
#include "ext/pdo/php_pdo_driver.h"
2626
#include "php_pdo_firebird.h"
2727
#include "php_pdo_firebird_int.h"
2828
#include "pdo_firebird_arginfo.h"

ext/pdo_mysql/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
8585
AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
8686
fi
8787

88-
PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
88+
PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
8989

9090
PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)
9191

0 commit comments

Comments
 (0)