diff options
author | Andreas Jaeger <aj@suse.de> | 2000-05-08 14:04:38 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-05-08 14:04:38 +0000 |
commit | b38371e71e1c28be3242f08488156cf212ad95c2 (patch) | |
tree | 1443fc10ee1996982655abeceee6044d549bfbf9 | |
parent | bc1bf146959bdc38194d7b75e9c7ffafb0d47862 (diff) | |
download | glibc-b38371e71e1c28be3242f08488156cf212ad95c2.tar.gz glibc-b38371e71e1c28be3242f08488156cf212ad95c2.tar.xz glibc-b38371e71e1c28be3242f08488156cf212ad95c2.zip |
2000-05-08 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/lockf64.c (lockf64): Return -1 for overflow and set errno.
-rw-r--r-- | sysdeps/generic/lockf64.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/generic/lockf64.c b/sysdeps/generic/lockf64.c index 074dd7d82a..3d27964879 100644 --- a/sysdeps/generic/lockf64.c +++ b/sysdeps/generic/lockf64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1994,96,97,98,99,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 @@ -31,8 +31,11 @@ lockf64 (int fd, int cmd, off64_t len64) off_t len = (off_t) len64; if (len64 != (off64_t) len) - /* We can't represent the length. */ - return EOVERFLOW; + { + /* We can't represent the length. */ + __set_errno (EOVERFLOW); + return -1; + } memset ((char *) &fl, '\0', sizeof (fl)); |