diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2009-05-19 10:22:25 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2009-05-19 10:22:25 +0000 |
commit | a58bd002d6a7f88720984205db717d7d67dfafbd (patch) | |
tree | a3df5cd5576970a0f3b5db347f1d3d5901c6ed20 /ext/pdo_dblib | |
parent | 45b2586666fbe3fe3c0dc162f8164e8a36bdc053 (diff) | |
download | php-git-a58bd002d6a7f88720984205db717d7d67dfafbd.tar.gz |
MFH: Fix --with-pdo-mssql build and add some warnings if header/libs are not found
Diffstat (limited to 'ext/pdo_dblib')
-rwxr-xr-x | ext/pdo_dblib/config.w32 | 8 | ||||
-rw-r--r-- | ext/pdo_dblib/pdo_dblib.c | 4 | ||||
-rw-r--r-- | ext/pdo_dblib/php_pdo_dblib.h | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/ext/pdo_dblib/config.w32 b/ext/pdo_dblib/config.w32 index 7ab90af0c1..14cbb68f1a 100755 --- a/ext/pdo_dblib/config.w32 +++ b/ext/pdo_dblib/config.w32 @@ -13,8 +13,10 @@ if (PHP_PDO_DBLIB != "no") { { EXTENSION("pdo_dblib", "pdo_dblib.c dblib_driver.c dblib_stmt.c"); ADD_FLAG('CFLAGS_PDO_DBLIB', "/D PDO_DBLIB_FLAVOUR=\\\"freetds\\\""); + ADD_EXTENSION_DEP('pdo_dblib', 'pdo'); + } else { + WARNING("pdo_dblib not enabled, libraries or headers not found") } - ADD_EXTENSION_DEP('pdo_dblib', 'pdo'); } ARG_WITH("pdo-mssql", "Native MS-SQL support for PDO", "no"); @@ -64,6 +66,8 @@ if (PHP_PDO_MSSQL != "no") { PDO_DBLIB_FLAVOUR = "MSSQL_" + PDO_DBLIB_FLAVOUR; } ADD_FLAG('CFLAGS_PDO_MSSQL', "/D PDO_DBLIB_FLAVOUR=\\\"" + PDO_DBLIB_FLAVOUR + "\\\""); + ADD_EXTENSION_DEP('pdo_mssql', 'pdo'); + } else { + WARNING("pdo_mssql not enabled, libraries or headers not found") } - ADD_EXTENSION_DEP('pdo_mssql', 'pdo'); } diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c index 897893eac6..46bd927a49 100644 --- a/ext/pdo_dblib/pdo_dblib.c +++ b/ext/pdo_dblib/pdo_dblib.c @@ -46,7 +46,11 @@ static const zend_module_dep pdo_dblib_deps[] = { }; #endif +#if PDO_DBLIB_IS_MSSQL +zend_module_entry pdo_mssql_module_entry = { +#else zend_module_entry pdo_dblib_module_entry = { +#endif #if ZEND_MODULE_API_NO >= 20050922 STANDARD_MODULE_HEADER_EX, NULL, pdo_dblib_deps, diff --git a/ext/pdo_dblib/php_pdo_dblib.h b/ext/pdo_dblib/php_pdo_dblib.h index 1ef08941b1..e53817d5ab 100644 --- a/ext/pdo_dblib/php_pdo_dblib.h +++ b/ext/pdo_dblib/php_pdo_dblib.h @@ -22,9 +22,13 @@ #ifndef PHP_PDO_DBLIB_H #define PHP_PDO_DBLIB_H - +#if PDO_DBLIB_IS_MSSQL +extern zend_module_entry pdo_mssql_module_entry; +#define phpext_pdo_mssql_ptr &pdo_mssql_module_entry +#else extern zend_module_entry pdo_dblib_module_entry; #define phpext_pdo_dblib_ptr &pdo_dblib_module_entry +#endif #ifdef ZTS # include "TSRM.h" |