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

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

From: Joe Orton
Subject: Re: cc: Error: modperl_exports.c under Tru64 Unix
Date: 20:40 on 14 Dec 2004
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?

joe

        -- 
        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
Joe Orton 20:40 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