]> granicus.if.org Git - php/commitdiff
Fix printf format issues on i386
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Nov 2017 21:23:17 +0000 (22:23 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Nov 2017 21:25:03 +0000 (22:25 +0100)
ext/standard/dns.c
sapi/phpdbg/phpdbg_out.c

index ee03a31e25a9a24de601af7140d9048146c390c6..9367c054b8f735af123d6a916c9e680ee78fb978 100644 (file)
@@ -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;
                }
        }
index 0eead04495a1e2a0bdf26321c542f4aa3e632f5c..1305bf6d5e4201216d0d137a1904ab0dbba529ef 100644 (file)
@@ -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 = "";
@@ -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) {