summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-05-08 14:04:59 +0000
committerAndreas Jaeger <aj@suse.de>2000-05-08 14:04:59 +0000
commit97d9957b66f0b736a34520b4860891bb8e5cd020 (patch)
tree5d4245c558ebf159a5500bb907b90f1deee61bce
parentded812f4791db4d2054db7ade01ec323d54824b5 (diff)
downloadglibc-97d9957b66f0b736a34520b4860891bb8e5cd020.tar.gz
glibc-97d9957b66f0b736a34520b4860891bb8e5cd020.tar.xz
glibc-97d9957b66f0b736a34520b4860891bb8e5cd020.zip
Update.
2000-05-08  Andreas Jaeger  <aj@suse.de>

	* sysdeps/generic/lockf64.c (lockf64): Return -1 for overflow and
	set errno.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/generic/lockf64.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 913f8d461d..7aebf4d113 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-08  Andreas Jaeger  <aj@suse.de>
+
+	* sysdeps/generic/lockf64.c (lockf64): Return -1 for overflow and
+	set errno.
+
 2000-05-08  Jakub Jelinek  <jakub@redhat.com>
 
 	* elf/dl-lookup.c (add_dependency): Reallocate l_reldeps in
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));