summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend.h6
-rw-r--r--Zend/zend_compile.h2
-rw-r--r--Zend/zend_hash.h2
-rw-r--r--Zend/zend_language_scanner.c4
-rw-r--r--Zend/zend_language_scanner.l4
-rw-r--r--Zend/zend_long.h4
-rw-r--r--Zend/zend_multiply.h2
-rw-r--r--Zend/zend_operators.h4
-rw-r--r--ext/mysqli/mysqli_api.c14
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c6
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c6
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.c2
-rw-r--r--ext/pdo_firebird/php_pdo_firebird_int.h2
-rw-r--r--ext/pdo_mysql/mysql_statement.c4
-rw-r--r--ext/standard/pack.c4
-rw-r--r--ext/standard/var_unserializer.c4
-rw-r--r--ext/standard/var_unserializer.re4
-rw-r--r--main/main.c2
18 files changed, 38 insertions, 38 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index e377005288..0e8de14cb4 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -273,14 +273,14 @@ char *alloca ();
#define LONG_MIN (- LONG_MAX - 1)
#endif
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
#define MAX_LENGTH_OF_LONG 11
static const char long_min_digits[] = "2147483648";
-#elif SIZEOF_ZEND_INT == 8
+#elif SIZEOF_ZEND_LONG == 8
#define MAX_LENGTH_OF_LONG 20
static const char long_min_digits[] = "9223372036854775808";
#else
-#error "Unknown SIZEOF_ZEND_INT"
+#error "Unknown SIZEOF_ZEND_LONG"
#endif
#define MAX_LENGTH_OF_DOUBLE 32
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index af33b3e007..1b4d05bcaf 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -128,7 +128,7 @@ typedef struct _zend_try_catch_element {
uint32_t finally_end;
} zend_try_catch_element;
-#if SIZEOF_ZEND_INT == 8
+#if SIZEOF_ZEND_LONG == 8
# ifdef _WIN32
# define THIS_HASHVAL 6385726429Ui64
# else
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 42bacc5c16..5508a40bdf 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -258,7 +258,7 @@ static inline int _zend_handle_numeric_str(const char *key, size_t length, zend_
if ((*end != '\0') /* not a null terminated string */
|| (*tmp == '0' && length > 1) /* numbers with leading zeros */
|| (end - tmp > MAX_LENGTH_OF_LONG - 1) /* number too long */
- || (SIZEOF_ZEND_INT == 4 &&
+ || (SIZEOF_ZEND_LONG == 4 &&
end - tmp == MAX_LENGTH_OF_LONG - 1 &&
*tmp > '2')) { /* overflow */
return 0;
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 33dc6eed24..3b10615513 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -3314,7 +3314,7 @@ yy200:
--len;
}
- if (len < SIZEOF_ZEND_INT * 8) {
+ if (len < SIZEOF_ZEND_LONG * 8) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
@@ -3349,7 +3349,7 @@ yy203:
len--;
}
- if (len < SIZEOF_ZEND_INT * 2 || (len == SIZEOF_ZEND_INT * 2 && *hex <= '7')) {
+ if (len < SIZEOF_ZEND_LONG * 2 || (len == SIZEOF_ZEND_LONG * 2 && *hex <= '7')) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index f4f327b7b6..66fa0cc7bf 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1521,7 +1521,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
--len;
}
- if (len < SIZEOF_ZEND_INT * 8) {
+ if (len < SIZEOF_ZEND_LONG * 8) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
@@ -1562,7 +1562,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
len--;
}
- if (len < SIZEOF_ZEND_INT * 2 || (len == SIZEOF_ZEND_INT * 2 && *hex <= '7')) {
+ if (len < SIZEOF_ZEND_LONG * 2 || (len == SIZEOF_ZEND_LONG * 2 && *hex <= '7')) {
if (len == 0) {
ZVAL_LONG(zendlval, 0);
} else {
diff --git a/Zend/zend_long.h b/Zend/zend_long.h
index 34441c6e45..9ac7c8e4b8 100644
--- a/Zend/zend_long.h
+++ b/Zend/zend_long.h
@@ -59,7 +59,7 @@ typedef off_t zend_off_t;
# error Cant enable 64 bit integers on non 64 bit platform
# endif
# endif
-# define SIZEOF_ZEND_INT 8
+# define SIZEOF_ZEND_LONG 8
#else
typedef long zend_long;
typedef unsigned long zend_ulong;
@@ -69,7 +69,7 @@ typedef long zend_off_t;
# define ZEND_ULONG_MAX ULONG_MAX
# define Z_I(i) i##L
# define Z_UL(i) i##UL
-# define SIZEOF_ZEND_INT SIZEOF_LONG
+# define SIZEOF_ZEND_LONG SIZEOF_LONG
#endif
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
index 71223ad117..3a1a091b0a 100644
--- a/Zend/zend_multiply.h
+++ b/Zend/zend_multiply.h
@@ -81,7 +81,7 @@
} \
} while (0)
-#elif SIZEOF_ZEND_INT == 4 && defined(HAVE_ZEND_LONG64)
+#elif SIZEOF_ZEND_LONG == 4 && defined(HAVE_ZEND_LONG64)
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
zend_long64 __result = (zend_long64) (a) * (zend_long64) (b); \
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 7e6e8b9772..def3db0cf2 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -73,7 +73,7 @@ END_EXTERN_C()
#if ZEND_DVAL_TO_LVAL_CAST_OK
# define zend_dval_to_lval(d) ((zend_long) (d))
-#elif SIZEOF_ZEND_INT == 4
+#elif SIZEOF_ZEND_LONG == 4
static zend_always_inline zend_long zend_dval_to_lval(double d)
{
if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
@@ -202,7 +202,7 @@ check_digits:
dp_or_e = -1;
goto process_double;
}
- } else if (!(digits < SIZEOF_ZEND_INT * 2 || (digits == SIZEOF_ZEND_INT * 2 && ptr[-digits] <= '7'))) {
+ } else if (!(digits < SIZEOF_ZEND_LONG * 2 || (digits == SIZEOF_ZEND_LONG * 2 && ptr[-digits] <= '7'))) {
if (dval) {
local_dval = zend_hex_strtod(str, &ptr);
}
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;
diff --git a/main/main.c b/main/main.c
index 66cbe2bcbd..9b5c41079c 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2214,7 +2214,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
REGISTER_MAIN_LONG_CONSTANT("PHP_MAXPATHLEN", MAXPATHLEN, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", ZEND_LONG_MAX, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MIN", ZEND_LONG_MIN, CONST_PERSISTENT | CONST_CS);
- REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", SIZEOF_ZEND_INT, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", SIZEOF_ZEND_LONG, CONST_PERSISTENT | CONST_CS);
#ifdef PHP_WIN32
REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MAJOR", EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);