From 9c3b1ceba810a51cb0069644e1bc72cb9a1cbc8c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Oct 2000 04:08:58 +0000 Subject: 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 . * 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 . 2000-10-27 Ben Collins * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper --- sysdeps/generic/lockf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/lockf.c b/sysdeps/generic/lockf.c index 6e8851b..cc264cd 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 ()) -- cgit v1.1