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: Implement MIPS n64 sendfile64 as alias of sendfile syscall (bug 14822)
Date: Thu, 22 Nov 2012 02:38:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1211220237400.11924@digraph.polyomino.org.uk> (raw)

Bug 14822 notes that MIPS n64 is missing an actual sendfile64
implementation.  The n64 syscall interface has only a sendfile syscall
(o32 and n32 both have both sendfile and sendfile64 syscalls), and
since this function does not have struct stat involved in its
interface it's correct for sendfile and sendfile64 to be aliases for
n64.  Thus this patch fixes this issue by making n64 handle this
syscall the same as sysdeps/unix/sysv/linux/wordsize-64.

2012-11-22  Joseph Myers  <joseph@codesourcery.com>

	[BZ #14822]
	* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
	(sendfile): New syscall entry.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c: New file.
	Copy of ../sysdeps/unix/sysv/linux/wordsize-64/sendfile64.c.

diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c
new file mode 100644
index 0000000..4c451bd
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c
@@ -0,0 +1 @@
+/* sendfile64 is alias of sendfile syscall.  */
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
index c94fe75..b23a2a1 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
@@ -8,3 +8,5 @@ fanotify_mark	EXTRA	fanotify_mark	i:iiiis	fanotify_mark
 
 fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs fstatfs64 __fstatfs64
 statfs		-	statfs		i:sp	__statfs	statfs statfs64 __statfs64
+
+sendfile	-	sendfile	i:iipi	sendfile	sendfile64

-- 
Joseph S. Myers
joseph@codesourcery.com

             reply	other threads:[~2012-11-22  2:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  2:38 Joseph S. Myers [this message]
2012-11-22  2:41 ` Carlos O'Donell

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.1211220237400.11924@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).