diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2002-02-21 01:02:48 -0500 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-02-21 12:45:28 +0000 |
commit | 52e4c28238dd5834ab1196c65b774cc4e074cf56 (patch) | |
tree | 071879333716c476e9776eb6c6d6841fa3ffab41 | |
parent | 65197d9353c381a2c9b77780fe37feba9ff535ab (diff) | |
download | perl-52e4c28238dd5834ab1196c65b774cc4e074cf56.tar.gz |
cosmetic OS/2 patches
Message-Id: <20020221060248.A29705@math.ohio-state.edu>
p4raw-link: @14577 on //depot/perl: 0ad5258ff3f3328f321188cbb4fcd6a74b365431
p4raw-id: //depot/perl@14810
-rw-r--r-- | lib/ExtUtils/Mksymlists.pm | 7 | ||||
-rw-r--r-- | makedef.pl | 26 |
2 files changed, 27 insertions, 6 deletions
diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index 1b88b3e37c..4159b946c5 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 = <<EOC; +Perl (v$Config::Config{version}$threaded$patchlevel) module $data->{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 c6a535556e..b75eff987e 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"; |