This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
flock() on Windows should set proper errno numbers.
It used to set errno to GetLastError(), which is from an
incompatible set of error codes. That doesn't make any
sense, especially since the GetLastError() value is also
available at the Perl level via $^E.
It is important for autodie.pm that flock() will set
$! to WSAWOULDBLOCK when GetLastError() returns
ERROR_LOCK_VIOLATION because that is the value POSIX.pm
now returns for POSIX::EWOULDBLOCK.