From: Steve Peters Date: Sat, 21 Oct 2006 18:16:53 +0000 (+0000) Subject: Changes for threads::shared to all building with g++. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=12b31bedfd2f422eff75009215acbc2ee0cc3fa6;p=p5sagit%2Fp5-mst-13.2.git Changes for threads::shared to all building with g++. p4raw-id: //depot/perl@29072 --- diff --git a/ext/threads/shared/Makefile.PL b/ext/threads/shared/Makefile.PL index b9f5944..beccf25 100755 --- a/ext/threads/shared/Makefile.PL +++ b/ext/threads/shared/Makefile.PL @@ -61,6 +61,14 @@ if (grep { $_ eq 'PERL_CORE=1' } @ARGV) { push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H'); } +my $prereqs; + +if(!$ENV{PERL_CORE}) { + $prereqs = { + 'threads' => 0, + 'XSLoader' => 0, + }; +} # Create Makefile WriteMakefile( @@ -71,10 +79,7 @@ WriteMakefile( 'PM' => { 'shared.pm' => '$(INST_LIBDIR)/shared.pm', }, - 'PREREQ_PM' => { - 'threads' => 0, - 'XSLoader' => 0, - }, + 'PREREQ_PM' => $prereqs, 'INSTALLDIRS' => 'perl', ((ExtUtils::MakeMaker->VERSION() lt '6.25') ? diff --git a/ext/threads/shared/shared.xs b/ext/threads/shared/shared.xs index 955874a..25fdec6 100644 --- a/ext/threads/shared/shared.xs +++ b/ext/threads/shared/shared.xs @@ -318,10 +318,10 @@ MGVTBL sharedsv_userlock_vtbl = { the shared thing. */ -MGVTBL sharedsv_scalar_vtbl; /* Scalars have this vtable */ -MGVTBL sharedsv_array_vtbl; /* Hashes and arrays have this - like 'tie' */ -MGVTBL sharedsv_elem_vtbl; /* Elements of hashes and arrays have this - _AS WELL AS_ the scalar magic: +extern MGVTBL sharedsv_scalar_vtbl; /* Scalars have this vtable */ +extern MGVTBL sharedsv_array_vtbl; /* Hashes and arrays have this - like 'tie' */ +extern MGVTBL sharedsv_elem_vtbl; /* Elements of hashes and arrays have this + _AS WELL AS_ the scalar magic: The sharedsv_elem_vtbl associates the element with the array/hash and the sharedsv_scalar_vtbl associates it with the value */