73
73
# Is the following guard strictly necessary? Added during refactoring
74
74
# to keep the same behaviour when merging other code into here.
75
75
process_cc_flags(@Config {qw( ccflags optimize) })
76
- if $ARGS { PLATFORM } ne ' win32' ;
76
+ if PLATFORM ne ' win32' ;
77
77
78
78
# Add the compile-time options that miniperl was built with to %define.
79
79
# On Win32 these are not the same options as perl itself will be built
85
85
# minimal configs that don't include any of those options.
86
86
87
87
my @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' ;
89
89
$define {$_ } = 1 foreach @options ;
90
90
91
91
my %exportperlmalloc =
96
96
Perl_calloc => " calloc" ,
97
97
);
98
98
99
- my $exportperlmalloc = $ARGS { PLATFORM } eq ' os2' ;
99
+ my $exportperlmalloc = PLATFORM eq ' os2' ;
100
100
101
101
my $config_h = ' config.h' ;
102
102
open (CFG, ' <' , $config_h ) || die " Cannot open $config_h : $! \n " ;
@@ -120,7 +120,7 @@ BEGIN
120
120
$define {USE_ITHREADS } ||
121
121
$define {PERL_IMPLICIT_CONTEXT } ;
122
122
123
- if ($define {USE_ITHREADS } && $ARGS { PLATFORM } ne ' win32' ) {
123
+ if ($define {USE_ITHREADS } && PLATFORM ne ' win32' ) {
124
124
$define {USE_REENTRANT_API } = 1;
125
125
}
126
126
@@ -155,7 +155,7 @@ BEGIN
155
155
if ($define {USE_LOCALE_THREADS } && ! $define {NO_THREAD_SAFE_LOCALE })
156
156
{
157
157
if ( $define {USE_POSIX_2008_LOCALE }
158
- || ($ARGS { PLATFORM } eq ' win32' && ( $cctype !~ / \D /
158
+ || (PLATFORM eq ' win32' && ( $cctype !~ / \D /
159
159
&& $cctype >= 80)))
160
160
{
161
161
$define {USE_THREAD_SAFE_LOCALE } = 1;
@@ -175,7 +175,7 @@ BEGIN
175
175
$define {USE_PL_CUR_LC_ALL } = 1;
176
176
}
177
177
178
- if ($ARGS { PLATFORM } eq ' win32' && $define {USE_THREAD_SAFE_LOCALE })
178
+ if (PLATFORM eq ' win32' && $define {USE_THREAD_SAFE_LOCALE })
179
179
{
180
180
$define {USE_PL_CUR_LC_ALL } = 1;
181
181
@@ -185,8 +185,8 @@ BEGIN
185
185
}
186
186
187
187
if ($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 })))
190
190
{
191
191
$define {USE_PERL_SWITCH_LOCALE_CONTEXT }
192
192
}
@@ -195,12 +195,12 @@ BEGIN
195
195
# ==========================================================================
196
196
197
197
print STDERR " Defines: (" . join (' ' , sort keys %define ) . " )\n "
198
- unless $ARGS { PLATFORM } eq ' test' ;
198
+ unless PLATFORM eq ' test' ;
199
199
200
200
my $sym_ord = 0;
201
201
my %ordinal ;
202
202
203
- if ($ARGS { PLATFORM } eq ' os2' ) {
203
+ if (PLATFORM eq ' os2' ) {
204
204
if (open my $fh , ' <' , ' perl5.def' ) {
205
205
while (<$fh >) {
206
206
last if / ^\s *EXPORTS\b / ;
@@ -250,7 +250,7 @@ sub readvar {
250
250
}
251
251
}
252
252
253
- if ($ARGS { PLATFORM } ne ' os2' ) {
253
+ if (PLATFORM ne ' os2' ) {
254
254
++$skip {$_ } foreach qw(
255
255
PL_opsave
256
256
Perl_dump_fds
@@ -263,15 +263,15 @@ sub readvar {
263
263
Perl_my_ntohl
264
264
Perl_my_swap
265
265
) ;
266
- if ($ARGS { PLATFORM } eq ' vms' ) {
266
+ if (PLATFORM eq ' vms' ) {
267
267
++$skip {PL_statusvalue_posix };
268
268
# This is a wrapper if we have symlink, not a replacement
269
269
# if we don't.
270
270
++$skip {Perl_my_symlink } unless $Config {d_symlink };
271
271
} else {
272
272
++$skip {PL_statusvalue_vms };
273
273
++$skip {PL_perllib_sep };
274
- if ($ARGS { PLATFORM } ne ' aix' ) {
274
+ if (PLATFORM ne ' aix' ) {
275
275
++$skip {$_ } foreach qw(
276
276
PL_DBcv
277
277
PL_generation
@@ -283,14 +283,14 @@ sub readvar {
283
283
}
284
284
}
285
285
286
- if ($ARGS { PLATFORM } ne ' vms' ) {
286
+ if (PLATFORM ne ' vms' ) {
287
287
# VMS does its own thing for these symbols.
288
288
++$skip {$_ } foreach qw(
289
289
PL_sig_handlers_initted
290
290
PL_sig_ignoring
291
291
PL_sig_defaulting
292
292
) ;
293
- if ($ARGS { PLATFORM } ne ' win32' ) {
293
+ if (PLATFORM ne ' win32' ) {
294
294
++$skip {$_ } foreach qw(
295
295
Perl_do_spawn
296
296
Perl_do_spawn_nowait
@@ -299,7 +299,7 @@ sub readvar {
299
299
}
300
300
}
301
301
302
- if ($ARGS { PLATFORM } ne ' win32' ) {
302
+ if (PLATFORM ne ' win32' ) {
303
303
++$skip {$_ } foreach qw(
304
304
Perl_get_win32_message_utf8ness
305
305
Perl_Win_utf8_string_to_wstring
@@ -550,14 +550,14 @@ sub readvar {
550
550
if ($define {HAS_SIGACTION }) {
551
551
++$skip {PL_sig_trapped };
552
552
553
- if ($ARGS { PLATFORM } eq ' vms' ) {
553
+ if (PLATFORM eq ' vms' ) {
554
554
# FAKE_PERSISTENT_SIGNAL_HANDLERS defined as !defined(HAS_SIGACTION)
555
555
++$skip {PL_sig_ignoring };
556
556
++$skip {PL_sig_handlers_initted } unless $define {KILL_BY_SIGPRC };
557
557
}
558
558
}
559
559
560
- if ($ARGS { PLATFORM } eq ' vms' && !$define {KILL_BY_SIGPRC }) {
560
+ if (PLATFORM eq ' vms' && !$define {KILL_BY_SIGPRC }) {
561
561
# FAKE_DEFAULT_SIGNAL_HANDLERS defined as KILL_BY_SIGPRC
562
562
++$skip {Perl_csighandler_init };
563
563
++$skip {Perl_my_kill };
@@ -793,7 +793,7 @@ sub readvar {
793
793
PerlIO_tmpfile
794
794
) );
795
795
796
- if ($ARGS { PLATFORM } eq ' win32' ) {
796
+ if (PLATFORM eq ' win32' ) {
797
797
try_symbols(qw(
798
798
win32_free_childdir
799
799
win32_free_childenv
@@ -958,7 +958,7 @@ sub readvar {
958
958
win32_readlink
959
959
) );
960
960
}
961
- elsif ($ARGS { PLATFORM } eq ' vms' ) {
961
+ elsif (PLATFORM eq ' vms' ) {
962
962
try_symbols(qw(
963
963
Perl_cando
964
964
Perl_cando_by_name
@@ -1043,7 +1043,7 @@ sub readvar {
1043
1043
PerlIO_openn
1044
1044
) );
1045
1045
}
1046
- elsif ($ARGS { PLATFORM } eq ' os2' ) {
1046
+ elsif (PLATFORM eq ' os2' ) {
1047
1047
try_symbols(qw(
1048
1048
ctermid
1049
1049
get_sysinfo
@@ -1119,7 +1119,7 @@ sub readvar {
1119
1119
# static extensions with -fPIC, but links them to perl, not libperl.so
1120
1120
# The VMS build scripts don't yet implement static extensions at all.
1121
1121
1122
- if ($ARGS { PLATFORM } eq ' win32' ) {
1122
+ if (PLATFORM eq ' win32' ) {
1123
1123
# records of type boot_module for statically linked modules (except Dynaloader)
1124
1124
my $static_ext = $Config {static_ext } // " " ;
1125
1125
$static_ext =~ s /\/ / __/ g ;
@@ -1128,7 +1128,7 @@ sub readvar {
1128
1128
try_symbols(" init_Win32CORE" ) if $static_ext =~ / \b Win32CORE\b / ;
1129
1129
}
1130
1130
1131
- if ($ARGS { PLATFORM } eq ' os2' ) {
1131
+ if (PLATFORM eq ' os2' ) {
1132
1132
my (%mapped , @missing );
1133
1133
open MAP, ' <' , ' miniperl.map' or die ' Cannot read miniperl.map' ;
1134
1134
/ ^\s *[\d a-f:]+\s +(\w +)/i and $mapped {$1 }++ foreach <MAP>;
@@ -1146,7 +1146,7 @@ sub readvar {
1146
1146
1147
1147
# Start with platform specific headers:
1148
1148
1149
- if ($ARGS { PLATFORM } eq ' win32' ) {
1149
+ if (PLATFORM eq ' win32' ) {
1150
1150
my $dll = $define {PERL_DLL } ? $define {PERL_DLL } =~ s /\. dll$// ir
1151
1151
: " perl$Config {api_revision}$Config {api_version}" ;
1152
1152
print " LIBRARY $dll \n " ;
@@ -1157,7 +1157,7 @@ sub readvar {
1157
1157
}
1158
1158
print " EXPORTS\n " ;
1159
1159
}
1160
- elsif ($ARGS { PLATFORM } eq ' os2' ) {
1160
+ elsif (PLATFORM eq ' os2' ) {
1161
1161
(my $v = $] ) =~ s / (\d\.\d\d\d )(\d\d )$/ $1_$2 / ;
1162
1162
$v .= ' -thread' if $Config {archname } =~ / -thread/ ;
1163
1163
(my $dll = $define {PERL_DLL }) =~ s /\. dll$// i ;
@@ -1173,7 +1173,7 @@ sub readvar {
1173
1173
EXPORTS
1174
1174
---EOP---
1175
1175
}
1176
- elsif ($ARGS { PLATFORM } eq ' aix' ) {
1176
+ elsif (PLATFORM eq ' aix' ) {
1177
1177
my $OSVER = ` uname -v` ;
1178
1178
chop $OSVER ;
1179
1179
my $OSREL = ` uname -r` ;
@@ -1212,7 +1212,7 @@ sub readvar {
1212
1212
1213
1213
# Then platform specific footers.
1214
1214
1215
- if ($ARGS { PLATFORM } eq ' os2' ) {
1215
+ if (PLATFORM eq ' os2' ) {
1216
1216
print <<EOP ;
1217
1217
dll_perlmain=main
1218
1218
fill_extLibpath
0 commit comments