summaryrefslogtreecommitdiff
path: root/vms/gen_shrfls.pl
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>1999-09-06 02:39:11 +0000
committerbailey <bailey@newman.upenn.edu>1999-09-06 02:39:11 +0000
commit424a8fe95d507998fe8750793da1b35bd6d7074b (patch)
tree2e7697b05952df05643698777bf236009c43d158 /vms/gen_shrfls.pl
parentf0585323684fd5b018ff6d479ece5c134dabef3e (diff)
parent0bf7eb25e9e238046abce47d15e2fa3d10558a02 (diff)
downloadperl-424a8fe95d507998fe8750793da1b35bd6d7074b.tar.gz
Integrate mainline 5.05_61
p4raw-id: //depot/vmsperl@4084
Diffstat (limited to 'vms/gen_shrfls.pl')
-rw-r--r--vms/gen_shrfls.pl36
1 files changed, 28 insertions, 8 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index 05d0f27c7b..caba95c04b 100644
--- a/vms/gen_shrfls.pl
+++ b/vms/gen_shrfls.pl
@@ -74,6 +74,8 @@ if ($docc) {
while(<CONFIG>) {
$debugging_enabled++ if /define\s+DEBUGGING/;
$use_mymalloc++ if /define\s+MYMALLOC/;
+ $hide_mymalloc++ if /define\s+EMBEDMYMALLOC/;
+ $use_threads++ if /define\s+USE_THREADS/;
}
# put quotes back onto defines - they were removed by DCL on the way in
@@ -193,16 +195,16 @@ sub scan_func {
if ($1 eq 'main' || $1 eq 'perl_init_ext') {
print "\tskipped\n" if $debug > 1;
}
- else { $fcns{$1}++ }
+ else { $fcns{uc($1)}++ }
}
}
# Go add some right up front if we need 'em
if ($use_mymalloc) {
- $fcns{'Perl_malloc'}++;
- $fcns{'Perl_calloc'}++;
- $fcns{'Perl_realloc'}++;
- $fcns{'Perl_mfree'}++;
+ $fcns{uc('Perl_malloc')}++;
+ $fcns{uc('Perl_calloc')}++;
+ $fcns{uc('Perl_realloc')}++;
+ $fcns{uc('Perl_mfree')}++;
}
$used_expectation_enum = $used_opcode_enum = 0; # avoid warnings
@@ -306,6 +308,7 @@ if ($isvax) {
or die "$0: Can't write to ${dir}perlshr_gbl${marord}.mar: $!\n";
print MAR "\t.title perlshr_gbl$marord\n";
}
+
unless ($isgcc) {
print OPTBLD "PSECT_ATTR=\$GLOBAL_RO_VARS,PIC,NOEXE,RD,NOWRT,SHR\n";
print OPTBLD "PSECT_ATTR=\$GLOBAL_RW_VARS,PIC,NOEXE,RD,WRT,NOSHR\n";
@@ -391,9 +394,26 @@ if ($isvax) {
# Initial hack to permit building of compatible shareable images for a
# given version of Perl.
if ($ENV{PERLSHR_USE_GSMATCH}) {
- my $major = int($] * 1000) & 0xFF; # range 0..255
- my $minor = int(($] * 1000 - $major) * 100 + 0.5) & 0xFF; # range 0..255
- print OPTBLD "GSMATCH=LEQUAL,$major,$minor\n";
+ if ($ENV{PERLSHR_USE_GSMATCH} eq 'INCLUDE_COMPILE_OPTIONS') {
+ # Build up a major ID. Since it can only be 8 bits, we encode the version
+ # number in the top four bits and use the bottom four for build options
+ # that'll cause incompatibilities
+ ($ver, $sub) = $] =~ /\.(\d\d\d)(\d\d)/;
+ $gsmatch = ($sub >= 50) ? "equal" : "lequal"; # Force an equal match for
+ # dev, but be more forgiving
+ # for releases
+
+ $ver *=16;
+ $ver += 8 if $debugging_enabled; # If DEBUGGING is set
+ $ver += 4 if $use_threads; # if we're threaded
+ $ver += 2 if $use_mymalloc; # if we're using perl's malloc
+ print OPTBLD "GSMATCH=$gsmatch,$ver,$sub\n";
+ }
+ else {
+ my $major = int($] * 1000) & 0xFF; # range 0..255
+ my $minor = int(($] * 1000 - $major) * 100 + 0.5) & 0xFF; # range 0..255
+ print OPTBLD "GSMATCH=LEQUAL,$major,$minor\n";
+ }
print OPTBLD 'CLUSTER=$$TRANSFER_VECTOR,,',
map(",$_$objsuffix",@symfiles), "\n";
}