diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mysqli/mysqli_api.c | 14 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps_codec.c | 6 | ||||
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 6 | ||||
-rw-r--r-- | ext/opcache/zend_accelerator_util_funcs.c | 2 | ||||
-rw-r--r-- | ext/pdo_firebird/php_pdo_firebird_int.h | 2 | ||||
-rw-r--r-- | ext/pdo_mysql/mysql_statement.c | 4 | ||||
-rw-r--r-- | ext/standard/pack.c | 4 | ||||
-rw-r--r-- | ext/standard/var_unserializer.c | 4 | ||||
-rw-r--r-- | ext/standard/var_unserializer.re | 4 |
9 files changed, 23 insertions, 23 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 7b7f7e582b..f6286af4c4 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -213,9 +213,9 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in break; case 'i': /* Integer */ -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG; -#elif SIZEOF_ZEND_INT==4 +#elif SIZEOF_ZEND_LONG==4 bind[ofs].buffer_type = MYSQL_TYPE_LONG; #endif bind[ofs].buffer = &Z_LVAL_P(param); @@ -284,9 +284,9 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in type = MYSQL_TYPE_DOUBLE; break; case 'i': /* Integer */ -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 type = MYSQL_TYPE_LONGLONG; -#elif SIZEOF_ZEND_INT==4 +#elif SIZEOF_ZEND_LONG==4 type = MYSQL_TYPE_LONG; #endif break; @@ -996,7 +996,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) { /* unsigned int (11) */ uval= *(unsigned int *) stmt->result.buf[i].val; -#if SIZEOF_ZEND_INT==4 +#if SIZEOF_ZEND_LONG==4 if (uval > INT_MAX) { char *tmp, *p; int j = 10; @@ -1047,9 +1047,9 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) { llval= *(my_ulonglong *) stmt->result.buf[i].val; } -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 if (uns && llval > 9223372036854775807L) { -#elif SIZEOF_ZEND_INT==4 +#elif SIZEOF_ZEND_LONG==4 if ((uns && llval > L64(2147483647)) || (!uns && (( L64(2147483647) < (my_longlong) llval) || (L64(-2147483648) > (my_longlong) llval)))) diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index cfe6f26280..2e414cacef 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -76,7 +76,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne case 1:uval = (uint64_t) uint1korr(*row);break; } -#if SIZEOF_ZEND_INT==4 +#if SIZEOF_ZEND_LONG==4 if (uval > INT_MAX) { DBG_INF("stringify"); tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval); @@ -105,7 +105,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne case 1:lval = (int64_t) *(int8_t*)*row;break; } -#if SIZEOF_ZEND_INT==4 +#if SIZEOF_ZEND_LONG==4 if ((L64(2147483647) < (int64_t) lval) || (L64(-2147483648) > (int64_t) lval)) { DBG_INF("stringify"); tmp_len = sprintf((char *)&tmp, MYSQLND_LL_SPEC, lval); @@ -663,7 +663,7 @@ mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_u short current_type = stmt->param_bind[i].type; zval *parameter = &stmt->param_bind[i].zv; /* our types are not unsigned */ -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 if (current_type == MYSQL_TYPE_LONG) { current_type = MYSQL_TYPE_LONGLONG; } diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 5af676d02f..a6e2517b2b 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1671,7 +1671,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zend_uchar save = *(p + len); /* We have to make it ASCIIZ temporarily */ *(p + len) = '\0'; - if (perm_bind.pack_len < SIZEOF_ZEND_INT) { + if (perm_bind.pack_len < SIZEOF_ZEND_LONG) { /* direct conversion */ int64_t v = #ifndef PHP_WIN32 @@ -1689,9 +1689,9 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, #endif zend_bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE; /* We have to make it ASCIIZ temporarily */ -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 if (uns == TRUE && v > 9223372036854775807L) -#elif SIZEOF_ZEND_INT==4 +#elif SIZEOF_ZEND_LONG==4 if ((uns == TRUE && v > L64(2147483647)) || (uns == FALSE && (( L64(2147483647) < (int64_t) v) || (L64(-2147483648) > (int64_t) v)))) diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 46eb03ee47..dd5340e572 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -29,7 +29,7 @@ static uint32_t zend_accel_refcount = ZEND_PROTECTED_REFCOUNT; -#if SIZEOF_SIZE_T <= SIZEOF_ZEND_INT +#if SIZEOF_SIZE_T <= SIZEOF_ZEND_LONG /* If sizeof(void*) == sizeof(ulong) we can use zend_hash index functions */ # define accel_xlat_set(old, new) zend_hash_index_update_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old), (new)) # define accel_xlat_get(old) zend_hash_index_find_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old)) diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 20baebacaa..1fc610ce78 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -35,7 +35,7 @@ #define SHORT_MAX (1 << (8*sizeof(short)-1)) -#if SIZEOF_ZEND_INT == 8 && !defined(PHP_WIN32) +#if SIZEOF_ZEND_LONG == 8 && !defined(PHP_WIN32) # define LL_MASK "l" # define LL_LIT(lit) lit ## L #else diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 909527eed2..5eddc832a1 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -551,9 +551,9 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_VAR_STRING); break; case IS_LONG: -#if SIZEOF_ZEND_INT==8 +#if SIZEOF_ZEND_LONG==8 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONGLONG); -#elif SIZEOF_ZEND_INT==4 +#elif SIZEOF_ZEND_LONG==4 mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONG); #endif /* SIZEOF_LONG */ break; diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 59f878e217..556a96d374 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -829,12 +829,12 @@ PHP_FUNCTION(unpack) map = little_endian_long_map; } - if (SIZEOF_ZEND_INT > 4 && issigned) { + if (SIZEOF_ZEND_LONG > 4 && issigned) { v = ~INT_MAX; } v |= php_unpack(&input[inputpos], 4, issigned, map); - if (SIZEOF_ZEND_INT > 4) { + if (SIZEOF_ZEND_LONG > 4) { if (type == 'l') { v = (signed int) v; } else { diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 3ae0aaf633..8d9899f81f 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1023,7 +1023,7 @@ yy63: ++YYCURSOR; #line 588 "ext/standard/var_unserializer.re" { -#if SIZEOF_ZEND_INT == 4 +#if SIZEOF_ZEND_LONG == 4 use_double: #endif *p = YYCURSOR; @@ -1134,7 +1134,7 @@ yy79: ++YYCURSOR; #line 546 "ext/standard/var_unserializer.re" { -#if SIZEOF_ZEND_INT == 4 +#if SIZEOF_ZEND_LONG == 4 int digits = YYCURSOR - start - 3; if (start[2] == '-' || start[2] == '+') { diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 054580ac41..988666b2de 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -544,7 +544,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) } "i:" iv ";" { -#if SIZEOF_ZEND_INT == 4 +#if SIZEOF_ZEND_LONG == 4 int digits = YYCURSOR - start - 3; if (start[2] == '-' || start[2] == '+') { @@ -586,7 +586,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) } "d:" (iv | nv | nvexp) ";" { -#if SIZEOF_ZEND_INT == 4 +#if SIZEOF_ZEND_LONG == 4 use_double: #endif *p = YYCURSOR; |