$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);
# 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;
# perl.h logic duplication ends
+my $sym_ord = 0;
+
if ($PLATFORM eq 'win32') {
warn join(' ',keys %define)."\n";
print "LIBRARY Perl57\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_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---";
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");
}
}
Perl_hab_GET
loadByOrdinal
pExtFCN
+ os2error
+ ResetWinError
+ CroakWinError
)]);
}
elsif ($PLATFORM eq 'MacOS') {
Perl_debprofdump
Perl_debstack
Perl_debstackptrs
- Perl_runops_debug
Perl_sv_peek
PL_block_type
PL_watchaddr
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]" };
PerlIOBase_eof
PerlIOBase_error
PerlIOBase_fileno
- PerlIOBase_setlinebuf
PerlIOBase_pushed
PerlIOBase_read
+ PerlIOBase_setlinebuf
PerlIOBase_unread
PerlIOBuf_bufsiz
PerlIOBuf_fill
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'}) {
Perl_thread_create
Perl_win32_init
RunPerl
+ win32_async_check
win32_errno
win32_environ
win32_abort
nw_setprotoent
nw_setservent
nw_setsockopt
+ nw_inet_ntoa
nw_shutdown
nw_crypt
nw_execvp
# 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 {
$export{$symbol} = 1;
}
-my $sym_ord = 0;
-
sub output_symbol {
my $symbol = shift;
$symbol = $bincompat5005{$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";
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