This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Improve MIPS n64 handling of 64-bit fcntl
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-ports at sourceware dot org>
- Date: Tue, 31 Jul 2012 23:23:23 +0000
- Subject: Improve MIPS n64 handling of 64-bit fcntl
MIPS #includes the sysdeps/unix/sysv/linux/i386 version of fcntl.c and
lockf64.c. This is fine for o32 and n32, which do have a separate fcntl64
syscall, but suboptimal for n64, where the fcntl syscall is 64-bit and the
relevant structures have the same layout with and without
_FILE_OFFSET_BITS=64. I've applied this patch to make only o32 and n32
use these files. This makes n64 fall back to the default implementations
(syscalls.list for fcntl, sysdeps/wordsize-64 for lockf64) which are the
best ones to use for it.
(This is preparatory to removing __ASSUME_FCNTL64; those
sysdeps/unix/sysv/linux/i386 files are the only places __ASSUME_FCNTL64 is
used, and it turns out MIPS n64 is the only case where those files might
have been used without the fcntl64 syscall being available.)
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index a1b6dc5..4e45ae7 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,12 @@
+2012-07-31 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/fcntl.c: Remove.
+ * sysdeps/unix/sysv/linux/mips/lockf64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips32/fcntl.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/lockf64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c: Likewise.
+
2012-07-27 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): New.
diff --git a/ports/sysdeps/unix/sysv/linux/mips/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/fcntl.c
deleted file mode 100644
index ea951bc..0000000
--- a/ports/sysdeps/unix/sysv/linux/mips/fcntl.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/lockf64.c
deleted file mode 100644
index a88f5a7..0000000
--- a/ports/sysdeps/unix/sysv/linux/mips/lockf64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
--
Joseph S. Myers
joseph@codesourcery.com