This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move `use strict;` *out* of the BEGIN block in makedef.pl
[perl5.git] / makedef.pl
index 41cfecb..caf3be1 100644 (file)
 #    perl.imp    NetWare
 #    makedef.lis VMS
 
+use strict;
+use Config;
+
 my $fold;
 my %ARGS;
 my %define;
 
 BEGIN {
-    BEGIN { unshift @INC, "lib" }
-    use Config;
-    use strict;
-
     %ARGS = (CCTYPE => 'MSVC', TARG_DIR => '');
 
     sub process_cc_flags {
@@ -117,9 +116,9 @@ if ($define{USE_ITHREADS}) {
     }
 }
 
-$define{PERL_IMPLICIT_CONTEXT} ||=
+$define{MULTIPLICITY} ||=
     $define{USE_ITHREADS} ||
-    $define{MULTIPLICITY} ;
+    $define{PERL_IMPLICIT_CONTEXT} ;
 
 if ($define{USE_ITHREADS} && $ARGS{PLATFORM} ne 'win32' && $ARGS{PLATFORM} ne 'netware') {
     $define{USE_REENTRANT_API} = 1;
@@ -189,6 +188,10 @@ my %skip;
 # All platforms export boot_DynaLoader unconditionally.
 my %export = ( boot_DynaLoader => 1 );
 
+# d_thread_local not perl_thread_local - see hints/darwin.sh
+++$export{PL_current_context}
+    if defined $Config{d_thread_local} && $define{USE_ITHREADS};
+
 sub try_symbols {
     foreach my $symbol (@_) {
        ++$export{$symbol} unless exists $skip{$symbol};
@@ -219,7 +222,6 @@ sub readvar {
 
 if ($ARGS{PLATFORM} ne 'os2') {
     ++$skip{$_} foreach qw(
-                    PL_cryptseen
                     PL_opsave
                     Perl_dump_fds
                     Perl_my_bcopy
@@ -428,7 +430,7 @@ unless ( $define{'HAS_NEWLOCALE'}
     );
 }
 
-unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
+unless ($define{'MULTIPLICITY'}) {
     ++$skip{$_} foreach qw(
                    PL_my_cxt_index
                    PL_my_cxt_list
@@ -456,9 +458,6 @@ unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
 if ($define{USE_THREAD_SAFE_LOCALE}) {
     ++$skip{PL_lc_numeric_mutex};
     ++$skip{PL_lc_numeric_mutex_depth};
-    if (! $define{TS_W32_BROKEN_LOCALECONV}) {
-        ++$skip{PL_locale_mutex};
-    }
 }
 
 unless ($define{'USE_DTRACE'}) {
@@ -490,6 +489,10 @@ unless ($define{'PERL_TRACK_MEMPOOL'}) {
     ++$skip{PL_memory_debug_header};
 }
 
+unless ($define{'PERL_MEM_LOG'}) {
+    ++$skip{PL_mem_log};
+}
+
 unless ($define{'MULTIPLICITY'}) {
     ++$skip{$_} foreach qw(
                    PL_interp_size
@@ -911,6 +914,9 @@ if ($ARGS{PLATFORM} eq 'win32') {
                    win32_puts
                    win32_getchar
                    win32_putchar
+                    win32_symlink
+                    win32_lstat
+                    win32_readlink
                 ));
 }
 elsif ($ARGS{PLATFORM} eq 'vms') {