about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-25 17:19:53 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-25 17:19:53 +0000
commita5fe041c968de453889e5c2ff612785c5dd43814 (patch)
treef912250f32bad18f262cfa2ff3e080cff3859565 /sysdeps
parenta8244aae8b0ff14343e8c1063b527418b7a6f5d4 (diff)
downloadglibc-a5fe041c968de453889e5c2ff612785c5dd43814.tar.gz
glibc-a5fe041c968de453889e5c2ff612785c5dd43814.tar.xz
glibc-a5fe041c968de453889e5c2ff612785c5dd43814.zip
Update.
2000-10-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/fcntl.c (__libc_fcntl): When
	converting struct flock64 to struct flock and back, use fcntl commands
	which work on struct flock.

2000-10-25  Jakub Jelinek  <jakub@redhat.com>

	* math/test-misc.c (main): Only check modfl if NO_LONG_DOUBLE is not
	defined.
	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/i386/fcntl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/fcntl.c b/sysdeps/unix/sysv/linux/i386/fcntl.c
index e67931ec71..c7f02b2c31 100644
--- a/sysdeps/unix/sysv/linux/i386/fcntl.c
+++ b/sysdeps/unix/sysv/linux/i386/fcntl.c
@@ -16,6 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -84,7 +85,7 @@ __libc_fcntl (int fd, int cmd, ...)
 	fl.l_whence = fl64->l_whence;
 	fl.l_pid = fl64->l_pid;
 
-	res = INLINE_SYSCALL (fcntl, 3, fd, cmd, &fl);
+	res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl);
 	if (res  != 0)
 	  return res;
 	/* Everything ok, convert back.  */
@@ -120,7 +121,8 @@ __libc_fcntl (int fd, int cmd, ...)
 	fl.l_type = fl64->l_type;
 	fl.l_whence = fl64->l_whence;
 	fl.l_pid = fl64->l_pid;
-	return INLINE_SYSCALL (fcntl, 3, fd, cmd, &fl);
+	assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64);
+	return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl);
       }
     default:
       return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);