diff options
Diffstat (limited to 'gnu/usr.bin/perl/lib/ExtUtils')
-rw-r--r-- | gnu/usr.bin/perl/lib/ExtUtils/XSSymSet.pm | 20 | ||||
-rw-r--r-- | gnu/usr.bin/perl/lib/ExtUtils/t/Embed.t | 7 |
2 files changed, 16 insertions, 11 deletions
diff --git a/gnu/usr.bin/perl/lib/ExtUtils/XSSymSet.pm b/gnu/usr.bin/perl/lib/ExtUtils/XSSymSet.pm index 548c7ea5538..7ef2df39b2d 100644 --- a/gnu/usr.bin/perl/lib/ExtUtils/XSSymSet.pm +++ b/gnu/usr.bin/perl/lib/ExtUtils/XSSymSet.pm @@ -1,13 +1,17 @@ package ExtUtils::XSSymSet; use strict; +use Config; use vars qw( $VERSION ); -$VERSION = '1.1'; +$VERSION = '1.2'; sub new { my($pkg,$maxlen,$silent) = @_; $maxlen ||= 31; + # Allow absurdly long symbols here if we've told the compiler to + # do the shortening for us. + $maxlen = 2048 if $Config{'useshortenedsymbols'}; $silent ||= 0; my($obj) = { '__M@xLen' => $maxlen, '__S!lent' => $silent }; bless $obj, $pkg; @@ -21,6 +25,8 @@ sub trimsym { if (ref $self) { $maxlen ||= $self->{'__M@xLen'}; } $maxlen ||= 31; } + $maxlen = 2048 if $Config{'useshortenedsymbols'}; + unless (defined $silent) { if (ref $self) { $silent ||= $self->{'__S!lent'}; } $silent ||= 0; @@ -165,7 +171,10 @@ Creates an empty C<ExtUtils::XSSymset> set of symbols. This function may be called as a static method or via an existing object. If C<$maxlen> or C<$silent> are specified, they are used as the defaults for maximum name length and warning behavior in future calls to addsym() or -trimsym() via this object. +trimsym() via this object. If the compiler has been instructed to do its +own symbol shortening via C<$Config{'useshortenedsymbols'}>, a value of +2048 is assumed for C<$maxlen> as a way of bypassing the shortening done by +this module. =item addsym($name[,$maxlen[,$silent]]) @@ -191,7 +200,10 @@ to 31. Unless C<$silent> is true, a warning is output if C<$name> is altered in any way. This function may be called either as a static method or via an existing object, but in the latter case no check is made to insure that the resulting name is unique in the -set of symbols. +set of symbols. If the compiler has been instructed to do its +own symbol shortening via C<$Config{'useshortenedsymbols'}>, a value +of 2048 is assumed for C<$maxlen> as a way of bypassing the shortening +done by this module. =item delsym($name) @@ -233,5 +245,5 @@ Charles Bailey E<lt>I<bailey@newman.upenn.edu>E<gt> =head1 REVISION -Last revised 14-Feb-1997, for Perl 5.004. +Last revised 8-Oct-2010, for Perl 5.13.6. diff --git a/gnu/usr.bin/perl/lib/ExtUtils/t/Embed.t b/gnu/usr.bin/perl/lib/ExtUtils/t/Embed.t index 2aece548bfb..269b20ac3a8 100644 --- a/gnu/usr.bin/perl/lib/ExtUtils/t/Embed.t +++ b/gnu/usr.bin/perl/lib/ExtUtils/t/Embed.t @@ -20,7 +20,6 @@ $| = 1; print "1..9\n"; my $cc = $Config{'cc'}; my $cl = ($^O eq 'MSWin32' && $cc eq 'cl'); -my $borl = ($^O eq 'MSWin32' && $cc eq 'bcc32'); my $skip_exe = $^O eq 'os2' && $Config{ldflags} =~ /(?<!\S)-Zexe\b/; my $exe = 'embed_test'; $exe .= $Config{'exe_ext'} unless $skip_exe; # Linker will auto-append it @@ -57,9 +56,6 @@ if ($^O eq 'VMS') { if ($cl) { push(@cmd,$cc,"-Fe$exe"); } - elsif ($borl) { - push(@cmd,$cc,"-o$exe"); - } else { push(@cmd,$cc,'-o' => $exe); } @@ -94,9 +90,6 @@ if ($^O eq 'VMS') { if $^O eq 'os2' and $Config{ldflags} =~ /(?<!\S)-Zomf\b/; push(@cmd,ldopts()); } - if ($borl) { - @cmd = ($cmd[0],(grep{/^-[LI]/}@cmd[1..$#cmd]),(grep{!/^-[LI]/}@cmd[1..$#cmd])); - } if ($^O eq 'aix') { # AIX needs an explicit symbol export list. my ($perl_exp) = grep { -f } qw(perl.exp ../perl.exp); |