From d0e9614297270e80c731655f8aaa25c3c6570478 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 17 Jul 2002 21:10:16 +0000 Subject: Reintroduce #17486, but this time with Sebastian Wittmeier's tweak, now OS/2 is happier (affects only OS/2) p4raw-id: //depot/perl@17613 --- makedef.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/makedef.pl b/makedef.pl index f22b34dc1d..82000ae8bd 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"; @@ -1138,6 +1148,7 @@ elsif ($PLATFORM eq 'os2') { @missing = grep { !exists $mapped{$_} } keys %export; + @missing = grep { !exists $exportperlmalloc{$_} } @missing; delete $export{$_} foreach @missing; } elsif ($PLATFORM eq 'MacOS') { @@ -1339,6 +1350,10 @@ sub output_symbol { elsif ($PLATFORM eq 'os2') { printf qq( %-31s \@%s\n), qq("$symbol"), $ordinal{$symbol} || ++$sym_ord; + if (exists $exportperlmalloc{$symbol}) { + printf qq( %-31s \@%s\n), + qq("$exportperlmalloc{$symbol}" = "$symbol"), ++$sym_ord; + } } elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'MacOS') { print "$symbol\n"; -- cgit v1.2.1