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

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

From: Philippe M. Chiasson
Subject: Re: cc: Error: modperl_exports.c under Tru64 Unix
Date: 01:33 on 15 Dec 2004
--------------enigC5CD5EF690C2FDD890D4CCEB
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>>Philippe M. Chiasson wrote:
>>
>>>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 ? 
>>
>>I'd prefer to see a generic solution, w/o needing to do that manually 
>>every time a new function is added. So if the trick suggested by Joe 
>>works, then we should better use it IMHO.
> 
> Sadly, we've explored that path before, and it turns out that it's nearly
> impossible. See lib/ModPerl/WrapXS.pm for all the export_file_* foo.
> 
> One way or another, at least for win32 folks, we will always need to generate
> similar files, with exclusions based on various perl options. So it's not a
> terrible thing IMO to keep continuing that way.
> 
>>>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 ?
>>
>>No. Just try to build mp2 with 5.6.1 on linux and you will see what we are 
>>talking about.

After talking about this over with stas in irc-land, I've come to the conclusion
that Joe's suggestion in the long run might prove to be a much better solution,
and could even simplify things in the win32 world. So without further delay,
here is the patch. (It does fix the modperl_io_apache_init() problem by itself,
but other similar #ifdefed functions can now be worked on and removed from the
exception cases in lib/ModPerl/WrapXS.pm:$ithreads_exports)

Index: lib/ModPerl/WrapXS.pm
===================================================================
--- lib/ModPerl/WrapXS.pm       (revision 111876)
+++ lib/ModPerl/WrapXS.pm       (working copy)
@@ -1302,7 +1302,12 @@
              next if $entry->{name} =~ /^($ithreads_exports)/;
          }
          ( my $name ) = $entry->{name} =~ /^modperl_(.*)/;
-        print $fh "const void *modperl_hack_$name = (const void *)modperl_$name;\n";
+        print $fh <<"EOF";
+#ifndef modperl_$name
+const void *modperl_hack_$name = (const void *)modperl_$name;
+#endif
+
+EOF
      }
  }

--------------------------------------------------------------------------------
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

--------------enigC5CD5EF690C2FDD890D4CCEB
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

iD8DBQFBv5RSyzKhB4jDpaURAvUIAKCyaiadVEbhD4Mz24pMdyyyr+NhpACfabQT
p3CKVuSFLE1t+HtUgSmmRj0=
=9ZT5
-----END PGP SIGNATURE-----

--------------enigC5CD5EF690C2FDD890D4CCEB--

(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