7373# Is the following guard strictly necessary? Added during refactoring
7474# to keep the same behaviour when merging other code into here.
7575process_cc_flags(@Config {qw( ccflags optimize) })
76- if $ARGS { PLATFORM } ne ' win32' ;
76+ if PLATFORM ne ' win32' ;
7777
7878# Add the compile-time options that miniperl was built with to %define.
7979# On Win32 these are not the same options as perl itself will be built
8585# minimal configs that don't include any of those options.
8686
8787my @options = sort (Config::bincompat_options(), Config::non_bincompat_options());
88- print STDERR " Options: (@options )\n " unless $ARGS { PLATFORM } eq ' test' ;
88+ print STDERR " Options: (@options )\n " unless PLATFORM eq ' test' ;
8989$define {$_ } = 1 foreach @options ;
9090
9191my %exportperlmalloc =
9696 Perl_calloc => " calloc" ,
9797 );
9898
99- my $exportperlmalloc = $ARGS { PLATFORM } eq ' os2' ;
99+ my $exportperlmalloc = PLATFORM eq ' os2' ;
100100
101101my $config_h = ' config.h' ;
102102open (CFG, ' <' , $config_h ) || die " Cannot open $config_h : $! \n " ;
@@ -120,7 +120,7 @@ BEGIN
120120 $define {USE_ITHREADS } ||
121121 $define {PERL_IMPLICIT_CONTEXT } ;
122122
123- if ($define {USE_ITHREADS } && $ARGS { PLATFORM } ne ' win32' ) {
123+ if ($define {USE_ITHREADS } && PLATFORM ne ' win32' ) {
124124 $define {USE_REENTRANT_API } = 1;
125125}
126126
@@ -155,7 +155,7 @@ BEGIN
155155if ($define {USE_LOCALE_THREADS } && ! $define {NO_THREAD_SAFE_LOCALE })
156156{
157157 if ( $define {USE_POSIX_2008_LOCALE }
158- || ($ARGS { PLATFORM } eq ' win32' && ( $cctype !~ / \D /
158+ || (PLATFORM eq ' win32' && ( $cctype !~ / \D /
159159 && $cctype >= 80)))
160160 {
161161 $define {USE_THREAD_SAFE_LOCALE } = 1;
@@ -175,7 +175,7 @@ BEGIN
175175 $define {USE_PL_CUR_LC_ALL } = 1;
176176}
177177
178- if ($ARGS { PLATFORM } eq ' win32' && $define {USE_THREAD_SAFE_LOCALE })
178+ if (PLATFORM eq ' win32' && $define {USE_THREAD_SAFE_LOCALE })
179179{
180180 $define {USE_PL_CUR_LC_ALL } = 1;
181181
@@ -185,8 +185,8 @@ BEGIN
185185}
186186
187187if ($define {MULTIPLICITY } && ( $define {USE_POSIX_2008_LOCALE }
188- || ( $define { WIN32 }
189- && $define {USE_THREAD_SAFE_LOCALE })))
188+ || ( PLATFORM eq ' win32 '
189+ && $define {USE_THREAD_SAFE_LOCALE })))
190190{
191191 $define {USE_PERL_SWITCH_LOCALE_CONTEXT }
192192}
@@ -195,12 +195,12 @@ BEGIN
195195# ==========================================================================
196196
197197print STDERR " Defines: (" . join (' ' , sort keys %define ) . " )\n "
198- unless $ARGS { PLATFORM } eq ' test' ;
198+ unless PLATFORM eq ' test' ;
199199
200200my $sym_ord = 0;
201201my %ordinal ;
202202
203- if ($ARGS { PLATFORM } eq ' os2' ) {
203+ if (PLATFORM eq ' os2' ) {
204204 if (open my $fh , ' <' , ' perl5.def' ) {
205205 while (<$fh >) {
206206 last if / ^\s *EXPORTS\b / ;
@@ -250,7 +250,7 @@ sub readvar {
250250 }
251251}
252252
253- if ($ARGS { PLATFORM } ne ' os2' ) {
253+ if (PLATFORM ne ' os2' ) {
254254 ++$skip {$_ } foreach qw(
255255 PL_opsave
256256 Perl_dump_fds
@@ -263,15 +263,15 @@ sub readvar {
263263 Perl_my_ntohl
264264 Perl_my_swap
265265 ) ;
266- if ($ARGS { PLATFORM } eq ' vms' ) {
266+ if (PLATFORM eq ' vms' ) {
267267 ++$skip {PL_statusvalue_posix };
268268 # This is a wrapper if we have symlink, not a replacement
269269 # if we don't.
270270 ++$skip {Perl_my_symlink } unless $Config {d_symlink };
271271 } else {
272272 ++$skip {PL_statusvalue_vms };
273273 ++$skip {PL_perllib_sep };
274- if ($ARGS { PLATFORM } ne ' aix' ) {
274+ if (PLATFORM ne ' aix' ) {
275275 ++$skip {$_ } foreach qw(
276276 PL_DBcv
277277 PL_generation
@@ -283,14 +283,14 @@ sub readvar {
283283 }
284284}
285285
286- if ($ARGS { PLATFORM } ne ' vms' ) {
286+ if (PLATFORM ne ' vms' ) {
287287 # VMS does its own thing for these symbols.
288288 ++$skip {$_ } foreach qw(
289289 PL_sig_handlers_initted
290290 PL_sig_ignoring
291291 PL_sig_defaulting
292292 ) ;
293- if ($ARGS { PLATFORM } ne ' win32' ) {
293+ if (PLATFORM ne ' win32' ) {
294294 ++$skip {$_ } foreach qw(
295295 Perl_do_spawn
296296 Perl_do_spawn_nowait
@@ -299,7 +299,7 @@ sub readvar {
299299 }
300300}
301301
302- if ($ARGS { PLATFORM } ne ' win32' ) {
302+ if (PLATFORM ne ' win32' ) {
303303 ++$skip {$_ } foreach qw(
304304 Perl_get_win32_message_utf8ness
305305 Perl_Win_utf8_string_to_wstring
@@ -550,14 +550,14 @@ sub readvar {
550550if ($define {HAS_SIGACTION }) {
551551 ++$skip {PL_sig_trapped };
552552
553- if ($ARGS { PLATFORM } eq ' vms' ) {
553+ if (PLATFORM eq ' vms' ) {
554554 # FAKE_PERSISTENT_SIGNAL_HANDLERS defined as !defined(HAS_SIGACTION)
555555 ++$skip {PL_sig_ignoring };
556556 ++$skip {PL_sig_handlers_initted } unless $define {KILL_BY_SIGPRC };
557557 }
558558}
559559
560- if ($ARGS { PLATFORM } eq ' vms' && !$define {KILL_BY_SIGPRC }) {
560+ if (PLATFORM eq ' vms' && !$define {KILL_BY_SIGPRC }) {
561561 # FAKE_DEFAULT_SIGNAL_HANDLERS defined as KILL_BY_SIGPRC
562562 ++$skip {Perl_csighandler_init };
563563 ++$skip {Perl_my_kill };
@@ -793,7 +793,7 @@ sub readvar {
793793 PerlIO_tmpfile
794794 ) );
795795
796- if ($ARGS { PLATFORM } eq ' win32' ) {
796+ if (PLATFORM eq ' win32' ) {
797797 try_symbols(qw(
798798 win32_free_childdir
799799 win32_free_childenv
@@ -958,7 +958,7 @@ sub readvar {
958958 win32_readlink
959959 ) );
960960}
961- elsif ($ARGS { PLATFORM } eq ' vms' ) {
961+ elsif (PLATFORM eq ' vms' ) {
962962 try_symbols(qw(
963963 Perl_cando
964964 Perl_cando_by_name
@@ -1043,7 +1043,7 @@ sub readvar {
10431043 PerlIO_openn
10441044 ) );
10451045}
1046- elsif ($ARGS { PLATFORM } eq ' os2' ) {
1046+ elsif (PLATFORM eq ' os2' ) {
10471047 try_symbols(qw(
10481048 ctermid
10491049 get_sysinfo
@@ -1119,7 +1119,7 @@ sub readvar {
11191119# static extensions with -fPIC, but links them to perl, not libperl.so
11201120# The VMS build scripts don't yet implement static extensions at all.
11211121
1122- if ($ARGS { PLATFORM } eq ' win32' ) {
1122+ if (PLATFORM eq ' win32' ) {
11231123 # records of type boot_module for statically linked modules (except Dynaloader)
11241124 my $static_ext = $Config {static_ext } // " " ;
11251125 $static_ext =~ s /\/ / __/ g ;
@@ -1128,7 +1128,7 @@ sub readvar {
11281128 try_symbols(" init_Win32CORE" ) if $static_ext =~ / \b Win32CORE\b / ;
11291129}
11301130
1131- if ($ARGS { PLATFORM } eq ' os2' ) {
1131+ if (PLATFORM eq ' os2' ) {
11321132 my (%mapped , @missing );
11331133 open MAP, ' <' , ' miniperl.map' or die ' Cannot read miniperl.map' ;
11341134 / ^\s *[\d a-f:]+\s +(\w +)/i and $mapped {$1 }++ foreach <MAP>;
@@ -1146,7 +1146,7 @@ sub readvar {
11461146
11471147# Start with platform specific headers:
11481148
1149- if ($ARGS { PLATFORM } eq ' win32' ) {
1149+ if (PLATFORM eq ' win32' ) {
11501150 my $dll = $define {PERL_DLL } ? $define {PERL_DLL } =~ s /\. dll$// ir
11511151 : " perl$Config {api_revision}$Config {api_version}" ;
11521152 print " LIBRARY $dll \n " ;
@@ -1157,7 +1157,7 @@ sub readvar {
11571157 }
11581158 print " EXPORTS\n " ;
11591159}
1160- elsif ($ARGS { PLATFORM } eq ' os2' ) {
1160+ elsif (PLATFORM eq ' os2' ) {
11611161 (my $v = $] ) =~ s / (\d\.\d\d\d )(\d\d )$/ $1_$2 / ;
11621162 $v .= ' -thread' if $Config {archname } =~ / -thread/ ;
11631163 (my $dll = $define {PERL_DLL }) =~ s /\. dll$// i ;
@@ -1173,7 +1173,7 @@ sub readvar {
11731173EXPORTS
11741174---EOP---
11751175}
1176- elsif ($ARGS { PLATFORM } eq ' aix' ) {
1176+ elsif (PLATFORM eq ' aix' ) {
11771177 my $OSVER = ` uname -v` ;
11781178 chop $OSVER ;
11791179 my $OSREL = ` uname -r` ;
@@ -1212,7 +1212,7 @@ sub readvar {
12121212
12131213# Then platform specific footers.
12141214
1215- if ($ARGS { PLATFORM } eq ' os2' ) {
1215+ if (PLATFORM eq ' os2' ) {
12161216 print <<EOP ;
12171217 dll_perlmain=main
12181218 fill_extLibpath
0 commit comments