Skip to content

Commit

Permalink
Fix printf format issues on i386
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Nov 17, 2017
1 parent d5a2dda commit 1310234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/standard/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,13 +824,13 @@ PHP_FUNCTION(dns_get_record)

if (!raw) {
if ((type_param & ~PHP_DNS_ALL) && (type_param != PHP_DNS_ANY)) {
php_error_docref(NULL, E_WARNING, "Type '%ld' not supported", type_param);
php_error_docref(NULL, E_WARNING, "Type '" ZEND_LONG_FMT "' not supported", type_param);
RETURN_FALSE;
}
} else {
if ((type_param < 1) || (type_param > 0xFFFF)) {
php_error_docref(NULL, E_WARNING,
"Numeric DNS record type must be between 1 and 65535, '%ld' given", type_param);
"Numeric DNS record type must be between 1 and 65535, '" ZEND_LONG_FMT "' given", type_param);
RETURN_FALSE;
}
}
Expand Down
4 changes: 2 additions & 2 deletions sapi/phpdbg/phpdbg_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca

case 'r':
if (PHPDBG_G(req_id)) {
s_len = spprintf(&s, 0, "req=\"%lu\"", PHPDBG_G(req_id));
s_len = spprintf(&s, 0, "req=\"" ZEND_ULONG_FMT "\"", PHPDBG_G(req_id));
free_s = s;
} else {
s = "";
Expand Down Expand Up @@ -1062,7 +1062,7 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m

if (PHPDBG_G(req_id)) {
char *xmlbuf = NULL;
xmllen = phpdbg_asprintf(&xmlbuf, "req=\"%lu\" %.*s", PHPDBG_G(req_id), xmllen, xml);
xmllen = phpdbg_asprintf(&xmlbuf, "req=\"" ZEND_ULONG_FMT "\" %.*s", PHPDBG_G(req_id), xmllen, xml);
xml = xmlbuf;
}
if (msgout) {
Expand Down

0 comments on commit 1310234

Please sign in to comment.