summaryrefslogtreecommitdiff
path: root/vms/gen_shrfls.pl
diff options
context:
space:
mode:
authorDan Sugalski <dan@sidhe.org>1999-08-10 06:28:18 -0700
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-10 19:54:50 +0000
commit5e4ba1368e095f877f5b412f0f5761ce3fcd693d (patch)
treefc7b33278d166bf3afd4fd5bcc118e0474d52652 /vms/gen_shrfls.pl
parent10a234571704a4c4c978964f3ef028b9b885cd5e (diff)
downloadperl-5e4ba1368e095f877f5b412f0f5761ce3fcd693d.tar.gz
Pathces to get _60 building on VMS
To: vmsperl@perl.org, perp5-porters@perl.org, bailey@newman.upenn.edu, sarathy@activestate.com Message-ID: <Pine.LNX.4.10.9908101323130.18266-100000@tuatha.sidhe.org> p4raw-id: //depot/cfgperl@3953
Diffstat (limited to 'vms/gen_shrfls.pl')
-rw-r--r--vms/gen_shrfls.pl37
1 files changed, 32 insertions, 5 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index 3e70372524..ef76a683e6 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,18 +195,27 @@ 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)}++ }
}
}
+open FUNCS, "LIBR/CROSS=SYMB LIBPERL.OLB/OUT=SYS\$OUTPUT |";
+foreach (<FUNCS>) {
+ chomp;
+ next unless /(perl_\w+)/i;
+ $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')}++;
}
+delete $fcns{PERL_DESTRUCT_LEVEL} if exists $fcns{PERL_DESTRUCT_LEVEL};
+
$used_expectation_enum = $used_opcode_enum = 0; # avoid warnings
if ($docc) {
open(CPP,"${cc_cmd}/NoObj/PreProc=Sys\$Output ${dir}perl.h|")
@@ -306,6 +317,22 @@ if ($isvax) {
or die "$0: Can't write to ${dir}perlshr_gbl${marord}.mar: $!\n";
print MAR "\t.title perlshr_gbl$marord\n";
}
+
+($ver, $sub) = $] =~ /\.(\d\d\d)(\d\d)/;
+$gsmatch = ($sub >= 50) ? "equal" : "lequal"; # Force an equal match for
+ # dev, but be more forgiving
+ # for releases
+
+# 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 *=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";
+
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";