# This attempts to mirror the #ifdef forest found in perl.h so that we
# know when to run these tests. If that forest ever changes, change
# it here too or expect test gratuitous test failures.
-if ($Config{useperlio} || $Config{fflushNULL} || $Config{d_sfio}) {
+my $useperlio = defined $Config{useperlio} ? $Config{useperlio} eq 'define' ? 1 : 0 : 0;
+my $fflushNULL = defined $Config{fflushNULL} ? $Config{fflushNULL} eq 'define' ? 1 : 0 : 0;
+my $d_sfio = defined $Config{d_sfio} ? $Config{d_sfio} eq 'define' ? 1 : 0 : 0;
+my $fflushall = defined $Config{fflushall} ? $Config{fflushall} eq 'define' ? 1 : 0 : 0;
+my $d_fork = defined $Config{d_fork} ? $Config{d_fork} eq 'define' ? 1 : 0 : 0;
+
+if ($useperlio || $fflushNULL || $d_sfio) {
print "1..4\n";
} else {
- if ($Config{fflushall}) {
+ if ($fflushall) {
print "1..4\n";
} else {
print "1..0 # Skip: fflush(NULL) or equivalent not available\n";
$| = 0; # we want buffered output
# Test flush on fork/exec
-if ($Config{d_fork} ne "define") {
+if (!$d_fork) {
print "ok 1 # skipped: no fork\n";
} else {
my $f = "ff-fork-$$";