In makedef.pl, consolidate all the code conditional on PERL_IMPLICIT_SYS.
authorNicholas Clark <nick@ccl4.org>
Mon, 25 Jul 2011 13:00:41 +0000 (15:00 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Aug 2011 09:53:54 +0000 (11:53 +0200)
Previously the conditional skips were for all platforms (in two places, both
added in commit 7766f1371a6d2b58, whereas the conditional additions to the
export lists were in platform specific blocks for Win32, WinCE and NetWare.
Given that only those 3 platforms can (currently) build with
-DPERL_IMPLICIT_SYS, it's safe to implicitly remove the platform check for
those export additions by moving the code.

makedef.pl

index 22d989e..0a561c4 100644 (file)
@@ -169,12 +169,6 @@ if ($PLATFORM =~ /^win(?:32|ce)$/) {
        print "DESCRIPTION 'Perl interpreter'\n";
     }
     print "EXPORTS\n";
-    if ($define{PERL_IMPLICIT_SYS}) {
-       ++$export{$_} foreach qw(perl_get_host_info perl_alloc_override);
-    }
-    if ($define{USE_ITHREADS} and $define{PERL_IMPLICIT_SYS}) {
-       ++$export{perl_clone_host};
-    }
 }
 elsif ($PLATFORM eq 'os2') {
     if (open my $fh, '<', 'perl5.def') {
@@ -220,12 +214,6 @@ elsif ($PLATFORM eq 'netware') {
        print "DESCRIPTION 'Perl interpreter for NetWare'\n";
        print "EXPORTS\n";
        }
-       if ($define{PERL_IMPLICIT_SYS}) {
-           ++$export{$_} foreach qw(perl_get_host_info perl_alloc_override);
-       }
-       if ($define{USE_ITHREADS} and $define{PERL_IMPLICIT_SYS}) {
-           ++$export{perl_clone_host};
-       }
 }
 
 sub skip_symbols {
@@ -487,6 +475,8 @@ if ($define{'PERL_IMPLICIT_SYS'}) {
                    Perl_my_popen
                    Perl_my_pclose
                    )];
+    ++$export{$_} foreach qw(perl_get_host_info perl_alloc_override);
+    ++$export{perl_clone_host} if $define{USE_ITHREADS};
 }
 else {
     skip_symbols [qw(
@@ -499,6 +489,8 @@ else {
                    PL_Dir
                    PL_Sock
                    PL_Proc
+                   perl_alloc_using
+                   perl_clone_using
                    )];
 }
 
@@ -643,13 +635,6 @@ unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
                    )];
 }
 
-unless ($define{'PERL_IMPLICIT_SYS'}) {
-    skip_symbols [qw(
-                   perl_alloc_using
-                   perl_clone_using
-                   )];
-}
-
 unless ($define{'PL_OP_SLAB_ALLOC'}) {
     skip_symbols [qw(
                      PL_OpPtr