Skip to content

Commit 28e478d

Browse files
author
vnkbabu
committed
Fix the compilation issue in PHP 5.6 for windows.
1 parent df913fe commit 28e478d

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

ibm_db2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static void _php_db2_errorlog(const char * format, ...)
472472

473473
/* {{{ static int _php_db2_hash_find_ind(const char * varname, int varlen, zval ***bind_data)
474474
*/
475-
static int _php_db2_hash_find_ind(char * varname, int varlen, zval **temp, zval ***bind_data, zend_array ** symbol_table_used)
475+
static int _php_db2_hash_find_ind(char * varname, int varlen, zval **temp, zval ***bind_data, zend_array ** symbol_table_used TSRMLS_DC)
476476
{
477477
int rc = FAILURE;
478478
zend_array * symbol_table_local; /* php 5.3+, php 7+ */
@@ -518,12 +518,12 @@ static int _php_db2_hash_find_ind(char * varname, int varlen, zval **temp, zval
518518

519519
/* {{{ static void _php_db2_set_symbol(char * varname, zval *var)
520520
*/
521-
static void _php_db2_set_symbol(char * varname, zval *var)
521+
static void _php_db2_set_symbol(char * varname, zval *var TSRMLS_DC)
522522
{
523523
zval **bind_data; /* Data value from symbol table */
524524
zval *temp = NULL;
525525
zend_array * symbol_table_used; /* php 5.3+, php 7+ */
526-
if (_php_db2_hash_find_ind(varname, strlen(varname), &temp, &bind_data, &symbol_table_used) != FAILURE ) {
526+
if (_php_db2_hash_find_ind(varname, strlen(varname), &temp, &bind_data, &symbol_table_used TSRMLS_CC ) != FAILURE ) {
527527
#if PHP_MAJOR_VERSION >= 7
528528
/* $mydata = 3;
529529
* function callme () {
@@ -4749,7 +4749,7 @@ static int _php_db2_bind_data( stmt_handle *stmt_res, param_node *curr, zval **b
47494749
convert_to_string(*bind_data);
47504750
}
47514751
/* make sure out and inout param allocation large enough for full length writes */
4752-
if ((rc = (_php_db2_bind_pad(curr, nullterm, isvarying, isbinary, &origlen, bind_data))) == SQL_ERROR) {
4752+
if ((rc = (_php_db2_bind_pad(curr, nullterm, isvarying, isbinary, &origlen, bind_data TSRMLS_CC))) == SQL_ERROR) {
47534753
return SQL_ERROR;
47544754
}
47554755
break;
@@ -4925,7 +4925,7 @@ static int _php_db2_execute_helper(stmt_handle *stmt_res, zval **data, int bind_
49254925
/* Used when no parameters array is passed in */
49264926
curr = stmt_res->head_cache_list;
49274927
while (curr != NULL ) {
4928-
if (_php_db2_hash_find_ind(curr->varname, strlen(curr->varname), &temp, &bind_data, &symbol_table_used) != FAILURE ) {
4928+
if (_php_db2_hash_find_ind(curr->varname, strlen(curr->varname), &temp, &bind_data, &symbol_table_used TSRMLS_CC) != FAILURE ) {
49294929
rc = _php_db2_bind_data( stmt_res, curr, bind_data TSRMLS_CC);
49304930
if ( rc == SQL_ERROR ) {
49314931
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Binding Error 1");
@@ -5250,7 +5250,7 @@ PHP_FUNCTION(db2_execute)
52505250
/* bind in the value of long_value instead */
52515251
tmp_curr->value->value.lval = (long)tmp_curr->long_value;
52525252
}
5253-
_php_db2_set_symbol(tmp_curr->varname, tmp_curr->value);
5253+
_php_db2_set_symbol(tmp_curr->varname, tmp_curr->value TSRMLS_CC);
52545254
default:
52555255
break;
52565256
}

package.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Cloudscape, and Apache Derby databases.</description>
1818
<email>[email protected]</email>
1919
<active>yes</active>
2020
</lead>
21-
<date>2017-09-21</date>
22-
<time>13:05:12</time>
21+
<date>2017-10-13</date>
22+
<time>10:24:59</time>
2323
<version>
24-
<release>2.0.0</release>
25-
<api>2.0.0</api>
24+
<release>2.0.1</release>
25+
<api>2.0.1</api>
2626
</version>
2727
<stability>
2828
<release>stable</release>
@@ -33,6 +33,7 @@ Cloudscape, and Apache Derby databases.</description>
3333
Fixed : signal 11 in db2_pconnect
3434
Fixed : Security flaw with using user and password for hashing in db2_pconnect.
3535
Fxied : Local scope bound values in a class are not used
36+
Fixed : Compilation issue of PHP-5.6 in windows.
3637
</notes>
3738
<contents>
3839
<dir name="/">
@@ -292,9 +293,9 @@ Fxied : Local scope bound values in a class are not used
292293
<file baseinstalldir="ibm_db2" md5sum="bb50774ad5c43b05700793eaad4289a7" name="tests/test_x010_IBMi_LUW_DB2_I5_FMT.phpt" role="test" />
293294
<file baseinstalldir="ibm_db2" md5sum="cfcb2edf9f657735355070d4bf5509b8" name="config.m4" role="src" />
294295
<file baseinstalldir="ibm_db2" md5sum="415f5c9831bba062629df9a002644945" name="config.w32" role="src" />
295-
<file baseinstalldir="ibm_db2" md5sum="115105ba4ab1be3dd45eae248a10488c" name="ibm_db2.c" role="src" />
296+
<file baseinstalldir="ibm_db2" md5sum="f2a23d02b38535e9675e1d1d84b807f1" name="ibm_db2.c" role="src" />
296297
<file baseinstalldir="ibm_db2" md5sum="50c8871b7921a625bd09104fb19a677a" name="ibm_db2.dsp" role="src" />
297-
<file baseinstalldir="ibm_db2" md5sum="21c0bc17c35778dfa3210cbfffe22123" name="php_ibm_db2.h" role="src" />
298+
<file baseinstalldir="ibm_db2" md5sum="64f5c860e1b5e650e58d112409be7419" name="php_ibm_db2.h" role="src" />
298299
<file baseinstalldir="ibm_db2" md5sum="bed3d9c095178e7089183faff85ff506" name="TODO" role="doc" />
299300
<file baseinstalldir="ibm_db2" md5sum="2565745239557cee06d0fc4b2bbf05a5" name="LICENSE" role="doc" />
300301
<file baseinstalldir="ibm_db2" md5sum="e48e9a9ff6da12b687451d60f70794f3" name="CONTRIBUTING.md" role="doc" />

php_ibm_db2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$Id$
2424
*/
2525

26-
#define PHP_IBM_DB2_VERSION "2.0.0"
26+
#define PHP_IBM_DB2_VERSION "2.0.1"
2727

2828
#ifndef PHP_IBM_DB2_H
2929
#define PHP_IBM_DB2_H

0 commit comments

Comments
 (0)