Re: Thread object by tid?
[p5sagit/p5-mst-13.2.git] / makedef.pl
index cae0695..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,16 +748,20 @@ my @layer_syms = qw(
                         PerlIOBase_error
                         PerlIOBase_fileno
                         PerlIOBase_pushed
+                        PerlIOBase_binmode
+                        PerlIOBase_popped
                         PerlIOBase_read
                         PerlIOBase_setlinebuf
                         PerlIOBase_unread
                         PerlIOBuf_bufsiz
                         PerlIOBuf_fill
                         PerlIOBuf_flush
+                        PerlIOBuf_get_base
                         PerlIOBuf_get_cnt
                         PerlIOBuf_get_ptr
                         PerlIOBuf_open
                         PerlIOBuf_pushed
+                        PerlIOBuf_popped
                         PerlIOBuf_read
                         PerlIOBuf_seek
                         PerlIOBuf_set_ptrcnt
@@ -767,6 +781,7 @@ my @layer_syms = qw(
                         PerlIO_apply_layera
                         PerlIO_pending
                         PerlIO_push
+                        PerlIO_pop
                         PerlIO_sv_dup
                         PerlIO_perlio
 
@@ -1052,6 +1067,7 @@ if ($PLATFORM =~ /^win(?:32|ce)$/) {
                            win32_link
                            win32_unlink
                            win32_utime
+                           win32_gettimeofday
                            win32_uname
                            win32_wait
                            win32_waitpid
@@ -1125,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') {
@@ -1271,6 +1288,8 @@ foreach my $symbol (qw(
                        Perl_sv_catsv
                        Perl_sv_catpvn
                        Perl_sv_2pv
+                       nw_freeenviron
+                       Remove_Thread_Ctx
                           ))
     {
        try_symbol($symbol);
@@ -1296,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";
@@ -1346,7 +1367,7 @@ perl_destruct
 perl_free
 perl_parse
 perl_run
-# Oddities from PerlIO 
+# Oddities from PerlIO
 PerlIO_binmode
 PerlIO_getpos
 PerlIO_init