summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bits/fcntl.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-11-04 19:54:32 +0000
committerEric Andersen <andersen@codepoet.org>2006-11-04 19:54:32 +0000
commitb56362fde867f487068901d41a19cb1d95bf364b (patch)
tree8d44e6f499b8fc792dccac00ccf7758fe5e03c9a /libc/sysdeps/linux/mips/bits/fcntl.h
parentc4ae8409ba034fcd7092d891381c3711e62d5b25 (diff)
mips64 patch from Atsushi Nemoto:
Adjust for mips64 kernel.
Diffstat (limited to 'libc/sysdeps/linux/mips/bits/fcntl.h')
-rw-r--r--libc/sysdeps/linux/mips/bits/fcntl.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/mips/bits/fcntl.h b/libc/sysdeps/linux/mips/bits/fcntl.h
index 1f615b476..08c868696 100644
--- a/libc/sysdeps/linux/mips/bits/fcntl.h
+++ b/libc/sysdeps/linux/mips/bits/fcntl.h
@@ -62,7 +62,11 @@
#endif
#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+# if __WORDSIZE == 64
+# define O_LARGEFILE 0
+# else
+# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+# endif
#endif
/* Values for the second argument to `fcntl'. */
@@ -81,9 +85,15 @@
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
-#define F_GETLK64 33 /* Get record locking info. */
-#define F_SETLK64 34 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 35 /* Set record locking info (blocking). */
+#if __WORDSIZE == 64
+# define F_GETLK64 14 /* Get record locking info. */
+# define F_SETLK64 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW64 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK64 33 /* Get record locking info. */
+# define F_SETLK64 34 /* Set record locking info (non-blocking). */
+# define F_SETLKW64 35 /* Set record locking info (blocking). */
+#endif
#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */