From: Ilya Zakharevich Date: Thu, 21 Feb 2002 06:02:48 +0000 (-0500) Subject: cosmetic OS/2 patches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52e4c28238dd5834ab1196c65b774cc4e074cf56;p=p5sagit%2Fp5-mst-13.2.git cosmetic OS/2 patches Message-Id: <20020221060248.A29705@math.ohio-state.edu> p4raw-link: @14577 on //depot/perl: 0ad5258ff3f3328f321188cbb4fcd6a74b365431 p4raw-id: //depot/perl@14810 --- diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 1b88b3e..4159b94 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -82,7 +82,12 @@ sub _write_os2 { } my $distname = $data->{DISTNAME} || $data->{NAME}; $distname = "Distribution $distname"; - my $comment = "Perl (v$Config::Config{version}$threaded) module $data->{NAME}"; + my $patchlevel = $Config{perl_patchlevel} || ''; + $patchlevel = " pl$patchlevel" if $patchlevel; + my $comment = <{NAME} +EOC + chomp $comment; if ($data->{INSTALLDIRS} and $data->{INSTALLDIRS} eq 'perl') { $distname = 'perl5-porters@perl.org'; $comment = "Core $comment"; diff --git a/makedef.pl b/makedef.pl index c6a5355..b75eff9 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); @@ -121,6 +122,8 @@ if ($define{USE_ITHREADS}) { } } +my $sym_ord = 0; + $define{PERL_IMPLICIT_CONTEXT} ||= $define{USE_ITHREADS} || $define{USE_5005THREADS} || @@ -140,9 +143,21 @@ if ($PLATFORM eq 'win32') { } } 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---"; @@ -1105,6 +1120,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 { @@ -1113,8 +1130,6 @@ sub emit_symbol { $export{$symbol} = 1; } -my $sym_ord = 0; - sub output_symbol { my $symbol = shift; $symbol = $bincompat5005{$symbol} @@ -1145,7 +1160,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";