apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: [REPOST] printf and FMT values.
Date Sat, 28 Apr 2001 15:51:52 GMT

The ONLY way to print to stderr, stdout, stdin through APR is to call
apr_open_std*.  This is because APR doesn't use stdio on Windows.  We use
native I/O.  That means that APR on Windows doesn't have any idea what you
mean by stdin, out, or err.

It is unfortunate, but that is what we are stuck with.


On Sat, 28 Apr 2001, Justin Erenkrantz wrote:

> Okay, so the <FOO>_T_FMT's should not be used in OS printf calls.  We
> should probably add that somewhere as a comment.
> But, in the case of ab, it uses printf because it wants to write to stderr,
> stdout.  I think I saw a couple of other places outside of ab where it was
> using plain printf as well.
> APR doesn't have this functionality.  I smell a patch...
> Hmm.  Right now, I guess you could use apr_file_open_stdout and
> apr_file_printf.  But, that isn't the most obvious thing.  It would be
> better if you could do that directly with apr_pvprintf() or apr_pvfprintf().
> But, then we'd require a global for stdout and stderr for performance
> reasons.  Yuck.
> Thoughts?  -- justin
> On Sat, Apr 28, 2001 at 08:16:04AM -0700, rbb@covalent.net wrote:
> >
> > There is no need for apr_*printf formats to be compatible with OS printf
> > calls.  We have re-implemented apr_*printf because we needed better
> > portability.  In reality, that means that we could easily just define a
> > single set of format strings.
> >
> > Ryan

Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131

View raw message