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

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

From: Philippe M. Chiasson
Subject: Re: cc: Error: modperl_exports.c under Tru64 Unix
Date: 21:51 on 14 Dec 2004
--------------enig2A210B18E69C71FA2721F953
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Stas Bekman wrote:
> 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?

There is already support in the modperl_exports.c generation code to exclude
certain functions depending on build options. So in summary, if we just
excluded modperl_io_apache_init() from modperl_exports.c when PERLIO is absent,
we would be good ? Or is there other modperl_perlio_ or modperl_io_ symbols
we should also skip ?

In any case, I've got the code ready to exclude things when under PERLIO, I just
want to confirm what we need to exclude. And unless I am wrong, this should also
have been a problem to people in the win32 land as well, no ?

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

--------------enig2A210B18E69C71FA2721F953
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBv2B2yzKhB4jDpaURAijZAJ9pXZ1iKtNYBwO+lWcD64JHuNeb3QCdHBnZ
ySni2xDWF0Lj1C8qmKzHE9E=
=Mw9i
-----END PGP SIGNATURE-----

--------------enig2A210B18E69C71FA2721F953--

(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
sdfgsd sergserg 14:34 on 15 Dec 2004

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