]> granicus.if.org Git - php/commitdiff
fixes to %pd format usage
authorAnatol Belski <ab@php.net>
Sun, 24 Aug 2014 00:35:34 +0000 (02:35 +0200)
committerAnatol Belski <ab@php.net>
Sun, 24 Aug 2014 00:35:34 +0000 (02:35 +0200)
53 files changed:
Zend/zend.c
Zend/zend_API.c
Zend/zend_exceptions.c
Zend/zend_execute.c
Zend/zend_operators.c
ext/bz2/bz2_filter.c
ext/calendar/calendar.c
ext/date/php_date.c
ext/fileinfo/fileinfo.c
ext/ftp/ftp.c
ext/ftp/php_ftp.c
ext/gd/gd.c
ext/gmp/gmp.c
ext/intl/converter/converter.c
ext/intl/dateformat/dateformat_format.c
ext/intl/formatter/formatter_format.c
ext/intl/formatter/formatter_parse.c
ext/ldap/ldap.c
ext/mbstring/mb_gpc.c
ext/mysql/php_mysql.c
ext/mysqli/mysqli.c
ext/mysqli/mysqli_nonapi.c
ext/mysqlnd/php_mysqlnd.c
ext/odbc/php_odbc.c
ext/opcache/zend_accelerator_module.c
ext/pdo/pdo_stmt.c
ext/pdo_pgsql/pgsql_driver.c
ext/pgsql/pgsql.c
ext/session/php_session.h
ext/session/session.c
ext/soap/php_encoding.c
ext/soap/php_http.c
ext/soap/soap.c
ext/sockets/conversions.c
ext/sockets/multicast.c
ext/sockets/sendrecvmsg.c
ext/spl/spl_directory.c
ext/spl/spl_observer.c
ext/standard/assert.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/ftp_fopen_wrapper.c
ext/standard/http.c
ext/standard/info.c
ext/standard/mail.c
ext/standard/proc_open.c
ext/standard/streamsfuncs.c
ext/standard/url_scanner_ex.c
ext/standard/var.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
ext/zlib/zlib_filter.c
main/SAPI.c

index 9b2c7e34773d11fbd705c5a959a67aded2076d59..d52f3b6b9b27a94dc438b3a6693f4782df71a883 100644 (file)
@@ -174,7 +174,7 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent,
                        }
                } else {
                        char key[25];
-                       snprintf(key, sizeof(key), "%ld", num_key);
+                       snprintf(key, sizeof(key), ZEND_INT_FMT, num_key);
                        ZEND_PUTS_EX(key);
                }
                ZEND_PUTS_EX("] => ");
@@ -235,7 +235,7 @@ again:
                                char buf[sizeof("Resource id #") + MAX_LENGTH_OF_ZEND_INT];
                                int len;
 
-                               len = snprintf(buf, sizeof(buf), "Resource id #%ld", Z_RES_HANDLE_P(expr));
+                               len = snprintf(buf, sizeof(buf), "Resource id #" ZEND_INT_FMT, Z_RES_HANDLE_P(expr));
                                ZVAL_NEW_STR(expr_copy, STR_INIT(buf, len, 0));
                        }
                        break;
index 35b3c8ac7a3f2f5736aff8685d11c4a15198f7ae..348737bddcd54f4256a9b100ed9dd0242823b517 100644 (file)
@@ -1747,7 +1747,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value TSRMLS_DC)
                        result = zend_symtable_update(ht, STR_EMPTY_ALLOC(), value);
                        break;
                case IS_RESOURCE:
-                       zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
+                       zend_error(E_STRICT, "Resource ID#" ZEND_INT_FMT " used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
                        result = zend_hash_index_update(ht, Z_RES_HANDLE_P(key), value);
                        break;
                case IS_FALSE:
index 6d5aa720facc6b2139d08d77844918cc2bc5990c..766cf7e2108103cad6c596a6776a01f333c9f2d5 100644 (file)
@@ -461,7 +461,7 @@ static void _build_trace_args(zval *arg, zend_string **str_ptr TSRMLS_DC) /* {{{
                case IS_RESOURCE: {
                        zend_int_t lval = Z_RES_HANDLE_P(arg);
                        char s_tmp[MAX_LENGTH_OF_ZEND_INT + 1];
-                       int l_tmp = zend_sprintf(s_tmp, "%ld", lval);  /* SAFE */
+                       int l_tmp = zend_sprintf(s_tmp, ZEND_INT_FMT, lval);  /* SAFE */
                        TRACE_APPEND_STR("Resource id #");
                        TRACE_APPEND_STRL(s_tmp, l_tmp);
                        TRACE_APPEND_STR(", ");
@@ -470,7 +470,7 @@ static void _build_trace_args(zval *arg, zend_string **str_ptr TSRMLS_DC) /* {{{
                case IS_INT: {
                        zend_int_t lval = Z_IVAL_P(arg);
                        char s_tmp[MAX_LENGTH_OF_ZEND_INT + 1];
-                       int l_tmp = zend_sprintf(s_tmp, "%ld", lval);  /* SAFE */
+                       int l_tmp = zend_sprintf(s_tmp, ZEND_INT_FMT, lval);  /* SAFE */
                        TRACE_APPEND_STRL(s_tmp, l_tmp);
                        TRACE_APPEND_STR(", ");
                        break;
@@ -519,7 +519,7 @@ static void _build_trace_string(zval *frame, zend_uint_t index, zend_string **st
        zend_string *str = *str_ptr;
 
        if (Z_TYPE_P(frame) != IS_ARRAY) {
-               zend_error(E_WARNING, "Expected array for frame %lu", index);
+               zend_error(E_WARNING, "Expected array for frame %pu", index);
                return;
        }
 
index 54397153c19c8beae9854d09abc0584d70fd6beb..7371a6ac7c5fd8a0863fd77cd6fe4696ba046ba7 100644 (file)
@@ -1095,7 +1095,7 @@ str_index:
                                hval = zend_dval_to_ival(Z_DVAL_P(dim));
                                goto num_index;
                        case IS_RESOURCE:
-                               zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_RES_HANDLE_P(dim), Z_RES_HANDLE_P(dim));
+                               zend_error(E_STRICT, "Resource ID#%pd used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(dim), Z_RES_HANDLE_P(dim));
                                hval = Z_RES_HANDLE_P(dim);
                                goto num_index;
                        case IS_FALSE:
index 6a8199949510a0327ee2c2b93f80656048678f5e..423a9e614d859991942a027e40ea8369445d84b7 100644 (file)
@@ -599,7 +599,7 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
                        break;
                case IS_RESOURCE: {
                        char buf[sizeof("Resource id #") + MAX_LENGTH_OF_ZEND_INT];
-                       int len = snprintf(buf, sizeof(buf), "Resource id #%ld", Z_RES_HANDLE_P(op));
+                       int len = snprintf(buf, sizeof(buf), "Resource id #" ZEND_INT_FMT, Z_RES_HANDLE_P(op));
                        ZVAL_NEW_STR(op, STR_INIT(buf, len, 0));
                        break;
                }
@@ -879,7 +879,7 @@ try_again:
                        char buf[sizeof("Resource id #") + MAX_LENGTH_OF_ZEND_INT];
                        int len;
 
-                       len = snprintf(buf, sizeof(buf), "Resource id #%ld", Z_RES_HANDLE_P(op));
+                       len = snprintf(buf, sizeof(buf), "Resource id #" ZEND_INT_FMT, Z_RES_HANDLE_P(op));
                        return STR_INIT(buf, len, 0);
                }
                case IS_INT: {
index f32226bc84b563327c179505af5a49cae900c510..75c1bd418b1f9782345dc98d633657548690b75f 100644 (file)
@@ -382,7 +382,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
                                        ZVAL_DUP(&tmp, tmpzval);
                                        convert_to_int(&tmp);
                                        if (Z_IVAL(tmp) < 1 || Z_IVAL(tmp) > 9) {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for number of blocks to allocate. (%ld)", Z_IVAL_P(tmpzval));
+                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for number of blocks to allocate. (%pd)", Z_IVAL_P(tmpzval));
                                        } else {
                                                blockSize100k = Z_IVAL(tmp);
                                        }
@@ -396,7 +396,7 @@ static php_stream_filter *php_bz2_filter_create(const char *filtername, zval *fi
                                        convert_to_int(&tmp);
 
                                        if (Z_IVAL(tmp) < 0 || Z_IVAL(tmp) > 250) {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for work factor. (%ld)", Z_IVAL(tmp));
+                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter given for work factor. (%pd)", Z_IVAL(tmp));
                                        } else {
                                                workFactor = Z_IVAL(tmp);
                                        }
index 35652a9ce6a2fb50a54de8acd8777a612b8a8524..56277b0dd9dde179acdf3d121834f2eb25a0872b 100644 (file)
@@ -311,7 +311,7 @@ PHP_FUNCTION(cal_info)
 
 
        if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %pd.", cal);
                RETURN_FALSE;
        }
 
index 813f8663f087d4a6ee58d26b4bfe71ba4093640f..2a32f8b592f985e965240d2f7d4bcdbb690fb06c 100644 (file)
@@ -1436,7 +1436,7 @@ PHP_FUNCTION(strtotime)
                now = timelib_time_ctor();
 
                initial_ts = emalloc(25);
-               snprintf(initial_ts, 24, "@%ld UTC", preset_ts);
+               snprintf(initial_ts, 24, "@" ZEND_INT_FMT " UTC", preset_ts);
                t = timelib_strtotime(initial_ts, strlen(initial_ts), NULL, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); /* we ignore the error here, as this should never fail */
                timelib_update_ts(t, tzi);
                now->tz_info = tzi;
index e2030c621d5f0240b29fffc1c28461c03382a89d..4c8e5bfe7e489be1b2fda471e43bdf64730ebba9 100644 (file)
@@ -176,7 +176,7 @@ zend_function_entry finfo_class_functions[] = {
 
 #define FINFO_SET_OPTION(magic, options) \
        if (magic_setflags(magic, options) == -1) { \
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to set option '%ld' %d:%s", \
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to set option '%pd' %d:%s", \
                                options, magic_errno(magic), magic_error(magic)); \
                RETURN_FALSE; \
        }
@@ -339,7 +339,7 @@ PHP_FUNCTION(finfo_open)
 
        if (finfo->magic == NULL) {
                efree(finfo);
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid mode '%ld'.", options);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid mode '%pd'.", options);
                FILEINFO_DESTROY_OBJECT(object);
                RETURN_FALSE;
        }
index 330f6f09e083d093bee9296b043c07d000a2be3d..5b0fea6db9b3c820e65f3d0a0d697536776a0a14 100644 (file)
@@ -624,7 +624,7 @@ ftp_alloc(ftpbuf_t *ftp, const php_int_t size, zend_string **response)
                return 0;
        }
 
-       snprintf(buffer, sizeof(buffer) - 1, "%ld", size);
+       snprintf(buffer, sizeof(buffer) - 1, ZEND_INT_FMT, size);
     
        if (!ftp_putcmd(ftp, "ALLO", buffer)) {
                return 0;
@@ -811,7 +811,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
        ftp->data = data;
 
        if (resumepos > 0) {
-               snprintf(arg, sizeof(arg), "%ld", resumepos);
+               snprintf(arg, sizeof(arg), ZEND_INT_FMT, resumepos);
                if (!ftp_putcmd(ftp, "REST", arg)) {
                        goto bail;
                }
@@ -903,7 +903,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, p
        ftp->data = data;       
 
        if (startpos > 0) {
-               snprintf(arg, sizeof(arg), "%ld", startpos);
+               snprintf(arg, sizeof(arg), ZEND_INT_FMT, startpos);
                if (!ftp_putcmd(ftp, "REST", arg)) {
                        goto bail;
                }
@@ -1729,7 +1729,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
        }
 
        if (resumepos>0) {
-               snprintf(arg, sizeof(arg), "%ld", resumepos);
+               snprintf(arg, sizeof(arg), ZEND_INT_FMT, resumepos);
                if (!ftp_putcmd(ftp, "REST", arg)) {
                        goto bail;
                }
@@ -1843,7 +1843,7 @@ ftp_nb_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type
                goto bail;
        }
        if (startpos > 0) {
-               snprintf(arg, sizeof(arg), "%ld", startpos);
+               snprintf(arg, sizeof(arg), ZEND_INT_FMT, startpos);
                if (!ftp_putcmd(ftp, "REST", arg)) {
                        goto bail;
                }
index cb4cd37a004ef5203ea33a5c2cc3fd89d4d1d78b..41b8e12861c39f673f4a159aac60ee9473e210b0 100644 (file)
@@ -1401,7 +1401,7 @@ PHP_FUNCTION(ftp_set_option)
                        RETURN_TRUE;
                        break;
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%pd'", option);
                        RETURN_FALSE;
                        break;
        }
@@ -1430,7 +1430,7 @@ PHP_FUNCTION(ftp_get_option)
                        RETURN_BOOL(ftp->autoseek);
                        break;
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%pd'", option);
                        RETURN_FALSE;
                        break;
        }
index b6fff4a12f7a647d8fd187d9829eea51ab2571be..11941a43b95ad4e342e49f01a84bfb8dc676f40b 100644 (file)
@@ -2848,14 +2848,14 @@ PHP_FUNCTION(imagecolorat)
                if (im->tpixels && gdImageBoundsSafe(im, x, y)) {
                        RETURN_INT(gdImageTrueColorPixel(im, x, y));
                } else {
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%ld,%ld is out of bounds", x, y);
+                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%pd,%pd is out of bounds", x, y);
                        RETURN_FALSE;
                }
        } else {
                if (im->pixels && gdImageBoundsSafe(im, x, y)) {
                        RETURN_INT(im->pixels[y][x]);
                } else {
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%ld,%ld is out of bounds", x, y);
+                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%pd,%pd is out of bounds", x, y);
                        RETURN_FALSE;
                }
        }
@@ -4135,12 +4135,12 @@ PHP_FUNCTION(imagepstext)
 
        /* Ensure that the provided colors are valid */
        if (_fg < 0 || (!gdImageTrueColor(bg_img) && _fg > gdImageColorsTotal(bg_img))) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Foreground color index %ld out of range", _fg);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Foreground color index %pd out of range", _fg);
                RETURN_FALSE;
        }
 
        if (_bg < 0 || (!gdImageTrueColor(bg_img) && _fg > gdImageColorsTotal(bg_img))) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Background color index %ld out of range", _bg);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Background color index %pd out of range", _bg);
                RETURN_FALSE;
        }
 
@@ -4174,7 +4174,7 @@ PHP_FUNCTION(imagepstext)
                        T1_AASetLevel(T1_AA_HIGH);
                        break;
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value %ld as number of steps for antialiasing", aa_steps);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value %pd as number of steps for antialiasing", aa_steps);
                        RETURN_FALSE;
        }
 
index 8a89451178e50c5f5d782dd127900d8fb160dfe6..a8f49ad0ad7b9c2b88cba0246965ab93478ceb8f 100644 (file)
@@ -1005,7 +1005,7 @@ ZEND_FUNCTION(gmp_init)
        }
 
        if (base && (base < 2 || base > MAX_BASE)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %ld (should be between 2 and %d)", base, MAX_BASE);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %pd (should be between 2 and %d)", base, MAX_BASE);
                RETURN_FALSE;
        }
 
@@ -1052,10 +1052,10 @@ ZEND_FUNCTION(gmp_strval)
        /* Although the maximum base in general in GMP >= 4.2 is 62, mpz_get_str()
         * is explicitly limited to -36 when dealing with negative bases. */
        if ((base < 2 && base > -2) || base > MAX_BASE || base < -36) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %ld (should be between 2 and %d or -2 and -36)", base, MAX_BASE);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %pd (should be between 2 and %d or -2 and -36)", base, MAX_BASE);
 #else
        if (base < 2 || base > MAX_BASE) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %ld (should be between 2 and %d)", base, MAX_BASE);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %pd (should be between 2 and %d)", base, MAX_BASE);
 #endif
                RETURN_FALSE;
        }
index 95f49d94cb40ff5c1e747526f21f1c9df3ab1cff..868e3bc90dcb553ebdf300aa7e340dbca361b3e2 100644 (file)
@@ -154,7 +154,7 @@ static PHP_METHOD(UConverter, fromUCallback) {
 /* {{{ php_converter_check_limits */
 static inline zend_bool php_converter_check_limits(php_converter_object *objval, php_int_t available, php_int_t needed TSRMLS_DC) {
        if (available < needed) {
-               php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR TSRMLS_CC, "Buffer overrun %ld bytes needed, %ld available", needed, available);
+               php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR TSRMLS_CC, "Buffer overrun %pd bytes needed, %pd available", needed, available);
                return 0;
        }
        return 1;
@@ -748,7 +748,7 @@ static PHP_METHOD(UConverter, reasonText) {
                UCNV_REASON_CASE(CLOSE)
                UCNV_REASON_CASE(CLONE)
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown UConverterCallbackReason: %ld", reason);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown UConverterCallbackReason: %pd", reason);
                        RETURN_FALSE;
        }
 }
index 9ec012c570ea833ed5295b6b3cfe6e7a7745d2f5..38ec4101aa62292f3f8d29568cd3e2aa5db0fba3 100644 (file)
@@ -79,7 +79,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
                } else {
                        if (Z_IVAL_P(ele_value) > INT32_MAX ||
                                        Z_IVAL_P(ele_value) < INT32_MIN) {
-                               spprintf(&message, 0, "datefmt_format: value %ld is out of "
+                               spprintf(&message, 0, "datefmt_format: value %pd is out of "
                                                "bounds for a 32-bit integer in key '%s'",
                                                Z_IVAL_P(ele_value), key_name);
                                intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
index 3fe5d6abf1e32949bbcf7527cebf4cef179c1422..8a8f251dcca194727a350c7c4a1ff34bcd245152 100644 (file)
@@ -120,7 +120,7 @@ PHP_FUNCTION( numfmt_format )
                        break;
 
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %ld", type);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %pd", type);
                        RETURN_FALSE;
                        break;
        }
index 3d0c84dab6bd58ffd38b9006198a4ff7cabbb84c..b7cf36945b3248a625147cd1739b185651ef2b9b 100644 (file)
@@ -97,7 +97,7 @@ PHP_FUNCTION( numfmt_parse )
                        RETVAL_DOUBLE(val_double);
                        break;
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %ld", type);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %pd", type);
                        RETVAL_FALSE;
                        break;
        }
index 9bfbaaa1aeb079cc77185a6feebd57af5512a98f..98600897ac2249644c6917849b59a10e6f9eef0e 100644 (file)
@@ -241,9 +241,9 @@ PHP_MINFO_FUNCTION(ldap)
        php_info_print_table_row(2, "RCS Version", "$Id$");
 
        if (LDAPG(max_links) == -1) {
-               snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
+               snprintf(tmp, 31, ZEND_INT_FMT "/unlimited", LDAPG(num_links));
        } else {
-               snprintf(tmp, 31, "%ld/%ld", LDAPG(num_links), LDAPG(max_links));
+               snprintf(tmp, 31, ZEND_INT_FMT "/" ZEND_INT_FMT, LDAPG(num_links), LDAPG(max_links));
        }
        php_info_print_table_row(2, "Total Links", tmp);
 
@@ -324,7 +324,7 @@ PHP_FUNCTION(ldap_connect)
 #endif
 
        if (LDAPG(max_links) != -1 && LDAPG(num_links) >= LDAPG(max_links)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", LDAPG(num_links));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%pd)", LDAPG(num_links));
                RETURN_FALSE;
        }
 
index 63670d517734d0cb36ac8a0516b84b804cb30ca2..bb0ff70ca1431f1d28823c832ebba7a26ebf06b7 100644 (file)
@@ -254,7 +254,7 @@ const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_i
        } 
 
        if (n > (PG(max_input_vars) * 2)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %pd. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars));
                goto out;
        }
 
index b0596c396a9d2b2b6d9dd1feb0189aa2324a7517..1df53349a8baf230efa52c67072b3232114c1ad4 100644 (file)
@@ -662,7 +662,7 @@ PHP_RSHUTDOWN_FUNCTION(mysql)
 
        if (MySG(trace_mode)) {
                if (MySG(result_allocated)){
-                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, "%lu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
+                       php_error_docref("function.mysql-free-result" TSRMLS_CC, E_WARNING, "%pu result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query()", MySG(result_allocated));
                }
        }
 
@@ -686,9 +686,9 @@ PHP_MINFO_FUNCTION(mysql)
 
        php_info_print_table_start();
        php_info_print_table_header(2, "MySQL Support", "enabled");
-       snprintf(buf, sizeof(buf), "%ld", MySG(num_persistent));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MySG(num_persistent));
        php_info_print_table_row(2, "Active Persistent Links", buf);
-       snprintf(buf, sizeof(buf), "%ld", MySG(num_links));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MySG(num_links));
        php_info_print_table_row(2, "Active Links", buf);
        php_info_print_table_row(2, "Client API version", mysql_get_client_info());
 #if !defined (PHP_WIN32) && !defined (NETWARE) && !defined(MYSQL_USE_MYSQLND)
@@ -821,7 +821,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 #endif
                hashed_details = STR_ALLOC(sizeof("mysql____") + (host_and_port? strlen(host_and_port) : 0)
                                + (user? strlen(user) : 0) + (passwd? strlen(passwd) : 0) + MAX_LENGTH_OF_ZEND_INT - 1, 0);
-               hashed_details->len = snprintf(hashed_details->val, hashed_details->len + 1, "mysql_%s_%s_%s_%ld", SAFE_STRING(host_and_port), SAFE_STRING(user), SAFE_STRING(passwd), client_flags);
+               hashed_details->len = snprintf(hashed_details->val, hashed_details->len + 1, "mysql_%s_%s_%s_" ZEND_INT_FMT, SAFE_STRING(host_and_port), SAFE_STRING(user), SAFE_STRING(passwd), client_flags);
        }
 
        /* We cannot use mysql_port anymore in windows, need to use
@@ -862,13 +862,13 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        zval new_le;
 
                        if (MySG(max_links) != -1 && MySG(num_links) >= MySG(max_links)) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%pd)", MySG(num_links));
                                STR_RELEASE(hashed_details);
                                MYSQL_DO_CONNECT_RETURN_FALSE();
                        }
 
                        if (MySG(max_persistent) != -1 && MySG(num_persistent) >= MySG(max_persistent)) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MySG(num_persistent));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%pd)", MySG(num_persistent));
                                STR_RELEASE(hashed_details);
                                MYSQL_DO_CONNECT_RETURN_FALSE();
                        }
@@ -997,7 +997,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
 
                if (MySG(max_links) != -1 && MySG(num_links) >= MySG(max_links)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links));
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%pd)", MySG(num_links));
                        STR_RELEASE(hashed_details);
                        MYSQL_DO_CONNECT_RETURN_FALSE();
                }
@@ -1947,7 +1947,7 @@ Q: String or long first?
        ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
        if (row < 0 || row >= (int)mysql_num_rows(mysql_result)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on MySQL result index %ld", row, Z_RES_P(result)->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %pd on MySQL result index %pd", row, Z_RES_P(result)->handle);
                RETURN_FALSE;
        }
        mysql_data_seek(mysql_result, row);
@@ -1977,7 +1977,7 @@ Q: String or long first?
                                                i++;
                                        }
                                        if (!tmp_field) { /* no match found */
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s%s%s not found in MySQL result index %ld",
+                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s%s%s not found in MySQL result index %pd",
                                                                        (table_name?table_name:""), (table_name?".":""), field_name, Z_RES_P(result)->handle);
                                                efree(field_name);
                                                if (table_name) {
@@ -2281,7 +2281,7 @@ PHP_FUNCTION(mysql_data_seek)
        ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
        if (offset < 0 || offset >= (int)mysql_num_rows(mysql_result)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset %ld is invalid for MySQL result index %ld (or the query data is unbuffered)", offset, Z_RES_P(result)->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset %pd is invalid for MySQL result index %pd (or the query data is unbuffered)", offset, Z_RES_P(result)->handle);
                RETURN_FALSE;
        }
        mysql_data_seek(mysql_result, offset);
@@ -2454,7 +2454,7 @@ PHP_FUNCTION(mysql_field_seek)
        ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
        if (offset < 0 || offset >= (int)mysql_num_fields(mysql_result)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %ld is invalid for MySQL result index %ld", offset, Z_RES_P(result)->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %pd is invalid for MySQL result index %pd", offset, Z_RES_P(result)->handle);
                RETURN_FALSE;
        }
        mysql_field_seek(mysql_result, offset);
@@ -2486,7 +2486,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
        ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
 
        if (field < 0 || field >= (int)mysql_num_fields(mysql_result)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %ld is invalid for MySQL result index %ld", field, Z_RES_P(result)->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %pd is invalid for MySQL result index %pd", field, Z_RES_P(result)->handle);
                RETURN_FALSE;
        }
        mysql_field_seek(mysql_result, field);
index 79d340b2a66a9c5ea58134d0441fd612caa5e146..b270cf27484c0ef66dec296ca1a837cabb01af11 100644 (file)
@@ -976,11 +976,11 @@ PHP_MINFO_FUNCTION(mysqli)
        php_info_print_table_start();
        php_info_print_table_header(2, "MysqlI Support", "enabled");
        php_info_print_table_row(2, "Client API library version", mysql_get_client_info());
-       snprintf(buf, sizeof(buf), "%ld", MyG(num_active_persistent));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MyG(num_active_persistent));
        php_info_print_table_row(2, "Active Persistent Links", buf);
-       snprintf(buf, sizeof(buf), "%ld", MyG(num_inactive_persistent));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MyG(num_inactive_persistent));
        php_info_print_table_row(2, "Inactive Persistent Links", buf);
-       snprintf(buf, sizeof(buf), "%ld", MyG(num_links));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MyG(num_links));
        php_info_print_table_row(2, "Active Links", buf);
 #if !defined(MYSQLI_USE_MYSQLND)
        php_info_print_table_row(2, "Client API header version", MYSQL_SERVER_VERSION);
index 82cb1baf26e5fe505170c2dbcc3fdc933307cf26..6b010f0b1608660a2684f041e4ff2617146826c2 100644 (file)
@@ -200,7 +200,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
                }
        }
        if (MyG(max_links) != -1 && MyG(num_links) >= MyG(max_links)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MyG(num_links));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%pd)", MyG(num_links));
                goto err;
        }
 
@@ -1086,7 +1086,7 @@ PHP_FUNCTION(mysqli_begin_transaction)
        }
        MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
        if (flags < 0) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for parameter flags (%ld)", flags);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid value for parameter flags (%pd)", flags);
                err = TRUE;
        }
        if (!name_len) {
index 95747a7e3ae3c66f70787988daeb17e6f23c25a3..76bf1e256f7d5637b611d73c085e945e798ff1fa 100644 (file)
@@ -138,11 +138,11 @@ PHP_MINFO_FUNCTION(mysqlnd)
 #else
                                                                "not supported");
 #endif
-       snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_cmd_buffer_size));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MYSQLND_G(net_cmd_buffer_size));
        php_info_print_table_row(2, "Command buffer size", buf);
-       snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_read_buffer_size));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MYSQLND_G(net_read_buffer_size));
        php_info_print_table_row(2, "Read buffer size", buf);
-       snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_read_timeout));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, MYSQLND_G(net_read_timeout));
        php_info_print_table_row(2, "Read timeout", buf);
        php_info_print_table_row(2, "Collecting statistics", MYSQLND_G(collect_statistics)? "Yes":"No");
        php_info_print_table_row(2, "Collecting memory statistics", MYSQLND_G(collect_memory_statistics)? "Yes":"No");
index d0c7138ab2708c53d4028d2300302f75899c3df9..9747be9e0c329c5b79664e286676387dbcc2e960 100644 (file)
@@ -841,9 +841,9 @@ PHP_MINFO_FUNCTION(odbc)
 
        php_info_print_table_start();
        php_info_print_table_header(2, "ODBC Support", "enabled");
-       snprintf(buf, sizeof(buf), "%pd", ODBCG(num_persistent));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, ODBCG(num_persistent));
        php_info_print_table_row(2, "Active Persistent Links", buf);
-       snprintf(buf, sizeof(buf), "%pd", ODBCG(num_links));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, ODBCG(num_links));
        php_info_print_table_row(2, "Active Links", buf);
        php_info_print_table_row(2, "ODBC library", PHP_ODBC_TYPE);
 #ifndef PHP_WIN32
index c6720419fa08a0516a11efc139f56abbff4e3d4a..db6f985b774f74848f751a04cf1c33737490e94d 100644 (file)
@@ -407,11 +407,11 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
                        char buf[32];
                        php_info_print_table_row(2, "Startup", "OK");
                        php_info_print_table_row(2, "Shared memory model", zend_accel_get_shared_model());
-                       snprintf(buf, sizeof(buf), ZEND_UINT_FMT, (zend_uint_t)ZCSG(hits));
+                       snprintf(buf, sizeof(buf), "%pd", (zend_uint_t)ZCSG(hits));
                        php_info_print_table_row(2, "Cache hits", buf);
                        snprintf(buf, sizeof(buf), "%pd", ZSMMG(memory_exhausted)?ZCSG(misses):ZCSG(misses)-ZCSG(blacklist_misses));
                        php_info_print_table_row(2, "Cache misses", buf);
-                       snprintf(buf, sizeof(buf), "%ld", ZCG(accel_directives).memory_consumption-zend_shared_alloc_get_free_memory()-ZSMMG(wasted_shared_memory));
+                       snprintf(buf, sizeof(buf), ZEND_INT_FMT, ZCG(accel_directives).memory_consumption-zend_shared_alloc_get_free_memory()-ZSMMG(wasted_shared_memory));
                        php_info_print_table_row(2, "Used memory", buf);
                        snprintf(buf, sizeof(buf), "%pd", zend_shared_alloc_get_free_memory());
                        php_info_print_table_row(2, "Free memory", buf);
index 8402491f3c419e5dac098ef23b2e71ba04579de3..8c85a38575b37085cb34130c1ada05ec0d87ff7c 100644 (file)
@@ -2125,7 +2125,7 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
                        if (key) {
                                php_stream_printf(out TSRMLS_CC, "Key: Name: [%d] %.*s\n", key->len, key->len, key->val);
                        } else {
-                               php_stream_printf(out TSRMLS_CC, "Key: Position #%ld:\n", num);
+                               php_stream_printf(out TSRMLS_CC, "Key: Position #%pd:\n", num);
                        }
 
                        php_stream_printf(out TSRMLS_CC, "paramno=%ld\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n",
index 809ee34f7c75f0ed61517d24c5d2cdc05b86719d..b79a098569e02fe804c46d00ca9cd3bd2991c42f 100644 (file)
@@ -1204,13 +1204,13 @@ static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
 
        /* support both full connection string & connection string + login and/or password */
        if (dbh->username && dbh->password) {
-               spprintf(&conn_str, 0, "%s user=%s password=%s connect_timeout=%ld", dbh->data_source, dbh->username, tmp_pass, connect_timeout);
+               spprintf(&conn_str, 0, "%s user=%s password=%s connect_timeout=%pd", dbh->data_source, dbh->username, tmp_pass, connect_timeout);
        } else if (dbh->username) {
-               spprintf(&conn_str, 0, "%s user=%s connect_timeout=%ld", dbh->data_source, dbh->username, connect_timeout);
+               spprintf(&conn_str, 0, "%s user=%s connect_timeout=%pd", dbh->data_source, dbh->username, connect_timeout);
        } else if (dbh->password) {
-               spprintf(&conn_str, 0, "%s password=%s connect_timeout=%ld", dbh->data_source, tmp_pass, connect_timeout);
+               spprintf(&conn_str, 0, "%s password=%s connect_timeout=%pd", dbh->data_source, tmp_pass, connect_timeout);
        } else {
-               spprintf(&conn_str, 0, "%s connect_timeout=%ld", (char *) dbh->data_source, connect_timeout);
+               spprintf(&conn_str, 0, "%s connect_timeout=%pd", (char *) dbh->data_source, connect_timeout);
        }
 
        H->server = PQconnectdb(conn_str);
index d1fc89d69ee199175f0bc3a50e5d25e2366bfbe8..5be85aea1c601caa831bd2e38cc8f569d7e874fd 100644 (file)
@@ -1254,9 +1254,9 @@ PHP_MINFO_FUNCTION(pgsql)
        php_info_print_table_row(2, "SSL support", "disabled");
 #endif
 #endif /* HAVE_PG_CONFIG_H */
-       snprintf(buf, sizeof(buf), "%pd", PGG(num_persistent));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, PGG(num_persistent));
        php_info_print_table_row(2, "Active Persistent Links", buf);
-       snprintf(buf, sizeof(buf), "%pd", PGG(num_links));
+       snprintf(buf, sizeof(buf), ZEND_INT_FMT, PGG(num_links));
        php_info_print_table_row(2, "Active Links", buf);
        php_info_print_table_end();
 
@@ -3482,11 +3482,11 @@ PHP_FUNCTION(pg_lo_write)
 
        if (argc > 2) {
                if (z_len > str_len) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %ld", str_len, z_len);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %pd", str_len, z_len);
                        RETURN_FALSE;
                }
                if (z_len < 0) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %ld was specified", z_len);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %pd was specified", z_len);
                        RETURN_FALSE;
                }
                len = z_len;
@@ -5708,7 +5708,7 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free TSRMLS_DC)
 /* {{{ php_pgsql_convert
  * check and convert array values (fieldname=>vlaue pair) for sql
  */
-PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, ulong opt TSRMLS_DC) 
+PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, php_uint_t opt TSRMLS_DC) 
 {
        zend_string *field = NULL;
        php_uint_t num_idx = -1;
@@ -6382,7 +6382,7 @@ PHP_FUNCTION(pg_convert)
 }
 /* }}} */
 
-static int do_exec(smart_str *querystr, int expect, PGconn *pg_link, ulong opt TSRMLS_DC) /* {{{ */
+static int do_exec(smart_str *querystr, int expect, PGconn *pg_link, php_uint_t opt TSRMLS_DC) /* {{{ */
 {
        if (opt & PGSQL_DML_ASYNC) {
                if (PQsendQuery(pg_link, querystr->s->val)) {
@@ -6641,7 +6641,7 @@ PHP_FUNCTION(pg_insert)
 }
 /* }}} */
 
-static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, HashTable *ht, int where_cond, const char *pad, int pad_len, ulong opt TSRMLS_DC) /* {{{ */
+static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, HashTable *ht, int where_cond, const char *pad, int pad_len, php_uint_t opt TSRMLS_DC) /* {{{ */
 {
        char *tmp;
        char buf[256];
index 0e2eca918860140695e9a0e6c255901f5fe6287d..e553ca0e1a4659030261ea9664017ecede0018a9 100644 (file)
@@ -262,7 +262,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D);
        ZEND_HASH_FOREACH_KEY(_ht, num_key, key) {                                              \
                if (key == NULL) {                                                                                      \
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE,                              \
-                                       "Skipping numeric key %ld", num_key);                   \
+                                       "Skipping numeric key %pd", num_key);                   \
                        continue;                                                                                               \
                }                                                                                                                       \
                if ((struc = php_get_session_var(key TSRMLS_CC))) {                     \
index 8632ba493cd9d1b1b199635287faa4b69a73066a..d6ffe8b63b719ee91d10a5f20ecc65c57a43f12c 100644 (file)
@@ -305,7 +305,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */
        }
 
        /* maximum 15+19+19+10 bytes */
-       spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ? remote_addr : "", tv.tv_sec, (php_int_t)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);
+       spprintf(&buf, 0, "%.15s%ld" ZEND_INT_FMT "%0.8F", remote_addr ? remote_addr : "", tv.tv_sec, (php_int_t)tv.tv_usec, php_combined_lcg(TSRMLS_C) * 10);
 
        switch (PS(hash_func)) {
                case PS_HASH_FUNC_MD5:
@@ -1178,7 +1178,7 @@ CACHE_LIMITER_FUNC(public) /* {{{ */
        strcpy_gmt(buf + sizeof(EXPIRES) - 1, &now);
        ADD_HEADER(buf);
 
-       snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=%ld", PS(cache_expire) * 60); /* SAFE */
+       snprintf(buf, sizeof(buf) , "Cache-Control: public, max-age=" ZEND_INT_FMT, PS(cache_expire) * 60); /* SAFE */
        ADD_HEADER(buf);
 
        last_modified(TSRMLS_C);
@@ -1189,7 +1189,7 @@ CACHE_LIMITER_FUNC(private_no_expire) /* {{{ */
 {
        char buf[MAX_STR + 1];
 
-       snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
+       snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=" ZEND_INT_FMT ", pre-check=" ZEND_INT_FMT, PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
        ADD_HEADER(buf);
 
        last_modified(TSRMLS_C);
index 97b619d359a1ffea7f49931fea3ea20b5f26a166..149d9989a4350da934b6d7012d3073127847f937 100644 (file)
@@ -2901,7 +2901,7 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
                ta = php_localtime_r(&timestamp, &tmbuf);
                /*ta = php_gmtime_r(&timestamp, &tmbuf);*/
                if (!ta) {
-                       soap_error1(E_ERROR, "Encoding: Invalid timestamp %ld", Z_IVAL_P(data));
+                       soap_error1(E_ERROR, "Encoding: Invalid timestamp %pd", Z_IVAL_P(data));
                }
 
                buf = (char *) emalloc(buf_len);
index 0935ce36adbf2587eecbcb80556671296e7a0196..21c62fa356369504476a807db80c6b21ba42e26b 100644 (file)
@@ -631,7 +631,7 @@ try_again:
                                        unsigned char hash[16];
 
                                        PHP_MD5Init(&md5ctx);
-                                       snprintf(cnonce, sizeof(cnonce), "%ld", php_rand(TSRMLS_C));
+                                       snprintf(cnonce, sizeof(cnonce), ZEND_INT_FMT, php_rand(TSRMLS_C));
                                        PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, strlen(cnonce));
                                        PHP_MD5Final(hash, &md5ctx);
                                        make_digest(cnonce, hash);
index 5af02c3ad43733360956bcff09629b797451574a..f0bb2f1019facd0d76f13f0e37c0c2c4b7837609 100644 (file)
@@ -956,7 +956,7 @@ PHP_METHOD(SoapFault, __toString)
 
        zval_ptr_dtor(&fci.function_name);
 
-       str = strpprintf(0, "SoapFault exception: [%s] %s in %s:%ld\nStack trace:\n%s",
+       str = strpprintf(0, "SoapFault exception: [%s] %s in %s:%pd\nStack trace:\n%s",
                       Z_STRVAL_P(faultcode), Z_STRVAL_P(faultstring), Z_STRVAL_P(file), Z_IVAL_P(line),
                       Z_STRSIZE(trace) ? Z_STRVAL(trace) : "#0 {main}\n");
 
index 7f616232b89e2dc3ffe8af329545ebe172bd28ab..35cc544e1a3c65c700f4acf32c2f122bff36df33 100644 (file)
@@ -1260,7 +1260,7 @@ static void from_zval_write_ifindex(const zval *zv, char *uinteger, ser_context
        if (Z_TYPE_P(zv) == IS_INT) {
                if (Z_IVAL_P(zv) < 0 || Z_IVAL_P(zv) > UINT_MAX) { /* allow 0 (unspecified interface) */
                        do_from_zval_err(ctx, "the interface index cannot be negative or "
-                                       "larger than %u; given %ld", UINT_MAX, Z_IVAL_P(zv));
+                                       "larger than %u; given %pd", UINT_MAX, Z_IVAL_P(zv));
                } else {
                        ret = (unsigned)Z_IVAL_P(zv);
                }
index 0fc3dbb2cf32c09afea8e94dce91f25727a155a4..9188825e53adecbed9b611e0df681e3b1c6d9250 100644 (file)
@@ -93,7 +93,7 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out TSRMLS_DC)
                if (Z_IVAL_P(val) < 0 || Z_IVAL_P(val) > UINT_MAX) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING,
                                "the interface index cannot be negative or larger than %u;"
-                               " given %ld", UINT_MAX, Z_IVAL_P(val));
+                               " given %pd", UINT_MAX, Z_IVAL_P(val));
                        ret = FAILURE;
                } else {
                        *out = Z_IVAL_P(val);
index 07740cdfe5537a8c28a8ad08faead2bcee2fa961..dc45cb78425fe9f35377c7dbd426d1f418cd5b8e 100644 (file)
@@ -71,7 +71,7 @@ inline ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)
 #define LONG_CHECK_VALID_INT(l) \
        do { \
                if ((l) < INT_MIN && (l) > INT_MAX) { \
-                       php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The value %ld does not fit inside " \
+                       php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The value %pd does not fit inside " \
                                        "the boundaries of a native integer", (l)); \
                        return; \
                } \
index de8cff4ab05ef5a91bc6e20eead82648f84271fa..c4b31ecd0066741c48b8b9c110c157b764d3eea1 100644 (file)
@@ -2335,7 +2335,7 @@ SPL_METHOD(SplTempFileObject, __construct)
                intern->file_name = "php://memory";
                intern->file_name_len = 12;
        } else if (ZEND_NUM_ARGS()) {
-               intern->file_name_len = slprintf(tmp_fname, sizeof(tmp_fname), "php://temp/maxmemory:%ld", max_memory);
+               intern->file_name_len = slprintf(tmp_fname, sizeof(tmp_fname), "php://temp/maxmemory:%pd", max_memory);
                intern->file_name = tmp_fname;
        } else {
                intern->file_name = "php://temp";
index 18a2b9699e5a4b64781f61129fcbd6493b0be0cd..26f6f5a651b0102780b321d04cdfee9601775d2b 100644 (file)
@@ -906,7 +906,7 @@ SPL_METHOD(SplObjectStorage, unserialize)
 
 outexcept:
        PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
-       zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Error at offset %ld of %d bytes", (php_int_t)((char*)p - buf), buf_len);
+       zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Error at offset %pd of %d bytes", (php_int_t)((char*)p - buf), buf_len);
        return;
 
 } /* }}} */
index 8f21a7735c01fed5ae49594dd7c3eb72ddfd7c44..31421fc9d4002462bba4d32359399a3405df6d2c 100644 (file)
@@ -331,7 +331,7 @@ PHP_FUNCTION(assert_options)
                break;
 
        default:
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %ld", what);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %pd", what);
                break;
        }
 
index bf79a391cf1498dba17a7feb4b8cdbe1f321c54a..5269b9827b1f119c18ec5f2f13426b5a95316c40 100644 (file)
@@ -273,7 +273,7 @@ PHP_FUNCTION(closedir)
        FETCH_DIRP();
 
        if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a valid Directory resource", dirp->res->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%pd is not a valid Directory resource", dirp->res->handle);
                RETURN_FALSE;
        }
 
@@ -387,7 +387,7 @@ PHP_FUNCTION(rewinddir)
        FETCH_DIRP();
 
        if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a valid Directory resource", dirp->res->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%pd is not a valid Directory resource", dirp->res->handle);
                RETURN_FALSE;
        }
 
@@ -406,7 +406,7 @@ PHP_NAMED_FUNCTION(php_if_readdir)
        FETCH_DIRP();
 
        if (!(dirp->flags & PHP_STREAM_FLAG_IS_DIR)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a valid Directory resource", dirp->res->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%pd is not a valid Directory resource", dirp->res->handle);
                RETURN_FALSE;
        }
 
index 1b599b84a01b867d9ed1d428348fececcf83e5e6..835180ee486df4d452ea161ec66a5f0fe3a67b4f 100644 (file)
@@ -558,7 +558,7 @@ PHP_FUNCTION(file_get_contents)
        }
 
        if (maxlen > INT_MAX) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "maxlen truncated from %ld to %d bytes", maxlen, INT_MAX);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "maxlen truncated from %pd to %d bytes", maxlen, INT_MAX);
                maxlen = INT_MAX;
        }
        if ((contents = php_stream_copy_to_mem(stream, maxlen, 0)) != NULL) {
@@ -651,7 +651,7 @@ PHP_FUNCTION(file_put_contents)
                        if (Z_STRSIZE_P(data)) {
                                numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRSIZE_P(data));
                                if (numbytes != Z_STRSIZE_P(data)) {
-                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %ld of %zd bytes written, possibly out of free disk space", numbytes, Z_STRSIZE_P(data));
+                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %pl of %zd bytes written, possibly out of free disk space", numbytes, Z_STRSIZE_P(data));
                                        numbytes = -1;
                                }
                        }
@@ -686,7 +686,7 @@ PHP_FUNCTION(file_put_contents)
                                if (zend_std_cast_object_tostring(data, &out, IS_STRING TSRMLS_CC) == SUCCESS) {
                                        numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRSIZE(out));
                                        if (numbytes != Z_STRSIZE(out)) {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %ld of %zd bytes written, possibly out of free disk space", numbytes, Z_STRSIZE(out));
+                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only %pd of %zd bytes written, possibly out of free disk space", numbytes, Z_STRSIZE(out));
                                                numbytes = -1;
                                        }
                                        zval_dtor(&out);
@@ -903,7 +903,7 @@ PHPAPI PHP_FUNCTION(fclose)
        PHP_STREAM_TO_ZVAL(stream, arg1);
 
        if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a valid stream resource", stream->res->handle);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%pd is not a valid stream resource", stream->res->handle);
                RETURN_FALSE;
        }
 
index ae7f28b7da468d719955112139c8f0e8e65b9963..79665a4f9904e6ac385aafdfeb285cc719d96c71 100644 (file)
@@ -531,10 +531,10 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pa
                        (tmpzval = php_stream_context_get_option(context, "ftp", "resume_pos")) != NULL &&
                        Z_TYPE_P(tmpzval) == IS_INT &&
                        Z_IVAL_P(tmpzval) > 0) {
-                       php_stream_printf(stream TSRMLS_CC, "REST %ld\r\n", Z_IVAL_P(tmpzval));
+                       php_stream_printf(stream TSRMLS_CC, "REST %pd\r\n", Z_IVAL_P(tmpzval));
                        result = GET_FTP_RESULT(stream);
                        if (result < 300 || result > 399) {                     
-                               php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Unable to resume from offset %ld", Z_IVAL_P(tmpzval));
+                               php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Unable to resume from offset %pd", Z_IVAL_P(tmpzval));
                                goto errexit;
                        }
                }
index d5eb78e4170d7d8aae1d5b662374f89a4ac18a66..58c6d1d8f47800a3aa9f627a2ad1c3f3d2d982a8 100644 (file)
@@ -109,7 +109,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
                                char *ekey;
                                int ekey_len;
                                /* Is an integer key */
-                               ekey_len = spprintf(&ekey, 0, "%ld", idx);
+                               ekey_len = spprintf(&ekey, 0, "%pd", idx);
                                newprefix_len = key_prefix_len + num_prefix_len + ekey_len + key_suffix_len + 3 /* %5B */;
                                newprefix = emalloc(newprefix_len + 1);
                                p = newprefix;
@@ -168,7 +168,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
                                if (num_prefix) {
                                        smart_str_appendl(formstr, num_prefix, num_prefix_len);
                                }
-                               ekey_len = spprintf(&ekey, 0, "%ld", idx);
+                               ekey_len = spprintf(&ekey, 0, "%pd", idx);
                                smart_str_appendl(formstr, ekey, ekey_len);
                                efree(ekey);
                        }
@@ -190,7 +190,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
                                        {
                                                char *ekey;
                                                int ekey_len;
-                                               ekey_len = spprintf(&ekey, 0, "%ld", Z_IVAL_P(zdata));
+                                               ekey_len = spprintf(&ekey, 0, "%pd", Z_IVAL_P(zdata));
                                                smart_str_appendl(formstr, ekey, ekey_len);
                                                efree(ekey);
                                        }
index 07c183df8e30934d2cf552b4963dbfd72776f7f5..92ee07a9253f4dd0b12c96e7bc0d6f1599d33428 100644 (file)
@@ -219,7 +219,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
                                        php_info_print(string_key->val);
                                }
                        } else {
-                               php_info_printf("%ld", num_key);
+                               php_info_printf("%pd", num_key);
                        }
                        php_info_print("\"]");
                        if (!sapi_module.phpinfo_as_text) {
index 1bd2fa9016cfe1f264b5905f01b1591f92036d00..0ce10bb02a31f3e9b6bcc23c6e4bacc02efdf7fb 100644 (file)
@@ -285,9 +285,9 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
                f = php_basename(tmp, strlen(tmp), NULL, 0 TSRMLS_CC);
 
                if (headers != NULL) {
-                       spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\n%s", php_getuid(TSRMLS_C), f->val, headers);
+                       spprintf(&hdr, 0, "X-PHP-Originating-Script: " ZEND_INT_FMT ":%s\n%s", php_getuid(TSRMLS_C), f->val, headers);
                } else {
-                       spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s", php_getuid(TSRMLS_C), f->val);
+                       spprintf(&hdr, 0, "X-PHP-Originating-Script: " ZEND_INT_FMT ":%s", php_getuid(TSRMLS_C), f->val);
                }
                STR_RELEASE(f);
        }
index 903b3a7be1fcb0a2c90504fc548afd1174f78533..9e960f3d55ca6e1d8ddbc4e9890a3f5a21747a94 100644 (file)
@@ -534,7 +534,7 @@ PHP_FUNCTION(proc_open)
 #else
                        descriptors[ndesc].childend = dup(fd);
                        if (descriptors[ndesc].childend < 0) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %ld - %s", nindex, strerror(errno));
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %pd - %s", nindex, strerror(errno));
                                goto exit_fail;
                        }
 #endif
index baa28a14b1b120a2c021e95058438e00f395c5d3..b02a1386c449d2485b777e700e50b15c9799aec6 100644 (file)
@@ -423,13 +423,13 @@ PHP_FUNCTION(stream_get_contents)
 
                if (seek_res != 0) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING,
-                               "Failed to seek to position %ld in the stream", desiredpos);
+                               "Failed to seek to position %pd in the stream", desiredpos);
                        RETURN_FALSE;
                }
        }
 
        if (maxlen > INT_MAX) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "maxlen truncated from %ld to %d bytes", maxlen, INT_MAX);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "maxlen truncated from %pd to %d bytes", maxlen, INT_MAX);
                maxlen = INT_MAX;
        }
        if ((contents = php_stream_copy_to_mem(stream, maxlen, 0))) {
index 8ed49e6efc71eb432781e9e0146d6ec2c4979e82..fc865b64a7e90c6e433d7a361e438bec0b8da60a 100644 (file)
@@ -1,4 +1,5 @@
 /* Generated by re2c 0.13.5 */
+#line 1 "ext/standard/url_scanner_ex.re"
 /*
   +----------------------------------------------------------------------+
   | PHP Version 5                                                        |
@@ -99,6 +100,7 @@ PHP_INI_BEGIN()
        STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
 PHP_INI_END()
 
+#line 107 "ext/standard/url_scanner_ex.re"
 
 
 #define YYFILL(n) goto done
@@ -117,6 +119,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
 
 scan:
 
+#line 123 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -162,13 +165,19 @@ scan:
        if (yych <= '9') goto yy6;
        if (yych >= ';') goto yy4;
        ++YYCURSOR;
+#line 125 "ext/standard/url_scanner_ex.re"
        { smart_str_append(dest, url); return; }
+#line 171 "ext/standard/url_scanner_ex.c"
 yy4:
        ++YYCURSOR;
+#line 126 "ext/standard/url_scanner_ex.re"
        { sep = separator; goto scan; }
+#line 176 "ext/standard/url_scanner_ex.c"
 yy6:
        ++YYCURSOR;
+#line 127 "ext/standard/url_scanner_ex.re"
        { bash = p - 1; goto done; }
+#line 181 "ext/standard/url_scanner_ex.c"
 yy8:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -176,8 +185,11 @@ yy8:
        if (yybm[0+yych] & 128) {
                goto yy8;
        }
+#line 128 "ext/standard/url_scanner_ex.re"
        { goto scan; }
+#line 191 "ext/standard/url_scanner_ex.c"
 }
+#line 129 "ext/standard/url_scanner_ex.re"
 
 done:
        
@@ -362,6 +374,7 @@ state_plain_begin:
 state_plain:
        start = YYCURSOR;
 
+#line 378 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -404,7 +417,9 @@ state_plain:
                goto yy15;
        }
        ++YYCURSOR;
+#line 313 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
+#line 423 "ext/standard/url_scanner_ex.c"
 yy15:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -412,13 +427,17 @@ yy15:
        if (yybm[0+yych] & 128) {
                goto yy15;
        }
+#line 314 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); goto state_plain; }
+#line 433 "ext/standard/url_scanner_ex.c"
 }
+#line 315 "ext/standard/url_scanner_ex.re"
 
 
 state_tag:     
        start = YYCURSOR;
 
+#line 441 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -469,10 +488,14 @@ yy20:
        yych = *YYCURSOR;
        goto yy25;
 yy21:
+#line 320 "ext/standard/url_scanner_ex.re"
        { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
+#line 494 "ext/standard/url_scanner_ex.c"
 yy22:
        ++YYCURSOR;
+#line 321 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); goto state_plain_begin; }
+#line 499 "ext/standard/url_scanner_ex.c"
 yy24:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -483,6 +506,7 @@ yy25:
        }
        goto yy21;
 }
+#line 322 "ext/standard/url_scanner_ex.re"
 
 
 state_next_arg_begin:
@@ -491,6 +515,7 @@ state_next_arg_begin:
 state_next_arg:
        start = YYCURSOR;
 
+#line 519 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -555,20 +580,28 @@ yy28:
        ++YYCURSOR;
        if ((yych = *YYCURSOR) == '>') goto yy39;
 yy29:
+#line 333 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); goto state_plain_begin; }
+#line 586 "ext/standard/url_scanner_ex.c"
 yy30:
        ++YYCURSOR;
 yy31:
+#line 330 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
+#line 592 "ext/standard/url_scanner_ex.c"
 yy32:
        ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy38;
 yy33:
+#line 331 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); goto state_next_arg; }
+#line 600 "ext/standard/url_scanner_ex.c"
 yy34:
        ++YYCURSOR;
+#line 332 "ext/standard/url_scanner_ex.re"
        { --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
+#line 605 "ext/standard/url_scanner_ex.c"
 yy36:
        yych = *++YYCURSOR;
        goto yy29;
@@ -586,11 +619,13 @@ yy39:
        yych = *YYCURSOR;
        goto yy31;
 }
+#line 334 "ext/standard/url_scanner_ex.re"
 
 
 state_arg:
        start = YYCURSOR;
 
+#line 629 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -638,10 +673,14 @@ yy42:
        yych = *YYCURSOR;
        goto yy47;
 yy43:
+#line 339 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
+#line 679 "ext/standard/url_scanner_ex.c"
 yy44:
        ++YYCURSOR;
+#line 340 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
+#line 684 "ext/standard/url_scanner_ex.c"
 yy46:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -652,11 +691,13 @@ yy47:
        }
        goto yy43;
 }
+#line 341 "ext/standard/url_scanner_ex.re"
 
 
 state_before_val:
        start = YYCURSOR;
 
+#line 701 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -703,13 +744,17 @@ yy50:
        if (yych == ' ') goto yy57;
        if (yych == '=') goto yy55;
 yy51:
+#line 347 "ext/standard/url_scanner_ex.re"
        { --YYCURSOR; goto state_next_arg_begin; }
+#line 750 "ext/standard/url_scanner_ex.c"
 yy52:
        ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy56;
 yy53:
+#line 346 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
+#line 758 "ext/standard/url_scanner_ex.c"
 yy54:
        yych = *++YYCURSOR;
        goto yy51;
@@ -731,12 +776,14 @@ yy57:
        YYCURSOR = YYMARKER;
        goto yy51;
 }
+#line 348 "ext/standard/url_scanner_ex.re"
 
 
 
 state_val:
        start = YYCURSOR;
 
+#line 787 "ext/standard/url_scanner_ex.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -797,7 +844,9 @@ state_val:
        yych = *(YYMARKER = ++YYCURSOR);
        if (yych != '>') goto yy76;
 yy63:
+#line 357 "ext/standard/url_scanner_ex.re"
        { passthru(STD_ARGS); goto state_next_arg_begin; }
+#line 850 "ext/standard/url_scanner_ex.c"
 yy64:
        yych = *(YYMARKER = ++YYCURSOR);
        if (yych == '>') goto yy63;
@@ -807,7 +856,9 @@ yy65:
        yych = *YYCURSOR;
        goto yy69;
 yy66:
+#line 356 "ext/standard/url_scanner_ex.re"
        { handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; }
+#line 862 "ext/standard/url_scanner_ex.c"
 yy67:
        yych = *++YYCURSOR;
        goto yy63;
@@ -834,7 +885,9 @@ yy72:
        goto yy63;
 yy73:
        ++YYCURSOR;
+#line 355 "ext/standard/url_scanner_ex.re"
        { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
+#line 891 "ext/standard/url_scanner_ex.c"
 yy75:
        ++YYCURSOR;
        if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -845,8 +898,11 @@ yy76:
        }
        if (yych >= '>') goto yy72;
        ++YYCURSOR;
+#line 354 "ext/standard/url_scanner_ex.re"
        { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
+#line 904 "ext/standard/url_scanner_ex.c"
 }
+#line 358 "ext/standard/url_scanner_ex.re"
 
 
 stop:
index 2c94942b94502a2bc2b409337108df7b68940921..02c1cc4bd0675c34c1d4a79c105357cbcd43ff27 100644 (file)
@@ -191,7 +191,7 @@ again:
                        break;
                case IS_RESOURCE: {
                        const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(struc) TSRMLS_CC);
-                       php_printf("%sresource(%ld) of type (%s)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name : "Unknown");
+                       php_printf("%sresource(%pd) of type (%s)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name : "Unknown");
                        break;
                }
                case IS_REFERENCE:
index 810f3c8f8c90b298f673814a2d6d2100b74da192..b4be2cc26daba0d977b1a0c3958b0db37f82412a 100644 (file)
@@ -1,4 +1,5 @@
 /* Generated by re2c 0.13.5 */
+#line 1 "ext/standard/var_unserializer.re"
 /*
   +----------------------------------------------------------------------+
   | PHP Version 5                                                        |
@@ -232,6 +233,7 @@ static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t
 #define YYMARKER marker
 
 
+#line 241 "ext/standard/var_unserializer.re"
 
 
 
@@ -385,7 +387,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
        (*p) += 2;
 
        if (datalen < 0 || (*p) + datalen >= max) {
-               zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %ld present", datalen, (php_int_t)(max - (*p)));
+               zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %pd present", datalen, (php_int_t)(max - (*p)));
                return 0;
        }
 
@@ -479,6 +481,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
        start = cursor;
 
 
+#line 485 "ext/standard/var_unserializer.c"
 {
        YYCTYPE yych;
        static const unsigned char yybm[] = {
@@ -538,7 +541,9 @@ yy2:
        yych = *(YYMARKER = ++YYCURSOR);
        if (yych == ':') goto yy95;
 yy3:
+#line 826 "ext/standard/var_unserializer.re"
        { return 0; }
+#line 547 "ext/standard/var_unserializer.c"
 yy4:
        yych = *(YYMARKER = ++YYCURSOR);
        if (yych == ':') goto yy89;
@@ -581,11 +586,13 @@ yy13:
        goto yy3;
 yy14:
        ++YYCURSOR;
+#line 820 "ext/standard/var_unserializer.re"
        {
        /* this is the case where we have less data than planned */
        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data");
        return 0; /* not sure if it should be 0 or 1 here? */
 }
+#line 596 "ext/standard/var_unserializer.c"
 yy16:
        yych = *++YYCURSOR;
        goto yy3;
@@ -615,6 +622,7 @@ yy20:
        yych = *++YYCURSOR;
        if (yych != '"') goto yy18;
        ++YYCURSOR;
+#line 681 "ext/standard/var_unserializer.re"
        {
        size_t len, len2, len3, maxlen;
        php_int_t elements;
@@ -753,6 +761,7 @@ yy20:
 
        return object_common2(UNSERIALIZE_PASSTHRU, elements);
 }
+#line 765 "ext/standard/var_unserializer.c"
 yy25:
        yych = *++YYCURSOR;
        if (yych <= ',') {
@@ -777,6 +786,7 @@ yy27:
        yych = *++YYCURSOR;
        if (yych != '"') goto yy18;
        ++YYCURSOR;
+#line 673 "ext/standard/var_unserializer.re"
        {
 
 //???  INIT_PZVAL(rval);
@@ -784,6 +794,7 @@ yy27:
        return object_common2(UNSERIALIZE_PASSTHRU,
                        object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
 }
+#line 798 "ext/standard/var_unserializer.c"
 yy32:
        yych = *++YYCURSOR;
        if (yych == '+') goto yy33;
@@ -804,6 +815,7 @@ yy34:
        yych = *++YYCURSOR;
        if (yych != '{') goto yy18;
        ++YYCURSOR;
+#line 652 "ext/standard/var_unserializer.re"
        {
        php_int_t elements = parse_iv(start + 2);
        /* use iv() not uiv() in order to check data range */
@@ -824,6 +836,7 @@ yy34:
 
        return finish_nested_data(UNSERIALIZE_PASSTHRU);
 }
+#line 840 "ext/standard/var_unserializer.c"
 yy39:
        yych = *++YYCURSOR;
        if (yych == '+') goto yy40;
@@ -844,6 +857,7 @@ yy41:
        yych = *++YYCURSOR;
        if (yych != '"') goto yy18;
        ++YYCURSOR;
+#line 624 "ext/standard/var_unserializer.re"
        {
        size_t len, maxlen;
        zend_string *str;
@@ -871,6 +885,7 @@ yy41:
        ZVAL_STR(rval, str);
        return 1;
 }
+#line 889 "ext/standard/var_unserializer.c"
 yy46:
        yych = *++YYCURSOR;
        if (yych == '+') goto yy47;
@@ -891,6 +906,7 @@ yy48:
        yych = *++YYCURSOR;
        if (yych != '"') goto yy18;
        ++YYCURSOR;
+#line 597 "ext/standard/var_unserializer.re"
        {
        size_t len, maxlen;
        char *str;
@@ -917,6 +933,7 @@ yy48:
        ZVAL_STRINGL(rval, str, len);
        return 1;
 }
+#line 937 "ext/standard/var_unserializer.c"
 yy53:
        yych = *++YYCURSOR;
        if (yych <= '/') {
@@ -1004,6 +1021,7 @@ yy61:
        }
 yy63:
        ++YYCURSOR;
+#line 588 "ext/standard/var_unserializer.re"
        {
 #if SIZEOF_ZEND_INT == 4
 use_double:
@@ -1012,6 +1030,7 @@ use_double:
        ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
        return 1;
 }
+#line 1034 "ext/standard/var_unserializer.c"
 yy65:
        yych = *++YYCURSOR;
        if (yych <= ',') {
@@ -1070,6 +1089,7 @@ yy73:
        yych = *++YYCURSOR;
        if (yych != ';') goto yy18;
        ++YYCURSOR;
+#line 572 "ext/standard/var_unserializer.re"
        {
        *p = YYCURSOR;
 
@@ -1085,6 +1105,7 @@ yy73:
 
        return 1;
 }
+#line 1109 "ext/standard/var_unserializer.c"
 yy76:
        yych = *++YYCURSOR;
        if (yych == 'N') goto yy73;
@@ -1111,6 +1132,7 @@ yy79:
        if (yych <= '9') goto yy79;
        if (yych != ';') goto yy18;
        ++YYCURSOR;
+#line 546 "ext/standard/var_unserializer.re"
        {
 #if SIZEOF_ZEND_INT == 4
        int digits = YYCURSOR - start - 3;
@@ -1136,6 +1158,7 @@ yy79:
        ZVAL_INT(rval, parse_iv(start + 2));
        return 1;
 }
+#line 1162 "ext/standard/var_unserializer.c"
 yy83:
        yych = *++YYCURSOR;
        if (yych <= '/') goto yy18;
@@ -1143,18 +1166,22 @@ yy83:
        yych = *++YYCURSOR;
        if (yych != ';') goto yy18;
        ++YYCURSOR;
+#line 540 "ext/standard/var_unserializer.re"
        {
        *p = YYCURSOR;
        ZVAL_BOOL(rval, parse_iv(start + 2));
        return 1;
 }
+#line 1176 "ext/standard/var_unserializer.c"
 yy87:
        ++YYCURSOR;
+#line 534 "ext/standard/var_unserializer.re"
        {
        *p = YYCURSOR;
        ZVAL_NULL(rval);
        return 1;
 }
+#line 1185 "ext/standard/var_unserializer.c"
 yy89:
        yych = *++YYCURSOR;
        if (yych <= ',') {
@@ -1177,6 +1204,7 @@ yy91:
        if (yych <= '9') goto yy91;
        if (yych != ';') goto yy18;
        ++YYCURSOR;
+#line 511 "ext/standard/var_unserializer.re"
        {
        php_int_t id;
 
@@ -1199,6 +1227,7 @@ yy91:
        
        return 1;
 }
+#line 1231 "ext/standard/var_unserializer.c"
 yy95:
        yych = *++YYCURSOR;
        if (yych <= ',') {
@@ -1221,6 +1250,7 @@ yy97:
        if (yych <= '9') goto yy97;
        if (yych != ';') goto yy18;
        ++YYCURSOR;
+#line 489 "ext/standard/var_unserializer.re"
        {
        php_int_t id;
 
@@ -1242,7 +1272,9 @@ yy97:
        
        return 1;
 }
+#line 1276 "ext/standard/var_unserializer.c"
 }
+#line 828 "ext/standard/var_unserializer.re"
 
 
        return 0;
index 40876563a83f91a605579b98db64c5c47c8e777e..57570ab7f9229c4533308373a9ba33f231245527 100644 (file)
@@ -391,7 +391,7 @@ static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
        (*p) += 2;
 
        if (datalen < 0 || (*p) + datalen >= max) {
-               zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %ld present", datalen, (php_int_t)(max - (*p)));
+               zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %pd present", datalen, (php_int_t)(max - (*p)));
                return 0;
        }
 
index 72a67740bebf08ea5a3cf6f6ae1e0ab8a642502c..de8340de320f5e4a704ace3e29937df4deb24e3f 100644 (file)
@@ -334,7 +334,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
                                ZVAL_DUP(&tmp, tmpzval);
                                convert_to_int(&tmp);
                                if (Z_IVAL(tmp) < -MAX_WBITS || Z_IVAL(tmp) > MAX_WBITS + 32) {
-                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_IVAL(tmp));
+                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%pd)", Z_IVAL(tmp));
                                } else {
                                        windowBits = Z_IVAL(tmp);
                                }
@@ -367,7 +367,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
 
                                                /* Memory Level (1 - 9) */
                                                if (Z_IVAL(tmp) < 1 || Z_IVAL(tmp) > MAX_MEM_LEVEL) {
-                                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for memory level. (%ld)", Z_IVAL(tmp));
+                                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for memory level. (%pd)", Z_IVAL(tmp));
                                                } else {
                                                        memLevel = Z_IVAL(tmp);
                                                }
@@ -379,7 +379,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
 
                                                /* log-2 base of history window (9 - 15) */
                                                if (Z_IVAL(tmp) < -MAX_WBITS || Z_IVAL(tmp) > MAX_WBITS + 16) {
-                                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%ld)", Z_IVAL(tmp));
+                                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter give for window size. (%pd)", Z_IVAL(tmp));
                                                } else {
                                                        windowBits = Z_IVAL(tmp);
                                                }
@@ -402,7 +402,7 @@ factory_setlevel:
 
                                        /* Set compression level within reason (-1 == default, 0 == none, 1-9 == least to most compression */
                                        if (Z_IVAL(tmp) < -1 || Z_IVAL(tmp) > 9) {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid compression level specified. (%ld)", Z_IVAL(tmp));
+                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid compression level specified. (%pd)", Z_IVAL(tmp));
                                        } else {
                                                level = Z_IVAL(tmp);
                                        }
index 9d8a19dc6d0dc64765ceafc121305b00fa84b58c..a3826b0e1b2aea07b6720d91c5827a48842d6cea 100644 (file)
@@ -269,7 +269,7 @@ SAPI_API int sapi_read_post_block(char *buffer, size_t buflen TSRMLS_DC)
 SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
 {
        if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes",
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %pd bytes exceeds the limit of %pd bytes",
                                        SG(request_info).content_length, SG(post_max_size));
                return;
        }