httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail T." <>
Subject Re: apr_vformatter and the %p-format
Date Tue, 08 Jun 2010 20:47:36 GMT
08.06.2010 14:13, Mikhail T. ???????(??):
> Why does the apr_vformatter -- and thus all its callers (apr_psprintf, 
> logging-functions, etc.) reject the %p format (replacing it with words 
> ``bogus %p'')?
> The format is for outputting pointers and is supported by the 
> C-library's printf-family.
> If this is a deliberate limitation, I'd like to know, what the 
> motivations are. If it is simply an omission, I may be able to offer a 
> patch...
Ok, replying to myself... Apparently, one is supposed to use %pp instead 
of simple %p to output pointers. This is not well-implemented, however, 
because real printf would left-pad pointers with zeros, which is not 
even possible to request with the current apr_vformatter implementation. 
The 0x-prefix is not output either, but that one can request by 
explicitly putting it into format.

Also, trying to use %pt (for the thread ID) -- gets flagged by the gcc's 
-Wformat, because these functions are, somewhat misleadingly, declared 


View raw message