On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
In fact we already somewhat handle that in modperl_io_apache.h
#ifdef PERLIO_LAYERS [...] MP_INLINE void modperl_io_apache_init(pTHX);
#else /* #ifdef PERLIO_LAYERS */
#define modperl_io_apache_init(pTHX)
but for some reason define doesn't do the trick, when it gets to do:
const void *modperl_hack_io_apache_init = (const void *)modperl_io_apache_init;
The C preprocessor won't expand a parameterized macro unless it's called with parameters:
$ cpp #define foo(bar) bar foo(norman) foo blah # 1 "<stdin>" # 1 "<built-in>" # 1 "<command line>" # 1 "<stdin>"
norman foo blah
Thanks Joe. So what kind of hack of the hack can we use here? I suppose that even if it did expand it, there would have been a problem since we have:
#define modperl_io_apache_init(pTHX)
so it expands to nothing. Of course the right solution is to never include this in the autogenerated modperl_exports.c but this will require C parsing with some messy sed like Apache/APR do. Is there some other solution for this kind of functions?
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html