Skip to content

Commit 3d612ef

Browse files
committed
Fix #81331: compile errors ibm_db2.c v2.1.3 on Windows
As of PHP 7.4.0, the fallback definition of `ulong` has been removed from php-src[1]. This is usually not an issue on POSIX systems where `ulong` is pre-defined, but on Windows and some macOS environments, where it is not. We simply replace `ulong` with `unsigned long` for best compatibility. [1] <php/php-src#3905>
1 parent 7052dc7 commit 3d612ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ibm_db2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ static void _php_db2_assign_options( void *handle, int type, char *opt_key, zval
18861886
static int _php_db2_parse_options ( zval *options, int type, void *handle )
18871887
{
18881888
int i = 0;
1889-
ulong num_idx;
1889+
unsigned long num_idx;
18901890
char *opt_key; /* Holds the Option Index Key */
18911891
zval **data;
18921892
zval **tc_pass = NULL;
@@ -4766,7 +4766,7 @@ PHP_FUNCTION(db2_execute)
47664766
zval *val;
47674767
zend_string *key,*key1;
47684768
char str[1024] = {0};
4769-
ulong num_key;
4769+
unsigned long num_key;
47704770
SQLPOINTER paramValuePtr=NULL;
47714771
SQLPOINTER valuePtr=NULL;
47724772
SQLPOINTER valuePtr2=NULL;
@@ -7552,7 +7552,7 @@ PHP_FUNCTION( db2_execute_many )
75527552
zend_string *key;
75537553
zend_string *key1,*key2,*key3,*key4,*key5;
75547554
zval *zv = NULL, *zv1 = NULL,*zv2,*zv3,*zv4,*zv5;
7555-
ulong num_key,num_key1,num_key2,num_key3,num_key4,num_key5;
7555+
unsigned long num_key,num_key1,num_key2,num_key3,num_key4,num_key5;
75567556

75577557
/* These are used to loop over the param cache*/
75587558
param_node *tmp_curr, *prev_ptr, *curr_ptr;

0 commit comments

Comments
 (0)