This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
boot_Win32CORE needs to be XS_EXTERNAL() following commit ab1478f7146843f7.
[perl5.git] / makedef.pl
index 865b5ff..a4b5ced 100644 (file)
@@ -177,7 +177,7 @@ sub readvar {
     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;
@@ -487,6 +487,11 @@ unless ($define{HAS_MMAP}) {
 
 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}) {
@@ -731,17 +736,15 @@ if ($define{'USE_PERLIO'}) {
 # 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
@@ -1278,7 +1281,8 @@ if ($ARGS{PLATFORM} eq 'os2') {
 # 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.
@@ -1316,7 +1320,7 @@ elsif ($ARGS{PLATFORM} eq 'aix') {
 }
 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";
        }