Skip to content

Removed ZEND_SIZE_MAX as SIZE_MAX is available on windows already #19244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Zend/zend_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ typedef enum {

typedef ZEND_RESULT_CODE zend_result;

#ifdef ZEND_ENABLE_ZVAL_LONG64
# ifdef ZEND_WIN32
# define ZEND_SIZE_MAX _UI64_MAX
# else
# define ZEND_SIZE_MAX SIZE_MAX
# endif
#else
# if defined(ZEND_WIN32)
# define ZEND_SIZE_MAX _UI32_MAX
# else
# define ZEND_SIZE_MAX SIZE_MAX
# endif
#endif

#ifdef ZTS
#define ZEND_TLS static TSRM_TLS
#define ZEND_EXT_TLS TSRM_TLS
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/formatted_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ php_sprintf_appendstring(zend_string **buffer, size_t *pos, char *add,
if (req_size > ZSTR_LEN(*buffer)) {
size_t size = ZSTR_LEN(*buffer);
while (req_size > size) {
if (size > ZEND_SIZE_MAX/2) {
if (size > SIZE_MAX/2) {
zend_error_noreturn(E_ERROR, "Field width %zd is too long", req_size);
}
size <<= 1;
Expand Down
Loading