Skip to content

Commit 1c598cf

Browse files
committed
Fix [-Wundef] warning in PDO DBLib extension
1 parent f0794c7 commit 1c598cf

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

ext/pdo_dblib/dblib_driver.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
539539
}
540540
}
541541

542-
#if !PHP_DBLIB_IS_MSSQL
542+
#ifndef PHP_DBLIB_IS_MSSQL
543543
if (vars[0].optval) {
544544
DBSETLCHARSET(H->login, vars[0].optval);
545545
}
@@ -570,7 +570,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
570570
}
571571
#endif
572572

573-
#if PHP_DBLIB_IS_MSSQL
573+
#ifdef PHP_DBLIB_IS_MSSQL
574574
/* dblib do not return more than this length from text/image */
575575
DBSETOPT(H->link, DBTEXTLIMIT, "2147483647");
576576
#endif
@@ -607,7 +607,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
607607
}
608608

609609
const pdo_driver_t pdo_dblib_driver = {
610-
#if PDO_DBLIB_IS_MSSQL
610+
#ifdef PDO_DBLIB_IS_MSSQL
611611
PDO_DRIVER_HEADER(mssql),
612612
#elif defined(PHP_WIN32)
613613
#define PDO_DBLIB_IS_SYBASE

ext/pdo_dblib/dblib_stmt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,
373373
case SQLCHAR:
374374
case SQLVARCHAR:
375375
case SQLTEXT: {
376-
#if ilia_0
376+
#ifdef ilia_0
377377
while (data_len>0 && data[data_len-1] == ' ') { /* nuke trailing whitespace */
378378
data_len--;
379379
}

ext/pdo_dblib/pdo_dblib.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ static const zend_module_dep pdo_dblib_deps[] = {
4040
ZEND_MOD_END
4141
};
4242

43-
#if PDO_DBLIB_IS_MSSQL
43+
#ifdef PDO_DBLIB_IS_MSSQL
4444
zend_module_entry pdo_mssql_module_entry = {
4545
#else
4646
zend_module_entry pdo_dblib_module_entry = {
4747
#endif
4848
STANDARD_MODULE_HEADER_EX, NULL,
4949
pdo_dblib_deps,
50-
#if PDO_DBLIB_IS_MSSQL
50+
#ifdef PDO_DBLIB_IS_MSSQL
5151
"pdo_mssql",
5252
#elif defined(PHP_WIN32)
5353
"pdo_sybase",
@@ -72,7 +72,7 @@ zend_module_entry pdo_dblib_module_entry = {
7272
#ifdef ZTS
7373
ZEND_TSRMLS_CACHE_DEFINE()
7474
#endif
75-
#if PDO_DBLIB_IS_MSSQL
75+
#ifdef PDO_DBLIB_IS_MSSQL
7676
ZEND_GET_MODULE(pdo_mssql)
7777
#else
7878
ZEND_GET_MODULE(pdo_dblib)
@@ -209,7 +209,7 @@ PHP_MINIT_FUNCTION(pdo_dblib)
209209
return FAILURE;
210210
}
211211

212-
#if !PHP_DBLIB_IS_MSSQL
212+
#ifndef PHP_DBLIB_IS_MSSQL
213213
dberrhandle((EHANDLEFUNC) pdo_dblib_error_handler);
214214
dbmsghandle((MHANDLEFUNC) pdo_dblib_msg_handler);
215215
#endif
@@ -228,7 +228,7 @@ PHP_MINFO_FUNCTION(pdo_dblib)
228228
{
229229
php_info_print_table_start();
230230
php_info_print_table_header(2, "PDO Driver for "
231-
#if PDO_DBLIB_IS_MSSQL
231+
#ifdef PDO_DBLIB_IS_MSSQL
232232
"MSSQL"
233233
#elif defined(PHP_WIN32)
234234
"FreeTDS/Sybase/MSSQL"

ext/pdo_dblib/php_pdo_dblib.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef PHP_PDO_DBLIB_H
1919
#define PHP_PDO_DBLIB_H
2020

21-
#if PDO_DBLIB_IS_MSSQL
21+
#ifdef PDO_DBLIB_IS_MSSQL
2222
extern zend_module_entry pdo_mssql_module_entry;
2323
#define phpext_pdo_mssql_ptr &pdo_mssql_module_entry
2424
#else

ext/pdo_dblib/php_pdo_dblib_int.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# define PDO_DBLIB_FLAVOUR "Generic DB-lib"
2323
#endif
2424

25-
#if PHP_DBLIB_IS_MSSQL
25+
#ifdef PHP_DBLIB_IS_MSSQL
2626
# include <sqlfront.h>
2727
# include <sqldb.h>
2828

0 commit comments

Comments
 (0)