This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Improve <bits/fcntl-linux.h>: F_GETLK etc.
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Sun, 21 Oct 2012 21:05:51 +0200
- Subject: Improve <bits/fcntl-linux.h>: F_GETLK etc.
Converting more <bits/fcntl.h> files, I noticed that the new F_GETLK
defines didn't handle USE_FILE_OFFSET64, fixed with the appended
patch. Ok to commit?
Andreas
2012-10-21 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h (F_GETLK, F_SETLK)
(F_SETLKW) [!F_GETLK]: Define values for !__USE_FILE_OFFSET64.
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index 8527371..7d35f16 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -98,9 +98,15 @@
#endif
#ifndef F_GETLK
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
+# ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+# else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+# endif
#endif
#ifndef F_GETLK64
# define F_GETLK64 12 /* Get record locking info. */
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126