You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 1998/04/19 22:48:47 UTC
The new %pp/pA/pI formats
Is that safe? I'm guessing that there might be modules that have been
assuming that the %p stuff works just like ANSI... Now they need to
worry about %pp... The thing is that, until recently, we just used
snprintf() (and our version by default) so modules may run into
troubles... Also, don't modules like mod_perl and PHP simply use
our snprintf()?
Couldn't we just have %A and %I ?
I'm not looking to create any arguments, but just whether this change
really makes sense...
--
===========================================================================
Jim Jagielski ||| jim@jaguNET.com ||| http://www.jaguNET.com/
"That's no ordinary rabbit... that's the most foul,
cruel and bad-tempered rodent you ever laid eyes on"
Re: The new %pp/pA/pI formats
Posted by Dean Gaudet <dg...@arctic.org>.
Try %A and %I and then watch gcc -Wall complain. That's why I posted the
patch for review a few weeks back. I explained the logic of the %pA, %pI,
%pp choices then 'cause Martin wondered about it too.
I don't really care if the patch goes in or not. I actually think that
gcc's warnings are a little too non-configurable. I looked at the gcc
code and it shouldn't be TOO hard to make it extensible... but I just
don't have enough hours in the day :(
Note that alternate choices for printing inet addresses are, uh, lacking.
For example, inet_ntoa() is not threadsafe. I suppose something could be
pstrdup()d out of a pool... but that chews memory. What you really want
is something along the lines of C++ streams which are easily extended with
type checking.
Dean
On Sun, 19 Apr 1998, Jim Jagielski wrote:
> Is that safe? I'm guessing that there might be modules that have been
> assuming that the %p stuff works just like ANSI... Now they need to
> worry about %pp... The thing is that, until recently, we just used
> snprintf() (and our version by default) so modules may run into
> troubles... Also, don't modules like mod_perl and PHP simply use
> our snprintf()?
>
> Couldn't we just have %A and %I ?
>
> I'm not looking to create any arguments, but just whether this change
> really makes sense...
> --
> ===========================================================================
> Jim Jagielski ||| jim@jaguNET.com ||| http://www.jaguNET.com/
> "That's no ordinary rabbit... that's the most foul,
> cruel and bad-tempered rodent you ever laid eyes on"
>