By moving the the standard macros...
#if SIZEOF_ZEND_LONG==4
if (uval > INT_MAX) {
DBG_INF("stringify");
- tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval);
+ tmp_len = sprintf((char *)&tmp, "%" PRIu64, uval);
} else
#endif /* #if SIZEOF_LONG==4 */
{
ZVAL_LONG(zv, (zend_long) uval); /* the cast is safe, we are in the range */
} else {
DBG_INF("stringify");
- tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval);
+ tmp_len = sprintf((char *)&tmp, "%" PRIu64, uval);
DBG_INF_FMT("value=%s", tmp);
}
}
#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);
+ tmp_len = sprintf((char *)&tmp, "%" PRIi64, lval);
} else
#endif /* SIZEOF */
{
{
DBG_ENTER("mysqlnd_result_buffered::free_result");
- DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count);
+ DBG_INF_FMT("Freeing "PRIu64" row(s)", set->row_count);
mysqlnd_error_info_free_contents(&set->error_info);
for (i = 0; i < stats->count; i++) {
char tmp[25];
- sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
+ sprintf((char *)&tmp, "%" PRIu64, stats->values[i]);
add_assoc_string_ex(return_value, names[i].s, names[i].l, tmp);
}
}
if (Z_TYPE_P(current_field) == IS_LONG && !as_int_or_float) {
/* we are using the text protocol, so convert to string */
char tmp[22];
- const size_t tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, (uint64_t) Z_LVAL_P(current_field));
+ const size_t tmp_len = sprintf((char *)&tmp, ZEND_ULONG_FMT, Z_LVAL_P(current_field));
ZVAL_STRINGL(current_field, tmp, tmp_len);
} else if (Z_TYPE_P(current_field) == IS_STRING) {
/* nothing to do here, as we want a string and ps_fetch_from_1_to_8_bytes() has given us one */