Re: Thread object by tid?
[p5sagit/p5-mst-13.2.git] / makedef.pl
index 0a1e7ed..4e211d6 100644 (file)
@@ -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";
@@ -738,6 +748,7 @@ my @layer_syms = qw(
                         PerlIOBase_error
                         PerlIOBase_fileno
                         PerlIOBase_pushed
+                        PerlIOBase_binmode
                         PerlIOBase_popped
                         PerlIOBase_read
                         PerlIOBase_setlinebuf
@@ -770,6 +781,7 @@ my @layer_syms = qw(
                         PerlIO_apply_layera
                         PerlIO_pending
                         PerlIO_push
+                        PerlIO_pop
                         PerlIO_sv_dup
                         PerlIO_perlio
 
@@ -1129,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') {
@@ -1275,6 +1288,8 @@ foreach my $symbol (qw(
                        Perl_sv_catsv
                        Perl_sv_catpvn
                        Perl_sv_2pv
+                       nw_freeenviron
+                       Remove_Thread_Ctx
                           ))
     {
        try_symbol($symbol);
@@ -1300,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";