public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: <libc-ports@sourceware.org>
Subject: Improve MIPS n64 handling of 64-bit fcntl
Date: Tue, 31 Jul 2012 23:23:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1207312317430.368@digraph.polyomino.org.uk> (raw)

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

                 reply	other threads:[~2012-07-31 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1207312317430.368@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).