/cygdrive in CVS? Time for 1.5.6 soon.

Corinna Vinschen vinschen@redhat.com
Mon Dec 1 17:42:00 GMT 2003

On Mon, Dec 01, 2003 at 06:21:51PM +0100, Corinna Vinschen wrote:
> On Mon, Dec 01, 2003 at 11:57:48AM -0500, Christopher Faylor wrote:
> > I'd like to release 1.5.6 soon and, if this is a real
> > problem, it is not one that we can ignore.
> Not within the next hour I hope.  I'm currently testing the new fcntl64
> stuff to support 64 bit file locking.  I'd like to see this in 1.5.6, too.

Ok, I've checked this in.  I found an interesting thing in the testsuite
while testing this.  The fcntl function is called like this:

  flocks.l_type = F_RDLCK | F_WRLCK;
  fcntl(fd, F_SETLK, &flocks);

According to SUSv3 and the Linux man pages, the l_type is either one of
F_RDLCK (shared lock), F_WRLCK (exclusive lock) or F_UNLCK (unlock).

None of these documents describe these values as or'able.  Nevertheless
the testsuite tests fcntl09 and fcntl10 do it like above, which only
works, if one of F_RDLCK or F_WRLCK is 0.  This is a non-portable
assumption.  F_RDLCK is 1 and F_RDLCK is 2 on Cygwin, together that's
3, which is the value for F_UNLCK.  Too bad.

So these tests failed since they were wrong, not because the locking
in Cygwin is entirely broken.  It's not *quite* correct but the broken
part is not what is tested by fcntl09 and fcntl10.

I fixed both tests and removed the XFAIL marker for both tests from


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

More information about the Cygwin-developers mailing list