summaryrefslogtreecommitdiff
path: root/makedef.pl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-11 15:43:44 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-11 15:43:44 +0000
commit9df4da27fbed528c1795e76111bdb359928b1a63 (patch)
treef1b1b66bfdcd60c12f9250ddd738a56820b1a224 /makedef.pl
parentb9d6bf1307347f5c042490ec06edac847e8ada07 (diff)
downloadperl-9df4da27fbed528c1795e76111bdb359928b1a63.tar.gz
(retracted by #17559, made things worse)
Apparently OS/2 likes to export the Perl malloc interface to external libraries and the #16291 broke that when removing the bincompat5005 feature. p4raw-id: //depot/perl@17486
Diffstat (limited to 'makedef.pl')
-rw-r--r--makedef.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/makedef.pl b/makedef.pl
index 9b1f9773c0..4e211d617f 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -29,6 +29,16 @@ my %PLATFORM;
defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n";
+my %exportperlmalloc =
+ (
+ Perl_malloc => "malloc",
+ Perl_mfree => "free",
+ Perl_realloc => "realloc",
+ Perl_calloc => "calloc",
+ );
+
+my $exportperlmalloc = $PLATFORM eq 'os2';
+
my $config_sh = "config.sh";
my $config_h = "config.h";
my $thrdvar_h = "thrdvar.h";
@@ -1131,6 +1141,7 @@ elsif ($PLATFORM eq 'os2') {
@missing = grep { !exists $mapped{$_} }
keys %export;
+ @missing = grep { !exists $exportperlmalloc{$_} } @missing;
delete $export{$_} foreach @missing;
}
elsif ($PLATFORM eq 'MacOS') {
@@ -1304,6 +1315,8 @@ sub emit_symbol {
sub output_symbol {
my $symbol = shift;
+ $symbol = $exportperlmalloc{$symbol}
+ if $exportperlmalloc and exists $exportperlmalloc{$symbol};
if ($PLATFORM =~ /^win(?:32|ce)$/) {
$symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
print "\t$symbol\n";