# eval { syswrite STDERR, $m1 }; # XXX under utf8, can give
# eval { syswrite STDERR, $m1, $g1 }; # XXX different warnings
# eval { syswrite STDERR, $m1, $g1, $m2 };
-eval { my $x; flock $x, $g1 };
eval { my $x; socket $x, $m1, $g1, $m2 };
eval { my ($x,$y); socketpair $x, $y, $m1, $g1, $m2 };
EXPECT
Use of uninitialized value $m1 in sysseek at - line 6.
Use of uninitialized value $m1 in ref-to-glob cast at - line 7.
Use of uninitialized value $g1 in syswrite at - line 7.
-Use of uninitialized value $x in ref-to-glob cast at - line 11.
-Use of uninitialized value $g1 in flock at - line 11.
-Use of uninitialized value $m2 in socket at - line 12.
-Use of uninitialized value $g1 in socket at - line 12.
-Use of uninitialized value $m1 in socket at - line 12.
-Use of uninitialized value $m2 in socketpair at - line 13.
-Use of uninitialized value $g1 in socketpair at - line 13.
-Use of uninitialized value $m1 in socketpair at - line 13.
+Use of uninitialized value $m2 in socket at - line 11.
+Use of uninitialized value $g1 in socket at - line 11.
+Use of uninitialized value $m1 in socket at - line 11.
+Use of uninitialized value $m2 in socketpair at - line 12.
+Use of uninitialized value $g1 in socketpair at - line 12.
+Use of uninitialized value $m1 in socketpair at - line 12.
+########
+use Config;
+BEGIN {
+ if ( !$Config{d_flock} &&
+ !$Config{d_fcntl_can_lock} &&
+ !$Config{d_lockf} ) {
+ print <<EOM ;
+SKIPPED
+# flock not present
+EOM
+ exit ;
+ }
+}
+use warnings 'uninitialized';
+our ($g1);
+
+eval { my $x; flock $x, $g1 };
+EXPECT
+Use of uninitialized value $x in ref-to-glob cast at - line 16.
+Use of uninitialized value $g1 in flock at - line 16.
########
use warnings 'uninitialized';
my ($m1, $v);