apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: apr_ssize_t and APR_SSIZE_T_FMT
Date Mon, 09 Jul 2007 13:58:30 GMT
On Sun, Jul 08, 2007 at 12:38:33AM -0300, Davi Arnaut wrote:
> I think we could improve the (autoconf) format detection by:
> 1) Using __builtin_types_compatible_p (available since gcc-3.1)

This looks like a great idea.

> 2) First checking if the ssize_t type size is equal to long size, which
> seems true on most systems.

Not so sure I'd mess with this.  At least 32-bit Linux really does use 
an int for ssize_t.

But the most important thing here is that the qualifier used in the 
format string really does match the integer size.  Where int and long 
are the same size, the effect of an incorrect %d or %ld choice is only a 
compiler warning.


View raw message