Re: cc: Error: modperl_exports.c under Tru64 Unix

[prev] [thread] [next] [Date index for 2004/12/14]

From: Stas Bekman
Subject: Re: cc: Error: modperl_exports.c under Tru64 Unix
Date: 15:27 on 14 Dec 2004
Joe Orton wrote:
> 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:stas@xxxxxx.xxx 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

(message missing)

cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 17:16 on 13 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Stas Bekman 15:27 on 14 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 21:51 on 14 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 00:35 on 15 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
Philippe M. Chiasson 01:33 on 15 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 07:56 on 14 Dec 2004

Re: cc: Error: modperl_exports.c under Tru64 Unix
sdfgsd sergserg 14:34 on 15 Dec 2004

Generated at 11:27 on 21 Dec 2004 by mariachi v0.52