$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;
$define{USE_5005THREADS} ||
$define{MULTIPLICITY} ;
+if ($define{USE_ITHREADS} && $PLATFORM ne 'win32' && $^O ne 'darwin') {
+ $define{USE_REENTRANT_API} = 1;
+}
+
# perl.h logic duplication ends
+my $sym_ord = 0;
+
if ($PLATFORM eq 'win32') {
warn join(' ',keys %define)."\n";
- print "LIBRARY Perl57\n";
+ print "LIBRARY perl58\n";
print "DESCRIPTION 'Perl interpreter'\n";
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_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---";
}
elsif ($PLATFORM eq 'netware') {
if ($FILETYPE eq 'def') {
- print "LIBRARY Perl57\n";
+ print "LIBRARY perl58\n";
print "DESCRIPTION 'Perl interpreter for NetWare'\n";
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_getenv_len
Perl_my_pclose
Perl_my_popen
+ Perl_sys_intern_init
+ Perl_sys_intern_dup
+ Perl_sys_intern_clear
+ Perl_my_bcopy
+ Perl_PerlIO_write
+ Perl_PerlIO_unread
+ Perl_PerlIO_tell
+ Perl_PerlIO_stdout
+ Perl_PerlIO_stdin
+ Perl_PerlIO_stderr
+ Perl_PerlIO_setlinebuf
+ Perl_PerlIO_set_ptrcnt
+ Perl_PerlIO_set_cnt
+ Perl_PerlIO_seek
+ Perl_PerlIO_read
+ Perl_PerlIO_get_ptr
+ Perl_PerlIO_get_cnt
+ Perl_PerlIO_get_bufsiz
+ Perl_PerlIO_get_base
+ Perl_PerlIO_flush
+ Perl_PerlIO_fill
+ Perl_PerlIO_fileno
+ Perl_PerlIO_error
+ Perl_PerlIO_eof
+ Perl_PerlIO_close
+ Perl_PerlIO_clearerr
+ PerlIO_perlio
)];
}
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]" };
PerlIO_allocate
PerlIO_arg_fetch
PerlIO_define_layer
+ PerlIO_modestr
PerlIO_pending
PerlIO_push
PerlIO_sv_dup
PerlIO_ungetc
PerlIO_vprintf
PerlIO_write
+ PerlIO_perlio
+ Perl_PerlIO_clearerr
+ Perl_PerlIO_close
+ Perl_PerlIO_eof
+ Perl_PerlIO_error
+ Perl_PerlIO_fileno
+ Perl_PerlIO_fill
+ Perl_PerlIO_flush
+ Perl_PerlIO_get_base
+ Perl_PerlIO_get_bufsiz
+ Perl_PerlIO_get_cnt
+ Perl_PerlIO_get_ptr
+ Perl_PerlIO_read
+ Perl_PerlIO_seek
+ Perl_PerlIO_set_cnt
+ Perl_PerlIO_set_ptrcnt
+ Perl_PerlIO_setlinebuf
+ Perl_PerlIO_stderr
+ Perl_PerlIO_stdin
+ Perl_PerlIO_stdout
+ Perl_PerlIO_tell
+ Perl_PerlIO_unread
+ Perl_PerlIO_write
)];
}
} else {
fnInsertHashListAddrs
fnGetHashListAddrs
Perl_deb
+ Perl_sv_setsv
+ Perl_sv_catsv
+ Perl_sv_catpvn
+ Perl_sv_2pv
))
{
try_symbol($symbol);
output_symbol($symbol);
}
-if ($PLATFORM eq 'netware') {
- # This may not be the right way to do. This is to make sure
- # that the last symbol will not contain a comma else
- # Watcom linker cribs
- print "\tdummy\n";
+if ($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";