diff options
author | Dan Sugalski <dan@sidhe.org> | 1998-06-19 08:36:34 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-21 06:55:18 +0000 |
commit | 429a5e67a8cd7868f6400fb40a70246ad7548973 (patch) | |
tree | a6ee82a5dae271a7ae918a6b654d9d8026af2e8f /vms/gen_shrfls.pl | |
parent | 4318d5a0158916acc059aa8e6af84037cb7296b9 (diff) | |
download | perl-429a5e67a8cd7868f6400fb40a70246ad7548973.tar.gz |
applied VMS patch from Dan Sugalski
Message-Id: <980619153634.2063ee12@cedar.osshe.edu>
Subject: [PATCH 5.004_67] Enhancements to the VMS configuration procedures
p4raw-id: //depot/perl@1174
Diffstat (limited to 'vms/gen_shrfls.pl')
-rw-r--r-- | vms/gen_shrfls.pl | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 9d5748d499..f07b8850ac 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -64,11 +64,24 @@ $docc = ($cc_cmd !~ /^~~/); print "\$docc = $docc\n" if $debug; if ($docc) { + if (-f 'perl.h') { $dir = '[]'; } + elsif (-f '[-]perl.h') { $dir = '[-]'; } + else { die "$0: Can't find perl.h\n"; } + + # Go see if debugging is enabled in config.h + $config = $dir . "config.h"; + open CONFIG, "< $config"; + while(<CONFIG>) { + $debugging_enabled++ if /define\s+DEBUGGING/; + $hide_mymalloc++ if /define\s+EMBEDMYMALLOC/; + $use_mymalloc++ if /define\s+MYMALLOC/; + } + # put quotes back onto defines - they were removed by DCL on the way in if (($prefix,$defines,$suffix) = ($cc_cmd =~ m#(.*)/Define=(.*?)([/\s].*)#i)) { $defines =~ s/^\((.*)\)$/$1/; - $debugging_enabled = $defines =~ /\bDEBUGGING\b/; + $debugging_enabled ||= $defines =~ /\bDEBUGGING\b/; @defines = split(/,/,$defines); $cc_cmd = "$prefix/Define=(" . join(',',grep($_ = "\"$_\"",@defines)) . ')' . $suffix; @@ -88,9 +101,6 @@ if ($docc) { print "\$isvaxc: $isvaxc\n" if $debug; print "\$debugging_enabled: $debugging_enabled\n" if $debug; - if (-f 'perl.h') { $dir = '[]'; } - elsif (-f '[-]perl.h') { $dir = '[-]'; } - else { die "$0: Can't find perl.h\n"; } } else { ($junk,$junk,$cpp_file,$cc_cmd) = split(/~~/,$cc_cmd,4); @@ -188,6 +198,14 @@ sub scan_func { } } +# Go add some right up front if we need 'em +if ($use_mymalloc) { + $fcns{'Perl_malloc'}++; + $fcns{'Perl_calloc'}++; + $fcns{'Perl_realloc'}++; + $fcns{'Perl_myfree'}++; +} + $used_expectation_enum = $used_opcode_enum = 0; # avoid warnings if ($docc) { open(CPP,"${cc_cmd}/NoObj/PreProc=Sys\$Output ${dir}perl.h|") |