Re: snprintf / ap_php_snprintf, %lld, gcc versions?
| From: | Derick Rethans | Date: | Sun, 27 Mar 2005 05:49:31 +0000 |
| Subject: | Re: snprintf / ap_php_snprintf, %lld, gcc versions? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15631@lists.php.net to get a copy of this message | ||
On Sun, 27 Mar 2005, Roman Neuhauser wrote:
> Hello,
>
> I'm having a puzzling problem with %lld conversion handling
> in ap_php_snprintf, and it seems to be gcc version-dependent.
>
> I found this problem through Statgrab, which has this macro:
>
> #define PHP_SG_ADD_LLVAL(rtz, key, val) { \
> char tmp[256]; \
> int tmp_len = snprintf((char *)&tmp, sizeof(tmp) - 1, "%lld", val); \
> add_assoc_stringl_ex(rtz, key, sizeof(key), tmp, tmp_len, 1); \
> }
>
> main/snprintf.[hc]:
>
> #define snprintf ap_php_snprintf
> PHPAPI int ap_php_snprintf(char *buf, size_t len, const char *format,...)
For some reason the header file is not included then - that should be
fixed as our own (ap_php_snprintf) function should always be used which
is not gcc dependent.
regards,
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org