l_start == 0 and l_len == 1 as we do l_len == 0.
+2002-11-10 Roland McGrath <roland@frob.com>
+
+ * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Treat a struct flock with
+ l_start == 0 and l_len == 1 as we do l_len == 0.
+
2002-11-10 Ulrich Drepper <drepper@redhat.com>
* po/da.po: Update from translation team.
switch (fl->l_whence)
{
case SEEK_SET:
- if (fl->l_start == 0 && fl->l_len == 0)
+ if (fl->l_start == 0 && fl->l_len == 0) /* Whole file request. */
+ break;
+ /* It seems to be common for applications to lock the first
+ byte of the file when they are really doing whole-file locking.
+ So, since it's so wrong already, might as well do that too. */
+ if (fl->l_start == 0 && fl->l_len == 1)
break;
/* FALLTHROUGH */
case SEEK_CUR: