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: 22:54 on 14 Dec 2004
Joe Orton wrote:
> On Tue, Dec 14, 2004 at 03:24:30PM -0500, Stas Bekman wrote:
> 
>>Joe Orton wrote:
>>
>>>Just make the generated export stub code #ifndef'ed?
>>>
>>>#ifndef modperl_io_apache_init
>>>const void *modperl_hack_io_apache_init = (const void 
>>>*)modperl_io_apache_init;
>>>#endif
>>>
>>>if the symbol is a macro then there's no point in generating a stub for
>>>it anyway...
>>
>>It's not a macro normally, it's a macro only on certain setups. Here it is again:
>>
>>#ifdef PERLIO_LAYERS
>>MP_INLINE void modperl_io_apache_init(pTHX);
>>#else
>>#define        modperl_io_apache_init(pTHX)
>>#endif
>>
>>So that trick of #ifndef, won't work when PERLIO_LAYERS is not defined, 
>>right? Since modperl_io_apache_init is always defined but something it's a 
>>real symbols at other times it's a macro to keep some compilers happy.
> 
> 
> I'm not sure what you're asking; the preprecessor doesn't know about C
> function declarations, it only cares about preprocessor directives.  In
> the above case, the CPP macro "modperl_io_apache_init" is only defined
> in the case that PERLIO_LAYERS is not defined.  So the fragment:
> 
> #ifndef modperl_io_apache_init
> const void *modperl_hack_io_apache_init = (const void*)modperl_io_apache_init;
> #endif
> 
> only expands in the case that PERLIO_LAYERS *is* defined, which is the 
> desired outcome, right?

I think so. I wasn't aware that that preprocessor won't see C function 
declaration.


        -- 
        __________________________________________________________________
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
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
Stas Bekman 22:54 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