You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2001/02/09 12:19:33 UTC
Re: cvs commit: httpd-2.0/server util_filter.c
On Fri, Feb 09, 2001 at 07:04:52AM -0000, rbb@apache.org wrote:
>...
> --- util_filter.h 2001/02/03 20:25:13 1.38
> +++ util_filter.h 2001/02/09 07:04:51 1.39
>...
> +/**
> + * Write an unspecified number of strings to the current filter
> + * @param f the filter to write to
> + * @param bb The brigade to buffer into
> + * @param ... The strings to write
> + * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, ...);
> + */
> +#define ap_fvputs(f, bb, args...) \
> + apr_brigade_putstrs(bb, filter_flush, f->next, ##args)
> +
> +/**
> + * Output data to the filter in printf format
> + * @param f the filter to write to
> + * @param bb The brigade to buffer into
> + * @param fmt The format string
> + * @param ... The argumets to use to fill out the format string
> + * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...);
> + */
> +#define ap_fprintf(f, bb, fmt, args...) \
> + apr_brigade_printf(bb, filter_flush, f->next, fmt, ##args)
I'm a bit concerned about these two macros. GCC is saying they are non-ANSI.
Could people test them out on their compilers? I suspect we may need to
convert these two to real functions.
[ that said: the feature is sweet... no idea it existed! ]
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: httpd-2.0/server util_filter.c
Posted by Greg Stein <gs...@lyra.org>.
On Fri, Feb 09, 2001 at 06:26:38AM -0800, rbb@covalent.net wrote:
> On Fri, 9 Feb 2001, Greg Stein wrote:
>...
> > I'm a bit concerned about these two macros. GCC is saying they are non-ANSI.
> > Could people test them out on their compilers? I suspect we may need to
> > convert these two to real functions.
> >
> > [ that said: the feature is sweet... no idea it existed! ]
>
> I was concerned about them too. I have them same macros for ap_r*. I am
> not getting any errors from GCC though. I am using maintainer-mode. It
> is easy to turn them into functions, but I really do like this more if it
> is portable. :-(
I was suspicious, so I compiled a test program with -ansi -pedantic :-) I
wasn't getting errors normally, either.
Some GCC extension, apparently.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: httpd-2.0/server util_filter.c
Posted by rb...@covalent.net.
On Fri, 9 Feb 2001, Greg Stein wrote:
> On Fri, Feb 09, 2001 at 07:04:52AM -0000, rbb@apache.org wrote:
> >...
> > --- util_filter.h 2001/02/03 20:25:13 1.38
> > +++ util_filter.h 2001/02/09 07:04:51 1.39
> >...
> > +/**
> > + * Write an unspecified number of strings to the current filter
> > + * @param f the filter to write to
> > + * @param bb The brigade to buffer into
> > + * @param ... The strings to write
> > + * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, ...);
> > + */
> > +#define ap_fvputs(f, bb, args...) \
> > + apr_brigade_putstrs(bb, filter_flush, f->next, ##args)
> > +
> > +/**
> > + * Output data to the filter in printf format
> > + * @param f the filter to write to
> > + * @param bb The brigade to buffer into
> > + * @param fmt The format string
> > + * @param ... The argumets to use to fill out the format string
> > + * @deffunc int ap_fputs(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...);
> > + */
> > +#define ap_fprintf(f, bb, fmt, args...) \
> > + apr_brigade_printf(bb, filter_flush, f->next, fmt, ##args)
>
> I'm a bit concerned about these two macros. GCC is saying they are non-ANSI.
> Could people test them out on their compilers? I suspect we may need to
> convert these two to real functions.
>
> [ that said: the feature is sweet... no idea it existed! ]
I was concerned about them too. I have them same macros for ap_r*. I am
not getting any errors from GCC though. I am using maintainer-mode. It
is easy to turn them into functions, but I really do like this more if it
is portable. :-(
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------