This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Changes for threads::shared to all building with g++.
authorSteve Peters <steve@fisharerojo.org>
Sat, 21 Oct 2006 18:16:53 +0000 (18:16 +0000)
committerSteve Peters <steve@fisharerojo.org>
Sat, 21 Oct 2006 18:16:53 +0000 (18:16 +0000)
p4raw-id: //depot/perl@29072

ext/threads/shared/Makefile.PL
ext/threads/shared/shared.xs

index b9f5944..beccf25 100755 (executable)
@@ -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') ?
index 955874a..25fdec6 100644 (file)
@@ -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
  */