SKIP: {
skip("no fchdir", 16) unless $has_fchdir;
- my $has_dirfd = ($Config{d_dirfd} || "") eq "define";
+ my $has_dirfd = ($Config{d_dirfd} || $Config{d_dir_dd_fd} || "") eq "define";
ok(opendir(my $dh, "."), "opendir .");
ok(open(my $fh, "<", "op"), "open op");
ok(chdir($fh), "fchdir op");
ok(-d "op", "verify that we are back");
# And now the ambiguous case
- ok(opendir(H, "op"), "opendir op") or diag $!;
- ok(open(H, "<", "base"), "open base") or diag $!;
- if (($Config{d_dirfd} || "") eq "define") {
+ {
+ no warnings qw<io deprecated>;
+ ok(opendir(H, "op"), "opendir op") or diag $!;
+ ok(open(H, "<", "base"), "open base") or diag $!;
+ }
+ if ($has_dirfd) {
ok(chdir(H), "fchdir to op");
ok(-f "chdir.t", "verify that we are in 'op'");
chdir ".." or die $!;