X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=makedef.pl;h=8dc1f14522481bd61e045322862afeafb67b9367;hb=cb1f50b8bcbf67997c1040a0bba4a468fe0cefcc;hp=68fbd3e43abce1382f102626c833d71babd47872;hpb=a0ae667081b123207d4d0f2b6e6b7a5597859a57;p=p5sagit%2Fp5-mst-13.2.git diff --git a/makedef.pl b/makedef.pl index 68fbd3e..8dc1f14 100644 --- a/makedef.pl +++ b/makedef.pl @@ -97,8 +97,9 @@ unless ($PLATFORM eq 'win32' || $PLATFORM eq 'MacOS' || $PLATFORM eq 'netware') $define{$1} = 1 while /-D(\w+)/g; } if ($PLATFORM eq 'os2') { - $CONFIG_ARGS = $1 if /^(?:config_args)='(.+)'$/; - $ARCHNAME = $1 if /^(?:archname)='(.+)'$/; + $CONFIG_ARGS = $1 if /^config_args='(.+)'$/; + $ARCHNAME = $1 if /^archname='(.+)'$/; + $PATCHLEVEL = $1 if /^perl_patchlevel='(.+)'$/; } } close(CFG); @@ -115,6 +116,10 @@ close(CFG); # perl.h logic duplication begins +if ($define{PERL_IMPLICIT_SYS}) { + $define{PL_OP_SLAB_ALLOC} = 1; +} + if ($define{USE_ITHREADS}) { if (!$define{MULTIPLICITY}) { $define{MULTIPLICITY} = 1; @@ -128,6 +133,8 @@ $define{PERL_IMPLICIT_CONTEXT} ||= # perl.h logic duplication ends +my $sym_ord = 0; + if ($PLATFORM eq 'win32') { warn join(' ',keys %define)."\n"; print "LIBRARY Perl57\n"; @@ -136,13 +143,25 @@ if ($PLATFORM eq 'win32') { if ($define{PERL_IMPLICIT_SYS}) { output_symbol("perl_get_host_info"); output_symbol("perl_alloc_override"); - output_symbol("perl_clone_host"); + output_symbol("perl_clone_host"); } } elsif ($PLATFORM eq 'os2') { + if (open my $fh, '<', 'perl5.def') { + while (<$fh>) { + last if /^\s*EXPORTS\b/; + } + while (<$fh>) { + $ordinal{$1} = $2 if /^\s*"(\w+)"\s*\@(\d+)\s*$/; + # This allows skipping ordinals which were used in older versions + $sym_ord = $1 if /^\s*;\s*LAST_ORDINAL\s*=\s*(\d+)\s*$/; + } + $sym_ord < $_ and $sym_ord = $_ for values %ordinal; # Take the max + } ($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/; $v .= '-thread' if $ARCHNAME =~ /-thread/; ($dll = $define{PERL_DLL}) =~ s/\.dll$//i; + $v .= "\@$PATCHLEVEL" if $PATCHLEVEL; $d = "DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'"; $d = substr($d, 0, 249) . "...'" if length $d > 253; print <<"---EOP---"; @@ -172,9 +191,9 @@ elsif ($PLATFORM eq 'netware') { print "EXPORTS\n"; } if ($define{PERL_IMPLICIT_SYS}) { - output_symbol("perl_get_host_info"); - output_symbol("perl_alloc_override"); - output_symbol("perl_clone_host"); + output_symbol("perl_get_host_info"); + output_symbol("perl_alloc_override"); + output_symbol("perl_clone_host"); } } @@ -200,10 +219,6 @@ sub emit_symbols { } } -unless ($PLATFORM eq 'vms') { - skip_symbols [qw(PL_my_inv_rand_max)]; -} - if ($PLATFORM eq 'win32') { skip_symbols [qw( PL_statusvalue_vms @@ -338,6 +353,9 @@ elsif ($PLATFORM eq 'os2') { Perl_hab_GET loadByOrdinal pExtFCN + os2error + ResetWinError + CroakWinError )]); } elsif ($PLATFORM eq 'MacOS') { @@ -426,7 +444,6 @@ unless ($define{'DEBUGGING'}) { Perl_debprofdump Perl_debstack Perl_debstackptrs - Perl_runops_debug Perl_sv_peek PL_block_type PL_watchaddr @@ -600,6 +617,14 @@ unless ($define{'FAKE_THREADS'}) { skip_symbols [qw(PL_curthr)]; } +unless ($define{'PL_OP_SLAB_ALLOC'}) { + skip_symbols [qw( + PL_OpPtr + PL_OpSlab + PL_OpSpace + )]; +} + sub readvar { my $file = shift; my $proc = shift || sub { "PL_$_[2]" }; @@ -637,9 +662,9 @@ my @layer_syms = qw( PerlIOBase_eof PerlIOBase_error PerlIOBase_fileno - PerlIOBase_setlinebuf PerlIOBase_pushed PerlIOBase_read + PerlIOBase_setlinebuf PerlIOBase_unread PerlIOBuf_bufsiz PerlIOBuf_fill @@ -654,13 +679,16 @@ my @layer_syms = qw( PerlIOBuf_tell PerlIOBuf_unread PerlIOBuf_write - PerlIO_define_layer + PerlIO_allocate PerlIO_arg_fetch + PerlIO_define_layer + PerlIO_modestr PerlIO_pending - PerlIO_allocate PerlIO_push PerlIO_sv_dup - PerlIO_unread + PL_def_layerlist + PL_known_layers + PL_perlio ); if ($define{'USE_PERLIO'}) { @@ -783,6 +811,7 @@ if ($PLATFORM eq 'win32') { Perl_thread_create Perl_win32_init RunPerl + win32_async_check win32_errno win32_environ win32_abort @@ -886,7 +915,11 @@ if ($PLATFORM eq 'win32') { win32_getpid win32_crypt win32_dynaload - + win32_get_childenv + win32_free_childenv + win32_clearenv + win32_get_childdir + win32_free_childdir win32_stdin win32_stdout win32_stderr @@ -1057,6 +1090,7 @@ foreach my $symbol (qw( nw_setprotoent nw_setservent nw_setsockopt + nw_inet_ntoa nw_shutdown nw_crypt nw_execvp @@ -1098,6 +1132,8 @@ if ($PLATFORM eq 'netware') { # that the last symbol will not contain a comma else # Watcom linker cribs print "\tdummy\n"; +} elsif ($PLATFORM eq 'os2') { + print "; LAST_ORDINAL=$sym_ord\n"; } sub emit_symbol { @@ -1106,8 +1142,6 @@ sub emit_symbol { $export{$symbol} = 1; } -my $sym_ord = 0; - sub output_symbol { my $symbol = shift; $symbol = $bincompat5005{$symbol} @@ -1138,7 +1172,8 @@ sub output_symbol { # } } elsif ($PLATFORM eq 'os2') { - printf qq( %-31s \@%s\n), qq("$symbol"), ++$sym_ord; + printf qq( %-31s \@%s\n), + qq("$symbol"), $ordinal{$symbol} || ++$sym_ord; } elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'MacOS') { print "$symbol\n"; @@ -1192,12 +1227,13 @@ PerlIO_define_layer PerlIO_define_layer PerlIO_getpos PerlIO_init +PerlIO_modestr PerlIO_pending +PerlIO_perlio PerlIO_push PerlIO_setpos PerlIO_sprintf PerlIO_sv_dup PerlIO_tmpfile -PerlIO_unread PerlIO_vsprintf perlsio_binmode