aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-30 04:08:58 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-30 04:08:58 +0000
commit9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c (patch)
tree44df27f8867ae748b1923888bdd9bde08c65034e /sysdeps/generic
parentf58580396d75a6d7429a909444ad8b70dd7dfff8 (diff)
downloadglibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar
glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.gz
glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.tar.bz2
glibc-9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c.zip
Update.
* string/bits/string2.h (strspn): Evaluate first argument if second is "". (strpbrk): Likewise. * sysdeps/i386/i486/bits/string.h: Likewise. * string/Makefile (tests): Add bug-strspn1 and bug-strpbrk1. * string/bug-strspn1.c: New file. * string/bug-strpbrk1.c: New file. Test cases by Joseph S. Myers <jsm28@cam.ac.uk>. * string/bits/string2.h (strncat): Terminate string correctly. * sysdeps/i386/i486/bits/string.h (strncat): Likewise. * string/Makefile (tests): Add bug-strncat1. * string/bug-strncat1.c: New file. Test case by Joseph S. Myers <jsm28@cam.ac.uk>. 2000-10-27 Ben Collins <bcollins@debian.org> * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/lockf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/generic/lockf.c b/sysdeps/generic/lockf.c
index 6e8851bed7..cc264cda56 100644
--- a/sysdeps/generic/lockf.c
+++ b/sysdeps/generic/lockf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,6 +41,7 @@ lockf (int fd, int cmd, off_t len)
case F_TEST:
/* Test the lock: return 0 if FD is unlocked or locked by this process;
return -1, set errno to EACCES, if another process holds the lock. */
+ fl.l_type = F_RDLCK;
if (__fcntl (fd, F_GETLK, &fl) < 0)
return -1;
if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())