# Create the export list for perl.
#
# Needed by WIN32 and OS/2 for creating perl.dll,
-# and by AIX for creating libperl.a when -Dusershrplib is in effect,
+# and by AIX for creating libperl.a when -Duseshrplib is in effect,
# and by VMS for creating perlshr.exe.
#
# Reads from information stored in
while (<$vars>) {
# All symbols have a Perl_ prefix because that's what embed.h sticks
# in front of them. The A?I?S?C? is strictly speaking wrong.
- next unless /\bPERLVAR(A?I?S?C?)\(([IGT])(\w+)/;
+ next unless /\bPERLVAR(A?I?S?C?)\(([IGT]),\s*(\w+)/;
my $var = "PL_$3";
my $symbol = $proc ? &$proc($1,$2,$3) : $var;
if ($define{HAS_SIGACTION}) {
++$skip{PL_sig_trapped};
+
+ if ($ARGS{PLATFORM} eq 'vms') {
+ # FAKE_PERSISTENT_SIGNAL_HANDLERS defined as !defined(HAS_SIGACTION)
+ ++$skip{PL_sig_ignoring};
+ }
}
unless ($define{USE_LOCALE_COLLATE}) {
# many symbols against them.
for my $syms (@syms) {
- open (GLOBAL, "<$syms") || die "failed to open $syms: $!\n";
- while (<GLOBAL>) {
- next if (!/^[A-Za-z]/);
- # Functions have a Perl_ prefix
- # Variables have a PL_ prefix
- chomp($_);
- my $symbol = ($syms =~ /var\.sym$/i ? "PL_" : "");
- $symbol .= $_;
+ open my $global, '<', $syms or die "failed to open $syms: $!\n";
+ # Functions already have a Perl_ prefix
+ # Variables need a PL_ prefix
+ my $prefix = $syms =~ /var\.sym$/i ? 'PL_' : '';
+ while (<$global>) {
+ next unless /^([A-Za-z].*)/;
+ my $symbol = "$prefix$1";
++$export{$symbol} unless exists $skip{$symbol};
}
- close(GLOBAL);
}
# variables
# Start with platform specific headers:
if ($ARGS{PLATFORM} =~ /^win(?:32|ce)$/) {
- (my $dll = ($define{PERL_DLL} || "perl515")) =~ s/\.dll$//i;
+ my $dll = $define{PERL_DLL} ? $define{PERL_DLL} =~ s/\.dll$//ir
+ : "perl$Config{api_revision}$Config{api_version}";
print "LIBRARY $dll\n";
# The DESCRIPTION module definition file statement is not supported
# by VC7 onwards.
}
elsif ($ARGS{PLATFORM} eq 'netware') {
if ($ARGS{FILETYPE} eq 'def') {
- print "LIBRARY perl515\n";
+ print "LIBRARY perl$Config{api_revision}$Config{api_version}\n";
print "DESCRIPTION 'Perl interpreter for NetWare'\n";
print "EXPORTS\n";
}