Change 17211 by jhi@alpha on 2002/06/12 23:05:29
Subject: [PATCH: perl@17206] add skipping of threads and threads::shared on
default builds
From: [EMAIL PROTECTED]
Date: Wed, 12 Jun 2002 18:58:50 -0400
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/utils/perlivp.PL#6 edit
Differences ...
==== //depot/perl/utils/perlivp.PL#6 (text) ====
Index: perl/utils/perlivp.PL
--- perl/utils/perlivp.PL#5~17095~ Sat Jun 8 08:00:39 2002
+++ perl/utils/perlivp.PL Wed Jun 12 16:05:29 2002
@@ -14,9 +14,9 @@
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
# Create output file.
@@ -37,7 +37,7 @@
print OUT <<'!NO!SUBS!';
-# perlivp V 0.01
+# perlivp V 0.02
sub usage {
@@ -56,7 +56,7 @@
exit;
}
-use vars (%opt); # allow testing with older versions (do not use our)
+use vars qw(%opt); # allow testing with older versions (do not use our)
@opt{ qw/? H h P p V v/ } = qw(0 0 0 0 0 0 0);
@@ -88,8 +88,15 @@
# Of course some platforms are distinct...
if ($^O eq 'VMS') { $perlpath = $^X; }
+# The useithreads Config variable plays a role in whether or not
+# threads and threads/shared work when C<use>d. They apparently always
+# get installed on systems that can run Configure.
+my $useithreads = '';
+if (defined($Config{'useithreads'})) { $useithreads = $Config{'useithreads'}; }
+
print OUT <<"!GROK!THIS!";
my \$perlpath = '$perlpath';
+my \$useithreads = '$useithreads';
!GROK!THIS!
print OUT <<'!NO!SUBS!';
@@ -199,6 +206,10 @@
my @extensions = split(/\s+/,$Config{'extensions'});
foreach (@extensions) {
next if ($_ eq '');
+ if ( $useithreads !~ /define/i ) {
+ next if ($_ eq 'threads');
+ next if ($_ eq 'threads/shared');
+ }
next if ($_ eq 'Devel/DProf');
# VMS$ perl -e "eval ""require \""Devel/DProf.pm\"";"" print $@"
# \NT> perl -e "eval \"require 'Devel/DProf.pm'\"; print $@"
End of Patch.